/* AI Essay Check v2 — "university-press publication that happens to be a web app".
   Serif display (Fraunces) + Inter body, ink navy on warm paper, amber highlighter as the brand motif. */
:root {
  --ink: #0B1B3B; --ink-2: #1e2d52; --paper: #FAF8F3; --surface: #ffffff; --surface-2: #f3efe6;
  --text: #16203a; --muted: #55607a; --faint: #68718c; --border: #e6e1d6; --border-2: #d6cfc0;
  --accent: #2F5BFF; --accent-dark: #1f44d6; --accent-soft: #e9eeff;
  --marker: #FFC94D; --marker-soft: #fff1c9; --marker-ink: #7a5300;
  --ok: #1F8A5B; --ok-text: #1a7a50; --ok-soft: #e4f4ec; --warn: #b7690a; --warn-soft: #fff3df; --danger: #C93838; --danger-soft: #fbe7e7;
  --r: 14px; --r-lg: 18px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(11,27,59,.05), 0 10px 30px -14px rgba(11,27,59,.18);
  --shadow-lg: 0 2px 4px rgba(11,27,59,.05), 0 24px 50px -20px rgba(11,27,59,.28);
  --sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", "Fraunces Fallback", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --grain: repeating-linear-gradient(0deg, transparent 0 31px, rgba(11,27,59,.035) 31px 32px);
}
[data-locale="zh"] { --sans: "Inter", "Inter Fallback", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, sans-serif; --serif: "Fraunces", "Fraunces Fallback", "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif; }
/* Metric-matched fallbacks (measured against the web fonts) so text doesn't jump when Fraunces/Inter arrive. */
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia"); size-adjust: 77.8%; ascent-override: 126%; descent-override: 33.4%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 106.4%; ascent-override: 91.2%; descent-override: 22.6%; line-gap-override: 0%; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--paper); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
[data-locale="zh"] body, body[data-locale="zh"] { line-height: 1.75; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; color: var(--ink); font-variation-settings: "SOFT" 50; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 600; font-variation-settings: "SOFT" 60, "opsz" 144; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
[data-locale="zh"] h1, [data-locale="zh"] h2, [data-locale="zh"] h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.container { width: min(1120px, 100% - 2.5rem); margin: 0 auto; }
.container.narrow { max-width: 760px; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .5rem .8rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* highlighter mark */
.mark { background: linear-gradient(transparent 52%, var(--marker) 52%, var(--marker) 92%, transparent 92%) no-repeat 0 0 / 0% 100%; padding: 0 .08em; margin: 0 -.08em; border-radius: 2px; transition: background-size .7s cubic-bezier(.2,.7,.2,1); }
.no-js .mark, .mark.in { background-size: 100% 100%; }
@media (prefers-reduced-motion: reduce) { .mark { background-size: 100% 100%; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; border-radius: 12px; padding: .75rem 1.25rem; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .06s, box-shadow .15s; text-decoration: none !important; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(47,91,255,.8); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #f5d3d3; }
.btn-sm { padding: .5rem .9rem; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn .ic { width: 1.15em; height: 1.15em; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(250,248,243,.82); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; font-variation-settings: "SOFT" 30, "opsz" 24; white-space: nowrap; }
.logo-light { color: #fff; }
.main-nav { display: flex; gap: 1.4rem; margin-left: .5rem; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--ink); text-decoration: none; }
.header-avail { margin-left: auto; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; pointer-events: none; }
.scrolled .header-avail { opacity: 1; transform: none; pointer-events: auto; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .8rem; }
.header-avail + .header-actions { margin-left: 0; }
.lang-switch { color: var(--muted); font-size: .9rem; font-weight: 500; padding: .4rem .65rem; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.lang-switch:hover { color: var(--ink); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-2); border-radius: 10px; width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.nav-toggle .ic { width: 22px; height: 22px; }
.nav-sheet { border-top: 1px solid var(--border); background: var(--paper); box-shadow: var(--shadow-lg); }
.nav-sheet nav { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 0 1.4rem; }
.nav-sheet nav > a:not(.btn) { padding: .7rem .2rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--border); }
.nav-sheet .btn { margin-top: .9rem; }
.nav-sheet .lang-switch { align-self: flex-start; margin-top: .8rem; }
@media (max-width: 860px) {
  .main-nav, .header-cta, .header-avail { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-inner { height: 62px; }
}
/* Narrow phones: keep the wordmark on one line next to the language switch and menu button. */
@media (max-width: 430px) {
  .header-inner { gap: .55rem; }
  .wordmark { font-size: 1.12rem; }
  .logo-mark { width: 26px; height: 26px; }
  .lang-switch { font-size: .82rem; padding: .35rem .5rem; }
  .nav-toggle { width: 38px; height: 38px; }
}

/* ---------- availability badge ---------- */
.avail { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem .45rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; font-weight: 500; color: var(--ink); box-shadow: var(--shadow); max-width: 100%; }
.avail-short { font-size: .82rem; padding: .35rem .75rem .35rem .6rem; }
.avail-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 0 4px rgba(31,138,91,.18); }
.avail-away .avail-dot { background: var(--marker); box-shadow: 0 0 0 4px rgba(255,201,77,.3); }
.avail-online .avail-dot { animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,138,91,.35); } 70% { box-shadow: 0 0 0 8px rgba(31,138,91,0); } 100% { box-shadow: 0 0 0 0 rgba(31,138,91,0); } }
.avail-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .8; pointer-events: none; mask-image: linear-gradient(180deg, #000 30%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); }
.hero::after { content: ""; position: absolute; right: -180px; top: -220px; width: 720px; height: 720px; background: radial-gradient(closest-side, rgba(255,201,77,.28), transparent 70%); pointer-events: none; contain: strict; }
.hero .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.hero-badge { margin-bottom: 1.4rem; }
.kicker { color: var(--accent); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .9rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; margin: 1.6rem 0 1.5rem; }
.cta-sub { color: var(--faint); font-size: .875rem; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--muted); font-size: .9rem; }
.trust li { display: inline-flex; align-items: center; gap: .45rem; }
.trust .ic { color: var(--ok); }
.hero-visual { display: flex; justify-content: center; }

/* animated report card */
.report { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); transform: rotate(-1.2deg); overflow: hidden; }
.report-tab { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.report-tab .ic { color: var(--faint); }
.report-tab span:last-child { margin-left: auto; font-family: var(--sans); font-size: .72rem; color: var(--faint); }
.report-body { padding: 1.1rem 1.25rem 1.25rem; }
.report-score { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.ring { width: 76px; height: 76px; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--surface-2); stroke-width: 7; }
.ring-arc { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: 163.4; }
.ring-wrap { position: relative; }
.ring-value { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.report-score strong { display: block; font-size: .95rem; color: var(--ink); }
.report-score small { color: var(--faint); }
.report-lines { font-family: var(--serif); font-size: .84rem; line-height: 1.55; color: var(--ink-2); margin: 0; }
.report-lines p { margin: 0 0 .45rem; }
.hl { position: relative; background: linear-gradient(transparent 8%, var(--marker) 8%, var(--marker) 92%, transparent 92%) no-repeat 0 0 / 0% 100%; padding: 0 .1em; margin: 0 -.1em; border-radius: 2px; transition: background-size .6s ease-out; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.play .hl { background-size: 100% 100%; }
.play .hl-2 { transition-delay: .9s; }
.flag-tag { display: inline-block; font-family: var(--sans); font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--marker-ink); background: var(--marker-soft); border: 1px solid var(--marker); border-radius: 5px; padding: .05rem .35rem; vertical-align: middle; margin-left: .3rem; opacity: 0; transform: translateY(3px); transition: opacity .3s, transform .3s; }
.play .hl .flag-tag { opacity: 1; transform: none; transition-delay: .6s; }
.play .hl-2 .flag-tag { transition-delay: 1.5s; }
.report-dl { display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem; padding: .45rem .85rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.done .report-dl { opacity: 1; transform: none; }
.no-js .report .hl { background-size: 100% 100%; }
.no-js .report .flag-tag, .no-js .report-dl { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero-visual { order: 2; }
  .report { max-width: 400px; transform: none; }
}

/* ---------- support strip ---------- */
.support-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); padding: 1.3rem 0; }
.support-inner { display: flex; align-items: center; gap: 1.2rem 2rem; flex-wrap: wrap; }
.support-inner h2 { font-size: 1.15rem; margin: 0; }
.support-inner p { margin: 0; color: var(--muted); font-size: .92rem; }
.support-inner .chips { margin-left: auto; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .55rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); color: var(--ink); font-weight: 500; font-size: .9rem; transition: border-color .15s, background .15s; }
.chip:hover { text-decoration: none; border-color: var(--ink); background: var(--paper); }
.chip .ic { color: var(--accent); }
.chip-whatsapp .ic { color: #1f8a5b; } .chip-telegram .ic { color: #2f7fd6; } .chip-instagram .ic { color: #c13584; }
.chip-todo { color: var(--faint); border-style: dashed; cursor: default; }
.chip-todo .ic { color: var(--faint); }
.chip-todo small { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.chips-compact .chip { padding: .4rem .75rem; font-size: .85rem; }
@media (max-width: 700px) { .support-inner .chips { margin-left: 0; } }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; margin-bottom: .6rem; }
.section-sub { text-align: center; color: var(--muted); max-width: 62ch; margin: 0 auto 2.4rem; font-size: 1.05rem; }
.section-title:last-child, .section-title + .steps, .section-title + .cards-3, .section-title + .ledger, .section-title + .faq, .section-title + .pricing-grid { margin-top: 2.4rem; }
.page-title { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .4rem; }

/* how it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; position: relative; }
.steps::before { content: ""; position: absolute; top: 34px; left: 16%; right: 16%; border-top: 2px dashed var(--border-2); }
.step { position: relative; text-align: center; padding: 0 .5rem; }
.step-icon { width: 68px; height: 68px; margin: 0 auto 1.1rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink); position: relative; }
.step-icon .ic { width: 28px; height: 28px; stroke-width: 1.6; }
.step-num { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--marker); color: var(--ink); font-size: .75rem; font-weight: 700; display: grid; place-items: center; font-family: var(--serif); }
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--muted); margin: 0; }

/* samples */
.samples { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.sample { margin: 0; }
.sample-frame { aspect-ratio: 4 / 3; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; position: relative; }
.sample-frame.placeholder { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 12px, var(--surface) 12px 24px); }
.sample-frame.placeholder span { background: var(--surface); border: 1px dashed var(--border-2); color: var(--faint); border-radius: 8px; padding: .5rem .9rem; font-size: .85rem; text-align: center; }
.sample-frame img { width: 100%; height: 100%; object-fit: cover; }
.sample figcaption { padding: 1rem .2rem 0; }
.sample figcaption h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.sample figcaption p { color: var(--muted); margin: 0; font-size: .95rem; }
.sample-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .5rem; border-radius: 6px; margin-bottom: .5rem; }
.sample-tag.ai { background: var(--marker-soft); color: var(--marker-ink); }
.sample-tag.sim { background: var(--accent-soft); color: var(--accent-dark); }
.sample-real { display: inline-block; margin: 0 0 .5rem .5rem; font-size: .78rem; color: var(--muted); }
.sample-frame img { object-position: top; }

/* cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.card h3 { margin-bottom: .5rem; }
.card-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--marker-soft); color: var(--marker-ink); display: grid; place-items: center; margin-bottom: .9rem; }

/* ledger */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.ledger-col { padding: 1.6rem 1.7rem; }
.ledger-col + .ledger-col { border-left: 1px solid var(--border); }
.ledger-col h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; font-family: var(--sans); font-weight: 700; }
.ledger-col.do h3 { color: var(--ok-text); } .ledger-col.dont h3 { color: var(--danger); }
.ledger-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.ledger-col li { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 0; border-top: 1px dashed var(--border); color: var(--text); }
.ledger-col li .ic { margin-top: .25em; flex: none; }
.ledger-col.do li .ic { color: var(--ok); } .ledger-col.dont li .ic { color: var(--danger); }

/* pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; align-items: stretch; }
.price-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 1.8rem; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.price-card.featured { border-color: var(--ink); box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .price-card.featured { transform: translateY(-10px); } }
.ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--marker); color: var(--ink); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
.price-card h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.price-blurb { color: var(--muted); font-size: .92rem; margin: 0 0 .9rem; min-height: 2.4em; }
.price { margin: 0 0 .2rem; display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.amount { font-family: var(--serif); font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.per { color: var(--faint); font-size: .95rem; }
.each { color: var(--muted); font-size: .9rem; margin: 0 0 1.2rem; min-height: 1.4em; }
.price-card ul { list-style: none; padding: 1rem 0 0; margin: 0 0 1.5rem; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.price-card li { display: flex; gap: .55rem; align-items: flex-start; color: var(--text); font-size: .95rem; }
.price-card li .ic { color: var(--ok); margin-top: .25em; }
.price-note { text-align: center; color: var(--muted); margin: 1.4rem 0 0; font-size: .92rem; }

/* hours */
.hours { display: flex; gap: 1.4rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.6rem 1.8rem; box-shadow: var(--shadow); }
.hours .ic { width: 40px; height: 40px; flex: none; color: var(--accent); stroke-width: 1.6; }
.hours h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.hours p { color: var(--muted); margin: 0 0 .8rem; }
.hours .avail { margin-top: .2rem; }

/* faq */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 1.25rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-size: 1.4rem; font-weight: 400; font-family: var(--serif); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 1.1rem; }

/* final cta */
.final-cta { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.final-cta::before { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .5; mix-blend-mode: screen; }
.final-cta .container { position: relative; }
.final-cta h2 { color: #fff; }
.final-cta .lead { color: rgba(255,255,255,.75); margin: 0 auto 1.4rem; }
.final-cta .btn-primary { background: var(--marker); color: var(--ink); box-shadow: none; }
.final-cta .btn-primary:hover { background: #ffd66e; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 3rem 0 2rem; position: relative; }
.site-footer::before { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .35; mix-blend-mode: screen; pointer-events: none; }
.footer-grid { position: relative; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem 3rem; align-items: start; }
.footer-disclaimer { color: rgba(255,255,255,.62); font-size: .85rem; margin: 1rem 0 0; max-width: 46ch; line-height: 1.6; }
.footer-nav { display: flex; flex-direction: column; gap: .55rem; padding-top: .3rem; }
.footer-nav a { color: rgba(255,255,255,.82); font-size: .92rem; }
.footer-nav a:hover { color: #fff; }
.footer-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.55); margin: .3rem 0 .7rem; }
.site-footer .chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff; }
.site-footer .chip:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
.site-footer .chip-todo { color: rgba(255,255,255,.5); }
.site-footer .chip-todo .ic, .site-footer .chip .ic { color: var(--marker); }
.footer-copy { grid-column: 1 / -1; color: rgba(255,255,255,.5); font-size: .85rem; margin: .5rem 0 0; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .steps::before { display: none; }
  .step { display: grid; grid-template-columns: 68px 1fr; gap: 1.1rem; text-align: left; align-items: start; }
  .step-icon { margin: 0; }
  .step h3 { margin-top: .2rem; }
  .cards-3, .samples, .pricing-grid { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: 1fr; }
  .ledger-col + .ledger-col { border-left: 0; border-top: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .hours { flex-direction: column; }
}
@media (min-width: 600px) and (max-width: 900px) { .pricing-grid, .samples { grid-template-columns: 1fr 1fr; } .pricing-grid .price-card.featured { grid-column: 1 / -1; } }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 1.25rem; }
.form.card { padding: 1.75rem; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .95rem; color: var(--ink); }
.field legend { padding: 0; margin-bottom: .5rem; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.field small { color: var(--faint); }
.opt { color: var(--faint); font-weight: 400; }
.req { color: var(--danger); }
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="datetime-local"], textarea, select {
  font: inherit; width: 100%; padding: .75rem .9rem; border: 1.5px solid var(--border-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,91,255,.18); }
textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.input-row { display: flex; gap: .6rem; }
.input-row input { flex: 1; }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .4em; text-align: center; }

/* stepper form */
.fsteps { display: flex; flex-direction: column; gap: 0; counter-reset: fs; }
.fstep { position: relative; padding: 0 0 1.8rem 3rem; border: 0; margin: 0; min-width: 0; }
.fstep::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; border-left: 2px dashed var(--border-2); }
.fstep:last-child::before { display: none; }
.fstep:last-child { padding-bottom: 0; }
.fstep-num { counter-increment: fs; position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--serif); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.fstep-num::before { content: counter(fs); }
.fstep > legend { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); padding: 0; margin: 0 0 .9rem; line-height: 36px; }
.fstep .field + .field, .fstep .field + .field-row, .fstep .field-row + .field { margin-top: 1rem; }
@media (max-width: 600px) { .fstep { padding-left: 2.6rem; } .fstep-num { width: 30px; height: 30px; font-size: .85rem; } .fstep::before { left: 14px; } .fstep > legend { line-height: 30px; font-size: 1.1rem; } }

