:root {
  --green: #43b024;
  --green-dark: #267a18;
  --green-soft: #eaf6e6;
  --aqua: #00aec7;
  --purple: #563d82;
  --orange: #dc582a;
  --yellow: #fed847;
  --ink: #262626;
  --muted: #666;
  --line: #dcdedb;
  --surface: #fff;
  --wash: #f6f8f5;
  --shadow: 0 12px 30px rgba(38, 38, 38, .08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--wash); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button, label[for], select { cursor: pointer; }
a { color: var(--green-dark); }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .7rem 1rem; background: var(--ink); color: white; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.site-header { min-height: 164px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.4rem clamp(1.2rem, 4vw, 4.5rem); background: white; border-top: 9px solid var(--green); }
.brand-block { display: flex; align-items: center; gap: 1.5rem; min-width: 0; }
.brand-logo { width: min(420px, 42vw); height: auto; display: block; }
.year-lockup { border-left: 1px solid var(--line); padding-left: 1.4rem; display: grid; gap: .2rem; }
.year-lockup span { color: var(--green-dark); text-transform: uppercase; letter-spacing: .12em; font-size: .77rem; font-weight: 700; }
.year-lockup strong { font-size: 1.12rem; white-space: nowrap; }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1rem; border-radius: 999px; border: 1px solid transparent; font-weight: 700; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .view-tab:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(0,174,199,.3); outline-offset: 2px; }
.button-primary { border-color: var(--green); background: var(--green); color: white; box-shadow: 0 7px 16px rgba(67,176,36,.22); }
.button-secondary { border-color: var(--line); background: white; }

.dashboard-toolbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 1rem; min-height: 72px; padding: .75rem clamp(1.2rem, 4vw, 4.5rem); background: rgba(255,255,255,.96); border-block: 1px solid var(--line); box-shadow: 0 5px 18px rgba(0,0,0,.05); backdrop-filter: blur(8px); }
.view-tabs { display: flex; padding: .27rem; background: #edf0ec; border-radius: 999px; }
.view-tab { min-height: 42px; padding: .6rem 1.05rem; border: 0; background: transparent; border-radius: 999px; font-weight: 700; }
.view-tab.is-active { background: var(--green); color: white; box-shadow: 0 3px 10px rgba(67,176,36,.23); }
.period-control { display: flex; align-items: center; gap: .55rem; }
.period-control label { font-size: .87rem; color: var(--muted); }
select, input[type="search"] { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; background: white; padding: .55rem .8rem; }
.data-status { margin: 0; justify-self: end; color: var(--muted); font-size: .88rem; }

main { padding: 1.5rem clamp(1rem, 3vw, 3rem) 4rem; }
.section-shell { width: min(1440px, 100%); margin: 0 auto 1.25rem; }
.intro-grid { min-height: 225px; display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 2rem; padding: clamp(2rem, 5vw, 4.5rem); overflow: hidden; position: relative; color: white; background: var(--green); border-radius: 28px; }
.intro-grid::after { content: ""; position: absolute; right: -100px; bottom: -180px; width: 420px; height: 420px; border: 44px solid rgba(255,255,255,.12); border-radius: 50%; }
.eyebrow { margin: 0 0 .35rem; color: var(--green-dark); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.intro-grid .eyebrow { color: white; opacity: .85; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2.2rem, 4vw, 4.3rem); line-height: .98; letter-spacing: -.045em; font-weight: 400; }
h2 { margin: 0; font-size: clamp(1.5rem, 2.2vw, 2.25rem); line-height: 1.05; letter-spacing: -.025em; font-weight: 500; }
h3 { margin: 0; font-size: 1.05rem; }
.lede { margin: .9rem 0 0; font-size: 1.08rem; opacity: .9; }
.spark-note { position: relative; z-index: 1; justify-self: end; width: min(330px, 100%); padding: 1.25rem 1.3rem; background: white; color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); }
.spark-note p { margin: .35rem 0 0; font-size: 1.05rem; }
.spark { color: var(--yellow); font-size: 2rem; line-height: 1; text-shadow: 0 0 0 var(--ink); }

