/* ============================================================================
   MY STUDY — component styles.

   Ported verbatim from the design source so the first commit is a faithful
   copy, not an interpretation. Sections run in the order the page reads them:
   top bar, hero, search, stats, Boo, dashboard, calendar, notebook, subjects.

   Colours come from tokens.css. Breakpoints live at the bottom of this file.
   ========================================================================= */

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:"IBM Plex Sans KR","Apple SD Gothic Neo",-apple-system,sans-serif;
  color:var(--ink);
  background:radial-gradient(120% 90% at 20% 0%, #F2F4F6 0%, #E7E9EB 55%, #DEE2E5 100%);
  -webkit-font-smoothing:antialiased;
  word-break:keep-all;
}
a{color:var(--blue); text-decoration:none;}
button{font:inherit; color:inherit; background:none; border:none; padding:0; cursor:pointer; text-align:left;}
.serif{font-family:"Source Serif 4",Georgia,serif;}
.mono{font-family:"IBM Plex Mono",monospace;}
.eyebrow{font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:0.1em; text-transform:uppercase; color:var(--muted2);}

/* The bottom padding reserves the Ask Boo widget's corner. Without it the
   widget sits ON the last panel — at 768px it covered a Start button. */
.shell{max-width:1320px; margin:0 auto; padding:18px clamp(16px,3vw,32px) calc(64px + 88px);}

/* ---------- top bar ---------- */
.topbar{display:flex; align-items:center; gap:24px; flex-wrap:wrap; padding:14px 0;}
.logo{display:flex; align-items:center; gap:9px;}
.logo-mark{width:26px; height:26px; border-radius:8px; background:var(--blue); display:inline-flex; align-items:center; justify-content:center;}
.logo-word{font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:18px; letter-spacing:-0.02em;}
.topnav{display:flex; gap:20px; flex-wrap:wrap;}
.topnav a{font-size:13.5px; font-weight:500; color:var(--ink);}
.topnav a:hover{color:var(--blue);}
.top-spacer{flex:1; min-width:8px;}
.avatar-chip{width:30px; height:30px; border-radius:50%; background:var(--blue-tint); border:1px solid var(--blue-pale); display:flex; align-items:center; justify-content:center; overflow:hidden; flex:0 0 auto;}

/* On a phone the nav wraps onto two rows and the spacer pushed the avatar
   onto a third by itself. Ordering puts it back beside the logo, where it
   belongs and where a thumb can reach it; the nav then wraps beneath both.
   A flex `order` is enough — no second markup, no duplicated element. */
@media (max-width:700px){
  .topbar{gap:10px 14px;}
  .logo{order:1;}
  .top-spacer{order:2; min-width:0;}
  .avatar-chip{order:3;}
  .topnav{order:4; flex:1 0 100%; gap:14px 18px;}
}

/* ============================================================================
   THE STUDENT CARD — dark, so the neon can actually be neon.

   Neon is a LUMINANCE trick: a saturated hue only glows when what surrounds
   it is dark. The same cyan on a white card is a pastel. So the card is a
   deep navy, which does two jobs at once — it lets the accents burn, and it
   makes the card 14:1 against the page, so the eye lands there first without
   any of it being loud.

   Every accent was checked on the card and on a stat tile: cyan 9.7, lime
   10.6, amber 9.6, the quietest label 4.7. Neon on dark passes easily; neon
   on light is what fails.

   Colour never carries meaning alone here — each stat has its label above it
   — so the three hues are identity, not information.

   STILL BUILT TO BE CUSTOMISED: --id-bg, --id-tile, --id-edge and the three
   --id-neon-* are the whole skin. Redeclare them under `.idcard[data-skin]`.
   ========================================================================= */
.top-row{display:grid; grid-template-columns:minmax(0,1.6fr) minmax(270px,0.66fr); gap:16px; margin-top:10px; align-items:stretch;}
@media (max-width:900px){ .top-row{grid-template-columns:1fr;} }

.idcard{
  --id-bg:#141B2E; --id-bg2:#1E2740; --id-tile:#1B2438; --id-edge:#31405E;
  --id-neon-1:#3DE0F5;   /* this week   */
  --id-neon-2:#A6E86B;   /* lessons     */
  --id-neon-3:#FFC24B;   /* streak      */
  --id-ink:#EDF2FA; --id-dim:#93A3BC;
  position:relative; overflow:hidden; display:flex; flex-direction:column;
  border:1px solid var(--id-edge); border-radius:18px;
  /* A faint HUD grid over the lit gradient: the texture is what makes a dark
     panel read as a game card rather than as a dark box. */
  background:
    repeating-linear-gradient(0deg,  rgba(61,224,245,.05) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(61,224,245,.05) 0 1px, transparent 1px 24px),
    radial-gradient(120% 140% at 12% 0%, var(--id-bg2) 0%, var(--id-bg) 62%);
  color:var(--id-ink);
  box-shadow:0 18px 40px -22px rgba(20,27,46,.9),
             0 0 0 1px rgba(61,224,245,.24),
             0 0 40px -10px rgba(61,224,245,.32);
}
/* Two glows bled through the surface rather than drawn on it, so the card
   looks lit from inside instead of decorated. */
.idcard::before,.idcard::after{content:''; position:absolute; border-radius:50%; pointer-events:none; filter:blur(38px);}
.idcard::before{width:240px; height:240px; top:-110px; left:-60px; background:rgba(61,224,245,.28);}
.idcard::after{width:220px; height:220px; bottom:-120px; right:-50px; background:rgba(166,232,107,.20);}
.idcard > *{position:relative; z-index:1;}

.id-top{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; padding:14px 20px 0;}
.id-kind{font-size:9.5px; letter-spacing:.18em; text-transform:uppercase; color:var(--id-neon-1); font-weight:500;
  text-shadow:0 0 14px rgba(61,224,245,.65);}
.id-date{margin-left:auto; font-family:"Source Serif 4",Georgia,serif; font-size:clamp(16px,1.9vw,21px); letter-spacing:-.02em; color:var(--id-ink);}

