/* ============================================================
   Clay Weekends — Roland-Garros inspired static site
   Palette: clay #DA5A2A / court green #00736A / cream #F5F1E8
   Display: Playfair Display + Noto Serif SC (falls back to a
   Song-style serif for Chinese headlines). Body: Barlow + Noto
   Sans SC. Layout motif: fixture lists, court lines, bracket
   corners. One orchestrated motion moment: the hero ball.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;0,900;1,600&family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Noto+Serif+SC:wght@700;900&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
  /* palette */
  --clay: #DA5A2A;
  --clay-deep: #B4491F;
  --clay-soft: #F0DDD2;
  --court: #00736A;
  --court-deep: #005149;
  --court-night: #02463F;
  --cream: #F5F1E8;
  --cream-deep: #E7DFCC;
  --ink: #221F1B;
  --ink-soft: #56504A;
  --optic: #CFE14B;
  --white: #FFFFFF;
  --focus: var(--clay-deep);
  --hairline: rgba(34, 31, 27, 0.18);

  /* type */
  --display: 'Playfair Display', 'Noto Serif SC', 'STSong', 'SimSun', serif;
  --sans: 'Barlow', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* layout */
  --wrap: 1120px;
  --radius: 4px;
  --shadow: 0 14px 40px -18px rgba(2, 70, 63, 0.45);
}

/* ---------- reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.18; margin: 0; }

p { margin: 0 0 1em; }

a { color: var(--clay-deep); }

::selection { background: var(--clay); color: var(--white); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

main { display: block; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.on-dark { --focus: var(--optic); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 60;
  background: var(--clay);
  color: var(--white);
  padding: 10px 18px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--court-deep);
  color: var(--cream);
  border-bottom: 3px solid var(--clay);
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--clay);
  display: grid;
  place-items: center;
  flex: none;
}

.brand-ball {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--optic);
  position: relative;
}
.brand-ball::before,
.brand-ball::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 11px;
  border-radius: 2px;
  background: var(--court-night);
  top: 2px;
}
.brand-ball::before { left: 2px; transform: rotate(24deg); }
.brand-ball::after { right: 2px; transform: rotate(-24deg); }

.brand-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.mainnav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.mainnav a {
  display: inline-block;
  color: rgba(245, 241, 232, 0.82);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  padding: 8px 11px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.mainnav a:hover { color: var(--white); border-color: rgba(218, 90, 42, 0.55); }

.mainnav a[aria-current="page"] {
  color: var(--white);
  border-color: var(--clay);
}

.lang-toggle {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(245, 241, 232, 0.45);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lang-toggle:hover { background: rgba(245, 241, 232, 0.12); border-color: rgba(245, 241, 232, 0.8); }
.lang-sep { opacity: 0.55; }

/* the secondary anchor row, index page only (hidden by default) */
.topnav-sub {
  display: none;
  background: var(--court-night);
}
[data-nav="home"] .topnav-sub { display: block; }
.topnav-sub ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.topnav-sub a {
  display: inline-block;
  color: rgba(245, 241, 232, 0.72);
  font-size: 0.88rem;
  text-decoration: none;
  padding: 7px 2px;
  border-bottom: 2px solid transparent;
}
.topnav-sub a:hover { color: var(--white); }
.topnav-sub a.is-active { color: var(--optic); border-color: var(--optic); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 28px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--clay-deep);
  color: var(--white);
}
.btn-solid:hover { background: #9E3F19; }

.btn-line {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.btn-line:hover { background: rgba(218, 90, 42, 0.12); border-color: var(--clay); color: var(--clay-deep); }

.on-dark .btn-line:hover { background: rgba(245, 241, 232, 0.12); border-color: var(--cream); color: var(--cream); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--sm { padding: 9px 18px; font-size: 0.92rem; }

/* ---------- hero (index) ---------- */

.hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(218, 90, 42, 0.28), transparent 62%),
    radial-gradient(900px 520px at -12% 108%, rgba(2, 70, 63, 0.65), transparent 60%),
    var(--court);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.hero::after {
  /* the singles sideline, sweeping through */
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(245, 241, 232, 0.16);
  transform: translateX(-50%) rotate(14deg);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 30px;
  padding-top: 64px;
  padding-bottom: 72px;
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: 7fr 5fr; align-items: center; padding-top: 84px; padding-bottom: 96px; }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(245, 241, 232, 0.85);
  margin: 0 0 18px;
}
.kicker::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--clay);
  flex: none;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.35rem);
  font-weight: 900;
  color: var(--clay);
  text-shadow: 0 2px 0 rgba(2, 70, 63, 0.35);
  margin-bottom: 20px;
}
.hero h1 .en-serif { font-style: italic; }

