/* =========================================================================
   CollegeBound Roadmap — interactive one-pager
   Sits on top of colors_and_type.css
   ========================================================================= */

html, body { background: var(--cb-warm-cream); }
body { color: var(--cb-near-black); }
* { box-sizing: border-box; }

/* ---- Page chrome (screen only) ----------------------------------------- */
.app {
  min-height: 100vh;
  padding: 32px 32px 64px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.sheet {
  width: 100%;
  max-width: 1360px;
  min-width: 1080px;
  flex-shrink: 0;
  background: var(--cb-warm-white);
  border: 0.5px solid var(--cb-warm-light);
  border-radius: 2px;
  padding: 40px 44px 36px;
  position: relative;
  background-image:
    linear-gradient(to right,  rgba(107,101,96,0.06) 0.5px, transparent 0.5px),
    linear-gradient(to bottom, rgba(107,101,96,0.06) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
}

/* ---- Header ------------------------------------------------------------ */
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  flex-wrap: nowrap;
  padding-bottom: 20px;
  border-bottom: 0.5px solid var(--cb-warm-light);
  margin-bottom: 28px;
}
.sheet-title-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 auto; }
.sheet-eyebrow {
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  row-gap: 4px;
}
.sheet-eyebrow > * { white-space: nowrap; }
.sheet-eyebrow .logo-mono {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--cb-near-black);
  font-weight: 500;
}
.sheet-eyebrow .logo-mono .mono-mark {
  width: 18px; height: 18px;
  border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  background-image: url("assets/logo-mark.png");
  background-size: cover;
  background-position: center;
  /* hide the inner text fallback */
  font-size: 0;
}
.sheet-eyebrow .sep { color: var(--cb-warm-light); }

.sheet-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 500;
}
.sheet-title .editable { border-bottom: 0.5px dashed transparent; transition: border-color 200ms var(--ease-out); cursor: text; }
.sheet-title .editable:hover { border-bottom-color: var(--cb-warm-mid-gray); }
.sheet-title .editable:focus { outline: none; border-bottom-color: var(--cb-near-black); }

.sheet-subtitle {
  font-size: 13px;
  color: var(--cb-warm-mid-gray);
  font-weight: 300;
  line-height: 1.5;
  max-width: 56ch;
}
.sheet-subtitle em { font-style: normal; color: var(--cb-near-black); }

.header-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cb-warm-mid-gray);
  flex: 0 0 auto;
}
.header-meta .meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}
.header-meta .label { font-weight: 500; }
.header-meta .value {
  font-family: var(--font-body);
  color: var(--cb-near-black);
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 400;
  font-size: 13px;
}
.header-meta .editable { border-bottom: 0.5px dashed transparent; cursor: text; padding-bottom: 1px; }
.header-meta .editable:hover { border-bottom-color: var(--cb-warm-mid-gray); }
.header-meta .editable:focus { outline: none; border-bottom-color: var(--cb-near-black); }

/* ---- Toolbar (interactive only) --------------------------------------- */
.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 12px;
  flex-wrap: wrap;
}
.toolbar-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; row-gap: 8px; }
.toolbar-label {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray); font-weight: 500;
  margin-right: 6px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray);
  background: transparent;
  border: 0.5px solid var(--cb-warm-light);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: all 200ms var(--ease-out);
}
.chip:hover { color: var(--cb-near-black); border-color: var(--cb-warm-mid-gray); }
.chip.active {
  color: var(--cb-warm-white); background: var(--cb-near-black); border-color: var(--cb-near-black);
}
.chip .dot { width: 4px; height: 4px; border-radius: 999px; background: currentColor; opacity: 0.7; }

.toolbar-print {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cb-near-black);
  background: transparent;
  border: 0.5px solid var(--cb-near-black);
  border-radius: 2px;
  cursor: pointer;
  transition: all 120ms ease;
  text-decoration: none;
}
.toolbar-print:hover { background: var(--cb-near-black); color: var(--cb-warm-white); }

.progress-meter {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray); font-weight: 500;
}
.progress-meter .bar {
  width: 140px; height: 3px;
  background: var(--cb-warm-light);
  position: relative; overflow: hidden;
}
.progress-meter .bar-fill {
  position: absolute; inset: 0 auto 0 0;
  background: var(--cb-near-black);
  transition: width 360ms var(--ease-out);
}
.progress-meter .count { color: var(--cb-near-black); font-family: var(--font-body); letter-spacing: 0.04em; text-transform: none; font-size: 12px; font-weight: 400; }

/* ---- Grid -------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 148px repeat(4, 1fr);
  grid-auto-rows: min-content;
  column-gap: 0;
  row-gap: 0;
  position: relative;
}

/* Top year headers */
.year-header {
  padding: 8px 14px 14px;
  border-left: 0.5px solid var(--cb-warm-light);
  border-bottom: 0.5px solid var(--cb-warm-light);
  position: relative;
}
.year-header:first-of-type { /* the lane-label column's header slot */
  border-left: none;
}
.year-header .year-num {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 500; line-height: 1;
  letter-spacing: -0.02em;
}
.year-header .year-num sup {
  font-size: 0.45em; font-weight: 500; margin-left: 2px;
  letter-spacing: 0;
  top: -0.75em;
}
.year-header .year-label {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray); font-weight: 500;
  margin-top: 4px; display: block;
}
.year-header.current .year-num { }
.year-header.current .year-label { color: var(--cb-near-black); }

