/* Docs, FAQ, legal and support pages. Calm cream reading surface, sticky side nav. */

.page-hero { border-bottom: 2px solid var(--ink); background: var(--pillow); }
.page-hero .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.page-hero .hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.page-hero .meta { font-size: 0.95rem; font-weight: 600; color: var(--muted); margin-top: 16px; }

/* Layout with side nav */
.docs-layout { display: grid; gap: 28px; padding-block: 40px 96px; }
@media (min-width: 960px) {
  .docs-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 56px; }
  .docs-side { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-bottom: 20px; }
}
.docs-side details { border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--white); box-shadow: 3px 3px 0 var(--ink); }
@media (min-width: 960px) { .docs-side details { border: 0; background: none; box-shadow: none; } }
.docs-side summary { cursor: pointer; padding: 14px 18px; font: 800 1rem/1 var(--font-display); list-style: none; display: flex; justify-content: space-between; }
.docs-side summary::-webkit-details-marker { display: none; }
.docs-side summary::after { content: "\25BE"; }
.docs-side details[open] summary::after { content: "\25B4"; }
@media (min-width: 960px) { .docs-side summary { display: none; } }
.toc { padding: 4px 10px 14px; }
@media (min-width: 960px) { .toc { padding: 0; } }
.toc-title { font: 700 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 0 0 12px 12px; }
@media (max-width: 959px) { .toc-title { display: none; } }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 0.94rem; line-height: 1.3; color: var(--muted); }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 600 0.72rem/1.6 var(--font-mono); color: var(--muted); opacity: 0.7; }
.toc a:hover { background: var(--pillow); color: var(--ink); }
.toc a.active { background: var(--nap); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.toc a.active::before { color: var(--ink); opacity: 1; }

/* Prose */
.prose { max-width: 760px; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.doc-section { padding-top: 8px; margin-bottom: 64px; }
.doc-section > h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin-bottom: 18px; display: flex; gap: 14px; align-items: baseline; }
.doc-section > h2 .num { font: 700 0.8rem/1 var(--font-mono); background: var(--ink); color: var(--nap); padding: 6px 8px; border-radius: 8px; transform: translateY(-4px); flex: none; }
.prose h3 { margin: 32px 0 10px; font-size: 1.25rem; }
.prose p, .prose li { color: #2E2C26; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--muted); font-weight: 700; }
.prose a { font-weight: 600; }
.prose hr { border: 0; border-top: 1.5px dashed var(--line); margin: 48px 0; }

.num-steps { list-style: none; padding: 0 !important; counter-reset: s; display: grid; gap: 14px; }
.num-steps > li { counter-increment: s; position: relative; padding: 16px 18px 16px 62px; background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--radius); margin: 0; }
.num-steps > li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--nap); border: 1.5px solid var(--ink); font: 900 1rem/1 var(--font-display); color: var(--ink); }
.num-steps > li > strong:first-child { display: block; font: 800 1.08rem/1.3 var(--font-display); margin-bottom: 4px; color: var(--ink); }
.num-steps > li p:last-child { margin-bottom: 0; }

/* Code blocks */
.code-wrap { position: relative; margin: 18px 0 22px; }
.code-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ink-2); color: var(--muted-dark); border-radius: 16px 16px 0 0; padding: 9px 14px; font: 600 0.75rem/1 var(--font-mono); border: 1.5px solid var(--ink); border-bottom: 0; }
.code-label button { font: 700 0.72rem/1 var(--font-mono); background: var(--nap); color: var(--ink); border: 0; border-radius: 999px; padding: 6px 10px; cursor: pointer; }
pre.code { margin: 0; background: var(--ink); color: #EFE9D8; border: 1.5px solid var(--ink); border-radius: 0 0 16px 16px; padding: 18px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 0.84rem/1.65 var(--font-mono); tab-size: 2; }
pre.code.solo { border-radius: 16px; }
pre.code .c { color: #8F8878; }
pre.code .k { color: var(--nap); }
pre.code .s { color: var(--lilac); }
pre.code code { background: none; padding: 0; font-size: inherit; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 18px 0 24px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--white); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; font: 700 0.7rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--pillow); padding: 12px 14px; border-bottom: 1.5px solid var(--ink); }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.table td:first-child { font-weight: 700; }
@media (max-width: 520px) { .table { font-size: 0.86rem; } .table th, .table td { padding: 10px; } }

/* Keyboard shortcut cards */
.keys-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); margin: 18px 0 24px; }
.key-card { background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 18px; box-shadow: 3px 3px 0 var(--ink); }
.key-card kbd { font-size: 1.1rem; margin-bottom: 12px; }
.key-card p { margin: 0; font-weight: 600; font-size: 0.96rem; }

