:root {
  --ink: #17342f;
  --muted: #73817d;
  --paper: #f7f4ec;
  --card: #fffef9;
  --sage: #dce8df;
  --green: #2e695b;
  --amber: #e8b75c;
  --line: rgba(23, 52, 47, 0.10);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; }
.shell { width: min(100%, 560px); margin: 0 auto; min-height: 100vh; padding: max(24px, env(safe-area-inset-top)) 20px calc(160px + env(safe-area-inset-bottom)); }
.hero, .student-hero { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 2px 28px; }
.student-hero { display: block; padding-bottom: 16px; }
h1 { margin: 8px 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(32px, 9vw, 46px); line-height: 1.08; letter-spacing: -1.5px; }
h2 { margin: 0; font-size: 20px; }
p { color: var(--muted); line-height: 1.6; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; }
.avatar, .student-avatar { display: grid; place-items: center; background: var(--green); color: white; border-radius: 50%; font-weight: 800; }
.avatar { width: 52px; height: 52px; font-family: Georgia, serif; font-size: 24px; }
.student-avatar { width: 44px; height: 44px; background: var(--sage); color: var(--green); }
.scope-card { background: var(--ink); color: white; border-radius: 24px; padding: 22px; margin-bottom: 28px; box-shadow: 0 14px 30px rgba(23,52,47,.13); }
.scope-card p { margin: 3px 0 0; color: rgba(255,255,255,.65); }
.big-number { font: 52px/1 Georgia, serif; margin-right: 5px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 2px 12px; }
.section-heading span { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.metric-grid article { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 10px; text-align: center; }
.metric-grid b { display: block; font: 28px Georgia, serif; }
.metric-grid span { color: var(--muted); font-size: 12px; }
.student-list { position: relative; z-index: 1; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.student-row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 15px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.student-row:last-child { border-bottom: 0; }
.student-copy { min-width: 0; flex: 1; }
.student-copy strong, .student-copy span { display: block; }
.student-copy span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.student-row em { color: #9b601c; background: #fff0d2; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-style: normal; }
.chevron { color: var(--muted); font-size: 25px; }
.floating-action { position: fixed; z-index: 4; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: auto; max-width: min(calc(100% - 40px), 520px); white-space: nowrap; padding: 15px 26px; text-align: center; color: white; background: var(--green); border-radius: 18px; text-decoration: none; box-shadow: 0 12px 25px rgba(46,105,91,.25); }
.disabled { opacity: .55; }
.top-nav a { color: var(--green); text-decoration: none; font-weight: 700; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button, .button { border: 0; border-radius: 16px; padding: 15px; background: var(--green); color: white; font: inherit; font-weight: 750; text-decoration: none; }
button.secondary { background: var(--sage); color: var(--green); }
button:disabled { opacity: .6; }
.timeline { display: grid; gap: 10px; }
.timeline-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 18px; padding: 16px; }
.timeline-card.family { border-left-color: var(--amber); }
.timeline-card time { color: var(--muted); font-size: 12px; }
.timeline-card p { margin: 9px 0 0; color: var(--ink); }
.attachments { margin-top: 12px; padding: 10px; background: var(--sage); border-radius: 12px; font-size: 12px; }
.empty { padding: 30px 18px; color: var(--muted); text-align: center; background: var(--card); border: 1px dashed rgba(23,52,47,.2); border-radius: 18px; }
.center-card { margin-top: 20vh; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 32px 24px; }
.center-card .button { display: inline-block; margin-top: 12px; }
.status-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); }
.flash { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--sage); color: var(--green); font-weight: 700; }
.flash.error { background: #fff0d2; color: #8b5518; }
.capture-form { display: grid; gap: 18px; }
.capture-form label, .capture-form label > span { display: grid; gap: 9px; font-weight: 750; }
.capture-form small { color: var(--muted); font-weight: 500; }
.capture-form textarea { width: 100%; min-height: 170px; resize: vertical; border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: var(--card); color: var(--ink); font: inherit; line-height: 1.6; }
.capture-form input[type="file"] { width: 100%; padding: 14px; border: 1px dashed rgba(23,52,47,.25); border-radius: 16px; background: var(--card); }
@media (min-width: 700px) { body { background: #ede8dc; } .shell { background: var(--paper); box-shadow: 0 0 60px rgba(23,52,47,.08); } }
