:root {
  --background:#fcfdfc; --primary:#233731; --text:#3e514b; --muted:#6b7c75;
  --surface:#f5f7f5; --card:#fff; --line:#e5ebe7; --grid:#eaf0ec;
  --accent:#387f6b; --green:#387f6b; --green-soft:#eaf3ee;
  --blue:#6b85b2; --blue-soft:#eef2f9; --gold:#b89154; --gold-soft:#f6f1e7;
  --orange:#ba7b69; --focus:#387f6b; --chart-color:var(--green);
  --shadow:0 3px 16px #203c2e04;
  color-scheme:light;
}
.dark {
  --background:#131c19; --primary:#e9f0ec; --text:#c2d0c8; --muted:#9baea3;
  --surface:#1d2822; --card:#18231e; --line:#2b3d32; --grid:#2a3a31;
  --accent:#8ac6ac; --green:#8ac6ac; --green-soft:#243d31;
  --blue:#9fb7df; --blue-soft:#273447; --gold:#d3b175; --gold-soft:#393327;
  --orange:#d99b85; --focus:#8ac6ac; --shadow:none;
  color-scheme:dark;
}
*{box-sizing:border-box}
body{margin:0;background:var(--background);color:var(--text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;cursor:pointer}
button:focus-visible,a:focus-visible,summary:focus-visible,circle:focus-visible{outline:2px solid var(--focus);outline-offset:4px}
button:disabled{cursor:wait}
h1,h2{font-family:Georgia,"Times New Roman",serif;color:var(--primary);line-height:1.25}
h1{font-size:40px;margin:0 0 12px;letter-spacing:-.8px}
h2{font-size:25px;margin:0;letter-spacing:-.35px}
h3{font-size:15px;color:var(--primary);margin:0 0 24px;font-weight:600}
p{margin:0}
[hidden]{display:none!important}
.site-nav{border-bottom:1px solid var(--line);background:var(--card)}
.nav-inner{max-width:1216px;margin:auto;padding:20px 32px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.site-name{font-family:Georgia,"Times New Roman",serif;font-size:24px;font-weight:700;color:var(--primary)}
.nav-actions{display:flex;align-items:center;gap:22px;font-size:13px}
.nav-actions a:hover,.breadcrumb a:hover,.back-link:hover{color:var(--accent)}
.icon-button{display:grid;place-items:center;border:0;background:none;border-radius:8px;padding:8px}
.icon-button:hover{background:var(--surface)}
.learning-page{max-width:1088px;padding:48px 32px 20px;margin:auto}
.page-heading{margin-bottom:38px}
.breadcrumb{display:flex;gap:12px;font-size:12px;color:var(--muted);margin-bottom:20px}
.intro{font-size:16px;color:var(--muted)}
.sync-status{display:inline-flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);margin-top:17px}
.sync-status::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px var(--green-soft)}
.sync-status.is-stale::before{background:var(--gold);box-shadow:0 0 0 3px var(--gold-soft)}
section{margin-bottom:40px}
.section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:18px}
.section-note,.muted{color:var(--muted);font-size:12px}
.section-note{margin-top:6px}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.metric{--metric-color:var(--green);--metric-soft:var(--green-soft);border:1px solid var(--line);border-radius:12px;background:var(--card);padding:19px 20px 20px;display:flex;flex-direction:column;gap:5px;box-shadow:var(--shadow)}
.metric[data-tone="blue"]{--metric-color:var(--blue);--metric-soft:var(--blue-soft)}
.metric[data-tone="gold"]{--metric-color:var(--gold);--metric-soft:var(--gold-soft)}
.metric-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.metric p{font-size:12px;color:var(--muted)}
.metric-icon{flex:none;width:26px;height:26px;padding:5px;border-radius:8px;background:var(--metric-soft);fill:none;stroke:var(--metric-color);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.metric strong{font-size:30px;line-height:1.25;font-weight:600;letter-spacing:-1px;color:var(--primary);font-variant-numeric:tabular-nums}
.metric[data-tone="green"] strong{color:var(--green)}
.metric>span{font-size:11px;color:var(--muted);line-height:1.55}
.progress-track{height:3px;border-radius:3px;background:var(--green-soft);overflow:hidden;margin-top:9px}
.progress-track span{display:block;width:0;height:100%;border-radius:3px;background:var(--green)}
.period-badge{font-size:11px;border:1px solid var(--line);border-radius:20px;padding:4px 11px;color:var(--muted);white-space:nowrap}
.chart-card{--chart-color:var(--green);border:1px solid var(--line);border-radius:14px;padding:25px 27px 0;background:var(--card);box-shadow:var(--shadow)}
.chart-card[data-view="time"]{--chart-color:var(--blue)}
.chart-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:12px}
.chart-key{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.key-dot{height:6px;width:6px;border-radius:50%;background:var(--chart-color)}
.chart-readout{display:flex;align-items:baseline;gap:9px;margin-top:6px}
.chart-readout strong{font-size:35px;line-height:1.3;letter-spacing:-1.2px;font-weight:600;color:var(--primary);font-variant-numeric:tabular-nums}
.chart-readout>span{font-size:12px;color:var(--muted)}
.chart-latest-date{font-size:11px;color:var(--muted);margin-top:1px}
.segmented{display:flex;gap:3px;padding:4px;border-radius:9px;background:var(--surface)}
.segmented button{border:0;background:none;border-radius:6px;padding:7px 14px;font-size:12px;white-space:nowrap;color:var(--muted)}
.segmented button[aria-pressed="true"]{background:var(--card);color:var(--chart-color);box-shadow:0 1px 4px #203c2e14;font-weight:600}
.trend-chart{width:100%;min-height:260px;position:relative}
.trend-chart svg{display:block;width:100%;overflow:visible}
.chart-grid{stroke:var(--grid);stroke-width:1;stroke-dasharray:2 6}
.chart-axis{fill:var(--muted);font-size:11px}
.chart-axis-latest{fill:var(--chart-color);font-weight:600}
.chart-path{stroke:var(--chart-color);fill:none;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}
.chart-area{fill:var(--chart-color);fill-opacity:.065}
.chart-dot{fill:var(--card);stroke:var(--chart-color);stroke-width:2;pointer-events:none}
.chart-dot-latest{fill:var(--chart-color);stroke:var(--card);stroke-width:2.5}
.chart-halo{fill:var(--chart-color);fill-opacity:.12;pointer-events:none}
.chart-guide{stroke:var(--chart-color);stroke-opacity:.23;stroke-dasharray:4 5;pointer-events:none}
.chart-hit{fill:transparent;stroke:none;cursor:crosshair}
.chart-hit:focus-visible{outline:none;stroke:var(--chart-color);stroke-width:1.5}
.chart-tooltip{position:absolute;z-index:3;pointer-events:none;min-width:155px;max-width:190px;padding:11px 13px;border:1px solid var(--line);border-radius:10px;background:var(--card);box-shadow:0 5px 22px #162f2512;color:var(--primary);font-size:12px;line-height:1.5}
.chart-tooltip-date{font-size:10px;color:var(--muted);margin-bottom:5px}
.chart-tooltip-value{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.chart-tooltip-caption{font-size:10px;color:var(--muted);margin-top:5px}
.chart-start{position:absolute;left:55px;top:87px;max-width:220px;color:var(--muted);pointer-events:none}
.chart-start strong{display:block;font-size:13px;color:var(--text);font-weight:500;margin-bottom:5px}
.chart-start p{font-size:11px;line-height:1.7;max-width:205px}
.chart-footer{display:flex;align-items:center;gap:8px;padding:16px 0 18px;border-top:1px solid var(--line);margin-top:9px}
.coverage-mark{width:6px;height:6px;border-radius:50%;background:var(--chart-color);flex:none}
.chart-note{font-size:11px;color:var(--muted);line-height:1.7}
.records-details{margin-top:13px;color:var(--muted);font-size:12px}
.records-details summary{cursor:pointer;display:list-item;width:fit-content}
.table-scroll{overflow-x:auto;margin-top:12px}
table{border-collapse:collapse;width:100%;min-width:450px;font-size:12px;text-align:right}
th,td{border-bottom:1px solid var(--line);padding:12px 10px;font-variant-numeric:tabular-nums}
th:first-child,td:first-child{text-align:left}
th{font-weight:500;color:var(--primary)}
.breakdown-note{margin-top:-10px;margin-bottom:20px}
.breakdown-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.breakdown-card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:23px 24px;box-shadow:var(--shadow)}
.breakdown-row{margin-top:19px}
.row-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;margin-bottom:8px}
.row-label>span{display:flex;align-items:center;gap:8px}
.row-swatch{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--bar-color);flex:none}
.row-label strong{font-weight:500;font-variant-numeric:tabular-nums;color:var(--primary)}
.row-percent{font-size:10px;color:var(--muted);font-weight:400;margin-left:10px}
.bar-track{height:6px;background:var(--surface);border-radius:6px;overflow:hidden}
.bar-fill{display:block;height:100%;border-radius:6px;background:var(--bar-color,var(--green))}
.notice{padding:13px 16px;border:1px solid var(--line);border-radius:10px;font-size:13px;color:var(--muted);background:var(--surface);margin-bottom:20px}
.page-return{border-top:1px solid var(--line);padding-top:8px;margin-bottom:32px}
.back-link{display:inline-flex;gap:8px;font-size:13px;margin-top:20px}
footer{border-top:1px solid var(--line);padding:25px;text-align:center;font-size:11px;color:var(--muted)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){
  .nav-inner{padding:16px 20px}.site-name{font-size:21px}.nav-actions{gap:10px}.nav-actions a{font-size:12px}
  .learning-page{padding:30px 20px 10px}h1{font-size:33px}h2{font-size:23px}.page-heading{margin-bottom:30px}
  .metric-grid{grid-template-columns:1fr 1fr;gap:10px}.metric{padding:15px}.metric-heading{gap:5px;margin-bottom:7px}
  .metric strong{font-size:27px}.metric p{font-size:11px}.metric-icon{width:23px;height:23px;padding:4px}
  .wrap-heading{align-items:center}.period-badge{font-size:10px;padding:3px 9px}.chart-card{padding:20px 15px 0}
  .chart-card-heading{gap:10px;margin-bottom:8px}.chart-key{font-size:11px;gap:5px}.chart-readout strong{font-size:29px}
  .segmented{padding:3px;gap:1px}.segmented button{padding:6px 9px;font-size:11px}.chart-latest-date{font-size:10px}
  .chart-start{left:43px;top:109px;max-width:158px}.chart-start strong{font-size:12px}.chart-start p{font-size:10px}
  .chart-tooltip{min-width:145px;max-width:165px}.chart-footer{align-items:flex-start;padding:13px 0 15px}.coverage-mark{margin-top:6px}
  .breakdown-grid{grid-template-columns:1fr}.breakdown-card{padding:20px}.section-heading .muted{max-width:45%;text-align:right}
  section{margin-bottom:34px}
}
@media(max-width:360px){.chart-card-heading{flex-wrap:wrap}.chart-start{max-width:140px}.metric-heading{align-items:flex-start}.metric-icon{width:20px;height:20px}}
@media(prefers-reduced-motion:no-preference){.bar-fill,.progress-track span{transition:width .3s ease}.segmented button{transition:background .2s,color .2s}}


/* =====================================================================
   Homepage look (Nov 2026) — slate + gold, matching index.html.
   Delete from here to the end of the file to restore the green theme.
   ===================================================================== */
:root {
  --background:#fefffe; --primary:#1e293b; --text:#334155; --muted:#5b6b80;
  --surface:#f1f5f9; --card:#fff; --line:#e2e8f0; --grid:#e8edf3;
  --accent:#8a6420; --focus:#b8914d;
  --green:#8f6524; --green-soft:#fbf4e6;      /* main series: completed words, review, well known */
  --blue:#56739f; --blue-soft:#eef2f8;        /* study time, new words, remembered */
  --gold:#d1ad6b; --gold-soft:#fbf4e6;        /* uncertain */
  --orange:#b9715d;                           /* forgotten */
  --gold-dot:#c49a55; --gold-line:#ecd6ae; --slate:#475569; --slate-soft:#f1f5f9;
  --ok:#2f8a66; --ok-soft:#e3f3ec;
  --shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px -12px rgba(15,23,42,.12);
  --ease-out:cubic-bezier(.22,1,.36,1); --ease-pop:cubic-bezier(.34,1.56,.64,1);
}
.dark {
  --background:#0f172a; --primary:#f8fafc; --text:#cbd5e1; --muted:#94a3b8;
  --surface:#1e293b; --card:#141f35; --line:#263349; --grid:#223047;
  --accent:#f0c674; --focus:#e4b976;
  --green:#e4b976; --green-soft:#2b2518;
  --blue:#9fb7df; --blue-soft:#1f2b40;
  --gold:#a8843f; --gold-soft:#2b2518;
  --orange:#e0a08a;
  --gold-dot:#e4b976; --gold-line:#6b5530; --slate:#cbd5e1; --slate-soft:#1e293b;
  --ok:#6fcf9f; --ok-soft:#173327;
  --shadow:0 1px 2px rgba(0,0,0,.2),0 8px 24px -12px rgba(0,0,0,.45);
}

/* Navigation */
.site-nav{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--card) 86%,transparent);-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px)}
.site-name:hover{color:var(--accent)}
.nav-actions>a{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:5px 14px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--accent);font-size:12.5px;font-weight:600;transition:border-color .2s,background-color .2s}
.nav-actions>a:hover{border-color:var(--gold-line);background:var(--green-soft);color:var(--accent)}
.icon-button{width:40px;height:40px;padding:0;border-radius:999px}