/* Fake macOS bits for the install walk-through */
.mock { margin: 16px 0 6px; display: flex; justify-content: center; }
.mac-alert { width: min(100%, 300px); background: #F3F1EC; border: 1.5px solid #BDB7A8; border-radius: 16px; padding: 22px 20px 18px; text-align: center; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.4); font-family: -apple-system, system-ui, sans-serif; }
.mac-alert img { width: 56px; height: 56px; margin: 0 auto 12px; }
.mac-alert b { display: block; font-size: 0.92rem; line-height: 1.3; margin-bottom: 8px; }
.mac-alert span { display: block; font-size: 0.76rem; color: #5D5A52; line-height: 1.35; margin-bottom: 16px; }
.mac-alert .mbtns { display: grid; gap: 7px; }
.mac-alert .mbtns i { font-style: normal; font-size: 0.82rem; padding: 6px; border-radius: 8px; background: #E1DED6; }
.mac-alert .mbtns i.hot { background: #2F7CF6; color: var(--white); outline: 3px solid var(--alert); outline-offset: 2px; }
.mac-pane { width: min(100%, 460px); background: #FBFAF7; border: 1.5px solid #BDB7A8; border-radius: 14px; padding: 16px; font-family: -apple-system, system-ui, sans-serif; font-size: 0.84rem; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35); }
.mac-pane .crumb { color: #6C685E; font-size: 0.74rem; margin-bottom: 10px; }
.mac-pane .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); border: 1px solid #E2DED4; border-radius: 10px; padding: 12px; }
.mac-pane .row i { font-style: normal; flex: none; padding: 5px 10px; border-radius: 7px; background: #E6E3DB; outline: 3px solid var(--alert); outline-offset: 2px; }
.menubar { width: min(100%, 520px); height: 34px; border-radius: 10px; background: #1F1E24; color: #EEE; display: flex; align-items: center; gap: 12px; padding: 0 12px; font: 600 0.76rem/1 -apple-system, system-ui, sans-serif; position: relative; overflow: hidden; }
.menubar .notch { position: absolute; left: 50%; top: 0; width: 26%; height: 22px; background: #000; border-radius: 0 0 12px 12px; transform: translateX(-50%); }
.menubar .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.menubar .right img { width: 18px; height: 18px; border-radius: 4px; outline: 2px solid var(--nap); outline-offset: 2px; }
.menubar .dot { width: 14px; height: 10px; border-radius: 3px; background: #6E6C75; display: inline-block; }
@media (max-width: 420px) { .menubar .hide-sm { display: none; } }

/* Download hero card */
.dl-card { display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: center; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 36px); box-shadow: 6px 6px 0 var(--ink); }
.dl-card > div { flex: 1 1 260px; min-width: 0; }
.dl-card img { width: 96px; height: 96px; flex: none; }
.dl-card h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.dl-card ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dl-stack { display: grid; gap: 22px; }
.dl-card .os-note { font-size: 0.92rem; color: var(--muted); margin: 10px 0 0; }

/* Windows SmartScreen mock */
.win-smart { width: min(100%, 430px); background: #0F5FBF; color: var(--white); border-radius: 4px; padding: 22px 22px 16px; font-family: "Segoe UI", system-ui, sans-serif; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.45); }
.win-smart b { display: block; font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; }
.win-smart span { display: block; font-size: 0.8rem; line-height: 1.4; opacity: 0.92; }
.win-smart u { display: inline-block; margin-top: 10px; font-size: 0.8rem; outline: 3px solid var(--alert); outline-offset: 2px; }
.win-smart .wbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.win-smart .wbtns i { font-style: normal; font-size: 0.8rem; padding: 6px 18px; border: 1px solid rgba(255, 255, 255, 0.7); }
.win-smart .wbtns i.hot { outline: 3px solid var(--alert); outline-offset: 2px; }

/* FAQ page */
.faq-group { margin-bottom: 56px; }
.faq-group h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 18px; display: flex; gap: 12px; align-items: center; }
.faq-group h2 .chip { font-size: 0.72rem; }
.faq-list details p, .faq-list details li { color: #2E2C26; }

/* Troubleshooting cards */
.fix { background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 22px clamp(18px, 3vw, 26px); box-shadow: 3px 3px 0 var(--ink); margin-bottom: 22px; scroll-margin-top: 92px; }
.fix h2 { font-size: clamp(1.25rem, 2.6vw, 1.55rem); margin-bottom: 12px; }
.fix .why { font-size: 0.94rem; color: var(--muted); border-top: 1.5px dashed var(--line); padding-top: 12px; margin: 14px 0 0; }
.fix ol, .fix ul { padding-left: 1.3em; }
.fix-index { columns: 2 260px; gap: 28px; padding-left: 1.2em; margin: 0 0 40px; }
.fix-index li { margin-bottom: 6px; break-inside: avoid; }

/* Changelog */
.release { position: relative; padding-left: 28px; border-left: 2px dashed var(--line); padding-bottom: 36px; }
.release::before { content: ""; position: absolute; left: -10px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--nap); border: 2px solid var(--ink); }
.release.old::before { background: var(--lilac); }
.release h2 { font-size: clamp(1.5rem, 3vw, 2rem); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.release .card { margin-top: 12px; }
.release ul { padding-left: 1.2em; margin: 0; }
.release li { margin-bottom: 8px; }

/* Legal */
.legal .updated { font: 600 0.82rem/1 var(--font-mono); color: var(--muted); }
.tldr { background: var(--nap); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-hard); margin: 0 0 40px; }
.tldr h2 { font-size: 1.3rem; margin-bottom: 10px; }
.tldr ul { margin: 0; padding-left: 1.2em; }
.legal h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 40px 0 12px; }

/* Support */
.support-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* 404 */
.nf { min-height: 62vh; display: grid; place-items: center; text-align: center; padding-block: 64px; }
.nf img { width: 180px; height: 180px; margin: 0 auto 10px; animation: tilt 5s ease-in-out infinite; }
.nf .zzz { margin: 0 auto; }
.nf h1 { margin: 6px 0 14px; }
.nf p { color: var(--muted); font-size: 1.15rem; max-width: 30em; margin-inline: auto; }
.nf .hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; }
@keyframes tilt { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-6px); } }
