/* Jack Rose Tutoring: the "answer sheet" look.
   Paper, #2 pencil, a proctor's red pen, notebook-blue rules. */

:root {
  --paper: #f3eee3;
  --paper-deep: #ebe4d5;
  --graphite: #2a2926;
  --graphite-soft: #4a4843;
  --faint: #6b675e;
  --pencil: #e8b520;
  --red-pen: #b8322a;
  --rule: #c9d6e3;
  --rule-strong: #9fb3c8;

  --f-display: "Newsreader", Georgia, serif;
  --f-body: "Newsreader", Georgia, serif;
  --f-mono: "Spline Sans Mono", ui-monospace, Menlo, monospace;
  --f-hand: "Nanum Pen Script", "Comic Sans MS", cursive;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
html, body { margin: 0; }

body {
  background-color: var(--paper);
  color: var(--graphite);
  font-family: var(--f-body);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.15 0 0 0 0 0.13 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2.5px solid var(--graphite); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--graphite); color: var(--paper);
  padding: 8px 14px; z-index: 10; font-family: var(--f-mono); font-size: 14px;
}
.skip:focus { top: 12px; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.mono { font-family: var(--f-mono); }

/* ---------- Top bar ---------- */

.top {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1.5px solid var(--graphite);
}

.brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  text-decoration: none;
  font-family: var(--f-display); font-weight: 500;
  font-size: 23px; line-height: 1;
}
.brand em { font-style: normal; color: var(--faint); }


.top ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 26px;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
.top nav a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.oval {
  width: 16px; height: 11px; border-radius: 50%;
  border: 1.5px solid var(--graphite);
  position: relative; overflow: hidden;
}
.oval::after {
  content: ""; position: absolute; inset: 0;
  background: var(--graphite);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.top nav a:hover .oval::after,
.top nav a:focus-visible .oval::after,
.top nav a[aria-current="page"] .oval::after { transform: scaleX(1); }
.top nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) clamp(40px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}

.kicker {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 26px;
}
.kicker span { color: var(--rule-strong); margin: 0 6px; }

h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(44px, 6.6vw, 88px);
  line-height: .98; letter-spacing: -.015em;
  margin: 0 0 28px;
  text-wrap: balance;
}

.lede {
  font-size: clamp(20px, 2vw, 23px);
  max-width: 34ch; color: var(--graphite-soft);
  margin-bottom: 36px;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 0; }

.btn {
  display: inline-block;
  font: 600 15px/1 var(--f-mono); letter-spacing: .04em;
  color: var(--graphite); background: var(--pencil);
  border: 1.5px solid var(--graphite);
  padding: 16px 22px 15px;
  text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--graphite);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--graphite); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--graphite); }

.text-link { font-family: var(--f-body); font-style: italic; font-size: 19px; }

/* Name grid: the bubble columns from the top of an answer sheet */

.namegrid { margin: 0; position: relative; justify-self: center; }

.namegrid-sheet {
  background: #f7f3ea;
  border: 1.5px solid var(--graphite);
  padding: 14px 14px 16px 26px;
  position: relative;
  transform: rotate(1.2deg);
  box-shadow: 10px 12px 0 -2px var(--paper-deep), 10px 12px 0 -.5px var(--graphite);
}
.namegrid-sheet::before {
  /* scanner timing marks */
  content: ""; position: absolute; left: 8px; top: 48px; bottom: 16px; width: 7px;
  background: repeating-linear-gradient(to bottom, var(--graphite) 0 6px, transparent 6px 17px);
}

.namegrid-head {
  display: flex; gap: 10px;
  font: 600 11px/1 var(--f-mono); letter-spacing: .1em;
  border-bottom: 1px solid var(--graphite);
  padding-bottom: 8px; margin-bottom: 8px;
}

.namegrid-cols { display: flex; gap: 3px; }

.ng-col { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ng-col.gap { width: 10px; }

.ng-box {
  width: 24px; height: 30px;
  border: 1px solid var(--graphite);
  display: grid; place-items: center;
  font: 30px/1 var(--f-hand);
  margin-bottom: 4px;
  background: #fbf8f1;
}
.ng-box span { opacity: 0; transform: translateY(2px); transition: opacity .35s, transform .35s; }
.ng-col.is-done .ng-box span { opacity: 1; transform: none; }

.ng-b {
  width: 22px; height: 13px; border-radius: 50%;
  border: 1px solid #8f8a80;
  font: 500 7.5px/11px var(--f-mono); color: #8f8a80; text-align: center;
  position: relative;
}
.ng-b.on::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: 46% 54% 50% 48% / 52% 46% 54% 48%;
  background:
    radial-gradient(ellipse at 35% 35%, rgba(255,255,255,.12), transparent 55%),
    var(--graphite);
  transform: rotate(var(--r, 0deg)) scale(var(--s, 1.04));
  clip-path: inset(0 100% 0 0);
}
.ng-col.is-done .ng-b.on::after { animation: shade .55s cubic-bezier(.4,.1,.3,1) forwards; }

@keyframes shade {
  0% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}

.scrawl {
  position: absolute; left: -118px; bottom: 6px;
  font: 27px/1 var(--f-hand); color: var(--graphite);
  transform: rotate(-6deg);
  display: flex; flex-direction: column; align-items: flex-start;
}
.scrawl .arrow {
  width: 64px; height: 44px; margin: 0 0 4px 46px;
  transform: scaleX(-1) rotate(30deg);
  fill: none; stroke: var(--graphite); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Sections (booklet pages) ---------- */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter) 28px;
  border-top: 1.5px solid var(--graphite);
  display: grid;
  grid-template-columns: minmax(140px, 260px) minmax(0, 1fr);
  column-gap: clamp(24px, 5vw, 80px);
  position: relative;
}

.section-head { grid-row: span 2; }
.section-label {
  font: 600 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  display: inline-block; padding: 7px 10px 6px;
  background: var(--graphite); color: var(--paper);
  margin: 6px 0 18px;
}
.section-num {
  font: 400 clamp(90px, 12vw, 170px)/.8 var(--f-display);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--graphite);
  margin: 0;
}

.section-body { max-width: 640px; position: relative; }

h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(34px, 4.4vw, 54px); line-height: 1.02; letter-spacing: -.01em;
  margin: 0 0 22px;
}

.big { font-size: clamp(21px, 2.1vw, 25px); line-height: 1.45; }

.margin {
  font: 28px/1.05 var(--f-hand);
  position: absolute; right: -210px; top: 70px; width: 170px;
  transform: rotate(4deg); margin: 0;
}
.margin::before {
  content: ""; display: block; width: 36px; height: 2px; background: var(--graphite);
  margin-bottom: 8px; transform: rotate(-12deg);
}

.go-on {
  grid-column: 2;
  justify-self: end;
  font: 600 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint);
  margin: 48px 0 0;
}
.go-on span { font-size: 16px; margin-left: 6px; }
.go-on.stop {
  color: var(--graphite); font-size: 16px; letter-spacing: .2em;
  border: 1.5px solid var(--graphite); padding: 8px 14px 7px;
}

.section.page { border-top: 0; padding-bottom: 8px; }

a.go-on { text-decoration: none; color: var(--graphite); }
a.go-on:hover { text-decoration: underline; text-underline-offset: 5px; }

.section-body.wide { max-width: 920px; }

.prices-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 22px clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: 30px;
}
.prices-grid .tickets { margin-top: 0; }

.packer {
  border: 1.5px dashed var(--graphite);
  padding: 20px 22px 6px;
  background: rgba(255, 255, 255, .25);
}
.packer h3 {
  font: 600 12px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  margin: 0 0 12px;
}

