/* ==========================================================
   byalice — shared styles for every page
   Change colours and fonts here and the whole site updates.
   ========================================================== */

:root {
  --bg: #EDF1EF;          /* page background */
  --surface: #FFFFFF;     /* cards and rows */
  --ink: #15211D;         /* main text */
  --muted: #5B6B65;       /* secondary text */
  --line: #D3DDD8;        /* borders */
  --accent: #0E5C4C;      /* links, progress, highlights */
  --accent-soft: #D5E8E1;

  /* tracker track colours */
  --t-maths: #3B5BA9;
  --t-gmat: #A2462B;
  --t-portfolio: #6B4FA0;
  --t-ghg: #2E7D4F;
  --t-work: #96680F;
  --t-apply: #0E5C4C;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1513; --surface: #17201D; --ink: #E2EAE6; --muted: #93A49D; --line: #2A3732;
    --accent: #5EC0A5; --accent-soft: #1D332C;
    --t-maths: #8AA6EE; --t-gmat: #EE916F; --t-portfolio: #B9A0EA; --t-ghg: #7FCB98;
    --t-work: #E2B758; --t-apply: #5EC0A5;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
}
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(32px, 7vw, 52px); line-height: 1.05; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
main.wrap { display: grid; gap: 48px; padding-top: 40px; padding-bottom: 64px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- site header (same on every page) ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 16px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- home page ---------- */
.hero { display: grid; gap: 16px; }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 58ch; }
.section { display: grid; gap: 16px; }
.section > p { max-width: 62ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li { font-size: 14px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 8px; align-content: start; }
.card p { color: var(--muted); font-size: 15px; }
.status { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); }
.cta { display: inline-block; justify-self: start; background: var(--accent); color: var(--bg); padding: 10px 18px; border-radius: 99px; text-decoration: none; font-weight: 600; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { padding-block: 24px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- Road to Imperial tracker ---------- */
.tracker { display: grid; gap: 28px; }
.tracker header { display: grid; gap: 12px; }
.tracker .lede { color: var(--muted); max-width: 62ch; }
.progress { display: grid; gap: 8px; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s ease; }
.progress-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.progress-row strong { font-family: var(--display); font-size: 18px; }
#sync { color: var(--muted); font-size: 13px; }
.dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.date { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.date .when { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.date .what { font-weight: 600; font-size: 14px; }
.date .note { color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 13px var(--body); padding: 6px 12px; border-radius: 99px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.months { display: grid; gap: 22px; }
.month { display: grid; gap: 8px; }
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.month-head .count { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.month.complete .month-head .count { color: var(--accent); }
.list { display: grid; gap: 6px; }
.task { display: grid; grid-template-columns: 22px 1fr auto; align-items: start; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.task input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.task .text { min-width: 0; display: grid; gap: 2px; }
.task .title { font-weight: 500; }
.task .detail { color: var(--muted); font-size: 13.5px; }
.task .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c); white-space: nowrap; padding-top: 3px; }
.task.done .title { text-decoration: line-through; color: var(--muted); }
.task.done { background: transparent; }
.task.key { border-color: var(--accent); }

@media (max-width: 480px) {
  .task { grid-template-columns: 22px 1fr; }
  .task .tag { grid-column: 2; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .bar > span { transition: none; } }
