/* curriculum.schoolio.org — the curriculum site (layouts/curriculum_site.html.erb).
   Its classes are prefixed cs- (curriculum site).
   A working tool, but still paper-first: cream ground, ink type, the
   Learning face (Source Serif 4) for the curriculum's own words and the
   Educating face (Source Sans 3) for everything around them. */

.cs-body {
  /* The site's --hairline is solid ink: right for a page of prose, too loud
     around hundreds of standards. */
  --cs-rule: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-educating);
  font-size: var(--fs-16);
  line-height: var(--lh-normal);
}

/* --- Header ------------------------------------------------------------- */
.cs-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 2rem;
  padding: .85rem var(--gutter);
  border-bottom: var(--cs-rule);
  background: var(--paper-2);
}
.cs-header__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-22);
  color: var(--ink);
  text-decoration: none;
}
.cs-header__brand span {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-blue);
  margin-left: .35rem;
}
.cs-header__nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.cs-header__nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.cs-header__nav a:hover { color: var(--ink-blue); text-decoration: underline; }
.cs-header__who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: var(--fs-14);
}
.cs-header__who form { margin: 0; }
/* The second line: "States" and each visible state. */
.cs-header__states {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem 1rem;
  font-size: var(--fs-14);
}
.cs-header__states-label {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cs-header__states a { color: var(--ink); text-decoration: none; font-weight: 600; }
.cs-header__states a:hover { color: var(--ink-blue); text-decoration: underline; }
.cs-header__states a.is-current { color: var(--ink-blue); text-decoration: underline; text-underline-offset: .2em; }

/* --- Page --------------------------------------------------------------- */
.cs-main { padding: 1.5rem var(--gutter) 5rem; }
.cs-page { max-width: 60rem; }
.cs-page h1 {
  font-family: var(--font-display);
  font-size: var(--fs-36);
  line-height: var(--lh-tight);
  margin: 0 0 .75rem;
}
.cs-page__header { margin-bottom: 1.75rem; }
.cs-lead { font-size: var(--fs-18); max-width: 62ch; margin: 0 0 1rem; }
.cs-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-blue);
  margin: 0 0 .5rem;
}
.cs-section-title {
  font-family: var(--font-display);
  font-size: var(--fs-24);
  margin: 2.25rem 0 .9rem;
}
.cs-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: var(--fs-14);
  margin-bottom: 1.25rem;
}
.cs-crumbs span { opacity: .5; }
/* Breadcrumbs on the left, a page's way across (readiness ↔ grade page)
   on the right; the button drops below them on a narrow screen. */
.cs-crumbs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.25rem; }
.cs-crumbs-row .cs-crumbs { margin-bottom: 0; }
.cs-muted { color: color-mix(in srgb, var(--ink) 62%, var(--paper)); }
.cs-empty { font-style: italic; color: color-mix(in srgb, var(--ink) 62%, var(--paper)); }

/* --- Buttons ------------------------------------------------------------ */
.cs-button {
  display: inline-block;
  padding: .55rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink-blue);
  color: var(--paper);
  font: 600 var(--fs-14)/1.2 var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.cs-button:hover { background: color-mix(in srgb, var(--ink-blue) 85%, black); color: var(--paper); }
