/* SIYAI Editorial Planner — prose pages (privacy, terms, 404)
   Read mode: comprehension and wayfinding first, in the same world. */

.doc-head {
  padding-block: clamp(1.4rem, 4vw, 2rem) clamp(3rem, 7vw, 4.5rem);
  color: #fff;
}
.doc-head__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.doc-head .wordmark { width: 96px; height: 50px; }
.doc-head h1 {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 26ch;
  color: #fff;
  font-size: var(--fs-h2);
}
.doc-head__meta {
  margin-top: 1rem;
  color: rgba(255, 255, 255, .9);
  font-size: var(--fs-note);
}
.doc-head .btn { min-height: 44px; padding: .5rem 1rem; }
/* The landing nav's pair, on the violet: the language switch, then the way
   back. The switch is the landing's own component, unchanged — its white pill
   sits on the aurora as the white button beside it does. */
.doc-head__actions { display: flex; align-items: center; gap: .6rem; }

.doc-head--slim { padding-bottom: clamp(2rem, 5vw, 3rem); }

.doc-body {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  align-items: start;
}

.toc {
  position: sticky;
  top: 2rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.toc b { display: block; margin-bottom: .7rem; font-size: var(--fs-label); }
.toc ol { display: grid; gap: .45rem; counter-reset: toc; }
.toc a {
  color: var(--ink-2);
  font-size: var(--fs-note);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover { color: var(--violet-deep); text-decoration: underline; }

.prose { max-width: 68ch; }
.prose > section + section,
.prose__lead + section { margin-top: clamp(2rem, 4vw, 2.8rem); }
.prose h2 {
  font-size: var(--fs-h4);
  scroll-margin-top: 1.5rem;
}
.prose h3 { margin-top: 1.4rem; font-size: var(--fs-body); }
.prose p,
.prose li { color: var(--ink-2); }
.prose p { margin-top: .9rem; }
.prose ul { margin-top: .9rem; display: grid; gap: .5rem; }
.prose ul li { position: relative; padding-left: 1.1rem; }
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lilac-200);
}
/* Numbered steps. `ol` is list-style:none in base.css, so the marker is a
   counter drawn in the same lilac as the `ul` bullet. */
.prose ol { margin-top: .9rem; display: grid; gap: .5rem; counter-reset: step; }
.prose ol li { position: relative; padding-left: 1.6rem; counter-increment: step; }
.prose ol li::before {
  content: counter(step) '.';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--violet-deep);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.prose dl { margin: .9rem 0 0; display: grid; gap: .8rem; }
.prose dt { font-weight: 500; color: var(--ink); }
.prose dd { margin: .2rem 0 0; color: var(--ink-2); }
.prose__lead { font-size: var(--fs-body); color: var(--ink); max-width: 62ch; }
.prose mark {
  padding: .1em .35em;
  border-radius: var(--r-xs);
  background: var(--lilac-50);
  color: var(--violet-deep);
  font-weight: 500;
}

.doc-foot {
  padding-block: 2.2rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-label);
  color: var(--ink-2);
}
.doc-foot__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem 1.4rem;
}
.doc-foot__links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.doc-foot a { color: var(--ink-2); }
.doc-foot a:hover { color: var(--violet-deep); }

/* 404 */
.lost {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.lost h2 { max-width: 24ch; }
.lost p { margin: 1.1rem auto 0; max-width: 44ch; color: var(--ink-2); }
.lost__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 2rem; }

@media (max-width: 900px) {
  .doc-body { grid-template-columns: 1fr; }
  .toc { position: static; }
  /* Unpinned, the contents list stops being a margin note and becomes the page's
     navigation — and it is now being tapped, not clicked. Each entry takes the
     row's whole width and a real height instead of a 19px line of type. */
  .toc ol { gap: 0; }
  .toc a { display: block; padding-block: .6rem; }
  .doc-foot__links a,
  .doc-foot__row > a { display: inline-block; padding-block: .4rem; }
}

/* The phone step, as on the landing, where the nav CTA drops at the same
   width: wordmark, switch and button no longer fit one row in English. The
   wordmark is already the link home (the footer repeats it), and the switch
   is the control a reader sent here from the app still needs. */
@media (max-width: 520px) {
  .doc-head__back { display: none; }
}
