:root {
  --brand: #005151;
  --accent: #96d600;
  --teal: #00b5e2;
  --green: #00bb31;
  --brown: #914910;
  --warm: #b79a81;
  --ink: #14211f;
  --muted: #60706d;
  --line: #dfe8e5;
  --soft: #f4faf7;
  --paper: #ffffff;
  --danger: #c2410c;
  --warn: #b7791f;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: #f6f8f7;
}
[v-cloak] { display: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 81, 81, .18);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
}
.brand-text { min-width: 0; }
.brand-name { font-weight: 800; font-size: 18px; }
.brand-slogan { font-size: 12px; opacity: .82; margin-top: 2px; }
.nav-tabs { display: flex; align-items: center; gap: 8px; }
.nav-tabs button, .mode-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  color: inherit;
  background: rgba(255,255,255,.08);
}
.nav-tabs button { padding: 0 14px; }
.nav-tabs button.active { background: var(--accent); color: #123100; border-color: var(--accent); }
i[data-lucide], svg.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
  flex: 0 0 auto;
}
i[data-lucide] {
  display: inline-block;
  color: currentColor;
}

.shell { max-width: 1180px; margin: 0 auto; padding: 24px clamp(14px, 3vw, 28px) 48px; }
.teacher-shell {
  max-width: none;
  width: 100%;
  padding: 20px clamp(22px, 3vw, 48px) 52px;
}
.hero-band {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(180px, .54fr) minmax(390px, .95fr);
  gap: 22px;
  align-items: center;
  min-height: 260px;
  padding: clamp(22px, 4vw, 42px);
  background:
    radial-gradient(circle at 22% 26%, rgba(150,214,0,.18), transparent 26%),
    radial-gradient(circle at 78% 16%, rgba(0,181,226,.2), transparent 23%),
    linear-gradient(120deg, rgba(0,81,81,.98), rgba(0,81,81,.88)),
    url("https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(0,81,81,.22);
}
.eyebrow, .section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}
.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.13;
  letter-spacing: 0;
}
.policy-note {
  max-width: 280px;
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.65;
  font-weight: 800;
  color: rgba(255,255,255,.94);
}
.hero-ip {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
}
.ip-image {
  position: relative;
  z-index: 1;
  width: min(210px, 100%);
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 26px 30px rgba(0,30,30,.34));
  animation: floatIp 4.6s ease-in-out infinite;
}
.ip-shadow {
  position: absolute;
  bottom: 6px;
  width: 142px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,30,30,.32);
  filter: blur(4px);
  animation: shadowIp 4.6s ease-in-out infinite;
}
@keyframes floatIp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes shadowIp {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(.84); opacity: .34; }
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.1));
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 18px 42px rgba(0,30,30,.26);
  backdrop-filter: blur(10px);
}
.summary-strip div {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 124px;
  padding: 18px 14px;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,247,.91)),
    repeating-linear-gradient(135deg, rgba(0,81,81,.04) 0 1px, transparent 1px 12px);
  color: var(--brand);
  box-shadow: inset 0 1px 0 #fff, 0 12px 24px rgba(0,30,30,.14);
}
.summary-strip span, .metric-row span { display: block; font-size: 12px; color: var(--muted); }
.summary-strip span { font-size: 13px; font-weight: 800; }
.summary-strip strong {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.18;
  letter-spacing: 0;
}
.summary-strip small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.workspace { display: grid; gap: 18px; margin-top: 18px; }
.result-layout { grid-template-columns: 1fr; }
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 24px);
  box-shadow: 0 8px 22px rgba(0, 46, 46, .06);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