/* Price tickets */

.tickets {
  list-style: none; padding: 0; margin: 34px 0 0;
  display: grid; gap: 18px;
}

.ticket {
  --notch: 11px;
  display: grid; grid-template-columns: 110px 1fr;
  background: #f8f4ec;
  border: 1.5px solid var(--graphite);
  position: relative;
}
.ticket:nth-child(2) { margin-left: clamp(0px, 2vw, 18px); }
.ticket:nth-child(3) { margin-left: clamp(0px, 4vw, 36px); }

.stub {
  border-right: 2px dashed var(--graphite);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 6px; position: relative;
}
.stub::before, .stub::after {
  /* notches where the stub tears off */
  content: ""; position: absolute; right: calc(var(--notch) * -1 - 1px);
  width: calc(var(--notch) * 2); height: calc(var(--notch) * 2);
  background: var(--paper); border: 1.5px solid var(--graphite); border-radius: 50%;
}
.stub::before { top: calc(var(--notch) * -1 - 1.5px); clip-path: inset(50% 0 0 0); }
.stub::after { bottom: calc(var(--notch) * -1 - 1.5px); clip-path: inset(0 0 50% 0); }

.stub-num { font: 600 34px/1 var(--f-mono); letter-spacing: -.02em; }
.stub-unit { font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }

.ticket-main {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  column-gap: 16px; padding: 18px 22px;
}
.ticket-name { font: 500 21px/1.2 var(--f-body); margin: 0; }
.price { font: 600 30px/1 var(--f-mono); margin: 0; grid-row: span 2; align-self: center; letter-spacing: -.02em; }
.per { font: 400 13px/1.3 var(--f-mono); color: var(--faint); margin: 6px 0 0; }

/* Packer: a red-pen correction on the price */

.correction {
  display: flex; align-items: center; gap: 18px;
  margin: 4px 0 22px;
}
.struck {
  font: 600 44px/1 var(--f-mono); color: var(--graphite-soft);
  position: relative;
}
.struck::after {
  content: ""; position: absolute; left: -6px; right: -8px; top: 52%;
  height: 3px; background: var(--red-pen); border-radius: 2px;
  transform: rotate(-8deg);
}
.fix {
  font: 54px/1 var(--f-hand); color: var(--red-pen);
  transform: rotate(-5deg) translateY(-6px);
  display: inline-block;
  padding: 0 10px;
  border: 2px solid var(--red-pen);
  border-radius: 48% 52% 46% 54% / 56% 44% 56% 44%;
}

/* ---------- Form ---------- */

.form-status {
  border: 1.5px solid var(--graphite);
  padding: 14px 18px; margin: 18px 0 0;
  font-size: 18px; background: #f8f4ec;
}
.form-status.is-bad { border-color: var(--red-pen); }
.form-status.is-bad::before { content: "Check this: "; font: 24px/1 var(--f-hand); color: var(--red-pen); }

.sheet-form {
  margin-top: 30px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px;
}

.field { grid-column: 1 / -1; margin: 0; min-width: 0; }
.field.half { grid-column: auto; }

