/* Shared content controls */
.tabs-inline, .toc-tabs { display: flex; align-items: center; gap: 8px; max-width: 100%; overflow-x: auto; padding: 5px; border-radius: var(--r-lg); background: var(--bg-panel); color: var(--text); scrollbar-width: thin; }
.tabs-inline [role="tab"] { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 17px; flex-shrink: 0; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-muted); font-weight: 600; }
.tabs-inline [role="tab"]:hover { color: var(--text); }
.tabs-inline [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--accent-dark); box-shadow: var(--shadow-card); }
[role="tabpanel"] { min-width: 0; }
.toc-tabs { position: sticky; top: 0; z-index: 10; border: 1px solid var(--border); background: var(--bg); }
.toc-tabs.is-static { position: static; }
.toc-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 13px; border-radius: var(--r-sm); color: var(--text-muted); white-space: nowrap; }
.toc-tabs a:hover { background: var(--bg-panel); color: var(--text); }
[id] { scroll-margin-top: 24px; }

.faq-item { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.faq-item summary { position: relative; padding: 19px 48px 19px 22px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; color: var(--accent-dark); font-size: 22px; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-body { padding: 0 22px 22px; color: var(--text-muted); }
.term-card { min-width: 0; padding: 25px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.term-card h3 { margin-bottom: 9px; font-family: var(--font-mono); font-size: 17px; overflow-wrap: anywhere; }
.term-card p { color: var(--text-muted); }
.client-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-width: 0; padding: 26px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.client-card > * { min-width: 0; }
.client-card p { margin-top: 8px; color: var(--text-muted); }
.client-card [data-version] { display: inline-block; margin-top: 8px; color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.badge { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 27px; padding: 3px 10px; overflow: hidden; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; vertical-align: middle; }
.badge-featured { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); color: var(--accent-dark); }
.badge-recommended { background: color-mix(in srgb, var(--success) 13%, var(--bg)); color: var(--text); }
.badge-archived { background: var(--bg-panel-2); color: var(--text-muted); }
.post-card { min-width: 0; padding: 27px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.post-card h3 { margin-top: 12px; }
.post-card p { margin-top: 10px; color: var(--text-muted); }
.post-meta { color: var(--accent-dark); font-family: var(--font-mono); font-size: 12px; }
.callout { padding: 20px 24px; border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--bg-panel); color: var(--text); }
.callout p { margin: 0; }
.download-endnote { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 28px; border-radius: var(--r-xl); background: var(--bg-panel); color: var(--text); }
.download-endnote p { margin-top: 6px; color: var(--text-muted); }
.dl-fab { position: fixed; right: 22px; bottom: 22px; z-index: 18; display: inline-flex; align-items: center; gap: 12px; max-width: calc(100vw - 36px); min-height: 56px; padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text); box-shadow: var(--shadow-pop); font-size: 14px; font-weight: 700; }
.dl-fab:hover { border-color: var(--accent); color: var(--accent-dark); }
.dl-fab svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-dark); }