/* Page heading */
.breadcrumb a{color:var(--accent);font-weight:500}
h1{font-size:44px;letter-spacing:-.02em}
.sync-status{padding:5px 12px 5px 10px;border:1px solid var(--line);border-radius:999px;background:var(--card)}
.sync-status::before{background:var(--ok);box-shadow:0 0 0 3px var(--ok-soft)}
.sync-status.is-stale::before{background:var(--orange);box-shadow:0 0 0 3px var(--gold-soft)}

/* Section headings: gold diamond + hairline rule */
.section-heading{align-items:center}
.section-heading>h2,.section-heading>div:first-child{flex:1;min-width:0}
.section-heading h2{display:flex;align-items:center;gap:12px}
.section-heading h2::before{content:"";width:7px;height:7px;flex-shrink:0;background:var(--gold-dot);transform:rotate(45deg)}
.section-heading h2::after{content:"";flex:1;height:1px;margin-left:6px;background:var(--line)}
.period-badge{padding:4px 12px;background:var(--card);font-weight:500}

/* Cards */
.metric,.chart-card,.breakdown-card{border-radius:14px;box-shadow:var(--shadow)}
.metric[data-tone="gold"]{--metric-color:var(--slate);--metric-soft:var(--slate-soft)}
.metric-icon{width:30px;height:30px;padding:6px;border-radius:9px}
.metric strong{font-size:32px;letter-spacing:-.03em}
.progress-track{height:6px;margin-top:12px;border-radius:999px;background:var(--green-soft)}
.progress-track span{border-radius:999px;background:var(--gold-dot)}
.chart-card{padding:26px 28px 0}
.chart-area{fill-opacity:.08}
.segmented{padding:3px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
.segmented button{padding:6px 14px;border-radius:999px;font-weight:500}
.segmented button[aria-pressed="true"]{box-shadow:0 1px 3px rgba(15,23,42,.12)}
.chart-tooltip{border-radius:12px;box-shadow:0 10px 30px -12px rgba(15,23,42,.3)}

/* Daily records */
.records-details summary{display:inline-flex;align-items:center;gap:9px;min-height:34px;padding:5px 14px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--text);font-weight:500;list-style:none;transition:border-color .2s,color .2s}
.records-details summary::-webkit-details-marker{display:none}
.records-details summary::before{content:"";width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .25s var(--ease-out)}
.records-details[open] summary::before{transform:rotate(45deg)}
.records-details summary:hover{border-color:var(--gold-line);color:var(--accent)}
.table-scroll{border:1px solid var(--line);border-radius:12px;background:var(--card)}
th{background:var(--surface)}
tbody tr:last-child td{border-bottom:0}