.section-heading, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-note { margin: 0; color: var(--muted); font-size: .9rem; }
.headline-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.headline-card { min-height: 148px; display: flex; flex-direction: column; justify-content: space-between; padding: 1.25rem; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.headline-card span { color: var(--muted); font-weight: 700; }
.headline-card strong { color: var(--green-dark); font-size: clamp(2.15rem, 4vw, 3.45rem); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.headline-card small { color: var(--muted); }

.goals-section { padding: clamp(1.2rem, 2.5vw, 2rem); background: white; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.goal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.goal-card { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: .85rem; min-height: 130px; padding: 1rem; background: var(--wash); border-radius: 17px; }
.goal-card.no-goal { grid-template-columns: 1fr; border-left: 5px solid var(--green); }
.goal-card.no-goal .metric-number { font-size: 2.5rem; }
.donut { width: 82px; height: 82px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(var(--progress-color) calc(var(--progress) * 1%), #dfe7dc 0); }
.donut::after { content: ""; position: absolute; inset: 11px; background: var(--wash); border-radius: 50%; }
.donut span { position: relative; z-index: 1; font-weight: 800; font-size: .87rem; }
.goal-copy { display: grid; gap: .15rem; }
.goal-copy strong, .metric-number { font-size: 1.75rem; line-height: 1; font-weight: 500; }
.goal-copy span { font-weight: 700; }
.goal-copy small { color: var(--muted); }

.two-column { display: grid; grid-template-columns: 1.4fr .6fr; gap: 1.25rem; }
.two-column.monthly-media-only { grid-template-columns: 1fr; }
[hidden] { display: none !important; }
.panel { min-width: 0; padding: clamp(1.2rem, 2.5vw, 2rem); background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.source-tag { align-self: flex-start; padding: .35rem .65rem; color: var(--green-dark); background: var(--green-soft); border-radius: 999px; font-size: .78rem; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem .65rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
thead th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
tbody td:not(:first-child) { font-variant-numeric: tabular-nums; font-weight: 700; }
.data-footnote { margin: .85rem 0 0; color: var(--muted); font-size: .8rem; }
.bar-chart { display: grid; gap: 1rem; padding-top: .5rem; }
.bar-item { display: grid; gap: .4rem; }
.bar-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.bar-track { height: 15px; overflow: hidden; background: #edf0ec; border-radius: 999px; }
.bar-fill { height: 100%; min-width: 2px; border-radius: inherit; transition: width .35s ease; }

.photo-section { padding: clamp(1.2rem, 2.5vw, 2rem); background: #edf8fa; border-radius: 28px; }
.photo-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.photo-empty, .photo-item { min-height: 210px; overflow: hidden; position: relative; border: 2px dashed rgba(0,174,199,.42); border-radius: 18px; background: white; }
.photo-empty { display: grid; place-content: center; justify-items: center; gap: .25rem; color: var(--purple); text-align: center; }
.photo-empty span { font-size: 2.2rem; color: var(--aqua); }
.photo-empty small { color: var(--muted); }
.photo-item img { width: 100%; height: 100%; min-height: 210px; max-height: 310px; object-fit: cover; display: block; }
.photo-item button { position: absolute; top: .7rem; right: .7rem; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(38,38,38,.78); color: white; }

.map-school-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.panel-stat { color: var(--green-dark); font-size: 1.2rem; white-space: nowrap; }
.map-stage { min-height: 360px; display: grid; place-items: center; padding: 1rem; background: var(--wash); border-radius: 16px; }
.map-stage svg { display: block; width: 100%; height: 350px; max-width: 100%; }
.map-stage svg path { fill: white; stroke: var(--green-dark); stroke-width: 80; vector-effect: none; transition: fill .25s ease; }
.map-stage svg .visited path, .map-stage svg path.visited { fill: var(--green); }
.county-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.county-chip { padding: .28rem .55rem; color: var(--green-dark); background: var(--green-soft); border-radius: 999px; font-size: .78rem; }
.school-controls { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-bottom: .8rem; }
.school-controls input, .school-controls select { width: 100%; }
.school-list { height: 365px; overflow: auto; margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.school-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: .7rem; padding: .72rem .15rem; border-bottom: 1px solid #eceeeb; }
.school-list span { font-weight: 700; }
.school-list small { display: inline-flex; align-items: center; min-width: max-content; padding: .2rem .45rem; color: #005968; background: #dff5f8; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.school-empty { color: var(--muted); font-style: italic; }

.community-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature-card { min-height: 250px; display: flex; flex-direction: column; justify-content: center; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-card > strong { font-size: clamp(3.5rem, 6vw, 6rem); line-height: .9; font-weight: 400; letter-spacing: -.06em; }
.feature-card > span { font-size: 1.1rem; font-weight: 700; }
.feature-card .eyebrow { color: inherit; opacity: .72; }
.yellow-card { background: var(--yellow); }
.aqua-card { background: var(--aqua); color: white; }
.green-card { background: var(--green); color: white; }
.mini-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid currentColor; }
.mini-split span { display: grid; font-size: .8rem; opacity: .9; }
.mini-split b { font-size: 1.3rem; }

.editable-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.microsite-metric-grid { grid-template-columns: repeat(3, 1fr); }
.editable-metric { min-height: 145px; display: grid; grid-template-columns: 1fr auto; align-content: space-between; gap: .5rem; padding: 1.15rem; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.editable-metric span { grid-column: 1 / -1; color: var(--muted); font-weight: 700; }
.editable-metric input { width: 100%; min-width: 0; padding: 0; border: 0; border-bottom: 2px solid var(--green); background: transparent; color: var(--green-dark); font-size: 2rem; font-weight: 500; }
.editable-metric input::placeholder { color: #a0a7a0; font-size: 1rem; }
.editable-metric small { align-self: end; padding-bottom: .25rem; font-weight: 700; }
.metric-pair { grid-template-columns: 1fr; }
.metric-pair-values { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.metric-pair-values > div, .metric-pair-values > label { min-width: 0; display: grid; align-content: end; gap: .2rem; }
.metric-pair-values strong { color: var(--green-dark); font-size: 2rem; line-height: 1.1; font-weight: 500; }
.metric-pair-values small { color: var(--muted); font-size: .72rem; line-height: 1.2; }
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.social-card { padding: 1rem; background: var(--wash); border-radius: 15px; }
.social-card h3 { margin-bottom: .75rem; }
.social-card label { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: .6rem; padding: .42rem 0; color: var(--muted); font-size: .86rem; }
.social-card input { width: 100%; padding: .35rem .4rem; border: 0; border-bottom: 1px solid var(--green); background: transparent; text-align: right; font-weight: 700; }
.report-drop { min-height: 125px; display: grid; place-content: center; justify-items: center; gap: .15rem; margin-bottom: .7rem; color: var(--purple); background: #f3f0f8; border: 2px dashed #b7aacb; border-radius: 16px; text-align: center; }
.report-drop.is-dragging { background: #e9e2f3; border-color: var(--purple); }
.report-drop span { font-size: 2rem; }
.report-drop small, .uploaded-file { color: var(--muted); }
.uploaded-file { margin: .4rem 0 1rem; font-size: .82rem; }
.field-label { display: grid; gap: .45rem; font-weight: 700; }
textarea { width: 100%; resize: vertical; padding: .8rem; border: 1px solid var(--line); border-radius: 11px; background: white; }

.analysis-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 1rem; }
.analysis-card { display: grid; gap: .55rem; padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); font-weight: 700; }
.quote-card { background: #fffbee; border-color: #f0d663; }

.site-footer { display: flex; align-items: center; justify-content: center; gap: 2rem; padding: 2.2rem 1.2rem; background: white; border-top: 7px solid var(--green); }
.site-footer img { width: 230px; }
.site-footer p { margin: .3rem 0 0; color: var(--muted); }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; max-width: 360px; padding: .8rem 1rem; color: white; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .site-header { align-items: flex-start; }
  .brand-block { align-items: flex-start; }
  .year-lockup { display: none; }
  .goal-grid { grid-template-columns: repeat(2, 1fr); }
  .headline-grid, .editable-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .two-column, .map-school-grid { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-header { display: grid; padding: 1rem; }
  .brand-logo { width: min(390px, 100%); }
  .header-actions { justify-content: flex-start; }
  .dashboard-toolbar { grid-template-columns: 1fr; position: static; padding: .8rem 1rem; }
  .view-tabs { width: 100%; }
  .view-tab { flex: 1; }
  .data-status { justify-self: start; }
  .intro-grid { grid-template-columns: 1fr; padding: 2rem 1.3rem; }
  .spark-note { justify-self: start; }
  .headline-grid, .goal-grid, .community-grid, .editable-metric-grid, .rating-grid, .analysis-grid, .photo-gallery { grid-template-columns: 1fr; }
  .goal-card { grid-template-columns: 76px 1fr; }
  .donut { width: 72px; height: 72px; }
  .school-controls, .social-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media print {
  body { background: white; }
  .site-header { min-height: auto; padding: .6rem 0 1rem; border-top-width: 5px; }
  .brand-logo { width: 310px; }
  .dashboard-toolbar, .header-actions, .photo-empty, .photo-item button, .school-controls, .editable-note { display: none !important; }
  main { padding: 0; }
  .section-shell { break-inside: avoid; margin-bottom: .7rem; }
  .intro-grid { min-height: auto; padding: 1.2rem; }
  .headline-card, .panel, .goals-section, .feature-card, .editable-metric, .analysis-card { box-shadow: none; }
  .school-list { height: auto; max-height: none; overflow: visible; }
  .site-footer { padding: 1rem 0; }
  input, textarea { border: 0 !important; }
}
html { background: #fff; }
.admin-bar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(20px, 5vw, 72px); color: #fff; background: #563d82; box-shadow: 0 5px 18px rgb(0 0 0 / 16%); }
.admin-bar[hidden] { display: none; }
.admin-bar > div { display: flex; align-items: center; gap: 14px; }
.admin-bar span { font-size: .84rem; opacity: .86; }
.admin-actions { justify-content: flex-end; }
.admin-bar .button { min-height: 38px; padding: 8px 14px; }
.admin-bar .button-primary { background: #fed847; color: #33254b; }
.admin-bar .button-secondary { background: #fff; color: #33254b; }
.preview-bar { background: #243f73; }
.public-mode .header-actions label[for="workbookUpload"], .public-mode .header-actions label[for="photoUpload"], .public-mode .photo-empty, .public-mode [data-remove-photo], .public-mode .report-drop, .public-mode .editable-note,
.preview-mode .header-actions label[for="workbookUpload"], .preview-mode .header-actions label[for="photoUpload"], .preview-mode .photo-empty, .preview-mode [data-remove-photo], .preview-mode .report-drop, .preview-mode .editable-note { display: none !important; }
.public-mode [data-save], .preview-mode [data-save] { pointer-events: none; border-color: transparent; background: transparent; }
@media (max-width: 760px) { .admin-bar, .admin-bar > div { align-items: stretch; flex-direction: column; } .admin-actions { width: 100%; } }
