/* CalCurriculum Math Adoption Dashboard — shared styles
   Layers on top of colors_and_type.css. No Tailwind or other CSS framework
   is used — confirmed no utility classes anywhere in the markup; the
   Tailwind CDN script that used to be loaded on district.html was dead
   weight and has been removed. */
@import url('./colors_and_type.css');

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--cc-cream);
  color: var(--fg);
}
button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}

/* ============ HEADER ============ */
.cc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cc-cream);
  border-bottom: 1px solid var(--border);
}
.cc-header-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.cc-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.cc-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.cc-brand-row img {
  height: 38px;
  width: auto;
  display: block;
}
/* The full California Curriculum Collaborative lockup. Wider aspect (~2.6:1),
   so we let it ride a touch taller than the bare mark to keep "CALIFORNIA
   CURRICULUM COLLABORATIVE" legible in the header. */
.cc-brand-row img.cc-brand-lockup {
  height: 46px;
}
/* (Renamed from ".cc-brand img" so it doesn't also catch .cc-powered-by-logo.) */
.cc-brand-wm {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.018em;
  line-height: 1;
  color: var(--cc-blue);
}
.cc-brand-wm em {
  font-style: normal;
  color: var(--cc-rust);
}
.cc-powered-by {
  /* Sits under the "California Math Adoption Dashboard" name, inside the
     product block — right-aligned to the title's right edge as an attribution. */
  margin-top: 5px;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
  line-height: 1;
  white-space: nowrap;
}
.cc-powered-by-logo {
  height: 22px;
  width: auto;
  display: inline-block;
  flex-shrink: 0;
}
.cc-header-product {
  margin-left: 4px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cc-header-product .eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cc-teal);
}
.cc-header-product .name {
  font-size: 28px;
  font-weight: 700;
  color: var(--cc-blue);
  line-height: 1.1;
  white-space: nowrap;
}
.cc-nav {
  display: flex;
  gap: 20px;
  flex: 1;
  margin-left: 12px;
}
.cc-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-blue);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition:
    color 140ms var(--ease-out),
    border-color 140ms var(--ease-out);
}
.cc-nav a:hover {
  color: var(--cc-rust);
}
.cc-nav a.active {
  border-bottom-color: var(--cc-yellow);
}

/* Nav dropdown ("More Resources") — hover + focus reveals a panel of links. */
.cc-nav-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}
.cc-nav-dropdown > .cc-nav-trigger {
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-blue);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  transition: color 140ms var(--ease-out);
}
.cc-nav-dropdown > .cc-nav-trigger:hover {
  color: var(--cc-rust);
}
.cc-nav-dropdown > .cc-nav-trigger .chev {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms var(--ease-out);
}
.cc-nav-dropdown:hover > .cc-nav-trigger .chev,
.cc-nav-dropdown:focus-within > .cc-nav-trigger .chev {
  transform: translateY(0) rotate(225deg);
}
.cc-nav-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -16px;
  min-width: 320px;
  background: var(--cc-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 160ms var(--ease-out),
    transform 200ms var(--ease-out),
    visibility 0s linear 200ms;
  z-index: 50;
}
/* Invisible bridge so cursor can travel from trigger to menu without dropout */
.cc-nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 18px;
}
.cc-nav-dropdown:hover .cc-nav-menu,
.cc-nav-dropdown:focus-within .cc-nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 160ms var(--ease-out),
    transform 200ms var(--ease-out),
    visibility 0s linear 0s;
}
.cc-nav-menu a {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--r-sm, 8px);
  border-bottom: none;
  text-decoration: none;
  color: var(--cc-blue);
  transition:
    background 140ms var(--ease-out),
    color 140ms var(--ease-out);
}
.cc-nav-menu a:hover {
  background: var(--cc-cream);
  color: var(--cc-rust);
}
.cc-nav-menu a .label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
.cc-nav-menu a .label .source {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-teal);
}
.cc-nav-menu a:hover .label .source {
  color: var(--cc-rust);
}
.cc-nav-menu a .ext {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.5;
  transition:
    opacity 140ms var(--ease-out),
    transform 140ms var(--ease-out);
}
.cc-nav-menu a:hover .ext {
  opacity: 1;
  transform: translate(1px, -1px);
}