.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg); color: var(--text); }
.data-table th, .data-table td, .prose table th, .prose table td { min-width: 7em; padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; word-break: normal; overflow-wrap: normal; }
.data-table th { background: var(--bg-panel); color: var(--text); font-weight: 700; }
.prose table { display: block; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; }
.prose { min-width: 0; color: var(--text); }
.prose p, .prose li { line-height: 1.85; }
.prose h2 { margin-top: 2em; margin-bottom: .65em; }
.prose h3 { margin-top: 1.5em; margin-bottom: .5em; }
.prose pre { padding: 18px; border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); }
.prose a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Approved first-screen composition. All controls inside the mock window are static. */
.hero { position: relative; display: grid; align-content: center; row-gap: 36px; min-height: calc(100svh - var(--nav-h) - 28px); padding-top: 20px; padding-bottom: 22px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); gap: 56px; align-items: center; }
.hero-copy { position: relative; z-index: 2; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; padding: 7px 14px; border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); font-size: 13px; line-height: 1.3; }
.eyebrow-k { color: var(--text-muted); }
.eyebrow-sep { width: 1px; height: 14px; background: var(--border-strong); }
.eyebrow-v { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.hero-title { margin-top: 22px; }
.hero-title .line { display: block; }
.hero-lead { max-width: 31em; margin-top: 22px; color: var(--text-muted); font-size: 17px; line-height: 1.72; }
.hero-lead strong { color: var(--text); }
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.platforms { margin-top: 34px; }
.row-label { color: var(--text-muted); font-size: 12px; letter-spacing: .04em; }
.platform-list { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 10px; }
.platform { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; }
.platform:hover { color: var(--accent-dark); }
.pf-badge { display: inline-grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.pf-badge svg { width: 15px; height: 15px; }
.topics { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 28px; padding: 3px 12px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text-muted); font-size: 12px; }
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.hero-visual { position: relative; min-width: 0; padding-top: 72px; margin-right: -28px; }
.hero-visual::before { content: ""; position: absolute; top: -300px; right: -320px; z-index: 0; width: 1040px; height: 940px; pointer-events: none; background: radial-gradient(ellipse 50% 48% at 62% 38%, color-mix(in srgb, var(--accent) 36%, transparent) 0%, color-mix(in srgb, var(--apricot) 26%, transparent) 34%, color-mix(in srgb, var(--apricot) 9%, transparent) 60%, transparent 78%); }
.device { position: relative; z-index: 1; transform: rotate(-2deg); transform-origin: 50% 55%; }
/* Cat sits ABOVE the window chrome. Its small paws touch the rim; its body never covers the checklist. */
.device-cat { position: absolute; top: -52px; left: 20px; z-index: 3; width: 112px; height: 68px; overflow: visible; fill: none; stroke: var(--accent-dark); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.device-cat .cat-body { fill: var(--bg); }
.device-frame { position: relative; z-index: 2; padding: 10px; border: 1px solid var(--bg); border-radius: var(--r-frame); background: color-mix(in srgb, var(--bg-panel) 52%, transparent); box-shadow: var(--shadow-device), inset 0 1px 0 var(--bg); }
.win { display: grid; grid-template-columns: 148px minmax(0, 1fr) 166px 46px; height: 520px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.win-side { display: flex; flex-direction: column; min-width: 0; padding: 26px 10px 14px; border-right: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }
.side-head { display: flex; align-items: center; gap: 5px; padding-inline: 10px; font-size: 13px; font-weight: 700; }
.side-nav { margin-top: 18px; }
.side-item { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 5px 10px; border-radius: var(--r-sm); color: var(--text-muted); font-size: 13px; }
.side-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.side-item.is-on { background: var(--bg); color: var(--text); font-weight: 700; box-shadow: var(--shadow-card); }
.side-item.is-on svg { color: var(--accent-dark); }
.side-group { margin: 14px 10px 4px; color: var(--text-muted); font-size: 10px; letter-spacing: .08em; }
.side-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg); color: var(--text-muted); font: 11px var(--font-mono); }
.dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--success); }
.win-main { min-width: 0; background: var(--bg-soft); color: var(--text); }
.win-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.tool-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--bg); color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.list-head { padding: 18px 16px 12px; }
.list-title { font-size: 19px; font-weight: 800; }
.list-sub { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.tasks { display: grid; gap: 8px; padding: 0 14px 14px; }
.task { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; grid-template-areas: "tick title ctl" ". key tag"; align-items: center; gap: 6px 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.tick { grid-area: tick; display: grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0; border: 1.5px solid var(--border-strong); border-radius: var(--r-pill); color: transparent; font-size: 12px; }
.task.is-done .tick { border-color: var(--accent-dark); background: var(--accent-dark); color: var(--bg); }
.task-title { grid-area: title; min-width: 0; font-size: 13px; font-weight: 600; }
.task.is-done .task-title { color: var(--text-muted); }
.task-ctl { grid-area: ctl; display: flex; }
.task-key { grid-area: key; justify-self: start; padding: 2px 7px; border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted); font: 10px var(--font-mono); }
.task-tag { grid-area: tag; justify-self: end; color: var(--text-muted); font-size: 11px; }
.task-tag b { color: var(--accent-dark); }
.switch { position: relative; width: 30px; height: 17px; border-radius: var(--r-pill); background: var(--bg-panel-2); box-shadow: inset 0 0 0 1px var(--border); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: var(--r-pill); background: var(--bg); box-shadow: var(--shadow-card); }
.switch.is-on { background: var(--accent-dark); }
.switch.is-on::after { left: 15px; }
.win-order { min-width: 0; border-left: 1px solid var(--border); background: var(--bg); color: var(--text); }
.order-grid { position: relative; display: grid; grid-template-rows: repeat(9, 52px); height: calc(100% - 44px); overflow: hidden; background-image: linear-gradient(to bottom, transparent 51px, var(--border) 51px); background-size: 100% 52px; }
.order-grid::before { content: ""; position: absolute; top: 0; bottom: 0; left: 12px; width: 1px; background: var(--border); }
.blk { position: relative; grid-column: 1; display: flex; flex-direction: column; gap: 3px; margin: 6px 10px 6px 20px; padding: 6px 9px; overflow: hidden; border-left: 3px solid var(--accent); border-radius: var(--r-sm); color: var(--text); font: 600 11px/1.35 var(--font-mono); }
.blk small { color: var(--text-muted); font-size: 10px; font-weight: 400; }
.blk-a { grid-row: 1; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.blk-b { grid-row: 2 / span 2; border-left-color: var(--apricot); background: color-mix(in srgb, var(--apricot) 18%, var(--bg)); }
.blk-c { grid-row: 4 / span 2; border-left-color: var(--success); background: color-mix(in srgb, var(--success) 11%, var(--bg)); }
.blk-d { grid-row: 6; border-left-color: var(--sky); background: color-mix(in srgb, var(--sky) 17%, var(--bg)); }
.blk-e { grid-row: 7; flex-direction: row; align-items: center; border-left-color: var(--accent-dark); background: color-mix(in srgb, var(--accent-dark) 13%, var(--bg)); color: var(--accent-dark); }
.win-rail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 10px; border-left: 1px solid var(--border); background: var(--bg); color: var(--text-muted); }
.rail-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-sm); }
.rail-btn svg { width: 16px; height: 16px; }
.rail-btn.is-on { background: var(--bg-panel); color: var(--accent-dark); }
.statusbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 46px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text); font: 12px var(--font-mono); }
.sb-item { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; padding: 8px; white-space: nowrap; }
.sb-item + .sb-item { border-left: 1px solid var(--border); }
.sb-k { color: var(--text-muted); }
.sb-v { color: var(--text); font-weight: 600; }

