/* =====================================================================
   gradelever -- styles.css
   Theme follows the Ohio U / ECT "Izzy" palette used in w:\ene.
   Brand: green #00694E, dark green #024230, sycamore, marigold accent.
   Surfaces are warm cream; inputs are 2px green, focus turns marigold.
   ===================================================================== */

:root {
  /* Brand */
  --green:        #00694E;
  --green-dark:   #024230;
  --white:        #FFFFFF;
  --putnam:       #756E65;
  --sycamore:     #E7ECC3;
  --marigold:     #AA8A00;
  --black:        #000000;

  /* Surfaces */
  --bg:           #F5F5F0;
  --bg-alt:       #FAFAF7;
  --bg-warmer:    #FFFBF0;
  --panel:        #FFFFFF;
  --panel-edge:   #E0E3CA;
  --hairline:     #C8CDB0;

  /* State */
  --warn-bg:      #FFF3CD;
  --warn-fg:      #5a4000;
  --error-bg:     #FCE6E6;
  --error-fg:     #C00000;

  /* Beam zones (decorative gradient under the beam) */
  --zone-low:     #fde2e1;
  --zone-mid:     #fef6cf;
  --zone-high:    #d8f3dc;

  /* Weights */
  --weight-fill:    var(--green);
  --weight-stroke:  var(--green-dark);
  --weight-text:    var(--white);
  --planned-fill:   rgba(170, 138, 0, 0.35);
  --planned-stroke: var(--marigold);
  --planned-text:   var(--green-dark);

  /* Type */
  --font-body:  'Segoe UI', Arial, sans-serif;
  --font-mono:  'Courier New', Consolas, monospace;

  /* Easings */
  --t-fast: 0.15s ease;
  --t-slow: 0.40s ease-in-out;
  --t-bounce: 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ------------ Resets ------------ */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 14px;
}
.hidden { display: none !important; }

button { font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
a { color: var(--green-dark); }
a:hover { color: var(--marigold); }

/* ------------ Buttons ------------ */
button, .as-label {
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  font-weight: bold;
}
.btn-primary {
  background: var(--green); color: var(--white);
  border: none; padding: 8px 18px;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  background: var(--white); color: var(--green);
  border: 2px solid var(--green); padding: 6px 14px;
}
.btn-secondary:hover { background: var(--sycamore); }
.btn-secondary.danger { color: var(--error-fg); border-color: var(--error-fg); }
.btn-secondary.danger:hover { background: var(--error-bg); }

.btn-tertiary {
  background: transparent; color: var(--putnam);
  border: 2px solid var(--putnam); padding: 4px 12px;
  font-weight: normal; font-size: 18px; line-height: 1;
}
.btn-tertiary:hover { background: var(--sycamore); color: var(--marigold); }

/* ------------ Hamburger dropdown drawer ------------ */
.dropdown { position: relative; }
.dropdown-drawer {
  position: absolute; z-index: 50;
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  min-width: 240px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.drawer-item {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none;
  padding: 8px 10px; border-radius: 4px;
  cursor: pointer; color: var(--green-dark); font-weight: bold;
  font-size: 14px;
}
.drawer-item:hover { background: var(--sycamore); }
.drawer-item.danger { color: var(--error-fg); }
.drawer-item.danger:hover { background: var(--error-bg); }
.dropdown-drawer .drawer-section {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--putnam); font-weight: bold;
  padding: 8px 10px 4px; margin-top: 4px;
  border-top: 1px solid var(--hairline);
}
.dropdown-drawer .drawer-section:first-child { border-top: none; margin-top: 0; }

/* Drawer submenu (collapsible group inside the hamburger). */
.drawer-submenu { padding: 0; }
.drawer-submenu > .drawer-summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.drawer-submenu > .drawer-summary::-webkit-details-marker { display: none; }
.drawer-submenu .drawer-chevron {
  font-size: 11px;
  color: var(--green-dark);
  transition: transform var(--t-fast);
  display: inline-block;
}
.drawer-submenu[open] > .drawer-summary .drawer-chevron {
  transform: rotate(90deg);
}
.drawer-subitem {
  padding-left: 26px;
  font-weight: normal;
}

/* ------------ Topbar ------------ */
#topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 20px;
  background: var(--white);
  border-bottom: 2px solid var(--green);
}
#topbar .brand { display: flex; align-items: center; gap: 12px; }
#topbar .brand-mark {
  display: block;
  width: 44px; height: 44px;
  object-fit: contain;
}
#topbar .brand-text strong {
  display: block; color: var(--green-dark); font-size: 20px;
}
#topbar .brand-text .tagline {
  display: block; color: var(--putnam); font-size: 12px; font-style: italic;
}
#topbar .topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------ Layout ------------ */
#layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 920px) {
  #layout { grid-template-columns: 1fr; }
}

