/* Layout and components for every brand. Colors and fonts come only from the CSS variables in
   /static/theme.css, which build.mjs generates from brands/<id>/site.json ("theme", "fonts").
   Never write a color literal here: tests/build.test.mjs fails on hex, rgb() or hsl() values. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--paper); line-height: 1.5; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; }
em { font-style: normal; color: var(--accent-text); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; background: var(--soft); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
main:focus { outline: none; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* Header */
.site-header { max-width: 1440px; margin: auto; padding: 28px 6%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-family: var(--font-display); font-size: 29px; font-weight: 800; letter-spacing: -1.4px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.wordmark .logo { height: 32px; width: auto; }
.brand-dot { height: 9px; width: 9px; background: var(--accent); border-radius: 50%; align-self: flex-end; margin-bottom: 8px; }
.main-nav ul { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 15px; font-weight: 500; }
.main-nav a { text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Buttons and links */
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 16px 25px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; border: 0; cursor: pointer; text-decoration: none; text-align: center; transition: transform .2s, filter .2s; }
.button:hover { filter: brightness(.95); transform: translateY(-2px); }
.button.small { min-height: 44px; padding: 12px 20px; font-size: 14px; }
.button-quiet { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.button.is-soon, .button:disabled { background: var(--soft); color: var(--muted); border: 2px dashed var(--muted); cursor: not-allowed; transform: none; filter: none; }
.text-link { font-size: 15px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.prose a, .small-print a, .lead a, .notice a, .hint a, .faq-list a, .contact-aside a, .card-title a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; line-height: 1.7; margin: 0; color: var(--muted); }
.eyebrow a { color: inherit; }
.lead { max-width: 620px; font-size: 18px; line-height: 1.75; color: var(--muted); }

/* Hero */
.hero { max-width: 1440px; padding: 72px 6% 96px; margin: auto; display: grid; grid-template-columns: 1fr 1.18fr; gap: 45px; align-items: center; }
.hero h1 { font-size: clamp(42px, 4.5vw, 69px); letter-spacing: -3px; margin: 24px 0; }
.hero .lead { max-width: 455px; }
.actions { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin: 30px 0; }
.hero-note { font-size: 11px; letter-spacing: 1.5px; font-weight: 600; color: var(--muted); }

/* Product concept (replaced by assets.heroImage / heroVideo once real screenshots exist) */
.product-stage { position: relative; margin: 0; background: var(--soft); border-radius: 20px; padding: 45px 18px 35px; min-width: 0; }
/* Real media brings its own rounded frame: no second panel around it. */
.product-stage.product-media { padding: 0; background: none; }
.product-media img, .product-media video { border-radius: 12px; width: 100%; }
.stage-tag { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-align: center; margin-bottom: 20px; color: var(--muted); }
.app-window { display: grid; grid-template-columns: 120px 1fr; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 22px 50px color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.app-side { padding: 22px 10px; background: color-mix(in srgb, var(--soft) 60%, var(--surface)); border-right: 1px solid var(--line); position: relative; }
.app-side strong { display: block; font-size: 15px; margin: 0 5px 35px; letter-spacing: -.6px; }
.side-item { font-size: 11px; padding: 11px 8px; border-radius: 6px; margin: 5px 0; color: var(--muted); }
.side-item:first-of-type { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--ink); font-weight: 700; }
.sidebar-bottom { position: absolute; bottom: 20px; font-size: 9px; color: var(--muted); }
.app-main { padding: 22px; }
.app-top { display: flex; justify-content: space-between; align-items: center; font-size: 8px; letter-spacing: 1.5px; color: var(--muted); }
.avatar { border-radius: 50%; width: 25px; height: 25px; background: var(--soft); }
.app-heading { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.6px; margin: 21px 0 5px; }
.app-sub { font-size: 11px; color: var(--muted); margin: 0 0 18px; }
.task { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.task small { display: block; font-size: 7px; letter-spacing: 1px; color: var(--muted); margin-top: 5px; }
.task .box { width: 15px; height: 15px; flex-shrink: 0; border: 2px solid var(--muted); border-radius: 4px; }
.task.is-done .box { background: var(--accent); border-color: var(--accent); }
.task.is-done > span:last-child { color: var(--muted); text-decoration: line-through; }
.progress-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 23px; }
.progress-row small { font-size: 8px; letter-spacing: 1px; color: var(--muted); }
.progress-row strong { display: block; font-size: 11px; margin: 6px 0; }
.bars { height: 54px; display: flex; align-items: end; gap: 7px; margin-top: 12px; }
.bars i { width: 12px; height: var(--h); background: var(--accent); border-radius: 3px 3px 0 0; }
.days { font-size: 7px; color: var(--muted); white-space: nowrap; margin-top: 6px; word-spacing: 6px; }
.habit { background: var(--soft); padding: 10px; border-radius: 8px; }
.habit-dots { display: flex; gap: 5px; margin: 17px 0 10px; }
.habit-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--accent-text); }
.habit-dots i.on { background: var(--accent-text); }
.habit > span { font-size: 8px; color: var(--muted); }
.floating-note { position: absolute; right: 0; bottom: 64px; transform: translateX(12px); background: var(--surface); padding: 16px 23px; border: 1px solid var(--line); border-radius: 12px; display: flex; gap: 13px; align-items: center; box-shadow: 0 10px 35px color-mix(in srgb, var(--ink) 7%, transparent); }
.check-icon { display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 25%, var(--surface)); color: var(--accent-text); border-radius: 50%; width: 30px; height: 30px; }
.floating-note strong { font-size: 12px; display: block; }
.floating-note div > span { font-size: 10px; color: var(--muted); display: block; margin-top: 4px; }
.preview-label { font-size: 12px; color: var(--muted); margin: 15px 0 0; }