.cs-button:focus-visible, .cs-tab:focus-visible, .cs-link-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.cs-link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* --- Grade cards -------------------------------------------------------- */
.cs-grades {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: .9rem;
}
.cs-grade-card__link {
  display: block;
  height: 100%;
  padding: 1rem 1.1rem;
  background: var(--surface-card, var(--paper));
  border: var(--cs-rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
  color: var(--ink);
  text-decoration: none;
}
.cs-grade-card__link:hover { border-color: var(--ink-blue); }
.cs-grade-card__name { display: block; font-family: var(--font-display); font-size: var(--fs-20); margin-bottom: .4rem; }
.cs-grade-card__counts { font-size: var(--fs-14); color: color-mix(in srgb, var(--ink) 70%, var(--paper)); }

/* --- Panels and tables -------------------------------------------------- */
.cs-panel {
  padding: 0 1.25rem 1rem;
  border: var(--cs-rule);
  border-radius: var(--radius-md);
  background: var(--linen);
}
.cs-panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.cs-panel__head .cs-section-title { margin-block: 1rem; }
.cs-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: var(--fs-14); }
.cs-table th, .cs-table td { text-align: left; vertical-align: top; padding: .55rem .7rem; border-bottom: var(--cs-rule); }
.cs-table th { font-family: var(--font-mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .06em; }

.cs-button--small { padding: .4rem .9rem; font-size: var(--fs-12); }
/* The secondary pill: same shape, ink-blue outline, for moving between the
   readiness page and a grade page without competing with the main action. */
.cs-button--outline { background: transparent; color: var(--ink-blue); box-shadow: inset 0 0 0 2px var(--ink-blue); }
.cs-button--outline:hover { background: var(--ink-blue); color: var(--paper); }

/* --- Grade, subject and course choosers ---------------------------------- */
/* One panel; labels in their own column so they never wrap in among the
   buttons. Under 640px each label sits above its row. */
.cs-filters {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: .75rem 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: var(--linen);
  border: var(--cs-rule);
  border-radius: var(--radius-md);
}
.cs-filters__label {
  padding-top: .4rem;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cs-filters__label small {
  display: block;
  margin-top: .15rem;
  font-family: var(--font-educating);
  font-size: var(--fs-12);
  letter-spacing: 0;
  text-transform: none;
  color: color-mix(in srgb, var(--ink) 62%, var(--paper));
}
.cs-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; align-items: center; }
.cs-tab {
  display: inline-block;
  min-width: 2.4rem;
  padding: .35rem .7rem;
  border: var(--cs-rule);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: 600 var(--fs-14)/1.2 var(--font-educating);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.cs-tab:hover { border-color: var(--ink-blue); }
.cs-tab.is-current { background: var(--ink-blue); border-color: var(--ink-blue); color: var(--paper); }

/* --- The curriculum ----------------------------------------------------- */
.cs-domain { margin: 2rem 0 0; }
.cs-domain__title {
  font-family: var(--font-display);
  font-size: var(--fs-22);
  margin: 0 0 .25rem;
  padding-bottom: .3rem;
  border-bottom: var(--rule-heavy);
}
.cs-cluster {
  font-family: var(--font-educating);
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--chalkboard);
  margin: 1.25rem 0 .5rem;
}
.cs-standard {
  margin: 0 0 .9rem;
  padding: .7rem .9rem;
  background: #fffdf7;
  border: var(--cs-rule);
  border-radius: var(--radius-sm);
  scroll-margin-top: 1rem;
}
.cs-standard:target { outline: 3px solid var(--sage); }
.cs-standard__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .6rem; margin-bottom: .3rem; }
.cs-standard__text { font-family: var(--font-learning); margin: 0; max-width: none; }
.cs-code { font-family: var(--font-mono); font-size: var(--fs-14); font-weight: 600; color: var(--ink-blue); }
.cs-badge {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  padding: .05rem .4rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  color: var(--chalkboard);
}
.cs-badge--ca { color: color-mix(in srgb, var(--terracotta) 80%, black); }
.cs-courses { font-size: var(--fs-12); color: color-mix(in srgb, var(--ink) 62%, var(--paper)); }

/* Lettered parts (K.CC.4.a …) sit under their standard's own sentence. */
.cs-parts { list-style: none; margin: .45rem 0 0; padding: 0 0 0 1rem; font-family: var(--font-learning); }
.cs-part { margin: .3rem 0; }
.cs-part__letter { font-family: var(--font-mono); font-size: var(--fs-14); color: var(--ink-blue); }

/* A standard's labelled details (a science expectation's core idea,
   an arts standard's essential question), closed until asked for. */
.cs-details { margin: .35rem 0 0; font-size: var(--fs-14); }
.cs-details summary { cursor: pointer; font-family: var(--font-mono); font-size: var(--fs-12); color: var(--ink-blue); }
.cs-details dl { margin: .4rem 0 0; display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .3rem 1rem; }
.cs-details dt { font-weight: 700; }
.cs-details dd { margin: 0; font-family: var(--font-learning); }
@media (max-width: 640px) { .cs-details dl { grid-template-columns: 1fr; } }