/* ------------ Stage (left column) ------------ */
#stage {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 16px 20px 20px;
}

#readouts {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: baseline;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.readout { display: flex; flex-direction: column; }
.readout-label {
  font-size: 11px; color: var(--putnam);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.readout-value {
  font-family: var(--font-mono);
  color: var(--green-dark);
  font-size: 18px;
  font-weight: bold;
}
.readout.primary .readout-value { font-size: 42px; line-height: 1.05; }
.readout.projected { display: flex; flex-direction: row; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.readout.projected .readout-value { color: var(--marigold); }
.readout-delta {
  font-family: var(--font-mono); font-weight: bold;
  padding: 2px 8px; border-radius: 4px;
}
.readout-delta.up   { background: var(--zone-high); color: #1f6f3f; }
.readout-delta.down { background: var(--zone-low);  color: var(--error-fg); }
.readout-delta.zero { background: var(--bg-alt);    color: var(--putnam); }

#scale-wrap {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  padding: 8px;
  margin-top: 8px;
}
#scale {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;
  user-select: none;
}

#inertia-explainer {
  margin: 12px 4px 0;
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1.45;
}

/* ------------ SVG: beam, fulcrum, weights ------------ */
.beam-group { transform-origin: 500px 215px; transition: transform var(--t-slow); }
.beam-group.tipping-left  { transform: rotate(-2deg); }
.beam-group.tipping-right { transform: rotate(2deg); }

.beam-bar {
  /* fill set inline via gradient url() */
  stroke: rgba(0, 0, 0, 0.25);
  stroke-width: 0.75;
}
.beam-highlight {
  fill: rgba(255, 255, 255, 0.20);
  pointer-events: none;
}

.ground-line {
  stroke: var(--hairline);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  opacity: 0.7;
}

.tick line { stroke: var(--green-dark); stroke-width: 2; }
.tick text {
  fill: var(--green-dark); font-family: var(--font-mono);
  font-size: 22px; font-weight: bold;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 3;
  stroke-linejoin: round;
}
.tick-minor {
  stroke: var(--putnam);
  stroke-width: 1.5;
  opacity: 0.65;
}
.axis-label {
  fill: var(--putnam); font-size: 13px; text-anchor: middle;
  font-style: italic;
}

/* ---- Fulcrum (solid pedestal) ---- */
.fulcrum-group {
  transition: transform var(--t-slow);
}
.fulcrum-tri, .fulcrum-plate {
  /* gradient fills set inline */
  stroke: rgba(0, 0, 0, 0.22);
  stroke-width: 0.75;
}
.fulcrum-pivot {
  fill: var(--marigold);
  stroke: var(--green-dark);
  stroke-width: 1;
}
.fulcrum-label {
  fill: var(--green-dark);
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 26px;
  letter-spacing: 0.02em;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 4;
  stroke-linejoin: round;
  pointer-events: none;
}