.value-strip { display: flex; justify-content: space-around; gap: 24px; max-width: 1280px; padding: 30px 4%; margin: 0 auto; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Sections */
.section { max-width: 1280px; margin: auto; padding: 100px 4%; }
.section-tight { padding-top: 24px; padding-bottom: 48px; }
.section h2 { font-size: clamp(30px, 3.5vw, 50px); letter-spacing: -2px; margin: 20px 0; }
.section-tight h2 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -1px; }
.section-intro { max-width: 680px; }
.section-intro > p:last-child { max-width: 580px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px; margin-top: 48px; }
.benefits article { border-top: 1px solid var(--line); padding-top: 25px; }
.number { font-size: 11px; letter-spacing: 1.6px; color: var(--muted); margin: 0; }
h3 { font-size: 21px; letter-spacing: -.7px; margin: 20px 0 10px; }
.benefits p, .workflow p, .deliverables p { font-size: 16px; line-height: 1.8; color: var(--muted); }
.mini { height: 66px; margin-top: 28px; background: var(--soft); border-radius: 9px; padding: 17px; font-size: 13px; display: flex; align-items: center; gap: 12px; }
.mini-dot { width: 20px; height: 20px; border: 2px solid var(--accent-text); border-radius: 50%; }
.mini-days { background-image: radial-gradient(circle, var(--accent) 0 11px, transparent 12px); background-size: calc(100% / 7) 100%; background-repeat: repeat-x; background-position: left center; }
.mini-progress { background: linear-gradient(90deg, var(--accent) 0 62%, var(--soft) 62%); background-clip: content-box; padding: 26px 17px; }
.workflow { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; border-top: 1px solid var(--line); }
.workflow ol { padding: 0; margin: 0; list-style: none; }
.workflow li { display: flex; gap: 25px; border-bottom: 1px solid var(--line); padding: 10px 0 25px; margin-bottom: 20px; }
.workflow li > span { font-size: 12px; color: var(--muted); margin-top: 24px; }
.workflow p { margin: 0; }