.cs-table form { margin: 0; }
.cs-quote { margin: 0 0 1rem; padding: .6rem 1rem; border-left: 3px solid var(--ink-blue); font-family: var(--font-learning); background: var(--linen); }

.cs-footer {
  padding: 1.25rem var(--gutter) 2rem;
  border-top: var(--cs-rule);
  font-size: var(--fs-12);
  color: color-mix(in srgb, var(--ink) 62%, var(--paper));
  max-width: 70rem;
}

/* What is on screen: the subject, its count and its statewide test. */
.cs-subject { margin: 1.75rem 0 .5rem; }
.cs-subject__title { font-family: var(--font-display); font-size: var(--fs-30); margin: 0; }
.cs-subject__meta {
  max-width: none;
  margin: .25rem 0 0;
  font-size: var(--fs-14);
  color: color-mix(in srgb, var(--ink) 70%, var(--paper));
}
.cs-subject__tested { color: var(--chalkboard); font-weight: 700; }

@media (max-width: 640px) {
  .cs-filters { grid-template-columns: 1fr; gap: .3rem; }
  .cs-filters__label { padding-top: .5rem; }
  .cs-filters__label small { display: inline; margin-left: .3rem; }
  .cs-header__who { margin-left: 0; }
  .cs-page h1 { font-size: var(--fs-30); }
  .cs-main { padding-inline: 1rem; }
}

/* --- Readiness (curriculum_site/readiness/show, ReadinessMapHelper) --------- */
.cs-page--wide { max-width: 70rem; }
/* A readiness title: "To be ready for" in the warm accent, the year in the
   site's color-2 (ink-blue), then "only 18 of the 150 standards … are
   required." beneath, finishing the sentence. */
.rm-title-lead { color: var(--terracotta); }
.rm-title-year { color: var(--ink-blue); }
/* The headline and the paragraph under it share one right edge: the
   paragraph's own measure (62ch of its font), set on the wrapper, so the
   larger headline cannot run wider. */
.rm-intro { font-family: var(--font-educating); font-size: var(--fs-18); max-width: 62ch; }
.rm-intro .cs-lead { max-width: none; }
.rm-headline { font-family: var(--font-display); font-size: var(--fs-24); line-height: var(--lh-snug); margin: 0 0 1rem; max-width: none; color: color-mix(in srgb, var(--ink) 75%, var(--paper)); }
.rm-headline strong { color: var(--ink); }
.cs-definition { margin: .5rem 0 0; max-width: 70ch; font-size: var(--fs-14); }
.cs-definition summary { cursor: pointer; font-weight: 700; color: var(--ink-blue); }
.cs-definition p { margin: .5rem 0 0; }
.cs-filters--single { margin-bottom: .5rem; }

.rm-figure { margin: 1rem 0 0; }
.rm-figure figcaption { margin-top: .5rem; font-size: var(--fs-14); }
.rm-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0 0 .5rem; font-size: var(--fs-14); }
.rm-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.rm-scroll { overflow-x: auto; }
.rm-scroll-hint { display: none; margin: 0 0 .4rem; font-size: var(--fs-12); }
@media (max-width: 760px) { .rm-scroll-hint { display: block; } }
.rm { display: block; width: 100%; min-width: 760px; height: auto; }

.rm-target-col { fill: color-mix(in srgb, var(--sage) 55%, transparent); }
.rm-year { font: 600 12px var(--font-educating); fill: color-mix(in srgb, var(--ink) 70%, var(--paper)); }
.rm-year--target { fill: var(--ink); font-weight: 800; }
.rm-rule { stroke: color-mix(in srgb, var(--ink) 12%, transparent); stroke-width: 1; }
.rm-strand { font: 600 12px var(--font-educating); fill: color-mix(in srgb, var(--ink) 75%, var(--paper)); }