.col-header-empty { border-bottom: 0.5px solid var(--cb-warm-light); }

/* Lane labels (left column) */
.lane-label {
  padding: 18px 16px 18px 0;
  border-bottom: 0.5px solid var(--cb-warm-light);
  border-right: 0.5px solid var(--cb-warm-light);
  display: flex; flex-direction: column; gap: 6px;
  align-items: flex-start;
  justify-content: flex-start;
}
.lane-label.continuation {
  padding: 0;
  gap: 0;
}
.lane-label .lane-eyebrow {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray); font-weight: 500;
}
.lane-label .lane-name {
  font-family: var(--font-display);
  font-size: 18px; line-height: 1.15;
  letter-spacing: -0.005em;
  font-weight: 500;
}
.lane-label .lane-sub {
  font-size: 11.5px;
  color: var(--cb-warm-mid-gray);
  line-height: 1.45;
  max-width: 16ch;
  font-weight: 300;
}

/* Cells */
.cell {
  padding: 16px 14px;
  border-bottom: 0.5px solid var(--cb-warm-light);
  border-left: 0.5px solid var(--cb-warm-light);
  position: relative;
  min-height: 120px;
  display: flex; flex-direction: column; gap: 10px;
}
.cell.current-year { background: rgba(13,13,13,0.02); }

/* Backgrounds for lane blocks */
.lane-academic .cell {}
.lane-nonacademic .cell {}

/* Band label (rows wrapper: a labeled band of 1+ rows) */
.band {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  border-top: 0.5px solid var(--cb-warm-light);
}
.band:first-of-type { border-top: none; }
.band-academic { background: transparent; }
.band-nonacademic { background: transparent; }

/* ---- Milestone items --------------------------------------------------- */
.milestone {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  background: var(--cb-warm-white);
  border: 0.5px solid var(--cb-warm-light);
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  color: var(--cb-near-black);
  transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
  position: relative;
  width: 100%;
}
.milestone:hover { background: var(--cb-warm-cream); border-color: var(--cb-warm-mid-gray); }
.milestone.done { opacity: 0.62; }
.milestone.done .milestone-label { text-decoration: line-through; text-decoration-thickness: 0.5px; text-decoration-color: var(--cb-warm-mid-gray); }

.milestone.span-2,
.milestone.span-3,
.milestone.span-4 {
  /* the span is applied at the cell level, see .cell.span-X */
}

.milestone-check {
  flex: 0 0 auto;
  width: 14px; height: 14px;
  border: 0.5px solid var(--cb-warm-mid-gray);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px;
  transition: background 120ms ease, border-color 120ms ease;
}
.milestone.done .milestone-check { background: var(--cb-near-black); border-color: var(--cb-near-black); color: var(--cb-warm-white); }
.milestone-check svg { width: 9px; height: 9px; display: block; opacity: 0; transition: opacity 120ms ease; }
.milestone.done .milestone-check svg { opacity: 1; }

.milestone-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.milestone-icon { color: var(--cb-warm-mid-gray); flex: 0 0 auto; margin-top: 1px; }
.milestone-label {
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--cb-near-black);
  letter-spacing: 0.005em;
}
.milestone-meta {
  font-size: 10.5px;
  color: var(--cb-warm-mid-gray);
  letter-spacing: 0.04em;
  line-height: 1.4;
  font-weight: 300;
}

/* The 'Big Achievement' = terracotta moment of the page */
.milestone.accent {
  border-color: var(--cb-terracotta);
}
.milestone.accent .milestone-label {
  color: var(--cb-terracotta);
  font-weight: 500;
}
.milestone.accent .milestone-icon { color: var(--cb-terracotta); }
.milestone.accent:hover {
  background: #FBF0EC;
}

/* Spanning cells: a cell that spans multiple year columns */
.cell.span-2 { grid-column: span 2; }
.cell.span-3 { grid-column: span 3; }
.cell.span-4 { grid-column: span 4; }

/* A cell that is a continuation of a spanning cell: hide borders */
.cell.ghost { visibility: hidden; border: none; padding: 0; min-height: 0; }

/* Stage marker (pill) — e.g. "Growth →" banner */
.stage-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  border-bottom: 0.5px solid var(--cb-warm-light);
}
.stage-label {
  grid-column: 1;
  padding: 10px 16px 10px 0;
  border-right: 0.5px solid var(--cb-warm-light);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray); font-weight: 500;
  display: flex; align-items: center;
}
.stage-band {
  padding: 10px 14px;
  border-left: 0.5px solid var(--cb-warm-light);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--cb-near-black);
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  position: relative;
}
.stage-band::before {
  content: "";
  flex: 1 1 auto;
  height: 0.5px;
  background: var(--cb-warm-light);
  margin-right: 2px;
  order: 2;
}
.stage-band .arrow {
  order: 3;
  font-size: 14px; color: var(--cb-warm-mid-gray);
}
.stage-band .stage-name { order: 1; }

