@font-face {
  font-family: Instrument;
  src: url("instrument.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: DM;
  src: url("dm.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --paper: #f6f0e6;
  --ink: #302d2b;
  --terra: #c45d40;
  --peach: #e7b69e;
  --dim: #665d54;
  --rule: #d7ccbd;
  --tint: #f0e6d8;
  --surface: #fffdf9;
  --soft: #efe7dc;
  --accent-ink: #883d29;
  --serif: Instrument, Georgia, serif;
  --sans: DM, Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
}
:where(h1,h2,h3,h4,p,figure) { margin: 0; }
:where(h1,h2,h3) { font-family: var(--serif); font-weight: 400; line-height: 1.06; }
.wrap { width: min(1180px, calc(100% - clamp(36px, 8vw, 128px))); margin-inline: auto; }
.portalbar {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.portalbar > .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 78px; padding-block: 14px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand img, img.brand { display: block; width: clamp(148px, 15vw, 174px); height: auto; }
.topnav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.topnav a, .topnav button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; border: 0; background: transparent; padding: 5px 2px;
  font: 550 14px/1.25 var(--sans); color: var(--dim); text-decoration: none; cursor: pointer;
}
.topnav :is(a,button):hover, .topnav [aria-current="page"], .topnav .active {
  color: var(--ink); text-decoration: underline; text-underline-offset: 5px;
}
.topnav form { margin: 0; }
.portal-main { display: grid; align-content: start; gap: 24px; padding-block: clamp(28px, 4.8vw, 70px); }
.portal-main > *, .split > *, .panel > *, .fields > * { min-width: 0; }
.eyebrow {
  display: flex; align-items: center; gap: 10px; color: var(--accent-ink);
  font: 650 11px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .13em;
}
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.page-head h1, .auth-card h1, .student-hero h1 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.042em;
  font-size: clamp(46px, 5.8vw, 78px); line-height: .99; margin: 4px 0 10px;
}
.page-head > :where(div,section) { min-width: 0; }
.page-head > :is(h1,h2,p) { width: 100%; }
.page-head h2, .panel h2, .auth-card h2 { font: 400 clamp(31px, 3vw, 45px)/1.05 var(--serif); letter-spacing: -.028em; }
.panel h3 { font: 400 26px/1.13 var(--serif); }
.subtle, .compact small { font-size: 14px; line-height: 1.5; color: var(--dim); }
.actions, .chips, .week-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.actions { margin-top: 0; }
.button, button.secondary, a.secondary {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 43px; padding: 10px 19px; gap: 8px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 600 14px/1.3 var(--sans); text-align: center; text-decoration: none; cursor: pointer;
}
.button:hover { background: #4b4039; border-color: #4b4039; }
.button.secondary, a.secondary, button.secondary { background: transparent; color: var(--ink); border-color: #b7a99b; }
.button.secondary:hover, a.secondary:hover, button.secondary:hover { background: var(--soft); border-color: #8b7b6c; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.panel {
  padding: clamp(20px, 2.6vw, 36px); border: 1px solid var(--rule); border-radius: 13px;
  background: var(--surface); box-shadow: 0 2px 0 rgb(74 53 31 / 3%);
}
.panel + .panel { margin: 0; }
.panel > :is(h2,h3):first-child { margin-bottom: 13px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.panel-head :where(p) { margin-top: 4px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.stat { min-width: 0; display: grid; align-content: start; gap: 5px; padding: 16px 20px; background: #efe6d9; border: 1px solid var(--rule); border-radius: 10px; }
.stat :is(strong,b) { display: block; font: 400 clamp(30px, 3.3vw, 46px)/1 var(--serif); letter-spacing: -.035em; }
.stat :is(small,span) { color: var(--dim); font: 550 13px/1.4 var(--sans); }
.table-scroll { overflow-x: auto; max-width: 100%; overscroll-behavior-inline: contain; scrollbar-color: #baa998 transparent; }
.data-table, .check-grid { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
.data-table :is(th,td), .check-grid :is(th,td) {
  border-bottom: 1px solid #e5dacd; padding: 12px 11px; vertical-align: middle;
}
.data-table thead th, .check-grid thead th {
  color: var(--dim); font: 650 11px/1.4 var(--sans); letter-spacing: .035em;
  background: var(--soft); white-space: nowrap;
}
.data-table tbody :is(th,td), .check-grid tbody :is(th,td) { font: 450 14px/1.48 var(--sans); }
.data-table tbody tr:last-child > *, .check-grid tbody tr:last-child > * { border-bottom: 0; }
.data-table td a:not(.button), .compact a:not(.button), .foot a:not(.brand) { text-decoration: underline; text-underline-offset: 3px; }
.data-table :is(a,button).button { min-height: 35px; padding: 6px 12px; font-size: 12px; }
.stack, .fields, .field, .goals-editor { display: grid; align-content: start; gap: 14px; }
.fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-items: start; gap: 16px; }
.field { min-width: 0; gap: 5px; }
.field:has(textarea), .fields > .full { grid-column: 1 / -1; }
.field :is(label,legend), label.field, .fields > label, .form-row label {
  color: var(--ink); font: 550 14px/1.5 var(--sans);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]),
select, textarea {
  width: 100%; min-height: 44px; min-width: 0; padding: 10px 12px;
  border: 1px solid #bfb2a3; border-radius: 6px; background: #fffefb;
  font: 400 16px/1.45 var(--sans); color: var(--ink);
}
textarea { display: block; resize: vertical; min-height: 92px; }
::placeholder { color: #796e62; opacity: 1; }
:where(input,select,textarea)[aria-invalid="true"] { border-color: #a83f29; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }
.form-row, .goal-row { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.form-row > :not(.button):not(button):not([type="hidden"]) { flex: 1 1 160px; min-width: 0; }
.goals-editor { gap: 9px; }
.goal-row { padding: 12px; background: #faf6ef; border: 1px solid #e7dbce; border-radius: 8px; }
.goal-row > :where(label,.field,select,input:not([type="hidden"]),textarea) { flex: 1 1 140px; min-width: 0; }
.goal-row > :where(label,.field):first-child { flex-grow: 2; }
.goal-row > :is(button,.button) { flex: 0 1 auto; }
.week-nav :is(a,button) { white-space: nowrap; }
.week-nav strong { font-size: 14px; text-align: center; }
.notice, .problem, .empty { border-radius: 8px; padding: 13px 16px; font: 450 14px/1.5 var(--sans); }
.notice { color: #41382e; border: 1px solid #d4bb9e; background: #f8e8d4; }
.problem { color: #792e22; background: #f8e4db; border: 1px solid #d99e89; }
.notice a, .problem a { text-decoration: underline; }
.empty { border: 1px dashed #cbbba9; color: var(--dim); background: #fbf7ef; }
.auth-layout {
  width: min(1060px, calc(100% - 48px)); margin: clamp(26px, 5vw, 72px) auto;
  display: grid; grid-template-columns: 1fr minmax(310px,.9fr); align-items: stretch;
  border: 1px solid var(--rule); border-radius: 54px 14px 14px 14px; overflow: hidden; background: var(--surface);
}
.auth-visual {
  display: flex; flex-direction: column; justify-content: end; min-height: 410px; padding: clamp(24px, 4vw, 50px);
  background: linear-gradient(0deg, rgb(41 30 23 / 62%), transparent 58%), url("hero.webp") 57% 55%/cover;
  color: #fff9f0;
}
.auth-visual :is(h1,h2,p) { max-width: 20ch; }
.auth-visual :is(h1,h2) { font: 400 clamp(45px,5vw,77px)/.95 var(--serif); letter-spacing: -.045em; }
.auth-card { align-self: center; width: 100%; padding: clamp(24px, 4.4vw, 54px); }
.auth-card h1 { font-size: clamp(43px, 4.5vw, 64px); }
.auth-card :is(.stack,form) { margin-top: 20px; }
.auth-card .button { justify-self: start; }
.auth-card .subtle a { text-decoration: underline; text-underline-offset: 3px; }
.student-hero {
  display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(12px, 4vw, 50px);
  border-bottom: 1px solid var(--rule); padding-block: 0 clamp(14px,2.6vw,30px);
}
.student-hero > :only-child { grid-column: 1/-1; }
.student-hero > img, .student-hero > figure { width: 100%; height: clamp(160px,21vw,285px); border-radius: 64px 6px 6px 6px; object-fit: cover; object-position: 56% 56%; overflow: hidden; }
.student-hero figure img { width: 100%; height: 100%; object-fit: cover; }
.student-hero p:not(.eyebrow) { max-width: 66ch; }
.media-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); gap: 14px; }
.media-card { display: grid; align-content: start; gap: 8px; min-width: 0; }
.media-card img { display: block; width: 100%; height: auto; aspect-ratio: 360/130; object-fit: cover; border-radius: 7px; }
.media-card audio, .media-card video { width: 100%; max-width: 100%; }
.media-card h3 { font: 400 29px/1.1 var(--serif); }
.read-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
.reading-link { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 14px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.reading-link > :is(div,span):first-child { flex: 1; }
.reading-link:is(:hover,:focus-visible) { color: var(--accent-ink); }
.reading-link strong { font: 400 25px/1.12 var(--serif); }
.reading-link small { display: block; color: var(--dim); }
.check-grid { min-width: 640px; table-layout: fixed; }
.check-grid :is(th,td) { padding: 4px 1px; text-align: center; }
.check-grid :is(td,th):first-child {
  position: sticky; left: 0; z-index: 1;
  width: clamp(145px,28%,340px); padding: 9px 12px; text-align: left;
  border-right: 1px solid var(--rule); background: var(--surface); overflow-wrap: anywhere;
}
.check-grid thead th:first-child { z-index: 2; background: var(--soft); }
.check-grid thead th { padding-block: 10px; }
.check-grid thead :is(span,b,strong,small) { display: block; }
.check-grid :is(th,td).today { background: #f9eee2; color: var(--accent-ink); }
.check-hit {
  display: inline-grid; width: 44px; height: 44px; place-items: center;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer; vertical-align: middle;
}
.check-hit:hover { background: #f1e8dd; }
.check-hit input, input.check-hit {
  appearance: none; margin: 0; display: inline-grid; place-items: center;
  width: 24px; height: 24px; border: 1.5px solid #9a8978; border-radius: 6px; background: #fffdf8; cursor: pointer;
}
.check-hit input:checked, input.check-hit:checked { background: var(--ink); border-color: var(--ink); }
.check-hit input:checked::after, input.check-hit:checked::after {
  content: ""; width: 11px; height: 6px; border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper); transform: translateY(-1px) rotate(-45deg);
}
button.check-hit[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.check-hit :disabled { opacity: .5; cursor: wait; }
.save-status { min-height: 1.5em; color: var(--dim); font-size: 13px; line-height: 1.5; }
.save-status[role="alert"], .save-status.error { color: #8b3422; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  padding: 4px 10px; color: #66513e; background: #f4e8d9; border: 1px solid #deccb6;
  border-radius: 999px; font: 550 12px/1.35 var(--sans);
}
.split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; align-items: start; }
.compact { font-size: 14px; line-height: 1.48; }
ul.compact, ol.compact { margin: 0; padding-left: 20px; }
.compact li + li { margin-top: 6px; }
.chart-strips { display: flex; align-items: end; gap: clamp(4px,1vw,12px); }
.day-bar { flex: 1; min-width: 0; text-align: center; color: var(--dim); font-size: 12px; }
.day-bar :is(i,b) { display: block; min-height: 2px; background: var(--terra); border-radius: 3px 3px 0 0; }
.day-bar small { display: block; margin-top: 4px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding-block: 18px; border-top: 1px solid var(--rule); color: var(--dim); font-size: 13px; }
.foot img { width: 100px; height: auto; }
[hidden], .hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .portalbar > .wrap { gap: 8px 20px; flex-wrap: wrap; }
  .auth-layout { grid-template-columns: minmax(0,1fr); max-width: 530px; border-top-left-radius: 32px; }
  .auth-visual { min-height: 160px; padding: 22px; background-position: center 55%; }
  .auth-card { padding: 24px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .portal-main { gap: 16px; padding-block: 24px; }
  .portalbar > .wrap { min-height: 58px; padding-block: 10px; }
  .topnav { gap: 3px 12px; }
  .topnav a, .topnav button { min-height: 32px; font-size: 13px; }
  .panel { padding: 17px 14px; border-radius: 10px; }
  .page-head, .panel-head { align-items: start; gap: 10px; }
  .page-head h1, .student-hero h1 { font-size: clamp(42px,11vw,58px); }
  .panel-head { margin-bottom: 14px; }
  .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .stat { padding: 12px; }
  .read-list, .student-hero, .goal-row, .fields { grid-template-columns: minmax(0,1fr); }
  .student-hero { gap: 14px; }
  .student-hero > img, .student-hero > figure { height: 150px; border-top-left-radius: 38px; }
  .goal-row { display: grid; align-items: start; gap: 8px; }
  .goal-row :is(button,.button) { justify-self: start; }
  .week-nav { gap: 7px; }
  .check-grid { min-width: 555px; }
  .check-grid :is(td,th):first-child { width: 136px; padding-inline: 7px; }
  .data-table { min-width: 475px; }
  .data-table.check-grid { min-width: 555px; }
  .table-scroll { box-shadow: inset -7px 0 7px -9px #806f60; }
  .foot { min-height: 60px; flex-wrap: wrap; }
  .auth-layout { width: calc(100% - 32px); margin: 20px auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