.cc-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cc-pill-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cc-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--fg);
  min-width: 240px;
  cursor: text;
}
.cc-pill-input input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  flex: 1;
}
.cc-btn-contact {
  background: var(--cc-blue);
  color: var(--cc-cream);
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms var(--ease-out);
}
.cc-btn-contact:hover {
  background: var(--cc-blue-shade);
}

/* ============ BUTTONS / CHIPS ============ */
.cc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  color: var(--fg);
  transition: all 180ms var(--ease-out);
}
.cc-btn:hover {
  background: rgba(0, 58, 93, 0.06);
}
.cc-btn-primary {
  background: var(--cc-blue);
  color: var(--cc-cream);
}
.cc-btn-primary:hover {
  background: var(--cc-blue-shade);
  color: var(--cc-cream);
}
.cc-btn-outline {
  border-color: var(--border-strong);
  color: var(--fg);
}
.cc-btn-outline:hover {
  border-color: var(--cc-blue);
  background: transparent;
}
.cc-btn-ghost {
  padding: 6px 10px;
  font-size: 12px;
}

.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--cc-white);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  transition: all 140ms var(--ease-out);
}
.cc-chip:hover {
  border-color: var(--cc-blue);
}
.cc-chip.active {
  background: var(--cc-blue);
  color: var(--cc-cream);
  border-color: var(--cc-blue);
}
.cc-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}
.cc-chip.solid {
  background: var(--cc-blue);
  color: var(--cc-cream);
  border-color: var(--cc-blue);
}

/* ============ CARDS ============ */
.cc-card {
  background: var(--cc-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
}
.cc-card-tight {
  padding: 16px;
}
.cc-card-tone-cream {
  background: var(--cc-cream);
}
.cc-card-tone-blue {
  background: var(--cc-blue);
  color: var(--cc-cream);
  border-color: transparent;
}
.cc-card-tone-blue h3,
.cc-card-tone-blue .cc-eyebrow {
  color: var(--cc-cream);
}

.cc-eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-accent);
  display: block;
  margin-bottom: 8px;
}
.cc-section-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--cc-blue);
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.cc-section-title .meta {
  font-size: 12px;
  color: var(--fg-soft);
  font-weight: 500;
}

/* ========== INTRO BAND ========== */
.cc-intro-band {
  background: var(--cc-cream);
  border-bottom: 1px solid var(--border);
}
.cc-intro-band-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 18px 32px 22px;
  display: block;
}
.cc-intro-band-copy p {
  font-size: 17px;
  line-height: 1.5;
  color: var(--cc-blue);
  margin: 4px 0 0;
  text-wrap: pretty;
}
.cc-intro-band-copy p em {
  font-style: normal;
  font-weight: 600;
  color: var(--cc-rust);
}
.cc-intro-band-picker {
  background: var(--cc-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-intro-band-picker-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cc-band-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cc-band-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px 9px 18px;
  border-radius: 999px;
  background: var(--cc-white);
  border: 1.5px solid var(--border-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-blue);
  cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  transition: all 140ms var(--ease-out);
}
.cc-band-chip .check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cc-cream);
  flex-shrink: 0;
  transition: all 140ms var(--ease-out);
}
.cc-band-chip:hover {
  border-color: var(--cc-blue);
}
.cc-band-chip.active {
  background: var(--cc-blue);
  color: var(--cc-cream);
  border-color: var(--cc-blue);
}
.cc-band-chip.active .check {
  background: var(--cc-yellow);
  border-color: var(--cc-yellow);
  color: var(--cc-blue);
}
.cc-band-summary {
  font-size: 12px;
  color: var(--fg-soft);
}

@media (max-width: 980px) {
  .cc-intro-band-inner {
    gap: 18px;
  }
}