/* Breakdown */
.breakdown-card h3{margin-bottom:6px;color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
.bar-track{height:8px;border-radius:999px}
.bar-fill{border-radius:999px}
.notice{border-radius:12px}

/* Return link + footer */
.page-return{padding-top:12px}
.back-link{align-items:center;min-height:36px;padding:6px 15px 6px 12px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--text);font-weight:500;transition:border-color .2s,color .2s,transform .3s var(--ease-out)}
.back-link:hover{border-color:var(--gold-line)}

@media(max-width:700px){h1{font-size:34px}.chart-card{padding:20px 15px 0}.metric strong{font-size:27px}}

/* ---------- Motion: one-shot, skipped for prefers-reduced-motion (script at the end of learning-english.html) ---------- */
.motion .rv{opacity:0;translate:0 16px;transition:opacity .6s var(--ease-out) var(--rv-delay,0ms),translate .7s var(--ease-out) var(--rv-delay,0ms),border-color .2s ease,box-shadow .3s ease,color .2s ease,transform .3s var(--ease-out)!important}
.motion .rv.is-shown{opacity:1;translate:none}
.motion .section-heading.rv h2::before{transform:rotate(-45deg) scale(0);transition:transform .6s var(--ease-pop) calc(var(--rv-delay,0ms) + 120ms)}
.motion .section-heading.rv.is-shown h2::before{transform:rotate(45deg) scale(1)}
.motion .section-heading.rv h2::after{transform:scaleX(0);transform-origin:left center;transition:transform 1.1s var(--ease-out) calc(var(--rv-delay,0ms) + 200ms)}
.motion .section-heading.rv.is-shown h2::after{transform:none}
.motion .breakdown-card.rv:not(.is-shown) .bar-fill{transform:scaleX(0)}
.motion .breakdown-card.rv.is-shown .bar-fill{transform-origin:left center;animation:lp-grow .9s var(--ease-out) calc(var(--rv-delay,0ms) + 200ms) backwards}
@keyframes lp-grow{from{transform:scaleX(0)}}
.trend-chart.is-drawing svg{animation:lp-draw 1.4s var(--ease-out) backwards}
@keyframes lp-draw{from{clip-path:inset(-20px 100% -20px -20px)}to{clip-path:inset(-20px -20px -20px -20px)}}
@media(prefers-reduced-motion:no-preference){
  .progress-track span{transition:width 1.1s var(--ease-out) .25s}
  .bar-fill{transition:width .6s var(--ease-out)}
  .back-link:hover{transform:translateX(-3px)}
  .nav-actions>a:hover{transform:translateY(-1px)}
}