/* Package and offers */
.package { background: var(--soft); border-radius: 25px; padding: 65px; margin-top: 10px; }
.package-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-bottom: 48px; }
.package-copy > p { font-size: 17px; line-height: 1.8; color: var(--muted); }
.package-copy > p.purchase-note { font-size: 15px; font-weight: 600; color: var(--ink); }
.deliverables { display: grid; gap: 18px; }
.deliverables article { background: var(--surface); border: 1px solid var(--line); padding: 25px; border-radius: 14px; }
.file-type { width: 45px; height: 45px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.file-type.spreadsheet { background: var(--sheet); color: var(--sheet-ink); }
.deliverables h3 { margin: 15px 0 6px; }
.deliverables p { margin: 0; font-size: 15px; }
.deliverables p.file-caption { font-size: 11px; letter-spacing: 1.5px; margin-top: 18px; }

.offers { display: grid; gap: 18px; }
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 36px; }
.offer-main { border: 2px solid var(--ink); }
.offer h3 { font-size: 26px; margin: 10px 0 0; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 20px 0 14px; }
.offer-badge { display: inline-block; margin: 16px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.price-after { color: var(--muted); font-size: 16px; }
.offer-ends { margin: -6px 0 14px; font-size: 13px; color: var(--muted); }
.price-now { font-family: var(--font-display); font-size: 52px; letter-spacing: -2px; line-height: 1; }
.price-terms { width: 100%; font-size: 13px; color: var(--muted); }
.price-small .price-now { font-size: 32px; letter-spacing: -1px; }
.gift { font-weight: 700; font-size: 17px; margin: 0 0 12px; }
.checklist { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; color: var(--muted); }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-text); font-weight: 700; }
.soon-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; max-width: 420px; }
.offer-secondary { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; padding: 26px 36px; }
.offer-secondary h3 { font-size: 20px; }
.offer-secondary p { color: var(--muted); margin: 8px 0 0; }
.offer-secondary .price { margin-top: 0; }

/* FAQ and final call */
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: 100px; }
.faq-list details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-list summary { font-size: 17px; font-weight: 600; cursor: pointer; line-height: 1.6; }
.faq-list details p { font-size: 15px; line-height: 1.8; color: var(--muted); padding-right: 20px; }
.final-cta { padding: 80px 6%; background: var(--inverse); color: var(--inverse-text); text-align: center; }
.final-cta h2 { font-size: clamp(32px, 4vw, 56px); letter-spacing: -2px; margin: 25px 0 35px; }
.final-cta .eyebrow, .final-cta p { color: var(--inverse-muted); }
.final-cta p { font-size: 14px; margin-top: 25px; }
.final-cta :focus-visible { outline-color: var(--inverse-text); }
.final-cta .button { background: var(--inverse-accent); color: var(--inverse-accent-ink); }