.dropzone { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; border: 1.5px dashed var(--border-2); border-radius: 12px; background: var(--surface); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.dropzone > .ic { width: 1.7em; height: 1.7em; color: var(--accent); }
.dz-label { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dz-label strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.dz-label span { color: var(--faint); font-size: .85rem; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone .btn { position: relative; z-index: 1; pointer-events: none; }

.checks { gap: .7rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400 !important; font-size: .95rem; color: var(--text); cursor: pointer; }
.check input { margin: .25rem 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.form-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #efc2c2; border-radius: 10px; padding: .75rem 1rem; font-size: .95rem; }
.form-ok { background: var(--ok-soft); color: #14532d; border: 1px solid #bfe3cd; border-radius: 10px; padding: .75rem 1rem; font-size: .95rem; }
.form-actions { display: flex; flex-direction: column; gap: .8rem; }
.secure { display: flex; align-items: center; justify-content: center; gap: .4rem; color: var(--faint); font-size: .85rem; margin: 0; }
.progress { position: relative; height: 36px; border-radius: 10px; background: var(--accent-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 600; color: var(--accent-dark); }
.progress .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(47,91,255,.25); transition: width .2s; }
.progress span { position: relative; }

/* order summary + credit box */
.summary { background: var(--surface-2); border-radius: 12px; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.summary-row strong { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.summary-row small { color: var(--muted); }
.expect { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; font-size: .92rem; color: var(--muted); }
.expect strong { color: var(--ink); }
.credit-box { display: flex; align-items: flex-start; gap: .8rem; padding: .9rem 1rem; border: 1.5px solid var(--marker); background: var(--marker-soft); border-radius: 12px; }
.credit-box .ic { color: var(--marker-ink); width: 1.4em; height: 1.4em; margin-top: .1em; }
.credit-box label { display: flex; gap: .6rem; align-items: center; font-weight: 600; color: var(--ink); cursor: pointer; }
.credit-box p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.credit-link { font-size: .9rem; }
.turnstile { min-height: 65px; }

/* ---------- notices / status ---------- */
.notice { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1.2rem; border: 1px solid transparent; }
.notice .ic { margin-top: .2em; }
.notice.ok { background: var(--ok-soft); color: #14532d; border-color: #bfe3cd; }
.notice.warn { background: var(--warn-soft); color: #6b3d00; border-color: #f4d7a6; }
.status-card { padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.2rem; }
.stepper { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; font-size: .85rem; color: var(--faint); position: relative; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); border-top: 2px dashed var(--border-2); }
.stepper li.done:not(:last-child)::after { border-style: solid; border-color: var(--ok); }
.stepper .marker { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--border-2); font-weight: 600; font-size: .85rem; color: var(--faint); font-family: var(--serif); }
.stepper li.active { color: var(--ink); font-weight: 600; }
.stepper li.active .marker { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.stepper li.done { color: var(--ink); }
.stepper li.done .marker { background: var(--ok); border-color: var(--ok); color: #fff; }
.status-label { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; margin: 0; color: var(--ink); }
.status-text { color: var(--muted); margin: 0; }
.status-completed { color: var(--ok); }
.status-cancelled, .status-refunded, .status-pending_upload { color: var(--danger); }
.status-pending_payment { color: var(--warn); }
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.dl-btn { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--ink); color: #fff; text-decoration: none !important; }
.dl-btn:hover { background: var(--ink-2); }
.dl-btn .ic { width: 1.6em; height: 1.6em; color: var(--marker); }
.dl-btn strong { display: block; font-size: .95rem; }
.dl-btn span { display: block; font-size: .8rem; color: rgba(255,255,255,.7); }
.dl-btn.na { background: var(--surface-2); color: var(--muted); cursor: default; }
.dl-btn.na .ic { color: var(--faint); }
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.score { padding: .9rem 1rem; background: var(--surface-2); border-radius: 10px; display: flex; flex-direction: column; }
.score span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.score strong { font-family: var(--serif); font-size: 1.7rem; color: var(--ink); }
.owner-note { background: var(--marker-soft); border-left: 3px solid var(--marker); border-radius: 0 10px 10px 0; padding: .9rem 1rem; }
.owner-note p { margin: .3rem 0 0; color: var(--text); }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: .4rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--border); }
.meta dt { font-size: .78rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.meta dd { margin: .15rem 0 0; font-weight: 500; display: flex; gap: .4rem; align-items: center; overflow-wrap: anywhere; color: var(--ink); }
.status-help { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.4rem; }
@media (max-width: 600px) { .downloads, .scores, .meta { grid-template-columns: 1fr; } }

/* credits */
.balance-card { display: flex; align-items: center; gap: 1.2rem; }
.balance-num { font-family: var(--serif); font-size: 3rem; font-weight: 700; color: var(--ink); line-height: 1; }
.balance-label { color: var(--muted); font-size: .9rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px dashed var(--border); font-size: .95rem; }
.list li:first-child { border-top: 0; }
.list small { color: var(--faint); }
.pill { display: inline-block; padding: .15rem .55rem; border-radius: 6px; font-size: .78rem; font-weight: 600; text-transform: capitalize; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.pill-credit { background: var(--marker-soft); color: var(--marker-ink); border-color: var(--marker); }
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe3cd; }
.pill-danger { background: var(--danger-soft); color: var(--danger); border-color: #efc2c2; }

/* ---------- legal ---------- */
.legal h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal p { color: var(--muted); }
.legal .lead-in { font-size: 1.05rem; }

/* ---------- admin ---------- */
.admin main { padding-bottom: 3rem; }
.admin .site-header { background: var(--surface); }
.admin .header-inner { gap: 1rem; }
.admin .header-actions { gap: .6rem; }
.admin .badge { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--marker); color: var(--ink); padding: .15rem .45rem; border-radius: 6px; vertical-align: middle; margin-left: .3rem; }
.admin-availbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.admin-availbar .container { padding-top: .5rem; padding-bottom: .5rem; }
.avail-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.avail-toggle { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.avail-toggle input[type="datetime-local"] { width: auto; padding: .4rem .6rem; font-size: .85rem; }
.avail-toggle input[type="text"] { width: 160px; padding: .4rem .6rem; font-size: .85rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.admin-head .page-title { margin: 0; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.tabs a { padding: .4rem .8rem; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 500; text-transform: capitalize; }
.tabs a.active { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 720px; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.status-pill { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; text-transform: capitalize; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.status-pill.status-paid { background: var(--accent-soft); color: var(--accent-dark); border-color: #cddcff; }
.status-pill.status-processing { background: var(--warn-soft); color: var(--warn); border-color: #f4d7a6; }
.status-pill.status-completed { background: var(--ok-soft); color: var(--ok); border-color: #bfe3cd; }
.status-pill.status-cancelled, .status-pill.status-refunded { background: var(--danger-soft); color: var(--danger); border-color: #efc2c2; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
.admin-grid h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.admin-grid h3 { font-size: .85rem; margin: 1.5rem 0 .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-family: var(--sans); font-weight: 700; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; font-size: .95rem; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.actions form { margin: 0; }
.overdue-tag { color: var(--danger); font-weight: 600; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } .avail-toggle { width: 100%; } }

/* ---------- narrow phones (≤ 420px) ---------- */
@media (max-width: 420px) {
  .dropzone { flex-wrap: wrap; padding: .9rem 1rem; }
  .dropzone > .ic { display: none; }
  .dz-label { flex: 1 1 100%; }
  .dz-label span:empty { display: none; }
  .dropzone .btn { width: 100%; }
  .summary-row { flex-direction: column; gap: .2rem; }
  .summary-row strong { font-size: 1.6rem; }
  .expect .avail { max-width: 100%; }
  .expect .avail-text { white-space: normal; line-height: 1.35; }
  .hero-badge .avail-text, .hours .avail-text { white-space: normal; line-height: 1.35; }
  .support-inner h2 { font-size: 1.05rem; }
}
