/* Shared studio document layout: app identity row, document head, contents list, numbered
   sections, tables and help strips. Used by the app legal and help pages (Sonovnik, 8 way).
   Builds on /styles.css tokens, so light and dark themes both work. */
/* app identity row in the hero and document heads */
.doc-id { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.doc-id .icon { flex: none; box-shadow: 0 16px 40px -18px rgba(157, 75, 255, .6); }
.doc-id .doc-name { margin: 0; color: var(--ink); font: 700 var(--step-2)/1.1 var(--f-display); letter-spacing: -.02em; max-width: none; }
.doc-sub { display: block; margin-top: 6px; font: 500 .76rem/1.3 var(--f-mono); color: var(--teal); }

.doc-h2 { font-size: var(--step-3); font-weight: 700; margin: 14px 0 16px; }
/* help & documents strip */
.doc-docs .dev-pages { margin-top: 8px; }
.dev-pages a[aria-current="page"] { border-color: var(--ink); }

/* document pages */
.doc-head { padding-bottom: 8px; }
.doc-head h1 { margin-top: 26px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font: 500 .78rem/1.5 var(--f-mono); color: var(--muted); }
.doc-meta a { color: var(--ink); }
.doc-glance { padding-top: 32px; }
.doc-cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .doc-cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .doc-cards-4 { grid-template-columns: 1fr; } }
.doc-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
@media (max-width: 900px) { .doc-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc-wrap { padding-top: clamp(40px, 6vw, 64px); }

.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.doc-toc { position: sticky; top: 88px; display: grid; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line); }
.doc-toc p { margin: 0 0 10px; font: 600 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.doc-toc a { display: flex; gap: 10px; align-items: baseline; padding: 6px 8px; margin-left: -8px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: var(--step--1); line-height: 1.35; }
.doc-toc a span { font: 500 .72rem/1 var(--f-mono); color: var(--teal); }
.doc-toc a:hover { color: var(--ink); background: var(--surface); }

.doc-prose > section, .doc-faq-group { padding-block: 30px; border-top: 1px solid var(--line); scroll-margin-top: 88px; }
.doc-prose > section:first-child, .doc-faq-group:first-child { border-top: 0; padding-top: 0; }
.doc-prose h2 { display: flex; gap: 14px; align-items: baseline; font-size: var(--step-2); font-weight: 700; margin-bottom: 14px; }
.doc-prose h2 .n { font: 600 .8rem/1 var(--f-mono); color: var(--honey-ink); }
.doc-prose h3 { margin: 22px 0 8px; font: 600 .74rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.doc-prose p, .doc-prose li { color: var(--muted); line-height: 1.7; max-width: 74ch; }
.doc-prose p + p { margin-top: 10px; }
.doc-prose strong { color: var(--ink); font-weight: 600; }
.doc-prose a { color: var(--ink); text-underline-offset: 3px; }
.doc-prose ul, .doc-prose ol { margin: 10px 0; padding-left: 1.2em; display: grid; gap: 6px; }
.doc-prose code { font: 500 .86em var(--f-mono); color: var(--ink); }
.doc-callout { margin-top: 16px; padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid var(--honey); border-radius: var(--radius); background: var(--surface); }
.doc-table { overflow-x: auto; margin: 14px 0 6px; border: 1px solid var(--line); border-radius: var(--radius); }
.doc-table table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table th { font: 600 .7rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--surface); }
.doc-answer { padding-bottom: 22px; }
.doc-answer p, .doc-answer li { color: var(--muted); }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .doc-toc { position: static; display: flex; gap: 8px; overflow-x: auto; padding: 0 0 6px; border-left: 0; scrollbar-width: none; }
  .doc-toc p { display: none; }
  .doc-toc a { flex: none; white-space: nowrap; margin-left: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
}