/* ============ STATE PAGE LAYOUT ============ */
.cc-page-title-bar {
  background: var(--cc-cream);
  padding: 22px 32px 16px;
  max-width: 1640px;
  margin: 0 auto;
}
.cc-page-title-bar .crumb {
  font-size: 14px;
  color: var(--fg-soft);
  margin-bottom: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.cc-page-title-bar h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--cc-blue);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.cc-page-title-bar h1 .sub {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg-soft);
  letter-spacing: 0;
}

.cc-app-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 360px;
  gap: 18px;
  padding: 0 32px 32px;
  max-width: 1640px;
  margin: 0 auto;
  align-items: start;
}

/* ============ LEFT FILTER RAIL ============ */
.cc-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 4px;
}
.cc-rail::-webkit-scrollbar {
  width: 6px;
}
.cc-rail::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Filter boxes carry the same navy fill as the other themed sections; headers
   are yellow to match the section-header treatment elsewhere, and every
   control inside adopts the grade-band chip color model (cream outline when
   deselected, yellow fill + navy text when selected). */
.cc-filter-group {
  padding: 14px 14px 16px;
  background: var(--cc-blue);
  border-color: transparent;
  color: var(--cc-cream);
}
.cc-filter-group h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cc-yellow);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cc-filter-group h3 .cc-btn-ghost {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--cc-cream);
}
.cc-filter-group h3 .cc-btn-ghost:hover {
  color: var(--cc-yellow);
}
/* Spotlight filter — a touch more emphasis (yellow left rule) since this cut
   moved out of the map toolbar into the rail and is the most strategic filter. */
.cc-filter-group--spotlight {
  border-left: 3px solid var(--cc-yellow);
}

/* Filter chips (CA 2025 list, enrollment, EL%) — mirror .cc-map-headbar chips. */
.cc-filter-group .cc-chip {
  background: transparent;
  border-color: rgba(255, 249, 240, 0.35);
  color: var(--cc-cream);
}
.cc-filter-group .cc-chip:hover {
  border-color: var(--cc-cream);
}
.cc-filter-group .cc-chip.active {
  background: var(--cc-yellow);
  border-color: var(--cc-yellow);
  color: var(--cc-blue);
}

/* Sub-group labels (Total enrollment / English Learner %). */
.cc-filter-group .cc-subfilter-label {
  color: rgba(255, 249, 240, 0.72);
}

/* "Top Adopted Material" select — translucent field with a cream caret; the
   native option panel stays light for legibility. */
.cc-filter-group .cc-filter-select {
  background-color: rgba(255, 249, 240, 0.1);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFF9F0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  border-color: rgba(255, 249, 240, 0.35);
  color: var(--cc-cream);
}
.cc-filter-group .cc-filter-select:hover {
  border-color: rgba(255, 249, 240, 0.65);
}
.cc-filter-group .cc-filter-select:focus {
  border-color: var(--cc-yellow);
  box-shadow: 0 0 0 3px rgba(255, 181, 41, 0.25);
}
.cc-filter-group .cc-filter-select option {
  color: var(--cc-blue);
  background: var(--cc-white);
}

/* County search field. */
.cc-filter-group .cc-pill-input {
  background: rgba(255, 249, 240, 0.1);
  border-color: rgba(255, 249, 240, 0.35);
  color: var(--cc-cream);
}
.cc-filter-group .cc-pill-input input {
  color: var(--cc-cream);
}
.cc-filter-group .cc-pill-input input::placeholder {
  color: rgba(255, 249, 240, 0.6);
}

/* County rows: cream text, translucent count, grade-band-style checkbox. */
.cc-filter-group .cc-filter-row {
  color: var(--cc-cream);
}
.cc-filter-group .cc-filter-row > span:last-child {
  color: rgba(255, 249, 240, 0.6) !important;
}
.cc-filter-group .cc-checkbox {
  background: transparent;
  border-color: rgba(255, 249, 240, 0.5);
  color: var(--cc-blue);
}
.cc-filter-group .cc-checkbox.checked {
  background: var(--cc-yellow);
  border-color: var(--cc-yellow);
  color: var(--cc-blue);
}
.cc-filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* Compact single-select used by the "Top Adopted Material" filter — one
   control instead of a long chip row. Custom caret via inline SVG. */
