:root {
  color-scheme: light;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  color: #192628;
  background: #f3f3ee;
  --paper: #fff;
  --ink: #192628;
  --muted: #526361;
  --line: #dce3de;
  --accent: #ad321c;
  --cream: #ffede2;
  --forest: #254843;
  --dark: #171e20;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; }
a { color: var(--forest); }
button, .button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b53c24; outline-offset: 3px; }
.shell { width: min(1184px, calc(100% - 48px)); margin-inline: auto; }
.site-header { background: var(--dark); color: #fff; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: #fff; text-decoration: none; line-height: 1.1; }
.brand strong { display: block; font-size: 1.15rem; letter-spacing: -.025em; }
.brand small { display: block; margin-top: 5px; color: #d1dcd8; }
.brand-mark { width: 40px; height: 40px; position: relative; flex: none; border-radius: 11px; background: #fc744e; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 7px; background: #171e20; border-radius: 2px; transform: skew(-24deg); }
.brand-mark::before { height: 21px; left: 13px; top: 12px; }
.brand-mark::after { height: 18px; left: 22px; top: 8px; }
.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); padding-block: 20px; font-size: .85rem; }
.footer-inner a { text-decoration: none; font-weight: 650; }
main { flex: 1; padding-block: 32px 50px; }
.loading { margin: 4rem 0; color: var(--muted); }

.landing { display: grid; grid-template-columns: minmax(0, 1.39fr) minmax(0, 1fr); gap: 26px; margin-top: clamp(6px, 3vw, 32px); }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 500px; padding: clamp(28px, 5.8vw, 75px); display: flex; justify-content: center; flex-direction: column; border-radius: 22px; background: #203934; color: white; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: auto -16% -52% 50%; height: 560px; border-radius: 50%; border: 1px solid #8ab1a352; transform: rotate(-26deg); }
.hero::after { inset: auto -2% -56% 66%; border-color: #f9a68b65; }
.eyebrow { color: #a22e1a; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow { color: #ffab91; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4.3vw, 3.4rem); line-height: 1.04; letter-spacing: -.055em; margin-bottom: 12px; }
h2 { font-size: 1.35rem; line-height: 1.16; letter-spacing: -.025em; margin-bottom: 8px; }
h3 { font-size: 1.06rem; line-height: 1.25; margin-bottom: 4px; }
.hero h1 { font-size: clamp(3.4rem, 7.4vw, 6.6rem); margin: 16px 0 21px; max-width: 7ch; letter-spacing: -.078em; }
.hero h1 span { display: block; font-size: .43em; color: #dcebe6; letter-spacing: -.045em; line-height: 1.1; margin-top: 12px; white-space: nowrap; }
.hero p { max-width: 36ch; line-height: 1.6; color: #e0ebe7; margin: 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 2.5vw, 27px); }
.signin { align-self: center; padding: clamp(23px, 4vw, 44px); }
.signin h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.1; }
.signin .button { width: 100%; margin-top: 18px; }
.signin .register-link { margin-top: 8px; }
.profile-card { max-width: 820px; }
.profile-card .fields h3 { margin: 9px 0 0; }
.logo-card { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.association-logo { width: 84px; height: 84px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; }
.empty-logo { display: grid; place-items: center; color: var(--muted); background: #f1f5f1; }
.logo-actions { margin-top: 10px; }
.help { border-top: 1px solid var(--line); margin: 23px 0 0; padding-top: 17px; font-size: .85rem; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85rem; margin: 5px 0 0; line-height: 1.5; }
.sub { color: var(--muted); line-height: 1.5; margin-bottom: 0; }
.heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-end; margin-bottom: 24px; }
.heading h1 { overflow-wrap: anywhere; }
.header-actions, .actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.header-actions { justify-content: flex-end; }
.account-label { font-size: .85rem; color: #d1dcd8; overflow-wrap: anywhere; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--line); font-weight: 680; font-size: .9rem; line-height: 1.2; background: white; color: var(--ink); text-decoration: none; }
.button:hover { border-color: #90a39b; background: #f4f8f5; }
.primary { color: white; background: var(--forest); border-color: var(--forest); }
.primary:hover { background: #1b3834; color: white; }
.dark-button { border-color: #576362; background: transparent; color: #f6f8f7; }
.dark-button:hover { background: #344241; color: white; }
.small { min-height: 34px; font-size: .81rem; padding: 6px 10px; }
.remove { color: var(--accent); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--forest); font-weight: 720; text-align: start; text-decoration: underline; text-underline-offset: 3px; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; color: var(--ink); font-size: .86rem; font-weight: 650; }
.wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid #c5d0ca; border-radius: 8px; padding: 9px 11px; background-color: #fff; color: var(--ink); }
input:read-only, select:disabled, textarea:read-only { color: var(--ink); background-color: #f4f6f3; opacity: 1; }
textarea { resize: vertical; min-height: 78px; line-height: 1.5; }
input[type="checkbox"] { width: 16px; min-height: 16px; margin: 0; accent-color: var(--forest); }
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.section-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.grid { display: grid; gap: 14px; }
.records { display: grid; gap: 12px; }
.record { border: 1px solid var(--line); border-radius: 11px; padding: 14px; }
.record + .record { margin-top: 0; }
.record header { margin-bottom: 12px; }
.program { border: 1px solid var(--line); border-radius: 11px; }
.program summary { cursor: pointer; padding: 15px; font-weight: 720; }
.program summary span { font-weight: 450; margin-left: 5px; color: var(--muted); font-size: .85rem; }
.program-content { padding: 15px; border-top: 1px solid var(--line); display: grid; gap: 20px; }
.program-content section { display: grid; gap: 8px; align-content: start; }
.program-content .section-head { margin: 0; }
.checklist { display: flex; flex-wrap: wrap; gap: 7px; }
.check { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; font-size: .85rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button { border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); padding: 10px 14px; font-weight: 680; }
.tabs button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: white; }
.report-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.review { margin-top: 14px; }
.status { display: inline-flex; align-items: center; border-radius: 100vw; padding: 5px 9px; background: #e9eeeb; color: #374943; font-size: .76rem; font-weight: 730; white-space: nowrap; }
.status[data-status="submitted"] { background: #deeaf5; color: #1b4972; }
.status[data-status="reviewed"] { background: #dceee2; color: #21583b; }
.status[data-status="returned"] { background: #ffeadb; color: #853712; }
.notice, .flash { padding: 12px 15px; border-radius: 9px; background: #e7f0ea; color: #234d3f; overflow-wrap: anywhere; }
.notice { margin-bottom: 14px; }
.notice p { margin: 5px 0 0; white-space: pre-wrap; }
.notice.problem, .flash[data-error="true"] { background: var(--cream); color: #812b1a; }
#messages { position: fixed; z-index: 3; pointer-events: none; bottom: 12px; left: 0; right: 0; display: flex; justify-content: flex-end; }
.flash { margin: 0; pointer-events: auto; box-shadow: 0 4px 22px #18272426; }
.flash:empty { display: none; }
.dashboard-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.school-search { display: flex; gap: 8px; align-items: end; grid-column: 1 / -1; }
.school-search .field { flex: 1; }
.school-table { min-width: 880px; }
.school-table td { min-width: 98px; }
.school-table .cell-name { min-width: 200px; }
.compact { list-style: none; padding: 0; margin: 4px 0 0; min-width: 150px; }
.compact li { margin-bottom: 4px; }
.guide { max-width: 900px; }
.guide article { line-height: 1.58; }
.guide ol, .guide ul { padding-inline-start: 1.3rem; }
.guide li + li { margin-top: 8px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.metric { padding: 14px; }
.metric strong { display: block; font-size: 1.65rem; letter-spacing: -.05em; line-height: 1.1; margin-top: 4px; }
.metric span { color: var(--muted); font-size: .8rem; font-weight: 650; }
.admin-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.admin-alert { margin: 14px 0 0; }
.admin-alert code { display: block; margin: 6px 0; word-break: break-all; user-select: all; }
.table-wrap { overflow-x: auto; margin: 0 -5px; padding: 0 5px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .8rem; font-weight: 750; }
td { font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
.cell-name { min-width: 160px; overflow-wrap: anywhere; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding-block: 8px; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
summary { cursor: pointer; }

@media (max-width: 740px) {
  .shell { width: calc(100% - 28px); }
  main { padding-block: 19px 36px; }
  .landing { grid-template-columns: 1fr; gap: 14px; }
  .hero { min-height: 0; padding: 33px 24px; border-radius: 15px; }
  .hero h1 { margin: 12px 0 14px; font-size: clamp(3rem, 10vw, 5rem); }
  .heading { align-items: flex-start; flex-direction: column; }
  .account-label { display: none; }
  .dashboard-filters, .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-form { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .fields { grid-template-columns: 1fr; }
  .header-inner { min-height: 66px; }
  .tabs button { padding: 8px 10px; font-size: .85rem; }
}