.hero-lead {
  max-width: 34em;
  font-size: 1.08rem;
  color: rgba(245, 241, 232, 0.92);
  margin-bottom: 26px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  font-size: 0.92rem;
}
.hero-facts div {
  padding: 2px 18px 2px 0;
  margin-right: 18px;
  border-right: 1px solid rgba(245, 241, 232, 0.28);
}
.hero-facts div:last-child { border-right: 0; }

.hero-orb { justify-self: center; width: min(100%, 430px); }
.hero-orb svg { width: 100%; height: auto; }

.orb-ball { animation: bounce 3.4s cubic-bezier(0.5, 0, 0.5, 1) infinite; transform-origin: center; }

@keyframes bounce {
  0%   { transform: translateY(-52px); }
  42%  { transform: translateY(148px) scaleY(1); }
  46%  { transform: translateY(158px) scaleY(0.72) scaleX(1.18); }
  50%  { transform: translateY(158px) scaleY(0.72) scaleX(1.18); }
  54%  { transform: translateY(148px) scaleY(1) scaleX(1); }
  100% { transform: translateY(-52px); }
}

/* ---------- mini hero (subpages) ---------- */

.mini-hero {
  background:
    radial-gradient(900px 380px at 90% -20%, rgba(218, 90, 42, 0.26), transparent 60%),
    var(--court);
  color: var(--cream);
  padding: 58px 0 54px;
}
.mini-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 900;
  color: var(--clay);
  text-shadow: 0 2px 0 rgba(2, 70, 63, 0.35);
  margin-bottom: 14px;
}
.mini-hero .hero-lead { font-size: 1.03rem; margin-bottom: 0; max-width: 38em; }
.mini-hero .hero-facts { margin-top: 22px; }

/* ---------- sections ---------- */

.sec { padding: 64px 0; }
.sec--tight { padding: 44px 0; }
.sec--alt { background: var(--cream-deep); }

.sec-head { max-width: 44em; margin-bottom: 34px; }

.sec-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--clay-deep);
  font-weight: 600;
  font-size: 0.93rem;
  margin: 0 0 10px;
}
.sec-kicker::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--clay);
  flex: none;
}

.sec h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--ink); }

.sec-sub { color: var(--ink-soft); margin-top: 10px; margin-bottom: 0; }

.on-court {
  background: var(--court);
  color: var(--cream);
}
.on-court h2 { color: var(--cream); }
.on-court .sec-kicker { color: var(--optic); }
.on-court .sec-sub { color: rgba(245, 241, 232, 0.8); }

/* ---------- fixture list (events) ---------- */

.fixtures { border-top: 2px solid var(--ink); }