.field label, .field legend {
  display: block;
  font: 600 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 8px; padding: 0;
}
.opt { font-weight: 400; color: var(--faint); text-transform: none; letter-spacing: 0; margin-left: 6px; }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  font: 400 20px/1.4 var(--f-body);
  color: var(--graphite);
  background: transparent;
  border: 0; border-bottom: 1.5px solid var(--graphite);
  padding: 6px 2px 8px;
  border-radius: 0;
}
textarea {
  border: 1.5px solid var(--graphite);
  padding: 10px 12px;
  resize: vertical;
  background:
    repeating-linear-gradient(to bottom, transparent 0 27px, var(--rule) 27px 28px) 0 9px / 100% 100% no-repeat,
    #f8f4ec;
  line-height: 28px;
}
input::placeholder { color: #77736a; font-style: italic; }
input:focus, textarea:focus { outline: none; background-color: rgba(232, 181, 32, .14); }
input:focus-visible, textarea:focus-visible { box-shadow: 0 2px 0 0 var(--graphite); }

.field.has-err input { border-bottom-color: var(--red-pen); }
.err { font: 23px/1.1 var(--f-hand); color: var(--red-pen); margin: 6px 0 0; min-height: 0; }
.err:empty { display: none; }

.bubbles-field { border: 0; padding: 0; margin: 0; }
.bubble-row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.bubble-row label {
  margin: 0; cursor: pointer; position: relative;
  text-transform: none; letter-spacing: 0;
}
.bubble-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bubble-row .b {
  display: grid; place-items: center;
  min-width: 48px; height: 32px; padding: 0 10px;
  border: 1.5px solid var(--graphite); border-radius: 50%;
  font: 500 14px/1 var(--f-mono);
  transition: background .15s, color .15s;
}
.bubble-row .b.wide { min-width: 76px; }
.bubble-row label:hover .b { background: rgba(42, 41, 38, .08); }
.bubble-row input:checked + .b {
  background: var(--graphite); color: var(--paper);
  border-radius: 46% 54% 50% 48% / 52% 46% 54% 48%;
}
.bubble-row input:focus-visible + .b { outline: 2.5px solid var(--graphite); outline-offset: 3px; }

.sheet-form .btn { justify-self: start; grid-column: 1 / -1; margin-top: 6px; }
.sheet-form.is-sending .btn { opacity: .6; pointer-events: none; }

/* ---------- Footer ---------- */

.foot {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 26px var(--gutter) 40px;
  border-top: 1.5px solid var(--graphite);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font: 400 13px/1.4 var(--f-mono); color: var(--faint);
}
.foot p { margin: 0; }

/* ---------- Simple pages (thanks, 404) ---------- */

.note-page {
  min-height: 60vh;
  max-width: 760px; margin: 0 auto;
  padding: clamp(56px, 10vw, 120px) var(--gutter);
}
.note-page h1 { font-size: clamp(48px, 8vw, 84px); }

/* ---------- Responsive ---------- */

@media (max-width: 1240px) {
  .margin { position: static; transform: rotate(-2deg); width: auto; margin-top: 10px; }
  .margin::before { display: none; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .namegrid { justify-self: start; margin-left: 8px; }
  .scrawl { left: auto; right: -110px; bottom: auto; top: 40%; }
  .scrawl .arrow { transform: rotate(30deg); margin-left: 0; }
  .section { grid-template-columns: 1fr; }
  .section-head { grid-row: auto; display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
  .section-num { font-size: 72px; }
  .section-label { margin: 0 0 6px; }
  .go-on { grid-column: 1; }
  .prices-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 18px; }
  .top { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 18px; padding-bottom: 16px; }
  .top ul { gap: 16px; font-size: 12px; flex-wrap: wrap; }
  .scrawl { display: none; }
  .namegrid { justify-self: center; margin-left: 0; }
  .ticket { grid-template-columns: 84px 1fr; }
  .ticket:nth-child(n) { margin-left: 0; }
  .stub-num { font-size: 36px; }
  .ticket-main { padding: 16px; }
  .price { font-size: 24px; }
  .sheet-form { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .ng-b { width: 19px; height: 12px; font-size: 7px; line-height: 10px; }
  .ng-box { width: 21px; }
  .namegrid-cols { gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ng-col .ng-box span { opacity: 1; transform: none; transition: none; }
  .ng-b.on::after { clip-path: none !important; animation: none !important; }
  .btn, .oval::after { transition: none; }
}

.home .foot { margin-top: 0; }

/* ---------- Profile home (2026-11-19 redesign) ---------- */

.profile {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 60px) var(--gutter) clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}

.profile h1 {
  font-size: clamp(40px, 4.6vw, 58px);
  line-height: 1;
  margin: 0 0 26px;
}

.facts {
  margin: 0 0 26px;
  border-top: 1.5px solid var(--graphite);
  max-width: 520px;
}
.facts div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0 11px;
  border-bottom: 1px solid var(--rule-strong);
}
.facts div:last-child { border-bottom: 1.5px solid var(--graphite); }
.facts dt {
  font: 600 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint);
}
.facts dd { margin: 0; font-size: 20px; }
.facts .num { font: 600 22px/1 var(--f-mono); letter-spacing: -.01em; }

.intro { max-width: 46ch; margin-bottom: 30px; }

/* sub pages: one plain column, normal-size title */
.section.page {
  display: block;
  max-width: 860px;
  padding-top: clamp(36px, 5vw, 64px);
}
.section.page .section-body { max-width: 680px; }
.section.page .section-body.wide { max-width: none; }
.section.page h1 {
  font-size: clamp(34px, 3.6vw, 44px);
  line-height: 1.05;
  margin: 0 0 18px;
}
.section.page .go-on { display: block; text-align: right; margin-top: 40px; }
.section.page:has(.margin) { max-width: 1060px; }
.section.page .margin { right: -230px; }

.note-page h1 { font-size: clamp(34px, 3.6vw, 44px); line-height: 1.05; margin: 0 0 18px; }

@media (max-width: 900px) {
  .profile { grid-template-columns: 1fr; }
  .profile .namegrid { justify-self: center; }
  .profile .scrawl { display: none; }
}
@media (max-width: 1240px) {
  .section.page .margin { position: static; }
}
@media (max-width: 480px) {
  .facts div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 640px) {
  .profile .namegrid { zoom: .72; }
  .actions { gap: 14px 22px; }
}

/* ---------- Hero v4: readable serif, photo + answer sheet ---------- */

h1, h2, .section.page h1, .note-page h1 { font-weight: 500; letter-spacing: -.005em; }

.hero2 {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero2 h1 {
  font-size: clamp(36px, 3.8vw, 50px);
  line-height: 1.1;
  margin: 0 0 20px;
  max-width: 16ch;
}
.hero2-copy p { font-size: 20px; max-width: 42ch; color: var(--graphite-soft); }
.hero2-copy .actions { margin-top: 30px; }

.hero2-art { position: relative; margin: 0; justify-self: center; padding-left: 40px; }
.hero2-art .namegrid-sheet { zoom: .8; }

.photo-clip {
  position: absolute; left: -70px; bottom: 26px;
  width: 170px;
  transform: rotate(-4deg);
}
.photo {
  aspect-ratio: 4 / 5;
  background: #e6dfd0;
  border: 7px solid #fbf8f1;
  box-shadow: 0 0 0 1px rgba(42,41,38,.35), 4px 6px 0 rgba(42,41,38,.18);
  display: grid; place-items: center; overflow: hidden;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo img + .photo-missing { display: none; }
.photo-missing {
  font: 22px/1.1 var(--f-hand); color: var(--faint);
  text-align: center; padding: 12px;
}
.clip {
  position: absolute; top: -16px; left: 64px; z-index: 2;
  width: 20px; height: 48px;
  border: 3px solid #8d8a84; border-radius: 10px;
  border-bottom-color: transparent;
}

.factbar {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1.5px solid var(--graphite);
  border-bottom: 1.5px solid var(--graphite);
}
.factbar div { padding: 16px 18px 14px; border-left: 1px solid var(--rule-strong); }
.factbar div:first-child { border-left: 0; padding-left: 0; }
.factbar dt {
  font: 600 11px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 6px;
}
.factbar dd { margin: 0; font: 600 24px/1 var(--f-mono); letter-spacing: -.01em; }

.home .foot { margin-top: 28px; }

@media (max-width: 900px) {
  .hero2 { grid-template-columns: 1fr; }
  .hero2-art { justify-self: center; }
}
@media (max-width: 640px) {
  .hero2-art .namegrid-sheet { zoom: .6; }
  .photo-clip { width: 120px; left: -34px; bottom: 18px; }
  .factbar { grid-template-columns: 1fr 1fr; }
  .factbar div:nth-child(3) { border-left: 0; padding-left: 0; }
  .factbar div:nth-child(n+3) { border-top: 1px solid var(--rule-strong); }
}

/* ---------- Busier frame: top strip, cards, dates, footer ---------- */

.strip { background: var(--graphite); color: var(--paper); }
.strip-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 9px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px;
  font: 500 13px/1.4 var(--f-mono);
}
.strip-label {
  background: var(--pencil); color: var(--graphite);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 11px;
  padding: 2px 7px 1px;
}
.strip-date { font-weight: 600; }
.strip-deadline { color: #d9d3c6; }
.strip a { color: var(--paper); margin-left: auto; }

.home-more {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr);
  gap: 16px;
  margin-top: 26px;
}

.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px 18px;
  border: 1.5px solid var(--graphite);
  background: #f8f4ec;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--graphite); text-decoration: none; }
.card-title { font: 500 22px/1.2 var(--f-display); margin-top: 6px; }
.card-text { font-size: 16px; line-height: 1.45; color: var(--graphite-soft); }

.card-art { height: 52px; display: flex; align-items: center; }
.ticket-mini {
  align-self: flex-start;
  border: 1.5px solid var(--graphite); background: var(--paper);
  font: 600 15px/1 var(--f-mono);
  display: inline-flex; align-items: stretch; height: 40px;
}
.ticket-mini span { display: grid; place-items: center; padding: 0 10px; }
.ticket-mini span:first-child { border-right: 1.5px dashed var(--graphite); }
.score-mini {
  align-self: flex-start;
  font: 600 22px/1 var(--f-mono);
  border: 1.5px solid var(--graphite); border-radius: 50%;
  padding: 10px 16px; height: auto;
}
.free-mini { gap: 10px; }
.free-mini s { font: 600 22px/1 var(--f-mono); text-decoration-color: var(--red-pen); text-decoration-thickness: 3px; color: var(--graphite-soft); }
.free-mini span { font: 32px/1 var(--f-hand); color: var(--red-pen); transform: rotate(-6deg); }

.dates-panel {
  border: 1.5px solid var(--graphite);
  padding: 14px 18px 14px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px) 0 44px / 100% 100% no-repeat,
    #f8f4ec;
}
.dates-panel h2 {
  font: 600 12px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  margin: 0 0 8px;
}
.dates-panel ul { list-style: none; margin: 0 0 8px; padding: 0; }
.dates-panel li {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  height: 32px; line-height: 32px;
}
.sd-test { font: 600 15px/32px var(--f-mono); }
.sd-reg { font-size: 14px; color: var(--faint); white-space: nowrap; }
.dates-panel a { font-size: 15px; }

/* footer */
.foot { display: block; padding-top: 30px; }
.foot-cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px;
  padding-bottom: 24px;
  font-family: var(--f-body); font-size: 16px; color: var(--graphite-soft);
}
.foot-cols p { margin: 0 0 10px; }
.foot-cols ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.foot-name { font: 500 20px/1.2 var(--f-display); color: var(--graphite); }
.foot-h { font: 600 11px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.foot-cta { font-weight: 500; color: var(--graphite); }
.foot-base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--rule-strong); padding-top: 16px;
}
.foot-base p { margin: 0; }

