/* Japan Work & JLPT Exam Calendar — design system (2026 redesign).
   Same-origin only (CSP: default-src 'self'; style-src 'self'; img-src 'self' data:). No inline styles anywhere.
   Type: "Jpexam Serif" (assets/fonts/serif-600.woff2, an 18 KB subset of Noto Serif JP, SIL OFL 1.1) for headings, system-ui for text.
   Palette: kinari (unbleached paper), ai (indigo), shu (vermilion), kin (gold). Motifs: seigaiha (waves) and asanoha (hemp leaf) as CSS masks.
   Motion: CSS only (load-in, scroll-driven reveals where supported, slow pattern drift). JS (days.js) only counts numbers and filters the country list.
   Everything stops under prefers-reduced-motion. Mobile first; the bottom dock and the menu are for narrow screens. */

@font-face {
  font-family: "Jpexam Serif";
  src: url("fonts/serif-600.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light dark;
  --serif: "Jpexam Serif", "Iowan Old Style", "Palatino Linotype", Palatino, "Noto Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --paper: #f6f1e7;
  --paper-2: #eee6d6;
  --surface: #fffcf6;
  --surface-2: #faf5ec;
  --ink: #141c33;
  --ink-2: #353d55;
  --muted: #565d71;
  --line: #e3d9c7;
  --line-strong: #cdbfa6;
  --ai: #1b3264;
  --ai-2: #24407c;
  --ai-deep: #0f1d40;
  --ai-night: #0a1430;
  --shu: #cc4128;
  --shu-text: #b2361f;
  --shu-soft: #fbe3db;
  --kin: #b68a35;
  --link: #1c4799;
  --link-hover: #b2361f;
  --ok-text: #1f5c37;
  --ok-bg: #dff0e3;
  --warn-text: #6f4200;
  --warn-bg: #fbefd6;
  --bad-text: #8e2414;
  --bad-bg: #fbe0d8;
  --focus: #cc4128;
  --hdr-bg: rgba(246, 241, 231, .82);
  --shadow-sm: 0 1px 2px rgba(20, 28, 51, .06), 0 1px 1px rgba(20, 28, 51, .04);
  --shadow: 0 1px 2px rgba(20, 28, 51, .05), 0 10px 28px -12px rgba(20, 28, 51, .22);
  --shadow-lg: 0 2px 6px rgba(20, 28, 51, .06), 0 30px 60px -24px rgba(15, 29, 64, .5);
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --hdr-h: 60px;
  --dock-h: 0px;
  --rg: var(--ai);
  --shu-solid: #c43d25;  /* backgrounds under white text, same in light and dark */
}

/* region colours (flag-free): traditional Japanese colours */
.rg-east-asia { --rg: #c8402a; }       /* shu */
.rg-southeast-asia { --rg: #3f7a39; }  /* matcha */
.rg-south-asia { --rg: #985407; }      /* kincha */
.rg-oceania { --rg: #1b7685; }         /* asagi */
.rg-north-america { --rg: #2b4c9a; }   /* ruri */
.rg-latin-america { --rg: #ad2f68; }   /* botan */
.rg-western-europe { --rg: #6a4b9c; }  /* fuji */
.rg-eastern-europe { --rg: #4f5b78; }  /* nezumi */
.rg-middle-east { --rg: #8f7012; }     /* kogane */
.rg-north-africa { --rg: #a24d27; }    /* bengara */
.rg-africa { --rg: #2b7660; }          /* tokiwa */
.rg-none { --rg: #6b7184; }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1430;
    --paper-2: #101c3f;
    --surface: #121e42;
    --surface-2: #16244c;
    --ink: #f3ecdd;
    --ink-2: #d9d3c5;
    --muted: #aeb5c8;
    --line: #26355f;
    --line-strong: #34467a;
    --ai: #9db8f2;
    --ai-2: #b9cdf7;
    --shu: #ff7a5c;
    --shu-text: #ff9479;
    --shu-soft: #3a1d22;
    --kin: #e1b866;
    --link: #a9c4ff;
    --link-hover: #ff9479;
    --ok-text: #9fe0b2;
    --ok-bg: #173826;
    --warn-text: #ffd48a;
    --warn-bg: #3a2c10;
    --bad-text: #ffb3a1;
    --bad-bg: #44201a;
    --focus: #ff9479;
    --hdr-bg: rgba(11, 20, 48, .8);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 60px -24px rgba(0, 0, 0, .8);
  }
  .rg-east-asia { --rg: #ff8a6f; }
  .rg-southeast-asia { --rg: #8fd07f; }
  .rg-south-asia { --rg: #f2a94e; }
  .rg-oceania { --rg: #6fd0dc; }
  .rg-north-america { --rg: #9db8f2; }
  .rg-latin-america { --rg: #f38bb9; }
  .rg-western-europe { --rg: #c3a8f0; }
  .rg-eastern-europe { --rg: #b2bdd8; }
  .rg-middle-east { --rg: #e6c661; }
  .rg-north-africa { --rg: #f29a70; }
  .rg-africa { --rg: #7fd3b6; }
  .rg-none { --rg: #aeb5c8; }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.7 var(--sans);
  overflow-x: clip;
  padding-bottom: var(--dock-h);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* the whole page sits on washi with a faint asanoha that drifts very slowly */
body::before {
  content: "";
  position: fixed;
  inset: -120px;
  z-index: -1;
  pointer-events: none;
  background: var(--ai);
  opacity: .045;
  -webkit-mask: url("asanoha.svg") 0 0 / 48px 83.14px repeat;
  mask: url("asanoha.svg") 0 0 / 48px 83.14px repeat;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s var(--ease); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: .2em 0; }
strong, b { font-weight: 650; }
s { text-decoration-thickness: 2px; }
::selection { background: var(--shu-solid); color: #fff; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3.6vw, 3.4rem); margin: .1em 0 .35em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.8vw, 2.3rem); margin: 2.2em 0 .6em; position: relative; padding-top: 22px; }
h2::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 34px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--shu) 0 60%, var(--kin) 60% 100%);
}
h3 { font-size: clamp(1.18rem, 1.05rem + .6vw, 1.45rem); margin: 1.8em 0 .5em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; color: var(--paper); }

.lead { font-size: clamp(1.04rem, .98rem + .35vw, 1.2rem); color: var(--ink-2); max-width: 46em; }
.meta { font-size: .84rem; color: var(--muted); }
.meta a { color: inherit; }
.eyebrow, .kicker { font: 700 .74rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--shu-text); margin: 0 0 .7em; }
.quote { font-style: italic; }
.src { word-break: break-word; }
.stale { color: var(--warn-text); font-weight: 600; }
.sub-h { font-size: 1.15rem; margin-top: 2em; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--hdr-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.hdr { display: flex; align-items: center; gap: 12px; min-height: var(--hdr-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; min-width: 0; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; overflow: visible; }
.bm-sun { fill: var(--shu); transform-origin: 20px 17px; }
.bm-wave { fill: none; stroke: var(--ai); stroke-width: 2.4; stroke-linecap: round; }
.brand-name { font: 600 1rem/1.15 var(--serif); letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand:hover .bm-sun { animation: sun-pop .6s var(--spring); }
@keyframes sun-pop { 40% { transform: translateY(-3px) scale(1.12); } }

.site-nav { display: none; gap: 4px; }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; border-radius: 999px;
}
.site-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; border-radius: 2px;
  background: var(--shu); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }
.site-nav a[aria-current] { color: var(--ink); }

/* menu (narrow screens): <details>, works without JS */
.menu { position: static; }
.menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9rem;
  transition: transform .2s var(--ease), background .2s;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:active { transform: scale(.95); }
.menu-icon { position: relative; width: 18px; height: 12px; display: inline-block; }
.menu-icon i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-icon i:first-child { top: 2px; }
.menu-icon i:last-child { top: 8px; }
.menu[open] .menu-icon i:first-child { top: 5px; transform: rotate(45deg); }
.menu[open] .menu-icon i:last-child { top: 5px; transform: rotate(-45deg); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  display: grid; gap: 2px; padding: 10px 16px 18px;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.menu-panel a {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px;
  border-radius: 14px; color: var(--ink); text-decoration: none; font: 600 1.12rem/1.2 var(--serif);
}
.menu-panel a::after { content: "→"; color: var(--shu-text); font-family: var(--sans); transition: transform .25s var(--ease); }
.menu-panel a:hover, .menu-panel a[aria-current] { background: var(--paper-2); }
.menu-panel a:hover::after { transform: translateX(4px); }
@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu-panel { animation: drop .32s var(--ease); }
  .menu[open] .menu-panel a { animation: rise-in .4s var(--ease) both; }
  .menu[open] .menu-panel a:nth-child(2) { animation-delay: .03s; }
  .menu[open] .menu-panel a:nth-child(3) { animation-delay: .06s; }
  .menu[open] .menu-panel a:nth-child(4) { animation-delay: .09s; }
  .menu[open] .menu-panel a:nth-child(5) { animation-delay: .12s; }
  .menu[open] .menu-panel a:nth-child(6) { animation-delay: .15s; }
  .menu[open] .menu-panel a:nth-child(7) { animation-delay: .18s; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 420px) {
  .menu > summary { padding: 0; width: 46px; justify-content: center; }
  .menu-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .brand-name { font-size: .95rem; }
}
@media (min-width: 960px) {
  .site-nav { display: flex; }
  .menu { display: none; }
  .brand-name { font-size: 1.06rem; }
}

/* bottom dock (phones): thumb-reach navigation */
.dock { display: none; }
@media (max-width: 959px) {
  :root { --dock-h: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .dock {
    position: fixed; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 60;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px;
    border-radius: 22px; background: color-mix(in srgb, var(--ai-night) 88%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
    box-shadow: 0 14px 34px -12px rgba(5, 10, 30, .6), inset 0 0 0 1px rgba(255, 255, 255, .08);
  }
  .dock a {
    display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 50px; border-radius: 17px;
    color: rgba(246, 241, 231, .78); text-decoration: none; font: 600 .7rem/1 var(--sans); letter-spacing: .02em;
    transition: background .25s var(--ease), color .25s, transform .2s var(--ease);
  }
  .dock a:active { transform: scale(.92); }
  .dock a[aria-current] { background: var(--shu-solid); color: #fff; }
  .dock a[aria-current] .dock-icon { animation: hop .7s var(--spring) .2s both; }
  .dock-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .dock-icon .dot { fill: currentColor; stroke: none; }
  .site-footer { padding-bottom: calc(var(--dock-h) + 12px) !important; }
}
@keyframes hop { 40% { transform: translateY(-4px); } }

/* ------------------------------------------------------------------ buttons */
.button {
  --b-bg: var(--ai); --b-fg: #fff;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
  background: var(--b-bg); color: var(--b-fg); text-decoration: none; font: 650 1rem/1.1 var(--sans);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--b-bg) 80%, transparent);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), color .2s;
}
.button::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--shu-solid); transform: translateX(-101%); transition: transform .45s var(--ease);
}
.button::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-18deg);
}
.button:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(204, 65, 40, .7); }
.button:hover::before { transform: translateX(0); }
.button:hover::after { animation: shine .9s var(--ease); }
.button:active { transform: translateY(0) scale(.97); }
.btn-arrow { display: inline-block; transition: transform .3s var(--spring); }
.button:hover .btn-arrow { transform: translateX(5px); }
.button-ghost { --b-bg: transparent; --b-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.button-ghost:hover { box-shadow: inset 0 0 0 1.5px transparent; }
.button-light { --b-bg: var(--paper); --b-fg: var(--ai-deep); }
@media (prefers-color-scheme: dark) { .button { --b-bg: #2d4b8f; } .button-ghost { --b-bg: transparent; } .button-light { --b-bg: #f6f1e7; --b-fg: #0f1d40; } }
@keyframes shine { to { left: 130%; } }

/* ------------------------------------------------------------------ home hero */
.hero {
  position: relative; isolation: isolate;
  margin: 0 calc(50% - 50vw); padding: 44px max(16px, calc(50vw - 562px)) 56px;
  display: grid; gap: 34px; align-items: center;
  color: #f6f1e7;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(204, 65, 40, .28), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(182, 138, 53, .18), transparent 60%),
    linear-gradient(160deg, #1b3264 0%, #0f1d40 48%, #0a1430 100%);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-wave {
  position: absolute; left: -160px; right: -160px; bottom: -2px; height: 46%;
  background: #f6f1e7; opacity: .07;
  -webkit-mask: url("seigaiha.svg") 0 0 / 80px 40px repeat; mask: url("seigaiha.svg") 0 0 / 80px 40px repeat;
  -webkit-mask-image: url("seigaiha.svg"), linear-gradient(to top, #000 30%, transparent);
  mask-image: url("seigaiha.svg"), linear-gradient(to top, #000 30%, transparent);
  -webkit-mask-size: 80px 40px, 100% 100%; mask-size: 80px 40px, 100% 100%;
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.hero-hemp {
  position: absolute; inset: -100px; background: #b68a35; opacity: .08;
  -webkit-mask: url("asanoha.svg") 0 0 / 36px 62.35px repeat; mask: url("asanoha.svg") 0 0 / 36px 62.35px repeat;
  -webkit-mask-image: url("asanoha.svg"), radial-gradient(60% 70% at 100% 0%, #000, transparent 70%);
  mask-image: url("asanoha.svg"), radial-gradient(60% 70% at 100% 0%, #000, transparent 70%);
  -webkit-mask-size: 36px 62.35px, 100% 100%; mask-size: 36px 62.35px, 100% 100%;
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.hero-sun {
  position: absolute; width: 340px; height: 340px; right: -110px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ef6a4c, #cc4128 60%, #a8301b);
  box-shadow: 0 0 120px 30px rgba(204, 65, 40, .35);
  opacity: .9;
}
.tate {
  position: absolute; right: 14px; top: 26px; margin: 0; z-index: -1;
  writing-mode: vertical-rl; font: 600 1.05rem/1 var(--serif); letter-spacing: .5em;
  color: rgba(246, 241, 231, .3);
}
.hero-copy { position: relative; max-width: 640px; }
.hero .eyebrow { color: #ffb29f; display: inline-flex; align-items: center; gap: 10px; }
.hero .eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.hero h1 { color: #fbf7ef; font-size: clamp(2.5rem, 1.4rem + 5.6vw, 5rem); line-height: 1.02; letter-spacing: -.025em; margin: 0 0 .35em; }
.hero h1 .amp { color: #ff8a6f; font-style: italic; }
.hero .lead { color: rgba(246, 241, 231, .84); font-size: clamp(1rem, .95rem + .3vw, 1.14rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 28px; }
.hero .button { --b-bg: #f6f1e7; --b-fg: #0f1d40; }
.hero .button:hover { color: #fff; }
.hero .button-ghost { --b-bg: transparent; --b-fg: #f6f1e7; box-shadow: inset 0 0 0 1.5px rgba(246, 241, 231, .45); }
.hero-facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.hero-facts li { margin: 0; padding: 12px 12px 10px; border-radius: 16px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.hero-facts .num { display: block; font: 600 clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem)/1 var(--serif); color: #fff; font-variant-numeric: tabular-nums; }
.hero-facts span { display: block; margin-top: 6px; font-size: .74rem; line-height: 1.3; color: rgba(246, 241, 231, .72); }
.hero a:not(.button) { color: #ffd3c7; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(330px, .85fr); padding-top: 76px; padding-bottom: 92px; gap: 56px; }
  .hero-sun { width: 520px; height: 520px; right: -150px; top: -230px; }
  .tate { right: auto; left: max(14px, calc(50vw - 640px)); top: 80px; font-size: 1.25rem; }
}

/* ------------------------------------------------------------------ countdown card + ring */
.count-card {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 26px 22px 20px; border-radius: 28px; text-align: center; color: #f6f1e7;
  background: linear-gradient(165deg, rgba(36, 64, 124, .96), rgba(10, 20, 48, .97));
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.hero .count-card { background: rgba(10, 20, 48, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.count-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #f6f1e7; opacity: .05;
  -webkit-mask: url("seigaiha.svg") 0 0 / 60px 30px repeat; mask: url("seigaiha.svg") 0 0 / 60px 30px repeat;
}
.count-label { margin: 0 0 12px; font: 700 .74rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #ffb29f; }
.ring { position: relative; width: min(250px, 66vw); aspect-ratio: 1; margin: 0 auto 6px; display: grid; place-items: center; }
.ring::before {  /* 60 tick marks */
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(246, 241, 231, .35) 0 .6deg, transparent .6deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 67% 70%, transparent 71%);
  mask: radial-gradient(circle, transparent 66%, #000 67% 70%, transparent 71%);
}
.ring::after { content: ""; position: absolute; inset: 20%; border-radius: 50%; background: radial-gradient(circle, rgba(204, 65, 40, .22), transparent 70%); }
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: rgba(246, 241, 231, .12); stroke-width: 9; }
.ring-fill { fill: none; stroke: #ff7a5c; stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255, 122, 92, .55)); }
.countdown-num { position: relative; z-index: 1; margin: 0; font: 600 clamp(2rem, 1.7rem + 1.2vw, 2.55rem)/1 var(--serif); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.count-date { margin: 10px 0 4px; font-size: .92rem; color: rgba(246, 241, 231, .8); }
.count-date time { display: block; font: 600 1.28rem/1.3 var(--serif); color: #fff; }
.clock { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 6px; }
.clock[hidden] { display: none; }
.clock .u { display: grid; min-width: 56px; padding: 8px 6px 6px; border-radius: 12px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.clock b { font: 600 1.25rem/1 var(--serif); color: #fff; font-variant-numeric: tabular-nums; }
.clock i { font-style: normal; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(246, 241, 231, .65); margin-top: 4px; }
.clock-note { flex-basis: 100%; font-size: .72rem; color: rgba(246, 241, 231, .6); }
.count-card .meta { color: rgba(246, 241, 231, .72); text-align: left; font-size: .78rem; margin: 8px 0 0; }
.count-card .meta a { color: #ffd3c7; }
.count-card .stale { color: #ffd48a; }
.pg-countdown .count-card { max-width: 560px; margin: 8px auto 20px; }

/* ------------------------------------------------------------------ notices and cards */
.notice {
  position: relative; padding: 14px 16px 14px 48px; margin: 22px 0; border-radius: var(--radius-sm);
  background: var(--warn-bg); color: var(--warn-text); font-size: .9rem; line-height: 1.55;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn-text) 18%, transparent);
}
.notice::before {
  content: "!"; position: absolute; left: 14px; top: 14px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--warn-text); color: var(--warn-bg); font: 800 .8rem/1 var(--sans);
}
.pg-home .notice { margin-top: 28px; }
.card, .legend, .affiliate, .products {
  background: var(--surface); border-radius: var(--radius); padding: 20px; margin: 18px 0;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
}
.legend { background: var(--surface-2); font-size: .94rem; }
.products { background: linear-gradient(135deg, var(--surface), var(--shu-soft)); }
.products h2, .affiliate h2 { margin-top: 0; padding-top: 0; font-size: 1.3rem; }
.products h2::before, .affiliate h2::before { content: none; }
.products ul, .affiliate ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.products li a, .affiliate li a { display: flex; align-items: center; min-height: 48px; padding: 8px 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; text-decoration: none; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--paper-2); color: var(--muted); }
.badge.pr { background: var(--warn-bg); color: var(--warn-text); }
.more-link a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 650; text-decoration: none; }
.more-link a::after { content: "→"; transition: transform .3s var(--spring); }
.more-link a:hover::after { transform: translateX(5px); }

/* ------------------------------------------------------------------ home bands */
.band { position: relative; }
.band-countries h2, .band-steps h2, .band-tests h2 { margin-top: 1.3em; }
.kicker { margin: 56px 0 -8px; }
.kicker + h2 { margin-top: .4em; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; counter-reset: s; }
.steps li {
  position: relative; margin: 0; padding: 22px 20px 18px 82px; border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
}
.steps h3 { margin: 0 0 .3em; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.step-n {  /* hanko-style stamp */
  position: absolute; left: 20px; top: 20px; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 10px; background: var(--shu-solid); color: #fff; font: 600 1.4rem/1 var(--serif); transform: rotate(-6deg);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25), 0 8px 18px -8px rgba(204, 65, 40, .8);
  transition: transform .4s var(--spring);
}
.steps li:hover .step-n { transform: rotate(4deg) scale(1.08); }
@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .steps li { padding: 84px 22px 22px; }
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 43px; left: 82px; right: -18px; border-top: 2px dashed var(--line-strong); }
}
.band-cal {
  margin: 64px calc(50% - 50vw) 0; padding: 8px max(16px, calc(50vw - 562px)) 56px; color: #f6f1e7; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, #1b3264, #0a1430);
}
.band-cal::before {
  content: ""; position: absolute; inset: -80px; z-index: -1; background: #b68a35; opacity: .12;
  -webkit-mask: url("asanoha.svg") 0 0 / 36px 62.35px repeat; mask: url("asanoha.svg") 0 0 / 36px 62.35px repeat;
}
.band-cal h2 { color: #fbf7ef; }
.band-cal p { max-width: 44em; color: rgba(246, 241, 231, .85); }
.band-cal a:not(.button) { color: #ffd3c7; }

/* ------------------------------------------------------------------ calendar subscription (Google Calendar · iPhone/Mac · Outlook) */
.cal-box {
  position: relative; display: grid; gap: 14px; margin: 18px 0; padding: 20px 22px; border-radius: var(--radius); scroll-margin-top: calc(var(--hdr-h) + 16px);
  background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); border-top: 3px solid var(--shu);
}
.cal-box-k { margin: 0; font: 600 1.15rem/1.35 var(--serif); color: var(--ink); }
.cal-box-note { margin: 0; line-height: 1.65; }
.cal-sub { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.cal-sub > li { margin: 0; }
.cal-chip {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 999px;
  font: 650 .95rem/1.2 var(--sans); color: var(--ink); text-decoration: none; background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .2s;
}
.cal-chip::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--shu); }
.cal-chip[data-cal="apple"]::before { background: var(--ai); }
.cal-chip[data-cal="outlook"]::before { background: var(--kin); }
.cal-go { margin-left: auto; color: var(--muted); transition: transform .3s var(--spring), color .2s; }
.cal-chip:hover { color: var(--ink); transform: translateY(-2px); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--shu), 0 12px 24px -16px rgba(204, 65, 40, .6); }
.cal-chip:hover .cal-go { transform: translate(3px, -3px); color: var(--shu-text); }
.cal-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cal-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.cal-dl .button { min-height: 42px; padding: 0 18px; font-size: .9rem; }
.cal-dl .meta { flex: 1 1 200px; }
.band-cal .cal-box { margin-top: 22px; color: var(--ink); background: var(--surface); }
.band-cal .cal-box p { color: inherit; max-width: none; }
.band-cal .cal-box a.cal-chip, .band-cal .cal-box a.cal-chip:hover { color: var(--ink); }
.band-cal .cal-box .meta { color: var(--muted); }
@media (prefers-color-scheme: dark) { .cal-chip::before { background: #f08a73; } .cal-chip[data-cal="apple"]::before { background: #8fa8e0; } }
@media (max-width: 560px) {
  .cal-box { padding: 18px 16px; }
  .cal-sub { grid-template-columns: minmax(0, 1fr); }
  .cal-dl .button { flex: 1 1 100%; }
}
@media (forced-colors: active) { .cal-chip { border: 1px solid CanvasText; } }
.pg-home main { padding-bottom: 0; }
.pg-home .site-footer { margin-top: 0; }

/* ------------------------------------------------------------------ grids of cards */
.exam-grid { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.exam-grid > li {
  position: relative; margin: 0; padding: 16px 44px 16px 18px; border-radius: 18px; background: var(--surface);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.exam-grid > li > a { font: 600 1.08rem/1.3 var(--serif); color: var(--ink); text-decoration: none; display: block; }
.exam-grid > li > a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }  /* whole card is the link */
.exam-grid > li::after {
  content: "→"; position: absolute; right: 16px; top: 16px; color: var(--shu-text); font-weight: 700;
  transition: transform .35s var(--spring);
}
.exam-grid > li:hover { transform: translateY(-4px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-strong); }
.exam-grid > li:hover::after { transform: translateX(4px); }
.exam-grid > li:active { transform: translateY(-1px) scale(.985); }
.exam-grid > li:focus-within { box-shadow: var(--shadow), 0 0 0 3px var(--focus); }
.exam-grid > li > a:focus-visible { outline: 0; }
.exam-grid .mode { display: block; margin-top: 4px; font-size: .84rem; color: var(--muted); }

/* country cards */
.country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .country-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } }
.country-grid > li.cc { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; align-content: center; padding: 12px 30px 12px 12px; min-height: 84px; overflow: hidden; isolation: isolate; }
.country-grid > li.cc > * { grid-column: 2; }
.country-grid > li.cc > .cc-mono { grid-column: 1; grid-row: 1 / 4; align-self: center; margin: 0; }
.country-grid > li.cc::after { top: 50%; margin-top: -.8em; right: 12px; }
@media (max-width: 639px) {
  .country-grid > li.cc { padding-right: 10px; }
  .country-grid > li.cc::after { content: none; }
  .cc-region { letter-spacing: .06em; font-size: .6rem; }
}
.country-grid > li.cc::before {  /* region-colour wash that sweeps in on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rg) 16%, transparent), transparent 70%);
  opacity: .55; transition: opacity .4s var(--ease);
}
.country-grid > li.cc:hover::before { opacity: 1; }
.cc-mono {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 10px; border-radius: 50%;
  background: color-mix(in srgb, var(--rg) 14%, var(--surface)); color: var(--rg);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rg) 45%, transparent);
  font: 600 .95rem/1 var(--serif); letter-spacing: .04em;
  transition: transform .5s var(--spring), background .3s, color .3s;
}
.cc:hover .cc-mono { transform: rotate(-10deg) scale(1.1); background: var(--rg); color: var(--surface); }
.cc-region { display: block; font: 700 .64rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--rg); margin-bottom: 2px; }
.country-grid > li.cc > a { font-size: 1.12rem; }
.country-grid .mode { font-size: .78rem; margin-top: 1px; }
.country-grid > li.cc > a { font-size: 1.06rem; line-height: 1.2; }
.cc-off { box-shadow: inset 0 0 0 1px var(--line), inset 0 0 0 2px transparent !important; background: var(--surface-2) !important; }
.cc-off .cc-mono { filter: grayscale(1); opacity: .6; }

/* tests */
.tests-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.tests-grid > li.tc { padding: 20px 46px 22px 20px; overflow: hidden; isolation: isolate; min-height: 138px; }
.tests-grid > li.tc::before {
  content: ""; position: absolute; right: -30px; bottom: -36px; width: 160px; height: 110px; z-index: -1; background: var(--tc, var(--ai)); opacity: .14;
  -webkit-mask: url("seigaiha.svg") 0 0 / 40px 20px repeat; mask: url("seigaiha.svg") 0 0 / 40px 20px repeat;
  transition: transform .8s var(--ease), opacity .4s;
}
.tests-grid > li.tc:hover::before { transform: translateX(-20px); opacity: .28; }
.tc-jlpt { --tc: var(--shu); }
.tc-jft-basic { --tc: #1b7685; }
.tc-ssw { --tc: var(--kin); }
.tc-cat { display: block; font: 700 .66rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--shu-text); margin-bottom: 8px; }
.tests-grid > li.tc > a { font-size: 1.2rem; }

/* ------------------------------------------------------------------ world "map" of regions (flag-free) */
.world {
  position: relative; margin: 14px 0 10px; padding: 12px; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, var(--ai) 7%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--line);
}
.world::before {  /* the sea: slow seigaiha */
  content: ""; position: absolute; inset: 0 -80px; z-index: -1; background: var(--ai); opacity: .07;
  -webkit-mask: url("seigaiha.svg") 0 0 / 40px 20px repeat; mask: url("seigaiha.svg") 0 0 / 40px 20px repeat;
}
.world-grid {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 58px;
}
.wr { margin: 0; min-width: 0; }
.wr a {
  position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px;
  padding: 8px 10px; border-radius: 16px; text-decoration: none; color: var(--ink); overflow: hidden;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--rg) 30%, transparent) 1px, transparent 1.5px) 0 0 / 9px 9px,
    color-mix(in srgb, var(--rg) 10%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rg) 35%, transparent);
  transition: transform .35s var(--spring), box-shadow .3s, background-color .3s;
}
.wr a:hover { background-position: 9px 0, 0 0; transform: translateY(-3px) scale(1.02); box-shadow: inset 0 0 0 2px var(--rg), 0 12px 24px -14px var(--rg); }
.wr a:active { transform: scale(.97); }
.wr-name { font: 600 1rem/1.12 var(--serif); color: color-mix(in srgb, var(--rg) 62%, var(--ink)); text-shadow: 0 0 6px var(--surface), 0 0 2px var(--surface); }
.wr a::before { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, color-mix(in srgb, var(--surface) 85%, transparent)); z-index: -1; }
.wr a { isolation: isolate; }
.wr-n { font-size: .7rem; line-height: 1.25; color: var(--ink-2); }
/* phones: 2 columns, roughly west → east */
.wr.rg-north-america { grid-column: 1; grid-row: 1; }
.wr.rg-western-europe { grid-column: 2; grid-row: 1; }
.wr.rg-latin-america { grid-column: 1; grid-row: 2 / 4; }
.wr.rg-eastern-europe { grid-column: 2; grid-row: 2; }
.wr.rg-middle-east { grid-column: 2; grid-row: 3; }
.wr.rg-north-africa { grid-column: 1; grid-row: 4; }
.wr.rg-south-asia { grid-column: 2; grid-row: 4; }
.wr.rg-africa { grid-column: 1; grid-row: 5; }
.wr.rg-east-asia { grid-column: 2; grid-row: 5; }
.wr.rg-oceania { grid-column: 1; grid-row: 6; }
.wr.rg-southeast-asia { grid-column: 2; grid-row: 6; }
@media (min-width: 760px) {
  .world { padding: 18px; }
  .world-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 58px; gap: 8px; }
  .wr-name { font-size: 1.02rem; }
  .wr-n { font-size: .72rem; }
  .wr.rg-north-america { grid-column: 1 / 4; grid-row: 1 / 3; }
  .wr.rg-latin-america { grid-column: 2 / 5; grid-row: 3 / 7; }
  .wr.rg-western-europe { grid-column: 5 / 7; grid-row: 1 / 3; }
  .wr.rg-eastern-europe { grid-column: 7 / 9; grid-row: 1 / 3; }
  .wr.rg-north-africa { grid-column: 5 / 7; grid-row: 3; }
  .wr.rg-middle-east { grid-column: 7 / 9; grid-row: 3; }
  .wr.rg-africa { grid-column: 5 / 8; grid-row: 4 / 7; }
  .wr.rg-east-asia { grid-column: 9 / 13; grid-row: 1 / 3; }
  .wr.rg-south-asia { grid-column: 9 / 11; grid-row: 3 / 5; }
  .wr.rg-southeast-asia { grid-column: 11 / 13; grid-row: 3 / 5; }
  .wr.rg-oceania { grid-column: 10 / 13; grid-row: 5 / 7; }
}

/* ------------------------------------------------------------------ countries index: finder, A–Z, regions */
.finder { margin: 18px 0 6px; }
.finder:empty { display: none; }
.finder label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: 6px; }
.finder-box { position: relative; }
.finder-box::before {
  content: ""; position: absolute; left: 18px; top: 50%; width: 16px; height: 16px; margin-top: -10px;
  border: 2.2px solid var(--muted); border-radius: 50%;
}
.finder-box::after { content: ""; position: absolute; left: 33px; top: 50%; width: 7px; height: 2.2px; margin-top: 5px; background: var(--muted); transform: rotate(45deg); border-radius: 2px; }
.finder input {
  width: 100%; min-height: 56px; padding: 0 18px 0 50px; border-radius: 999px; border: 0; font: 500 1.05rem/1 var(--sans);
  color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--line-strong);
  transition: box-shadow .25s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.finder input:focus { outline: 0; box-shadow: var(--shadow), inset 0 0 0 2px var(--shu); }
.finder-count { font-size: .82rem; color: var(--muted); margin: 6px 0 0 18px; min-height: 1.3em; }
.finder-empty { padding: 18px; border-radius: var(--radius-sm); background: var(--surface-2); }
[hidden] { display: none !important; }
.is-filtering .world, .is-filtering #popular, .is-filtering #popular + .country-grid, .is-filtering #a-z, .is-filtering .az-jump, .is-filtering .az, .is-filtering #by-region + p { display: none; }

.az-jump {
  position: sticky; top: var(--hdr-h); z-index: 20; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 10px calc(-1 * 16px) 14px; padding: 8px 16px; background: var(--hdr-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 16px calc(100% - 16px), transparent);
  mask: linear-gradient(90deg, transparent, #000 16px calc(100% - 16px), transparent);
}
.az-jump::-webkit-scrollbar { display: none; }
.az-jump a {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink);
  font: 600 1.02rem/1 var(--serif); text-decoration: none; transition: transform .25s var(--spring), background .2s, color .2s;
}
.az-jump a:hover { background: var(--shu-solid); color: #fff; transform: translateY(-2px); }
.az-jump a:active { transform: scale(.92); }
.az { display: grid; gap: 4px 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .az { grid-template-columns: repeat(2, minmax(0, 1fr)); } .az-jump { margin-inline: 0; padding-inline: 8px; border-radius: 16px; } }
@media (min-width: 1000px) { .az { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.az-group { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--hdr-h) + 72px); }
.az-letter { margin: 0; font: 600 1.9rem/1 var(--serif); color: var(--shu-text); padding-top: 6px; }
.az-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.az-list li { margin: 0; }
.az-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem;
  transition: background .2s, color .2s, transform .25s var(--spring), box-shadow .2s;
}
.az-list a:hover { background: var(--ai); color: #fff; transform: translateY(-2px); box-shadow: none; }
@media (prefers-color-scheme: dark) { .az-list a:hover { background: #2d4b8f; } }
.region-block { scroll-margin-top: calc(var(--hdr-h) + 12px); }
.region-block h3 { display: flex; align-items: center; gap: 10px; }
.region-block h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--rg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rg) 20%, transparent); }

/* ------------------------------------------------------------------ inner pages: head band */
main { padding-bottom: 40px; }
.page-head {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 calc(50% - 50vw) 8px; padding: 18px max(16px, calc(50vw - 562px)) 30px;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border-bottom: 1px solid var(--line);
}
.page-head::before {  /* region-colour seigaiha along the bottom */
  content: ""; position: absolute; left: -80px; right: -80px; bottom: 0; height: 70px; z-index: -1; background: var(--rg); opacity: .16;
  -webkit-mask: url("seigaiha.svg") 0 0 / 56px 28px repeat-x; mask: url("seigaiha.svg") 0 0 / 56px 28px repeat-x;
  -webkit-mask-position: 0 100%; mask-position: 0 100%;
}
.page-head::after {  /* the rising sun, quietly */
  content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 40% 40%, color-mix(in srgb, var(--shu) 32%, transparent), transparent 68%);
}
.page-head-in { position: relative; max-width: 860px; }
.page-head h1 { margin-top: .15em; }
.page-head .lead { margin-bottom: 0; }
.head-mono {
  position: absolute; right: max(6px, calc(50vw - 590px)); top: 28px; z-index: -1; opacity: .8;
  font: 600 clamp(5.5rem, 3rem + 14vw, 13rem)/.8 var(--serif); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--rg) 40%, transparent);
  pointer-events: none; user-select: none;
}
@media (max-width: 759px) { .head-mono { opacity: .45; top: 60px; } }
.page-head .eyebrow { color: color-mix(in srgb, var(--rg) 75%, var(--ink)); }
.head-country, .head-city { --rg-on: 1; }

.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; font-size: .84rem; }
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--line-strong); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--shu-text); text-decoration: underline; }

/* at-a-glance stats (country) */
.stats { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; position: relative; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.stats li {
  margin: 0; padding: 14px 14px 12px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 4px;
}
.stat-num { font: 600 2.1rem/1 var(--serif); color: var(--rg); font-variant-numeric: tabular-nums; }
.stat-word { font-size: 1.15rem; line-height: 1.2; padding-top: 8px; }
.stat-label { font-size: .78rem; line-height: 1.35; color: var(--muted); }

/* city facts */
.facts { margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; position: relative; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.fact { padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); min-width: 0; }
.fact:nth-child(1), .fact:nth-child(2) { grid-column: span 2; }
@media (min-width: 760px) { .fact:nth-child(1), .fact:nth-child(2) { grid-column: auto; } }
.fact dt { font: 700 .66rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.fact dd { margin: 0; font: 600 1.06rem/1.35 var(--serif); overflow-wrap: anywhere; }
.fact dd a { color: var(--ink); }
.fact-sub { display: block; font: 500 .8rem/1.4 var(--sans); color: var(--rg); margin-top: 2px; }

/* ------------------------------------------------------------------ table of contents (wide screens) */
.toc { display: none; }
@media (min-width: 1120px) {
  main.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 230px; column-gap: 48px; }
  main.has-toc > * { grid-column: 1; }
  main.has-toc > .page-head { grid-column: 1 / -1; }
  main.has-toc > .toc { grid-column: 2; grid-row: 2 / span 400; display: block; align-self: start; position: sticky; top: calc(var(--hdr-h) + 24px); margin-top: 40px; }
  .toc-title { font: 700 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
  .toc ol { list-style: none; padding: 0 0 0 14px; margin: 0; border-left: 2px solid var(--line); }
  .toc li { margin: 0; }
  .toc a { display: block; padding: 6px 0; font-size: .88rem; line-height: 1.35; color: var(--ink-2); text-decoration: none; transition: color .2s, transform .25s var(--ease); }
  .toc a:hover { color: var(--shu-text); transform: translateX(3px); }
}

/* ------------------------------------------------------------------ schedules, tables, marks */
.sched-list { list-style: none; padding: 0; margin: 16px 0; }
.sched-list li { margin: 0 0 10px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); border-left: 4px solid var(--shu); }
.sched-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 4px; }
.sched-date { font: 600 1.3rem/1.25 var(--serif); }
.days { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--shu-soft); color: var(--bad-text); font-weight: 650; font-size: .82rem; font-variant-numeric: tabular-nums; }
.countdown-num .days, .count-card .days { background: none; padding: 0; color: inherit; font: inherit; border-radius: 0; }
.sched-what { color: var(--muted); }

.table-card { margin: 16px 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); margin: 16px 0; }
.table-card .table-scroll { margin: 0 0 10px; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
caption { text-align: left; padding: 14px 18px 10px; font: 600 1.02rem/1.35 var(--serif); color: var(--ink); }
th, td { text-align: left; vertical-align: top; padding: 12px 18px; border-top: 1px solid var(--line); }
thead th { font: 700 .7rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tbody tr { transition: background .2s; }
tbody tr:hover { background: color-mix(in srgb, var(--shu) 5%, transparent); }
td a { font-weight: 600; }
tr.next { background: color-mix(in srgb, var(--shu) 8%, transparent); }
tr.next td:first-child { box-shadow: inset 4px 0 0 var(--shu); }
tr.past { color: var(--muted); }
tr.past time { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.mark { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.mark.ok { background: var(--ok-bg); color: var(--ok-text); }
.mark.cancel { background: var(--bad-bg); color: var(--bad-text); }
.mark.none { background: var(--paper-2); color: var(--muted); }

/* stacked tables on small screens: each row becomes a card */
@media (max-width: 720px) {
  .table-scroll:has(table.stack) { background: transparent; box-shadow: none; overflow: visible; }
  table.stack, table.stack tbody, table.stack tr, table.stack td, table.stack caption { display: block; width: 100%; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  table.stack caption { padding: 0 2px 10px; }
  table.stack tr { background: var(--surface); border-radius: 18px; padding: 14px 16px; margin: 0 0 10px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
  table.stack td { border: 0; padding: 5px 0; display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 10px; align-items: baseline; }
  table.stack td::before { content: attr(data-label); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  table.stack td:first-child { display: block; font: 600 1.15rem/1.3 var(--serif); padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  table.stack td:first-child a { display: inline-flex; align-items: center; min-height: 44px; }
  table.stack td:first-child::before { content: none; }
  table.stack td > .mark { justify-self: start; }
  table.stack td[data-label="July"], table.stack td[data-label="December"] { display: inline-grid; width: 50%; grid-template-columns: minmax(0, 1fr); gap: 4px; vertical-align: top; }
  table.stack td:first-child a::after { content: " →"; color: var(--shu-text); font-family: var(--sans); }
  .timeline { background: transparent; box-shadow: none; overflow: visible; }
  .timeline table, .timeline tbody, .timeline tr, .timeline td { display: block; width: 100%; }
  .timeline thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .timeline tr { background: var(--surface); border-radius: 18px; padding: 14px 16px; margin: 0 0 10px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
  .timeline tr.next { background: color-mix(in srgb, var(--shu) 7%, var(--surface)); box-shadow: var(--shadow), inset 4px 0 0 var(--shu), inset 0 0 0 1px var(--line); }
  .timeline tr.next td:first-child { box-shadow: none; }
  .timeline td { border: 0; padding: 3px 0; }
  .timeline td:first-child { font: 600 1.2rem/1.35 var(--serif); }
  .timeline td:first-child br { display: none; }
  .timeline td:first-child .days { margin-left: 8px; font: 650 .8rem/1.4 var(--sans); vertical-align: middle; }
}

/* ------------------------------------------------------------------ lists, FAQ, guides */
.link-list { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.link-list li { margin: 0; }
.link-list a {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 40px 10px 14px; position: relative;
  border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; font-weight: 600; font-size: .93rem; line-height: 1.35;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.link-list a::after { content: "↗"; position: absolute; right: 14px; color: var(--shu-text); transition: transform .3s var(--spring); }
.link-list a[href^="../"]::after, .link-list a[href^="#"]::after { content: "→"; }
.link-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-strong); }
.link-list a:hover::after { transform: translate(3px, -2px); }

details:not(.menu) { margin: 10px 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); interpolate-size: allow-keywords; }
details:not(.menu) > summary {
  list-style: none; cursor: pointer; position: relative; display: flex; align-items: center; min-height: 56px; padding: 12px 56px 12px 18px;
  font: 600 1.02rem/1.35 var(--serif); border-radius: 16px; transition: background .2s;
}
details > summary::-webkit-details-marker { display: none; }
details:not(.menu) > summary::after {
  content: "+"; position: absolute; right: 14px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper-2); color: var(--shu-text); font: 500 1.25rem/1 var(--sans);
  transition: transform .4s var(--spring), background .2s, color .2s;
}
details:not(.menu)[open] > summary::after { transform: rotate(135deg); background: var(--shu-solid); color: #fff; }
details:not(.menu) > summary:hover { background: var(--surface-2); }
details > p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }
details:not(.menu)::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease), content-visibility .35s allow-discrete; }
details:not(.menu)[open]::details-content { block-size: auto; }

.guide { margin-top: 10px; }
.guide p { max-width: 46em; }
main > p:not(.notice), main > ul:not([class]), .band > p { max-width: 50em; }

/* ------------------------------------------------------------------ footer */
.site-footer {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 64px; padding: 58px 0 34px;
  background: linear-gradient(180deg, #0f1d40, #0a1430); color: rgba(246, 241, 231, .78); font-size: .86rem;
}
.site-footer::before {
  content: ""; position: absolute; left: -80px; right: -80px; top: 0; height: 34px; z-index: -1; background: #f6f1e7; opacity: .09;
  -webkit-mask: url("seigaiha.svg") 0 0 / 40px 20px repeat-x; mask: url("seigaiha.svg") 0 0 / 40px 20px repeat-x;
}
.site-footer a { color: #f6f1e7; }
.site-footer a:hover { color: #ff9a82; }
.site-footer .brand { color: #f6f1e7; }
.site-footer .bm-wave { stroke: #f3d9df; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(246, 241, 231, .12); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; border-radius: 10px; }
.foot-nav a:hover { background: rgba(255, 255, 255, .06); }
.disclaimer { color: #fbf7ef; font-weight: 600; max-width: 60em; }
.site-footer .brand-name { white-space: normal; }

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: no-preference) {
  /* slow pattern drift (transform only: cheap on phones) */
  body::before { animation: drift-hemp 90s linear infinite; }
  .hero-wave { animation: drift-x 26s linear infinite; }
  .hero-hemp { animation: drift-hemp 70s linear infinite reverse; }
  .hero-sun { animation: breathe 9s ease-in-out infinite; }
  .world::before { animation: drift-x 40s linear infinite; }
  .site-footer::before { animation: drift-x 30s linear infinite; }
  .page-head::before { animation: drift-x-56 34s linear infinite; }
  .band-cal::before { animation: drift-hemp 80s linear infinite; }
  .count-card::before { animation: drift-x-60 40s linear infinite; }

  /* load-in of the home hero */
  .hero-copy > * { animation: rise-in .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-copy > :nth-child(5) { animation-delay: .32s; }
  .hero > .count-card { animation: card-in 1s var(--ease) .2s both; }
  .tate { animation: fade-in 2s ease .6s both; }
  .ring-fill { animation: ring-draw 1.8s var(--ease) .35s both; transition: stroke-dashoffset 1.2s var(--ease); }
  .ring::before { animation: spin 120s linear infinite; }
  .page-head-in > * { animation: rise-in .7s var(--ease) both; }
  .page-head-in > :nth-child(2) { animation-delay: .06s; }
  .page-head-in > :nth-child(3) { animation-delay: .12s; }
  .page-head-in > :nth-child(4) { animation-delay: .18s; }
  .head-mono { animation: mono-in 1.4s var(--ease) .1s both; }
  .stats li, .fact { animation: rise-in .7s var(--ease) both; }
  .stats li:nth-child(2), .fact:nth-child(2) { animation-delay: .08s; }
  .stats li:nth-child(3), .fact:nth-child(3) { animation-delay: .16s; }
  .stats li:nth-child(4), .fact:nth-child(4) { animation-delay: .24s; }
  .bm-sun { animation: sun-rise 1.2s var(--spring) both; }

  /* scroll-driven reveals (Chrome/Edge/Android, Safari 26). Without support everything is simply visible */
  @supports (animation-timeline: view()) {
    .exam-grid > li, .wr, .steps li, .table-card, .sched-list li, .card, .legend, details:not(.menu), .az-group, .link-list li,
    main h2, .band-cal > *, .products, .notice {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
    .exam-grid > li:nth-child(3n+2), .wr:nth-child(3n+2), .steps li:nth-child(2) { animation-range: entry 6% entry 90%; }
    .exam-grid > li:nth-child(3n), .wr:nth-child(3n), .steps li:nth-child(3) { animation-range: entry 12% entry 100%; }
    main h2::before { animation: grow linear both; animation-timeline: view(); animation-range: entry 20% cover 30%; }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(34px) scale(.97); } }
@keyframes grow { from { transform: scaleX(0); transform-origin: left; } }
@keyframes card-in { from { opacity: 0; transform: translateY(30px) rotate(1.5deg) scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes ring-draw { from { stroke-dashoffset: 100; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes mono-in { from { opacity: 0; transform: translateX(40px); } }
@keyframes sun-rise { from { transform: translateY(8px); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.06) translate(-10px, 8px); } }
@keyframes drift-x { to { transform: translateX(-80px); } }
@keyframes drift-x-56 { to { transform: translateX(-56px); } }
@keyframes drift-x-60 { to { transform: translateX(-60px); } }
@keyframes drift-hemp { to { transform: translate(-48px, -83.14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .button, .dock a, .menu > summary, .az-jump a, .az-list a, .wr a { border: 1px solid CanvasText; }
  body::before, .hero-bg, .page-head::before, .head-mono { display: none; }
}
@media print {
  .site-header, .dock, .toc, .hero-bg, .tate, .finder, .az-jump, body::before { display: none !important; }
  .hero, .band-cal, .site-footer, .count-card { background: none !important; color: #000 !important; }
  .hero *, .count-card *, .band-cal * { color: #000 !important; }
}

/* Practice workbooks (Gumroad): cover · title · summary · price + CTA */
.products .wb-eyebrow { margin: 0 0 2px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--shu-text); }
.products ul.wb-list { gap: 12px; }
.products li a.wb { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; min-height: 0; padding: 12px; border-radius: 16px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: inherit; text-decoration: none;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.products li a.wb:hover, .products li a.wb:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--shu), 0 10px 24px -14px var(--shu); }
.products a.wb img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--shu-soft); }
.products .wb-body { display: grid; gap: 4px; min-width: 0; }
.products .wb-title { font-weight: 700; line-height: 1.35; }
.products .wb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.products .wb-format { justify-self: start; padding: 2px 9px; border-radius: 99px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--shu-text); box-shadow: inset 0 0 0 1px var(--line); }
/* Paperback (Amazon KDP): "Printed book" tag, per-marketplace links under the card, PDF → paperback cross link */
.products .wb-print { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--warn-text); background: var(--warn-bg); }
.products .wb-print::before { content: ""; width: 9px; height: 11px; border-radius: 2px 3px 3px 2px; border: 1.5px solid currentColor; border-left-width: 3px; box-sizing: border-box; }
.products .wb-markets, .products .wb-also { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 12px 0; font-size: .8rem; line-height: 1.4; }
.products .wb-markets { color: var(--muted); }
.products li .wb-markets a { display: inline; min-height: 0; padding: 2px 0; background: none; box-shadow: none; font-weight: 700; text-decoration: none; color: var(--link); }
.products .wb-markets a:hover, .products .wb-markets a:focus-visible, .products li a.wb-also:hover, .products li a.wb-also:focus-visible { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
.products li a.wb-also { min-height: 32px; padding: 2px 0; background: none; box-shadow: none; font-weight: 600; color: var(--link); text-decoration: none; }
.products .wb-also span { transition: transform .25s; }
.products .wb-also:hover span { transform: translateX(3px); }
.products .wb-sum { font-size: .82rem; color: var(--muted, inherit); opacity: .85; }
.products .wb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 4px; }
.products .wb-price { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.products .wb-cta { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 99px; background: var(--shu-solid); color: #fff; font-weight: 700; font-size: .85rem; }
.products a.wb:hover .wb-cta span { transform: translateX(3px); }
.products .wb-cta span { transition: transform .25s; }
@media (max-width: 420px) { .products li a.wb { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; } .products a.wb img { width: 72px; height: 72px; } }
@media (prefers-reduced-motion: reduce) { .products li a.wb, .products .wb-cta span, .products .wb-also span { transition: none; } }

/* Free samples at the top of the study-materials box */
.products .wb-free { margin: 4px 0 16px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.products .wb-free-title { margin: 0 0 8px; font-weight: 800; font-size: .95rem; }
.products ul.wb-free-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 0; }
.products li a.wb-free-item { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 56px; padding: 8px 12px;
  border-radius: 12px; background: var(--shu-soft); box-shadow: none; font-weight: 700; line-height: 1.35; transition: transform .2s, box-shadow .2s; }
.products li a.wb-free-item:hover, .products li a.wb-free-item:focus-visible { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--shu); }
.products .wb-free-kind { font-size: .75rem; font-weight: 600; color: var(--shu-text); }
@media (prefers-reduced-motion: reduce) { .products li a.wb-free-item { transition: none; } }

/* Study materials on home, /dates/ and /countdown/: two columns on wide screens, one on phones */
.products-grid { padding: 24px; }
.products-grid .meta { max-width: 52em; }
@media (min-width: 760px) {
  .products-grid ul.wb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .products-grid ul.wb-list > li { display: flex; flex-direction: column; }
  .products-grid li a.wb { flex: 1; }
}
@media (max-width: 420px) { .products-grid { padding: 18px 14px; } }
.products .wb-more { margin: 16px 0 0; }
.products .wb-more a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--link); text-decoration: none; }
.products .wb-more a span { transition: transform .25s; }
.products .wb-more a:hover, .products .wb-more a:focus-visible { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
.products .wb-more a:hover span { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .products .wb-more a span { transition: none; } }

/* Kanji pages (/kanji/): tile grid, big character with a genkō-yōshi (writing grid) guide, readings */
.kanji-grid { list-style: none; padding: 0; margin: 14px 0 26px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.kanji-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; padding: 10px 6px;
  border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none;
  transition: transform .2s, box-shadow .2s; }
.kanji-grid a:hover, .kanji-grid a:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--shu); }
.kanji-grid .kj-char { font: 500 2rem/1 var(--serif); }
.kanji-grid .kj-mean { font-size: .72rem; color: var(--muted); text-align: center; line-height: 1.25; overflow-wrap: anywhere; }
.kanji-hero { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 22px; align-items: center; margin: 22px 0 8px;
  padding: 18px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.kanji-big { position: relative; margin: 0; aspect-ratio: 1; display: grid; place-items: center; font: 500 clamp(5rem, 22vw, 8.5rem)/1 var(--serif);
  color: var(--ink); border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--shu-soft); }
.kanji-big::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(var(--shu-soft), var(--shu-soft)) center / 1px 100% no-repeat, linear-gradient(var(--shu-soft), var(--shu-soft)) center / 100% 1px no-repeat; }
.kanji-read { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; }
.kanji-read dt { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.kanji-read dd { margin: 0; font-weight: 600; }
.joyo-list { padding-left: 1.1em; }
.joyo-list li { margin: 4px 0; }
.kanji-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 26px 0; }
.kanji-nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--link); font-weight: 700; text-decoration: none; }
.kanji-nav a:hover, .kanji-nav a:focus-visible { box-shadow: inset 0 0 0 1.5px var(--link); }
@media (max-width: 560px) { .kanji-hero { grid-template-columns: 1fr; } .kanji-big { max-width: 200px; margin: 0 auto; width: 100%; } }
@media (prefers-reduced-motion: reduce) { .kanji-grid a { transition: none; } }
.band-kanji .kanji-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }  /* 12 字が 4x3 / 6x2 できれいに割れる */
@media (min-width: 640px) { .band-kanji .kanji-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.band-kanji .wb-more a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--link); text-decoration: none; }
.band-kanji .wb-more a span { transition: transform .25s; }
.band-kanji .wb-more a:hover span { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .band-kanji .wb-more a span { transition: none; } }

/* Top-of-home box: free samples + practice workbook link */
.home-start { display: grid; gap: 16px; margin: 20px 0; padding: 16px; }
@media (min-width: 820px) { .home-start { grid-template-columns: 3fr 2fr; align-items: start; } }
.home-start .hs-free, .home-start .hs-book { margin: 0; }
.home-start .hs-free-title, .home-start .hs-title { margin: 0 0 8px; font-weight: 800; font-size: .95rem; }
.home-start ul.hs-free-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.home-start a.hs-free-item { display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: 8px 12px; justify-content: center;
  border-radius: 12px; background: var(--shu-soft); color: var(--ink); font-weight: 700; line-height: 1.35; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.home-start a.hs-free-item:hover, .home-start a.hs-free-item:focus-visible { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--shu); }
@media (prefers-reduced-motion: reduce) { .home-start a.hs-free-item { transition: none; } }
/* phones: 2 columns so the box stays about half a screen tall */
@media (max-width: 559px) {
  .home-start ul.hs-free-list { grid-template-columns: 1fr 1fr; gap: 6px; }
  .home-start a.hs-free-item { min-height: 48px; padding: 6px 10px; font-size: .85rem; }
}
.home-start .hs-free-kind { font-size: .75rem; font-weight: 600; color: var(--shu-text); }
.home-start .hs-text { margin: 0 0 10px; font-size: .9rem; }
.home-start .hs-more { margin: 8px 0 0; font-size: .85rem; }

/* Working in Japan (/work/): stat tiles with long numbers, in-article study-material pick, numbered sources */
.work-stats .stat-num { font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2.1rem); }
.work-sec table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.work-sec h3 { margin-top: 1.4em; }
.work-pick { border-left: 4px solid var(--shu); }
.work-pick .pick-head { margin: 0 0 4px; font: 600 1.18rem/1.35 var(--serif); }
.products ul.pick-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; margin: 12px 0 0; }
.products li a.pick { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; height: 100%; padding: 12px 14px;
  border-radius: 14px; color: inherit; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.products li a.pick:hover, .products li a.pick:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--shu), 0 10px 24px -14px var(--shu); }
.pick-title { font-weight: 700; line-height: 1.35; }
.pick-kind { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pick-go { font-size: .84rem; font-weight: 700; color: var(--shu-text); }
.pick-go span { display: inline-block; transition: transform .25s; }
a.pick:hover .pick-go span { transform: translateX(3px); }
ol.sources { padding-left: 1.4em; font-size: .88rem; line-height: 1.55; color: var(--ink-2); max-width: 54em; }
ol.sources li { margin: 0 0 .6em; padding-left: .2em; }
ol.sources li::marker { color: var(--shu-text); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .products li a.pick, .pick-go span { transition: none; } }