.fixture {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 26px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
@media (min-width: 700px) {
  .fixture { grid-template-columns: 118px 1fr auto; align-items: center; }
}

.fixture-date {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.fixture-date .dd { font-size: 1.9rem; font-family: var(--display); font-weight: 800; display: block; }
.fixture-date .dm { color: var(--ink-soft); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.04em; }

.fixture-main h3 { font-size: 1.22rem; margin-bottom: 6px; }
.fixture-main h3 a { color: inherit; text-decoration: none; }
.fixture-main h3 a:hover { color: var(--clay-deep); }

.fixture-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}
.fixture-meta .chip {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.fixture-meta .chip--level { border-color: var(--court); color: var(--court-deep); }
.fixture-meta .chip--left { border-style: dashed; }

.fixture-note { color: var(--ink-soft); font-size: 0.93rem; margin: 8px 0 0; max-width: 40em; }

.fixture-side { text-align: left; }
@media (min-width: 700px) { .fixture-side { text-align: right; } }

.fixture-price {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--clay-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.fixture-price small { font-family: var(--sans); font-weight: 500; font-size: 0.8rem; color: var(--ink-soft); }
.fixture-side .btn { margin-top: 12px; }

/* ---------- upload slots & forms ---------- */

.panel { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius); }

.slots { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .slots { grid-template-columns: repeat(3, 1fr); } }

.slot {
  position: relative;
  background: var(--cream-deep);
  padding: 24px 20px 20px;
  border-radius: var(--radius);
}
/* corner brackets — the court-line motif */
.slot::before, .slot::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 0 solid var(--court);
}
.slot::before { top: 9px; left: 9px; border-top-width: 2px; border-left-width: 2px; }
.slot::after { bottom: 9px; right: 9px; border-bottom-width: 2px; border-right-width: 2px; }

.slot h3 { font-size: 1.12rem; margin-bottom: 2px; }
.slot .slot-en { display: block; font-family: var(--sans); font-weight: 500; font-size: 0.8rem; color: var(--clay-deep); margin-bottom: 10px; }
.slot p { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 14px; }

.slot-file {
  display: inline-block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--court-deep);
  border: 1.5px solid var(--court);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.slot-file:hover { background: var(--court); color: var(--cream); }
.slot-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.slot-file:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

.slot-name { display: block; margin-top: 10px; font-size: 0.85rem; color: var(--ink-soft); min-height: 1.4em; word-break: break-all; }
.slot.is-set .slot-name { color: var(--court-deep); font-weight: 600; }
.slot.is-set .slot-file { background: var(--court); color: var(--cream); }

.eval-form-foot {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.eval-hint { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }

/* generic form fields (register page) */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.94rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--court);
  box-shadow: 0 0 0 3px rgba(0, 115, 106, 0.18);
}
.field-row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }

.form-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 4px solid var(--clay);
  border-radius: var(--radius);
  padding: 30px 28px;
  max-width: 640px;
  box-shadow: var(--shadow);
}
.form-card h2 { font-size: 1.5rem; margin-bottom: 18px; }

.event-pick {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--cream-deep);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.event-pick h3 { font-size: 1.05rem; margin-bottom: 4px; }
.event-pick p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.event-pick .fixture-price { font-size: 1.2rem; }

/* ---------- leaderboard ---------- */

.board-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--hairline); }
.board-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--cream);
  background: var(--court-deep);
  padding: 12px 14px;
  white-space: nowrap;
}
.board-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.97rem;
  vertical-align: middle;
}
.board-table tr:last-child td { border-bottom: 0; }
.board-table .num { font-variant-numeric: tabular-nums; font-weight: 700; }

.rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--hairline); font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
tr:nth-child(1) .rank { background: var(--clay); border-color: var(--clay); color: var(--white); }
tr:nth-child(2) .rank { background: var(--clay-soft); border-color: var(--clay); color: var(--clay-deep); }
tr:nth-child(3) .rank { background: var(--cream-deep); border-color: var(--ink-soft); }

.ntrp-pill {
  display: inline-block;
  border: 1.5px solid var(--court);
  color: var(--court-deep);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.board-note { color: var(--ink-soft); font-size: 0.9rem; margin-top: 12px; }

/* ---------- result card ---------- */

.result {
  margin-top: 30px;
  border: 1px solid var(--hairline);
  border-top: 4px solid var(--clay);
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: none;
}
.result.show { display: block; }

.result-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; margin-bottom: 20px; }
.result-score { font-family: var(--display); font-weight: 900; font-size: 3.4rem; line-height: 1; color: var(--clay-deep); font-variant-numeric: tabular-nums; }
.result-score small { display: block; font-family: var(--sans); font-weight: 500; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px; }
.result-ntrp { font-size: 1.05rem; color: var(--ink-soft); margin: 0; }
.result-ntrp b { color: var(--court-deep); font-size: 1.5rem; font-family: var(--display); }

.bar-track { height: 10px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; margin: 10px 0 26px; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--court), var(--clay)); border-radius: 999px; transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1); }

.coach-quote {
  border-left: 4px solid var(--court);
  background: var(--cream);
  padding: 16px 20px;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 10px;
}
.coach-quote figcaption, .coach-cite { font-family: var(--sans); font-style: normal; font-size: 0.85rem; color: var(--ink-soft); margin-top: 8px; }

/* ---------- plans ---------- */

.plans { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; align-items: stretch; } }