.id-body{display:flex; align-items:center; gap:18px; flex-wrap:wrap; padding:16px 20px 18px;}
.id-avatar{position:relative; width:104px; height:104px; flex:0 0 auto;}
.id-ring{position:absolute; inset:0; width:104px; height:104px; filter:drop-shadow(0 0 7px rgba(61,224,245,.85));}
.id-face{position:absolute; inset:11px; border-radius:50%; background:#26314C; display:flex; align-items:center; justify-content:center; overflow:hidden; padding:5px 6px 0;}
.id-level{position:absolute; right:-4px; bottom:-2px; display:flex; align-items:baseline; gap:2px;
  padding:4px 10px 5px; border-radius:999px; background:var(--id-neon-1); color:#0C1322;
  box-shadow:0 0 0 3px var(--id-bg), 0 0 16px rgba(61,224,245,.9);}
.id-level-k{font-size:8.5px; letter-spacing:.1em; opacity:.75;}
.id-level-n{font-family:"Source Serif 4",Georgia,serif; font-size:15px; line-height:1; font-weight:700;}

.id-who{flex:1 1 180px; min-width:0;}
.id-who h1{font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:clamp(28px,3.4vw,38px); line-height:1.05; letter-spacing:-.03em; margin:0; color:var(--id-ink);
  text-shadow:0 0 26px rgba(61,224,245,.30);}
.id-meta{font-size:10.5px; letter-spacing:.09em; text-transform:uppercase; color:var(--id-dim); margin:8px 0 0;}
.id-xp{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:13px;}
.id-xp-track{flex:1 1 120px; min-width:90px; max-width:230px; height:7px; border-radius:4px; background:#2A3550; overflow:hidden; display:block;}
.id-xp-fill{display:block; height:100%; border-radius:4px; background:linear-gradient(90deg,var(--id-neon-2),var(--id-neon-1));
  box-shadow:0 0 12px rgba(61,224,245,.8);}
.id-xp-note{font-size:10.5px; color:var(--id-dim); white-space:nowrap;}

/* Subject rings: the card's right half. Each ring is named and carries its
   own percentage, so the colour is decoration rather than the message — a
   student who cannot separate the green from the amber still reads all four.
   Every neon here clears 7:1 against the card, far above the 3:1 a graphical
   element needs. */
.id-badges{display:flex; gap:12px; flex-wrap:wrap; margin:0 0 0 auto; padding:0; list-style:none; align-self:center;}
.id-badge{display:flex; flex-direction:column; align-items:center; gap:6px; width:58px;}
.id-badge.maths  {color:#4FB8FF;}
.id-badge.english{color:var(--id-neon-3);}
.id-badge.science{color:var(--id-neon-2);}
.id-badge.korean {color:#C79BFF;}
.id-badge-ring{position:relative; width:46px; height:46px; display:block;}
.id-badge-ring svg{width:100%; height:100%; display:block; filter:drop-shadow(0 0 5px currentColor);}
.id-badge-n{position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:10.5px; letter-spacing:-.02em; color:var(--id-ink);}
.id-badge-s{font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--id-dim); white-space:nowrap;}
@media (max-width:760px){ .id-badges{margin-left:0; width:100%; justify-content:flex-start;} }

.id-stats{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; margin:0 14px 16px; flex:0 0 auto;
  border-radius:13px; background:var(--id-edge); overflow:hidden;}
@media (max-width:520px){ .id-stats{grid-template-columns:1fr;} }
.id-stat{display:flex; flex-direction:column; gap:7px; padding:14px 15px 15px; background:var(--id-tile);
  box-shadow:inset 0 2px 0 var(--c), inset 0 26px 30px -28px var(--c);}
.id-stat .k{font-size:9.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--id-dim);}
.id-stat .v{font-size:26px; line-height:1; letter-spacing:-.03em; display:flex; align-items:baseline; gap:6px;}
.id-stat .v small{font-size:11.5px; font-family:"IBM Plex Sans KR",sans-serif; color:var(--id-dim); letter-spacing:0;}
.id-stat.week   {--c:var(--id-neon-1);}
.id-stat.lessons{--c:var(--id-neon-2);}
.id-stat.streak {--c:var(--id-neon-3);}
.id-stat.week    .k{color:var(--id-neon-1);} .id-stat.week    .v{color:var(--id-neon-1); text-shadow:0 0 18px rgba(61,224,245,.5);}
.id-stat.lessons .k{color:var(--id-neon-2);} .id-stat.lessons .v{color:var(--id-neon-2); text-shadow:0 0 18px rgba(166,232,107,.45);}
.id-stat.streak  .k{color:var(--id-neon-3);} .id-stat.streak  .v{color:var(--id-neon-3); text-shadow:0 0 18px rgba(255,194,75,.45);}
.id-stat .streak-dots .dot{background:var(--id-neon-3); box-shadow:0 0 7px rgba(255,194,75,.8);}
.id-stat .streak-dots .dot.off{background:#3A4867; box-shadow:none;}

/* ---------- the right column ---------------------------------------------
   Two small cards rather than one tall one: Carry on never needed to be the
   height of the student card, and the space above it is where Ask Boo now
   lives instead of floating over the page. */
.top-side{display:flex; flex-direction:column; gap:14px; min-width:0;}

/* ASK BOO — the only card here that is not a list of the student's own work,
   so it is the only one that does not look like a panel. Deep indigo with the
   egg lit from behind: white text clears 12.6:1 on it and the lavender label
   7.1:1, so the whole thing is drawn in colours that are actually readable
   rather than atmospheric. */
.boo-card{position:relative; display:flex; align-items:center; gap:14px; width:100%; padding:16px 18px; border-radius:18px;
  background:radial-gradient(130% 150% at 82% 12%, #3B3F86 0%, #262A5E 45%, #1C2049 100%);
  border:1px solid #3A3F7D; color:#F3F5FF; overflow:hidden; text-align:left;
  box-shadow:0 16px 34px -22px rgba(38,42,94,.95), 0 0 0 1px rgba(160,175,255,.10);}
.boo-card::after{content:''; position:absolute; right:-40px; bottom:-60px; width:150px; height:150px; border-radius:50%;
  background:rgba(143,168,255,.28); filter:blur(34px); pointer-events:none;}
.boo-card > *{position:relative; z-index:1;}
.boo-card:hover{border-color:#5B62B8; box-shadow:0 18px 38px -20px rgba(38,42,94,1), 0 0 0 1px rgba(160,175,255,.22);}
.boo-card-egg{width:50px; height:50px; flex:0 0 auto;}
.boo-card-egg svg{width:100%; height:100%; display:block; overflow:visible;}
.boo-card-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.boo-card-k{font-size:9px; letter-spacing:.14em; text-transform:uppercase; color:#C9B8FF;}
.boo-card-n{font-family:"Source Serif 4",Georgia,serif; font-size:18px; font-weight:600; letter-spacing:-.015em; color:#FFF;}
.boo-card-s{font-size:11.5px; color:#B9C2EC; line-height:1.45;}
.boo-card-go{width:30px; height:30px; border-radius:50%; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.14); color:#FFF; border:1px solid rgba(201,184,255,.4);}
.boo-card:hover .boo-card-go{background:#C9B8FF; color:#1C2049; border-color:#C9B8FF;}

/* CARRY ON — a play control, not a row with a button on it. The ring is the
   progress and the triangle sits inside it, which is the one shape everybody
   already reads as "press to continue". The pips say which of the five steps
   you stopped on; a percentage would have said 40% and left you to work out
   what that meant. */
.resume-card{display:flex; align-items:center; gap:15px; flex:1; padding:15px 17px; border-radius:18px;
  background:linear-gradient(150deg, var(--blue-tint) 0%, var(--card) 70%);
  border:1px solid var(--blue-pale); color:inherit;
  box-shadow:0 12px 26px -22px rgba(37,108,158,.9);}
.resume-card:hover{border-color:var(--blue); background:linear-gradient(150deg,#DFEBF5 0%, var(--card) 70%);}
.resume-play{width:64px; height:64px; flex:0 0 auto;}
.resume-play svg{width:100%; height:100%; display:block;}
.resume-card:hover .resume-play svg path{fill:var(--blue-deep);}
.resume-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px;}
.resume-top{display:flex; align-items:baseline; gap:8px; flex-wrap:wrap;}
.resume-top .tag{font-size:9px; letter-spacing:.14em; text-transform:uppercase; color:var(--blue-deep);}
.resume-top .when{font-size:11px; color:var(--muted2);}
.resume-title{display:block; font-family:"Source Serif 4",Georgia,serif; font-size:16px; font-weight:600;
  letter-spacing:-.02em; line-height:1.25; margin-top:1px;}
.resume-meta{display:flex; align-items:center; gap:7px; font-size:11.5px; color:var(--muted2); margin-top:5px;}
.resume-steps{display:flex; gap:4px; margin-top:7px;}
.resume-steps i{width:16px; height:4px; border-radius:2px; background:var(--blue-pale); display:block;}
.resume-steps i.on{background:var(--blue);}
.resume-go{font-family:"IBM Plex Mono",monospace; font-size:10.5px; color:var(--muted); margin-top:4px;}
.bar-track{flex:1; height:5px; border-radius:3px; background:#FFF; display:block; overflow:hidden;}
.bar-track.on-panel{background:var(--border-soft);}
.bar-fill{display:block; height:100%; background:var(--blue);}

/* ---------- search: the most-used control on the page ---------------------
   A real field, not a link that looks like one. The bar keeps its size and
   weight — it is the thing students reach for first — and the results drop
   underneath it as an overlay rather than pushing the dashboard down, so
   nothing you were looking at moves while you type. */
.search-zone{position:relative; z-index:40; margin-top:16px;}
.search-bar{display:flex; align-items:center; gap:12px 16px; flex-wrap:wrap; width:100%;
  padding:18px 20px; background:var(--card); border:2px solid var(--blue-pale); border-radius:16px; color:inherit;
  cursor:text;
  box-shadow:0 1px 2px rgba(24,33,29,.04), 0 10px 26px -18px rgba(37,108,158,.55);
  transition:border-color .12s, box-shadow .12s;}
.search-bar:hover{border-color:var(--blue); box-shadow:0 1px 2px rgba(24,33,29,.05), 0 14px 30px -18px rgba(37,108,158,.75);}
/* The focus ring goes on the BAR, not on the input inside it: the input has
   no border of its own, so a ring around it would float in the middle of a
   card. :focus-within puts it where the eye expects the control to be. */
.search-bar:focus-within{border-color:var(--blue); outline:3px solid var(--blue-pale); outline-offset:2px;
  box-shadow:0 1px 2px rgba(24,33,29,.05), 0 14px 30px -18px rgba(37,108,158,.75);}
.search-zone.open .search-bar{border-bottom-left-radius:6px; border-bottom-right-radius:6px;}
.search-ico{width:40px; height:40px; border-radius:12px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; background:var(--blue-tint); color:var(--blue);}
.search-body{flex:1 1 260px; min-width:0; display:flex; flex-direction:column; gap:4px;}
.search-input{width:100%; border:0; padding:6px 0; background:none; font:inherit; font-size:17px; letter-spacing:-.01em; color:var(--ink);}
.search-input::placeholder{color:var(--ink-soft); opacity:1;}
.search-input:focus{outline:none;}
.search-sub{font-size:11.5px; color:var(--muted2);}
.search-go{padding:13px 24px; border-radius:10px; min-height:44px; background:var(--blue); color:#FFF; font-size:14px; font-weight:600; white-space:nowrap; flex:0 0 auto;}
.search-bar:hover .search-go, .search-go:hover{background:var(--blue-deep);}

/* ---------- the suggestions ---------------------------------------------
   Each row says what KIND of thing it is on the right, because "Conditional
   probability" is a lesson, a unit and a mistake in the notebook all at
   once, and which one you land on is the whole question. */
.search-results{position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:41;
  background:var(--card); border:1px solid var(--border); border-radius:14px;
  box-shadow:0 24px 54px -24px rgba(24,33,29,.42), 0 2px 8px rgba(24,33,29,.06);
  overflow:hidden auto; max-height:min(58vh, 430px); padding:6px;}
.search-results[hidden]{display:none;}
.sr-item{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:10px; color:inherit;}
.sr-item + .sr-item{margin-top:2px;}
.sr-item.is-active, .sr-item:hover{background:var(--blue-tint);}
.sr-item.is-active{box-shadow:inset 0 0 0 1px var(--blue-pale);}
.sr-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.sr-title{font-size:14px; font-weight:500; letter-spacing:-.01em; line-height:1.35;}
.sr-title mark{background:var(--amber-tint); color:inherit; border-radius:3px; padding:0 1px;}
.sr-meta{font-size:11.5px; color:var(--muted2); line-height:1.4;}
.sr-kind{font-size:9.5px; letter-spacing:.09em; text-transform:uppercase; color:var(--muted2); white-space:nowrap; flex:0 0 auto;
  padding:4px 8px; border-radius:999px; background:var(--neutral-tint);}
/* The whole-bank row sticks to the bottom of the list. It is the way out
   when none of the matches is the one you meant, and a way out you have to
   scroll to find is not a way out. */
.sr-bank{position:sticky; bottom:-6px; background:var(--card); margin-top:4px;
  box-shadow:0 -1px 0 var(--border-soft), 0 -10px 12px -8px rgba(255,255,255,.95);}
.sr-bank.is-active, .sr-bank:hover{background:var(--blue-tint);}
.sr-none{margin:0; padding:12px 12px 10px; font-size:12.5px; line-height:1.55; color:var(--muted);}
@media (max-width:520px){
  .sr-kind{display:none;}          /* the row is already short on a phone */
  .search-go{flex:1 1 100%;}
}

.chip{padding:9px 14px; border-radius:999px; background:var(--neutral-tint); font-size:11.5px; color:var(--neutral-ink); white-space:nowrap;}
/* The chips fill the field rather than navigate, so they read as controls:
   a hover state and a border that does not rely on the tint alone. */
button.chip{border:1px solid var(--border); cursor:pointer;}
button.chip:hover{background:var(--blue-tint); border-color:var(--blue-pale); color:var(--blue-deep);}
.chip-row{display:flex; gap:6px; flex-wrap:wrap;}
.streak-dots{display:flex; gap:3px; margin-top:2px;}
.dot{width:7px; height:7px; border-radius:50%; background:var(--amber-gold);}
.dot.off{background:#EDE2D0;}

/* ---------- the Ask Boo chat panel the card opens ---------- */
.boo-panel{
  position:fixed; z-index:81; width:320px; max-width:calc(100vw - 24px);
  border-radius:16px; background:var(--card); border:1px solid var(--border);
  box-shadow:0 20px 48px rgba(24,33,29,0.2);
  overflow:hidden; display:none;
}
.boo-panel.open{display:block;}
.boo-panel-head{display:flex; align-items:center; gap:9px; padding:12px 14px; background:var(--boo-blue-tint); border-bottom:1px solid var(--border-soft);}
.boo-panel-head .egg-mini{width:26px; height:26px; flex:0 0 auto;}
.boo-panel-head .egg-mini svg{width:100%; height:100%; display:block;}
.boo-panel-head .name{font-size:13px; font-weight:600;}
.boo-panel-head .spacer{flex:1;}
.boo-panel-head .close{font-size:11.5px; color:var(--muted2);}
.boo-panel-head .close:hover{color:var(--ink);}
.boo-panel .boo-thread{max-height:240px; overflow-y:auto;}

/* ---------- ask boo panel ---------- */
.boo-thread{display:grid; gap:10px; padding:16px;}
.bubble{max-width:70%; padding:11px 14px; font-size:13px; line-height:1.6;}
.bubble.me{justify-self:end; border-radius:12px 12px 3px 12px; background:var(--blue-tint);}
.bubble.boo{border-radius:12px 12px 12px 3px; background:#F6F8FA; border:1px solid var(--border-soft);}
.boo-suggestions{display:flex; gap:8px; flex-wrap:wrap; padding:0 16px 14px;}
.suggestion{padding:7px 13px; border-radius:999px; border:1px solid var(--line); font-size:12px; color:var(--ink-soft); background:var(--card);}
.suggestion:hover{border-color:var(--blue); color:var(--blue-deep);}
.boo-input-row{display:flex; align-items:center; gap:10px; padding:12px 14px; border-top:1px solid var(--border-soft); background:var(--panel);}
.boo-input-row input{flex:1; min-width:0; border:none; background:transparent; font:inherit; font-size:13px; color:var(--ink);}
.boo-input-row input:focus{outline:none;}
.boo-input-row input::placeholder{color:var(--muted);}
.boo-send{padding:7px 14px; border-radius:6px; background:var(--blue); color:#FFF; font-size:12px; font-weight:500;}
.boo-send:hover{background:var(--blue-deep);}

/* ---------- dashboard columns ---------- */
/* `align-items:stretch` (the default) rather than `start`, so a column can
   reach the height of the tallest one instead of hanging from the top. What
   each column DOES with that height is decided per column below — space a
   panel cannot use is worse than a ragged bottom edge. */
.dashboard{display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:16px; margin-top:16px;}
.stack{display:flex; flex-direction:column; gap:16px; min-width:0;}

/* TODAY fills its column. The panel grows, the task grid grows with it, and
   the grid's rows share the extra height — so the six cards get a little
   taller rather than the panel growing a blank foot. `.task-foot` then pins
   to the bottom of each card, which has a second benefit worth more than the
   alignment: every Resume/Start button in a row now sits on the same line,
   instead of floating at whatever height its card's title happened to end. */
.dashboard > .stack:first-child > .panel{flex:1; display:flex; flex-direction:column;}
.dashboard > .stack:first-child .day-track{flex:1;}

/* The middle column's last panel takes its leftover height the same way the
   other two do, into its rows rather than into a gap under them, so all
   three columns finish on the same line. Without this, Your plans stopped
   ~30px short of its neighbours — small enough to look like a mistake and
   large enough to see. */
.dashboard > .stack:nth-child(2) > .panel:last-child{flex:1; display:flex; flex-direction:column;}
.dashboard > .stack:nth-child(2) > .panel:last-child > .plan-row{flex:1; display:flex; flex-direction:column; justify-content:center;}

/* The last panel in the right-hand column takes the leftover height the same
   way — into its ROWS, not into a gap above its footer. Pinning "Show 2 more"
   to the bottom was the first attempt and it left ~90px of white between the
   last date and the button: a footer that has floated away from its list
   reads as a loading failure, not as alignment. Sharing the height between
   three date rows instead just makes them breathe. */
.dashboard > .stack:last-child > .panel:last-child{flex:1; display:flex; flex-direction:column;}
.dates-list{display:flex; flex-direction:column;}
/* `[hidden]` is a UA rule at specificity 0,0,1 — any class that sets display
   beats it and the element comes back. `.cal-body[hidden]` above exists for
   the same reason. Give every class that sets `display` its own hidden guard,
   or "Show 2 more" reveals rows that were already on screen. */
.dates-list[hidden]{display:none;}
.dashboard > .stack:last-child > .panel:last-child > .dates-list:not([hidden]){flex:1;}
.dashboard > .stack:last-child > .panel:last-child > .dates-list > .date-row{flex:1;}
.panel{border:1px solid var(--border); border-radius:12px; background:var(--card); overflow:hidden;}
/* ---------- PANEL TITLES -------------------------------------------------
   The highlighter is gone. What replaces it is the older device and the
   quieter one: a short rule ABOVE the title, the way a section mark sits
   over a heading in print. It does the same job — says a new thing has
   started — without putting a colour behind the words, so it reads as
   typesetting rather than as annotation.

   Three parts, no new markup:
     the mark   a 22px rule over the title, in the product's blue
     the rule   the flexible spacer between title and control, as a hairline
     the count  a mono chip, like every other measurement on the page
   ======================================================================= */
.title-mark{position:relative; display:inline-block;}
.title-mark::before{content:''; position:absolute; left:0; top:-15px; width:34px; height:3px;
  border-radius:1.5px; background:var(--blue);}

.panel-head{display:flex; align-items:center; gap:12px; padding:21px 18px 12px; flex-wrap:wrap;}
.panel-head .title{position:relative; font-family:"Source Serif 4",Georgia,serif;
  font-size:18.5px; font-weight:600; letter-spacing:-.028em; line-height:1.2;}
.panel-head .title::before{content:''; position:absolute; left:0; top:-11px; width:22px; height:2px;
  border-radius:1px; background:var(--blue);}
.panel-head .spacer{flex:1 1 20px; min-width:16px; height:1px; align-self:center; background:var(--border);}
.panel-head .note{font-family:"IBM Plex Mono",monospace; font-size:10.5px; letter-spacing:.02em;
  color:var(--muted); padding:4px 9px; border-radius:999px; background:#F1F4F1; white-space:nowrap;}
.panel-head .link{font-size:12px; font-weight:500; color:var(--blue);}
.panel-head .link:hover{color:var(--ink);}
/* On the cream notebook the blue mark and the neutral chip both take the
   paper's own ink instead. */
.notebook-panel .panel-head .title::before{background:var(--amber);}
.notebook-panel .panel-head .note{background:#F5E8CC; color:#7A5A22;}
.notebook-panel .panel-head .spacer{background:#EADCBC;}
.notebook-panel .panel-head .link{color:var(--amber-deep);}

/* ---------- Today: the day as a track, not a grid of equal boxes --------
   Six cards of one size said six equal things. A day is not six equal
   things, so the row's SIZE carries its state: a finished lesson collapses
   to a struck line, the one you are on is a full card, and what is ahead
   sits between the two. The spine down the left is what makes them one
   sequence rather than a list that happens to be sorted. */
.day-count{font-size:10.5px; letter-spacing:.02em; color:var(--muted);
  padding:4px 9px; border-radius:999px; background:#F1F4F1; white-space:nowrap;}
.day-count b{color:var(--blue-deep); font-weight:600;}

.day-track{list-style:none; margin:0; padding:2px 18px 18px; display:flex; flex-direction:column; min-height:0;}

/* THE SPINE, AND WHY IT IS DRAWN PER STEP.
   The leftover height of this column has to go somewhere. Putting it in the
   gaps (`space-between`) broke the line into six stubs; putting it inside
   the rows put a hole in each one. So each step STRETCHES and centres its
   own content: the row keeps its natural size, the step absorbs the slack,
   and because the steps stay touching, their segments join into one line.
   The first segment starts at its marker and the last stops at its marker,
   so the track begins and ends on a step at any column height. */
.dt-step{position:relative; padding-left:26px; display:flex; flex-direction:column; justify-content:center;}
.dashboard > .stack:first-child .dt-step{flex:1 1 auto;}
.dt-step::before{content:''; position:absolute; left:8px; top:0; bottom:0; width:2px; background:var(--border-soft);}
.dt-step.done::before{background:var(--blue-pale);}
.dt-step.now::before{background:linear-gradient(180deg, var(--blue-pale) 0 50%, var(--border-soft) 50%);}
.dt-step:first-child::before{top:50%;}
.dt-step.last::before{bottom:auto; height:50%;}

.dt-step > a{display:flex; align-items:center; gap:11px; padding:8px 0; color:inherit; min-width:0;}
.dt-mark{position:absolute; left:0; top:50%; transform:translateY(-50%); width:18px; height:18px;
  display:flex; align-items:center; justify-content:center; background:var(--card); border-radius:50%; z-index:1;}
/* The markers were defined only under `.row`, so on the track the line ran
   through four steps with nothing on it. A spine with no markers is just a
   border. */
.dt-mark .tick{width:18px; height:18px; border-radius:50%; background:var(--blue-tint); color:var(--blue);
  display:flex; align-items:center; justify-content:center; font-size:10px;}
.dt-mark .ring-mini{width:18px; height:18px; border-radius:50%; border:2px solid var(--blue);
  background:conic-gradient(var(--blue) 0 40%, #FFF 40%);}
.dt-mark .empty-dot{width:14px; height:14px; border-radius:50%; border:2px solid #8A948F; background:var(--card);}
.dt-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px;}
.dt-title{font-size:13.5px; font-weight:500; line-height:1.4;}
.dt-title.done-text{color:var(--muted); text-decoration:line-through; text-decoration-color:#A3ADA7; font-weight:400; font-size:12.5px;}
.dt-meta{display:flex; align-items:center; gap:7px; flex-wrap:wrap; font-size:11.5px; color:var(--muted2); line-height:1.4;}
.dt-time{font-size:10.5px; color:var(--muted2); white-space:nowrap;}
.dt-go{display:flex; align-items:center; gap:9px; flex:0 0 auto;}

/* Finished: the smallest row on the page, and still a link. */
.dt-step.done > a{padding:5px 0;}

/* Where you are: the only full card in this column, and the only one that
   carries a filled button. */
.dt-step.now{margin:6px 0;}
.dt-step.now > a{flex-direction:column; align-items:stretch; gap:6px; padding:13px 15px 14px;
  border:1px solid var(--blue-pale); border-radius:12px; background:var(--blue-tint);
  box-shadow:0 10px 22px -18px rgba(37,108,158,.9);}
.dt-step.now > a:hover{border-color:var(--blue); background:#DFEBF5;}
.dt-step.now .dt-kicker{font-size:9px; letter-spacing:.13em; text-transform:uppercase; color:var(--blue-deep);}
.dt-step.now .dt-title{font-size:15px; font-weight:600; letter-spacing:-.015em; line-height:1.3;}
.dt-step.now .dt-run{display:flex; align-items:center; gap:10px; margin-top:7px;}
.dt-step.now .mini-track{flex:1; min-width:40px;}
.dt-step.now .cta{margin-left:auto;}

/* Ahead of you: a row, with the subject named. */
.dt-step:not(.done):not(.now) > a{padding:10px 0;}
.dt-step:not(.done):not(.now) > a:hover .dt-title{color:var(--blue-deep);}

@media (max-width:420px){
  .dt-go{flex-direction:column; align-items:flex-end; gap:4px;}
}

/* ---------- Left unfinished: pips, not another bar -----------------------
   Three rows each saying "step 2 of 5" over a bar told you nothing a glance
   could use — a bar at 40% and a bar at 44% are the same bar. Pips are
   countable, and they are the only progress shape on this page that is
   neither a bar nor a ring, which is what stops this panel reading as a
   second copy of the one beside it. */
.open-list{display:flex; flex-direction:column; gap:8px; padding:2px 14px 16px;}
.open-item{position:relative; display:flex; align-items:center; gap:13px; padding:12px 14px 12px 15px;
  border:1px solid var(--border); border-radius:13px; background:var(--card); color:inherit; overflow:hidden;}
.open-item::before{content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--oi-c, var(--border));}
.open-item.maths  {--oi-c:var(--blue);   --oi-wash:var(--blue-tint);}
.open-item.english{--oi-c:var(--amber);  --oi-wash:var(--amber-tint);}
.open-item.science{--oi-c:var(--green);  --oi-wash:var(--green-tint);}
.open-item.korean {--oi-c:var(--purple); --oi-wash:var(--purple-tint);}
.open-item:hover{border-color:var(--oi-c); background:linear-gradient(120deg, var(--oi-wash) 0%, var(--card) 70%);}
.oi-face{flex:0 0 auto;}
.oi-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:5px;}
.oi-title{font-size:13.5px; font-weight:500; line-height:1.35;}
.oi-pips{display:flex; gap:3px;}
.oi-pips i{width:14px; height:5px; border-radius:2.5px; background:var(--border); display:block;}
.oi-pips i.on{background:var(--oi-c);}
.oi-meta{display:flex; align-items:center; gap:7px; flex-wrap:wrap; font-size:11px; color:var(--muted2);}
.oi-when{display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex:0 0 auto;}
.oi-ago{font-size:10.5px; color:var(--muted2); white-space:nowrap;}
@media (max-width:420px){ .oi-when{align-items:stretch;} }

/* SUBJECT GLYPH TILES.
   One box, three sizes, five tints. The glyph comes from the <symbol> sprite
   at the top of the page, so the tile here only decides how big it is and
   what colour it sits on — a subject's drawing is never duplicated.
     .subj-icon      22px — a chip beside a task's subject tag
     .subj-icon.lg   30px — the leading element of an unfinished row
     .subject-card .icon  38px — the subject card's own tile             */
.subj-icon{width:22px; height:22px; border-radius:6px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;}
.subj-icon.lg{width:30px; height:30px; border-radius:8px;}
.subj-icon svg{width:100%; height:100%; display:block;}

.subj-icon.maths,   .subject-card .icon.maths  {background:var(--blue-tint);}
.subj-icon.english, .subject-card .icon.english{background:var(--amber-tint);}
.subj-icon.science, .subject-card .icon.science{background:var(--green-tint);}
.subj-icon.korean,  .subject-card .icon.korean {background:var(--purple-tint);}
.subj-icon.mixed,   .subject-card .icon.mixed  {background:var(--neutral-tint);}

.subj-tag{padding:2px 7px; border-radius:4px; font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.06em; text-transform:uppercase; white-space:nowrap;}
.subj-tag.maths{background:var(--blue-tint); color:var(--blue-deep);}
.subj-tag.english{background:var(--amber-tint); color:var(--amber-deep);}
.subj-tag.science{background:var(--green-tint); color:var(--green);}
.subj-tag.korean{background:var(--purple-tint); color:var(--purple);}
.subj-tag.mixed{background:var(--neutral-tint); color:var(--neutral-ink);}

.row-top{display:flex; align-items:baseline; gap:6px 8px; flex-wrap:wrap;}
.row-title{flex:1 1 110px; min-width:0; overflow-wrap:anywhere; font-size:14px;}
.row-title.plain{font-weight:500;}
.row-title.done-text{color:var(--muted); text-decoration:line-through; text-decoration-color:#A3ADA7;}
.row-sub{display:block; font-size:11.5px; color:var(--muted2); margin-top:3px;}
.task-state{margin-left:auto; display:inline-flex; align-items:center; flex:0 0 auto;}

/* the plain `.row` is still used by the notebook and library screens */
.row{position:relative; display:flex; gap:13px; align-items:center; width:100%; padding:13px 18px; border-top:1px solid var(--border-soft);}
.row:hover{background:var(--panel);}
button.row{background:#FFF;}
button.row:hover{background:#F6F8FA;}
.row .tick{width:18px; height:18px; border-radius:50%; background:var(--blue-tint); color:var(--blue); display:inline-flex; align-items:center; justify-content:center; font-size:10px; flex:0 0 auto;}
.row .ring-mini{width:18px; height:18px; border-radius:50%; border:1.5px solid var(--blue); background:linear-gradient(90deg, var(--blue) 40%, #FFF 40%); flex:0 0 auto;}
.row .empty-dot{width:18px; height:18px; border-radius:50%; border:1.5px solid #C9D0CB; flex:0 0 auto;}
.row .body{flex:1; min-width:0;}
.row .time{font-family:"IBM Plex Mono",monospace; font-size:11px; color:var(--muted2); white-space:nowrap;}
.cta{padding:7px 13px; border-radius:6px; background:var(--blue); color:#FFF; font-size:12.5px; font-weight:500; white-space:nowrap;}
.cta.ghost{background:#FFF; border:1px solid #C9D0CB; color:var(--ink);}
.pass-badge{padding:2px 8px; border-radius:4px; font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.06em; text-transform:uppercase; white-space:nowrap;}
.pass-badge.p1{background:var(--amber-tint); color:var(--amber-deep);}
.pass-badge.p2{background:var(--blue-tint); color:var(--blue-deep);}
.pass-badge.p3{background:var(--green-tint); color:var(--green);}
.notebook-panel{
  margin-top:0; width:100%;
  background:linear-gradient(180deg, #FFFCF4 0%, #FDF6E7 100%);
  border:1px solid #F0E3C8; border-top:none;
  box-shadow:0 10px 24px rgba(138,90,28,0.08);
}
.notebook-spiral{display:flex; justify-content:space-evenly; padding:9px 18px 0; background:#F0E3C8; border-radius:12px 12px 0 0;}
.notebook-spiral span{width:11px; height:11px; margin-bottom:-7px; border-radius:50%; background:#FDF6E7; border:2.5px solid #C7A85C;}
.notebook-panel .panel-head{flex-wrap:wrap; row-gap:6px; padding-top:18px;}
.notebook-panel .panel-head .note{color:var(--amber-deep); width:100%; order:3;}
.notebook-grid{display:flex; flex-direction:column; padding:0 4px 4px;}
.notebook-card{display:flex; flex-direction:column; gap:7px; padding:13px 18px; border-top:1px dashed #E7D6A6;}
.notebook-card .row-top{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.notebook-card .nb-q{font-size:13px; line-height:1.5; color:var(--ink);}
.notebook-card .nb-foot{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:2px;}
.notebook-card .nb-foot .when{font-size:11px; color:var(--muted2); white-space:nowrap;}

/* Past ~430px the stacked card stops being a card and starts being a stretched
   one: "missed Monday" at the far left and Review at the far right with 400px
   of cream between them. Wide enough, and it becomes a list ROW instead —
   tags and question on the left, when and Review held together on the right.
   Denser to read and about 25px shorter per item, which is most of what
   brings this panel level with the subjects grid beside it. */
@container (min-width:430px){
  .notebook-card{
    display:grid; align-items:center; column-gap:16px; row-gap:4px;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"tags foot" "question foot";
  }
  .notebook-card .row-top{grid-area:tags;}
  .notebook-card .nb-q{grid-area:question;}
  .notebook-card .nb-foot{grid-area:foot; margin-top:0; gap:14px;}
}

.mini-progress{display:flex; align-items:center; gap:9px; margin-top:8px;}
.mini-track{flex:1; height:4px; border-radius:2px; background:var(--border-soft); display:block; overflow:hidden; max-width:128px;}
.mini-progress .step{font-family:"IBM Plex Mono",monospace; font-size:10.5px; color:var(--muted); white-space:nowrap;}
.mini-progress .dotsep{color:#C9D0CB;}
.mini-progress .when{font-size:11px; color:var(--muted2); white-space:nowrap;}

/* ---------- Your plans: a strip of the plan itself ------------------------
   Each row opens that plan's own page. The strip is a small copy of the
   chart on it — taught, still to teach, then revision, with today marked —
   drawn on the plan's own axis. Two bars at 19% and 16% are the same bar;
   two plans that finish five weeks apart are visibly two plans. */
.plans-panel .plan-row{position:relative; display:flex; flex-direction:column; gap:0;
  padding:14px 18px 15px 21px; border-top:1px solid var(--border-soft); color:inherit;}
.plans-panel .plan-row:hover{background:var(--panel);}
.plan-row::before{content:''; position:absolute; left:0; top:12px; bottom:12px; width:3px; border-radius:0 3px 3px 0; background:var(--border);}
/* The SAME validated three-step ramp the plan page's chart uses — this strip
   is a preview of that chart, so a second set of blues would make it a
   different chart that happens to look similar. */
.plan-row.maths  {--pl:#1E5B85; --pl2:#5090BE; --pl3:#8CB9D8;}
.plan-row.english{--pl:#7A5A22; --pl2:#AB8440; --pl3:#CBAE76;}
.plan-row.science{--pl:#2F6B4F; --pl2:#61997A; --pl3:#8BB69F;}
.plan-row.korean {--pl:#5B3A63; --pl2:#8F6A97; --pl3:#B99DBF;}
.plan-row::before{background:var(--pl, var(--border));}
.plan-top{display:flex; align-items:center; gap:10px;}
.plan-top .name{flex:1; min-width:0; font-size:13.5px; font-weight:600; letter-spacing:-.01em;}

.plan-strip{position:relative; display:block; height:9px; margin-top:11px; border-radius:5px; background:var(--border-soft);}
.plan-strip i{position:absolute; top:0; height:9px; border-radius:5px; box-shadow:0 0 0 2px var(--card);}
.plan-strip .s-done{background:var(--pl); z-index:3;}
.plan-strip .s-left{background:var(--pl2); z-index:2;}
.plan-strip .s-rev {background:var(--pl3); z-index:1;}
/* Today is the only rule on the strip, so it is solid and taller than the
   band it crosses — a dashed marker would read as a projection. */
.plan-strip .s-now{position:absolute; top:-4px; width:2px; height:17px; border-radius:1px; background:var(--ink); z-index:4;}
.plans-panel .plan-row:hover .plan-strip i{box-shadow:0 0 0 2px var(--panel);}

.plan-foot{display:flex; align-items:baseline; gap:10px; margin-top:9px;}
.pf-k{font-size:11.5px; color:var(--muted); flex:0 0 auto;}
.pf-d{font-size:10.5px; color:var(--muted2); flex:1; min-width:0; text-align:right;}
.pf-go{font-size:15px; color:var(--muted2); flex:0 0 auto; line-height:1;}
.plans-panel .plan-row:hover .pf-go{color:var(--pl);}

/* calendar */
.tabs{display:flex; gap:2px; padding:2px; background:var(--neutral-tint); border-radius:999px;}
.tabs button{padding:5px 11px; border-radius:999px; font-size:11.5px; font-weight:500; color:var(--muted2);}
.tabs button.active{background:var(--ink); color:#FFF;}
.cal-body{padding:0 16px 16px;}
.cal-body[hidden]{display:none;}
.week-grid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px;}
.day-block{display:flex; flex-direction:column; align-items:center; padding:9px 2px 10px; border:1px solid var(--border); border-radius:9px; background:#FFF; text-align:center;}
.day-block .dow{font-family:"IBM Plex Mono",monospace; font-size:10px; color:var(--muted2);}
.day-block .date{font-size:14px; font-weight:500; margin-top:3px;}

/* THE BAR WELL IS THE TARGET, not the axis.
   The well's full height is the day's target, so a bar that reaches the top
   met it and a bar that stops short visibly did not. `.target-line` draws
   where the target sat, which is what makes a short bar legible as a
   SHORTFALL rather than just a small number — the second of the three
   channels the token file describes. */
.day-block .bar-well{position:relative; width:16px; height:44px; display:flex; align-items:flex-end; margin-top:8px;}
.day-block .bar-fill-v{width:100%; border-radius:3px; background:var(--blue); min-height:3px;}
.day-block .target-line{position:absolute; left:-3px; right:-3px; top:0; border-top:1.5px dashed var(--day-target-line);}

.day-block .load{font-family:"IBM Plex Mono",monospace; font-size:10px; color:var(--muted); margin-top:6px;}
/* The third channel: the state in words. Never remove this to save a line —
   without it the calendar is colour-only. */
.day-block .mark{font-family:"IBM Plex Mono",monospace; font-size:9.5px; line-height:1.3; margin-top:3px; color:var(--muted2);}

/* --- met the target --- */
.day-block.complete{background:var(--day-complete-bg); border-color:var(--day-complete-line);}
.day-block.complete .bar-fill-v{background:var(--day-complete);}
.day-block.complete .load{color:var(--day-complete);}
.day-block.complete .mark{color:var(--day-complete); font-weight:500;}

/* --- fell short --- */
.day-block.missed{background:var(--day-missed-bg); border-color:var(--day-missed-line);}
.day-block.missed .bar-fill-v{background:var(--day-missed);}
.day-block.missed .load{color:var(--day-missed);}
.day-block.missed .mark{color:var(--day-missed); font-weight:500;}

/* --- today, still open --- */
.day-block.today{border-color:var(--day-today); background:var(--day-today-bg);}
.day-block.today .bar-fill-v{background:var(--day-today);}
.day-block.today .load{color:var(--blue-deep);}
.day-block.today .mark{color:var(--blue-deep);}

/* --- not here yet --- */
.day-block.planned .bar-fill-v{background:transparent; border:1.5px dashed var(--day-planned); border-bottom:none; border-radius:3px 3px 0 0;}
.day-block.planned .load,
.day-block.planned .mark{color:var(--blue-deep);}
.day-block.planned .target-line{display:none;}

/* --- no target was set --- */
.day-block.rest{background:var(--panel); border-color:var(--border-soft);}
.day-block.rest .bar-well{visibility:hidden;}
.day-block.rest .load,
.day-block.rest .mark{color:var(--day-rest);}

.legend{display:flex; align-items:center; gap:10px 13px; flex-wrap:wrap; margin-top:12px; padding-top:11px; border-top:1px solid var(--border-soft); font-size:11px; color:var(--muted);}
.legend .k{display:flex; align-items:center; gap:5px;}
/* THE LEGEND IS THE ONE PLACE COLOUR HAS NO BACKUP.
   A day block says "✓ done" or "−9m" in words, so it survives greyscale. Its
   legend swatch has no words — in greyscale all five became the same dot.
   So each state gets a SHAPE as well as a colour: circle, square, ringed
   circle, dashed circle, hollow circle. Check this the same way, by putting
   `filter:grayscale(1)` on <html> and seeing if you can still tell them
   apart. */
.legend .sw{width:9px; height:9px; border-radius:50%; background:var(--blue); flex:0 0 auto;}
.legend .sw.complete{background:var(--day-complete);}                      /* ● circle        */
.legend .sw.missed{background:var(--day-missed); border-radius:2px;}       /* ■ square        */
.legend .sw.today{background:var(--day-today); box-shadow:0 0 0 2px #FFF, 0 0 0 3.5px var(--day-today);
                  margin:0 3px;}                                           /* ◉ ringed        */
.legend .sw.planned{background:transparent; border:1.5px dashed var(--day-planned);} /* ◌ dashed */
.legend .sw.rest{background:#FFF; border:1px solid #C9D0CB;}               /* ○ hollow        */

.month-grid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px;}
.month-grid .dow-label{font-family:"IBM Plex Mono",monospace; font-size:10px; color:var(--neutral-ink); text-align:center; padding-bottom:4px;}
.month-cell{aspect-ratio:1.15; border-radius:9px; background:#FFF; border:1px solid var(--border); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;}
/* The month grid speaks the same five states as the week grid. It used to
   say "studied", which collapsed a day that met its target and a day that
   missed it into one blue square — the exact distinction the week view was
   just built to make. Two vocabularies for one idea is how a student learns
   to distrust both. */
.month-cell.complete{background:var(--day-complete-bg); border-color:var(--day-complete-line);}
.month-cell.complete .num{background:var(--day-complete); color:#FFF; font-weight:600;}
.month-cell.missed{background:var(--day-missed-bg); border-color:var(--day-missed-line);}
.month-cell.missed .num{background:var(--day-missed); color:#FFF; font-weight:600;}
.month-cell.planned{border-color:var(--border);}
.month-cell.today{border-color:var(--day-today); box-shadow:0 0 0 1px var(--day-today) inset;}
.month-cell.today .num{background:var(--day-today); color:#FFF; font-weight:600;}
.month-cell .num{width:19px; height:19px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px;}
.month-cell .dot-mini{width:4px; height:4px; border-radius:50%; background:var(--blue-pale);}
.month-cell.blank{visibility:hidden;}

/* The year view was removed: twelve months of bars, eleven of them empty,
   answered a question nobody opens this screen to ask. Month and Week do.
   Its tokens stayed in tokens.css — nothing else used them, but they cost
   nothing and a year view may come back as its own page. */

/* ---------- Dates that matter ------------------------------------------
   Plain rows, on request: what it is, what it is called, when it is, and
   the countdown on the right. The dates themselves stay corrected against
   the plan model and ordered nearest-first. */
.date-row{display:flex; align-items:center; gap:12px; padding:12px 18px; border-top:1px solid var(--border-soft);}
.date-row .info{flex:1; min-width:0;}
.date-row .kind{font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:0.08em; text-transform:uppercase;}
.date-row .kind.exam{color:var(--amber-deep);}
.date-row .kind.mock{color:var(--neutral-ink);}
.date-row .kind.subject{color:var(--blue-deep);}
.date-row .name{font-size:13px; font-weight:500;}
.date-row .sub{display:block; font-size:11.5px; color:var(--muted); margin-top:3px;}
.date-row .d{font-family:"Source Serif 4",Georgia,serif; font-size:17px; white-space:nowrap;}
.date-row .d{font-family:"Source Serif 4",Georgia,serif; font-size:17px; white-space:nowrap;}
.more-dates{width:100%; padding:11px 18px; border-top:1px solid var(--border-soft); font-size:12px; color:var(--blue); background:var(--panel);}
.more-dates:hover{color:var(--ink);}
/* Inside the notebook the same control has to stay on the paper: the grey
   panel background and the solid rule both cut straight through the cream. */
.notebook-panel .more-dates{background:transparent; border-top:1px dashed #E7D6A6; color:var(--amber-deep);}
.notebook-panel .more-dates:hover{color:var(--ink);}

/* subjects */
.subjects-panel{margin-top:0; min-width:0;}
/* 240px, not 150px. In the 652px half this panel now occupies that means
   two columns and therefore TWO ROWS, which is what makes it as tall as the
   notebook beside it. It still collapses to one column on a phone with no
   breakpoint involved — the old `minmax(150px)` fitted four cards across and
   left 281px of dead grey under them. */
.subjects-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr)); gap:12px; padding:0 18px 18px;}
/* `align-content:start` keeps a card the height its content needs. Without it
   the grid stretched both rows to fill the panel and every card carried ~90px
   of white under its progress bar — the same dead space as before, just moved
   inside the cards where it is harder to see and worse to look at. */
.subjects-grid{align-content:start;}
/* ---------- the subject tiles ------------------------------------------
   Four white rectangles told you nothing until you read them. Each tile now
   carries its subject's colour as a wash and a top edge, and its progress as
   a ring rather than a fifth identical bar — the same ring language as the
   student card, so the page reads as one product. The name, the figures and
   the percentage are all still in words: the colour is what makes the four
   distinguishable at a glance, never what carries the meaning. */
.subject-card{position:relative; display:flex; flex-direction:column; padding:15px 16px 16px;
  border:1px solid var(--border); border-radius:11px; background:#FFF; overflow:hidden;}
.subject-card::before{content:''; position:absolute; left:0; right:0; top:0; height:3px; background:var(--sc-accent, var(--border));}
.subject-card:hover{border-color:var(--sc-accent, var(--blue)); box-shadow:0 12px 26px -20px rgba(24,33,29,.6);}
.subject-card.maths  {--sc-accent:var(--blue);       background:linear-gradient(168deg, var(--blue-tint) 0%, #FFF 58%);}
.subject-card.english{--sc-accent:var(--amber);     background:linear-gradient(168deg, var(--amber-tint) 0%, #FFF 58%);}
.subject-card.science{--sc-accent:var(--green);      background:linear-gradient(168deg, var(--green-tint) 0%, #FFF 58%);}
.subject-card.korean {--sc-accent:var(--purple);     background:linear-gradient(168deg, var(--purple-tint) 0%, #FFF 58%);}
.subject-card .head{display:flex; align-items:center; gap:8px 11px; flex-wrap:wrap;}
.subject-card .icon{width:38px; height:38px; flex:0 0 auto; border-radius:10px; display:inline-flex; align-items:center; justify-content:center;}
.subject-card .name{font-size:15px; font-weight:600; letter-spacing:-0.01em; flex:1 1 60px; min-width:0;}
.status-pill{padding:3px 9px; border-radius:999px; font-size:11px; font-weight:500; white-space:nowrap;}
.status-pill.on{background:var(--blue-tint); color:var(--blue-deep);}
.status-pill.behind{background:var(--amber-tint); color:var(--amber-deep);}
.status-pill.neutral{background:var(--neutral-tint); color:var(--neutral-ink);}

.sc-body{display:flex; align-items:center; gap:14px; margin-top:14px;}
.sc-ring{position:relative; width:62px; height:62px; flex:0 0 auto; color:var(--sc-accent, var(--blue));}
.sc-ring svg{width:100%; height:100%; display:block;}
.sc-pct{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--ink);}
.sc-figures{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px;}
.subject-card .big{display:flex; align-items:baseline; gap:6px;}
.subject-card .big .n{font-family:"Source Serif 4",Georgia,serif; font-size:24px; line-height:1; letter-spacing:-0.025em;}
.subject-card .big .of{font-size:11.5px; color:var(--muted);}
.subject-card .plan-name{display:block; font-size:11.5px; color:var(--muted);}
.subject-card .unit{font-size:10px; letter-spacing:0.06em; text-transform:uppercase; color:var(--muted2);}

/* WHERE THE EMPTY SPACE WAS.
   `320px 1fr` gave the notebook a narrow column it grew tall in (554px) and
   the subjects a wide one they stayed short in (273px) — 281px of nothing,
   bottom right, the most visible gap on the page. Two equal halves let both
   panels take the height their content wants and land within ~40px of each
   other. `align-items:stretch` is deliberate: the panels then share a
   baseline instead of hanging from the top at different lengths. */
/* ======================= SITE FOOTER =======================================
   The legal block Korean law requires (전자상거래법 제10조, 개인정보 보호법
   제30·31조, 정보통신망법 제42조의3). It is a legal notice, so it is quiet by
   design — but quiet is not the same as unreadable, and this is the part of a
   page that most often gets set at 10px in #BBB.

   It sits on a CARD, not on the page gradient, and that is a contrast
   decision rather than a stylistic one. Measured against the gradient's
   darkest stop (#DEE2E5) the footer's own palette failed: --muted 4.32,
   --muted2 3.67, --blue 4.34, all under the 4.5 AA line. On white the same
   three tokens give 5.63, 4.79 and 5.65. Every other block on this page sits
   on a card anyway, so this costs nothing and fixes it outright.

   Body text is 12px rather than the 10px these blocks usually get, because a
   disclosure nobody can read has not been disclosed.

   `lang="ko"` on the <footer> matters: the page is lang="en", and without it
   a screen reader pronounces 개인정보처리방침 with an English voice. */
.site-foot{
  margin-top:16px; padding:22px 24px 20px;
  background:var(--card); border:1px solid var(--border); border-radius:12px;
  font-size:12px; line-height:1.7; color:var(--muted);
}
.foot-links{display:flex; flex-wrap:wrap; gap:8px 20px; margin-bottom:16px;}
.foot-links a{color:var(--ink-soft); font-size:12.5px;}
.foot-links a:hover{color:var(--blue);}
/* The privacy policy is set apart rather than listed as one link among five —
   the PIPC's guidance is that it be distinguishable, and every Korean site
   you have ever seen bolds it for exactly this reason. */
.foot-links a.foot-strong{color:var(--ink); font-weight:600;}

/* Term/value pairs, so the structure survives being read aloud: a <dl> tells
   a screen reader that "사업자등록번호" labels the number after it. A row of
   <span>s separated by "|" does not. */
.foot-info{display:flex; flex-wrap:wrap; gap:4px 22px; margin:0 0 14px;}
.foot-info > div{display:flex; align-items:baseline; gap:7px; min-width:0;}
.foot-info dt{color:var(--muted2); font-size:11px; white-space:nowrap;}
.foot-info dd{margin:0; color:var(--ink-soft); font-size:12px; min-width:0; overflow-wrap:anywhere;}
.foot-info dd.mono{font-size:11.5px; letter-spacing:0.01em;}

/* A VALUE NOBODY HAS FILLED IN YET. The dotted underline is the point: a
   placeholder business-registration number that looks like a real one is how
   a placeholder reaches production. Delete the class with the value.
   #8A938C rather than a paler grey so the mark clears 3:1 on white and is
   actually visible — an invisible reminder is not a reminder. */
.tbd{border-bottom:1px dotted #8A938C;}

.foot-contact{display:flex; flex-wrap:wrap; gap:6px 26px; padding-top:14px; border-top:1px solid var(--border-soft);}
.foot-ch{display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; min-width:0;}
.foot-ch-label{color:var(--muted2); font-size:11px; white-space:nowrap;}
.foot-ch a{color:var(--blue); font-size:13px; font-weight:500;}
.foot-ch a:hover{color:var(--blue-deep);}
.foot-hours{color:var(--muted2); font-size:11.5px;}

.foot-copy{display:flex; flex-wrap:wrap; gap:4px 16px; margin:16px 0 0; font-size:11.5px; color:var(--muted2);}
.foot-note a{color:var(--muted); text-decoration:underline; text-underline-offset:2px;}
.foot-note a:hover{color:var(--blue);}

@media (max-width:560px){
  .foot-info{gap:2px 0;}
  .foot-info > div{flex-basis:100%;}
}

.lower-row{display:grid; grid-template-columns:repeat(auto-fit,minmax(min(420px,100%),1fr)); gap:16px; margin-top:16px; align-items:start;}

/* CONTAINER QUERIES, and why these two panels earn them.
   These panels sit in a half-width column here, and could sit in a narrow
   dashboard column tomorrow. A media query cannot tell those apart — it only
   knows how wide the WINDOW is — so it would have to guess, and guess wrong
   the moment a panel moves. `container-type:inline-size` lets each panel ask
   the only question that matters: how much room do I actually have?
   Everything below keys off the panel, not the viewport. */
.lower-row > .panel{container-type:inline-size;}

/* Three of the five rules that used to live here are gone: `.stat-row`,
   `.subjects-grid` and `.lower-row` all size themselves with
   `auto-fit`/`minmax` now, so they reflow continuously instead of jumping at
   a width somebody picked once. What is left is the genuinely structural
   change — three dashboard columns becoming one — and one alignment tweak. */
@media (max-width: 1080px){
  .dashboard{grid-template-columns:1fr;}
}
@media (max-width: 680px){
  .hero{align-items:flex-start;}
}

/* ============================================================================
   THE SCREENS THE DASHBOARD LEADS TO
   /ui/lesson/   /ui/library/   /ui/notes/

   These reuse the dashboard's vocabulary rather than inventing a second one:
   .panel, .cta, .subj-tag, .subj-icon, .tick, .track, .bar-fill and the type
   scale all mean here what they mean there. A destination that looks like a
   different product is how a prototype stops proving anything about the flow.
   ========================================================================= */

.crumbs{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:6px 0 14px; font-size:12.5px; color:var(--muted);}
.crumbs a{color:var(--muted);}
.crumbs a:hover{color:var(--blue);}
.crumbs [aria-current]{color:var(--ink); font-weight:500;}
.crumb-sep{color:#C9D0CB;}

/* ---------- a lesson ------------------------------------------------------ */
.lesson-head{display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding-bottom:16px; border-bottom:1px solid var(--border-soft);}
.lesson-id{flex:1 1 280px; min-width:0;}
.lesson-head h1{font-family:"Source Serif 4",Georgia,serif; font-weight:500; font-size:clamp(21px,2.3vw,27px); line-height:1.15; letter-spacing:-0.025em; margin:0;}
.lesson-sub{font-size:12.5px; color:var(--muted); margin:6px 0 0;}

/* "You pressed Resume and we honoured it." Without this a student who left at
   step 2 and comes back to step 2 has no way to tell whether the app
   remembered or they just got lucky. */
.resume-note{display:flex; flex-direction:column; gap:2px; margin:0; padding:9px 14px; border-radius:10px;
  background:var(--blue-tint); border:1px solid var(--blue-pale); font-size:12px; color:var(--blue-deep);}
.resume-note-k{font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.1em; text-transform:uppercase;}

.lesson-grid{display:grid; grid-template-columns:240px minmax(0,1fr); gap:16px; margin-top:16px; align-items:start;}
@media (max-width:820px){ .lesson-grid{grid-template-columns:1fr;} }

.step-rail{list-style:none; margin:0; padding:0 10px 12px;}
.step-rail li a{display:flex; align-items:center; gap:10px; padding:8px 8px; border-radius:8px; color:var(--ink-soft); font-size:13px;}
.step-rail li a:hover{background:#F6F8FA;}
.rail-n{width:22px; height:22px; border-radius:50%; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  font-family:"IBM Plex Mono",monospace; font-size:11px; background:var(--border-soft); color:var(--muted);}
.rail-name{min-width:0; overflow-wrap:anywhere;}
.step-rail li.done .rail-n{background:var(--green-tint); color:var(--green);}
.step-rail li.current a{background:var(--blue-tint);}
.step-rail li.current .rail-n{background:var(--blue); color:#FFF; font-weight:600;}
.step-rail li.current .rail-name{font-weight:600; color:var(--ink);}
.rail-pct{font-size:10.5px; color:var(--muted);}

.rail-due{display:flex; flex-direction:column; gap:6px; padding:12px 18px 14px; border-top:1px dashed #E7D6A6; background:#FFFCF4;}
.rail-due-k{font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.1em; text-transform:uppercase; color:var(--amber-deep);}
.rail-due-q{font-size:12px; color:var(--ink-soft);}
.rail-due-q:hover{color:var(--amber-deep);}

.l-content{padding:4px 22px 18px; font-size:14.5px; line-height:1.72; color:var(--ink-soft);}
.l-lede{font-size:15.5px; line-height:1.68; color:var(--ink); margin:6px 0 16px;}
.l-content p{margin:0 0 14px;}
.l-callout{padding:13px 16px; border-radius:10px; background:var(--blue-tint); border:1px solid var(--blue-pale); margin:0 0 16px;}
.l-callout.warn{background:var(--amber-tint); border-color:#EDDCC0;}
.l-callout p{margin:5px 0 0; font-size:13.5px;}
.l-callout-k{font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.1em; text-transform:uppercase; color:var(--blue-deep);}
.l-callout.warn .l-callout-k{color:var(--amber-deep);}

.l-work{display:flex; flex-direction:column; gap:10px; margin:0 0 16px; padding:14px 16px; border:1px solid var(--border); border-radius:10px; background:var(--panel);}
.l-work-row{display:flex; gap:11px; align-items:flex-start; font-size:13.5px; line-height:1.6;}
.l-step-n{width:20px; height:20px; border-radius:50%; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  background:var(--blue); color:#FFF; font-family:"IBM Plex Mono",monospace; font-size:10.5px;}

.l-q{font-size:15px; font-weight:500; color:var(--ink); margin:0 0 12px;}
.l-options{display:grid; gap:8px; margin:0 0 14px;}
.l-option{display:flex; align-items:center; gap:11px; width:100%; padding:11px 14px; border:1px solid var(--line); border-radius:9px; background:#FFF; font-size:14px;}
.l-option:hover{border-color:var(--blue); background:var(--blue-tint);}
.l-option-k{width:21px; height:21px; border-radius:6px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  background:var(--neutral-tint); color:var(--neutral-ink); font-family:"IBM Plex Mono",monospace; font-size:11px;}
.l-hint{font-size:12.5px; color:var(--muted2); font-style:italic;}

.l-checklist{display:flex; flex-direction:column; gap:9px;}
.l-check{display:flex; align-items:center; gap:10px; font-size:13.5px;}
.l-check-dot{width:16px; height:16px; border-radius:50%; border:1.5px solid #B7BEB9; flex:0 0 auto;}
.l-check-dot.on{background:var(--green); border-color:var(--green);}

.lesson-foot{display:flex; align-items:center; gap:12px; padding:14px 22px; border-top:1px solid var(--border-soft); background:var(--panel);}
.lesson-foot-mid{flex:1; text-align:center; font-size:11px; color:var(--muted2);}

/* ---------- a subject ----------------------------------------------------- */
.subject-head{display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:18px 20px;}
.subject-id{flex:1 1 240px; min-width:0;}
.subject-head h1{font-family:"Source Serif 4",Georgia,serif; font-weight:500; font-size:clamp(22px,2.4vw,28px); line-height:1.15; letter-spacing:-0.025em; margin:0;}
.subject-sub{font-size:12.5px; color:var(--muted); margin:6px 0 0;}
.subject-progress{flex:1 1 220px; min-width:180px; max-width:300px;}
.subject-progress .big{display:flex; align-items:baseline; gap:6px;}
.subject-progress .big .n{font-family:"Source Serif 4",Georgia,serif; font-size:24px; line-height:1; letter-spacing:-0.025em;}
.subject-progress .big .of{font-size:11.5px; color:var(--muted);}
.subject-progress .track{display:block; height:5px; border-radius:3px; background:var(--border-soft); overflow:hidden; margin-top:9px;}
.subject-progress .foot{display:flex; align-items:baseline; gap:8px; margin-top:8px;}
.subject-progress .foot .unit{font-size:10px; letter-spacing:0.06em; text-transform:uppercase; color:var(--muted2); flex:1;}
.subject-progress .foot .pct{font-size:10.5px; color:var(--muted);}

.subject-due{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:16px; padding:13px 18px; border-radius:12px;
  background:linear-gradient(180deg,#FFFCF4 0%,#FDF6E7 100%); border:1px solid #F0E3C8; color:var(--ink); font-size:13px;}
.subject-due:hover{border-color:var(--amber-gold);}
.subject-due-k{font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.1em; text-transform:uppercase; color:var(--amber-deep);}
.subject-due .cta{margin-left:auto;}

.units{display:flex; flex-direction:column; gap:10px; margin-top:16px;}
.u-block{border:1px solid var(--border); border-radius:12px; background:var(--card); overflow:hidden;}
.u-head{display:flex; align-items:center; gap:12px; width:100%; padding:14px 18px;}
.u-head:hover{background:#F6F8FA;}
.u-n{font-size:10px; letter-spacing:0.08em; text-transform:uppercase; color:var(--muted2); white-space:nowrap;}
.u-name{flex:1; min-width:0; font-size:14.5px; font-weight:500;}
.u-count{font-size:11px; color:var(--muted); white-space:nowrap;}
.u-chev{color:#C9D0CB; transition:transform .15s;}
.u-block.open .u-chev{transform:rotate(90deg);}
/* Closed by default: a seven-unit list opened flat is a wall, and the only
   unit a student wants on arrival is the one they are in. */
.u-lessons{display:none;}
.u-block.open .u-lessons{display:block;}
.u-lesson{display:flex; align-items:center; gap:12px; padding:11px 18px; border-top:1px solid var(--border-soft); color:var(--ink); font-size:13.5px;}
.u-lesson:hover{background:#F6F8FA;}
.u-lesson.current{background:var(--blue-tint);}
.u-lesson.current:hover{background:#DFEBF5;}
.u-lesson.done .u-title{color:var(--muted);}
.u-title{flex:1; min-width:0; overflow-wrap:anywhere;}
.u-mins{font-size:10.5px; color:var(--muted2); white-space:nowrap;}

/* ---------- one wrong question -------------------------------------------- */
.review-panel{max-width:820px; margin:0 auto;}
.review-head{display:flex; align-items:flex-start; gap:15px; flex-wrap:wrap; padding:16px 22px 14px;}
.review-id{flex:1 1 260px; min-width:0;}
.review-head h1{font-family:"Source Serif 4",Georgia,serif; font-weight:500; font-size:20px; line-height:1.25; letter-spacing:-0.02em; margin:7px 0 0;}
.review-due{font-size:11.5px; color:var(--amber-deep);}
.review-from{display:inline-block; margin-top:6px; font-size:12px; color:var(--amber-deep);}
.review-from:hover{color:var(--ink);}
.pass-meter{display:flex; flex-direction:column; gap:5px; align-items:flex-end;}
.pass-slots{display:flex; gap:4px;}
.pass-slot{width:20px; height:6px; border-radius:3px; background:#EADFC4;}
.pass-slot.on{background:var(--green);}
.pass-note{font-size:11px; color:var(--amber-deep); white-space:nowrap;}

.review-body{padding:4px 22px 18px; border-top:1px dashed #E7D6A6;}
.review-q{font-size:15.5px; line-height:1.7; color:var(--ink); margin:16px 0 16px;}
.opts{display:grid; gap:8px; margin-bottom:18px;}
.opt{display:flex; align-items:center; gap:11px; padding:11px 14px; border:1px solid #E7D6A6; border-radius:9px; background:#FFFDF8; font-size:14px;}
.opt-k{width:21px; height:21px; border-radius:6px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  background:#F0E3C8; color:var(--amber-deep); font-family:"IBM Plex Mono",monospace; font-size:11px;}
.opt-text{flex:1; min-width:0; overflow-wrap:anywhere;}
/* The one you picked and the one that was right, told apart by more than
   colour: each carries a label. A red box and a green box alone would leave a
   colour-blind student guessing which was which. */
.opt.mine{background:var(--red-tint); border-color:var(--red-pale);}
.opt.mine .opt-k{background:var(--red-pale); color:var(--red-deep);}
.opt.right{background:var(--green-tint); border-color:#BCD6C7;}
.opt.right .opt-k{background:#BCD6C7; color:var(--green);}
.opt-flag{font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.08em; text-transform:uppercase; white-space:nowrap;}
.opt-flag.mine{color:var(--red);}
.opt-flag.right{color:var(--green);}

.why{padding:14px 16px; border-radius:10px; background:#FFF; border:1px solid var(--border);}
.why p{margin:6px 0 0; font-size:13.5px; line-height:1.7; color:var(--ink-soft);}
.why-k{font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.1em; text-transform:uppercase; color:var(--muted2);}
.review-foot{display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:14px 22px; border-top:1px dashed #E7D6A6;}
.review-foot .spacer{flex:1;}

/* ---------- a page that has nothing to show ------------------------------- */
.empty-state{padding:40px 28px; text-align:center; max-width:520px; margin:40px auto;}
.empty-title{font-family:"Source Serif 4",Georgia,serif; font-weight:500; font-size:21px; margin:0 0 8px;}
.empty-body{font-size:13.5px; color:var(--muted); margin:0 0 18px;}
.empty-body code{font-family:"IBM Plex Mono",monospace; font-size:12.5px; background:var(--neutral-tint); padding:1px 6px; border-radius:4px;}

/* ---------- cards that navigate are links -------------------------------- */
/* Middle-click, open-in-new-tab and the back button all work on an <a> and
   none of them work on a <button>. A screen reader also announces "link",
   which is what these are. */
a.resume-card, a.task-card, a.row, a.subject-card, a.notebook-card{color:inherit;}
a.row{background:#FFF;}
a.row:hover{background:#F6F8FA;}
a.notebook-card:hover{background:rgba(255,255,255,0.5);}

/* ---------- the month calendar's day popover ------------------------------ */
/* Fixed, on <body>, because .panel is overflow:hidden and would clip it at
   exactly the edges where the interesting days sit. */
.day-pop{
  position:fixed; z-index:70; width:252px; max-width:calc(100vw - 16px);
  padding:12px 14px 13px; border-radius:11px;
  background:var(--card); border:1px solid var(--border);
  box-shadow:0 14px 34px rgba(24,33,29,0.16), 0 2px 6px rgba(24,33,29,0.06);
  font-size:12.5px; color:var(--ink-soft);
  display:none; pointer-events:none;
}
.day-pop.open{display:block;}
.day-pop-head{display:flex; align-items:baseline; gap:10px; padding-bottom:7px; border-bottom:1px solid var(--border-soft);}
.day-pop-date{flex:1; min-width:0; font-size:12.5px; font-weight:500; color:var(--ink);}
.day-pop-load{font-size:11px; color:var(--ink); white-space:nowrap;}
.day-pop-of{color:var(--muted2);}
.day-pop-verdict{margin-top:7px; font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.08em; text-transform:uppercase;}
.day-pop-verdict.complete{color:var(--day-complete);}
.day-pop-verdict.missed{color:var(--day-missed);}
.day-pop-verdict.today{color:var(--blue-deep);}
.day-pop-verdict.planned{color:var(--muted2);}
.day-pop-list{list-style:none; margin:9px 0 0; padding:0; display:flex; flex-direction:column; gap:7px;}
.day-pop-item{display:flex; align-items:flex-start; gap:8px; line-height:1.45;}
.day-pop-mark{width:13px; height:13px; border-radius:50%; flex:0 0 auto; margin-top:2px;}
/* done vs still to do, told apart by fill as well as colour */
.day-pop-item.done .day-pop-mark{background:var(--day-complete); box-shadow:inset 0 0 0 2px var(--card), 0 0 0 1px var(--day-complete);}
.day-pop-item.done{color:var(--muted);}
.day-pop-item.todo .day-pop-mark{border:1.5px solid #B7BEB9;}
.day-pop-none{margin:9px 0 0; color:var(--muted2);}

/* The month cells became <button>s so a keyboard and a phone can reach the
   popover — hover is not an affordance on either. They must still look
   exactly like the cells they were. */
button.month-cell{width:100%; text-align:center;}
button.month-cell:hover{border-color:var(--blue);}
.u-rest{padding:10px 18px 12px 46px; border-top:1px dashed var(--border); font-size:12px; color:var(--muted2); background:var(--panel);}
.l-trap{padding:13px 16px; border-radius:10px; background:var(--red-tint); border:1px solid var(--red-pale); margin:0 0 16px;}
.l-trap-k{font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:0.1em; text-transform:uppercase; color:var(--red);}
.l-trap-a{margin:5px 0 6px !important; font-size:15px; font-weight:500; color:var(--red-deep);}
.l-trap p:last-child{margin:0 !important; font-size:13.5px;}

/* ---------- the whole library: every subject ------------------------------ */
.lib-top{margin:2px 0 16px;}
.lib-top h1{font-family:"Source Serif 4",Georgia,serif; font-weight:500; font-size:clamp(24px,3vw,32px); letter-spacing:-.025em; margin:0;}
.lib-top p{font-size:13.5px; color:var(--muted); margin:7px 0 0;}
.lib-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr)); gap:14px;}
.lib-card{display:flex; flex-direction:column; padding:18px 20px 19px; border:1px solid var(--border); border-radius:14px; background:var(--card); color:inherit;}
.lib-card:hover{border-color:var(--blue);}
.lib-head{display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
.lib-id{flex:1 1 90px; min-width:0; display:flex; flex-direction:column;}
.lib-name{font-size:17px; font-weight:600; letter-spacing:-.01em;}
.lib-plan{font-size:11.5px; color:var(--muted); margin-top:3px;}
.lib-card .big{display:flex; align-items:baseline; gap:6px; margin-top:16px;}
.lib-card .big .n{font-family:"Source Serif 4",Georgia,serif; font-size:26px; line-height:1; letter-spacing:-.025em;}
.lib-card .big .of{font-size:11.5px; color:var(--muted);}
.lib-card .track{display:block; height:5px; border-radius:3px; background:var(--border-soft); overflow:hidden; margin-top:10px;}
.lib-foot{display:flex; align-items:baseline; gap:8px; margin-top:9px; font-family:"IBM Plex Mono",monospace;}
.lib-foot .unit{font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted2); flex:1; min-width:0;}
.lib-foot .pct{font-size:10.5px; color:var(--muted);}
.lib-next{margin-top:13px; padding-top:11px; border-top:1px solid var(--border-soft); font-size:12px; color:var(--blue-deep); overflow-wrap:anywhere;}

/* ============================================================================
   YOUR PLANS

   The track is a horizontal stacked bar per plan, all four on ONE shared time
   axis. Each is a single hue in three ordinal steps — done · left · revision —
   and those steps are VALIDATED, not chosen: lightness monotone, ΔL ≥ 0.06
   between steps, and a light end clearing 2:1 against the white card. The
   first set failed that last check at 1.33:1, which is an invisible segment.

   Segments are separated by 2px of card showing through, never by a border.
   ========================================================================= */
.plan-card, .pt-wrap{--p1:#1E5B85; --p2:#5090BE; --p3:#8CB9D8;   /* maths · validated */}
.plan-card{border:1px solid var(--border); border-radius:14px; background:var(--card); padding:20px 22px 18px; margin-bottom:16px;}
.plan-card[data-tint="english"], .pt-wrap[data-tint="english"]{--p1:#7A5A22; --p2:#AB8440; --p3:#CBAE76;}
.plan-card[data-tint="science"], .pt-wrap[data-tint="science"]{--p1:#2F6B4F; --p2:#61997A; --p3:#8BB69F;}
.plan-card[data-tint="korean"],  .pt-wrap[data-tint="korean"] {--p1:#5B3A63; --p2:#8F6A97; --p3:#B99DBF;}

.plan-head{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:18px;}
.plan-id{flex:1 1 160px; min-width:0; display:flex; flex-direction:column;}
.plan-title{font-size:17px; font-weight:600; letter-spacing:-.01em;}
.plan-sub{font-size:11.5px; color:var(--muted); margin-top:3px;}

/* ---- the track ---- */
.pt{margin:0 0 18px;}
.pt-track{position:relative; height:16px; border-radius:8px; background:var(--border-soft);}
.pt-seg{position:absolute; top:0; height:16px; border-radius:8px;
  /* 2px of card between segments — the separator is a gap, not a stroke */
  box-shadow:0 0 0 2px var(--card);}
.pt-done{background:var(--p1); z-index:3;}
.pt-left{background:var(--p2); z-index:2;}
.pt-rev{background:var(--p3); z-index:1;}
.pt-proposed{background:repeating-linear-gradient(135deg,var(--p2) 0 6px,transparent 6px 12px), var(--card); z-index:2; border:1.5px dashed var(--p2);}
.pt-void{background:repeating-linear-gradient(135deg,#E4E8E4 0 5px,transparent 5px 10px); border:1.5px dashed #C9D0CB; z-index:1;}

/* Today is the only rule on the chart, so it is solid and full height —
   a dashed one would read as a projection, which it is not. */
.pt-now{position:absolute; top:-5px; bottom:-5px; width:2px; background:var(--ink); border-radius:1px; z-index:6;}
.pt-now::after{content:''; position:absolute; top:-3px; left:-2px; width:6px; height:6px; border-radius:50%; background:var(--ink);}

.pt-pin{position:absolute; top:22px; width:0; z-index:5;}
.pt-pin i{position:absolute; left:-5px; width:10px; height:10px; border-radius:50%; display:block;
  box-shadow:0 0 0 2px var(--card);}           /* the 2px surface ring */
.pt-pin.k-exam i{background:var(--amber-gold);}
.pt-pin.k-mock i{background:var(--neutral-ink);}
.pt-pin.k-plan i{background:var(--p1);}

.pt-keys{display:flex; align-items:center; gap:7px 16px; flex-wrap:wrap; margin-top:26px; font-size:11.5px; color:var(--muted);}
.key{display:inline-flex; align-items:center; gap:6px;}
.key::before{content:''; width:11px; height:11px; border-radius:3px; flex:0 0 auto;}
.key.done::before{background:var(--p1);}
.key.left::before{background:var(--p2);}
.key.rev::before{background:var(--p3);}
.key.proposed::before{background:repeating-linear-gradient(135deg,var(--p2) 0 3px,transparent 3px 6px); border:1px dashed var(--p2);}
.key.void::before{background:repeating-linear-gradient(135deg,#E4E8E4 0 3px,transparent 3px 6px); border:1px dashed #C9D0CB;}
.key.now::before{width:2px; border-radius:1px; background:var(--ink);}

/* ---- the numbers ---- */
.pstats{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1px; margin:0 0 16px; padding:0;
  border:1px solid var(--border); border-radius:11px; background:var(--border); overflow:hidden;}
.pstat{background:var(--card); padding:11px 14px 12px;}
.pstat dt{font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted2);}
.pstat dd{margin:5px 0 0; font-size:15px; font-weight:600; letter-spacing:-.01em;}
.pstat dd small{font-size:11.5px; font-weight:400; color:var(--muted);}
.pstat dd span{display:block; font-size:11px; font-weight:400; color:var(--muted); margin-top:3px; line-height:1.45;}

.plan-note{font-size:13.5px; line-height:1.7; color:var(--ink-soft); margin:0 0 14px;}

/* ---- the table view ---- */
.plan-dates summary{font-size:12.5px; color:var(--blue); cursor:pointer; padding:6px 0;}
.plan-dates summary:hover{color:var(--ink);}
.plan-dates table{width:100%; border-collapse:collapse; margin-top:8px; font-size:12.5px;}
.plan-dates th{text-align:left; font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted2); font-weight:400; padding:6px 10px 6px 0; border-bottom:1px solid var(--border);}
.plan-dates td{padding:9px 10px 9px 0; border-bottom:1px solid var(--border-soft); vertical-align:top;}
.plan-dates td.mono{font-size:11.5px; color:var(--muted); white-space:nowrap;}
.dwhen{text-align:right;}
.dk{display:inline-block; padding:1px 7px; border-radius:4px; font-family:"IBM Plex Mono",monospace; font-size:9px; letter-spacing:.06em; text-transform:uppercase; margin-right:6px;}
.dk.k-exam{background:var(--amber-tint); color:var(--amber-deep);}
.dk.k-mock{background:var(--neutral-tint); color:var(--neutral-ink);}
.dk.k-plan{background:var(--blue-tint); color:var(--blue-deep);}
.dsub{display:block; font-size:11px; color:var(--muted2); margin-top:3px;}

.plan-foot{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:14px; padding-top:14px; border-top:1px solid var(--border-soft);}
.plan-foot .cta:first-child{margin-right:auto;}

.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
.review-set{display:block; font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:.09em; text-transform:uppercase; color:var(--amber-deep); margin-bottom:7px;}

/* ============================================================================
   THE QUESTION BANK

   A drill-down, in our own vocabulary: the mode toggle is the calendar's
   `.tabs`, the crumb rows are `.row`, the leaf is a `.panel`, and the
   filters are `.chip`. Nothing new was invented that an existing component
   already did — the point of porting a screen is to end up with OUR screen.
   ========================================================================= */
.qsearch{margin-top:18px;}
.qsearch .ph{flex:1;}

.qmodes{display:inline-flex; gap:3px; padding:3px; background:var(--neutral-tint); border-radius:9px; margin-top:16px;}
.qmode{padding:8px 15px; border-radius:6px; font-size:12.5px; font-weight:500; color:var(--muted); }
.qmode:hover{color:var(--ink);}
.qmode.on{background:var(--card); color:var(--ink); box-shadow:0 1px 2px rgba(24,33,29,.06);}

/* ---- the trail ---- */
/* Six levels means six rows, which at a comfortable row height pushed the
   questions themselves below the fold. The trail is reference, not the
   content — so it is set tight and the leaf gets the room. */
.qcrumbs{display:grid; gap:1px; margin-top:16px; border:1px solid var(--border); border-radius:10px; background:var(--border); overflow:hidden;}
.qcrumb{display:flex; align-items:center; gap:12px; padding:9px 15px; background:var(--card); color:inherit;}
.qcrumb:hover{background:var(--blue-tint);}
.qcrumb:hover .qcrumb-x{color:var(--blue);}
.qcrumb-k{font-size:9.5px; letter-spacing:.1em; color:var(--muted2); min-width:118px; flex:0 0 auto;}
.qcrumb-v{flex:1; min-width:0; font-size:13.5px; font-weight:500; overflow-wrap:anywhere;}
.qcrumb-x{font-size:11.5px; color:var(--muted2); white-space:nowrap;}

/* ---- the level being asked ---- */
.qlevel{margin-top:16px; padding:18px 20px 20px; border:1px solid var(--border); border-radius:12px; background:var(--card);}
.qlevel-k{font-size:9.5px; letter-spacing:.1em; color:var(--blue-deep); font-weight:500;}
.qlevel-hint{font-size:12.5px; color:var(--muted); margin:7px 0 0; line-height:1.6;}
.qopts{display:grid; grid-template-columns:repeat(auto-fill,minmax(min(210px,100%),1fr)); gap:8px; margin-top:14px;}
.qopt{display:flex; align-items:center; gap:10px; padding:12px 14px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:inherit; font-size:13.5px;}
.qopt:hover{border-color:var(--blue); background:var(--blue-tint);}
.qopt-l{flex:1; min-width:0; overflow-wrap:anywhere;}
/* A board or a paper is identified by the number on the specification, so
   the code is set in mono and never wraps away from its name. */
.qopt-c{font-size:10.5px; color:var(--muted2); white-space:nowrap; padding:2px 7px; border-radius:4px; background:var(--neutral-tint);}

/* ---- the leaf ---- */
.qleaf{margin-top:16px;}
.qleaf-head{display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; padding:18px 20px 14px;}
.qleaf-id{flex:1 1 220px; min-width:0;}
.qleaf h2{font-family:"Source Serif 4",Georgia,serif; font-weight:500; font-size:21px; letter-spacing:-.02em; margin:0;}
.qleaf-path{font-size:11.5px; color:var(--muted2); margin:6px 0 0; line-height:1.6; overflow-wrap:anywhere;}
.qleaf-count{font-size:11.5px; color:var(--muted); white-space:nowrap;}

.qfilters{display:flex; flex-direction:column; gap:8px; padding:0 20px 16px;}
.qchips{display:flex; gap:6px; flex-wrap:wrap;}
.qchip{padding:6px 13px; border-radius:999px; background:var(--neutral-tint); font-size:11.5px; color:var(--neutral-ink); white-space:nowrap;}
.qchip:hover{background:var(--blue-tint); color:var(--blue-deep);}
.qchip.on{background:var(--ink); color:#FFF;}

.qrows{display:flex; flex-direction:column;}
.qrow{display:flex; align-items:center; gap:13px; padding:13px 20px; border-top:1px solid var(--border-soft); color:inherit;}
.qrow:hover{background:#F6F8FA;}
.qrow-n{width:22px; height:22px; border-radius:50%; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; background:var(--blue-tint); color:var(--blue-deep); font-size:11px;}
.qrow-body{flex:1; min-width:0; display:flex; flex-direction:column;}
.qrow-q{font-size:14px; line-height:1.5; overflow-wrap:anywhere;}
.qrow-meta{font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted2); margin-top:4px;}
.qempty{padding:20px; font-size:13.5px; color:var(--muted); border-top:1px solid var(--border-soft); margin:0;}

.qmore{display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:14px 20px; border-top:1px solid var(--border-soft); background:var(--panel); font-size:12.5px; color:var(--muted);}
.qmore .cta{margin-left:auto;}

.qreset{display:inline-block; margin-top:16px; padding:10px 18px; border:1px solid var(--line); border-radius:7px; font-size:13px; color:var(--ink);}
.qreset:hover{border-color:var(--ink);}

/* ============================================================================
   ONE PLAN, ON ITS OWN PAGE.

   The index card has to summarise, because three more are under it. On its
   own page a plan can lead with the number the student came for — how long
   is left — and then answer what that number raises: is this plan going to
   get there. Hence the order: countdown, the three phases in words, the
   chart, the numbers, the reasoning, the dates.
   ========================================================================= */
.pd-hero{--pd:var(--blue); --pd-tint:var(--blue-tint);
  position:relative; display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding:20px 22px; margin:2px 0 16px; border:1px solid var(--border); border-radius:16px;
  background:linear-gradient(140deg, var(--pd-tint) 0%, var(--card) 62%); overflow:hidden;}
.pd-hero::before{content:''; position:absolute; left:0; right:0; top:0; height:3px; background:var(--pd);}
.pd-hero[data-tint="english"]{--pd:var(--amber);  --pd-tint:var(--amber-tint);}
.pd-hero[data-tint="science"]{--pd:var(--green);  --pd-tint:var(--green-tint);}
.pd-hero[data-tint="korean"] {--pd:var(--purple); --pd-tint:var(--purple-tint);}
.pd-id{display:flex; align-items:center; gap:14px; flex:1 1 260px; min-width:0;}
.pd-id h1{font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:clamp(22px,2.8vw,30px);
  letter-spacing:-.025em; line-height:1.1; margin:0;}
.pd-sub{font-size:12.5px; color:var(--muted); margin:6px 0 0;}
.pd-pills{display:flex; gap:7px; flex-wrap:wrap; flex:0 0 auto;}
.pd-count{display:flex; align-items:baseline; gap:11px; flex:0 0 auto; padding-left:16px; border-left:1px solid var(--border);}
.pd-d{font-size:clamp(28px,3.6vw,40px); line-height:1; letter-spacing:-.035em; color:var(--pd);}
.pd-target{display:flex; flex-direction:column; font-size:12.5px; font-weight:500; color:var(--ink);}
.pd-target span{font-family:"IBM Plex Mono",monospace; font-size:10.5px; font-weight:400; color:var(--muted2); margin-top:2px;}
@media (max-width:620px){
  .pd-count{padding-left:0; border-left:0; width:100%;}
}

/* The plan in three sentences, before any chart draws it. */
.pd-phases{list-style:none; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));
  gap:1px; margin:0 0 16px; padding:0; border:1px solid var(--border); border-radius:14px;
  background:var(--border); overflow:hidden;}
.pd-phase{position:relative; display:flex; flex-direction:column; gap:4px; padding:15px 17px 16px; background:var(--card);}
.pd-phase::before{content:''; position:absolute; left:17px; right:17px; top:0; height:2px; background:var(--pt-c, var(--border));}
.pd-phase.teach{--pt-c:var(--blue);}
.pd-phase.rev{--pt-c:var(--blue-mid);}
.pd-phase.void{--pt-c:#C9D0CB;}
.pd-phase.last{--pt-c:var(--amber);}
.pd-ph-k{font-size:9.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--muted2);}
.pd-ph-v{font-size:24px; line-height:1.05; letter-spacing:-.03em;}
.pd-ph-s{font-size:11.5px; color:var(--muted); line-height:1.45;}

.pd-panel{margin-bottom:16px;}
.pd-pad{padding:2px 20px 6px;}
/* Two columns, not auto-fit: every plan has four stats or six, so two
   columns always fill exactly and the grid never shows an empty tile. An
   empty tile in a 1px-gap grid does not read as spare room — it reads as a
   number that failed to load. */
.pd-panel .pstats{grid-template-columns:repeat(2,minmax(0,1fr)); margin:0 0 4px; border:0; border-radius:0;}
.pd-two{display:grid; grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr)); gap:16px; align-items:start;}
.pd-note{margin:2px 20px 14px; max-width:72ch;}
.pd-actions{padding:0 20px 18px; margin:0;}
.pd-table{padding:0 20px 18px;}
.pd-table table{width:100%; table-layout:auto;}
.pd-table th, .pd-table td{text-align:left;}
.pd-table th:last-child, .pd-table td:last-child{text-align:right; width:1%; white-space:nowrap;}
.pd-table th:first-child, .pd-table td:first-child{width:1%; white-space:nowrap; padding-right:18px;}

/* Where to go next, without going back first. */
.pd-switch{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:8px 0 4px;}
.pd-switch-k{font-size:9.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--muted2); margin-right:2px;}
.pd-chip{display:flex; align-items:center; gap:9px; padding:9px 14px 9px 10px; border:1px solid var(--border);
  border-radius:999px; background:var(--card); color:inherit;}
.pd-chip:hover{border-color:var(--blue); background:var(--blue-tint);}
.pd-chip.all{padding-left:15px;}
.pd-chip-t{display:flex; flex-direction:column; font-size:12.5px; font-weight:500; line-height:1.25;}
.pd-chip-t span{font-size:10.5px; font-weight:400; color:var(--muted2); margin-top:2px;}
