:root {
  color-scheme: light;
  --paper: #f5f6f2;
  --surface: #ffffff;
  --well: #f0f3ed;
  --ink: #1a303c;
  --secondary: #43565d;
  --muted: #576a70;
  --line: #d9e1dc;
  --strong-line: #b4c5bd;
  --teal: #236b59;
  --teal-hover: #175240;
  --teal-wash: #e6f1e9;
  --navy: #182f46;
  --night: #112b3c;
  --rail-text: #eaf0ee;
  --rail-muted: #b1c5cb;
  --rail-width: 228px;
  --gold: #dfb477;
  --gold-ink: #704f18;
  --gold-wash: #faf0d9;
  --danger: #9b4135;
  --danger-wash: #faeae7;
  --focus: #a66b12;
  --shadow: 0 5px 18px rgba(17, 43, 60, .04);
  --serif: 'Hedvig Letters Serif', 'Georgia', 'Times New Roman', serif;
  --sans: 'DM Sans', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #10212a;
  --surface: #192d37;
  --well: #203740;
  --ink: #edf3ed;
  --secondary: #c5d5d2;
  --muted: #a9bec0;
  --line: #344b52;
  --strong-line: #506a70;
  --teal: #9bd7bf;
  --teal-hover: #b4e4cc;
  --teal-wash: #24483e;
  --navy: #152e43;
  --gold: #e7bd83;
  --gold-ink: #f0ca8f;
  --gold-wash: #423928;
  --danger: #f6afa0;
  --danger-wash: #472d2e;
  --focus: #efc67d;
  --shadow: 0 8px 23px rgba(0,0,0,.09);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --paper: #10212a;
    --surface: #192d37;
    --well: #203740;
    --ink: #edf3ed;
    --secondary: #c5d5d2;
    --muted: #a9bec0;
    --line: #344b52;
    --strong-line: #506a70;
    --teal: #9bd7bf;
    --teal-hover: #b4e4cc;
    --teal-wash: #24483e;
    --navy: #152e43;
    --gold: #e7bd83;
    --gold-ink: #f0ca8f;
    --gold-wash: #423928;
    --danger: #f6afa0;
    --danger-wash: #472d2e;
    --focus: #efc67d;
    --shadow: 0 8px 23px rgba(0,0,0,.09);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; min-width: 0; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.58 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
button, input, textarea, select { font: inherit; }
button, summary, select, input[type="checkbox"], input[type="radio"] { cursor: pointer; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: var(--teal-hover); }
img, svg { display: block; max-width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: .7rem; min-width: 0; padding: .9rem 1rem; }
legend { color: var(--secondary); font-weight: 650; padding: 0 .3rem; }
button, .button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .54rem .98rem;
  border: 1px solid var(--strong-line);
  border-radius: .54rem;
  background: var(--surface);
  color: var(--ink);
  font-size: .91rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button:hover, .button:hover { color: var(--ink); border-color: var(--teal); background: var(--well); }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: default; }
