/* Visagrafía® public site — one stylesheet, light and dark palettes.
   Look modelled on coreldraw.com/product/coreldraw: a white sticky
   header (logo left, centred nav, language menu right), a large bold
   hero, alternating white / pale bands, rounded feature cards. */

/* The reference site sets NB International. It is a commercial face:
   drop the licensed woff2 files into static/fonts/ and these
   declarations pick them up; otherwise Inter (Google Fonts) stands in. */
@font-face { font-family: "NB International"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/nbinternationalproreg-webfont.woff2) format("woff2"); }
@font-face { font-family: "NB International"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/nbinternationalpromed-webfont.woff2) format("woff2"); }
@font-face { font-family: "NB International"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/nbinternationalprobol-webfont.woff2) format("woff2"); }
@font-face { font-family: "NB International"; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/nbinternationalproita-webfont.woff2) format("woff2"); }

:root {
  --bg: #ffffff;
  --bg-2: #f4f6f8;
  --panel: #ffffff;
  --line: #e1e5ea;
  --text: #1b2430;
  --dim: #55606e;
  --faint: #8a94a1;
  --accent: #0d9bb0;
  --accent-hi: #0b869a;
  --accent-soft: #e4f5f8;
  --navy: #14213d;
  --ink: #111;
  --warn-bg: #fff6e0; --warn-line: #e3b34a;
  --note-bg: #eef4fb; --note-line: #7aa6dc;
  --tip-bg: #e9f7f4; --tip-line: #4fb8a8;
  --sans: "NB International", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 8px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(20,33,61,.05), 0 10px 30px rgba(20,33,61,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181e; --bg-2: #1c2129; --panel: #1f252e; --line: #303844;
    --text: #e9edf2; --dim: #a7b0bc; --faint: #7c8694;
    --accent: #3cc3d6; --accent-hi: #5fd2e2; --accent-soft: #163a41; --navy: #e9edf2; --ink: #f2f2f2;
    --warn-bg: #3a2f14; --warn-line: #b28a2b;
    --note-bg: #182a40; --note-line: #4f80bd;
    --tip-bg: #16302c; --tip-line: #3e9c8f;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; }
img { max-width: 100%; height: auto; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--bg-2); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--bg-2); padding: 12px 14px; border-radius: var(--r); overflow-x: auto; border: 1px solid var(--line); }
pre code { background: none; padding: 0; }
kbd {
  display: inline-block; padding: .05em .45em; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; background: var(--panel);
  font-size: .85em; line-height: 1.4; white-space: nowrap;
}
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }

/* ---- header: logo left, nav centred, language menu right ------------------ */
.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 21px; color: var(--navy); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.mainnav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.mainnav > a { padding: 8px 13px; border-radius: 999px; color: var(--text); font-weight: 500; font-size: 15px; }
.mainnav > a:hover { background: var(--bg-2); text-decoration: none; }
.mainnav > a.on { color: var(--accent-hi); background: var(--accent-soft); }
/* the language menu: a native details/summary dropdown, top right */
.lang-menu { position: relative; margin-left: auto; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text); background: var(--panel);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { background: var(--bg-2); }
.lang-menu summary .globe { width: 16px; height: 16px; }
.lang-menu summary::after { content: "▾"; font-size: 11px; color: var(--dim); }
.lang-menu .langs {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; z-index: 30;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
.langs a { font-size: 14px; padding: 7px 10px; border-radius: 6px; color: var(--text); white-space: nowrap; }
.langs a:hover { background: var(--bg-2); text-decoration: none; }
.langs a.on { color: var(--accent-hi); font-weight: 600; background: var(--accent-soft); }
.menu-toggle { display: none; margin-left: auto; font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--text); }
@media (max-width: 900px) {
  .top-row { flex-wrap: wrap; }
  .menu-toggle { display: inline-block; }
  .lang-menu { margin-left: 0; }
  .mainnav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  .mainnav.open { display: flex; }
}

/* ---- page layout -------------------------------------------------------- */
.page { display: grid; grid-template-columns: 1fr; gap: 32px; padding-block: 28px 56px; }
body.with-side .page { grid-template-columns: 250px minmax(0, 1fr); }
@media (max-width: 900px) { body.with-side .page { grid-template-columns: 1fr; } }
.side { position: sticky; top: 84px; align-self: start; font-size: 14px; max-height: calc(100vh - 100px); overflow: auto; }
.side-title { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 18px 0 6px; font-weight: 600; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--dim); }
.side li a:hover { background: var(--bg-2); text-decoration: none; color: var(--text); }
.side li a.on { color: var(--accent-hi); background: var(--accent-soft); font-weight: 500; }
.side li.l3 a { padding-left: 22px; font-size: 13px; }
@media (max-width: 900px) { .side { position: static; max-height: none; } }

.doc { min-width: 0; max-width: 860px; }
body.plain .doc { margin: 0 auto; }
body.hero .doc { max-width: none; }
.doc h1 { font-weight: 700; font-size: 2.6rem; line-height: 1.12; margin: 0 0 18px; letter-spacing: -.02em; color: var(--navy); }
.doc h2 { font-weight: 700; font-size: 1.7rem; margin: 2.2em 0 .6em; letter-spacing: -.015em; color: var(--navy); }
.doc h3 { font-size: 1.15rem; font-weight: 600; margin: 1.8em 0 .5em; }
.doc h4 { margin: 1.4em 0 .4em; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; font-weight: 600; }
.doc h2:first-child, .doc h1 + h2 { margin-top: 1em; }
.doc p, .doc ul, .doc ol { margin: 0 0 1em; }
.doc li { margin: .25em 0; }
.doc li > ul, .doc li > ol { margin: .3em 0 .3em; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.doc blockquote { margin: 1em 0; padding: 6px 18px; border-left: 3px solid var(--accent); color: var(--dim); }
.doc figure { margin: 1.4em 0 1.8em; }
.doc figure img { display: block; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); background: #fff; }
.doc figcaption { font-size: .86rem; color: var(--dim); margin-top: .5em; }
.tbl { overflow-x: auto; margin: 1em 0 1.4em; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--bg-2); white-space: nowrap; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg-2) 45%, transparent); }
/* the normalization figures (manual/fuentes, site/tools/normalization.py):
   one glyph per cell, every SVG at the same px-per-unit scale */