.plan {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
.plan--pro {
  background: var(--court-deep);
  color: var(--cream);
  border-color: var(--court-deep);
  box-shadow: var(--shadow);
}
.plan--pro h3, .plan--pro .plan-price { color: var(--cream); }
.plan--pro .plan-note { color: rgba(245, 241, 232, 0.8); }

.plan h3 { font-size: 1.3rem; margin-bottom: 4px; }
.plan-tag { display: inline-block; background: var(--optic); color: var(--court-night); font-size: 0.75rem; font-weight: 700; border-radius: 2px; padding: 2px 8px; margin-bottom: 12px; }
.plan-price { font-family: var(--display); font-weight: 800; font-size: 2.1rem; color: var(--clay-deep); font-variant-numeric: tabular-nums; }
.plan-price small { font-family: var(--sans); font-weight: 500; font-size: 0.85rem; color: var(--ink-soft); }
.plan--pro .plan-price small { color: rgba(245, 241, 232, 0.75); }
.plan-note { color: var(--ink-soft); font-size: 0.92rem; margin: 6px 0 18px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.plan li { padding: 9px 0 9px 26px; border-bottom: 1px solid var(--hairline); font-size: 0.95rem; position: relative; }
.plan--pro li { border-color: rgba(245, 241, 232, 0.18); }
.plan li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clay);
}
.plan--pro li::before { background: var(--optic); }

/* ---------- coach tips ---------- */

.tips { display: grid; gap: 12px; max-width: 780px; }

.tip {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.tip summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 54px 18px 20px;
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
}
.tip summary::-webkit-details-marker { display: none; }
.tip summary::after {
  content: '';
  position: absolute;
  right: 22px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--clay);
  border-bottom: 2.5px solid var(--clay);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.tip[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.tip summary:hover { color: var(--clay-deep); }
.tip-answer { padding: 0 20px 20px; color: var(--ink-soft); }

/* ---------- blog ---------- */

.story-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 780px) { .story-grid { grid-template-columns: 1fr 1fr; } }

.story {
  display: block;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.story:hover { border-color: var(--clay); }
.story:hover .story-title { color: var(--clay-deep); }

.story-cover { aspect-ratio: 16 / 9; overflow: hidden; }
.story-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.story:hover .story-cover img { transform: scale(1.03); }

.story-body { padding: 22px 24px 24px; }
.story-title { font-size: 1.3rem; margin-bottom: 8px; transition: color 0.15s ease; }
.story-excerpt { color: var(--ink-soft); font-size: 0.96rem; margin-bottom: 14px; }

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.story-meta span { white-space: nowrap; }

.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--court-deep);
  border: 1px solid var(--court);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---------- article page ---------- */

.article-head { max-width: 760px; padding-top: 52px; }
.article-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); margin-bottom: 16px; }
.article-tags { margin: 0 0 14px; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 28px;
}

.article-cover { max-width: 980px; margin-bottom: 34px; }
.article-cover img { border-radius: var(--radius); }

.prose { max-width: 720px; font-size: 1.04rem; }
.prose p { line-height: 1.9; }
.prose > p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 800;
  font-size: 3.1em;
  float: left;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--clay);
}
.prose h2 {
  font-size: 1.5rem;
  margin: 2em 0 0.7em;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(218, 90, 42, 0.35);
}
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--clay); }

.backlink { display: inline-block; font-weight: 600; font-size: 0.94rem; text-decoration: none; margin-bottom: 18px; }
.backlink:hover { text-decoration: underline; }

/* affiliate block */
.affil {
  border: 1px solid var(--hairline);
  border-left: 5px solid var(--clay);
  background: var(--cream);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 30px 0;
}
.affil-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.affil-label { font-weight: 600; font-size: 0.92rem; }
.affil-tag {
  background: var(--clay);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 2px;
  padding: 2px 8px;
  letter-spacing: 0.03em;
}
.affil-name { font-family: var(--display); font-weight: 700; font-size: 1.12rem; margin-bottom: 2px; }
.affil-price { font-weight: 700; color: var(--clay-deep); font-variant-numeric: tabular-nums; }
.affil-vendor { color: var(--ink-soft); font-size: 0.88rem; }
.affil-note { color: var(--ink-soft); font-size: 0.82rem; font-style: italic; margin: 8px 0 14px; }

