/* Guía de uso (/docs/). Mismo sistema que la portada (docs/design/landing.md): tokens de
   /tokens.css, Bricolage Grotesque y Public Sans autoalojadas, píldoras, filetes en lugar de
   sombras y el mandarina solo como relleno. Sin scripts ni peticiones a terceros. */
:root {
  --ink: var(--color-text, #1f2024);
  --ink-soft: var(--color-text-muted, #4b4a47);
  --meta: var(--color-text-subtle, #6b6964);
  --line: var(--color-border, #e3e0d9);
  --canvas: #ffffff;
  --fog: #f2f0eb;
  --mist: #ffeadb;
  --dark: #25272c;
  --display: #16171a;
  --volt: var(--color-accent, #ff7a1a);
  --highlight: var(--color-accent-text, #a34508);
  --ok: var(--ok-fg, #1f6b45);
  --ok-wash: var(--ok-bg, #e5f2ea);
  --warn: var(--warn-fg, #8f4f06);
  --warn-wash: var(--warn-bg, #fdf0dc);
  --bad: var(--bad-fg, #b3261e);
  --bad-wash: var(--bad-bg, #fbeaea);
  --code-bg: var(--color-code-bg, #1f2024);
  --code-fg: var(--color-code-fg, #f7f6f3);
  --pill: 9999px;
  --r-card: 12px;
  --ring: 0 0 0 1px rgba(22, 23, 26, 0.1);
  --side-w: 272px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 17px/1.6 "Public Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: var(--display); text-underline-offset: 2px; }
a:hover { color: var(--highlight); }
:focus-visible { outline: 2px solid var(--display); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", Georgia, serif; color: var(--display); text-wrap: balance; }
code, kbd {
  font-family: "Spline Sans Mono", ui-monospace, monospace; font-size: 0.86em;
  background: var(--fog); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere;
}
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 100; background: var(--canvas); padding: 8px 14px; border-radius: var(--pill); box-shadow: var(--ring); }

/* Cabecera: blanca, fija, 64 px; enlaces en píldora. */
.docs-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); }
.docs-header .bar { max-width: 1280px; margin: 0 auto; padding: 10px 16px; min-height: 64px; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 21px "Bricolage Grotesque", serif; color: var(--display); text-decoration: none; }
.brand em { font-style: normal; color: var(--highlight); }
.brand-guide {
  font: 600 12px "Spline Sans Mono", monospace; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--highlight); background: var(--mist); border-radius: var(--pill); padding: 4px 10px;
}
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.bar-right a { color: var(--display); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 14px; border-radius: var(--pill); min-height: 40px; display: inline-flex; align-items: center; }
.bar-right a:hover { background: var(--fog); color: var(--display); }
.bar-right a.cta { border: 1.5px solid var(--display); font-weight: 600; margin-left: 4px; }
.bar-right a.cta:hover { background: var(--display); color: #fff; }

/* Disposición: barra lateral + contenido. */
.docs { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); gap: 48px; }
.docs-side { position: sticky; top: 65px; align-self: start; max-height: calc(100vh - 65px); overflow-y: auto; padding: 28px 4px 40px 0; }
.docs-menu > summary { display: none; }
.docs-nav { font-size: 15px; }
.docs-nav p {
  font: 600 12px "Spline Sans Mono", monospace; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--meta); margin: 22px 0 6px 12px;
}
.docs-nav p:first-child { margin-top: 0; }
.docs-nav p.sub { font-size: 11px; margin: 12px 0 4px 12px; letter-spacing: 0.06em; }
.docs-nav ul { list-style: none; display: grid; gap: 1px; }
.docs-nav a {
  display: block; padding: 6px 12px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; line-height: 1.35;
}
.docs-nav a:hover { background: var(--fog); color: var(--display); }
.docs-nav a[aria-current="page"] { background: var(--mist); color: var(--display); font-weight: 600; }

.docs-main { min-width: 0; max-width: 780px; padding: 32px 0 72px; }
.crumbs { font-size: 14px; color: var(--meta); margin-bottom: 14px; }
.crumbs a { color: var(--meta); }
.docs-main h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; line-height: 1; letter-spacing: -0.035em; margin-bottom: 16px; }
.lede { font-size: 19px; color: var(--ink-soft); margin-bottom: 20px; max-width: 64ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.tag {
  font: 600 12px "Spline Sans Mono", monospace; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--mist); color: var(--highlight); border-radius: var(--pill); padding: 4px 10px;
}
.tag.plain { background: var(--fog); color: var(--ink-soft); }
.docs-main h2 { font-size: clamp(26px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin: 48px 0 12px; }
.docs-main h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 28px 0 8px; }
.docs-main h2 a.anchor, .docs-main h3 a.anchor { color: inherit; text-decoration: none; }
.docs-main p, .docs-main li { color: var(--ink-soft); }
.docs-main p + p { margin-top: 12px; }
.docs-main ul, .docs-main ol { margin: 10px 0 0 24px; }
.docs-main li + li { margin-top: 6px; }
.docs-main li > ul, .docs-main li > ol { margin-top: 6px; }
.docs-main strong, .docs-main b { color: var(--ink); font-weight: 600; }

/* Tablas: «Requisitos», operaciones, mensajes de error. */
.table-wrap { overflow-x: auto; margin-top: 14px; border-radius: var(--r-card); box-shadow: var(--ring); }
table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--canvas); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: var(--fog); font-weight: 600; color: var(--display); }
td { color: var(--ink-soft); }
table.req th[scope="row"] { width: 32%; background: var(--fog); }
.yes { color: var(--ok); font-weight: 600; }
.no { color: var(--bad); font-weight: 600; }

/* Avisos (estilo de la documentación de Google: Nota, Importante, Precaución). */
.callout { border-radius: var(--r-card); padding: 14px 16px; margin-top: 16px; background: var(--fog); }
.callout p { color: var(--ink); }
.callout > b:first-child, .callout > p > b:first-child { color: var(--display); }
.callout.important { background: var(--warn-wash); }
.callout.important > p > b:first-child { color: var(--warn); }
.callout.caution { background: var(--bad-wash); }
.callout.caution > p > b:first-child { color: var(--bad); }

/* Ejemplos de lo que se le pide al Copiloto: burbujas como las del chat. */
.prompts { list-style: none; margin: 14px 0 0 !important; display: grid; gap: 8px; }
.prompts li {
  margin: 0 !important; background: var(--fog); color: var(--ink) !important; border-radius: 18px 18px 4px 18px;
  padding: 10px 16px; width: fit-content; max-width: 100%;
}
.prompts li::before { content: "«"; color: var(--meta); }
.prompts li::after { content: "»"; color: var(--meta); }

pre {
  background: var(--code-bg); color: var(--code-fg); border-radius: var(--r-card); padding: 14px 16px; margin-top: 14px;
  overflow-x: auto; font: 14px/1.55 "Spline Sans Mono", ui-monospace, monospace;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }

/* Tarjetas de la portada de la guía. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.card { display: block; border-radius: var(--r-card); box-shadow: var(--ring); padding: 16px 18px; text-decoration: none; background: var(--canvas); }
.card:hover { box-shadow: 0 0 0 2px var(--display); color: inherit; }
.card b { display: block; font: 700 18px "Bricolage Grotesque", serif; color: var(--display); margin-bottom: 4px; }
.card span { color: var(--ink-soft); font-size: 15px; }

.steps { counter-reset: step; list-style: none; margin-left: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 44px; }
.steps > li + li { margin-top: 14px; }
.steps > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: -2px;
  font: 800 22px "Bricolage Grotesque", serif; color: var(--highlight); letter-spacing: -0.03em;
}

.related { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.related h2 { font-size: 22px !important; margin-top: 0 !important; }

.docs-footer { border-top: 1px solid var(--line); background: var(--fog); }
.docs-footer .bar { max-width: 1280px; margin: 0 auto; padding: 22px 16px 32px; font-size: 14px; color: var(--meta); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.docs-footer a { color: var(--ink-soft); }
.docs-footer p { flex-basis: 100%; }

@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-side { position: static; max-height: none; overflow: visible; padding: 12px 0 0; }
  .docs-menu { border-radius: var(--r-card); box-shadow: var(--ring); }
  .docs-menu > summary {
    display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 10px 16px;
    font-weight: 600; color: var(--display); cursor: pointer; list-style: none;
  }
  .docs-menu > summary::-webkit-details-marker { display: none; }
  .docs-menu > summary::after { content: "+"; font: 700 22px "Bricolage Grotesque", serif; }
  .docs-menu[open] > summary::after { content: "−"; }
  .docs-menu .docs-nav { padding: 4px 8px 16px; }
  .docs-main { padding-top: 20px; }
  .bar-right a.hide-sm { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .lede { font-size: 17px; }
  .brand-guide { display: none; }
  th, td { padding: 8px 10px; font-size: 14px; }
}