.primary, button.primary, .button.primary {
  background: #236752;
  border-color: #236752;
  color: white;
}
.primary:hover, button.primary:hover, .button.primary:hover { background: #174d3e; border-color: #174d3e; color: white; }
.secondary { background: var(--surface); border-color: var(--strong-line); }
.ghost { background: transparent; border-color: transparent; color: var(--teal); }
.ghost:hover { color: var(--teal-hover); border-color: var(--line); background: var(--teal-wash); }
.danger { background: var(--danger-wash); border-color: var(--danger); color: var(--danger); }
.danger:hover { background: var(--danger-wash); color: var(--danger); border-color: var(--danger); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }
::selection { color: #102a31; background: #b6d9c4; }
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); border: 0; }
.skip-link { position: fixed; top: .6rem; left: .6rem; z-index: 100; padding: .6rem 1rem; border-radius: .4rem; background: var(--surface); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(2.2rem, 4.5vw, 4.1rem); line-height: 1.04; letter-spacing: -.055em; }
h2 { font-size: clamp(1.55rem, 2.4vw, 2.05rem); line-height: 1.16; letter-spacing: -.04em; }
h3 { font: 650 1.09rem/1.35 var(--sans); letter-spacing: -.023em; }
h4 { font: 650 1rem/1.4 var(--sans); }
p + p { margin-top: .65rem; }
small { font-size: .825rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.35rem 0; }
.eyebrow { color: var(--teal); font: 730 .73rem/1.35 var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.lead { color: var(--secondary); max-width: 66ch; font-size: 1.02rem; line-height: 1.58; }
.muted { color: var(--muted); }
.icon, .button > svg, button > svg { flex: 0 0 auto; width: 1.16rem; height: 1.16rem; }
.icon { display: inline-block; vertical-align: -.18em; }
.actions, .toolbar, .row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.actions { margin-top: 1.05rem; }
.actions > *, .toolbar > *, .row > * { min-width: 0; }
.stack { display: grid; align-content: start; gap: .95rem; min-width: 0; }
.grid { display: grid; align-items: start; gap: 1.1rem; min-width: 0; }
.grid > * { min-width: 0; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem 1.1rem; }
.section-head > :first-child { min-width: 0; }
.section-head .eyebrow + h2, .section-head .eyebrow + h1 { margin-top: .38rem; }
.section-head p:not(.eyebrow) { color: var(--muted); }
.section-head .actions { margin-top: 0; }

.shell { min-height: 100vh; }
.sidebar {
  width: var(--rail-width);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.65rem .85rem 1rem;
  background: var(--night);
  color: var(--rail-text);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font: 550 1.65rem/1 var(--serif); letter-spacing: -.055em; }
.brand:hover { color: inherit; }
.brand img, .brand > svg { width: 2.4rem; height: 2.4rem; flex-shrink: 0; border-radius: .55rem; }
.sidebar .brand { margin: .12rem .65rem .85rem; color: white; }
.sidebar .brand img { box-shadow: 0 0 0 1px #42606d; }
.side-nav { display: grid; gap: .25rem; }
.side-nav a, .side-bottom a {
  display: flex;
  align-items: center;
  gap: .72rem;
  min-height: 45px;
  padding: .62rem .85rem;
  border-radius: .52rem;
  color: var(--rail-muted);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 580;
  line-height: 1.35;
}
.side-nav svg, .side-bottom svg { width: 1.14rem; height: 1.14rem; flex: 0 0 auto; }
.side-nav a:hover, .side-bottom a:hover { background: #203e4c; color: white; }
.side-nav a.active, .side-nav a[aria-current="page"], .side-bottom a.active { background: #294d52; color: #f3fbf5; box-shadow: inset 3px 0 #9bd5b8; }
.side-nav .eyebrow, .sidebar > .eyebrow { padding: .25rem .85rem; color: #a1bcc1; }
.side-bottom { margin-top: auto; padding-top: 1rem; border-top: 1px solid #33505d; color: var(--rail-muted); }
.side-bottom button { color: #f2f7f3; border-color: #4a656e; background: #1b3744; }
.side-bottom button:hover { background: #294956; }
.workspace { min-width: 0; margin-left: var(--rail-width); }
.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  padding: .73rem clamp(1.25rem, 3.4vw, 3.7rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--secondary);
  font-size: .9rem;
}
.topbar > * { min-width: 0; }
.page {
  width: min(100%, 1480px);
  margin: auto;
  padding: clamp(1.3rem, 3.2vw, 3rem) clamp(1.25rem, 3.4vw, 3.7rem) 4rem;
}
.page > * + *, .home-main > * + * { margin-top: 1.45rem; }
.mobile-nav { display: none; }
.status, .badge, .pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .38rem;
  padding: .22rem .6rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: .79rem;
  font-weight: 640;
  line-height: 1.4;
  color: var(--secondary);
  background: var(--well);
}
.status { color: var(--teal); background: var(--teal-wash); }
.badge.gold, .pill.gold, .badge.warning { color: var(--gold-ink); background: var(--gold-wash); }
.badge.teal, .pill.teal { color: var(--teal); background: var(--teal-wash); }
.sidebar .status, .sidebar .badge { background: #213f46; color: #c3e5d2; border-color: #48666b; }

.hero {
  position: relative;
  display: flex;
  isolation: isolate;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  padding: clamp(1.4rem, 3.2vw, 3rem);
  border-radius: 1.1rem;
  color: #f4f6ed;
  background: #173b43;
}
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(105deg,#163641 5%,#1c4549 70%,#24524f);
}
.hero-body { flex: 1 1 auto; min-width: 0; position: relative; z-index: 1; }
.hero h1, .hero h2, .hero h3 { color: #f7f6e8; }
.hero h1, .hero h2 { font-family: var(--serif); font-size: clamp(2.15rem, 3.65vw, 3.7rem); font-weight: 500; letter-spacing: -.055em; line-height: 1.04; }
.hero .eyebrow { color: #c6d8b3; }
.hero .lead, .hero p:not(.eyebrow) { color: #e0eae1; }
.hero-body > * + * { margin-top: .75rem; }
.hero .actions { margin-top: 1.25rem; }
.hero .primary { background: #d5e8d4; border-color: #d5e8d4; color: #1a3c37; }
.hero .primary:hover { background: #e2f1dc; border-color: #e2f1dc; color: #15352f; }
.hero .secondary, .hero .ghost { color: #f1f5ec; background: transparent; border-color: #698281; }
.hero .secondary:hover, .hero .ghost:hover { color: white; background: #2e5357; }
.hero .art, img.art { width: clamp(11rem, 25vw, 24rem); max-width: 42%; height: auto; flex: 0 0 auto; }
.panel, .card, .stat {
  min-width: 0;
  padding: clamp(1.1rem, 2vw, 1.65rem);
  border: 1px solid var(--line);
  border-radius: .92rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel > * + *, .card > * + * { margin-top: .82rem; }
.panel > .section-head + *, .card > .section-head + * { margin-top: 1.05rem; }
.card h3, .panel h3 { color: var(--ink); }
.card p, .panel > p { color: var(--secondary); }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { color: inherit; border-color: var(--teal); }
.stat { min-height: 108px; display: grid; align-content: start; gap: .38rem; }
.stat strong, .stat b { font-family: var(--serif); font-size: clamp(1.75rem, 3vw, 2.55rem); line-height: 1.1; font-weight: 500; letter-spacing: -.045em; }
.stat small, .stat span { line-height: 1.4; color: var(--muted); }
.empty {
  color: var(--muted);
  padding: 1.1rem;
  border: 1px dashed var(--strong-line);
  border-radius: .65rem;
  background: var(--well);
}
.empty h3, .empty strong { color: var(--ink); }
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1rem;
  flex-wrap: wrap;
  padding: .85rem 0;
  border-top: 1px solid var(--line);
}
.list-row:first-child { border-top: none; padding-top: 0; }
.list-row:last-child { padding-bottom: 0; }
.list-row > * { min-width: 0; }
.list-row .actions { margin-top: 0; }
.list-row small { color: var(--muted); }
.feedback, .notice {
  padding: .8rem 1rem;
  border: 1px solid var(--strong-line);
  border-left: 4px solid var(--teal);
  border-radius: .55rem;
  background: var(--teal-wash);
  color: var(--ink);
}
.feedback.error, .feedback.wrong, .notice.error, .notice.warning { border-left-color: var(--danger); background: var(--danger-wash); }
.notice.warning { border-color: var(--gold); background: var(--gold-wash); }

.fields { display: grid; gap: .9rem 1rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.field, .fields > label { display: grid; gap: .28rem; min-width: 0; color: var(--secondary); font-weight: 620; font-size: .91rem; }
.field.full, .fields .full { grid-column: 1/-1; }
label small { font-weight: 450; color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: .52rem .7rem;
  border: 1px solid var(--strong-line);
  border-radius: .5rem;
  background-color: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.4;
}
select { padding-right: 2rem; }
textarea { min-height: 6.5rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: #28735d; vertical-align: -.18rem; }
input[type="range"] { accent-color: #28735d; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .9; }
input[type="file"] { font-size: .86rem !important; }
input[type="file"]::file-selector-button { border: 0; border-radius: .3rem; padding: .3rem .6rem; background: var(--well); color: var(--ink); }
.tabs, .week { display: flex; flex-wrap: wrap; align-items: stretch; gap: .4rem; }
.tabs { padding: .28rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--well); width: fit-content; max-width: 100%; }
.tabs > * { min-height: 38px; padding: .45rem .75rem; color: var(--secondary); font-size: .9rem; font-weight: 650; border: 1px solid transparent; border-radius: .45rem; background: transparent; text-decoration: none; }
.tabs .active, .tabs [aria-selected="true"], .tabs [aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.week { gap: .5rem; }
.day { flex: 1 1 4rem; border-radius: .6rem; padding: .55rem .4rem; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.day.active, .day[aria-pressed="true"] { color: var(--teal); border-color: var(--teal); background: var(--teal-wash); }
.bar { display: block; width: 100%; height: .5rem; overflow: hidden; border-radius: 99px; background: var(--well); border: 1px solid var(--line); }
.bar-fill { display: block; height: 100%; background: #519783; border-radius: inherit; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; color: var(--ink); font-variant-numeric: tabular-nums; }
th, td { text-align: start; padding: .55rem .62rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: .84rem; font-weight: 650; }
.journal input { font-variant-numeric: tabular-nums; }
.journal :is(th,td):not(:first-child) { text-align: end; }

.home-nav { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1rem; border-bottom: 1px solid var(--line); padding: .9rem max(1.25rem, calc((100vw - 1190px) / 2)); background: var(--surface); }
.home-nav .brand { color: var(--ink); }
.home-nav nav { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.45rem; }
.home-nav nav a:not(.button) { color: var(--secondary); text-decoration: none; font-size: .94rem; font-weight: 580; }
.home-nav nav a:hover { color: var(--teal); }
.home-main { width: min(calc(100% - 2.5rem),1190px); margin: 0 auto; padding: clamp(1.35rem,3.8vw,3.5rem) 0 4rem; }
.home-main > * + * { margin-top: clamp(1.45rem,3vw,2.8rem); }
.home-main .hero h1 { font-size: clamp(2.4rem,5.4vw,5rem); }
.home-main .hero { min-height: 265px; }
.home-main .hero-body { max-width: 680px; }
.problem-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.placeholder { min-width: 0; color: var(--secondary); background: var(--well); border: 1px dashed var(--strong-line); border-radius: .6rem; padding: .85rem 1rem; }
.placeholder small { color: var(--muted); }
dialog {
  width: min(38rem, calc(100% - 2rem));
  padding: clamp(1.15rem, 3vw, 1.8rem);
  max-height: min(88dvh,52rem);
  overflow: auto;
  color: var(--ink);
  border: 1px solid var(--strong-line);
  border-radius: .95rem;
  background: var(--surface);
  box-shadow: 0 24px 70px #0d222957;
}
dialog::backdrop { background: rgba(8,24,35,.57); }
dialog > * + *, dialog form > * + * { margin-top: 1rem; }
dialog h2 { font-size: 1.65rem; }
dialog .actions { justify-content: flex-end; padding-top: .35rem; }
dialog:focus { outline: none; }
#toast:not(:empty) {
  position: fixed;
  z-index: 95;
  right: 1.25rem;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  max-width: min(26rem, calc(100% - 2.5rem));
  padding: .8rem 1rem;
  border: 1px solid #557580;
  border-radius: .65rem;
  background: #173743;
  color: #f4f7ee;
  box-shadow: 0 6px 25px #081a2533;
}

@media (min-width: 1500px) {
  .workspace .topbar { padding-inline: max(3.7rem, calc((100vw - var(--rail-width) - 1360px)/2)); }
}
@media (max-width: 1090px) {
  :root { --rail-width: 205px; }
  .four { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .page, .topbar { padding-inline: 1.55rem; }
  .hero .art { max-width: 37%; }
}
@media (max-width: 880px) {
  :root { --rail-width: 184px; }
  .sidebar { padding-inline: .65rem; }
  .side-nav a, .side-bottom a { padding-inline: .65rem; font-size: .9rem; }
  .three { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero { padding: 1.4rem; }
  .hero .art { max-width: 32%; }
  .problem-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .sidebar.open, .sidebar[data-open="true"] { display: flex; width: min(80vw, 260px); box-shadow: 0 0 0 100vmax #081a2580; z-index: 40; }
  .workspace { margin-inline-start: 0; }
  .mobile-nav { display: flex; }
  .topbar { min-height: 56px; padding: .6rem 1rem; }
  .page { padding: 1.25rem 1rem 3.2rem; }
  .home-nav { padding-inline: 1rem; min-height: 62px; }
  .home-main { width: calc(100% - 2rem); padding-top: 1.2rem; }
  .hero .art { max-width: 30%; }
  .home-main .hero { min-height: 185px; }
}
@media (max-width: 560px) {
  body { line-height: 1.52; }
  .page > * + * { margin-top: 1.06rem; }
  .two, .three, .fields { grid-template-columns: minmax(0,1fr); }
  .grid { gap: .75rem; }
  .four { gap: .62rem; }
  .panel, .card, .stat { padding: 1rem; border-radius: .75rem; }
  .stat { min-height: 92px; }
  .hero { gap: .25rem; padding: 1.22rem; border-radius: .8rem; }
  .hero .art { max-width: 26%; }
  .hero .lead { font-size: .95rem; }
  .hero h1, .hero h2 { font-size: clamp(1.95rem,8.3vw,2.65rem); }
  .home-main .hero h1 { font-size: clamp(2.2rem,10vw,3rem); }
  .button, button { min-height: 44px; }
  .week { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .day { padding: .42rem .15rem; }
  .list-row { align-items: flex-start; }
  .home-nav .brand { font-size: 1.45rem; }
  .home-nav nav { gap: .4rem .8rem; }
  .home-nav .button { padding-inline: .65rem; }
  dialog { width: calc(100% - 1.25rem); max-height: 90dvh; }
  .actions, .toolbar { gap: .45rem; }
}
@media (max-width: 375px) {
  .hero .art { display: none; }
  .four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar, .page { padding-inline: .75rem; }
  .home-main { width: calc(100% - 1.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Assignment and workspace elements shared by the real page templates. */
.skip { position: fixed; top: .6rem; left: .6rem; z-index: 80; padding: .6rem 1rem; border-radius: .4rem; color: var(--teal); background: var(--surface); transform: translateY(-180%); }
.skip:focus { transform: none; }
.topbar > .actions { margin: 0; gap: .85rem; }
#crumb { font-weight: 650; }
#profile { border: 1px solid var(--line); border-radius: 2rem; font-size: .87rem; color: var(--ink); }
#profile::before { content: ''; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #3f7664 0 19%, transparent 21%), radial-gradient(ellipse at 50% 96%, #3f7664 0 34%, transparent 36%), #d5e8db; }
.sidebar > .eyebrow { margin-bottom: -.9rem; }
.side-bottom { display: grid; gap: .45rem; }
.section-head .lead { margin-top: .55rem; }
.empty > * + * { margin-top: .35rem; }
.empty .button { margin-top: .75rem; }
.error:not(:empty) { color: var(--danger); font-weight: 600; }
.error:empty { display: none; }
.page:focus { outline: none; }
.home-nav, .home-main { --home-width: 1190px; }
.home-main > section[id] > .grid { margin-top: .95rem; }
.home-main > section[id] { scroll-margin-top: 1.25rem; }
.home-main > section[id] > .eyebrow { margin-bottom: .37rem; }
.home-main .section-head h2, #results > h2 { font-size: clamp(1.95rem, 3.2vw, 2.75rem); }
.home-main #tools .grid { align-items: stretch; }
.home-main #tools .panel { position: relative; padding: clamp(1.25rem, 2.5vw, 2rem); overflow: hidden; }
.home-main #tools .panel > p:not(.eyebrow) { max-width: 45ch; }
.home-main #tools .panel > h3 { font: 500 clamp(1.55rem, 2.3vw, 2.05rem)/1.18 var(--serif); letter-spacing: -.045em; }
.home-main #tools .panel > .eyebrow { padding-right: 2.75rem; min-height: 1.12rem; color: var(--teal); }
.home-main #tools .panel > .button { margin-top: 1.2rem; }
.home-main #tools .panel::after {
  content: '';
  position: absolute;
  right: 1.25rem;
  top: 1.05rem;
  width: 2rem;
  height: 2rem;
  background-color: var(--teal);
  -webkit-mask: var(--tool-shape) no-repeat center / contain;
  mask: var(--tool-shape) no-repeat center / contain;
  opacity: .8;
}
.home-main #tools .panel:first-child { --tool-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='7' width='23' height='21' rx='3'/%3E%3Cpath d='M5 13h23M11 4v6m11-6v6M10 18h5m-5 5h9'/%3E%3C/svg%3E"); }
.home-main #tools .panel:nth-child(2) { --tool-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='9' width='20' height='18' rx='2'/%3E%3Cpath d='M8 5h18a2 2 0 0 1 2 2v15M9 17h10m-10 4h6'/%3E%3C/svg%3E"); }
.home-main #tools .toolbar { padding-top: .8rem; gap: .3rem 1.2rem; }
.home-main #tools .toolbar a { padding: .38rem 0; font-size: .9rem; font-weight: 600; }
.home-main .problem-grid { margin-top: .85rem; }
.problem-grid .placeholder h2 { font: 640 1rem/1.35 var(--sans); letter-spacing: -.012em; }
.placeholder > * + * { margin-top: .32rem; }
.placeholder p { font-size: .91rem; color: var(--muted); }
.home-main .placeholder { padding: 1.05rem 1.18rem; }
#results { border-top: 1px solid var(--line); padding-top: 1.9rem; }
footer.home-main { border-top: 1px solid var(--line); padding-block: 1.1rem 1.8rem; font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) {
  .home-nav nav > a:not(.button) { display: none; }
  .home-main #tools .panel::after { right: 1rem; top: .85rem; width: 1.6rem; height: 1.6rem; }
  .topbar > .actions { gap: .3rem; }
  .topbar #crumb { display: none; }
  .problem-grid .placeholder, #results .placeholder { padding: .8rem .95rem; }
}

.chart-bars { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .32rem; }
.chart-day { display: grid; gap: .3rem; justify-items: center; min-width: 0; padding: .2rem; border: 1px solid transparent; background: transparent; color: var(--muted); }
.chart-day.active { border-color: var(--strong-line); background: var(--well); color: var(--ink); border-radius: .45rem; }
.chart-track { height: 57px; width: min(100%,20px); background: var(--well); display: flex; align-items: end; overflow: hidden; border-radius: .28rem; }
.chart-ink { display: block; width: 100%; background: var(--teal); }
.material-image { display: block; max-inline-size: 100%; max-block-size: 65vh; object-fit: contain; margin-bottom: 1rem; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
#answer-error, .error { color: var(--danger); }
#response { margin: 1rem 0 0; }
#response > .button { margin-top: .7rem; }
.journal { width: 100%; table-layout: fixed; }
.journal th:first-child { width: 46%; }
.journal input { min-width: 0; width: 100%; }
@media (max-width: 560px) {
  .journal th, .journal td { padding-inline: .22rem; }
  .journal input { padding-inline: .35rem; }
  .chart-day { padding-inline: 0; }
  .chart-day small { font-size: .72rem; }
}
.brand { white-space: nowrap; }
.chart-day { padding-inline: 0; }
.chart-day small { font-size: .72rem; white-space: nowrap; }