/* ---- Projected fulcrum (dashed indicator) ---- */
.projected-line {
  stroke: var(--marigold);
  stroke-width: 2;
  stroke-dasharray: 6 5;
  opacity: 0.85;
}
.projected-marker {
  fill: var(--marigold);
  fill-opacity: 0.30;
  stroke: var(--marigold);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

/* ---- Weights ---- */
.weight {
  cursor: grab;
  transition: transform var(--t-bounce), opacity var(--t-fast);
  touch-action: none; /* let pointer events drive horizontal drag on touch */
}
.weight.dragging {
  cursor: grabbing;
  transition: none; /* match pointer 1:1 while held */
  filter: brightness(1.15) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}
.weight .disc {
  /* gradient fill set inline via fill="url(#weight-X)" */
  transition: filter var(--t-fast);
}
.weight .disc-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1;
  pointer-events: none;
}
.weight .grade-label {
  fill: var(--white);
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 13px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 0.6;
}
.weight:hover .disc { filter: brightness(1.12) saturate(1.1); }
.weight .required-star {
  fill: #ffcc00;
  stroke: #6b4f00;
  stroke-width: 0.6;
  paint-order: stroke;
  font-size: 16px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.5));
}
.weight.entering { transform: translate(0, -260px); opacity: 0; }
.weight.leaving  { transform: translate(0, 260px) scale(0.5); opacity: 0; }
.weight.planned .disc {
  /* keep gradient fill, but mark with a dashed rim */
  stroke: var(--marigold);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}
.weight.planned .grade-label {
  fill: var(--green-dark);
  stroke: rgba(255, 255, 255, 0.55);
}

/* ------------ Panels (right column) ------------ */
#panels { display: flex; flex-direction: column; gap: 14px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
}
.panel > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  font-weight: bold;
  color: var(--green-dark);
  background: var(--sycamore);
  border-bottom: 1px solid var(--panel-edge);
  display: flex; justify-content: space-between; align-items: center;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary:hover { background: #d6e0a4; }
.panel[open] > summary { border-left: 4px solid var(--green); padding-left: 12px; }

/* Panel tints that match the zones on the scale:
   completed courses sit in the green (high) zone of the beam,
   planned courses are projections so they get the gold / mid zone. */
.panel-completed { background: var(--zone-high); }
.panel-completed > summary { background: #b8e6c4; }
.panel-completed > summary:hover { background: #a4dcb3; }
.panel-planned { background: var(--zone-mid); }
.panel-planned > summary { background: #fbe98a; }
.panel-planned > summary:hover { background: #f8df68; }
.panel .title-group {
  display: inline-flex; align-items: center; gap: 8px;
}
.panel .chevron {
  display: inline-block;
  width: 1em;
  font-size: 18px; line-height: 1;
  color: var(--green-dark);
  text-align: center;
  transition: transform var(--t-fast);
}
.panel[open] > summary .chevron { transform: rotate(90deg); }
.panel .count {
  background: var(--green); color: var(--white);
  border-radius: 999px; padding: 2px 10px;
  font-family: var(--font-mono); font-size: 12px;
}
.panel-help {
  margin: 12px 16px 0;
  font-size: 12px;
  color: var(--putnam);
  line-height: 1.45;
}

/* Inline action row inside a panel (e.g. "Move all to Completed" in Planned). */
.panel-actions {
  display: flex; justify-content: flex-end;
  padding: 8px 16px 0;
}
.panel-actions .btn-secondary { font-size: 12px; padding: 4px 10px; }
.panel-actions .btn-secondary:disabled {
  opacity: 0.4; cursor: not-allowed; pointer-events: none;
}

/* Forms */
.add-form { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 11px; font-weight: bold; color: var(--green-dark); }
.field-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.field-row > .field { flex: 1; min-width: 80px; }
.field-row > .btn-primary { white-space: nowrap; }

input[type="text"], input[type="number"], select {
  width: 100%;
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: 4px;
  padding: 6px 8px;
  color: var(--black);
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--marigold);
  background: var(--bg-warmer);
}

/* Course list under each panel */
.course-list {
  margin: 0; padding: 0 16px 14px;
  list-style: none;
  display: flex; flex-direction: column; gap: 4px;
  max-height: 60vh;
  overflow-y: auto;
}
.course-list .course-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--row-tint, var(--bg-alt));
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--row-accent, var(--hairline));
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: filter var(--t-fast), border-color var(--t-fast);
}
.course-list .course-row:hover {
  filter: brightness(0.94);
  border-color: var(--marigold);
}
.course-list .course-row:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 1px;
}
.course-required {
  color: #ffcc00;
  text-shadow: 0 0 1px #6b4f00;
  margin-right: 4px;
}