table.norm { table-layout: fixed; }
table.norm caption { text-align: left; font-weight: 600; padding: 0 0 6px; color: var(--navy); }
table.norm thead th { text-align: center; white-space: normal; }
table.norm tbody tr { background: none; }
table.norm tr.norm-label th { text-align: left; background: none; border-bottom: 0; padding: 14px 4px 2px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
table.norm td { text-align: center; vertical-align: bottom; padding: 4px 3px 10px; font-size: .8rem; color: var(--dim); font-variant-numeric: tabular-nums; }
table.norm img { display: block; margin: 0 auto 3px; border: 1px solid var(--line); border-radius: 6px; }
table.norm-lines td { padding: 2px 0 8px; }
table.norm-lines img { margin: 0; }

.adm { border: 1px solid var(--note-line); background: var(--note-bg); border-radius: var(--r); padding: 12px 16px; margin: 1.2em 0; }
.adm.tip { border-color: var(--tip-line); background: var(--tip-bg); }
.adm.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.adm .adm-title { font-weight: 600; margin: 0 0 .3em; }
.adm p:last-child, .adm ul:last-child { margin-bottom: 0; }

.lead { font-size: 1.2rem; color: var(--dim); line-height: 1.55; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; border: 1px solid var(--accent); font-size: 15px; }
.btn:hover { background: var(--accent-hi); text-decoration: none; color: #fff; }
.btn.quiet { background: var(--panel); color: var(--navy); border-color: var(--line); }
.btn.quiet:hover { background: var(--bg-2); }
/* a download button that is shown but does nothing yet (descargas.js DOWNLOADS_ENABLED) */
.btn.off { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 1.2em 0 1.6em; }

/* ---- home ---------------------------------------------------------------- */
body.hero .page { padding-top: 0; }
.hero-box { text-align: center; padding: 64px 0 28px; }
.hero-box h1 { font-size: 3.6rem; max-width: 820px; margin-inline: auto; }
.hero-box .lead { max-width: 720px; margin: 0 auto 1.4em; font-size: 1.25rem; }
.hero-glyphs { font-size: 1.05rem; color: var(--faint); margin-top: 6px; }
.band { background: var(--bg-2); border-radius: var(--r-lg); padding: 26px 28px; margin: 1.6em 0 2.4em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 1.5em 0 2.4em; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 22px 20px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--navy); }
.card p { margin: 0; color: var(--dim); font-size: .95rem; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 1.2em 0 2em; }
.stat { text-align: center; background: var(--bg-2); border-radius: var(--r-lg); padding: 18px 26px; min-width: 170px; }
.stat b { display: block; font-size: 2.1rem; font-weight: 700; color: var(--accent-hi); line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.glyph-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1em 0 .8em; justify-content: center; }
.glyph-row figure { margin: 0; width: 132px; text-align: center; }
.glyph-row img { width: 104px; height: 104px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; padding: 10px; box-shadow: var(--shadow); }
.glyph-row figcaption { font-size: .85rem; color: var(--dim); margin-top: 6px; }
/* `.doc p` (margin: 0 0 1em) outranks a bare class: name the element too,
   or the 720px block sits at the left edge with its text centred inside */
.doc p.glyph-note, .glyph-note { text-align: center; color: var(--dim); font-size: .95rem; max-width: 720px; margin: 0 auto 2em; }

/* ---- downloads ------------------------------------------------------------ */
.dl-group { margin: 1.4em 0; }
.dl-group h3 { margin-bottom: .4em; }
.dl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dl-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
.dl-item .t { font-weight: 600; }
.dl-item .m { font-size: .84rem; color: var(--dim); font-family: var(--mono); }
.dl-item .n { font-size: .9rem; color: var(--dim); grid-column: 1 / -1; }
.dl-item .n:empty { display: none; }
.dl-empty { color: var(--faint); font-style: italic; }
.dl-admin { margin-top: 2.5em; border: 1px dashed var(--line); border-radius: var(--r); padding: 16px 18px; }
.dl-admin form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; }
.dl-admin label { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--dim); }
.dl-admin input, .dl-admin select, .dl-admin textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); }
.dl-admin textarea { min-height: 60px; grid-column: 1 / -1; }
.dl-admin .full { grid-column: 1 / -1; }
.dl-admin button { font: inherit; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.dl-admin button.quiet { background: transparent; color: var(--text); border-color: var(--line); }
.dl-admin button.danger { background: transparent; color: #c4442a; border-color: #c4442a; padding: 3px 8px; font-size: .8rem; }
.dl-msg { font-size: .9rem; margin: 8px 0 0; color: var(--dim); }
.dl-msg.bad { color: #c4442a; }
.dl-msg.ok { color: #2e7d32; }
.dl-item .acts { display: flex; gap: 6px; }
.dl-item .acts button { font: inherit; }

/* ---- footer / misc -------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 26px 0 44px; color: var(--faint); font-size: .85rem; }
body.redirect .wrap { padding-top: 60px; text-align: center; }
.lang-list { list-style: none; padding: 0; display: flex; gap: 16px; justify-content: center; }