h2 { margin: 0; color: var(--brand); font-size: 22px; letter-spacing: 0; }
.mode-switch { display: flex; padding: 4px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); }
.mode-switch button { color: var(--brand); background: transparent; padding: 0 16px; border: 0; }
.mode-switch button.active { background: var(--brand); color: #fff; }

.form-grid, .subject-grid, .grade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
label span { display: block; margin-bottom: 7px; font-size: 13px; color: var(--muted); font-weight: 700; }
input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cddbd7;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(150,214,0,.22); }
.subject-input {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.subject-input small { color: #7b8b88; font-weight: 500; }
.input-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.action-row { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.primary-btn, .secondary-btn, .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
}
.primary-btn { background: var(--brand); color: #fff; }
.secondary-btn { background: #fff; color: var(--brand); border-color: var(--line); }
.ghost-btn { background: var(--soft); color: var(--brand); border-color: var(--line); }
.primary-btn:hover, .ghost-btn:hover { filter: brightness(.98); }

.outcome-panel { border-left: 6px solid var(--accent); }
.plain-text { color: var(--muted); line-height: 1.85; margin: 0 0 18px; }
.data-source-note {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 6px;
  color: #5f6f6b;
  background: #f8fbf8;
  border: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.65;
}
.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 800;
}
.risk-badge.safe { color: #0f5132; background: #dcfce7; }
.risk-badge.watch { color: #7c4a03; background: #fef3c7; }
.risk-badge.risk { color: #9a3412; background: #ffedd5; }
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.metric-row div {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
}
.metric-row strong { display: block; margin-top: 6px; color: var(--brand); font-size: 20px; }

.ladder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.school-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.school-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: #fff;
  background: var(--brand);
}
.school-card.sprint .school-card-head { background: var(--danger); }
.school-card.stable .school-card-head { background: var(--teal); }
.school-card.safe .school-card-head { background: var(--green); }
.school-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}
.school-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.school-link:hover { color: #00806f; }
.school-line span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.school-line b { color: var(--brand); white-space: nowrap; }
.ladder-note {
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  background: #fbfdfb;
  font-size: 12px;
  line-height: 1.6;
}
.advice-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.advice-item {
  display: flex;
  gap: 12px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.advice-item i { color: var(--brand); flex: 0 0 auto; }
.advice-item strong { color: var(--brand); }
.advice-item p { margin: 8px 0 0; color: var(--muted); line-height: 1.65; }
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0,81,81,.06), rgba(150,214,0,.14)),
    #fff;
}
.contact-card.vertical {
  grid-template-columns: 1fr;
  justify-items: stretch;
}
.contact-copy {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-copy > i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 22px rgba(0,81,81,.16);
}
.contact-copy strong {
  display: block;
  color: var(--brand);
  font-size: 18px;
  line-height: 1.45;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: var(--brand);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}
.phone-link:hover { color: #00806f; }
.contact-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}
.qr-box {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}
.qr-box img {
  display: block;
  width: 156px;
  height: 156px;
  object-fit: contain;
  image-rendering: pixelated;
  user-select: auto;
  -webkit-user-drag: none;
}
.qr-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.search-box input { border: 0; padding: 0; min-height: 42px; box-shadow: none; }
.district-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
}
.district-filter button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}
.district-filter button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0,81,81,.18);
}
.school-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.table-head, .table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.05fr .75fr .75fr .7fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  font-size: 12px;
}
.table-head { color: #fff; background: var(--brand); font-weight: 800; }
.table-row {
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.table-row:nth-child(odd) { background: var(--soft); }
.table-row.selected {
  background: #eefadc;
  box-shadow: inset 4px 0 0 var(--accent);
}
.schools-layout {
  grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
  align-items: start;
}
.school-profile {
  position: sticky;
  top: 92px;
}
.school-list-panel { min-width: 0; }
.profile-cover {
  position: relative;
  min-height: 150px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  color: var(--brand);
  background:
    linear-gradient(135deg, rgba(0,81,81,.08), rgba(150,214,0,.18)),
    #f7fbf7;
  border: 1px solid var(--line);
}
.profile-logo-box {
  display: grid;
  place-items: center;
  width: 126px;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0,81,81,.12);
  box-shadow: 0 12px 24px rgba(0,46,46,.1);
}
.profile-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
}
.profile-title { min-width: 0; }
.profile-title p { margin: 0 0 7px; color: #007467; font-weight: 800; }
.profile-title h2 { color: var(--brand); line-height: 1.25; }
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.profile-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}
.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}
.profile-facts div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.profile-facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.profile-facts span i, .profile-section h3 i, .source-line span i {
  width: 16px;
  height: 16px;
  color: var(--brand);
  stroke-width: 2.3;
}
.profile-facts strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}
.year-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.year-plan-grid article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.year-plan-grid article.current-year {
  border-color: #b9d56f;
  background: #f4f9e8;
}
.year-plan-grid span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.year-plan-grid span i {
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.year-plan-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--brand);
  font-size: 24px;
}
.year-plan-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.year-plan-grid small {
  display: block;
  margin-top: 7px;
  color: #71827e;
  font-size: 11px;
  line-height: 1.45;
}
.profile-section { margin-top: 18px; }
.profile-section h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 16px;
}
.feature-list {
  display: grid;
  gap: 10px;
}
.feature-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.feature-list strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
}
.feature-list strong::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(150,214,0,.16);
}
.feature-list p { margin: 6px 0 0; color: var(--muted); line-height: 1.65; }
.source-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.source-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.source-line a { color: var(--brand); font-weight: 800; text-decoration: none; }