/* Comparison and feature browser */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.compare-pain { padding-top: 64px; }
.compare-fix { padding: 64px 56px 48px; border-radius: var(--r-2xl); background: var(--bg-panel); color: var(--text); }
.points { display: grid; gap: 20px; margin-top: 32px; }
.point { display: flex; align-items: flex-start; gap: 14px; }
.point code { padding: 1px 6px; border-radius: var(--r-xs); background: var(--bg-panel); color: var(--accent-dark); font-size: 14px; }
.mark { display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; flex-shrink: 0; border-radius: var(--r-pill); color: var(--bg); font-weight: 800; }
.mark-x { background: var(--error); }
.mark-ok { background: var(--success); }
.snippet { max-width: 100%; margin-top: 36px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.snippet-bar { display: flex; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--border); color: var(--text-muted); font: 12px var(--font-mono); }
.snippet pre { margin: 0; padding: 16px 20px; font-size: 13px; line-height: 1.7; }
.section-intro { text-align: center; }
.section-intro h2 { max-width: 20em; margin: 18px auto 0; }
.outline-label { display: inline-flex; padding: 5px 13px; border: 1px solid var(--accent-dark); border-radius: var(--r-pill); color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.feature-browser { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; margin-top: 42px; padding: 24px; border-radius: var(--r-2xl); background: var(--bg-panel); color: var(--text); }
.feature-tabs { display: grid; align-content: start; gap: 7px; }
.feature-tabs [role="tab"] { position: relative; min-height: 54px; padding: 11px 18px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-muted); text-align: left; font-weight: 600; }
.feature-tabs [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.feature-tabs [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 0; width: 3px; border-radius: var(--r-pill); background: var(--accent); }
.feature-progress { height: 2px; margin-top: 5px; overflow: hidden; border-radius: var(--r-pill); background: var(--border); }
.feature-progress::after { content: ""; display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: left; animation: feature-fill 8s linear infinite; }
.feature-browser.is-paused .feature-progress::after { animation-play-state: paused; }
@keyframes feature-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.feature-detail { min-width: 0; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg); color: var(--text); }
.feature-detail p { margin-top: 14px; color: var(--text-muted); }

