/* ===========================================================================
   Mr.Wang Chinese — the HSK section (2026-11-02)
   ---------------------------------------------------------------------------
   hsk.html (the HSK page), hsk-mock-tests.html, hsk-old-mock-tests.html,
   hsk-new-mock-tests.html, hsk-vocabulary.html and hsk-exam-guide.html.

   Every page is an area page (assets/area-page.css: .ap-hero, .ap-section,
   .ap-card, .ap-stage, .ap-btn), each in a colour of its own (2026-11-03, the
   blocks below), dressed by assets/site-ui.css like the rest of the site. This file only adds what those
   components do not have: the trail above the title, larger cards for the
   section pages, an empty state, level tiles and the guide's tables.
   The lists of mock tests themselves are .hx-hub in assets/hsk-exam.css, read by
   assets/hsk-hub.js. Load after area-page.css, before site-ui.css.
   =========================================================================== */


/* ── One colour per page (2026-11-03, Yi: "HSK要像characters部分一样区分颜色"), as the Characters pages have ──
   HSK itself blue (the home page's cue for it), Mock Tests indigo, Vocabulary amber, the Exam Guide teal, Reading
   green. A block sets the area tokens the components read (--t-area-hsk-*, which area-page.css and site-ui.css
   turn into --ap-* and --ui-*), so every tint, link, button and chart on the page follows the band. The exam page
   and a reading text carry the class too. --hk-rgb is the page's colour for shadows and lines. */
