/* Free worksheet maker (/worksheets/ and its landing pages). Hand-written: edit here. Loaded with ?v=<hash>. */
/* Same look as the homepage (homepage/public/index.html): ink and paper bands, Instrument Sans. No mono labels here (25 Nov: they looked machine-made). */
:root {
  --ink: #0D0C0B; --ink-2: #171513; --ink-3: #211F1C;
  --paper: #F4F1EC; --paper-2: #EAE5DC; --card: #FBF9F5;
  --on-dark: #F4F1EC; --on-dark-2: rgba(244, 241, 236, .64);
  --on-paper: #0D0C0B; --on-paper-2: rgba(13, 12, 11, .64);
  --line-d: rgba(244, 241, 236, .12); --line-p: rgba(13, 12, 11, .12);
  --accent: #F28C45; --accent-deep: #A9501A; --gold: #E3A43A; --seal: #D9442B;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;   /* no Geist Mono on the site (25 Nov) */
  --han: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --py: "NSws", "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem; --gutter: clamp(20px, 5vw, 40px); --section: clamp(3.5rem, 7vw, 5.5rem); --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--on-dark); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.han { font-family: var(--han); font-weight: 500; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 80; background: var(--accent); color: var(--ink); padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.dark { background: var(--ink); color: var(--on-dark); --fg: var(--on-dark); --fg-2: var(--on-dark-2); --line: var(--line-d); --eyebrow: var(--accent); color-scheme: dark; }
.light { background: var(--paper); color: var(--on-paper); --fg: var(--on-paper); --fg-2: var(--on-paper-2); --line: var(--line-p); --eyebrow: var(--accent-deep); color-scheme: light; }
.light :focus-visible { outline-color: var(--accent-deep); }
.eyebrow { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0; color: var(--eyebrow); }
h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); line-height: 1.07; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.2rem); line-height: 1.12; letter-spacing: -0.03em; }
h3 { font-size: 1.1rem; line-height: 1.3; letter-spacing: -0.012em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 48px; padding: 0.7rem 1.2rem; border-radius: 8px; border: 1px solid transparent; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, transform .1s ease; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-cream { background: var(--paper); color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn-cream:hover { background: #fff; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover:not(:disabled) { background: #2A2724; }
.btn-sm { min-height: 44px; padding: 0.45rem 0.9rem; font-size: 0.88rem; }
.text-link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.text-link:hover { text-decoration-color: currentColor; }

/* header, menu, footer: as on the homepage */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: saturate(1.2) blur(12px); border-bottom: 1px solid var(--line-d); padding-top: env(safe-area-inset-top, 0px); color: var(--on-dark); }
.topbar-in { display: flex; align-items: center; gap: 1.75rem; min-height: 68px; }
.mark { display: inline-flex; align-items: center; min-height: 44px; gap: 0.65rem; font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.swa-mark { display: block; width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 1.6rem; margin-left: 1rem; }
.nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; font-size: 0.88rem; color: var(--on-dark-2); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--on-dark); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.menu-btn { display: none; width: 44px; height: 44px; place-items: center; border: 0; background: transparent; color: var(--on-dark); cursor: pointer; border-radius: 8px; flex: none; }
.menu-btn svg { width: 22px; height: 22px; }
.menu { position: fixed; inset: 0; z-index: 70; background: var(--ink); color: var(--on-dark); display: flex; flex-direction: column; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); overflow-y: auto; }
.menu > .wrap { width: 100%; }
.menu-top { display: flex; justify-content: space-between; align-items: center; min-height: 68px; border-bottom: 1px solid var(--line-d); }
.menu-close { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: var(--on-dark); background: none; border: 0; min-height: 44px; padding: 0.6rem 0.2rem; cursor: pointer; }
.menu-links { display: grid; gap: 0.25rem; padding-block: 1.75rem; }
.menu-links a { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; padding-block: 0.35rem; }
footer { border-top: 1px solid var(--line-d); padding-block: 3rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--on-dark); }
.foot-in { display: grid; justify-items: center; gap: 1.4rem; }
.foot-in > p { font-size: 0.9rem; color: var(--on-dark-2); max-width: 30rem; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.6rem; }
.foot-links a { display: inline-block; padding: .6rem 0; font-size: 0.9rem; color: var(--on-dark-2); text-decoration: none; }
.foot-links a:hover { color: var(--on-dark); }
.foot-in > p.foot-base { font-family: var(--sans); font-size: 0.8rem; color: var(--on-dark-2); }
.foot-legal { font-size: 0.8rem; opacity: .75; }