.cc-filter-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--cc-white);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23003A5D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 32px 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cc-blue);
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition:
    border-color 140ms var(--ease-out),
    box-shadow 140ms var(--ease-out);
}
.cc-filter-select:hover {
  border-color: var(--border-strong);
}
.cc-filter-select:focus {
  outline: none;
  border-color: var(--cc-blue);
  box-shadow: 0 0 0 3px rgba(0, 58, 93, 0.12);
}
/* Sub-grouped filter rows (e.g. the two ramps inside "Student Population"). */
.cc-subfilter-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin: 0 0 7px;
}
.cc-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.cc-filter-row label {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}
.cc-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cc-white);
  flex-shrink: 0;
}
.cc-checkbox.checked {
  background: var(--cc-blue);
  border-color: var(--cc-blue);
  color: var(--cc-cream);
}
.cc-range-wrap {
  padding: 8px 0 4px;
}
.cc-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--fg-soft);
  margin-top: 4px;
}
.cc-range-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.cc-range-row + .cc-range-row {
  margin-top: 8px;
}
.cc-range-val {
  font-size: 11px;
  color: var(--cc-blue);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}
.cc-range-cap {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-blue);
  opacity: 0.55;
}
.cc-range {
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
.cc-range::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cc-blue);
  border: 2px solid var(--cc-white);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

/* ============ MAP WORKSPACE ============ */
.cc-map-card {
  background: var(--cc-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
/* Combined map-card header: grade-band picker (left) + "In current view"
   summary (right) on one navy row, so neither steals vertical space from the
   map. */
.cc-map-headbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  flex-wrap: wrap;
  padding: 11px 18px;
  background: var(--cc-blue);
  color: var(--cc-cream);
}
.cc-map-headbar .band-group,
.cc-map-headbar .viewstat-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cc-map-headbar .cc-eyebrow {
  margin: 0;
  color: var(--cc-yellow);
  white-space: nowrap;
}
/* Selection is self-evident from the active chip; hide the summary text to
   keep the header on a single row (element kept in DOM for the band JS). */
.cc-map-headbar .cc-band-summary {
  display: none;
}
/* Band chips on the navy header: cream outline by default, yellow fill active.
   Compact (no check-circle) so the whole header fits one row. */
.cc-map-headbar .cc-band-chip {
  background: transparent;
  border-color: rgba(255, 249, 240, 0.35);
  color: var(--cc-cream);
  padding: 6px 14px;
  font-size: 12.5px;
  gap: 0;
}
.cc-map-headbar .cc-band-chip .check {
  display: none;
}
.cc-map-headbar .cc-band-chip:hover {
  border-color: var(--cc-cream);
}
.cc-map-headbar .cc-band-chip.active {
  background: var(--cc-yellow);
  border-color: var(--cc-yellow);
  color: var(--cc-blue);
}
.cc-map-headbar .figures {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cc-map-headbar .stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.cc-map-headbar .big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cc-yellow);
  font-variant-numeric: tabular-nums;
}
.cc-map-headbar .big.secondary {
  color: var(--cc-yellow);
}
.cc-map-headbar .unit {
  font-size: 11.5px;
  color: rgba(255, 249, 240, 0.8);
  font-weight: 500;
  white-space: nowrap;
}
.cc-map-headbar .vsep {
  width: 1px;
  align-self: stretch;
  min-height: 24px;
  background: rgba(255, 249, 240, 0.22);
}
@media (max-width: 720px) {
  .cc-map-headbar {
    gap: 10px;
  }
  .cc-map-headbar .viewstat-group {
    width: 100%;
  }
}
.cc-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--cc-cream);
  gap: 12px;
  flex-wrap: wrap;
}
.cc-map-toolbar .group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cc-map-toolbar .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-soft);
}
.cc-segmented {
  display: inline-flex;
  background: var(--cc-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.cc-segmented button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: all 140ms var(--ease-out);
}
.cc-segmented button.active {
  background: var(--cc-blue);
  color: var(--cc-cream);
}

/* Scope toggle adopts the app-wide "yellow = selected" language and a navy
   pill track (matching the grade-band chips on the navy headbar), so it reads
   as a first-class control rather than a white form input on the cream strip. */
#map-layer-switch {
  background: var(--cc-blue);
  border-color: transparent;
}
#map-layer-switch button {
  color: rgba(255, 249, 240, 0.72);
  white-space: nowrap;
}
#map-layer-switch button:hover {
  color: var(--cc-cream);
  background: rgba(255, 249, 240, 0.1);
}
#map-layer-switch button.active {
  background: var(--cc-yellow);
  color: var(--cc-blue);
}
#map-layer-switch button.active:hover {
  background: var(--cc-yellow);
}