body.ap-hsk  { --hk-rgb: var(--t-area-hsk-rgb); }
body.ap-read { --hk-rgb: var(--t-area-read-rgb); }
body.hk-c-mock  { --t-area-hsk-mark: #4f55d2; --t-area-hsk-ink: #3b40b5; --t-area-hsk-tint: #eeeefd; --t-area-hsk-tint2: #dcddfa; --t-area-hsk-rgb: 79, 85, 210; }
body.hk-c-vocab { --t-area-hsk-mark: #cd7420; --t-area-hsk-ink: #a85a10; --t-area-hsk-tint: #fdf2e7; --t-area-hsk-tint2: #fae3cc; --t-area-hsk-rgb: 205, 116, 32; }
body.hk-c-guide { --t-area-hsk-mark: #1f9185; --t-area-hsk-ink: #1a6f66; --t-area-hsk-tint: #e7f5f3; --t-area-hsk-tint2: #cfebe6; --t-area-hsk-rgb: 31, 145, 133; }
body.hk-c-read  { --t-area-read-mark: #2a9262; --t-area-read-ink: #1f6f4a; --t-area-read-tint: #e8f6ee; --t-area-read-tint2: #d3eede; --t-area-read-rgb: 42, 146, 98; }

/* ── The trail above the title: HSK / Mock Tests ─────────────────────────── */
/* It takes the place, and the look, of the hero's eyebrow. */
.hk-crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0; padding: 0; list-style: none; }
.hk-crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .55; }
.hk-crumbs a { color: inherit; text-decoration: underline; text-decoration-color: rgba(var(--t-area-hsk-rgb), .35); text-underline-offset: .2em; }
.hk-crumbs a:hover { text-decoration-color: currentColor; }

/* ── Section cards: the four on the HSK page (two across), the two on Mock Tests ── */
.ap-card-grid.hk-cards { margin-top: 2.5rem; }   /* under the section's heading (2026-11-03) */
@media (min-width: 768px) { .ap-card-grid.hk-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-card.hk-card { min-height: 15rem; padding: 2.25rem 2rem 2rem; }
.ap-card.hk-card h2 {
  margin: 0 0 .75rem;
  font-family: var(--ap-display); font-size: 1.625rem; font-weight: 600; line-height: 1.2; letter-spacing: -.02em;
}
body.site-ui .ap-card.hk-card h2 { color: var(--ui-accent); }
.ap-card.hk-card p { flex: none; margin: 0 0 .75rem; font-size: 1rem; line-height: 1.65; color: var(--ap-body); }
.ap-card.hk-card .hk-card-text { flex: 1; margin-bottom: 1.5rem; }
/* "HSK 1–6" under a title */
.ap-card.hk-card .hk-card-sub { margin: -.25rem 0 .9rem; font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ap-accent-ink); }
/* what is there today: "20 tests ready · HSK 3–6", "Coming soon" */
.ap-card.hk-card .hk-card-meta { margin: 0 0 1.25rem; font-size: .875rem; color: var(--ap-muted); }
.ap-card.hk-card .hk-card-meta::before {
  content: ""; display: inline-block; width: .4375rem; height: .4375rem; margin-right: .5rem; vertical-align: .1em;
  border-radius: 50%; background: var(--t-correct-mark);
}
.ap-card.hk-card .hk-card-meta.is-soon::before { background: var(--t-faint); }
.ap-card.hk-card > span { font-size: .9375rem; }

.hk-more { margin: 1.75rem 0 0; color: var(--ap-muted); font-size: .9375rem; line-height: 1.6; }
.hk-more a { color: var(--ap-accent-ink); font-weight: 500; text-decoration: underline; text-underline-offset: .2em; }
.hk-note { max-width: 46rem; margin: 1.5rem 0 0; color: var(--t-muted); font-size: .82rem; line-height: 1.5; }
.hk-note a { color: var(--ap-accent-ink); text-decoration: underline; text-underline-offset: .2em; }

/* ── Nothing here yet ─────────────────────────────────────────────────────── */
.hk-empty {
  max-width: 46rem; padding: 2.5rem 2rem;
  border: 1px dashed rgba(var(--t-area-hsk-rgb), .35); border-radius: var(--t-r-lg);
  background: rgba(255, 255, 255, .7);
}
.hk-empty h2 { margin: 0; font-family: var(--ap-display); font-size: 1.5rem; font-weight: 600; line-height: 1.3; color: var(--ap-ink); }
.hk-empty p { margin: .75rem 0 0; color: var(--ap-body); font-weight: 300; line-height: 1.7; }
.hk-empty .ap-actions { margin-top: 1.5rem; }
.hk-empty .ap-btn-outline { background: var(--t-white); }

/* ── Levels: the vocabulary lists, one tile per level ─────────────────────── */
.hk-panels { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 900px) { .hk-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hk-panel {
  padding: 1.75rem 1.5rem; border: 1px solid var(--t-line); border-radius: var(--t-r-lg);
  background: var(--t-white); box-shadow: var(--t-sh-2);
}
.hk-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.hk-panel h3 { margin: 0; font-family: var(--ap-display); font-size: 1.375rem; font-weight: 600; color: var(--ap-ink); }
.hk-panel-sub { margin: .2rem 0 0; font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ap-accent-ink); }
.hk-tag {
  display: inline-block; padding: .2rem .7rem; border-radius: var(--t-r-pill);
  background: var(--t-sunk); color: var(--t-muted); font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.hk-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.hk-level {
  display: block; height: 100%; padding: .7rem .85rem; border: 1px solid var(--t-line-soft); border-radius: var(--t-r-sm);
  background: var(--t-cream); color: var(--t-ink);
}
.hk-level b { display: block; font-weight: 600; }
.hk-level small { display: block; margin-top: .1rem; color: var(--t-muted); font-size: .8rem; }
/* when a list is ready its tile becomes a link */
a.hk-level { background: var(--t-white); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
a.hk-level:hover { border-color: var(--ap-accent-ink); background: var(--ap-tint); }
.hk-panel .hk-note { margin-top: 1rem; }

/* ── Exam Guide: the topics, then one section each ────────────────────────── */
.hk-topics { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px)  { .hk-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hk-topics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hk-topics .ap-stage { height: 100%; border: 1px solid transparent; transition: border-color .15s ease, background .15s ease; }
.hk-topics .ap-stage:hover { border-color: rgba(var(--t-area-hsk-rgb), .35); background: var(--t-white); }

.hk-guide { border-top: 1px solid var(--ap-line); scroll-margin-top: var(--mw-header-h, 80px); }
.hk-guide .ap-wrap > * { max-width: 46rem; }
.hk-guide .ap-h2 { font-size: 2rem; }
@media (min-width: 768px) { .hk-guide .ap-h2 { font-size: 2.25rem; } }
.hk-prose p, .hk-prose li { color: var(--ap-body); font-size: 1.0625rem; font-weight: 300; line-height: 1.75; }
.hk-prose p { margin: 1.25rem 0 0; }
.hk-prose ul, .hk-prose ol { margin: 1.25rem 0 0; padding-left: 1.25rem; }
.hk-prose li + li { margin-top: .6rem; }
.hk-prose strong { font-weight: 600; color: var(--ap-ink); }
.hk-prose a { color: var(--ap-accent-ink); font-weight: 500; text-decoration: underline; text-underline-offset: .2em; }
.hk-guide .ap-wrap > .hk-table-wrap { max-width: 52rem; }
.hk-table-wrap { margin-top: 1.75rem; overflow-x: auto; border: 1px solid var(--t-line); border-radius: var(--t-r-md); background: var(--t-white); }
.hk-table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: .9375rem; }
.hk-table th, .hk-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--t-line-soft); text-align: left; vertical-align: top; }
.hk-table thead th { background: var(--ap-tint); color: var(--ap-ink); font-size: .8125rem; font-weight: 600; }
.hk-table tbody th { font-weight: 600; white-space: nowrap; }
.hk-table tr:last-child > * { border-bottom: 0; }
.hk-table td { color: var(--ap-body); font-variant-numeric: tabular-nums; }
.hk-table-note { margin: .75rem 0 0; color: var(--t-muted); font-size: .82rem; line-height: 1.5; }
.hk-back { margin: 1.75rem 0 0; font-size: .875rem; }
.hk-back a { color: var(--ap-muted); text-decoration: underline; text-underline-offset: .2em; }


/* ── The band at the top: the page's colour, the character behind, the glance pill over its edge ──────────
   The Characters pages' header (assets/skill-page-v2.css .sp-hero) in the area page's own markup: the section
   keeps .ap-hero, so the tests and the pages' scripts find what they expect. ── */
body.site-ui .ap-hero.hk-band {
  position: relative; isolation: isolate; overflow: hidden;
  padding-top: 5rem; padding-bottom: 8.5rem; border-bottom: 0;
  background: var(--ap-accent);
}
.hk-band-glyph {
  position: absolute; z-index: -1; top: 50%; right: max(0px, calc(50% - 660px)); transform: translateY(-50%);
  font: 400 400px/1 var(--t-chinese); color: rgba(255, 255, 255, .13); pointer-events: none; user-select: none;
}
body.site-ui .hk-band .hk-crumbs, body.site-ui .hk-band .ap-eyebrow { color: rgba(255, 255, 255, .8); letter-spacing: 0; text-transform: none; font-size: .875rem; font-weight: 500; }
.hk-band .hk-crumbs ol { gap: .25rem .625rem; }
.hk-band .hk-crumbs li + li::before { opacity: .7; }
.hk-band .hk-crumbs a { color: #fff; text-decoration: none; }
.hk-band .hk-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.site-ui .ap-hero.hk-band h1 { margin-top: 1.25rem; font-size: 4rem; line-height: 1.06; letter-spacing: -.03em; color: #fff; }
body.site-ui .hk-band .ap-lede { max-width: 36rem; margin-top: 1.1rem; font-size: 1.25rem; font-weight: 400; line-height: 1.55; color: rgba(255, 255, 255, .93); }
body.site-ui .hk-band .ap-status {
  margin-top: 1.4rem; padding: .45rem 1rem .45rem .8rem; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px;
  background: rgba(255, 255, 255, .14); box-shadow: none; color: #fff; font-size: .875rem; font-weight: 500;
}
body.site-ui .hk-band .ap-status i { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
.hk-band .ap-actions { margin-top: 1.9rem; }
body.site-ui .hk-band .ap-btn { height: 50px; padding: 0 26px; border: 0; font-size: 1rem; font-weight: 600; }
body.site-ui .ap-hero.hk-band .ap-btn-solid { background: #fff; color: var(--ap-accent-ink); box-shadow: 0 14px 26px -14px rgba(0, 0, 0, .45); }
body.site-ui .ap-hero.hk-band .ap-btn-solid:hover { background: #fff; color: var(--ap-accent-ink); }
body.site-ui .ap-hero.hk-band .ap-btn-outline { border: 1px solid rgba(255, 255, 255, .65); background: rgba(255, 255, 255, .06); color: #fff; }
body.site-ui .ap-hero.hk-band .ap-btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, .16); color: #fff; }
body.site-ui .hk-band .ap-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.hk-glance-band { position: relative; z-index: 3; margin-top: -3.25rem; padding: 0 1.5rem; }
.hk-glance {
  display: flex; align-items: center; max-width: 1000px; min-height: 102px; margin: 0 auto; padding: 0 28px; list-style: none;
  background: #fff; border: 1px solid rgba(var(--hk-rgb), .2); border-radius: 999px;
  box-shadow: 0 2px 6px rgba(31, 26, 26, .1), 0 14px 32px -10px rgba(var(--hk-rgb), .3);
}
.hk-glance li {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap;
  gap: 0 10px; padding: 12px; text-align: center;
}
.hk-glance li + li::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 40px; margin-top: -20px; background: rgba(var(--hk-rgb), .2); }
.hk-glance strong { font: 600 2rem/1.2 var(--t-ui); letter-spacing: -.5px; color: var(--ap-accent-ink); }
.hk-glance span { font: 500 1.0625rem/1.3 var(--t-ui); color: var(--ap-body); }
.hk-glance-band + .ap-section { padding-top: 4.5rem; }

/* ── The sections below the band: the Characters pages' manner ─────────────────────────────────────────── */
body.site-ui:is(.ap-hsk, .ap-read) .ap-wrap > .ap-eyebrow:not(.hk-crumbs),
body.site-ui:is(.ap-hsk, .ap-read) .ap-wrap > h2.ap-eyebrow { display: flex; align-items: center; gap: 10px; }
body.site-ui:is(.ap-hsk, .ap-read) .ap-wrap > .ap-eyebrow:not(.hk-crumbs)::before,
body.site-ui:is(.ap-hsk, .ap-read) .ap-wrap > h2.ap-eyebrow::before {
  content: ""; flex: 0 0 24px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, var(--ap-accent), rgba(var(--hk-rgb), .2));
}
body.site-ui:is(.ap-hsk, .ap-read) .ap-h2 { font-size: 2.75rem; letter-spacing: -.025em; line-height: 1.15; }
/* lifted paper cards */
body.site-ui:is(.ap-hsk, .ap-read) :is(.ap-card, .hk-panel, .hx-level, .rd-level, .hk-topics .ap-stage, .hk-empty) {
  border-radius: 24px; border-color: var(--t-line);
  box-shadow: 0 4px 0 rgba(var(--hk-rgb), .08), 0 22px 40px -28px rgba(var(--hk-rgb), .45);
}
body.site-ui .ap-hsk .hx-level.is-empty { box-shadow: none; }
body.site-ui:is(.ap-hsk, .ap-read) .hk-topics .ap-stage { background: #fff; }
body.site-ui:is(.ap-hsk, .ap-read) .hk-topics .ap-stage:hover { border-color: rgba(var(--hk-rgb), .4); }
/* the section cards: a character tile, the title, the words, a capsule */
.ap-card.hk-card { padding: 2rem 2rem 1.9rem; }
body.site-ui .ap-card .hk-card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 0 1.1rem; padding: 0; border-radius: 16px;
  background: var(--ap-tint); color: var(--ap-accent-ink); font: 400 26px/1 var(--t-chinese);
}
body.site-ui .ap-card.hk-card h2 { color: var(--t-ink); }
body.site-ui:is(.ap-hsk, .ap-read) .ap-card.hk-card > span:not(.hk-card-icon) {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; height: 42px; padding: 0 20px; margin-top: .25rem;
  border-radius: 999px; background: linear-gradient(170deg, var(--ap-accent), var(--ap-accent-ink));
  box-shadow: 0 12px 24px -12px rgba(var(--hk-rgb), .45); color: #fff; font-size: .9375rem; font-weight: 600; white-space: nowrap;
}
body.site-ui:is(.ap-hsk, .ap-read) .ap-card.hk-card:hover > span:not(.hk-card-icon) { gap: 12px; }
/* on the HSK page each card carries its own page's colour */
.hk-card.hk-c-mock  { --ap-accent: #4f55d2; --ap-accent-ink: #3b40b5; --ap-tint: #eeeefd; --hk-rgb: 79, 85, 210; }
.hk-card.hk-c-vocab { --ap-accent: #cd7420; --ap-accent-ink: #a85a10; --ap-tint: #fdf2e7; --hk-rgb: 205, 116, 32; }
.hk-card.hk-c-guide { --ap-accent: #1f9185; --ap-accent-ink: #1a6f66; --ap-tint: #e7f5f3; --hk-rgb: 31, 145, 133; }
.hk-card.hk-c-read  { --ap-accent: #2a9262; --ap-accent-ink: #1f6f4a; --ap-tint: #e8f6ee; --hk-rgb: 42, 146, 98; }
body.site-ui .ap-card.hk-card .hk-card-sub { color: var(--ap-accent-ink); }

@media (max-width: 1023px) {
  body.site-ui .ap-hero.hk-band { padding-top: 4.5rem; padding-bottom: 8rem; }
  body.site-ui .ap-hero.hk-band h1 { font-size: 3.5rem; }
  .hk-band-glyph { font-size: 300px; }
  body.site-ui:is(.ap-hsk, .ap-read) .ap-h2 { font-size: 2.375rem; }
}
@media (max-width: 1100px) {
  .hk-glance { padding: 0 12px; }
  .hk-glance li { display: block; padding: 16px 10px; line-height: 1.3; }
  .hk-glance strong { margin-right: 5px; font-size: 1.75rem; }
  .hk-glance span { font-size: .9375rem; }
}
@media (max-width: 650px) {
  body.site-ui .ap-hero.hk-band { padding-top: 3rem; padding-bottom: 7.25rem; }
  body.site-ui .ap-hero.hk-band h1 { font-size: 2.75rem; }
  body.site-ui .hk-band .ap-lede { font-size: 1.125rem; }
  .hk-band-glyph { top: auto; right: -24px; bottom: -36px; transform: none; font-size: 220px; }
  body.site-ui .hk-band .ap-btn { height: 48px; padding: 0 22px; font-size: .9375rem; }
  .hk-glance { flex-direction: column; align-items: stretch; min-height: 0; padding: 6px 20px; border-radius: 28px; }
  .hk-glance li { display: flex; padding: 14px 4px; }
  .hk-glance strong { margin-right: 0; }
  .hk-glance li + li::before { left: 0; right: 0; top: 0; width: auto; height: 1px; margin: 0; }
  body.site-ui:is(.ap-hsk, .ap-read) .ap-h2 { font-size: 2rem; }
  .ap-card.hk-card { padding: 1.75rem 1.5rem 1.5rem; }
}

@media (max-width: 650px) {
  .ap-card.hk-card { min-height: 0; padding: 1.75rem 1.5rem 1.5rem; }
  .ap-card.hk-card h2 { font-size: 1.4rem; }
  .hk-empty { padding: 2rem 1.5rem; }
  .hk-guide .ap-h2 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hk-topics .ap-stage, a.hk-level { transition: none; }
}
@media print {
  .hk-crumbs, .hk-topics { display: none !important; }
}