@media (max-width: 1100px) {
  .home-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dates-panel { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .home-more { grid-template-columns: 1fr; }
  .card { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; }
  .card-art { height: auto; }
  .card-title { margin-top: 0; }
  .card-text { flex-basis: 100%; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols > div:first-child { grid-column: 1 / -1; }
  .strip a { margin-left: 0; }
}
.ticket-mini .tm-unit { font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }

.how-title {
  font: 600 12px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  margin: 34px 0 8px;
}
.factbar.how dd { font-size: 20px; }
.factbar.how dd a { text-underline-offset: 4px; }

/* ---------- Portal and login pages ---------- */

input[type="password"] {
  width: 100%;
  font: 400 20px/1.4 var(--f-body);
  color: var(--graphite);
  background: transparent;
  border: 0; border-bottom: 1.5px solid var(--graphite);
  padding: 6px 2px 8px;
  border-radius: 0;
}

.top .logout { margin: 0; display: inline; }
.top .logout button {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--graphite);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}

.portal-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) 64px;
  min-height: 70vh;
}
.portal h1 { font-size: clamp(34px, 3.6vw, 44px); line-height: 1.05; margin: 0 0 16px; }
.portal h2 { font: 500 24px/1.2 var(--f-body); margin: 34px 0 12px; }
.small { font-size: 14px; color: var(--faint); }
.mono.small { font-size: 13px; }
.break { display: block; word-break: break-all; margin-top: 8px; color: var(--graphite); }

/* The login card is a sheet of the same paper as the home page grid. */
.auth-sheet {
  max-width: 520px;
  margin: 0 auto;
  background: #f7f3ea;
  border: 1.5px solid var(--graphite);
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) clamp(24px, 4vw, 34px) clamp(34px, 5vw, 52px);
  position: relative;
  box-shadow: 10px 12px 0 -2px var(--paper-deep), 10px 12px 0 -.5px var(--graphite);
}
.auth-sheet::before {
  /* scanner timing marks down the left edge */
  content: ""; position: absolute; left: 10px; top: 28px; bottom: 28px; width: 7px;
  background: repeating-linear-gradient(to bottom, var(--graphite) 0 6px, transparent 6px 17px);
}
.sheet-form.one-col { grid-template-columns: 1fr; gap: 22px; margin-top: 22px; }
.auth-alt { margin: 22px 0 0; font-style: italic; }
.auth-who { margin: 0; font-size: 14px; }

.portal-page.narrow { max-width: 680px; }

/* Name block: the boxes at the top of a real answer sheet */
.cover {
  display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  border: 1.5px solid var(--graphite);
  max-width: 760px; margin-bottom: 30px;
  background: #f7f3ea;
}
.cover-box { padding: 10px 16px 12px; min-width: 0; }
.cover-box + .cover-box { border-left: 1.5px solid var(--graphite); }
.cover-k {
  display: block;
  font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 6px;
}
.cover-v { display: block; font: 38px/1.05 var(--f-hand); overflow-wrap: anywhere; }

.tally {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 30px; max-width: 760px;
  border-top: 1.5px solid var(--graphite); border-bottom: 1.5px solid var(--graphite);
}
.tally div { padding: 14px 16px 12px; border-left: 1px solid var(--rule-strong); }
.tally div:first-child { border-left: 0; padding-left: 0; }
.tally dt { font: 600 11px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.tally dd { margin: 6px 0 0; font: 600 30px/1 var(--f-mono); }

.plain { list-style: none; padding: 0; margin: 0 0 18px; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--rule); }

/* People */
.people-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px; align-items: start; margin-top: 18px;
}
.table-wrap { overflow-x: auto; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.sheet-table th {
  text-align: left; padding: 8px 10px 8px 0;
  font: 600 11px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1.5px solid var(--graphite);
}
.sheet-table td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.row-actions, .sheet-table td.mono { white-space: nowrap; }
.row-actions form { display: inline; margin-left: 12px; }

.pill { font: 500 12px/1 var(--f-mono); padding: 4px 8px; border: 1px solid var(--graphite); border-radius: 999px; white-space: nowrap; }
.pill.on { background: var(--graphite); color: var(--paper); }
.pill.pending { background: transparent; }
.pill.off { border-color: var(--red-pen); color: var(--red-pen); }

.link-btn {
  font: italic 16px/1.2 var(--f-body); color: var(--graphite);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn.red { color: var(--red-pen); }

.add-person {
  border: 1.5px solid var(--graphite); background: #f7f3ea;
  padding: 18px 20px 22px; margin-top: 0;
}
.add-person h2 { margin: 0; }
.add-person .small { margin: -12px 0 0; }
.add-person fieldset.field { border: 0; padding: 0; margin: 0; }
.field .check {
  display: flex; gap: 10px; align-items: center; margin: 6px 0;
  font: 400 18px/1.3 var(--f-body); letter-spacing: 0; text-transform: none;
}
.check input { width: 18px; height: 18px; accent-color: var(--graphite); }

/* Inquiries */
.inq { border-top: 1px solid var(--rule-strong); padding: 16px 0 14px; }
.inq header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.inq h2 { margin: 0 0 4px; font-size: 22px; }
.inq p { margin: 0 0 8px; }
.inq.done { opacity: .6; }

@media (max-width: 900px) {
  .people-grid { grid-template-columns: 1fr; }
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tally div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  .portal .top { flex-wrap: wrap; }
  .portal .top ul { flex-wrap: wrap; gap: 14px 20px; }
  .cover { grid-template-columns: 1fr; }
  .cover-box + .cover-box { border-left: 0; border-top: 1.5px solid var(--graphite); }
  .sheet-table thead { display: none; }
  .sheet-table tr { display: block; border-bottom: 1px solid var(--rule); padding: 10px 0; }
  .sheet-table td { display: block; border: 0; padding: 2px 0; }
  .row-actions form:first-child { margin-left: 0; }
}

/* Google button: white with the four-color G, as Google's branding asks */
.g-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 22px; padding: 12px 16px;
  background: #fff; color: #1f1f1f;
  border: 1.5px solid var(--graphite);
  font: 500 16px/1 var(--f-mono); text-decoration: none;
}
.g-btn:hover { background: #f8f8f8; text-decoration: none; }
.g-mark { flex: none; }
.or {
  display: flex; align-items: center; gap: 12px; margin: 22px 0 0;
  font: 500 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--rule-strong); }

.flag {
  border-left: 4px solid var(--red-pen); padding: 6px 0 6px 14px; margin: 0 0 22px;
  font: 23px/1.2 var(--f-hand); color: var(--red-pen);
}
.flag a { color: inherit; }

input[type="number"], select {
  width: 100%;
  font: 400 20px/1.4 var(--f-body); color: var(--graphite);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--graphite);
  padding: 6px 2px 8px; border-radius: 0;
}
.half-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.key-input { font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }

/* A freshly made key, shown once, on a torn-off ticket */
.key-ticket {
  margin: 18px 0 0; padding: 14px 20px 16px;
  border: 1.5px dashed var(--graphite); background: #fffbe9;
  max-width: 560px;
}
.key-ticket p { margin: 0; }
.key-code { font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: .06em; margin-top: 6px !important; user-select: all; }
.nowrap { white-space: nowrap; }

/* ---------- Portal app frame (logged in) ----------
   Plainer than the public pages on purpose: a fixed side menu and a top
   bar so it's always obvious where you are and how to get elsewhere. */

.app { min-height: 100vh; }

.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: var(--paper);
  border-bottom: 1.5px solid var(--graphite);
}