/* hero */
.hero { padding-block: clamp(2.5rem, 5vw, 4.25rem) clamp(2.25rem, 4.5vw, 3.5rem); }
.hero-in { display: grid; gap: 1.1rem; justify-items: start; max-width: 46rem; }
.hero .lede { color: var(--on-dark-2); font-size: 1.08rem; max-width: 38rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-family: var(--sans); font-size: 0.95rem; letter-spacing: 0; color: var(--on-dark-2); }
.facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* the maker */
.maker { padding-block: clamp(2rem, 5vw, 3.75rem) clamp(2.5rem, 6vw, 4.5rem); }
.mk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "sheet prev" "words prev" "boxes prev" "prac prev" "paper prev" "bar bar"; grid-template-rows: auto auto auto auto 1fr auto; gap: 0 clamp(1.5rem, 4vw, 3rem); align-items: start; }
.mk > fieldset, .mk > .mk-prev { margin-bottom: 1rem; }   /* margins, not row gaps: a hidden box leaves no gap */
.mk-sheet { grid-area: sheet; } .mk-words { grid-area: words; } .mk-boxes { grid-area: boxes; } .mk-prac { grid-area: prac; } .mk-paper { grid-area: paper; }
.mk-prev { grid-area: prev; position: sticky; top: 84px; }
.mk-bar { grid-area: bar; display: none; }
fieldset { margin: 0; padding: 1.15rem 1.15rem 1.25rem; min-width: 0; border: 1px solid var(--line-p); border-radius: 12px; background: var(--card); }
legend { float: left; width: 100%; padding: 0; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.015em; }
legend ~ * { clear: both; }   /* not only the next one: in Test mode the first rows are hidden */
legend .n { flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #F6E4D6; color: var(--accent-deep); font-family: var(--sans); font-weight: 700; font-size: 0.82rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.sub { display: block; font-size: 0.92rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.hint { font-size: 0.88rem; color: var(--on-paper-2); }
/* segmented radio buttons */
.seg { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 0.4rem; }
.seg label { position: relative; display: flex; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.seg label > span { display: grid; place-items: center; text-align: center; min-height: 46px; padding: 0.45rem 0.5rem; border-radius: 8px; border: 1px solid var(--line-p); background: #fff; font-weight: 600; font-size: 0.94rem; line-height: 1.2; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.seg label > span small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--on-paper-2); }
.seg input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.seg input:checked + span small { color: var(--on-dark-2); }
.seg input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.seg .grid-ico { width: 34px; height: 34px; margin: 0.15rem auto 0.25rem; display: block; }
.seg label > span { flex: 1 1 auto; }
.seg.grids span { padding-block: 0.6rem; align-content: start; }
/* range chips */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); gap: 0.4rem; }
.chip { min-height: 44px; padding: 0.3rem 0.2rem; border-radius: 999px; border: 1px solid var(--line-p); background: #fff; color: var(--ink); font: 600 0.88rem/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips.wide { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
.setnav { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.setnav select { flex: 1 1 0; width: 100%; min-width: 0; margin: 0; min-height: 46px; font-variant-numeric: tabular-nums; }
.setnav .nav { flex: 0 0 46px; width: 46px; margin: 0; padding: 0; min-height: 46px; border-radius: 8px; border: 1px solid var(--line-p); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.setnav .nav svg { width: 16px; height: 16px; }
.setnav .nav:disabled { opacity: .35; cursor: default; }
.setnav .nav:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
#ws-addbox .sub { margin-top: 0.9rem; }
.count-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.25rem 1rem; margin-top: 0.75rem; font-size: 0.9rem; color: var(--on-paper-2); }
.linkbtn { background: none; border: 0; padding: 0.5rem 0.25rem; min-height: 44px; min-width: 44px; font: 600 0.9rem var(--sans); color: var(--on-paper); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(13,12,11,.35); cursor: pointer; }
.pick { margin-top: 0.6rem; border-top: 1px solid var(--line-p); }
.pick > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; font-weight: 600; font-size: 0.95rem; list-style: none; }
.pick > summary::-webkit-details-marker { display: none; }
.pick > summary::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-right: 4px; }
.pick[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.find { width: 100%; min-height: 46px; font: inherit; font-size: 1rem; padding: 0.6rem 0.85rem; border-radius: 8px; border: 1px solid var(--line-p); background: #fff; color: var(--ink); }
.wlist { margin-top: 0.5rem; max-height: 22rem; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line-p); border-radius: 8px; background: #fff; }
.wlist li + li { border-top: 1px solid var(--line-p); }
.wlist label { display: grid; grid-template-columns: 1.4rem 2rem 5.1rem minmax(0, 1fr); grid-template-areas: "c n zh py" "c n zh en"; column-gap: 0.6rem; align-items: center; min-height: 48px; padding: 0.35rem 0.75rem; cursor: pointer; }
.wlist input { grid-area: c; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.wlist .n { grid-area: n; font-family: var(--sans); font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--on-paper-2); }
.wlist .zh { grid-area: zh; font-family: var(--han); font-size: 1.25rem; font-weight: 500; line-height: 1.2; }
.wlist .py { grid-area: py; font-family: var(--py); font-weight: 600; font-size: 0.92rem; line-height: 1.25; }
.wlist .en { grid-area: en; font-size: 0.84rem; color: var(--on-paper-2); line-height: 1.3; }
.wlist .none { padding: 0.9rem 0.85rem; font-size: 0.9rem; color: var(--on-paper-2); }
textarea { width: 100%; min-height: 8.5rem; resize: vertical; font: 1.25rem/1.6 var(--han); padding: 0.65rem 0.85rem; border-radius: 8px; border: 1px solid var(--line-p); background: #fff; color: var(--ink); }
.note { margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: 8px; background: #FBEFE6; color: #6B3410; font-size: 0.9rem; }
/* practice rows */
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding-block: 0.7rem; border-top: 1px solid var(--line-p); }
.row:first-of-type { border-top: 0; }
.row > :first-child { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.row > :first-child small { display: block; font-weight: 400; font-size: 0.82rem; color: var(--on-paper-2); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-p); border-radius: 8px; background: #fff; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font: 500 1.35rem/1 var(--sans); color: var(--ink); cursor: pointer; }
.stepper button:disabled { color: rgba(13,12,11,.25); cursor: default; }
.stepper output { min-width: 2rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
select { min-height: 44px; font: 600 0.95rem var(--sans); padding: 0 2.2rem 0 0.8rem; border-radius: 8px; border: 1px solid var(--line-p); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230D0C0B' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.8rem center; color: var(--ink); -webkit-appearance: none; appearance: none; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { font-style: normal; position: absolute; inset: 0; border-radius: 999px; background: rgba(13,12,11,.18); transition: background-color .15s ease; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s ease; }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
label.row { cursor: pointer; }
/* preview */
.prev-card { border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line-p); padding: clamp(0.9rem, 2.5vw, 1.4rem); display: grid; gap: 0.9rem; }
.prev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.prev-head h2 { font-size: 1.05rem; letter-spacing: -0.015em; }
.prev-head p { font-family: var(--sans); font-size: 0.85rem; font-variant-numeric: tabular-nums; color: var(--on-paper-2); text-align: right; }
.sheet { position: relative; background: #fff; border-radius: 3px; box-shadow: 0 1px 2px rgba(13,12,11,.08), 0 18px 40px -22px rgba(13,12,11,.45); overflow: hidden; }
/* more than one page: the pages behind show as a small stack */
.sheet.many { box-shadow: 0 1px 2px rgba(13,12,11,.08), 5px 5px 0 -1px #fff, 5px 5px 0 0 rgba(13,12,11,.10), 0 18px 40px -22px rgba(13,12,11,.45); margin: 0 6px 6px 0; }
.sheet.lots { box-shadow: 0 1px 2px rgba(13,12,11,.08), 5px 5px 0 -1px #fff, 5px 5px 0 0 rgba(13,12,11,.10), 10px 10px 0 -1px #fff, 10px 10px 0 0 rgba(13,12,11,.08), 0 22px 44px -22px rgba(13,12,11,.5); margin: 0 11px 11px 0; }
.pgnav { display: inline-flex; align-items: center; gap: 0.15rem; }
.pgnav button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pgnav button:hover:not(:disabled) { background: rgba(13,12,11,.07); }
.pgnav button:disabled { opacity: .3; cursor: default; }
.pgnav button:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 1px; }
.pgnav svg { width: 14px; height: 14px; }
.prev-head .cap { display: flex; align-items: center; gap: 0.1rem; }
.sheet canvas { display: block; width: 100%; height: auto; }
.empty { aspect-ratio: 210 / 297; display: grid; place-items: center; padding: 2rem; text-align: center; color: var(--on-paper-2); font-size: 0.95rem; }
.dl { display: grid; gap: 0.5rem; }
.dl .btn { width: 100%; }
.dl-info { font-size: 0.86rem; color: var(--on-paper-2); text-align: center; }
.status { min-height: 1.3em; font-size: 0.9rem; text-align: center; color: var(--on-paper); }
.again { justify-self: center; font-size: 0.9rem; }
.inapp { text-align: center; }
/* how + faq */
.how { padding-block: var(--section); }
.sec-head { display: grid; gap: 0.75rem; max-width: 40rem; margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.sec-head > p { color: var(--fg-2); font-size: 1.03rem; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 2rem; }
.steps li { display: grid; gap: 0.45rem; align-content: start; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.steps .sn { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold); font-family: var(--sans); font-size: 0.95rem; font-weight: 700; letter-spacing: 0; }
.steps p { color: var(--fg-2); }
.steps .han { color: var(--fg); }
.faq-sec { padding-block: 0 var(--section); }
.faq { max-width: 46rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; min-height: 48px; padding-block: 1.1rem; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.015em; list-style: none; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--fg-2); flex: none; transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.2rem; color: var(--fg-2); max-width: 40rem; }
.faq details p + p { margin-top: -0.6rem; }
.courses-line { margin-top: clamp(2rem, 5vw, 3rem); max-width: 46rem; color: var(--fg-2); }
.courses-line a { color: var(--fg); display: inline-block; padding-block: 0.4rem; }

@media (max-width: 1060px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 860px) {
  .mk { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sheet" "words" "prev" "boxes" "prac" "paper" "bar"; grid-template-rows: none; }
  .mk-prev { position: static; }
  .mk-prev .dl .btn, .mk-prev .dl .dl-info { display: none; }
  .mk-bar { display: flex; position: sticky; bottom: 0; z-index: 20; align-items: center; gap: 0.9rem; margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))); padding: 0.7rem max(var(--gutter), env(safe-area-inset-right, 0px)) calc(0.7rem + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line-p); }
  .mk-bar .btn { flex: 1 1 auto; }
  .mk-bar .dl-info { flex: 0 1 auto; text-align: left; font-size: 0.8rem; line-height: 1.35; max-width: 9.5rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .topbar-in { gap: 0.6rem; min-height: 60px; }
  .menu-top { min-height: 60px; }
  fieldset { padding: 1rem 0.9rem 1.1rem; }
  .hero { padding-block: 1.6rem 1.7rem; }
  .hero-in { gap: 0.8rem; }
  .hero h1 { font-size: 2.15rem; }
  .hero .lede { font-size: 1rem; }
  .facts { font-size: 0.7rem; gap: 0.3rem 1rem; }
  .faq summary { font-size: 1rem; }
}
@media (max-width: 380px) {
  .mark { font-size: 0.86rem; gap: 0.45rem; }
  .top-right .btn-sm { padding-inline: 0.65rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* 25 Nov (evening): sheet types, landing pages, word lists */
.seg.types label > span small { font-size: 0.76rem; }
.eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); display: inline-flex; align-items: center; min-height: 44px; margin-block: -0.7rem; }
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 0.3rem; }
.jump > span { font-size: 0.9rem; color: var(--on-dark-2); margin-right: 0.2rem; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(244, 241, 236, .28); color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.jump a:hover { border-color: var(--on-dark); }
.jump a[aria-current] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.words-sec { padding-block: 0 clamp(2.5rem, 6vw, 4.5rem); }
.words-sec h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 0.5rem; }
.words-sec > .wrap > p { color: var(--on-paper-2); max-width: 44rem; }
.allw { margin-top: 1.1rem; border: 1px solid var(--line-p); border-radius: 12px; background: var(--card); }
.allw > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: 0.6rem 1.1rem; cursor: pointer; font-weight: 700; list-style: none; }
.allw > summary::-webkit-details-marker { display: none; }
.allw > summary::after { content: ""; flex: none; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-right: 4px; }
.allw[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.wt { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.92rem; }
.wt th { text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--on-paper-2); padding: 0.5rem 0.6rem; border-top: 1px solid var(--line-p); }
.wt td { padding: 0.45rem 0.6rem; border-top: 1px solid var(--line-p); vertical-align: top; overflow-wrap: anywhere; line-height: 1.4; }
.wt .c-n { width: 3.1rem; white-space: nowrap; color: var(--on-paper-2); font-variant-numeric: tabular-nums; }
.wt .c-zh { width: 5.4rem; }
.wt td.c-zh { font-family: var(--han); font-size: 1.15rem; font-weight: 500; }
.wt .c-py { width: 7.5rem; }
.wt td.c-py { font-family: var(--py); font-weight: 600; }
.wt td.c-en { color: var(--on-paper-2); }
@media (max-width: 640px) {
  .wt { font-size: 0.86rem; }
  .wt .c-n { width: 2.1rem; } .wt .c-zh { width: 4.3rem; } .wt .c-py { width: 5.6rem; }
  .wt th, .wt td { padding-inline: 0.4rem; }
  .jump a { padding: 0 0.85rem; font-size: 0.88rem; }
}
.han { white-space: nowrap; }   /* keep 田字格 on one line */

/* 25 Nov: "Missed some words?" on a test */
.row.missed { flex-wrap: wrap; row-gap: 0.6rem; }
.row.missed > label { flex: 1 1 14rem; font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.missed-in { display: flex; gap: 0.5rem; flex: 1 1 13rem; }
.missed-in input { flex: 1 1 auto; min-width: 0; min-height: 44px; font: 600 1rem var(--sans); font-variant-numeric: tabular-nums; padding: 0 0.8rem; border-radius: 8px; border: 1px solid var(--line-p); background: #fff; color: var(--ink); }
.missed-in button { flex: none; min-height: 44px; padding: 0 1rem; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 0.92rem var(--sans); cursor: pointer; }
.missed-in button:hover { background: #2A2724; }
.missed-note { flex-basis: 100%; margin: 0; font-size: 0.85rem; color: var(--accent-deep); }
/* 25 Nov: open word list, CSV links, sample sheets, ready-made blank PDFs */
.allw-open { overflow: hidden; }
.allw-open .wt thead th { border-top: 0; }
.csv-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.9rem; }
.dl-csv { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0 0.95rem; border-radius: 8px; border: 1px solid var(--line-p); background: #fff; color: var(--ink); font: 600 0.9rem var(--sans); text-decoration: none; }
.dl-csv::before { content: ""; width: 0.9rem; height: 0.9rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat; }
.dl-csv:hover { border-color: var(--ink); }
.samples { padding-block: 0 clamp(2.5rem, 6vw, 4.5rem); }
.samples h2, .pdfs h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 1rem; }
.sgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.sgrid figure { margin: 0; }
.sgrid img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line-p), 0 18px 34px -22px rgba(13,12,11,.45); }
.sgrid figcaption { margin-top: 0.7rem; font-size: 0.9rem; color: var(--on-paper-2); }
.pdfs { padding-block: 0 clamp(2.5rem, 6vw, 4.5rem); }
.pdfs .wrap > p { color: var(--on-paper-2); max-width: 44rem; }
.pdf-wrap { margin-top: 1rem; overflow-x: auto; border: 1px solid var(--line-p); border-radius: 12px; background: var(--card); }
.pdft { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: 0.92rem; }
.pdft th, .pdft td { text-align: left; padding: 0.7rem 0.8rem; border-top: 1px solid var(--line-p); vertical-align: middle; }
.pdft thead th { border-top: 0; font-size: 0.8rem; font-weight: 600; color: var(--on-paper-2); }
.pdft tbody th { font-weight: 600; }
.pdft .sz { display: none; }
.pdft a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-inline: 0.35rem; color: var(--ink); font-weight: 600; text-underline-offset: 4px; }
@media (max-width: 640px) {
  .sgrid { grid-template-columns: minmax(0, 1fr); }
  .pdft { min-width: 0; }
  .pdft thead { display: none; }
  .pdft tr { display: block; padding: 0.4rem 0; border-top: 1px solid var(--line-p); }
  .pdft tr:first-child { border-top: 0; }
  .pdft th, .pdft td { display: block; border-top: 0; padding: 0.25rem 0.9rem; }
  .pdft .sz { display: inline-block; min-width: 4.2rem; color: var(--on-paper-2); font-weight: 500; }
}

/* hero: the workbook itself (its cover over a set page), on wide screens only; the maker stays first on phones */
.hero-art { display: none; }
@media (min-width: 960px) {
  .hero-in.has-art { max-width: var(--wrap); grid-template-columns: minmax(0, 44rem) minmax(15rem, 1fr); column-gap: clamp(2rem, 4vw, 4rem); }
  .hero-in.has-art > :not(.hero-art) { grid-column: 1; }
  .hero-art { display: block; grid-column: 2; grid-row: 1 / span 5; align-self: center; justify-self: center; position: relative; width: clamp(12rem, 17vw, 15.5rem); aspect-ratio: 210 / 297; margin-right: 4.5rem; }
  .hero-art picture, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .hero-art img { border-radius: 2px; box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 34px 60px -28px rgba(0,0,0,.85); }
  .hero-art .back { transform: translate(27%, 6%) rotate(5deg); }
  .hero-art .back img { filter: brightness(.86); }
  .hero-art .front { transform: rotate(-3deg); }
}
