/* The business site (docs/quizbuks/plans/Q31-biz-site.md). One stylesheet, design tokens for light and dark,
   no framework. The neutral tokens are here; the brand's (--accent and the others, the illustrations' --leaf/--coin/
   --sky/--ink) are the brand profile's site.css, which the build appends (Q54) and whose text pairs
   brands/brand.test.mjs checks (WCAG AA in both appearances). */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --card-soft: #f1f5f9;
  --line: #e2e8f0;
  --paper: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px -16px rgba(15, 23, 42, .25);
  --radius: 16px;
  --max: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --fg: #f1f5f9;
    --muted: #cbd5e1;
    --card: #111a2e;
    --card-soft: #1e293b;
    --line: #27354d;
    --paper: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .7);
  }
}
* { box-sizing: border-box; }
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6rem; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.lead.center { margin-left: auto; margin-right: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 .75rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-fg); padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 1rem; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; position: relative; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; color: var(--fg); text-decoration: none; white-space: nowrap; flex: none; }
.brand .coin { width: 2rem; height: 2rem; flex: none; }
.foot .brand .coin { width: 1.75rem; height: 1.75rem; }
.menu { display: flex; align-items: center; gap: 1rem; }
.menu .links { display: flex; gap: .9rem; }
.menu .links a { color: var(--fg); font-weight: 500; font-size: .95rem; padding: .35rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.menu .links a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }
.menu .links a:hover { text-decoration: none; color: var(--accent); }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--fg); cursor: pointer; white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--card-soft); }
.lang .chev { width: .9rem; height: .9rem; transition: transform .12s ease; }
.lang[open] .chev { transform: rotate(180deg); }
.lang ul { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 9rem; margin: 0; padding: .3rem; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 20; }
.lang li a { display: block; padding: .45rem .7rem; border-radius: 8px; font-size: .9rem; color: var(--fg); text-decoration: none; white-space: nowrap; }
.lang li a:hover, .lang li a:focus-visible { background: var(--card-soft); }
.lang li a[aria-current] { font-weight: 600; color: var(--accent); }
.signin { display: flex; gap: .9rem; align-items: center; }
.signin a { font-size: .88rem; font-weight: 600; color: var(--fg); white-space: nowrap; }
.signin a:hover { color: var(--accent); }
.signin a + a { padding-left: .9rem; border-left: 1px solid var(--line); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.bar .actions { flex-wrap: nowrap; }
.bar .button { white-space: nowrap; padding: .55rem .95rem; font-size: .9rem; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 2.6rem; height: 2.6rem; padding: .6rem; flex-direction: column; justify-content: space-between; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; background: var(--fg); border-radius: 2px; }
/* The header is wider than the page's text (Q95): seven links, the languages, both sign-ins and the sponsor's sign-up
   fit in one row from about 1,250px (English); below 1,350px they move into the menu, which leaves room for wider fonts.
   The taker's sign-up stays out of the bar (the hero and the menu offer it): with it English had 14px to spare.
   e2e measures the header (biz.spec.ts, "the header fits"). */
.top .wrap { max-width: 90rem; }
.bar .button.ghost { display: none; }
@media (max-width: 1350px) {
  .menu-toggle { display: flex; }
  .bar .button.ghost { display: inline-flex; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 1rem; background: var(--bg); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.25rem; box-shadow: var(--shadow); }
  .menu.open { display: flex; }
  .menu .links { flex-direction: column; gap: .25rem; }
  .menu .links a { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .lang { align-self: flex-start; }
  .lang ul { position: static; margin-top: .4rem; box-shadow: none; }
  .signin a { padding: .35rem 0; }
}

/* buttons */
.button { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: .95rem; line-height: 1.2; transition: transform .12s ease, background .12s ease; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button.primary { background: var(--accent); color: var(--accent-fg); }
.button.primary:hover { background: var(--accent-strong); }
.button.ghost { color: var(--accent); border-color: var(--line); background: var(--card); }
.button.ghost:hover { background: var(--card-soft); }
.button.large { padding: .9rem 1.5rem; font-size: 1.05rem; }
.button.disabled { opacity: .55; cursor: not-allowed; }
.button.disabled:hover { transform: none; }
.button .icon.small { width: 1rem; height: 1rem; }

/* icons */
.icon { width: 1.5rem; height: 1.5rem; flex: none; }
.icon.small { width: 1.1rem; height: 1.1rem; }
.icon.big { width: 3rem; height: 3rem; }
.icon.accent { color: var(--accent); width: 2rem; height: 2rem; margin-bottom: .75rem; }
.icon.muted { color: var(--muted); }

/* hero */
.hero { padding: 4.5rem 0 3.5rem; background: radial-gradient(60rem 30rem at 85% -10%, var(--accent-soft), transparent 60%), linear-gradient(180deg, var(--bg-soft), var(--bg)); border-bottom: 1px solid var(--line); }
.hero.compact { padding: 3.5rem 0 2.5rem; }
.hero-split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; }
.hero-art { width: 100%; max-width: 22rem; height: auto; justify-self: end; }
@media (max-width: 900px) { .hero-split { grid-template-columns: 1fr; } .hero-art { display: none; } }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .mock { display: none; } }
.mock { position: relative; min-height: 36rem; }
.mock .art { position: absolute; right: -1rem; top: -1.5rem; width: 15rem; height: auto; opacity: .95; }
/* A narrower column: the drawing would slide behind the phone, so it shrinks and sits above the stat card instead. */
@media (max-width: 1180px) { .mock .art { width: 11rem; top: auto; bottom: 0; right: 0; } }
.phone { position: absolute; left: 0; top: 0; width: 16.5rem; height: 30rem; border-radius: 2rem; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 1rem; }
.phone-bar { width: 5rem; height: .4rem; background: var(--line); border-radius: 99px; margin: .25rem auto 1.25rem; }
.phone-card strong { display: block; margin: .6rem 0 .8rem; font-size: 1.05rem; line-height: 1.35; }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--accent-soft); color: var(--chip-fg); padding: .2rem .55rem; border-radius: 999px; }
.opt { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; margin: .4rem 0; font-size: .92rem; background: var(--bg); }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.reward { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; padding: .6rem .75rem; border-radius: 10px; background: var(--card-soft); font-size: .9rem; font-weight: 600; color: var(--ok); }
.stat-card { position: absolute; right: 0; top: 26rem; width: 13rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.stat-label { font-size: .8rem; color: var(--muted); }
.stat-value { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.meter { height: .5rem; background: var(--card-soft); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 78%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 99px; }

/* sections */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--bg-soft); max-width: none; padding-left: 1.25rem; padding-right: 1.25rem; }
.section.alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.band { padding: 4rem 0; background: linear-gradient(180deg, var(--bg-soft), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid2 { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2rem; }
.grid4 { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; color: var(--muted); }
.card .button { margin-top: 1rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.panel.wide { align-items: flex-start; background: linear-gradient(135deg, var(--accent-soft), var(--card)); }
.panel .button { margin-top: .5rem; }
.checks { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .5rem; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; }
.checks .icon { color: var(--ok); margin-top: .2rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { display: flex; gap: .9rem; align-items: flex-start; flex-wrap: wrap; }
.steps .art { width: 100%; height: 7.5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; box-shadow: var(--shadow); }
.steps .num { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); font-weight: 800; }
.steps h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.survey-mock { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); display: grid; gap: .9rem; }
.survey-mock .row { display: grid; grid-template-columns: 7rem 1fr 3rem; align-items: center; gap: .75rem; font-size: .92rem; }
.survey-mock .track { height: .7rem; background: var(--card-soft); border-radius: 99px; overflow: hidden; }
.survey-mock .track i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 99px; }
.survey-mock .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* try it */
.try { margin-top: 2rem; }
.try-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; box-shadow: var(--shadow); }
.qr { width: 10rem; height: 10rem; border-radius: 12px; }
.qr.placeholder { display: grid; place-items: center; gap: .25rem; border: 2px dashed var(--line); color: var(--muted); font-size: .8rem; text-align: center; padding: 1rem; }
.soon { font-size: .8rem; color: var(--muted); }