/* Inner pages */
.page-head { padding-bottom: 32px; padding-top: 56px; }
.page-head h1 { font-size: clamp(36px, 4vw, 58px); letter-spacing: -2px; margin: 16px 0; }
.small-print { font-size: 14px; color: var(--muted); line-height: 1.7; max-width: 760px; }
.notice { background: var(--soft); border-left: 4px solid var(--accent); padding: 16px 20px; border-radius: 8px; line-height: 1.7; max-width: 760px; }
.cards { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card-title, .section .card-title { font-size: 20px; letter-spacing: -.5px; margin: 0 0 8px; } /* .section .card-title: beats .section-tight h2 */
.card p { color: var(--muted); margin: 0; line-height: 1.7; }
.meta { margin: 14px 0 0; display: grid; gap: 6px; font-size: 14px; }
.meta div { display: flex; flex-wrap: wrap; gap: 8px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare th, .compare td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.compare td, .compare thead th { text-align: center; width: 22%; }
.compare th[scope="row"] { font-weight: 500; }
.compare .yes { color: var(--accent-text); font-weight: 700; font-size: 18px; }
.compare .no { color: var(--muted); }
.compare .price-row th, .compare .price-row td { font-weight: 700; border-bottom: 0; }
.spec-list { display: grid; gap: 0; margin: 0 0 20px; max-width: 760px; }
.spec-list div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec-list dt { font-weight: 700; }
.spec-list dd { margin: 0; color: var(--muted); }

.os-detect { font-weight: 600; }
.file-cards { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.file-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--surface); }
.file-card p { margin: 0 0 8px; color: var(--muted); }
.file-card .file-name code { overflow-wrap: normal; word-break: normal; }
.file-card .file-os { color: var(--ink); font-weight: 700; font-size: 18px; }
.file-card.is-recommended { border: 2px solid var(--accent-text); }
.file-card .recommended { color: var(--accent-text); font-weight: 700; margin: 8px 0 0; }
.steps { padding-left: 22px; line-height: 1.8; max-width: 760px; }
.install h2 { margin-bottom: 12px; }

.prose { max-width: 760px; }
.prose h1 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -2px; margin: 0 0 12px; }
.prose h2 { font-size: 26px; letter-spacing: -.8px; margin: 40px 0 12px; }
.prose p, .prose li { line-height: 1.8; }
.prose blockquote { margin: 0; padding-left: 18px; border-left: 3px solid var(--line); }
.doc-meta { color: var(--muted); font-size: 14px; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 60px; align-items: start; }
.contact-form { display: grid; gap: 20px; max-width: 640px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--muted); border-radius: 10px; background: var(--surface); }
.field textarea { resize: vertical; }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: 12px; }
.field-check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent-text); }
.field-check .hint { grid-column: 2; }
.req { font-weight: 400; color: var(--muted); font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.contact-aside { background: var(--soft); border-radius: 14px; padding: 24px; overflow-wrap: anywhere; }
.contact-aside p { margin: 0 0 8px; }

/* Footer */
.site-footer { max-width: 1440px; margin: auto; padding: 48px 6% 40px; display: grid; grid-template-columns: 1fr auto; gap: 32px 60px; border-top: 1px solid var(--line); }
.footer-brand p { color: var(--muted); font-size: 14px; }
.footer-brand .footer-tagline { color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.footer-nav { display: flex; gap: 60px; }
.footer-nav h2 { font-family: var(--font-body); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.footer-nav a { display: inline-block; padding: 6px 0; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin: 0; }

/* Responsive */
@media (max-width: 1050px) {
  .hero { gap: 25px; padding-left: 4%; padding-right: 4%; }
  .hero h1 { font-size: 48px; }
  .app-window { grid-template-columns: 95px 1fr; }
  .app-main { padding: 15px; }
  .side-item { font-size: 9px; padding-left: 3px; }
  .package { margin-left: 4%; margin-right: 4%; padding: 40px; }
  .package-intro, .workflow, .faq { gap: 40px; }
  .main-nav ul { gap: 20px; }
}
@media (max-width: 760px) {
  .site-header { padding: 18px 6%; flex-wrap: wrap; gap: 12px; }
  .main-nav { order: 3; width: 100%; }
  .main-nav ul { gap: 4px 18px; flex-wrap: wrap; font-size: 14px; }
  .wordmark { font-size: 24px; }
  .hero { grid-template-columns: 1fr; padding: 32px 6% 60px; gap: 40px; }
  .hero h1 { font-size: 46px; letter-spacing: -2px; }
  .lead { font-size: 17px; }
  .product-stage { padding: 30px 12px 40px; }
  .floating-note { transform: none; right: 8px; bottom: 44px; }
  .value-strip { display: grid; grid-template-columns: 1fr 1fr; text-align: center; gap: 16px; font-size: 13px; margin: 0 6%; padding: 24px 0; }
  .section { padding: 60px 6%; }
  .section-tight { padding-top: 16px; padding-bottom: 36px; }
  .section h2 { font-size: 34px; letter-spacing: -1.4px; }
  .section-tight h2 { font-size: 24px; }
  .benefits, .workflow, .faq, .package-intro, .contact-layout { grid-template-columns: 1fr; gap: 24px; }
  .package { margin: 0 4%; padding: 32px 6%; }
  .offer { padding: 26px 22px; }
  .offer-secondary { grid-template-columns: 1fr; gap: 12px; padding: 24px 22px; }
  .price-now { font-size: 44px; }
  .button { width: 100%; }
  .site-header .button, .actions .text-link { width: auto; }
  .final-cta { padding: 60px 6%; }
  .spec-list div { grid-template-columns: 1fr; gap: 4px; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-nav { gap: 40px; flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 40px; }
  .app-window { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .site-header .button { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .button:hover { transform: none; }
}
@media (forced-colors: active) {
  .button, .offer-main, .file-card.is-recommended { border: 2px solid ButtonText; }
}

/* Checkout terms (pricing), contact sent/error states. */
.checkout-terms { margin-top: 28px; max-width: 760px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.checkout-terms h2 { font-size: 18px; color: var(--ink); margin: 0 0 8px; }
.checkout-terms p { margin: 0 0 10px; }
.checkout-terms a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.consent-quote { margin: 0 0 10px; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--soft); color: var(--ink); border-radius: 6px; }
.card-note { margin-top: 10px !important; font-size: 14px; }
.card-note a { color: var(--accent-text); text-decoration: underline; }
.sent-panel:target { display: block; }
.sent-panel h2 { margin: 0 0 8px; font-size: 22px; }
.sent-panel p { margin: 0 0 8px; }
.form-errors { border-left: 4px solid var(--ink); background: var(--soft); padding: 12px 16px; border-radius: 8px; }
.form-errors p { margin: 0; }
.form-errors p[data-error] { display: none; }
.form-errors p[data-error].is-active { display: block; }
.form-errors-heading { font-weight: 700; }