/* ---------- Study calendar heatmap (gold scale, 5 levels by words per day: 0 / <300 / <600 / <900 / 900+) ---------- */
:root{--heat-0:#eef2f6;--heat-1:#f3e3c3;--heat-2:#e2c287;--heat-3:#c99a4e;--heat-4:#8f6524}
.dark{--heat-0:#1b2740;--heat-1:#3a2f1c;--heat-2:#6b5530;--heat-3:#a8843f;--heat-4:#e4b976}
.heat-card{border:1px solid var(--line);border-radius:14px;background:var(--card);box-shadow:var(--shadow);padding:24px 26px 0}
.heatmap{position:relative;min-height:142px}
.heat-scroll{overflow-x:auto;padding-bottom:4px}
.heat-grid{display:grid;grid-template-columns:27px repeat(var(--weeks),var(--cell));grid-template-rows:16px repeat(7,var(--cell));gap:var(--gap);width:max-content;margin:0 auto}
.heat-month{grid-row:1;align-self:start;font-size:11px;line-height:1;color:var(--muted);white-space:nowrap}
.heat-day{grid-column:1;align-self:center;font-size:10px;line-height:1;color:var(--muted)}
.heat-cell{width:var(--cell);height:var(--cell);border-radius:3px;background:var(--heat-0)}
.heat-cell[data-level="1"],.heat-legend i[data-level="1"]{background:var(--heat-1)}
.heat-cell[data-level="2"],.heat-legend i[data-level="2"]{background:var(--heat-2)}
.heat-cell[data-level="3"],.heat-legend i[data-level="3"]{background:var(--heat-3)}
.heat-cell[data-level="4"],.heat-legend i[data-level="4"]{background:var(--heat-4)}
.heat-cell.is-today{box-shadow:0 0 0 1.5px var(--card),0 0 0 3px var(--gold-dot)}
.heat-cell:hover{outline:1.5px solid var(--primary);outline-offset:1px}
.heat-tip{min-width:150px}
.heat-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 16px;margin-top:14px;padding:14px 0 16px;border-top:1px solid var(--line)}
.heat-legend{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--muted)}
.heat-legend i{width:11px;height:11px;border-radius:3px;background:var(--heat-0)}
.heat-legend span:first-child{margin-right:4px}
.heat-legend span:last-child{margin-left:4px}
@media(max-width:700px){.heat-card{padding:18px 15px 0}}
.motion .heat-card.rv:not(.is-shown) .heat-cell{opacity:0}
.motion .heat-card.rv.is-shown .heatmap:not(.is-settled) .heat-cell{animation:lp-pop .45s var(--ease-out) calc(var(--c,0) * 12ms + 120ms) backwards}
@keyframes lp-pop{from{opacity:0;transform:scale(.4)}}
