/* The secondary pages: /detalles/, /en/details/ and the 404. They load
   site.css first (tokens, header, footer, controls) and this after it; the
   landing page does not load this file, which keeps its own CSS small. */

code, kbd, pre { font-family: var(--font-mono); }
p code, dd code, li code, figcaption code { font-size: 0.875em; }
kbd { padding: 0 0.3em; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-elev); font-size: 0.875em; white-space: nowrap; }

.page-head { padding-block: clamp(40px, 7vw, 96px) clamp(40px, 5vw, 64px); }

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.page-head .lead { max-width: 34em; }
.doc-grid { display: grid; gap: 40px; padding-bottom: var(--space-section); }

@media (min-width: 1024px) {
  .doc-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 72px; }
  .toc { position: sticky; top: 88px; align-self: start; }
}

.toc-title { margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.toc ol { margin: 0; padding: 0; border-left: 1px solid var(--border); list-style: none; }
.toc a { display: block; padding: 6px 0 6px 16px; color: var(--text); font-size: 14px; text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

.prose { min-width: 0; }
.prose > section { padding-bottom: 72px; }
.prose > section + section { padding-top: 64px; border-top: 1px solid var(--border); }
.prose h2 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); line-height: 1.08; }
.prose h3 { margin-top: 36px; }
.prose > section > p { max-width: 40em; margin-top: 16px; }
.prose b, .prose strong { font-weight: 600; }
.prose figure { display: grid; gap: 12px; max-width: 46em; margin-top: 28px; }
.prose figcaption { color: var(--text-mute); font-size: 0.84375rem; line-height: 1.5; }

.limit-list { max-width: 46em; margin: 24px 0 0; padding: 0; list-style: none; }
.limit-list li { padding: 13px 0; border-top: 1px solid var(--border); }
.limit-list li:last-child { border-bottom: 1px solid var(--border); }

.dl-plain { max-width: 46em; margin: 28px 0 0; }
.dl-plain div { padding-top: 16px; border-top: 1px solid var(--border); }
.dl-plain div + div { margin-top: 20px; }
.dl-plain dt { font-weight: 600; }
.dl-plain dd { margin: 6px 0 0; }

.card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-elev); }
.platform-notes { display: grid; gap: 20px; margin-top: 28px; }
.platform-notes p + p { margin-top: 10px; }
.platform-notes .detail { font-size: 14.5px; }

@media (min-width: 1200px) {
  .platform-notes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* A limit, said where the claim is made rather than in a footnote. */
.note {
  max-width: 40em;
  margin-top: 22px;
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--bg-elev);
  font-size: 14.5px;
  line-height: 1.55;
  text-wrap: wrap;
}

.note-label { display: block; margin-bottom: 2px; color: var(--text-mute); font-size: 13px; font-weight: 600; }

/* The folder tree, the operations log, a chapter on disk. */
.code {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
}

.code-name {
  display: block;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 12px;
}

.code .c { color: var(--text-mute); }
.code .k { color: var(--accent); }

@media (max-width: 480px) {
  .code { padding: 14px; font-size: 12px; }
}

/* The tree fits a 320px screen; with a reader's own text spacing a line wraps
   instead of making the box scroll sideways. */
.tree { overflow-x: visible; white-space: pre-wrap; overflow-wrap: anywhere; }

/* One operation per line, wrapped with a hanging indent instead of scrolled. */
.jsonl { overflow-x: visible; white-space: pre-wrap; }
.jsonl .op { display: block; padding-left: 2ch; text-indent: -2ch; overflow-wrap: anywhere; }
.jsonl .op + .op { margin-top: 4px; }
.prose-file { white-space: pre-wrap; }

.notices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 24px; }

@media (min-width: 1240px) {
  .notices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.notice { border-left: 3px solid var(--warn); border-radius: 0 var(--radius-card) var(--radius-card) 0; }
.notice-os { margin-bottom: 6px; color: var(--text-mute); font-size: 13px; font-weight: 600; }
.notice h3 { font: 400 22px/1.25 var(--font-page); }
.notice p { max-width: 46em; margin-top: 12px; font-size: 15px; }

/* The command takes the notice's width with Copy underneath; narrow, it wraps
   rather than scrolls, every line after the first hung two characters in.
   Copy, or a selection, still gives the single line. */
.command { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 14px; }
.command-line { align-self: stretch; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg-editor); }

.command-line pre {
  margin: 0;
  padding: 10px 14px 10px calc(14px + 2ch);
  font-size: 13px;
  line-height: 1.5;
  text-indent: -2ch;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.command .copy { min-width: 6.5em; }
.updates { max-width: 46em; margin-top: 28px; font-size: 15px; }

/* The 404. */
.lost { padding-block: clamp(64px, 14vh, 128px); }
.eyebrow { margin: 0; color: var(--text-mute); font-size: 13px; font-weight: 600; line-height: 1.4; }

.lost h1 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.lost h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); }
.lost .lead + .actions, .lost .intro + .actions { margin-top: 28px; }
.lost .intro { max-width: 34em; margin-top: 16px; font-size: 17px; }
.lost-en { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