/* Map toolbar toggle (used for "Focus districts only" in statewide mode). */
.cc-map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 10px;
  background: var(--cc-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--cc-blue);
  transition:
    background 140ms var(--ease-out),
    border-color 140ms var(--ease-out),
    color 140ms var(--ease-out);
}
.cc-map-toggle:hover {
  border-color: var(--cc-blue);
}
.cc-map-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cc-map-toggle .dot {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 16px;
  background: var(--cc-stone);
  border-radius: 999px;
  transition: background 160ms var(--ease-out);
}
.cc-map-toggle .dot::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--cc-white);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
  transition: transform 180ms var(--ease-out);
}
.cc-map-toggle input:checked + .dot {
  background: var(--cc-blue);
}
.cc-map-toggle input:checked + .dot::after {
  transform: translateX(12px);
}
.cc-map-toggle input:focus-visible + .dot {
  outline: 2px solid var(--cc-teal);
  outline-offset: 2px;
}
.cc-map-toggle:has(input:checked) {
  background: var(--cc-yellow-tint, #fff1d2);
  border-color: var(--cc-yellow);
  color: var(--cc-blue);
}

.cc-map-area {
  position: relative;
  width: 100%;
  background:
    radial-gradient(circle at 20% 10%, rgba(144, 198, 205, 0.1), transparent 40%), var(--cc-cream);
}
#state-map {
  width: 100%;
  height: 680px;
}
#district-map {
  width: 100%;
  height: 360px;
}

.cc-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--cc-cream);
  font-size: 12px;
  color: var(--fg-soft);
  gap: 12px;
  flex-wrap: wrap;
}
.cc-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-soft);
}
.cc-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 58, 93, 0.18);
}
/* District profile page: larger legend for readability. */
#district-map-legend.cc-legend {
  gap: 18px;
}
#district-map-legend .cc-legend-item {
  font-size: 14px;
}
#district-map-legend .cc-legend-swatch {
  width: 16px;
  height: 16px;
}
.cc-legend-gradient {
  height: 10px;
  width: 160px;
  border-radius: 5px;
  background: linear-gradient(90deg, #e8eff3, var(--cc-blue));
}

/* Highcharts tooltip override to match brand */
.highcharts-tooltip > span {
  background: var(--cc-blue) !important;
  color: var(--cc-cream) !important;
  border-radius: var(--r-sm) !important;
  padding: 10px 12px !important;
  box-shadow: var(--shadow-md);
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  border: none !important;
}
.highcharts-tooltip-box {
  fill: var(--cc-blue) !important;
  stroke: none !important;
}
.highcharts-credits {
  display: none !important;
}
.highcharts-container {
  font-family: var(--font-sans) !important;
}

/* ============ STATS — BARS / DONUT ============ */
.cc-stat-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--cc-rust);
  letter-spacing: -0.02em;
}
.cc-stat-label {
  font-size: 12px;
  color: var(--fg-soft);
  margin-top: 4px;
}

