@font-face {
  font-family: Inter;
  src: url('/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Instrument Serif;
  src: url('/instrument-serif.woff2') format('woff2');
  font-display: swap;
}
:root {
  --paper: #edf2f0;
  --card: #f8fbf7;
  --ink: #1e2b31;
  --muted: #506268;
  --line: #c7d4d0;
  --green: #205c51;
  --warn: #71402c;
  --serif: Instrument Serif, Georgia, serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 82% -5%, #d6e6e6 0, transparent 45%),var(--paper);
  color: var(--ink);
  font: 15px/1.55 Inter, system-ui, sans-serif;
}
.shell { width: min(1200px,calc(100% - 64px)); margin-inline: auto; }
a { color: var(--green); text-underline-offset: 3px; }
button,input { font: inherit; color: inherit; }
button,input,a { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--green); }
[hidden] { display: none !important; }
.skip { position: absolute; top: -100px; left: 12px; padding: 8px; z-index: 4; background: var(--card); }
.skip:focus { top: 12px; }
.top,.top nav,.panel-head,.actions { display: flex; gap: 8px; align-items: center; }
.top { justify-content: space-between; min-height: 65px; border-bottom: 1px solid var(--line); }
.top nav { flex-wrap: wrap; justify-content: flex-end; }
.top nav a { font-size: 12px; font-weight: 660; }
.brand { display: flex; gap: 8px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 740; letter-spacing: -.04em; }
.brand span { display: grid; place-items: center; min-width: 34px; height: 34px; background: var(--green); color: #f5fbf3; border-radius: 8px; font: 21px var(--serif); }
.intro { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: end; padding: 37px 0 29px; }
.intro h1,.reading h1 { margin: 0; font: clamp(61px,8.1vw,113px)/.83 var(--serif); letter-spacing: -.035em; }
h1 em { color: var(--green); font-weight: 400; }
.intro p,.reading .lead { max-width: 37ch; margin: 0 0 4px; color: var(--muted); font-size: 16px; }
.workspace { display: grid; grid-template-columns: minmax(240px,.82fr) minmax(0,2fr); gap: 14px; align-items: start; }
.board { display: grid; min-width: 0; gap: 14px; }
.panel { min-width: 0; padding: 15px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.panel-head { justify-content: space-between; }
h2,h3 { margin: 0; letter-spacing: -.035em; }
h2 { font-size: 19px; }
h3 { font-size: 14px; }
.setup h3 { margin-top: 12px; }
.hint,.error,.notice { font-size: 12px; margin: 5px 0; color: var(--muted); }
.error,.danger { color: var(--warn); }
.error:empty { display: none; }
label { display: grid; min-width: 0; gap: 4px; font-size: 11px; font-weight: 640; margin-top: 8px; }
input { width: 100%; min-width: 0; border: 1px solid #bacdc7; background: #f0f6f1; border-radius: 7px; padding: 7px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.35fr); gap: 0 7px; align-items: end; }
.windows { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0 6px; }
button { cursor: pointer; min-height: 33px; border-radius: 7px; padding: 6px 9px; font-size: 12px; font-weight: 670; white-space: nowrap; }
button:disabled { opacity: .46; cursor: default; }
button:hover:not(:disabled) { filter: brightness(.94); }
.primary { color: #fff; background: var(--green); border: 1px solid var(--green); }
.quiet { background: #e8f0eb; border: 1px solid #b8cac4; }
.setup>.primary { margin-top: 12px; }
.tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 9px 0; }
.tiles div { padding: 8px; min-width: 0; background: #e4efea; border: 1px solid #c4d5cf; border-radius: 8px; }
.tiles div:last-child { background: #efe9d9; border-color: #d9cead; }
.tiles span { display: block; font-size: 11px; color: var(--muted); }
.tiles strong { display: block; font-size: clamp(18px,2.9vw,31px); letter-spacing: -.04em; }
.constraint { background: #f3ecdb; color: var(--warn); border-radius: 6px; padding: 7px 9px; font-size: 12px; }
.table-scroll { overflow: auto; }
.scroll-hint { display: none; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th,td { padding: 7px 5px; border-bottom: 1px solid #dae3de; vertical-align: top; overflow-wrap: anywhere; }
thead th { color: var(--muted); font-size: 10px; }
.courses td:last-child { width: 1%; }
.weekly table { min-width: 525px; }
.weekly td,.weekly thead th:not(:first-child) { white-space: nowrap; }
.weekly th:first-child { min-width: 120px; }
.totals { background: #eaf3ed; font-weight: 660; }
.missing { color: var(--warn); font-weight: 700; }
.actions { flex-wrap: wrap; margin-top: 10px; }
.resources { margin-top: 14px; }
.resources p { color: var(--muted); font-size: 14px; max-width: 63ch; margin: 6px 0; }
footer { padding: 20px 0; color: var(--muted); font-size: 11px; }
dialog { color: var(--ink); width: min(440px,calc(100% - 26px)); padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
dialog::backdrop { background: #233238aa; }
dialog .actions { justify-content: flex-end; }
.reading { max-width: 800px; padding-top: 40px; }
.reading h1 { font-size: clamp(59px,8.4vw,99px); }
.reading .lead { margin-top: 15px; max-width: 59ch; }
#print-sheet { display: none; }
@media (max-width: 850px) {
  .shell { width: calc(100% - 34px); }
  .workspace { grid-template-columns: minmax(215px,.86fr) minmax(0,1.5fr); }
}
@media (max-width: 650px) {
  .scroll-hint { display: block; }
  .shell { width: calc(100% - 23px); }
  .intro,.workspace { grid-template-columns: 1fr; gap: 10px; }
  .intro { padding: 24px 0 20px; }
  .intro p { font-size: 14px; }
  .panel { padding: 10px; }
  .top nav,.top .brand { font-size: 12px; }
  .top nav a,.top button { font-size: 10px; }
  .tiles div { padding: 6px; }
}
@media print {
  body { background: #fff; color: #000; }
  body:has(#print-sheet)>header,body:has(#print-sheet)>footer,body:has(#print-sheet) .skip,main:has(#print-sheet)>*:not(#print-sheet) { display: none !important; }
  #print-sheet { display: block; }
  #print-sheet tr { break-inside: avoid; }
}