/* ---- Divider rows ----
   The selectors below are scoped to `.course-list` so they out-specify the
   generic `.course-list li { background: var(--bg-alt); }` rule above; without
   that scoping, the divider's gold background gets clobbered. */
.course-list .divider-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-top: 4px;
  background: #fce58c;
  border: 1px solid #d9b842;
  border-left: 4px solid var(--marigold);
  border-radius: 4px;
  font-size: 12px;
  color: var(--green-dark);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: grab;
}
.course-list .divider-row:hover { background: #fbd95e; border-color: var(--marigold); }
.course-list .divider-row.dragging,
.course-list .course-row.dragging { opacity: 0.5; cursor: grabbing; }
.divider-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.divider-edit-input {
  flex: 1;
  font: inherit; font-weight: bold;
  text-transform: none;
  letter-spacing: normal;
  padding: 2px 6px;
  border: 2px solid var(--marigold);
  border-radius: 4px;
  background: var(--bg-warmer);
  color: var(--green-dark);
  width: auto;
}

/* ---- "+ Add section" button row ---- */
.add-divider-row {
  display: flex; justify-content: center; align-items: stretch;
  padding: 0;
  background: transparent;
  border: 1px dashed var(--hairline);
  border-radius: 4px;
  cursor: default;
  margin-top: 6px;
  position: relative;
  z-index: 1;
}
.add-divider-row:hover { border-color: var(--marigold); background: var(--bg-warmer); }
.add-divider-btn {
  background: transparent; border: none;
  color: var(--green-dark); font-weight: bold; font-size: 13px;
  padding: 8px 14px;
  width: 100%;
  cursor: pointer;
  text-align: center;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
.add-divider-btn:hover { color: var(--marigold); }
.add-divider-btn:focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; }

/* ---- Drop indicators ---- */
.course-row.drop-before, .divider-row.drop-before { box-shadow: 0 -3px 0 var(--marigold); }
.course-row.drop-after,  .divider-row.drop-after  { box-shadow: 0  3px 0 var(--marigold); }
.add-divider-row.drop-into-end {
  border-style: solid;
  border-color: var(--marigold);
  background: var(--bg-warmer);
}
.course-list .course-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.course-list .course-meta {
  font-family: var(--font-mono);
  color: var(--green-dark);
  font-weight: bold;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.10);
  padding: 2px 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.course-list .course-name {
  display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: bold;
}
.course-list .course-title {
  display: block;
  font-size: 11px; color: var(--putnam);
  font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.course-list .remove-btn {
  background: transparent; border: none;
  color: var(--error-fg); font-weight: bold;
  padding: 2px 6px; border-radius: 4px;
  cursor: pointer;
}
.course-list .remove-btn:hover { background: var(--error-bg); }

.goal-result {
  margin: 0 16px 16px;
  padding: 10px 12px;
  background: var(--bg-warmer);
  border-left: 4px solid var(--marigold);
  border-radius: 4px;
  font-size: 13px;
  color: var(--green-dark);
  line-height: 1.5;
  min-height: 1em;
}
.goal-result.impossible {
  background: var(--error-bg);
  border-left-color: var(--error-fg);
  color: var(--error-fg);
}
.goal-result:empty { display: none; }

/* ------------ Required-course checkbox row (under add-form) ------------ */
.checkbox-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--green-dark);
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type="checkbox"] {
  width: auto; margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

/* Inline help under a field. */
.field-hint {
  margin: 4px 0 0;
  font-size: 11px; color: var(--putnam);
  font-style: italic; line-height: 1.4;
}

/* Color picker (edit modal) */
.color-picker {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 0;
}
.color-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  cursor: pointer;
  padding: 0;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.color-swatch:hover { transform: scale(1.12); border-color: var(--green-dark); }
.color-swatch.selected {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 2px var(--marigold);
  transform: scale(1.06);
}

/* ------------ Modal (Edit course, About) ------------ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: 10px;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.30);
  overflow: hidden;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: var(--green-dark); color: var(--white);
}
.modal-header h2 {
  margin: 0; font-size: 16px;
}
.btn-close {
  background: transparent; border: none; color: var(--white);
  font-size: 24px; line-height: 1; padding: 0 4px;
  cursor: pointer; font-weight: bold;
  border-radius: 4px;
}
.btn-close:hover { color: var(--marigold); background: rgba(255, 255, 255, 0.08); }
.modal-body {
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

/* Help and Getting Started modals are resizable by the user (drag the bottom-
   right corner). The other modals stay fixed-size. */
#help-modal .modal,
#gs-modal .modal {
  resize: both;
  overflow: hidden;
  width: min(560px, 95vw);
  height: min(70vh, 640px);
  min-width: 360px;
  min-height: 280px;
  max-width: 95vw;
  max-height: 95vh;
}
.modal-meta {
  font-size: 12px; color: var(--putnam); margin: 0;
  font-style: italic;
}
.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
  display: flex; gap: 8px; align-items: center;
  background: var(--bg-alt);
}
.modal-footer .modal-spacer { flex: 1; }
.modal-footer .btn-secondary { padding: 6px 14px; }
.modal-footer .btn-primary   { padding: 6px 18px; }

