/* Manual web de GliderLink Web. Colores corporativos: rojo #8B0000. Sin fuentes ni recursos externos. */
:root {
  --bg: #f1eeee; --panel: #ffffff; --fg: #231e1e; --muted: #6a6060; --line: #ddd5d5;
  --accent: #8b0000; --accent-fg: #ffffff; --link: #8b0000; --code-bg: #f6f1f1;
  --note: #2563a8; --note-bg: #eaf1fa; --tip: #1f7a4d; --tip-bg: #e9f6ef; --warn: #a15c00; --warn-bg: #fdf2e0;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171313; --panel: #211b1b; --fg: #ece4e4; --muted: #a99d9d; --line: #3b3030;
    --accent: #6d0000; --accent-fg: #ffffff; --link: #ff9d9d; --code-bg: #2a2121;
    --note: #8ab8ee; --note-bg: #1c2733; --tip: #7fd1a3; --tip-bg: #1a2a22; --warn: #f0b867; --warn-bg: #2e2517; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171313; --panel: #211b1b; --fg: #ece4e4; --muted: #a99d9d; --line: #3b3030;
  --accent: #6d0000; --accent-fg: #ffffff; --link: #ff9d9d; --code-bg: #2a2121;
  --note: #8ab8ee; --note-bg: #1c2733; --tip: #7fd1a3; --tip-bg: #1a2a22; --warn: #f0b867; --warn-bg: #2e2517; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); }
a { color: var(--link); }
img { max-width: 100%; height: auto; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--accent); color: var(--accent-fg); padding: .55rem max(1rem, env(safe-area-inset-right, 0px)) .55rem max(1rem, env(safe-area-inset-left, 0px)); }
.top a { color: var(--accent-fg); text-decoration: none; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: .01em; }
.brand img { height: 26px; width: auto; }
.tools { display: flex; align-items: center; gap: 1.1rem; font-size: .9rem; }
.tools .lang { border: 1px solid rgba(255,255,255,.55); border-radius: 4px; padding: .1rem .55rem; }

/* Estructura */
.wrap { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 2rem; max-width: 76rem; margin: 0 auto;
  padding: 1.5rem max(1rem, env(safe-area-inset-right, 0px)) 2rem max(1rem, env(safe-area-inset-left, 0px)); }