/* callout */
.callout {
  border-left: 4px solid var(--court);
  background: var(--cream-deep);
  padding: 16px 20px;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 28px 0;
}

/* score strip (vacation article timeline) */
.score-strip { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 26px 0; }
.score-strip .seg { flex: 1 1 190px; border-top: 3px solid var(--court); padding-top: 8px; font-size: 0.95rem; }
.score-strip .seg b { display: block; font-variant-numeric: tabular-nums; color: var(--court-deep); margin-bottom: 2px; }

/* ---------- status panels (success / 404) ---------- */

.status-panel {
  max-width: 680px;
  margin: 64px auto;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 5px solid var(--clay);
  border-radius: var(--radius);
  padding: 56px 36px;
  text-align: center;
  box-shadow: var(--shadow);
}
.status-panel h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 14px; }
.status-panel p { color: var(--ink-soft); max-width: 34em; margin-left: auto; margin-right: auto; }
.status-panel .btn { margin-top: 14px; }
.status-badge {
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--court);
  display: grid;
  place-items: center;
}
.status-badge::before {
  content: '';
  width: 34px;
  height: 20px;
  border-left: 5px solid var(--optic);
  border-bottom: 5px solid var(--optic);
  transform: rotate(-45deg) translate(1px, -3px);
}
.status-panel--404 .status-badge { background: var(--clay); }
.status-panel--404 .status-badge::before {
  width: 20px;
  height: 20px;
  border: 0;
  background: var(--cream);
  border-radius: 50%;
  transform: none;
}
.status-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* ---------- demo ribbon ---------- */

.demo-note {
  background: var(--optic);
  color: var(--court-night);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  padding: 8px 16px;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--court-deep);
  color: var(--cream);
  margin-top: 72px;
  border-top: 3px solid var(--clay);
  padding: 52px 0 0;
}
.foot-grid { display: grid; gap: 36px; grid-template-columns: 1fr; padding-bottom: 36px; }
@media (min-width: 700px) { .foot-grid { grid-template-columns: 2fr 1fr; } }

.foot-name { font-family: var(--display); font-weight: 800; font-size: 1.35rem; margin-bottom: 8px; }
.foot-blurb { color: rgba(245, 241, 232, 0.78); font-size: 0.94rem; max-width: 34em; margin: 0; }
.foot-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; }
.foot-nav a { color: rgba(245, 241, 232, 0.8); text-decoration: none; display: inline-block; padding: 4px 0; font-size: 0.94rem; }
.foot-nav a:hover { color: var(--optic); }

.foot-legal { border-top: 1px solid rgba(245, 241, 232, 0.2); padding-top: 16px; padding-bottom: 22px; }
.foot-legal p { margin: 0; font-size: 0.84rem; color: rgba(245, 241, 232, 0.6); }

/* ---------- language visibility ---------- */

.serif-zh { display: inline; }
.en-serif { display: none; }
.lang-en .serif-zh { display: none; }
.lang-en .en-serif { display: inline; }

/* English runs slightly larger because Playfair reads small next to Noto Serif SC */
.lang-en body { font-size: 17.5px; }
.lang-en .hero h1 { font-size: clamp(2.7rem, 7vw, 4.9rem); }
.lang-en .mini-hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.3rem); }
.lang-en .prose { font-size: 1.06rem; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb-ball { animation: none; }
  .bar-fill { transition: none; }
  .story-cover img, .story, .btn, .tip summary::after { transition: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 699px) {
  body { font-size: 16px; }
  .topbar-row { gap: 10px 14px; padding-top: 8px; padding-bottom: 8px; }
  .brand-word { font-size: 1.1rem; }
  .mainnav ul { gap: 0; }
  .mainnav a { padding: 7px 8px; font-size: 0.92rem; }
  .hero-grid { padding-top: 46px; padding-bottom: 56px; }
  .sec { padding: 48px 0; }
  .result-score { font-size: 2.8rem; }
  .board-table { display: block; overflow-x: auto; white-space: nowrap; }
  .status-panel { margin: 40px auto; padding: 44px 22px; }
  .slot { padding: 22px 18px 18px; }
  .slot-file { padding: 9px 14px; }
}