/* About modal -- author list and repo link */
.about-authors {
  list-style: none; padding: 0; margin: 4px 0 8px;
}
.about-authors li {
  font-weight: bold; color: var(--green-dark);
  padding: 2px 0;
}
.about-repo {
  margin: 8px 0 0; font-size: 13px;
}
.about-repo a {
  color: var(--green-dark); font-weight: bold;
}
.about-repo a:hover { color: var(--marigold); }

/* Paste-DARS textarea */
#paste-dars-text {
  width: 100%; box-sizing: border-box;
  font-family: var(--font-mono); font-size: 12px;
  padding: 8px;
  border: 2px solid var(--green);
  border-radius: 4px;
  background: var(--bg-alt);
  resize: vertical;
}
#paste-dars-text:focus {
  outline: none;
  border-color: var(--marigold);
  background: var(--bg-warmer);
}
#paste-dars-status:empty { display: none; }
#paste-dars-status.error { color: var(--error-fg); font-weight: bold; }

.modal-subhead {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--putnam);
  margin: 8px 0 4px;
  font-weight: bold;
}
.modal-body p { margin: 4px 0; line-height: 1.5; }
.modal-body code {
  font-family: var(--font-mono);
  background: var(--bg-warmer);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}
.gs-steps {
  margin: 4px 0; padding-left: 22px;
  display: flex; flex-direction: column; gap: 8px;
  line-height: 1.4;
}
.help-list {
  margin: 4px 0; padding-left: 22px;
  display: flex; flex-direction: column; gap: 4px;
  line-height: 1.4;
}

/* ------------ Toast (undo) ------------ */
#toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--green-dark);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 100;
  /* Hidden by default. Without opacity hiding, the empty padded pill peeks
     up from the bottom of the viewport as a small green dot. */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--t-slow), opacity var(--t-slow),
              visibility 0s linear var(--t-slow);
}
#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform var(--t-slow), opacity var(--t-slow),
              visibility 0s;
}
#toast .undo-btn {
  background: var(--marigold); color: var(--white);
  border: none; border-radius: 4px;
  padding: 4px 10px; font-weight: bold;
  cursor: pointer;
}
#toast .undo-btn:hover { background: #c9a200; }

/* ------------ Mobile tuning ------------ */
@media (max-width: 540px) {
  #topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .readout.primary .readout-value { font-size: 32px; }
  .weight .grade-label { font-size: 11px; }
  #scale { max-height: 40vh; }
  #layout { padding: 12px; }
}

/* ------------ Goal mode under the lever ------------ */
#stage > .panel {
  margin-top: 14px;
}

/* ------------ Page footer ------------ */
.page-footer {
  text-align: center;
  padding: 14px 16px;
  margin-top: 24px;
  border-top: 1px solid var(--hairline);
  color: var(--putnam);
  font-size: 12px;
  letter-spacing: 0.04em;
}