@media (max-width: 1240px) { .win { grid-template-columns: 136px minmax(0, 1fr) 150px 44px; } }
@media (max-width: 1080px) {
  .hero { min-height: auto; padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { justify-self: center; width: 100%; max-width: 760px; margin-right: 0; }
  .compare-grid { grid-template-columns: 1fr; gap: 32px; }
  .compare-pain { padding-top: 0; }
}
@media (max-width: 760px) {
  .hero-lead { font-size: 15px; }
  .hero-visual { padding-top: 56px; }
  .device-cat { top: -43px; left: 14px; width: 90px; height: 55px; }
  .win { height: 470px; grid-template-columns: 118px minmax(0, 1fr); }
  .win-order, .win-rail { display: none; }
  .statusbar { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--r-lg); }
  .sb-item:nth-child(3) { border-left: 0; }
  .sb-item:nth-child(n+3) { border-top: 1px solid var(--border); }
  .feature-browser { grid-template-columns: 1fr; }
  .feature-tabs { display: flex; overflow-x: auto; }
  .feature-tabs [role="tab"] { flex-shrink: 0; }
}
@media (max-width: 640px) {
  .hero { row-gap: 25px; }
  .hero-title { margin-top: 18px; }
  .hero-lead { margin-top: 16px; }
  .hero-cta { margin-top: 22px; }
  .platforms { margin-top: 22px; }
  .platform-list { gap: 4px 12px; }
  .platform { font-size: 12px; }
  .pf-badge { width: 26px; height: 26px; }
  .hero-visual { padding-top: 48px; }
  .device-frame { padding: 6px; border-radius: var(--r-lg); }
  .win { height: 390px; grid-template-columns: 82px minmax(0, 1fr); border-radius: var(--r-md); }
  .win-side { padding: 18px 5px 9px; }
  .side-head { padding-inline: 4px; font-size: 10px; }
  .side-item { gap: 4px; padding-inline: 5px; font-size: 10px; }
  .side-item svg { width: 12px; height: 12px; }
  .side-group { margin-inline: 5px; }
  .side-foot { padding-inline: 4px; font-size: 9px; }
  .list-head { padding: 11px 9px 8px; }
  .list-title { font-size: 15px; }
  .list-sub { font-size: 10px; }
  .win-bar { height: 34px; padding-inline: 8px; }
  .tool-pill { font-size: 9px; }
  .tasks { gap: 5px; padding-inline: 7px; }
  .task { gap: 2px 5px; padding: 6px; grid-template-columns: 15px minmax(0, 1fr) auto; }
  .tick { width: 15px; height: 15px; }
  .task-title { font-size: 10px; }
  .task-key, .task-tag { font-size: 8px; }
  .switch { width: 25px; height: 15px; }
  .switch::after { width: 11px; height: 11px; }
  .switch.is-on::after { left: 12px; }
  .compare-fix { padding: 32px 22px; }
  .client-card, .download-endnote { flex-direction: column; align-items: flex-start; }
  .feature-browser { padding: 14px; }
  .feature-detail { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { .feature-progress::after { animation: none; } }