.cc-bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  align-items: center;
}
.cc-bar-row .name {
  color: var(--fg);
  font-weight: 500;
}
.cc-bar-row .num {
  color: var(--fg-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cc-bar-track {
  grid-column: 1 / -1;
  height: 6px;
  background: rgba(0, 58, 93, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.cc-bar-fill {
  height: 100%;
  background: var(--cc-teal);
  border-radius: 3px;
  transition: width 320ms var(--ease-out);
}

.cc-stack-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--cc-cream-deep);
  margin: 10px 0 6px;
}
.cc-stack-bar > div {
  height: 100%;
  transition: width 240ms var(--ease-out);
}

.cc-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cc-cream-deep);
  color: var(--cc-blue);
  font-size: 12px;
  font-weight: 500;
}
.cc-tag .num {
  color: var(--fg-soft);
  font-weight: 600;
  font-size: 11px;
}
.cc-tag.solid-rust {
  background: var(--cc-rust-tint);
  color: var(--cc-cream);
}
.cc-tag.solid-teal {
  background: var(--cc-teal);
  color: var(--cc-cream);
}
.cc-tag.solid-yellow {
  background: var(--cc-yellow);
  color: var(--cc-blue);
}
.cc-tag.solid-purple {
  background: var(--cc-purple);
  color: var(--cc-cream);
}

/* Non-negotiables checklist — % of districts that listed this as required */
.cc-nn-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-nn-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--cc-blue);
}
.cc-nn-row .check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--cc-teal);
  color: var(--cc-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.cc-nn-row .label {
  line-height: 1.35;
}
.cc-nn-row .bar {
  position: relative;
  height: 6px;
  width: 64px;
  background: var(--cc-cream-deep);
  border-radius: 999px;
  overflow: hidden;
}
.cc-nn-row .bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--cc-teal);
  border-radius: inherit;
  transition: width 240ms var(--ease-out);
}
.cc-nn-row .share {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--fg-soft);
  min-width: 32px;
  text-align: right;
}
.cc-nn-end {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

/* Materials piloted together — paired list */
.cc-pair-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}
.cc-pair-row:last-child {
  border-bottom: none;
}
.cc-pair-row .label {
  flex: 1;
  color: var(--fg);
}
.cc-pair-row .num {
  color: var(--fg-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Donut */
.cc-donut-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cc-donut-svg {
  flex-shrink: 0;
}
.cc-donut-legend {
  font-size: 12px;
  display: grid;
  gap: 4px;
  flex: 1;
}
.cc-donut-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cc-donut-legend .sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.cc-donut-legend .pct {
  margin-left: auto;
  color: var(--fg-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============ DISTRICT PROFILE ============ */
.cc-profile-hero {
  background: var(--cc-cream);
  padding: 26px 32px 14px;
  max-width: 1640px;
  margin: 0 auto;
}
.cc-profile-hero .crumb {
  font-size: 14px;
  color: var(--fg-soft);
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.cc-profile-hero .crumb a {
  color: var(--fg-link);
  text-decoration: none;
}
.cc-profile-hero .crumb a:hover {
  color: var(--cc-purple);
  text-decoration: underline;
}
.cc-profile-hero h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 0 0 8px;
  color: var(--cc-blue);
  line-height: 1.05;
  text-wrap: balance;
}
.cc-profile-hero .meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 0;
}
/* District facts — a labeled stat strip, not filter-style lozenges. */
.hero-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 14px;
}
.hero-facts .fact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 18px;
  border-left: 1px solid var(--border);
}
.hero-facts .fact:first-child {
  padding-left: 0;
  border-left: none;
}
/* Label/value typography is shared by the status block and the fact strip,
   so scope it to the hero rather than just .hero-facts. */
.cc-profile-hero .fact-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-teal);
  white-space: nowrap;
}
.cc-profile-hero .fact-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--cc-blue);
  line-height: 1.2;
}
/* Website fact renders as a link in the brand teal, underlined on hover. */
.cc-profile-hero .fact-link {
  color: var(--cc-teal);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.cc-profile-hero .fact-link:hover {
  border-bottom-color: currentColor;
}
.cc-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 24px;
  padding: 0 32px 48px;
  max-width: 1640px;
  margin: 0 auto;
  align-items: start;
}

.cc-section-block {
  padding: 24px;
}
.cc-section-block h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--cc-blue);
}