/* Account dropdown, top right */
.acct { position: relative; }
.acct > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 4px 4px; border: 1.5px solid transparent; border-radius: 999px;
  font: 500 14px/1 var(--f-mono);
}
.acct > summary::-webkit-details-marker { display: none; }
.acct > summary:hover, .acct[open] > summary { border-color: var(--graphite); background: #f7f3ea; }
.caret { width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg) translateY(-2px); }
.acct[open] .caret { transform: rotate(-135deg) translateY(-1px); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px;
  background: #fbf8f1; border: 1.5px solid var(--graphite);
  box-shadow: 6px 6px 0 -1px var(--paper-deep), 6px 6px 0 0 var(--graphite);
  padding: 8px 0; z-index: 30;
}
.acct-who { margin: 0; padding: 8px 16px 12px; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; font-size: 17px; }
.acct-who .mono { font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left;
  padding: 10px 16px; font: 500 14px/1.2 var(--f-mono);
  color: var(--graphite); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover { background: rgba(232, 181, 32, .22); }
.acct-menu form { margin: 0; border-top: 1px solid var(--rule); }

.avatar {
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  border-radius: 50%; border: 1.5px solid var(--graphite);
  background: var(--paper-deep); color: var(--graphite);
  font: 600 12px/1 var(--f-mono);
}
.avatar.sm { width: 32px; height: 32px; }
.avatar.lg { width: 96px; height: 96px; font-size: 28px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Side menu + content */
.app-body {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1400px; margin: 0 auto;
}
.side {
  position: sticky; top: 67px; align-self: start;
  height: calc(100vh - 67px); overflow-y: auto;
  padding: 26px 18px 26px var(--gutter);
  border-right: 1px solid var(--rule-strong);
}
.side-group + .side-group { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--rule); }
.side-h {
  margin: 0 0 10px; font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.side ul, .side-m ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.side a, .side-m nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; margin: 0 -12px;
  font: 500 15px/1.2 var(--f-mono); text-decoration: none; color: var(--graphite);
}
.side a:hover, .side-m nav a:hover { background: rgba(42, 41, 38, .06); }
.side a[aria-current="page"], .side-m nav a[aria-current="page"] { background: rgba(232, 181, 32, .3); }
.side a:hover .oval::after, .side a[aria-current="page"] .oval::after,
.side-m nav a:hover .oval::after, .side-m nav a[aria-current="page"] .oval::after { transform: scaleX(1); }

/* The phone menu is hidden on wide screens */
.side-m { display: none; }

.app-main { padding: clamp(24px, 3.5vw, 40px) var(--gutter) 64px; min-width: 0; }
.app-main h1 { font-size: clamp(30px, 3vw, 40px); }

/* Settings */
.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px; align-items: start; margin-top: 18px;
}
.panel {
  border: 1.5px solid var(--graphite); background: #f7f3ea;
  padding: 18px 20px 22px; margin: 0;
}
.panel h2 { margin: 0 0 4px; font-size: 22px; }
.sheet-form.panel { gap: 18px; }
.photo-row { display: flex; align-items: center; gap: 18px; }
.photo-row p { margin: 4px 0 0; }
.file-btn {
  display: inline-block; cursor: pointer;
  font: 600 13px/1 var(--f-mono); letter-spacing: .04em;
  padding: 10px 14px; border: 1.5px solid var(--graphite); background: #fff;
}
.file-btn:hover { background: rgba(232, 181, 32, .22); }
input[type="file"]:focus-visible + .file-btn, .file-btn:focus-within { outline: 2.5px solid var(--graphite); }
.btn-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
input[type="tel"] {
  width: 100%; font: 400 20px/1.4 var(--f-body); color: var(--graphite);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--graphite);
  padding: 6px 2px 8px; border-radius: 0;
}

/* Phones: the side menu becomes a scrolling row of tabs under the top bar */
@media (max-width: 820px) {
  .app-body { grid-template-columns: 1fr; }
  .side { display: none; }
  .side-m {
    display: block; position: sticky; top: 63px; z-index: 15;
    background: var(--paper); border-bottom: 1px solid var(--rule-strong);
  }
  .side-m > summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; gap: 12px;
    padding: 14px var(--gutter); font: 500 15px/1.2 var(--f-mono);
  }
  .side-m > summary::-webkit-details-marker { display: none; }
  .side-m-label { font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
  .side-m-here { flex: 1; }
  .side-m[open] .caret { transform: rotate(-135deg) translateY(-1px); }
  .side-m nav {
    padding: 4px var(--gutter) 22px; border-top: 1px solid var(--rule);
    max-height: calc(100vh - 130px); overflow-y: auto;
  }
  .side-m .side-group { margin-top: 14px; }
  .side-m .side-group + .side-group { padding-top: 16px; border-top: 1px solid var(--rule); }
  .acct-name { display: none; }
  .appbar { padding-top: 10px; padding-bottom: 10px; }
}

/* Students list and person pages */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 0; }
.btn.small-btn { padding: 11px 16px 10px; font-size: 13px; box-shadow: 3px 3px 0 var(--graphite); }
.search { display: flex; gap: 14px; align-items: center; margin: 18px 0 8px; max-width: 520px; }
input[type="search"] {
  flex: 1; font: 400 19px/1.4 var(--f-body); color: var(--graphite);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--graphite); padding: 6px 2px 8px; border-radius: 0;
}
.row-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.row-link span:last-child { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.crumbs { margin: 0 0 10px; font: 500 13px/1 var(--f-mono); }
.crumbs a::before { content: "\2190  "; }
.person-head { display: flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.person-head h1 { margin: 0 0 6px; }
.person-head p { margin: 0; }
.link-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.link-row form { margin: 0; }
.inline-form { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.inline-form select { flex: 1; font-size: 17px; }
.stack { display: grid; gap: 12px; justify-items: start; margin-top: 10px; }
.stack form { margin: 0; }
.person-head + .form-status, .settings-grid + .settings-grid { margin-top: 22px; }
.tabs { display: flex; gap: 4px; margin: 22px 0 4px; border-bottom: 1.5px solid var(--graphite); overflow-x: auto; }
.tabs a {
  padding: 10px 16px 9px; font: 500 14px/1 var(--f-mono); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; border-bottom: 0; margin-bottom: -1.5px;
}
.tabs a:hover { background: rgba(42, 41, 38, .06); }
.tabs a[aria-current="page"] { border-color: var(--graphite); background: var(--paper); }
.facts-list { margin: 8px 0 12px; }
.facts-list div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.facts-list dt { font: 600 11px/1.6 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.facts-list dd { margin: 0; font-size: 17px; }

/* ---------- Sessions ----------
   Each lesson is a small admission ticket: a date stub on the left, a
   dashed tear line, then the time and status. */
input[type="date"], input[type="time"], input[type="url"] {
  width: 100%; font: 400 19px/1.4 var(--f-body); color: var(--graphite);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--graphite);
  padding: 6px 2px 8px; border-radius: 0;
}
input[type="url"] { font: 400 15px/1.6 var(--f-mono); }

.sess-list { display: grid; gap: 10px; margin: 14px 0 20px; max-width: 620px; }
.sess-ticket {
  display: grid; grid-template-columns: 74px 1fr; text-decoration: none; color: inherit;
  border: 1.5px solid var(--graphite); background: #fffdf7;
  transition: transform .12s ease, box-shadow .12s ease;
}
.sess-ticket:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--graphite); }
.sess-ticket:focus-visible { outline: 2.5px solid var(--graphite); outline-offset: 3px; }
.sess-stub {
  display: grid; justify-items: center; align-content: center; padding: 8px 4px;
  border-right: 1.5px dashed var(--graphite); background: var(--paper-deep);
  font: 500 11px/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .08em;
}
.sess-stub strong { font: 500 28px/1.05 var(--f-display); letter-spacing: 0; }
.sess-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; }
.sess-time { font-size: 18px; flex: 1 1 auto; }
.sess-who { font: 500 14px/1.2 var(--f-mono); flex-basis: 100%; order: -1; }
.st-requested { background: repeating-linear-gradient(135deg, #fffdf7 0 10px, #faf3dc 10px 20px); }
.st-declined, .st-cancelled, .st-no_show { opacity: .62; }
.st-cancelled .sess-time, .st-declined .sess-time { text-decoration: line-through; }
.pill.done { background: var(--pencil); border-color: var(--graphite); }

.schedule-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 28px; align-items: start; margin-top: 18px; }
.schedule-grid h2 { font-size: 22px; margin: 0; }
.schedule-grid h2 + p { margin-top: 10px; }
.delete-form { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); }