/* faq */
.faq { max-width: 46rem; margin: 1.5rem auto 0; display: grid; gap: .6rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: .75rem 0 0; color: var(--muted); }

/* pricing */
.plans { display: grid; gap: 1.25rem; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; gap: .4rem; box-shadow: var(--shadow); }
.plan.highlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); background: linear-gradient(180deg, var(--accent-soft), var(--card) 9rem); }
.plan .price { margin: .25rem 0 .25rem; display: flex; align-items: baseline; gap: .35rem; }
.plan .amount { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.plan .unit { color: var(--muted); font-size: .9rem; }
.plan .checks { flex: 1; }
.table-wrap { overflow-x: auto; margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
table.fees { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.fees th, table.fees td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.fees thead th { background: var(--card-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.fees tbody th { font-weight: 600; }
table.fees tr:last-child td, table.fees tr:last-child th { border-bottom: 0; }
table.fees .num { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 3rem 0 2rem; background: var(--bg-soft); color: var(--muted); font-size: .92rem; }
.foot h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg); margin-bottom: .75rem; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.plain a { color: var(--muted); }
.plain a:hover { color: var(--accent); }
.fine { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } html { scroll-behavior: auto; } }

/* Q95: the knowledge structure map beside its text on the home page. */
.map-art { display: flex; justify-content: center; }
.band-art { width: 100%; max-width: 28rem; height: auto; }

/*
 * CJK text (F-F12): each language has its own font stack, the Latin letters first and the language's own CJK fonts
 * after them, and only system fonts (web fonts load slowly or not at all in mainland China). One stack for all three
 * languages put a Japanese font before the Chinese ones, so a Chinese page was set in Japanese glyphs with the
 * characters that font lacks falling to another family one by one; and a weight only some of the fonts have (800) was
 * drawn thick in one and thin in the other. Chinese and Japanese headings are 600, which PingFang, Hiragino, Noto,
 * Source Han and YaHei all have; no negative letter spacing, which spoils the characters.
 */
html:lang(zh) { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; }
html:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", "Meiryo", sans-serif; }
html:lang(en) { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
html:lang(zh) :is(h1, h2, h3, .brand, .stat-value, .plan .amount, .eyebrow, .chip, .steps .num), html:lang(ja) :is(h1, h2, h3, .brand, .stat-value, .plan .amount, .eyebrow, .chip, .steps .num) { font-weight: 600; }
html:lang(zh) *, html:lang(ja) * { letter-spacing: 0 !important; }

/*
 * The brand's colours on the static sites (Q54): the business site (biz) and QuizBuks for Shopify's public pages
 * (shopify-site), whose own tokens are not the apps' (brand.css). Each site's stylesheet comes first, these after.
 * Text pairs (brands/brand.test.mjs): --accent on the white and the dark page, --accent-fg on --accent and
 * --chip-fg on --accent-soft, each ≥ 4.5:1. The --qb-* tokens are the ones mark.svg uses.
 */
:root {
  --bg-soft: #f4faf7;
  --soft: #f4faf7;
  --accent: #047857;
  --accent-strong: #065f46;
  --accent-soft: #d1fae5;
  --accent-fg: #ffffff;
  --chip-fg: #064e3b;
  --ok: #047857;
  --leaf: #34d399;
  --leaf-deep: #059669;
  --coin: #fbbf24;
  --coin-deep: #d97706;
  --sky: #ecfdf5;
  --ink: #064e3b;
  --qb-leaf: var(--leaf);
  --qb-leaf-deep: var(--leaf-deep);
  --qb-coin: var(--coin);
  --qb-coin-deep: var(--coin-deep);
  --qb-ink: var(--ink);
  --qb-mark: #0f6b5c;
  --qb-mark-foreground: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-soft: #0f172a;
    --soft: #0f172a;
    --accent: #6ee7b7;
    --accent-strong: #a7f3d0;
    --accent-soft: #123b2d;
    --accent-fg: #052e16;
    --chip-fg: #d1fae5;
    --ok: #34d399;
    --leaf: #34d399;
    --leaf-deep: #10b981;
    --coin: #fbbf24;
    --coin-deep: #f59e0b;
    --sky: #123b2d;
    --ink: #d1fae5;
  }
}