/* Demographic blocks */
.cc-demo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.cc-demo-grid .cell {
  background: var(--cc-cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  min-width: 0;
}
.cc-demo-grid .cell .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--cc-rust);
  letter-spacing: -0.01em;
}
.cc-demo-grid .cell .lbl {
  font-size: 11px;
  color: var(--fg-soft);
  margin-top: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cc-demo-grid .cell.blue .num {
  color: var(--cc-blue);
}
.cc-demo-grid .cell.teal .num {
  color: var(--cc-teal);
}
.cc-demo-grid .cell.purple .num {
  color: var(--cc-purple);
}

/* Curriculum lockup */
.cc-curric {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--cc-cream);
  border: 1px solid var(--border);
}
.cc-curric .glyph {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--cc-blue);
  color: var(--cc-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-display);
}
.cc-curric .name {
  font-weight: 600;
  color: var(--cc-blue);
  font-size: 15px;
}
/* "2025 CA List" badge on a curriculum card. */
.cc-2025-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  vertical-align: middle;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1e7a4d;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}
.cc-curric .pub {
  font-size: 12px;
  color: var(--fg-soft);
}
.cc-curric .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--fg-soft);
}
.cc-curric .meta-row strong {
  color: var(--fg);
  font-weight: 600;
}
.cc-curric.featured {
  border: 1.5px solid var(--cc-teal);
  background: var(--cc-white);
}

/* Half-circle frame for hero photo */
.cc-half-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--cc-cyan);
}

/* Tweaks panel host (when starter component loads) */
.cc-floating-help {
  position: fixed;
  bottom: 18px;
  left: 18px;
  background: var(--cc-blue);
  color: var(--cc-cream);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 30;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-floating-help .dot {
  width: 8px;
  height: 8px;
  background: var(--cc-yellow);
  border-radius: 50%;
}

/* ============ ATLAS VARIATION (state map full-bleed) ============ */
.cc-atlas-shell {
  position: relative;
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 32px 32px;
}
.cc-atlas-map {
  position: relative;
  background: var(--cc-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.cc-atlas-map #state-map {
  height: calc(100vh - 200px);
  min-height: 560px;
}
.cc-atlas-floating {
  position: absolute;
  top: 16px;
  background: var(--cc-cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  width: 300px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  z-index: 5;
}
.cc-atlas-floating.left {
  left: 16px;
}
.cc-atlas-floating.right {
  right: 16px;
  width: 340px;
}
.cc-atlas-floating .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--cc-cream-deep);
  position: sticky;
  top: 0;
  z-index: 1;
}
.cc-atlas-floating .head h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cc-blue);
  margin: 0;
}
.cc-atlas-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cc-atlas-floating::-webkit-scrollbar {
  width: 6px;
}
.cc-atlas-floating::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ============ DISTRICT — WORKSPACE VARIATION ============ */
.cc-workspace-grid {
  display: grid;
  grid-template-columns: 480px minmax(0, 1fr);
  gap: 24px;
  padding: 0 32px 48px;
  max-width: 1640px;
  margin: 0 auto;
  align-items: start;
}
.cc-workspace-map-col {
  position: sticky;
  top: 78px;
}
.cc-tabbar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--cc-cream-deep);
  border-radius: 999px;
  margin-bottom: 18px;
  width: fit-content;
}
.cc-tabbar button {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: all 140ms var(--ease-out);
}
.cc-tabbar button.active {
  background: var(--cc-white);
  color: var(--cc-blue);
  box-shadow: var(--shadow-xs);
}

/* ============ UTILS ============ */
.cc-divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 14px 0;
}
.cc-hr-strong {
  height: 1px;
  background: var(--border-strong);
  border: none;
}
.scroll-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scroll-thin::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Loading state for map */
.cc-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cc-cream);
  color: var(--fg-soft);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 1;
}

@media (max-width: 1280px) {
  .cc-app-grid {
    grid-template-columns: 260px minmax(0, 1fr) 320px;
  }
  .cc-profile-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}
@media (max-width: 1024px) {
  .cc-app-grid,
  .cc-profile-grid,
  .cc-workspace-grid {
    grid-template-columns: 1fr;
  }
  .cc-rail {
    position: static;
    max-height: none;
  }
  .cc-workspace-map-col {
    position: static;
  }
}
