/* ============================================================================
   SCPS Classroom Applications — public site
   Tokens measured from www.scps.k12.fl.us (Sept 2026): Lexend, brand red
   #AC0C00, body #333, dark footer #2A2A2A, light band #F5F7F5.
   ============================================================================ */
:root {
  --red: #ac0c00;
  --red-dark: #8e0a00;
  --red-soft: #f7e9e7;
  --ink: #2a2a2a;
  --body: #333333;
  --muted: #636363;
  --faint: #999999;
  --rule: #e1e5e2;
  --band: #f5f7f5;
  --paper: #ffffff;
  --nav: #222222;
  --footer: #2a2a2a;
  --ok: #2f6b3a;      --ok-soft: #e6f1e8;
  --cond: #8a5a00;    --cond-soft: #fbf1dc;
  --no: #ac0c00;      --no-soft: #f7e9e7;
  --ai: #3b4a8a;      --ai-soft: #e8ecf8;
  --focus: #1a4fd6;
  --wrap: 1010px;
  --radius: 4px;
  --font: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-weight: 300; font-size: 16px; line-height: 1.6; color: var(--body); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.25; color: var(--ink); margin: 0 0 .5rem; text-wrap: balance; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
strong { font-weight: 500; }
code { font-family: Consolas, ui-monospace, monospace; font-size: .9em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.preline { white-space: pre-line; }
.req { color: var(--red); font-weight: 400; }

/* Skip link */
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 1000; border-radius: var(--radius); text-decoration: none; }
.skip-link:focus { top: 8px; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.brand img { width: 120px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; border-left: 2px solid var(--rule); padding-left: 16px; }
.brand-district { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.brand-site { font-size: 1.35rem; font-weight: 500; color: var(--red); }
.util { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .95rem; }
.util > a { color: var(--body); text-decoration: none; font-weight: 400; }
.util > a:hover { color: var(--red); text-decoration: underline; }
.util-search { display: flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.util-search input { border: 0; padding: 8px 10px; font: inherit; font-size: .95rem; width: 210px; color: var(--body); }
.util-search button { border: 0; background: var(--red); color: #fff; padding: 0 12px; cursor: pointer; display: grid; place-items: center; }
.util-search button:hover { background: var(--red-dark); }

/* Main nav */
.mainnav { background: var(--red); }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; }
.mainnav li { display: flex; flex: 0 1 auto; min-width: 0; }
.mainnav li + li { border-left: 1px solid rgba(255,255,255,.35); }
.mainnav a { display: flex; align-items: center; color: #fff; text-decoration: none; padding: 13px 15px; font-size: .95rem; font-weight: 400; white-space: nowrap; line-height: 1.2; }
.mainnav a:hover, .mainnav a:focus-visible { background: var(--red-dark); color: #fff; outline-color: #fff; outline-offset: -3px; }
.mainnav a.is-active { background: var(--red-dark); box-shadow: inset 0 -3px 0 #fff; }
.nav-toggle { display: none; }
@media (max-width: 960px) {
  .mainnav a { padding: 12px 10px; font-size: .9rem; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; margin: 10px 0; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); padding: 8px 14px; font: inherit; font-weight: 400; cursor: pointer; }
  .mainnav ul { display: none; flex-direction: column; padding-bottom: 8px; }
  .mainnav ul.is-open { display: flex; }
  .mainnav li { display: block; }
  .mainnav li + li { border-left: 0; border-top: 1px solid rgba(255,255,255,.25); }
  .mainnav a { padding: 12px 6px; white-space: normal; font-size: 1rem; }
  .util-search input { width: 150px; }
}

/* Breadcrumb */
.crumbs { background: var(--band); border-bottom: 1px solid var(--rule); font-size: .9rem; }
.crumbs ol { list-style: none; margin: 0 auto; padding-top: 8px; padding-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }

/* Page title with side rules (district pattern) */
.main { padding: 28px 20px 56px; min-height: 40vh; }
.page-title { display: flex; align-items: center; gap: 18px; text-align: center; color: var(--red); font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 500; margin: 6px 0 14px; }
.page-title::before, .page-title::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.page-title span { max-width: 80%; }
/* School logo beside the school name on the school page. */
.page-title.has-logo span { display: inline-flex; align-items: center; gap: 16px; text-align: left; }
.page-title-logo { flex: none; width: 72px; height: 72px; object-fit: contain; background: #fff; border: 1px solid var(--rule); border-radius: 50%; padding: 4px; }
@media (max-width: 560px) { .page-title-logo { width: 56px; height: 56px; } }
.lede { max-width: 72ch; margin: 0 auto 26px; text-align: center; color: var(--body); font-size: 1.05rem; }

/* Cards and prose */
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 24px; }
.card.empty { text-align: center; padding: 36px 24px; }
.card.empty p:last-child { margin-bottom: 0; }
.prose h2 { color: var(--red); font-size: 1.3rem; margin-bottom: .6rem; }
.prose p:last-child, .prose ul:last-child { margin-bottom: 0; }
.prose.narrow { max-width: 72ch; margin: 0 auto; }
.content-cards { display: grid; gap: 18px; }
.callout { border-left: 4px solid var(--red); background: var(--band); padding: 14px 18px; margin-bottom: 22px; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; }
.alert-error { background: var(--no-soft); border: 1px solid #e3b9b5; color: #6a0800; }
.alert ul { margin: 0; padding-left: 1.2em; }
.band { background: var(--band); margin: 32px -20px; padding: 32px 20px; }

/* Buttons */
.btn { display: inline-block; background: var(--red); color: #fff; border: 1px solid var(--red); border-radius: var(--radius); padding: 9px 18px; font: inherit; font-weight: 400; text-decoration: none; cursor: pointer; line-height: 1.3; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--red); }
.btn-outline:hover { background: var(--red-soft); color: var(--red-dark); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Badges */
.badge { display: inline-block; font-size: .78rem; font-weight: 500; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #bfdcc5; }
.badge-cond { background: var(--cond-soft); color: var(--cond); border-color: #ecd6a0; }
.badge-no { background: var(--no-soft); color: var(--no); border-color: #e3b9b5; }
.badge-ai { background: var(--ai-soft); color: var(--ai); border-color: #c8d0ee; }
.badge-pending { background: var(--cond-soft); color: var(--cond); font-size: .7rem; vertical-align: middle; margin-left: 8px; }
.badge-muted { background: var(--band); color: var(--muted); }

/* Home */
.hero { text-align: center; padding: 8px 0 12px; }
.hero-text { max-width: 70ch; margin: 0 auto 20px; font-size: 1.1rem; }
.hero-text p:last-child { margin-bottom: 0; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 30px 0 10px; }
.tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--body); }
.tile:hover { border-color: var(--red); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.tile-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--band); color: var(--red); display: grid; place-items: center; }
.tile-title { color: var(--red); font-weight: 500; font-size: 1.1rem; }
.tile-text { font-size: .95rem; }
.legend { margin-top: 30px; }
.legend h2 { text-align: center; color: var(--red); }
.legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 14px; }
.legend-item { border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; }
.legend-item .badge { margin-bottom: 10px; }
.legend-item .prose p { margin: 0; font-size: .97rem; }
.legend-counts { text-align: center; color: var(--muted); margin-top: 22px; }

/* Finder (school → teachers) */
.finder-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }
.finder-row-school { grid-template-columns: 1fr auto; }
@media (max-width: 760px) { .finder-row { grid-template-columns: 1fr; } }
.teacher-picker { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--rule); }
.picker-title { color: var(--red); font-size: 1.25rem; margin-bottom: 6px; }
.picker-help { max-width: 78ch; margin-bottom: 14px; }
.picker-tools { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.picker-tools .grow { flex: 1 1 320px; }
.picker-count { margin: 0 0 10px; font-weight: 400; color: var(--ink); }
.teacher-grid { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; max-height: 340px; overflow-y: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.teacher-grid li label { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: start; padding: 7px 8px; border-radius: var(--radius); cursor: pointer; line-height: 1.3; }
.teacher-grid li label:hover { background: var(--band); }
.teacher-grid input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); grid-row: 1 / span 2; }
.teacher-grid li label:has(input:checked) { background: #fffaf9; }
.teacher-name { font-weight: 400; color: var(--ink); }
.teacher-title { grid-column: 2; font-size: .82rem; color: var(--muted); }
.picker-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

/* Selected teachers (multi-teacher view) */
.teacher-chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip-teacher { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; }
.chip-remove { color: var(--muted); text-decoration: none; font-size: 1.15rem; line-height: 1; padding: 0 2px; }
.chip-remove:hover { color: var(--red); }
.chip-add { display: inline-block; padding: 6px 12px; color: var(--red); background: var(--paper); border-color: var(--red); text-decoration: none; }
.chip-add:hover { background: var(--red-soft); }
.app-teachers { margin: 2px 0 6px; font-size: .95rem; color: var(--ink); }
.field label { display: block; font-weight: 400; margin-bottom: 6px; color: var(--ink); }
.field select, .field input[type="text"], .field input[type="search"], .field input[type="date"] { width: 100%; padding: 10px 12px; font: inherit; font-weight: 300; border: 1px solid #b9bfbb; border-radius: var(--radius); background: #fff; color: var(--body); }
.field select:disabled { background: var(--band); color: var(--faint); }
.field-actions { display: flex; gap: 10px; align-items: end; }
.field-check label { display: flex; align-items: center; gap: 8px; margin-bottom: 0; padding: 10px 0; }
.finder-help { margin: 14px 0 0; color: var(--muted); font-size: .95rem; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar-sticky { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 12px 0; border-bottom: 1px solid var(--rule); }
.toolbar-text { margin: 0; max-width: 70ch; }
.has-selection .toolbar-sticky { border-bottom-color: var(--red); }

/* App cards */
.app-list { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.app-card { border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; background: var(--paper); }
.app-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.app-name { font-size: 1.15rem; margin: 0; }
.app-name a { color: var(--ink); text-decoration: none; }
.app-name a:hover { color: var(--red); text-decoration: underline; }
.app-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.app-meta { margin: 4px 0 8px; color: var(--muted); font-size: .92rem; }
.app-meta span + span::before { content: "·"; margin: 0 8px; color: var(--faint); }
.app-desc { margin: 0 0 10px; }
.app-links { margin: 8px 0 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: .95rem; }
.app-links .more { margin-left: auto; font-weight: 400; }
.app-links.stack { flex-direction: column; gap: 8px; }
.app-links.stack .btn { text-align: center; }
.conditions { border-left: 4px solid var(--cond); background: var(--cond-soft); padding: 10px 14px; margin: 8px 0 10px; border-radius: 0 var(--radius) var(--radius) 0; }
.conditions p { margin: 0; display: inline; }
.conditions-lg { margin: 0 0 22px; padding: 14px 18px; font-size: 1.02rem; }

/* AI disclosure (Rule 6A-1.0957) — shown wherever an AI tool is listed */
.ai-panel { border: 1px solid #c8d0ee; border-left: 4px solid var(--ai); background: var(--ai-soft); padding: 10px 14px; margin: 8px 0 10px; border-radius: 0 var(--radius) var(--radius) 0; }
.ai-panel-h { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; font-weight: 500; color: var(--ai); font-size: .95rem; }
.ai-panel-h svg { flex: none; margin-top: 2px; }
.ai-facts { margin: 0; font-size: .95rem; }
.ai-facts dt { color: var(--ai); font-weight: 400; font-size: .85rem; text-transform: uppercase; letter-spacing: .02em; }
.ai-facts dd { margin: 2px 0 8px; color: var(--ink); }
.ai-facts dd:last-child { margin-bottom: 0; }
.app-card-ai .ai-panel { margin: 12px 0 14px; padding: 14px 18px; }
.ai-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: .92rem; }
.ai-meta dt { color: var(--muted); font-weight: 300; }
.ai-meta dd { margin: 0; color: var(--ink); }
@media (max-width: 600px) { .ai-meta { grid-template-columns: 1fr; gap: 0; } .ai-meta dd { margin-bottom: 6px; } }
.prose .mb-0 { margin-bottom: 0; }
/* Inside the opt-out checklist the panel lines up with the concern box */
.check-item .ai-panel { margin: 10px 0 2px 36px; }
.reason { border-left: 4px solid var(--no); background: var(--no-soft); padding: 10px 14px; margin: 8px 0 10px; }
.reason-lg { margin: 0 0 22px; padding: 14px 18px; }
details.teachers { margin: 8px 0 4px; }
details.teachers summary { cursor: pointer; color: var(--red); font-weight: 400; }
.teacher-list { margin: 8px 0 0; padding-left: 1.2em; columns: 2; column-gap: 32px; }
@media (max-width: 600px) { .teacher-list { columns: 1; } }
.teacher-list li { break-inside: avoid; margin-bottom: 4px; }

/* Teacher page: opt-out link under the list */
.optout-link { margin: 22px 0 0; text-align: center; font-size: 1.02rem; }
.section-title { color: var(--red); margin: 26px 0 4px; }

/* Opt-out form */
.school-message { max-width: 80ch; margin: 0 auto 22px; padding: 16px 20px; border: 1px solid var(--rule); border-left: 4px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0; background: var(--paper); }
.school-message h2 { font-size: 1.15rem; }
.school-message .mb-0 { margin-bottom: 0; }
.privacy-note { border: 1px solid #bfdcc5; background: var(--ok-soft); color: #1f4a29; padding: 14px 18px; border-radius: var(--radius); margin: 0 auto 22px; max-width: 80ch; }
.optout-form fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.optout-form legend { font-weight: 500; font-size: 1.15rem; color: var(--ink); margin-bottom: 12px; padding: 0; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-item { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; }
.check-item.is-selected, .check-item:has(input:checked) { border-color: var(--red); background: #fffaf9; }
.check-row { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--red); grid-row: 1 / span 2; }
.check-name { font-weight: 400; color: var(--ink); }
.check-meta { grid-column: 2; font-size: .88rem; color: var(--muted); }
.concern { margin: 10px 0 2px 36px; }
.concern label { display: block; font-size: .9rem; margin-bottom: 4px; color: var(--ink); }
.concern textarea { width: 100%; padding: 8px 10px; font: inherit; font-weight: 300; font-size: .95rem; border: 1px solid #b9bfbb; border-radius: var(--radius); resize: vertical; min-height: 2.6em; }
.check-item:not(.is-selected):not(:has(input:checked)) .concern { opacity: .7; }
@media (max-width: 600px) { .concern { margin-left: 0; } }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
.optout-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

/* Library filters */
.filters { margin-bottom: 18px; }
.filter-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto auto; gap: 14px; align-items: end; }
@media (max-width: 900px) { .filter-row { grid-template-columns: 1fr 1fr; } .filter-row .grow { grid-column: 1 / -1; } }
.filter-row-single { grid-template-columns: 1fr auto; }
.filters .finder-help { margin-top: 10px; }
.result-count { color: var(--muted); margin: 0 0 12px; }

/* Details */
.detail-head { text-align: center; margin: -6px 0 22px; }
.detail-head .app-badges { justify-content: center; margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 800px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-main { display: grid; gap: 18px; }
.facts h2 { font-size: 1.1rem; color: var(--red); }
.facts dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 16px; font-size: .95rem; }
.facts dt { color: var(--muted); font-weight: 300; }
.facts dd { margin: 0; color: var(--ink); font-weight: 400; }
.chips { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--band); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.school-list { columns: 2; column-gap: 28px; padding-left: 1.2em; margin: 0; }
@media (max-width: 600px) { .school-list { columns: 1; } }

/* Search */
.hit-list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 6px; }
.hit-list li { padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius); }
.count { display: inline-block; background: var(--band); color: var(--muted); font-size: .8rem; padding: 2px 9px; border-radius: 999px; vertical-align: middle; margin-left: 6px; font-weight: 400; }
section + section { margin-top: 26px; }

/* Footer */
.site-footer { background: var(--footer); color: #e6e6e6; margin-top: 30px; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr; gap: 28px; padding-top: 34px; padding-bottom: 20px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-name { font-weight: 500; font-size: 1.05rem; color: #fff; margin-bottom: 6px; }
.site-footer address { font-style: normal; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-note p { margin: 0 0 8px; color: #cfcfcf; }
.footer-updated { color: #fff; font-weight: 400; }
.footer-copy { border-top: 1px solid #444; padding-top: 14px; padding-bottom: 18px; font-size: .85rem; color: #bdbdbd; }

/* Print */
@media print {
  .site-header .util, .mainnav, .crumbs, .site-footer .footer-links, .finder, .optout-link, .skip-link, .hero-actions { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .page-title { color: #000; }
  a { color: #000; text-decoration: none; }
  .app-card, .card { break-inside: avoid; border-color: #999; }
}
