/* SEO-stack landing (/seo/stack). Builds on styles.css + archive.css; only what the
   stack page adds lives here. No inline styles anywhere: CSP is style-src 'self'. */

.stack-page code { color: var(--soft); font: .86em/1.4 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

/* --- hero --- */
.stack-hero { padding-top: clamp(40px, 8vh, 96px); }
.version-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid rgba(126, 151, 255, .34); border-radius: 999px; background: rgba(46, 91, 255, .08); letter-spacing: .1em; }
.version-badge b { padding: 3px 8px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 600; letter-spacing: .04em; }
.stack-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 56px); align-items: center; }
.stack-hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: .98; }
.stack-hero .lead { font-size: clamp(16px, 1.9vw, 19px); }
.stack-hero .price-rise.compact { max-width: 460px; }

/* --- agent demo (terminal). Final text is in the HTML; stack.js only replays it. --- */
.agent-demo { min-width: 0; margin: 0; overflow: hidden; border: 1px solid rgba(126, 151, 255, .32); border-radius: 14px; background: linear-gradient(160deg, rgba(26, 31, 58, .94), rgba(11, 10, 8, .97) 64%); box-shadow: 0 40px 90px -52px rgba(46, 91, 255, .95); }
.term-bar { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--line); color: rgba(244, 239, 231, .45); font: 11px/1 "JetBrains Mono", ui-monospace, monospace; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(244, 239, 231, .16); }
.term-bar > span { margin-left: 8px; }
.term-replay { margin-left: auto; padding: 6px 10px; border: 1px solid rgba(126, 151, 255, .34); border-radius: 7px; background: transparent; color: var(--soft); font: 11px/1 "JetBrains Mono", ui-monospace, monospace; cursor: pointer; }
.term-replay:hover:not(:disabled) { border-color: var(--soft); color: var(--fg); }
.term-replay:disabled { opacity: .45; cursor: default; }
.term-body { display: grid; gap: 10px; padding: 18px 18px 20px; color: rgba(244, 239, 231, .74); font: 13px/1.6 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.term-line { display: grid; grid-template-columns: 1.5em minmax(0, 1fr); margin: 0; }
.term-mark { color: var(--soft); }
.term-user { color: var(--fg); font-weight: 500; }
.term-agent { color: #cfd9ff; }
.term-text { position: relative; display: block; }
.term-typed { position: absolute; inset: 0; pointer-events: none; }
.term-questions { display: grid; gap: 6px; margin: 0; padding: 0 0 0 1.5em; list-style: none; counter-reset: q; }
.term-questions li { display: grid; grid-template-columns: 1.6em minmax(0, 1fr); counter-increment: q; }
.term-questions li::before { content: counter(q) "."; color: var(--soft); }
.term-route { grid-template-columns: 2.1em minmax(0, 1fr); margin-top: 2px; padding: 10px 12px 10px 0; border-radius: 0 8px 8px 0; background: rgba(46, 91, 255, .12); box-shadow: inset 2px 0 var(--blue); color: #dfe6ff; }
.term-route .term-mark { padding-left: 8px; }
.term-route code { font-size: 1em; color: #b9c8ff; }
.agent-demo figcaption { padding: 12px 18px 14px; border-top: 1px solid var(--line); color: rgba(244, 239, 231, .45); font: 11px/1.5 "JetBrains Mono", ui-monospace, monospace; }
.agent-demo figcaption code { font-size: 1em; }

/* Playback states, set only by stack.js and never under reduced motion. Lines are
   hidden by opacity, not display, so the box keeps its final height: no layout shift. */
.agent-demo.is-armed [data-step] { opacity: 0; transform: translateY(4px); transition: opacity .35s ease, transform .35s ease; }
.agent-demo.is-armed [data-step].is-shown { opacity: 1; transform: none; }
.agent-demo .is-typing [data-type] { color: transparent; }
.agent-demo .is-typing .term-typed::after { content: ""; display: inline-block; width: .55em; height: 1.15em; margin-left: 1px; vertical-align: -.22em; background: var(--soft); animation: term-caret 1s steps(1) infinite; }
@keyframes term-caret { 50% { opacity: 0; } }

/* --- 01 pains --- */
.pain-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: clamp(28px, 4vw, 40px) 0 0; padding: 0; list-style: none; }
.pain-grid li { position: relative; padding: 18px 20px 18px 46px; border: 1px solid var(--line); border-radius: 12px; background: rgba(244, 239, 231, .022); color: rgba(244, 239, 231, .78); font-size: 16px; line-height: 1.5; }
.pain-grid li::before { content: "?"; position: absolute; top: 17px; left: 18px; color: var(--soft); font: 600 14px/1.6 "JetBrains Mono", ui-monospace, monospace; }
.section-note { max-width: 760px; margin-top: clamp(24px, 4vw, 36px); padding-left: 18px; box-shadow: inset 2px 0 var(--blue); color: rgba(244, 239, 231, .78); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }

/* --- 02 tasks --- */
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 32px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.task-grid article { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--bg); transition: background .25s ease; }
.task-grid article:hover { background: #100e0c; }
.task-grid b { color: var(--blue); font: 600 13px/1 "JetBrains Mono", ui-monospace, monospace; }
.task-grid h3 { margin-top: 6px; font-size: 18px; letter-spacing: -.01em; }
.task-grid p { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.task-grid q { margin-top: auto; padding-top: 10px; color: #b9c8ff; font: 12px/1.45 "JetBrains Mono", ui-monospace, monospace; quotes: "«" "»"; }
.task-grid q::before { content: "› «"; color: var(--soft); }
.task-grid q::after { content: "»"; }
.task-grid .is-new { background: linear-gradient(160deg, rgba(46, 91, 255, .14), var(--bg) 70%); }
.task-grid .is-new:hover { background: linear-gradient(160deg, rgba(46, 91, 255, .2), #100e0c 70%); }
.new-tag { position: absolute; top: 20px; right: 20px; padding: 4px 8px; border: 1px solid rgba(126, 151, 255, .5); border-radius: 6px; color: var(--soft); font: 600 10px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.task-grid .task-any { background: rgba(46, 91, 255, .06); }
.task-grid .task-any b { color: var(--soft); }

/* --- 03 what's new --- */
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.news-grid article { display: grid; align-content: start; gap: 10px; padding: 24px; border: 1px solid rgba(126, 151, 255, .24); border-radius: 14px; background: linear-gradient(145deg, rgba(126, 151, 255, .1), rgba(244, 239, 231, .015) 60%); }
.news-kicker { color: var(--soft); font: 600 12px/1.3 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .04em; }
.news-grid h3 { color: #e4e9ff; font-size: clamp(19px, 2vw, 23px); letter-spacing: -.02em; }
.news-grid p:not(.news-kicker) { color: rgba(244, 239, 231, .66); font-size: 15px; line-height: 1.55; }
.news-foot { margin-top: 18px; color: rgba(244, 239, 231, .55); font: 12px/1.6 "JetBrains Mono", ui-monospace, monospace; }

/* traffic-drop demo output */
.drop-demo { display: grid; gap: 24px; margin: clamp(40px, 6vw, 64px) 0 0; padding: clamp(20px, 3vw, 32px); border: 1px solid rgba(244, 239, 231, .14); border-radius: 14px; background: #0e0d0b; }
.drop-head { display: grid; gap: 10px; }
.drop-head h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.025em; }
.drop-head > p:not(.proof-kicker) { max-width: 680px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.drop-cmd { margin: 4px 0 0; padding: 12px 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(244, 239, 231, .03); white-space: pre-wrap; }
.drop-cmd code { color: rgba(244, 239, 231, .72); font-size: 12px; }
.drop-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.drop-stats p { display: grid; gap: 6px; padding: 16px 18px; border-top: 2px solid var(--blue); background: rgba(46, 91, 255, .06); }
.drop-stats small { color: rgba(244, 239, 231, .5); font: 10.5px/1.3 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.drop-stats b { font: 700 clamp(22px, 2.6vw, 30px)/1.1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: -.03em; }
.drop-stats span { color: var(--muted); font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.drop-shares { display: grid; gap: 8px; }
.share-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.share-row > span { color: rgba(244, 239, 231, .5); font: 11px/1 "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.share-bar { display: flex; height: 28px; overflow: hidden; border-radius: 6px; background: var(--line); }
.share-bar i { display: flex; align-items: center; min-width: 0; padding: 0 8px; overflow: hidden; color: rgba(11, 10, 8, .88); font: 600 11px/1 "JetBrains Mono", ui-monospace, monospace; font-style: normal; white-space: nowrap; }
.share-bar .seg-info { justify-content: flex-end; }
.seg-commercial { background: var(--blue); }
.share-bar .seg-commercial { color: #fff; }
.seg-other { background: rgba(244, 239, 231, .22); }
.seg-info { background: #e1b76c; }
/* Real shares from the bundled example: commercial / other / informational clicks. */
.sb-c1 { flex: 67.5 1 0; } .sb-o1 { flex: 16.7 1 0; } .sb-i1 { flex: 15.8 1 0; }
.sb-c2 { flex: 30.8 1 0; } .sb-o2 { flex: 15.8 1 0; } .sb-i2 { flex: 53.3 1 0; }
.share-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 0 68px; color: rgba(244, 239, 231, .55); font: 11px/1.3 "JetBrains Mono", ui-monospace, monospace; }
.share-legend span { display: inline-flex; align-items: center; gap: 7px; background: none; }
.share-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 2px; }
.share-legend .seg-commercial::before { background: var(--blue); }
.share-legend .seg-other::before { background: rgba(244, 239, 231, .22); }
.share-legend .seg-info::before { background: #e1b76c; }
.drop-table { width: 100%; border-collapse: collapse; font: 13px/1.45 "JetBrains Mono", ui-monospace, monospace; }
.drop-table caption { padding-bottom: 10px; color: rgba(244, 239, 231, .5); font-size: 11px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.drop-table th { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.drop-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); color: rgba(244, 239, 231, .78); vertical-align: top; overflow-wrap: anywhere; }
.drop-table td:first-child { color: var(--fg); }
.drop-table td code { display: block; margin-bottom: 2px; font-size: 11px; }
.drop-demo figcaption { color: rgba(244, 239, 231, .52); font-size: 13.5px; line-height: 1.55; }

/* --- 04 proof --- */
.proof-duo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 32px; align-items: start; }
.proof-duo .proof-case { display: flex; flex-direction: column; }
.proof-duo .proof-case h3 { margin-top: 10px; color: #f4f6ff; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.02; letter-spacing: -.03em; }
.proof-duo .proof-lead { font-size: 15px; }
.proof-watchdog .proof-case-copy h3 { font-size: clamp(22px, 2.4vw, 30px); }
.proof-watchdog .proof-image-link { aspect-ratio: 2100 / 1482; }

/* --- 05 inside --- */
.inside-grid strong { font-size: clamp(44px, 6vw, 64px); }
.inside-grid h3 { margin-top: 6px; font-size: 18px; }

/* --- 06 steps --- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; display: grid; align-content: start; gap: 8px; padding: 58px 22px 22px; border: 1px solid var(--line); border-radius: 14px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: 20px; left: 22px; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(126, 151, 255, .55); border-radius: 50%; color: var(--soft); font: 600 12px/1 "JetBrains Mono", ui-monospace, monospace; }
.steps h3 { font-size: 18px; }
.steps p { color: var(--muted); font-size: 15px; line-height: 1.55; }

/* --- 07 caveats --- */
.caveats { display: grid; gap: 0; max-width: 820px; margin: 28px 0 0; padding: 0; list-style: none; }
.caveats li { position: relative; padding: 16px 0 16px 30px; border-top: 1px solid var(--line); color: rgba(244, 239, 231, .74); font-size: 16px; line-height: 1.55; }
.caveats li:last-child { border-bottom: 1px solid var(--line); color: var(--fg); }
.caveats li::before { content: "!"; position: absolute; top: 16px; left: 4px; color: #e1b76c; font: 600 14px/1.55 "JetBrains Mono", ui-monospace, monospace; }

/* --- 09 offer --- */
.stack-offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: clamp(32px, 6vw, 72px); align-items: center; }
.stack-offer-copy { display: grid; gap: 18px; }
.stack-offer-copy > p:not(.stack-license) { max-width: 520px; color: rgba(244, 239, 231, .74); font-size: 18px; line-height: 1.55; }
.stack-license { max-width: 560px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.6; }
.stack-license b { color: rgba(244, 239, 231, .82); font-weight: 600; }
.stack-offer-card { --tier: #7e97ff; --tier-rgb: 126, 151, 255; min-height: 0; padding: 32px 28px; border-color: rgba(79, 117, 255, .78); background: linear-gradient(145deg, rgba(46, 91, 255, .26), rgba(20, 29, 78, .18) 58%, rgba(244, 239, 231, .025)); box-shadow: 0 24px 70px -46px rgba(46, 91, 255, .95); }
.stack-offer-card .price { margin-top: 18px; font-size: 56px; }
.stack-offer-card h3 { margin-top: 10px; }
.stack-offer-card li code { font-size: .92em; }
.stack-offer-card .card-footer .minor { text-align: center; }
#pricing .refund { margin-top: 36px; }

/* --- responsive --- */
@media (max-width: 960px) {
  .stack-hero-grid { grid-template-columns: 1fr; }
  .agent-demo { max-width: 640px; }
}
@media (max-width: 900px) {
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-duo { grid-template-columns: 1fr; }
  .stack-offer { grid-template-columns: 1fr; }
  .stack-offer-card { max-width: 480px; }
}
@media (max-width: 760px) {
  .pain-grid, .news-grid, .steps { grid-template-columns: 1fr; }
  .drop-stats { grid-template-columns: 1fr; }
  .steps li { padding: 20px 20px 20px 62px; }
  .steps li::before { top: 18px; left: 20px; }
  .proof-watchdog .proof-image-link { aspect-ratio: 2100 / 1482; }
  .proof-watchdog .proof-image { object-fit: contain; }
}
@media (max-width: 600px) {
  .stack-hero .facts { gap: 8px; }
  .stack-hero .facts span { padding: 10px 14px; font-size: 13px; }
  .task-grid { grid-template-columns: 1fr; }
  .term-body { padding: 16px 14px 18px; font-size: 12px; }
  .agent-demo figcaption { padding-inline: 14px; }
  .drop-table caption { display: block; }
  .drop-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .drop-table, .drop-table tbody, .drop-table tr, .drop-table td { display: block; }
  .drop-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .drop-table td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 3px 0; border: 0; }
  .drop-table td::before { content: attr(data-label); color: rgba(244, 239, 231, .45); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; }
  .share-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .share-legend { margin-left: 54px; }
  .stack-offer-card { padding: 28px 22px; }
  .stack-offer-card .price { font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .agent-demo.is-armed [data-step] { opacity: 1; transform: none; transition: none; }
  .agent-demo .is-typing .term-typed::after { animation: none; }
  .task-grid article { transition: none; }
}