.teachers-page {
  gap: 20px;
  margin-top: 0;
}
.teacher-hero-panel {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(420px, .64fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: 232px;
  background:
    radial-gradient(circle at 88% 18%, rgba(150,214,0,.28), transparent 24%),
    linear-gradient(135deg, rgba(0,81,81,.98), rgba(0,104,91,.9));
  color: #fff;
  border-color: rgba(0,81,81,.2);
  overflow: hidden;
}
.teacher-hero-copy h2 {
  max-width: 760px;
  color: #fff;
  font-size: clamp(34px, 3.4vw, 54px);
  line-height: 1.16;
}
.teacher-hero-copy > strong {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-size: 19px;
}
.teacher-hero-copy p {
  max-width: 860px;
  margin: 14px 0 0;
  color: rgba(255,255,255,.84);
  line-height: 1.8;
}
.teacher-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.teacher-keywords span {
  padding: 8px 11px;
  border-radius: 6px;
  color: #fff;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22);
  font-size: 12px;
  font-weight: 800;
}
.teacher-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.teacher-stats div {
  min-height: 112px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.24);
  backdrop-filter: blur(8px);
}
.teacher-stats span {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 800;
}
.teacher-stats strong {
  display: block;
  margin-top: 12px;
  color: #fff;
  font-size: 28px;
}
.teacher-filter-stack { display: grid; gap: 18px; }
.filter-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}
.filter-title i {
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.teacher-subject-tabs,
.teacher-need-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.teacher-subject-tabs button,
.teacher-need-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand);
  background: #f8fbf8;
  font-weight: 800;
}
.teacher-subject-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.teacher-subject-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--soft);
  color: #386762;
  font-size: 12px;
}
.teacher-subject-tabs button.active,
.teacher-need-tabs button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0,81,81,.16);
}
.teacher-subject-tabs button.active span {
  background: var(--accent);
  color: #163800;
}
.teacher-workbench {
  display: grid;
  grid-template-columns: minmax(330px, .78fr) minmax(620px, 1.55fr) minmax(320px, .76fr);
  gap: 18px;
  align-items: start;
}
.compact-head { margin-bottom: 12px; }
.compact-head h2 { font-size: 18px; }
.teacher-control-panel,
.teacher-match-panel {
  position: sticky;
  top: 92px;
}
.teacher-control-panel {
  display: grid;
  gap: 16px;
}
.teacher-directory {
  max-height: calc(100vh - 386px);
  min-height: 380px;
  overflow: auto;
  padding: 6px;
  border-radius: 8px;
  background: #f4f8f5;
  border: 1px solid var(--line);
}
.directory-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 10px;
  color: var(--brand);
  font-weight: 900;
}
.directory-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}
.teacher-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.teacher-row + .teacher-row { margin-top: 7px; }
.teacher-row:hover {
  transform: translateY(-1px);
  border-color: rgba(0,81,81,.18);
  box-shadow: 0 10px 18px rgba(19,44,40,.08);
}
.teacher-row.selected {
  border-color: rgba(0,81,81,.32);
  background: #eefadc;
  box-shadow: inset 4px 0 0 var(--accent), 0 10px 18px rgba(0,81,81,.08);
}
.teacher-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}
.teacher-avatar.large {
  width: 96px;
  height: 96px;
  font-size: 36px;
  background:
    radial-gradient(circle at 70% 22%, rgba(150,214,0,.85), transparent 28%),
    linear-gradient(135deg, var(--brand), #00806f);
  box-shadow: 0 18px 32px rgba(0,81,81,.2);
}
.teacher-row strong {
  display: block;
  color: var(--brand);
  font-size: 15px;
}
.teacher-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}
.teacher-detail-panel {
  min-height: calc(100vh - 236px);
  padding: 0;
  overflow: hidden;
}
.teacher-detail-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: clamp(28px, 3vw, 42px);
  background:
    linear-gradient(135deg, rgba(0,81,81,.08), rgba(150,214,0,.18)),
    #fff;
  border-bottom: 1px solid var(--line);
}
.teacher-detail-head h2 {
  color: var(--brand);
  font-size: 34px;
  line-height: 1.2;
}
.teacher-detail-head strong {
  display: block;
  margin-top: 6px;
  color: #007467;
}
.teacher-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px clamp(28px, 3vw, 42px) 0;
}
.teacher-tags span {
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}
.teacher-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px clamp(28px, 3vw, 42px) 0;
}
.teacher-meta-grid div {
  min-height: 70px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fbf8;
  border: 1px solid var(--line);
}
.teacher-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.teacher-meta-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--brand);
  font-size: 15px;
  line-height: 1.35;
}
.teacher-section {
  margin: 24px clamp(28px, 3vw, 42px) 0;
}
.teacher-section h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 16px;
}
.teacher-section h3 i {
  width: 17px;
  height: 17px;
  color: var(--brand);
}
.teacher-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}
.teacher-section .pre-line {
  white-space: pre-line;
}
.teacher-strengths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.teacher-strengths span {
  min-height: 58px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fbf8;
  border: 1px solid var(--line);
  color: var(--brand);
  font-weight: 800;
  line-height: 1.45;
}
.match-block {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.match-block:first-of-type { border-top: 0; }
.match-block i {
  width: 18px;
  height: 18px;
  color: var(--brand);
  margin-top: 2px;
}
.match-block strong {
  color: var(--brand);
}
.match-block p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}
.contact-note {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.contact-note i {
  width: 18px;
  height: 18px;
  color: var(--brand);
  margin-top: 2px;
}
.contact-note strong { color: var(--brand); }
.contact-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

@media (max-width: 1280px) {
  .teacher-shell { padding-inline: 22px; }
  .teacher-hero-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .teacher-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .teacher-workbench {
    grid-template-columns: minmax(292px, .78fr) minmax(0, 1.32fr) minmax(278px, .76fr);
  }
  .teacher-strengths {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .teacher-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar { align-items: stretch; flex-direction: column; }
  .nav-tabs { display: grid; grid-template-columns: repeat(4, 1fr); }
  .hero-band { grid-template-columns: 1fr; }
  .policy-note { max-width: none; font-size: 18px; }
  .hero-ip { min-height: 150px; }
  .summary-strip, .form-grid, .subject-grid, .grade-grid, .ladder, .advice-list, .metric-row, .contact-card {
    grid-template-columns: 1fr;
  }
  .contact-card { padding: 16px; }
  .contact-copy strong { font-size: 16px; }
  .phone-link { font-size: 28px; }
  .qr-box img {
    width: min(220px, 78vw);
    height: auto;
    aspect-ratio: 1;
  }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .search-box { width: 100%; min-width: 0; }
  .schools-layout { grid-template-columns: 1fr; }
  .school-profile { position: static; }
  .table-head, .table-row { grid-template-columns: 1fr; }
  .table-head span:not(:first-child) { display: none; }
  .table-row span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  .table-row span::before {
    content: attr(data-label);
    flex: 0 0 44%;
    color: var(--muted);
    font-weight: 700;
  }
  .table-row span:first-child {
    display: block;
    color: var(--brand);
    font-size: 15px;
    font-weight: 900;
  }
  .table-row span:first-child::before { display: none; }
  .profile-facts { grid-template-columns: 1fr; }
  .year-plan-grid { grid-template-columns: 1fr; }
  .teacher-hero-panel,
  .teacher-filter-panel,
  .teacher-workbench,
  .teacher-stats,
  .teacher-strengths {
    grid-template-columns: 1fr;
  }
  .teacher-control-panel,
  .teacher-directory,
  .teacher-match-panel {
    position: static;
  }
  .teacher-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .topbar, .hero-band, .action-row, .ghost-btn, .nav-tabs { display: none !important; }
  .shell { padding: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
}
