:root {
  --navy: #072238;
  --navy-2: #0d304b;
  --turquoise: #007f86;
  --turquoise-dark: #005f65;
  --coral: #d8563f;
  --gold: #d9a62e;
  --sky: #e8f4f5;
  --white: #ffffff;
  --ink: #18252e;
  --muted: #5b6b75;
  --line: #d5dee3;
  --paper: #f4f7f8;
  --success: #157a50;
  --danger: #b6382a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.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; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
body.login-is-open { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 1000; padding: .75rem 1rem; background: var(--white); color: var(--navy); font-weight: 700; }
.skip-link:focus { top: 1rem; }
.login-gate { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; background: rgba(3,25,39,.92); }
.login-gate[hidden] { display: none; }
.login-panel { width: min(500px, 100%); padding: 2rem; background: var(--white); border-top: 6px solid var(--turquoise); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.login-panel h1 { margin: 0 0 .65rem; color: var(--navy); font-size: 2rem; line-height: 1.15; }
.login-panel > p:not(.eyebrow) { color: var(--muted); }
.login-panel form { display: grid; gap: .55rem; margin: 1.4rem 0 1rem; }
.login-panel label { color: var(--navy); font-weight: 800; }
.login-panel input { width: 100%; min-height: 46px; border: 1px solid #9eafb9; padding: .65rem .75rem; background: var(--white); color: var(--ink); }
.login-help { margin: .25rem 0; padding: .65rem .75rem; background: var(--sky); color: var(--navy) !important; font-size: .9rem; }
.login-error { margin: 0; color: var(--danger) !important; font-weight: 700; }
.prototype-banner { display: flex; justify-content: center; gap: 1rem; padding: .35rem 1rem; background: #102f3f; color: #d7e4e8; font-size: .78rem; font-weight: 700; letter-spacing: 0; }
.prototype-banner span + span { padding-left: 1rem; border-left: 1px solid #567080; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); }
.header-inner { display: grid; grid-template-columns: minmax(220px, 310px) 1fr auto; align-items: center; min-height: 78px; max-width: 1440px; margin: 0 auto; padding: .7rem 2rem; gap: 1.5rem; }
.brand img { display: block; width: min(100%, 285px); height: auto; }
.primary-nav { display: flex; justify-content: center; gap: clamp(1rem, 2.3vw, 2.25rem); }
.primary-nav a { text-decoration: none; font-weight: 700; color: var(--navy); }
.primary-nav a:hover { color: var(--turquoise); }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer; font-size: 1.25rem; }
.language-button, .portal-button { min-height: 42px; border: 1px solid var(--line); background: var(--white); color: var(--navy); font-weight: 700; padding: 0 .9rem; cursor: pointer; }
.portal-button { border-color: var(--turquoise); background: var(--turquoise); color: var(--white); }
.mobile-menu { display: none; }
.mobile-nav { padding: .5rem 1rem 1rem; border-top: 1px solid var(--line); }
.mobile-nav a { display: block; padding: .7rem 0; text-decoration: none; font-weight: 700; }

.view[hidden] { display: none !important; }
.hero { position: relative; min-height: min(69vh, 720px); display: flex; align-items: flex-end; overflow: hidden; background: var(--navy); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,25,39,.92) 0%, rgba(4,25,39,.72) 38%, rgba(4,25,39,.15) 70%, rgba(4,25,39,.05) 100%); }
.hero-content { position: relative; z-index: 1; max-width: 1440px; width: 100%; margin: 0 auto; padding: 5.5rem 2rem 6.5rem; color: var(--white); }
.hero-content > * { max-width: 690px; }
.eyebrow { margin: 0 0 .7rem; text-transform: uppercase; font-size: .82rem; font-weight: 800; letter-spacing: .08em; color: #8fe2e1; }
.eyebrow.dark { color: var(--turquoise-dark); }
.hero h1 { margin: 0; font-size: clamp(2.65rem, 5vw, 5rem); line-height: 1.02; letter-spacing: 0; max-width: 780px; }
.hero p:not(.eyebrow) { font-size: 1.25rem; line-height: 1.55; }
.hero-actions { display: flex; gap: .75rem; margin-top: 1.8rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border: 1px solid transparent; padding: .65rem 1rem; text-decoration: none; font-weight: 800; cursor: pointer; border-radius: 4px; }
.button.primary { background: var(--coral); color: var(--white); }
.button.secondary { border-color: var(--white); color: var(--white); background: rgba(0,0,0,.12); }
.button.muted { border-color: var(--line); background: var(--white); color: var(--navy); }

.quick-actions { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 1240px; margin: -2.2rem auto 0; background: var(--white); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(8,35,56,.12); }
.quick-actions a { padding: 1.25rem; text-decoration: none; min-width: 0; border-right: 1px solid var(--line); }
.quick-actions a:last-child { border-right: 0; }
.quick-actions strong, .quick-actions span { display: block; }
.quick-actions strong { color: var(--navy); }
.quick-actions span { margin-top: .25rem; color: var(--muted); font-size: .86rem; }

.content-band, .news-band { max-width: 1240px; margin: 0 auto; padding: 5.5rem 1.5rem; }
.news-band { padding-top: 1rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 2rem; line-height: 1.2; }
.text-button { border: 0; background: none; color: var(--turquoise-dark); padding: .25rem 0; cursor: pointer; font-weight: 800; text-decoration: none; }
.text-button.light { color: var(--white); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service-grid article { padding: 1.6rem; border-top: 4px solid var(--turquoise); background: var(--paper); }
.service-grid h3 { margin: .75rem 0 .4rem; color: var(--navy); font-size: 1.3rem; }
.service-grid p { color: var(--muted); }
.service-grid a { color: var(--turquoise-dark); font-weight: 800; }
.service-icon { display: inline-flex; justify-content: center; align-items: center; width: 42px; height: 42px; background: var(--navy); color: var(--white); font-size: .8rem; font-weight: 800; }
.news-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 1.5rem; }
.featured-news { display: grid; grid-template-columns: 42% 1fr; min-height: 300px; border: 1px solid var(--line); }
.news-art { min-height: 260px; background: linear-gradient(140deg, var(--gold), var(--coral) 50%, var(--turquoise)); }
.featured-news > div:last-child { padding: 1.5rem; }
.featured-news h3 { font-size: 1.45rem; color: var(--navy); }
.tag { margin: 0 0 .45rem; color: var(--turquoise-dark); text-transform: uppercase; font-size: .76rem; font-weight: 800; letter-spacing: .06em; }
.event-list { border-top: 1px solid var(--line); }
.event-list article { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.event-list time { flex: 0 0 62px; color: var(--coral); font-size: 1.4rem; font-weight: 800; text-align: center; }
.event-list time span { display: block; font-size: .72rem; }
.event-list h3, .event-list p { margin: 0; }
.event-list h3 { color: var(--navy); font-size: 1rem; }
.event-list p { color: var(--muted); font-size: .86rem; }

.school-masthead { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem max(2rem, calc((100vw - 1240px)/2)); background: var(--navy); color: var(--white); }
.school-identity { display: flex; align-items: center; gap: 1rem; }
.school-identity p, .school-identity h1 { margin: 0; }
.school-identity p { font-size: .82rem; color: #b9cbd5; }
.school-identity h1 { font-size: 1.5rem; }
.school-mark { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; background: var(--gold); color: var(--navy); font-weight: 900; }
.school-nav { display: flex; gap: 2rem; justify-content: center; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.school-nav a { text-decoration: none; font-weight: 700; color: var(--navy); }
.school-hero { min-height: 420px; display: flex; align-items: end; padding: 3rem max(2rem, calc((100vw - 1240px)/2)); background: linear-gradient(110deg, rgba(5,35,56,.96), rgba(0,127,134,.74)), url("assets/tusd-campus-hero.png") center/cover; color: var(--white); }
.school-hero > div { max-width: 740px; }
.school-hero h2 { margin: 0; font-size: 2.6rem; line-height: 1.1; }
.school-hero p:not(.eyebrow) { font-size: 1.1rem; }
.school-content { max-width: 1240px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.school-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1rem 1.2rem; background: #fff3d1; border-left: 5px solid var(--gold); }
.school-alert a { color: var(--navy); font-weight: 800; }
.school-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.school-grid article { padding: 1.4rem; border: 1px solid var(--line); }
.school-grid h3 { color: var(--navy); }

.workspace-view { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 120px); background: var(--paper); }
.workspace-sidebar { padding: 1.6rem 1rem; background: var(--navy); color: var(--white); }
.sidebar-label { margin: 0 0 1rem; color: #9bb3c0; text-transform: uppercase; font-size: .76rem; font-weight: 800; letter-spacing: .08em; }
.sidebar-item { display: block; width: 100%; padding: .8rem .9rem; border: 0; background: transparent; color: #dce7ec; text-align: left; cursor: pointer; font-weight: 700; }
.sidebar-item.is-active { background: var(--turquoise); color: var(--white); }
.workspace-main { min-width: 0; padding: 2rem; }
.workspace-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; max-width: 1280px; margin: 0 auto 1.2rem; }
.workspace-toolbar h1 { margin: 0; color: var(--navy); font-size: 2rem; }
.session-control { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; }
.session-control span { display: flex; flex-direction: column; min-width: 0; text-align: right; }
.session-control small { color: var(--muted); overflow-wrap: anywhere; }
.status-strip { display: grid; grid-template-columns: 2fr repeat(3, 1fr); max-width: 1280px; margin: 0 auto 1.25rem; border: 1px solid var(--line); background: var(--white); }
.status-strip > div { padding: 1rem; border-right: 1px solid var(--line); }
.status-strip > div:last-child { border-right: 0; }
.status-strip span, .status-strip strong { display: block; }
.status-strip span { color: var(--muted); font-size: .78rem; }
.status-strip strong { margin-top: .2rem; color: var(--navy); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 1.25rem; max-width: 1280px; margin: 0 auto; }
.panel { border: 1px solid var(--line); background: var(--white); padding: 1.25rem; border-radius: 6px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 1.18rem; }
.page-editor > label, .page-editor fieldset { display: block; margin-top: 1rem; color: var(--navy); font-weight: 700; }
.page-editor input[type="text"], .page-editor input[type="date"], .page-editor textarea { width: 100%; margin-top: .35rem; border: 1px solid #aab9c2; padding: .72rem; background: #fbfcfc; color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.page-editor fieldset { border: 1px solid var(--line); padding: .8rem; }
.check { display: flex !important; align-items: center; gap: .5rem; margin: .4rem 0 !important; color: var(--ink) !important; font-weight: 400 !important; }
.check input { width: 18px; height: 18px; }
.editor-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.status { display: inline-flex; align-items: center; min-height: 26px; padding: .2rem .55rem; font-size: .72rem; font-weight: 800; border-radius: 999px; white-space: nowrap; }
.status.draft { background: #eef0f2; color: #4f5d66; }
.status.on-track, .status.ready { background: #dff3e9; color: #0e6843; }
.status.review { background: #fff0c6; color: #825c00; }
.status.blocked { background: #fae3df; color: var(--danger); }
.workflow-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.workflow-list li { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.workflow-list li > span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 2px solid #a9b6bd; border-radius: 50%; font-weight: 800; }
.workflow-list li.complete > span { border-color: var(--success); background: var(--success); color: var(--white); }
.workflow-list li.current > span { border-color: var(--gold); color: #7b5900; }
.workflow-list strong, .workflow-list small { display: block; }
.workflow-list small { color: var(--muted); }
.syndication-panel { max-width: 1280px; margin: 1.25rem auto 0; }
.queue-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.queue-icon { display: inline-flex; justify-content: center; align-items: center; width: 36px; height: 36px; background: var(--sky); color: var(--turquoise-dark); font-weight: 800; }
.queue-row strong, .queue-row small { display: block; }
.queue-row small { color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 1280px; margin: 0 auto 1.25rem; }
.metric-grid article { padding: 1rem; background: var(--white); border: 1px solid var(--line); }
.metric-grid span, .metric-grid strong, .metric-grid small { display: block; }
.metric-grid span, .metric-grid small { color: var(--muted); }
.metric-grid strong { font-size: 1.8rem; color: var(--navy); }
.metric-grid small { margin-top: .25rem; }
.danger-text { color: var(--danger) !important; }
.issue-panel { max-width: 1280px; margin: 0 auto; }
.issue-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.issue-row p { margin: .2rem 0 0; color: var(--muted); }
.issue-row button { min-height: 36px; border: 1px solid var(--turquoise); background: var(--white); color: var(--turquoise-dark); font-weight: 800; cursor: pointer; }
.issue-row.is-resolved { opacity: .62; }
.issue-row.is-resolved strong { text-decoration: line-through; }
.approval-action { width: 100%; margin-top: .8rem; }
.severity { display: inline-flex; justify-content: center; padding: .25rem .45rem; color: var(--white); font-size: .72rem; font-weight: 800; }
.severity.critical { background: var(--danger); }
.severity.serious { background: #b55b15; }
.severity.moderate { background: #756113; }
.manual-checks { margin-top: 1rem; padding: 1rem; background: var(--paper); }
.manual-checks h3 { margin: 0 0 .5rem; color: var(--navy); }

.site-footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem max(2rem, calc((100vw - 1240px)/2)); background: #031927; color: #d3e0e6; }
.site-footer[hidden] { display: none; }
.site-footer > div { display: flex; flex-direction: column; }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: start; gap: 1rem; }
.site-footer a { color: var(--white); }

dialog { width: min(680px, calc(100vw - 2rem)); border: 0; padding: 0; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(3,25,39,.72); }
dialog form { padding: 1.5rem; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading h2 { color: var(--navy); }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin-top: .4rem; }
.search-row input { min-width: 0; border: 1px solid #aab9c2; padding: .8rem; }
.dialog-note { color: var(--muted); font-size: .9rem; }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 100; max-width: 360px; padding: .9rem 1rem; background: var(--navy); color: var(--white); box-shadow: 0 12px 36px rgba(0,0,0,.24); }
.toast.is-error { background: var(--danger); }
button:disabled, input:disabled, textarea:disabled { cursor: not-allowed; opacity: .62; }

@media (max-width: 1040px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .primary-nav { display: none; }
  .mobile-menu { display: inline-flex; align-items: center; justify-content: center; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); margin-left: 1rem; margin-right: 1rem; }
  .quick-actions a { border-bottom: 1px solid var(--line); }
  .workspace-view { grid-template-columns: 210px 1fr; }
  .workspace-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .prototype-banner { justify-content: space-between; }
  .header-inner { min-height: 68px; padding: .55rem 1rem; gap: .6rem; }
  .brand img { max-width: 190px; }
  .language-button, .portal-button { display: none; }
  .hero { min-height: 640px; align-items: flex-end; }
  .hero-image { object-position: 63% center; }
  .hero-overlay { background: linear-gradient(0deg, rgba(4,25,39,.94) 0%, rgba(4,25,39,.72) 58%, rgba(4,25,39,.18) 100%); }
  .hero-content { padding: 4rem 1.25rem 5rem; }
  .hero h1 { font-size: 2.7rem; }
  .hero p:not(.eyebrow) { font-size: 1.05rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .quick-actions { grid-template-columns: 1fr 1fr; margin-top: -1.2rem; }
  .quick-actions a { border-right: 1px solid var(--line); }
  .section-heading { align-items: start; flex-direction: column; gap: .75rem; }
  .service-grid, .news-grid, .school-grid { grid-template-columns: 1fr; }
  .featured-news { grid-template-columns: 1fr; }
  .news-art { min-height: 180px; }
  .school-masthead { align-items: start; flex-direction: column; gap: .8rem; padding: 1.2rem; }
  .school-nav { overflow-x: auto; justify-content: start; }
  .school-hero { min-height: 520px; padding: 2rem 1.2rem; }
  .school-hero h2 { font-size: 2.2rem; }
  .school-alert { grid-template-columns: 1fr; }
  .workspace-view { display: block; }
  .workspace-sidebar { display: flex; overflow-x: auto; padding: .6rem; }
  .sidebar-label { display: none; }
  .sidebar-item { width: auto; white-space: nowrap; }
  .workspace-main { padding: 1rem; }
  .workspace-toolbar { align-items: start; flex-direction: column; }
  .session-control { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .session-control span { text-align: left; }
  .status-strip { grid-template-columns: 1fr 1fr; }
  .status-strip > div { border-bottom: 1px solid var(--line); }
  .field-row, .metric-grid { grid-template-columns: 1fr; }
  .issue-row { grid-template-columns: 80px 1fr; }
  .issue-row button { grid-column: 2; justify-self: start; }
  .site-footer { flex-direction: column; padding: 2rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