/* Links: foundations carry the story; fluencies run under everything, quieter. */
.rm-link { fill: none; stroke: var(--ink-blue); stroke-width: 1.5; stroke-opacity: .42; stroke-linecap: round; }
.rm-link--quiet { stroke-opacity: .16; }
.rm.is-focusing .rm-link { stroke-opacity: .05; }
.rm.is-focusing .rm-link.is-on { stroke-opacity: .9; stroke-width: 2; }

.rm-node { cursor: default; outline: none; }
.rm-hit { fill: transparent; }
.rm-node:focus-visible .rm-hit { stroke: var(--focus-ring); stroke-width: 2; }
/* A paper halo keeps a code legible where links pass behind it. */
.rm-code { font: 600 11px var(--font-mono); fill: var(--ink); stroke: var(--paper); stroke-width: 3px; paint-order: stroke; stroke-linejoin: round; }
/* A requirement's kind is its mark's shape: a filled dot, a ring, a square.
   Filled marks wear a 2px surface ring so they stay legible where links
   cross them. */
.rm-dot--fill, .rm-dot--square { fill: var(--ink-blue); stroke: var(--paper); stroke-width: 2; paint-order: stroke; }
.rm-dot--ring { fill: var(--paper); stroke: var(--ink-blue); stroke-width: 2; }
.rm.is-focusing .rm-node:not(.is-on) { opacity: .35; }

.rm-chip__box { fill: color-mix(in srgb, var(--ink-blue) 14%, var(--paper)); stroke: color-mix(in srgb, var(--ink-blue) 40%, transparent); stroke-width: 1; }
.rm-chip__text { font: 600 11px var(--font-mono); fill: var(--ink); }
.rm-chip { cursor: default; outline: none; }
.rm-chip:focus-visible .rm-chip__box { stroke: var(--focus-ring); stroke-width: 2; }
.rm.is-focusing .rm-chip:not(.is-on) { opacity: .35; }
.rm-chip.is-on .rm-chip__box { fill: color-mix(in srgb, var(--ink-blue) 30%, var(--paper)); stroke: var(--ink-blue); }

.rm-table td { vertical-align: top; }
.rm-from { white-space: nowrap; }
.rm-text { display: block; margin-top: .15rem; font-family: var(--font-learning); }

/* Overview grid: one hue, light to dark with the count; empty where a year
   cannot be a source (it is not earlier). */
.rm-overview { margin-top: 2.5rem; }
.rm-heat { border-collapse: separate; border-spacing: 2px; font-size: var(--fs-14); }
.rm-heat th { font-weight: 600; padding: .3rem .5rem; text-align: center; white-space: nowrap; }
.rm-heat thead th:first-child { text-align: left; font-family: var(--font-mono); font-size: var(--fs-12); font-weight: 400; }
.rm-heat tbody th { text-align: left; }
.rm-heat td { min-width: 2.6rem; height: 2rem; text-align: center; font-variant-numeric: tabular-nums; border-radius: 3px; }
.rm-heat__na { background: transparent; }
.rm-heat__total { font-weight: 700; white-space: nowrap; text-align: left; padding-left: .6rem; }
.rm-heat__of { font-weight: 400; color: color-mix(in srgb, var(--ink) 65%, var(--paper)); }
.rm-heat--0 { background: color-mix(in srgb, var(--ink) 4%, var(--paper)); }
.rm-heat--1 { background: color-mix(in srgb, var(--ink-blue) 12%, var(--paper)); }
.rm-heat--2 { background: color-mix(in srgb, var(--ink-blue) 28%, var(--paper)); }
.rm-heat--3 { background: color-mix(in srgb, var(--ink-blue) 46%, var(--paper)); }
.rm-heat--4 { background: color-mix(in srgb, var(--ink-blue) 68%, var(--paper)); color: var(--paper); }
.rm-heat--5 { background: color-mix(in srgb, var(--ink-blue) 90%, var(--paper)); color: var(--paper); }
.rm-heat tr.is-current th a { font-weight: 800; }
.rm-heat tr.is-current td.rm-heat__cell { box-shadow: inset 0 -3px 0 var(--chalkboard); }
.rm-credit { margin-top: 2rem; font-size: var(--fs-12); }