.side { position: sticky; top: 4.2rem; align-self: start; max-height: calc(100vh - 5rem); overflow: auto; font-size: .93rem; }
.side summary { display: none; cursor: pointer; font-weight: 600; padding: .4rem 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side .pages > li { margin: .15rem 0; }
.side a, .side .soon span { display: block; padding: .25rem .6rem; border-radius: 5px; text-decoration: none; color: var(--fg); }
.side a:hover { background: var(--panel); }
.side a[aria-current="page"] { background: var(--panel); color: var(--link); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side .soon { color: var(--muted); padding: .25rem .6rem; }
.side .soon span { display: inline; padding: 0; color: var(--muted); }
.side small { font-size: .75rem; }
.side .group { margin: 1.1rem .6rem .3rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.side .toc { margin: .15rem 0 .5rem .4rem; border-left: 1px solid var(--line); }
.side .toc a { font-size: .85rem; color: var(--muted); padding: .15rem .6rem; }
.side .toc a:hover { color: var(--link); }

/* Contenido */
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 2rem clamp(1rem, 4vw, 2.75rem) 2rem; min-width: 0; }
.doc h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .6rem; color: var(--link); text-wrap: balance; }
.doc h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.6rem 0 .7rem; padding-bottom: .35rem; border-bottom: 2px solid var(--accent); text-wrap: balance; }
.doc h3 { font-size: 1.12rem; margin: 1.8rem 0 .4rem; }
.doc p, .doc li { max-width: 72ch; }
.doc .lead { font-size: 1.12rem; color: var(--muted); }
.doc ul, .doc ol { padding-left: 1.4rem; }
.doc li { margin: .25rem 0; }
.doc code, .doc kbd { font: .88em var(--mono); background: var(--code-bg); border: 1px solid var(--line); border-radius: 4px; padding: .05em .35em; }
.doc kbd { box-shadow: 0 1px 0 var(--line); }
.doc b.ui, .doc strong.ui { font-weight: 600; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

figure { margin: 1.4rem 0; }
figure img { display: block; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.12); background: #fff; }
figure.phone img { max-width: 19rem; }
figure.narrow img { max-width: 34rem; }
figcaption { margin-top: .45rem; font-size: .88rem; color: var(--muted); max-width: 72ch; }

.tw { overflow-x: auto; margin: 1.1rem 0; }
table { border-collapse: collapse; font-size: .93rem; min-width: 100%; }
th, td { text-align: left; vertical-align: top; padding: .5rem .75rem; border-bottom: 1px solid var(--line); }
th { background: var(--code-bg); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.note, .tip, .warn { margin: 1.2rem 0; padding: .7rem 1rem; border-radius: 6px; border-left: 4px solid; max-width: 72ch; }
.note { background: var(--note-bg); border-color: var(--note); }
.tip { background: var(--tip-bg); border-color: var(--tip); }
.warn { background: var(--warn-bg); border-color: var(--warn); }
.note > :first-child, .tip > :first-child, .warn > :first-child { margin-top: 0; }
.note > :last-child, .tip > :last-child, .warn > :last-child { margin-bottom: 0; }
.formula { font: .92rem/1.55 var(--mono); background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: .8rem 1rem; overflow-x: auto; white-space: pre; margin: 1rem 0; }

.classes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem; }
.classes li { max-width: none; margin: 0; }
.classes .ok a { display: block; padding: .7rem 1rem; border: 1px solid var(--accent); border-radius: 6px; font-weight: 600; text-decoration: none; }
.classes .ok a:hover { background: var(--code-bg); }
.classes .soon { padding: .7rem 1rem; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); }
.classes small { font-size: .78rem; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .95rem; }
.pager a { text-decoration: none; font-weight: 600; }
.foot { max-width: 76rem; margin: 0 auto; padding: 0 max(1rem, env(safe-area-inset-left, 0px)) 2rem; color: var(--muted); font-size: .85rem; }
.foot p { margin: .2rem 0; }

.pick { max-width: 30rem; margin: 18vh auto 0; text-align: center; padding: 0 1rem; }
.pick h1 { color: var(--link); }

@media (max-width: 860px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .side { position: static; max-height: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .3rem .8rem; }
  .side summary { display: block; }
  .tools a:not(.lang) { display: none; }
  .doc h1 { font-size: 1.6rem; }
}
@media (max-width: 860px) { .side details:not([open]) > :not(summary) { display: none; } }
@media print {
  .top, .side, .pager { display: none; }
  .wrap { display: block; padding: 0; } .doc { border: 0; padding: 0; }
  figure img { box-shadow: none; } h2 { break-after: avoid; } figure { break-inside: avoid; }
}

/* Botón de enlace (por ejemplo, la guía de primeros pasos en PDF). */
a.btn { display: inline-block; background: var(--accent); color: var(--accent-fg); text-decoration: none; padding: .5rem 1rem; border-radius: .4rem; font-weight: 600; }
a.btn:hover { filter: brightness(1.15); }

.gs-thumb { display: inline-flex; align-items: center; gap: .7rem; margin: -.6rem 0 1.2rem; padding: .35rem .6rem .35rem .35rem; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; font-size: .85rem; cursor: zoom-in; }
.gs-thumb:hover { border-color: var(--accent); }
.gs-thumb img { width: 9rem; max-height: 5.5rem; object-fit: cover; object-position: top left; border: 1px solid var(--line); border-radius: 4px; }
.gs-lightbox { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.8); cursor: zoom-out; padding: 1rem; }
.gs-lightbox img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 4px; }
@media print { .gs-thumb { display: none; } }