/* Request picker: one row of time bubbles per day, inside a scroll box
   so the page stays one screen tall. */
.slot-scroll { max-height: min(56vh, 480px); overflow-y: auto; padding: 4px 12px 4px 2px; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.slot-day { border: 0; margin: 0; padding: 12px 0 14px; border-bottom: 1px solid var(--rule); }
.slot-day:last-child { border-bottom: 0; }
.slot-day legend { font: 600 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 0 0 10px; }

/* Month calendar, ruled like graph paper */
.cal { margin-top: 16px; max-width: 900px; }
.cal-head { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.cal-head h2 { margin: 0; font-size: 24px; min-width: 190px; text-align: center; }
.cal-head a { font: 500 18px/1 var(--f-mono); text-decoration: none; padding: 6px 10px; border: 1.5px solid var(--graphite); }
.cal-head a:hover { background: rgba(232, 181, 32, .25); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1.5px solid var(--graphite); border-left: 1.5px solid var(--graphite); }
.cal-dow { font: 600 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 6px; border-right: 1px solid var(--rule-strong); border-bottom: 1.5px solid var(--graphite); background: var(--paper-deep); }
.cal-cell { min-height: 76px; padding: 4px 5px 6px; border-right: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); background: #fffdf7; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.blank { background: transparent; }
.cal-d { font: 500 12px/1 var(--f-mono); color: var(--faint); }
.cal-cell.today .cal-d { color: var(--graphite); background: var(--pencil); align-self: flex-start; padding: 2px 4px; }
.cal-item { display: block; font: 500 11px/1.25 var(--f-mono); padding: 2px 4px; border: 1px solid var(--graphite); text-decoration: none; background: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item.st-confirmed { background: var(--graphite); color: var(--paper); }
.cal-item.st-done { background: var(--pencil); }
.cal-item:hover { outline: 1.5px solid var(--graphite); }

@media (max-width: 1000px) {
  .schedule-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cal-cell { min-height: 54px; padding: 3px; }
  .cal-item { font-size: 9px; padding: 1px 2px; }
  .cal-dow { padding: 6px 2px; font-size: 9px; letter-spacing: .02em; }
  .cal-head h2 { min-width: 0; flex: 1; font-size: 20px; }
  .sess-ticket { grid-template-columns: 62px 1fr; }
  .half-row { grid-template-columns: 1fr; }
}
.request-form { display: grid; grid-template-columns: minmax(0, 620px) minmax(240px, 300px); gap: 32px; align-items: start; margin-top: 8px; }
.request-side { display: grid; gap: 18px; justify-items: start; position: sticky; top: 90px; }
.request-side .field { width: 100%; }
@media (max-width: 900px) {
  .request-form { grid-template-columns: 1fr; gap: 20px; }
  .request-side { position: static; }
  .slot-scroll { max-height: 40vh; }
}
.settings-grid > .sheet-form.panel, .schedule-grid > .sheet-form.panel { margin-top: 0; }
.hours-list li { font-size: 16px; padding: 4px 0; }
.hours-list li > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.third-row { display: grid; grid-template-columns: 78px 1fr 1fr; gap: 12px; }
.third-row input, .third-row select { font-size: 16px; }

/* ---------- Scores ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0; max-width: 900px; }
.stat-tile { border: 1.5px solid var(--graphite); background: #fffdf7; padding: 12px 16px 14px; }
.stat-label { margin: 0; font: 600 11px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.stat-value { margin: 6px 0 2px; font: 600 34px/1 var(--f-mono); letter-spacing: -.02em; }
.stat-sub { margin: 0; font-size: 15px; color: var(--graphite-soft); }

.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; max-width: 1100px; }
.chart-card { margin: 0; border: 1.5px solid var(--graphite); background: #fffdf7; padding: 12px 14px 6px; min-width: 0; }
.chart-card figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 4px; }
.chart-title { font: 500 19px/1.2 var(--f-display); margin-right: auto; }
.chart-key { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--f-mono); color: var(--graphite-soft); }
.key-line { display: inline-block; width: 16px; height: 2px; border-radius: 1px; background: var(--graphite); }
.key-line.rw { background: #2a78d6; }
.key-line.math { background: #eb6834; }
.key-line.goal { background: var(--pencil); }
.chart { position: relative; min-height: 230px; outline-offset: 4px; }
.chart:focus-visible { outline: 2px solid var(--graphite); }
.chart-svg { display: block; overflow: visible; }
.chart-svg .ax { font: 400 11px/1 var(--f-mono); fill: var(--faint); font-variant-numeric: tabular-nums; }
.chart-svg .lbl { font: 500 12px/1 var(--f-mono); fill: var(--graphite); }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 2; min-width: 150px;
  background: #fffdf7; border: 1.5px solid var(--graphite); box-shadow: 3px 3px 0 var(--graphite);
  padding: 8px 10px; font: 400 13px/1.4 var(--f-mono);
}
.chart-tip p { margin: 0; display: flex; align-items: center; gap: 6px; }
.chart-tip .tip-head { font: 400 13px/1.3 var(--f-body); color: var(--graphite-soft); margin-bottom: 4px; display: block; }
.chart-tip strong { font-weight: 600; font-size: 15px; }
.tip-key { display: inline-block; width: 12px; height: 2px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.filter-row a { font: 500 13px/1 var(--f-mono); padding: 7px 12px; border: 1.5px solid var(--graphite); border-radius: 999px; text-decoration: none; }
.filter-row a:hover { background: rgba(232, 181, 32, .22); }
.filter-row a[aria-current="true"] { background: var(--graphite); color: var(--paper); }
.kid-row { margin-bottom: 4px; }
.scores-table { max-width: 900px; }
.scores-table .num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.row-note { display: block; font-size: 15px; color: var(--graphite-soft); font-style: italic; }
.tab-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 16px 0 0; }
.empty-note { margin-top: 18px; }
.h-sub { font-size: .55em; color: var(--graphite-soft); font-style: italic; }
.has-err input, .has-err select { border-bottom-color: var(--red-pen); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scores-table td:last-child, .scores-table th:last-child { padding-left: 18px; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.filter-bar .filter-row { margin: 0; }
.filter-bar .btn { margin-left: auto; }
.stat-tile { padding: 10px 14px 12px; }
.stat-value { font-size: 30px; }

/* ---------- Resources ----------
   Index cards on a corkboard grid: topic and type on top, title, what
   it's for. */
.res-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.res-card {
  position: relative; border: 1.5px solid var(--graphite); background: #fffdf7; padding: 12px 16px 14px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.res-card:hover, .res-card:focus-within { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--graphite); }
.res-meta {
  display: flex; justify-content: space-between; gap: 10px; margin: 0 -16px 10px; padding: 0 16px 8px;
  border-bottom: 1.5px solid var(--red-pen);
  font: 600 11px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
}
.res-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.res-meta span:last-child { text-transform: none; letter-spacing: 0; font-weight: 500; }
.lbl-like { margin: 0 0 8px; font: 600 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.res-card h2 { font-size: 21px; line-height: 1.25; margin: 0 0 4px; }
.res-card h2 a { text-decoration: none; }
.res-card h2 a::after { content: ""; position: absolute; inset: 0; }
.res-card h2 a:focus-visible { outline: none; }
.res-card:focus-within { outline: 2.5px solid var(--graphite); outline-offset: 3px; }
.res-desc { margin: 0; font-size: 16px; line-height: 1.45; color: var(--graphite-soft); }
.res-shared { margin: 6px 0 0; font: 400 12px/1.4 var(--f-mono); color: var(--faint); }
.res-edit { position: relative; z-index: 1; margin: 6px 0 0; font: 500 13px/1 var(--f-mono); }
.res-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 22px; align-items: start; margin-top: 12px; max-width: 1000px; }
.res-form > .panel { margin-top: 0; }
.field.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.field.choice legend { display: block; width: 100%; font: 600 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; padding: 0; }
.pick-list { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--rule-strong); background: #fffdf7; }
@media (max-width: 860px) { .res-form { grid-template-columns: 1fr; } }
.pick-list .check { display: flex; gap: 10px; align-items: center; font: 400 17px/1.3 var(--f-body); }
.field label.file-btn { display: inline-block; width: auto; margin: 0; padding: 10px 14px; font: 600 13px/1 var(--f-mono); letter-spacing: .04em; text-transform: none; }

/* ---------- Classes ---------- */
.class-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; max-width: 1100px; }
.class-card { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; border: 1.5px solid var(--graphite); background: #fffdf7; padding: 14px 16px; }
.class-card.is-joined { background: #fbf7ea; }
.class-main { min-width: 0; }
.class-main h2 { font-size: 22px; margin: 0; }
.class-host { margin: 2px 0 8px; font: 400 12px/1.3 var(--f-mono); color: var(--faint); }
.class-code { display: inline-flex; align-items: baseline; gap: 10px; margin: 0 0 8px; padding: 6px 10px; border: 1.5px dashed var(--graphite); background: #fff; }
.class-code span { font: 600 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.class-code strong { font: 600 17px/1 var(--f-mono); letter-spacing: .06em; user-select: all; }
.class-steps { margin: 0 0 8px; font-size: 16px; line-height: 1.45; color: var(--graphite-soft); white-space: pre-line; }
.class-main form { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; }
.class-main .small { margin: 4px 0 0; }
.class-join { flex: none; }

/* ---------- Session notes ----------
   A list like a notebook's index, and each note on a ruled sheet with a
   red margin line, the to-do list set off on the right. */
.note-list { list-style: none; padding: 0; margin: 14px 0 0; max-width: 760px; border-top: 1.5px solid var(--graphite); }
.note-row a {
  display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline;
  padding: 12px 6px; border-bottom: 1px solid var(--rule-strong); text-decoration: none;
}
.note-row a:hover { background: rgba(232, 181, 32, .14); }
.note-date { font: 500 12px/1.4 var(--f-mono); color: var(--faint); grid-row: span 2; }
.note-title { font: 500 19px/1.3 var(--f-display); }
.note-title .small { font-family: var(--f-mono); margin-left: 6px; }
.note-prev { grid-column: 2 / 4; font-size: 15px; color: var(--graphite-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-panels { display: grid; gap: 18px; }
.fathom-panel p { margin: 6px 0 10px; font-size: 16px; }
.inbox-row { display: grid; gap: 6px; }
.inbox-row form { margin: 0; }
.inbox-row .inline-form { margin-top: 0; }
.note-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 24px; align-items: start; margin-top: 14px; max-width: 1100px; }
.note-body {
  border: 1.5px solid var(--graphite); background: #fffdf7; padding: 16px 22px 18px 40px;
  background-image: linear-gradient(to right, transparent 26px, rgba(184, 50, 42, .55) 26px, rgba(184, 50, 42, .55) 27.5px, transparent 27.5px);
  font-size: 17px; line-height: 1.55; min-width: 0; overflow-wrap: anywhere;
}
.note-body h2, .note-body h3, .note-body h4 { font-size: 20px; margin: 16px 0 6px; }
.note-body h2:first-child, .note-body h3:first-child, .note-body h4:first-child { margin-top: 0; }
.note-body ul, .note-body ol { margin: 4px 0 10px; padding-left: 22px; }
.note-body li { margin: 3px 0; }
.note-body p { margin: 6px 0 10px; }
.note-body code { font-family: var(--f-mono); font-size: 0.88em; background: var(--paper-deep); padding: 1px 4px; border-radius: 3px; }
.note-todo { border: 1.5px solid var(--graphite); background: #fffbe9; padding: 14px 16px; }
.note-todo h2 { font-size: 20px; margin: 0 0 8px; }
.note-todo ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.note-todo li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.4; }
.note-todo .box { flex: none; width: 14px; height: 14px; margin-top: 3px; border: 1.5px solid var(--graphite); }
.note-todo li.done .box { background: var(--graphite); }
.note-todo li.done > span:last-child { text-decoration: line-through; color: var(--faint); }
@media (max-width: 860px) {
  .note-sheet { grid-template-columns: 1fr; }
  .note-row a { grid-template-columns: 1fr auto; }
  .note-date { grid-row: auto; grid-column: 1 / -1; }
  .note-prev { grid-column: 1 / -1; }
}
.toggle-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); }

/* ---------- Progress reports ---------- */
.btn.ghost { background: #fffdf7; }
.r-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 36px; align-items: start; margin-top: 18px; max-width: 1100px; }
.r-edit h2 { font-size: 22px; margin: 0 0 8px; }
.r-period { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 14px 0 8px; }
.r-period .field { margin: 0; }
.r-draft { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule-strong); }
.r-draft .small { margin: 8px 0 0; }
@media (max-width: 860px) { .r-edit { grid-template-columns: 1fr; } }

body.report { background: var(--paper); margin: 0; }
.r-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 24px; background: var(--paper); border-bottom: 1.5px solid var(--graphite); font: 14px/1.3 var(--f-mono); }
.r-bar a { color: var(--graphite); }
.r-warn { max-width: 816px; margin: 18px auto 0; }
.r-doc { max-width: 816px; margin: 0 auto 48px; padding: 0 16px; }
.r-page { background: #fffdf7; border: 1.5px solid var(--graphite); padding: 48px 56px; margin: 24px 0; }
.r-page h2 { font-size: 28px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--red-pen); }
.r-cover h1 { font-size: 46px; margin: 4px 0 0; }
.r-brand { font: 22px/1.2 var(--f-display); margin: 0 0 36px; }
.r-brand em { font-style: normal; color: var(--faint); }
.r-name { font: 500 30px/1.2 var(--f-display); margin: 6px 0 4px; }
.r-cover h2 { font-size: 20px; border: 0; padding: 0; margin: 28px 0 6px; }
.r-facts { border-collapse: collapse; margin: 22px 0 6px; }
.r-facts th { text-align: left; font: 500 12px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 7px 24px 7px 0; border-bottom: 1px solid var(--rule); }
.r-facts td { padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
.r-toc { margin: 0; padding-left: 22px; font-size: 17px; line-height: 1.7; }
.r-page .stat-row { max-width: none; }
.r-facts-list { margin: 0 0 18px; padding-left: 20px; font-size: 17px; line-height: 1.55; }
.r-facts-list li { margin: 4px 0; }
.r-charts { display: grid; gap: 16px; margin: 0 0 20px; }
.r-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.r-table th { text-align: left; font: 500 12px/1.4 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 6px 10px 6px 0; border-bottom: 1.5px solid var(--graphite); }
.r-table td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.r-table .num { text-align: right; font-family: var(--f-mono); }
.r-table tr { break-inside: avoid; }
.r-sub { display: block; font-size: 13px; color: var(--faint); }
.r-analysis { font-size: 17px; }
.r-note { padding: 18px 0 20px; border-bottom: 1px solid var(--rule-strong); }
.r-note:last-child { border-bottom: 0; }
.r-note header { break-after: avoid; }
.r-note h3 { font-size: 21px; margin: 0; }
.r-note header .small { margin: 2px 0 10px; }
.r-todo { border: 1.5px solid var(--graphite); background: #fffbe9; padding: 10px 14px; margin-top: 10px; break-inside: avoid; }
.r-todo-head { font: 500 12px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 0 0 6px; }
.r-todo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.r-todo li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.r-todo .box { flex: none; width: 12px; height: 12px; margin-top: 4px; border: 1.5px solid var(--graphite); }
.r-todo li.done .box { background: var(--graphite); }
.r-sign { padding: 8px 56px 40px; break-inside: avoid; }
.r-sig { font: 58px/1 var(--f-hand); margin: 18px 0 0; color: var(--graphite); }
.r-sig-name { margin: 6px 0 0; padding-top: 8px; border-top: 1.5px solid var(--graphite); max-width: 320px; font-size: 17px; }
.r-sig-name span { display: block; font: 13px/1.5 var(--f-mono); color: var(--faint); }
@media (max-width: 640px) {
  .r-page { padding: 28px 20px; }
  .r-sign { padding: 8px 20px 32px; }
  .r-cover h1 { font-size: 36px; }
}
@media print {
  @page { size: letter; margin: 0.6in; }
  body.report { background: #fff; }
  .r-bar, .r-screen-only, .r-warn { display: none !important; }
  .r-doc { max-width: none; margin: 0; padding: 0; }
  .r-page { border: 0; padding: 0; margin: 0; background: #fff; break-after: page; }
  .r-sign { padding: 0; }
  .chart-card, .stat-tile, .r-todo { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.r-doc .note-body { border: 0; background: none; background-image: none; padding: 0; box-shadow: none; }
.r-doc .note-body::before { display: none; }
@media print { .r-page.r-last { break-after: auto; } }

/* Lesson ratings: answer-sheet bubbles */
.rate-row { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.rate-row legend { font: 600 13px/1.4 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; padding: 0; margin-bottom: 6px; }
.rate-row legend .opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.rate-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rate-opts label { position: relative; cursor: pointer; }
.rate-opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-opts span { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid var(--graphite); border-radius: 50%; font: 500 15px/1 var(--f-mono); background: #fffdf7; }
.rate-opts .rate-skip span { width: auto; padding: 0 12px; border-radius: 19px; color: var(--faint); border-style: dashed; }
.rate-opts input:checked + span { background: var(--graphite); color: var(--paper); }
.rate-opts .rate-skip input:checked + span { background: #fffdf7; color: var(--graphite); border-style: solid; }
.rate-opts input:focus-visible + span { outline: 2px solid var(--pencil); outline-offset: 2px; }
.r-metrics { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 16px; }
.r-metrics caption { text-align: left; font: 500 13px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 0 0 6px; }
.r-metrics th { text-align: left; font-weight: 400; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); }
.r-metrics td { text-align: right; padding: 7px 0; border-bottom: 1px solid var(--rule); font-family: var(--f-mono); white-space: nowrap; }
.r-metrics tr { break-inside: avoid; }
.r-metrics .r-sub { text-align: left; }
.r-dots { letter-spacing: 2px; color: var(--graphite); }

/* Ticking off to-do items on a note */
.note-todo .todo-count { margin: -4px 0 10px; }
.note-todo form { margin: 0; }
.todo-btn {
  display: flex; gap: 10px; align-items: flex-start; width: 100%;
  padding: 6px 8px; margin: -6px -8px; background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.todo-btn:hover { background: rgba(232, 181, 32, .22); }
.todo-btn .box { flex: none; width: 16px; height: 16px; margin-top: 3px; border: 1.5px solid var(--graphite); background: #fff; }
.note-todo li.done .todo-btn .box { background: var(--graphite); }
.note-todo li.done .todo-btn > span:last-child { text-decoration: line-through; color: var(--faint); }

/* Sending a report to the family */
.r-send { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--rule-strong); max-width: 640px; }
.r-send h2 { font-size: 22px; margin: 0 0 10px; }
.r-send h3 { font-size: 18px; margin: 28px 0 8px; }
.r-send fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.r-send legend { font: 600 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.r-sent { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.r-sent.big { margin-top: 18px; gap: 14px; font-size: 19px; }
.note-todo ul + .small { margin: 14px 0 0; }

/* Family home: one card per student */
.fam-card { margin-top: 26px; }
.fam-card h2 { font-size: 24px; margin: 0 0 10px; }
.fam-tiles { margin-top: 0; }
a.tile-link { color: inherit; text-decoration: none; display: block; }
a.tile-link:hover { background: rgba(232, 181, 32, .18); }
a.tile-link .stat-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Package and homework tabs: list on the left, form on the right */
.pk-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 18px; max-width: 1100px; }
.pk-grid h2 { font-size: 22px; margin: 22px 0 10px; }
.pk-grid .panel h2 { margin-top: 0; }
.pk-table form { margin: 0; }
.pk-setting { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.pk-grid fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.pk-grid legend { font: 600 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
@media (max-width: 860px) { .pk-grid { grid-template-columns: 1fr; } }

/* Homework list */
.hw-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hw { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--graphite); background: #fffdf6; }
.hw form { margin: 0; }
.hw-box { flex: none; width: 22px; height: 22px; margin-top: 2px; padding: 0; border: 1.5px solid var(--graphite); background: #fff; cursor: pointer; display: block; }
button.hw-box:hover { background: rgba(232, 181, 32, .4); }
.hw.done .hw-box { background: var(--graphite); }
.hw-main { flex: 1; min-width: 0; }
.hw-title { margin: 0; font-size: 18px; line-height: 1.35; }
.hw-details { margin: 4px 0 0; font-size: 16px; color: var(--graphite-soft); white-space: pre-line; }
.hw .mono.small { margin: 6px 0 0; }
.hw.done { background: transparent; border-color: var(--rule-strong); }
.hw.done .hw-title { text-decoration: line-through; color: var(--faint); }
.hw.late { border-left: 5px solid var(--red-pen); }
.hw.late .mono.small { color: var(--red-pen); }
.portal-page.narrow h2 { font-size: 22px; margin: 26px 0 10px; }

/* Buying a package online */
.pk-buy { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; max-width: 760px; margin: 18px 0 10px; }
.pk-buy form { border: 1.5px solid var(--graphite); background: #fffdf7; padding: 16px 18px 18px; margin: 0; display: grid; gap: 4px; justify-items: start; }
.pk-name { margin: 0; font: 600 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.pk-price { margin: 0; font: 600 34px/1.1 var(--f-mono); }
.pk-buy .small { margin: 0 0 10px; }