/* ---- Outcomes + legend strip ------------------------------------------ */
.strip {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 0.5px solid var(--cb-warm-light);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
}
.strip-col h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: 14px;
}
.outcomes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-left: 0.5px solid var(--cb-warm-light);
}
.outcome {
  padding: 4px 14px 4px 14px;
  border-right: 0.5px solid var(--cb-warm-light);
  display: flex; flex-direction: column; gap: 2px;
  min-height: 56px;
}
.outcome .oc-eyebrow {
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray); font-weight: 500;
}
.outcome .oc-name {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500; line-height: 1.2;
  color: var(--cb-near-black);
}
.outcome .oc-desc {
  font-size: 10.5px; line-height: 1.4;
  color: var(--cb-warm-mid-gray);
  font-weight: 300;
  margin-top: 2px;
}

.footnote {
  display: flex; align-items: center; gap: 10px;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--cb-warm-mid-gray);
  letter-spacing: 0.06em;
  line-height: 1.5;
  padding-top: 8px;
}
.footnote em { color: var(--cb-near-black); font-style: normal; font-weight: 500; }

/* ---- Detail drawer ----------------------------------------------------- */
.drawer-scrim {
  position: fixed; inset: 0;
  background: rgba(13,13,13,0.2);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-out);
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 90vw;
  background: var(--cb-warm-white);
  border-left: 0.5px solid var(--cb-warm-light);
  z-index: 11;
  transform: translateX(100%);
  transition: transform 360ms var(--ease-out);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); box-shadow: var(--shadow-2); }
.drawer-header {
  padding: 26px 28px 20px;
  border-bottom: 0.5px solid var(--cb-warm-light);
  display: flex; flex-direction: column; gap: 10px;
}
.drawer-close {
  position: absolute; top: 20px; right: 20px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0.5px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  color: var(--cb-warm-mid-gray);
  transition: color 120ms ease, border-color 120ms ease;
}
.drawer-close:hover { color: var(--cb-near-black); border-color: var(--cb-warm-light); }
.drawer-stage-tag {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray); font-weight: 500;
  display: flex; gap: 8px; align-items: center;
}
.drawer-stage-tag .divider { width: 20px; height: 0.5px; background: var(--cb-warm-light); display: inline-block; }
.drawer-title {
  font-family: var(--font-display);
  font-size: 28px; line-height: 1.15; font-weight: 500;
  letter-spacing: -0.01em;
  padding-right: 30px;
}
.drawer-title.accent { color: var(--cb-terracotta); }
.drawer-year-range {
  font-size: 11.5px; color: var(--cb-warm-mid-gray); font-weight: 400;
  letter-spacing: 0.04em;
}
.drawer-body {
  padding: 22px 28px 40px;
  display: flex; flex-direction: column; gap: 22px;
}
.drawer-section h4 {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cb-warm-mid-gray); font-weight: 500;
  margin-bottom: 10px;
  font-family: var(--font-body);
}
.drawer-section p {
  font-size: 14px; line-height: 1.7;
  color: var(--cb-near-black);
  font-weight: 300;
}
.drawer-section ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.drawer-section ul li {
  font-size: 13px; line-height: 1.55;
  color: var(--cb-near-black);
  font-weight: 300;
  padding-left: 14px;
  position: relative;
}
.drawer-section ul li::before {
  content: "";
  position: absolute; left: 0; top: 10px;
  width: 6px; height: 0.5px;
  background: var(--cb-warm-mid-gray);
}

.drawer-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--cb-near-black);
  color: var(--cb-warm-white);
  border: 0.5px solid var(--cb-near-black);
  border-radius: 2px;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 120ms ease;
}
.drawer-toggle:hover { opacity: 0.88; }
.drawer-toggle.done {
  background: transparent; color: var(--cb-near-black);
}

/* ---- Filter dimming ---------------------------------------------------- */
.grid.filtered .cell.dim .milestone { opacity: 0.3; }
.grid.filtered .year-header.dim .year-num,
.grid.filtered .year-header.dim .year-label { color: var(--cb-warm-light); }

/* ---- Print ------------------------------------------------------------- */
@media print {
  @page { size: 14in 10.5in landscape; margin: 0.35in; }
  html, body { background: #fff; }
  .app { padding: 0; min-height: auto; display: block; }
  .sheet { border: none; padding: 0; max-width: none; width: auto; background-image: none; }
  .toolbar, .drawer, .drawer-scrim, .print-hide { display: none !important; }
  .milestone { break-inside: avoid; }
  .sheet-header { margin-bottom: 20px; padding-bottom: 14px; }
  .strip { margin-top: 20px; padding-top: 16px; }
}

/* ---- Narrow viewport (graceful) --------------------------------------- */
@media (max-width: 1100px) {
  .milestone-label { font-size: 11.5px; }
}
