/* RiverSafe — USWDS Component Styles */
/* Layered on top of colors_and_type.css tokens */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--uswds-gray-5); min-height: 100vh; }

/* ── App Shell ─────────────────────────────────── */
.rs-app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--uswds-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── Header ─────────────────────────────────────── */
.rs-header {
  background: var(--theme-color-primary-darker);
  color: var(--uswds-white);
  padding: var(--sp-105) var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.rs-header__wordmark { display: flex; flex-direction: column; }
.rs-header__title {
  font-size: var(--fs-10);
  font-weight: var(--fw-bold);
  margin: 0;
  color: var(--uswds-white);
  line-height: 1.1;
}
.rs-header__subtitle {
  font-size: var(--fs-2);
  color: rgba(255,255,255,0.72);
  margin: 0;
  font-weight: var(--fw-normal);
  white-space: nowrap;
}
.rs-header__icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--uswds-white);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.rs-header__icon img { width: 100%; height: 100%; object-fit: contain; }

/* ── Step Indicator ──────────────────────────────── */
.usa-step-indicator {
  background: var(--uswds-white);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--sp-2) var(--sp-3) var(--sp-2);
}
.usa-step-indicator__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.usa-step-indicator__heading-text {
  font-size: var(--fs-7);
  font-weight: var(--fw-bold);
  color: var(--fg1);
  line-height: var(--lh-3);
  white-space: nowrap;
}
.usa-step-indicator__heading-counter {
  font-size: var(--fs-2);
  color: var(--fg3);
  white-space: nowrap;
  flex-shrink: 0;
}
.usa-step-indicator__segments {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.usa-step-indicator__segment {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
/* Connecting lines via ::before / ::after */
.usa-step-indicator__segment::before,
.usa-step-indicator__segment::after {
  content: '';
  position: absolute;
  top: 11px;
  height: 2px;
  background: var(--border-default);
  z-index: 0;
}
.usa-step-indicator__segment::before { left: 0; width: 50%; }
.usa-step-indicator__segment::after  { right: 0; width: 50%; }
.usa-step-indicator__segment:first-child::before { display: none; }
.usa-step-indicator__segment:last-child::after   { display: none; }
/* Color completed lines */
.usa-step-indicator__segment--complete::before,
.usa-step-indicator__segment--complete::after { background: var(--theme-color-primary); }
.usa-step-indicator__segment--complete + .usa-step-indicator__segment::before { background: var(--theme-color-primary); }

.usa-step-indicator__segment-indicator {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-default);
  background: var(--uswds-white);
  color: var(--fg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: var(--fw-bold);
  z-index: 1; position: relative;
  transition: all var(--dur-fast);
}
.usa-step-indicator__segment--complete .usa-step-indicator__segment-indicator {
  background: var(--theme-color-primary);
  border-color: var(--theme-color-primary);
  color: var(--uswds-white);
}
.usa-step-indicator__segment--current .usa-step-indicator__segment-indicator {
  border-color: var(--theme-color-primary);
  color: var(--theme-color-primary);
  border-width: 2px;
}
.usa-step-indicator__segment-label {
  font-size: 10px;
  color: var(--fg3);
  margin-top: 4px;
  font-weight: var(--fw-medium);
  text-align: center;
}
.usa-step-indicator__segment--current .usa-step-indicator__segment-label { color: var(--theme-color-primary); font-weight: var(--fw-bold); }
.usa-step-indicator__segment--complete .usa-step-indicator__segment-label { color: var(--theme-color-primary); }

/* ── Content ─────────────────────────────────────── */
.rs-content { flex: 1; padding: var(--sp-3) var(--sp-3) 100px; }
.rs-step-title { font-size: var(--fs-10); font-weight: var(--fw-bold); color: var(--fg1); margin: 0 0 var(--sp-05); }
.rs-step-desc  { font-size: var(--fs-4); color: var(--fg2); margin: 0 0 var(--sp-3); line-height: var(--lh-4); max-width: none; }

/* ── USWDS Cards ─────────────────────────────────── */
.usa-card {
  background: var(--uswds-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-3);
  overflow: hidden;
}
.usa-card__header {
  padding: var(--sp-105) var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg2);
}
.usa-card__header-title {
  font-size: var(--fs-5);
  font-weight: var(--fw-bold);
  color: var(--fg1);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.usa-card__body { padding: var(--sp-3); }

/* ── Buttons ─────────────────────────────────────── */
.usa-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1);
  padding: 0 var(--sp-3); height: 44px; min-width: 80px;
  font-family: var(--font-sans); font-size: var(--fs-5); font-weight: var(--fw-bold);
  border-radius: var(--radius-md); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.usa-button:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.usa-button--primary { background: var(--theme-color-primary); color: var(--uswds-white); border-color: var(--theme-color-primary); }
.usa-button--primary:hover:not(:disabled) { background: var(--theme-color-primary-dark); border-color: var(--theme-color-primary-dark); }
.usa-button--primary:disabled { background: var(--theme-color-disabled); border-color: var(--theme-color-disabled); color: var(--theme-color-disabled-dark); cursor: not-allowed; }
.usa-button--outline { background: transparent; color: var(--theme-color-primary); border-color: var(--theme-color-primary); }
.usa-button--outline:hover:not(:disabled) { background: var(--theme-color-primary-lightest); }
.usa-button--outline:disabled { border-color: var(--theme-color-disabled); color: var(--theme-color-disabled-dark); cursor: not-allowed; }
.usa-button--full { width: 100%; }
.usa-button--sm { height: 36px; font-size: var(--fs-4); padding: 0 var(--sp-2); }

/* ── Form Labels & Inputs ────────────────────────── */
.usa-label { display: block; font-size: var(--fs-4); font-weight: var(--fw-bold); color: var(--fg1); margin-bottom: var(--sp-05); }
.usa-hint  { font-size: var(--fs-3); color: var(--fg3); margin: 0 0 var(--sp-1); }
.usa-form-group { margin-bottom: var(--sp-3); }

.usa-input, .usa-select {
  display: block; width: 100%;
  padding: var(--sp-1) var(--sp-105);
  font-size: var(--fs-5); font-family: var(--font-sans);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  height: 44px;
  background: var(--uswds-white); color: var(--fg1);
}
.usa-input:focus, .usa-select:focus { outline: var(--focus-outline); outline-offset: 0; border-color: var(--theme-color-primary); }
.usa-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18'%3E%3Cpath fill='%23454545' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ── Radio Options ───────────────────────────────── */
.usa-radio { margin-bottom: var(--sp-1); }
.usa-radio__input { position: absolute; opacity: 0; width: 0; height: 0; }
.usa-radio__label {
  display: flex; align-items: flex-start; gap: var(--sp-105);
  padding: var(--sp-105) var(--sp-2); min-height: 44px;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.usa-radio__label::before {
  content: ''; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--uswds-white); margin-top: 1px;
  transition: border-color var(--dur-fast), border-width var(--dur-fast);
}
.usa-radio__input:checked + .usa-radio__label { border-color: var(--theme-color-primary); background: var(--theme-color-primary-lightest); }
.usa-radio__input:checked + .usa-radio__label::before { border-color: var(--theme-color-primary); border-width: 6px; }
.usa-radio__input:focus-visible + .usa-radio__label { outline: var(--focus-outline); outline-offset: var(--focus-offset); border-radius: var(--radius-md); }
.usa-radio__label-text { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.usa-radio__label-title { font-size: var(--fs-4); font-weight: var(--fw-semibold); color: var(--fg1); }
.usa-radio__label-desc  { font-size: var(--fs-3); color: var(--fg2); }
.usa-radio__label-warn  { font-size: var(--fs-3); color: var(--theme-color-error); }

/* ── Checkboxes ──────────────────────────────────── */
.usa-checkbox { margin-bottom: var(--sp-1); }
.usa-checkbox__input { position: absolute; opacity: 0; width: 0; height: 0; }
.usa-checkbox__label {
  display: flex; align-items: flex-start; gap: var(--sp-105);
  padding: var(--sp-105) var(--sp-2); min-height: 44px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.usa-checkbox__label::before {
  content: ''; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: var(--radius-sm);
  border: 2px solid var(--border-strong); background: var(--uswds-white);
  margin-top: 1px;
  transition: all var(--dur-fast);
}
.usa-checkbox__input:checked + .usa-checkbox__label { border-color: var(--theme-color-primary); background: var(--theme-color-primary-lightest); }
.usa-checkbox__input:checked + .usa-checkbox__label::before {
  background: var(--theme-color-primary); border-color: var(--theme-color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='14' height='14'%3E%3Cpath fill='white' d='M9 16.17L4.83 12l-1.41 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.usa-checkbox__label-text { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.usa-checkbox__label-title { font-size: var(--fs-4); font-weight: var(--fw-medium); color: var(--fg1); }
.usa-checkbox__label-desc  { font-size: var(--fs-3); color: var(--fg2); }
.usa-checkbox__label-warn  { font-size: var(--fs-3); color: var(--theme-color-error); margin-top: 4px; font-weight: var(--fw-medium); }
.usa-checkbox__label-warn--medium { color: var(--theme-color-warning-dark); }

/* ── Alerts ──────────────────────────────────────── */
.usa-alert {
  border-left: 8px solid; border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2);
}
.usa-alert__heading { font-size: var(--fs-5); font-weight: var(--fw-bold); margin: 0 0 4px; }
.usa-alert__text    { font-size: var(--fs-4); margin: 0; max-width: none; line-height: var(--lh-4); }
.usa-alert--success { border-color: var(--theme-color-success); background: var(--theme-color-success-lighter); }
.usa-alert--success .usa-alert__heading { color: var(--theme-color-success-darker); }
.usa-alert--success .usa-alert__text    { color: var(--theme-color-success-darker); }
.usa-alert--warning { border-color: var(--theme-color-warning); background: var(--theme-color-warning-lighter); }
.usa-alert--warning .usa-alert__heading { color: #7a4b00; }
.usa-alert--warning .usa-alert__text    { color: #7a4b00; }
.usa-alert--error   { border-color: var(--theme-color-error); background: var(--theme-color-error-lighter); }
.usa-alert--error .usa-alert__heading   { color: var(--theme-color-error-darker); }
.usa-alert--error .usa-alert__text      { color: var(--theme-color-error-darker); }
.usa-alert--info    { border-color: var(--theme-color-info); background: var(--theme-color-info-lighter); }
.usa-alert--info .usa-alert__heading    { color: var(--theme-color-info-darker); }
.usa-alert--info .usa-alert__text       { color: var(--theme-color-info-darker); }

/* ── Temperature slider ──────────────────────────── */
.rs-slider-container { margin-bottom: var(--sp-3); }
.rs-slider-value-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-1); }
.rs-slider-value { font-size: var(--fs-11); font-weight: var(--fw-bold); color: var(--theme-color-primary); line-height: 1; }
.rs-temp-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: var(--radius-pill); font-size: var(--fs-3); font-weight: var(--fw-bold);
}
.rs-temp-badge--cold     { background: #cfe8ff; color: #0b4778; }
.rs-temp-badge--cool     { background: var(--theme-color-info-lighter); color: var(--theme-color-info-darker); }
.rs-temp-badge--moderate { background: var(--theme-color-warning-lighter); color: #7a4b00; }
.rs-temp-badge--warm     { background: var(--theme-color-success-lighter); color: var(--theme-color-success-darker); }
input[type=range] {
  -webkit-appearance: none; width: 100%; height: 4px;
  border-radius: 2px; background: var(--border-default); outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--theme-color-primary); cursor: pointer;
  border: 2px solid var(--uswds-white); box-shadow: var(--shadow-2);
}
input[type=range]:focus-visible { outline: var(--focus-outline); outline-offset: 4px; }
.rs-slider-labels { display: flex; justify-content: space-between; font-size: var(--fs-2); color: var(--fg3); margin-top: 4px; }

/* ── Skill level cards ───────────────────────────── */
.rs-skill-card {
  border: 2px solid var(--border-default); border-radius: var(--radius-md);
  padding: var(--sp-2); margin-bottom: var(--sp-1);
  cursor: pointer; display: flex; align-items: flex-start; gap: var(--sp-2);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.rs-skill-card:hover { border-color: var(--theme-color-primary-light); }
.rs-skill-card--selected { border-color: var(--theme-color-primary); background: var(--theme-color-primary-lightest); }
.rs-skill-card__radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-strong); flex-shrink: 0; margin-top: 3px;
  transition: border-color var(--dur-fast), border-width var(--dur-fast);
}
.rs-skill-card--selected .rs-skill-card__radio { border-color: var(--theme-color-primary); border-width: 6px; }
.rs-skill-badge {
  display: inline-block; font-size: 10px; font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: var(--radius-pill); margin-bottom: 4px;
}
.rs-skill-badge--1 { background: #f8e1de; color: #a23737; }
.rs-skill-badge--2 { background: var(--theme-color-warning-lighter); color: #7a4b00; }
.rs-skill-badge--3 { background: var(--theme-color-info-lighter); color: var(--theme-color-info-darker); }
.rs-skill-badge--4 { background: var(--theme-color-success-lighter); color: var(--theme-color-success-darker); }
.rs-skill-card__title { font-size: var(--fs-5); font-weight: var(--fw-bold); color: var(--fg1); }
.rs-skill-card__desc  { font-size: var(--fs-3); color: var(--fg2); margin-top: 2px; }

/* ── Safety level result ─────────────────────────── */
.rs-safety-hero {
  text-align: center;
  padding: var(--sp-4) var(--sp-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-3);
}
.rs-safety-hero--go      { background: var(--theme-color-success-lighter); border: 2px solid var(--theme-color-success); }
.rs-safety-hero--caution { background: var(--theme-color-warning-lighter); border: 2px solid var(--theme-color-warning); }
.rs-safety-hero--stop    { background: var(--theme-color-error-lighter);   border: 2px solid var(--theme-color-error); }
.rs-safety-eyebrow { font-size: 11px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--sp-1); }
.rs-safety-hero--go      .rs-safety-eyebrow { color: var(--theme-color-success-darker); }
.rs-safety-hero--caution .rs-safety-eyebrow { color: #7a4b00; }
.rs-safety-hero--stop    .rs-safety-eyebrow { color: var(--theme-color-error-darker); }
.rs-safety-level { font-size: var(--fs-16); font-weight: var(--fw-bold); line-height: 1; margin: 0 0 var(--sp-1); }
.rs-safety-hero--go      .rs-safety-level { color: var(--theme-color-success); }
.rs-safety-hero--caution .rs-safety-level { color: var(--uswds-gold-30v); }
.rs-safety-hero--stop    .rs-safety-level { color: var(--theme-color-error); }
.rs-safety-score { font-size: var(--fs-7); font-weight: var(--fw-semibold); margin-bottom: var(--sp-1); }
.rs-safety-hero--go      .rs-safety-score { color: var(--theme-color-success-darker); }
.rs-safety-hero--caution .rs-safety-score { color: #7a4b00; }
.rs-safety-hero--stop    .rs-safety-score { color: var(--theme-color-error-darker); }
.rs-safety-message { font-size: var(--fs-4); line-height: var(--lh-4); max-width: 280px; margin: 0 auto; }
.rs-safety-hero--go      .rs-safety-message { color: var(--theme-color-success-darker); }
.rs-safety-hero--caution .rs-safety-message { color: #7a4b00; }
.rs-safety-hero--stop    .rs-safety-message { color: var(--theme-color-error-darker); }

/* ── Score breakdown ─────────────────────────────── */
.rs-score-table { width: 100%; border-collapse: collapse; }
.rs-score-row { }
.rs-score-row td { padding: var(--sp-1) 0; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.rs-score-row:last-child td { border-bottom: none; }
.rs-score-label { font-size: var(--fs-4); color: var(--fg1); }
.rs-score-bar-cell { width: 80px; padding-left: var(--sp-1) !important; padding-right: var(--sp-1) !important; }
.rs-score-bar-bg { height: 8px; background: var(--border-subtle); border-radius: 4px; overflow: hidden; }
.rs-score-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s var(--ease-standard); }
.rs-score-bar-fill--hit  { background: var(--theme-color-error); }
.rs-score-bar-fill--none { background: var(--theme-color-success); width: 100% !important; }
.rs-score-deduction { font-size: var(--fs-3); font-weight: var(--fw-bold); text-align: right; white-space: nowrap; }
.rs-score-deduction--hit  { color: var(--theme-color-error); }
.rs-score-deduction--none { color: var(--theme-color-success); }
.rs-score-total-row td { padding-top: var(--sp-105) !important; border-top: 2px solid var(--border-default); border-bottom: none !important; }
.rs-score-total-label { font-size: var(--fs-5); font-weight: var(--fw-bold); color: var(--fg1); }
.rs-score-total-value { font-size: var(--fs-5); font-weight: var(--fw-bold); text-align: right; }

/* ── Risk factors list ───────────────────────────── */
.rs-risk-item {
  display: flex; align-items: flex-start; gap: var(--sp-1);
  padding: var(--sp-1) 0; border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-4); color: var(--fg1);
}
.rs-risk-item:last-child { border-bottom: none; }
.rs-risk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--theme-color-error); flex-shrink: 0; margin-top: 6px; }

/* ── Recommendations ─────────────────────────────── */
.rs-rec-item {
  display: flex; align-items: flex-start; gap: var(--sp-105);
  padding: var(--sp-105) var(--sp-2); margin-bottom: var(--sp-1);
  background: var(--bg2); border-radius: var(--radius-md);
  font-size: var(--fs-4); color: var(--fg1);
}
.rs-rec-item::before { content: '→'; color: var(--theme-color-primary); font-weight: var(--fw-bold); flex-shrink: 0; margin-top: 1px; }
.rs-rec-group + .rs-rec-group { margin-top: var(--sp-2); }

/* ── Collapsible sections ────────────────────────── */
.rs-collapsible-toggle {
  all: unset;
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-105) var(--sp-3);
  background: var(--bg2);
  cursor: pointer;
}
.rs-collapsible-toggle[aria-expanded="false"] { border-radius: var(--radius-md); }
.rs-collapsible-toggle:focus-visible { outline: var(--focus-outline); outline-offset: -2px; }
.rs-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--theme-color-primary-lightest);
  color: var(--theme-color-primary-dark);
  font-size: var(--fs-2); font-weight: var(--fw-bold);
  margin-left: var(--sp-1);
}
.rs-count-badge--risk { background: var(--theme-color-error-lighter); color: var(--theme-color-error-darker); }
.rs-collapsible-arrow { font-size: 18px; line-height: 1; color: var(--fg3); transition: transform var(--dur-fast); flex-shrink: 0; }
.rs-collapsible-arrow--open { transform: rotate(180deg); }
.rs-view-all-link {
  font-size: var(--fs-3); font-weight: var(--fw-bold); color: var(--theme-color-primary);
  white-space: nowrap; flex-shrink: 0;
}

/* ── Improve your trip CTA ───────────────────────── */
.rs-improve-cta { margin-bottom: var(--sp-3); }

/* ── Back link ────────────────────────────────────── */
.rs-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: var(--fs-4); font-weight: var(--fw-semibold);
  color: var(--theme-color-primary); padding: 0; margin-bottom: var(--sp-2);
  text-decoration: underline; text-underline-offset: 2px;
}

/* ── Share / copy ────────────────────────────────── */
.rs-share-preview {
  font-family: var(--font-mono); font-size: var(--fs-3);
  background: var(--bg2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: var(--sp-105) var(--sp-2);
  color: var(--fg1); line-height: var(--lh-4); margin-bottom: var(--sp-2);
  overflow-wrap: break-word;
  word-break: normal;
}
.rs-copy-confirm { font-size: var(--fs-3); color: var(--theme-color-success); font-weight: var(--fw-bold); min-height: 20px; margin-top: var(--sp-1); }

/* ── Visit summary table ─────────────────────────── */
.rs-summary-table { width: 100%; border-collapse: collapse; }
.rs-summary-table tr td { padding: var(--sp-1) 0; border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-4); vertical-align: top; }
.rs-summary-table tr:last-child td { border-bottom: none; }
.rs-summary-table td:first-child { color: var(--fg2); width: 46%; font-weight: var(--fw-normal); }
.rs-summary-table td:last-child  { font-weight: var(--fw-semibold); color: var(--fg1); }

/* ── Educational resources ───────────────────────── */
.rs-edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
@media (max-width: 360px) { .rs-edu-grid { grid-template-columns: 1fr; } }
.rs-edu-tile { background: var(--bg2); border-radius: var(--radius-md); padding: var(--sp-2); }
.rs-edu-tile__eyebrow { font-size: 10px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg3); margin-bottom: var(--sp-05); }
.rs-edu-tile__title { font-size: var(--fs-4); font-weight: var(--fw-bold); color: var(--fg1); margin-bottom: var(--sp-1); }
.rs-edu-tile__list { list-style: none; margin: 0; padding: 0; }
.rs-edu-tile__list li { font-size: var(--fs-3); color: var(--fg2); margin-bottom: 4px; padding-left: 12px; position: relative; }
.rs-edu-tile__list li::before { content: '·'; position: absolute; left: 0; color: var(--fg3); }
.rs-edu-tile__link { display: block; margin-top: var(--sp-1); font-size: var(--fs-3); color: var(--fg-link); }

/* ── Bottom navigation ───────────────────────────── */
.rs-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--uswds-white); border-top: 1px solid var(--border-subtle);
  padding: var(--sp-2) var(--sp-3);
  display: flex; gap: var(--sp-2);
  max-width: 480px; margin: 0 auto;
  z-index: 100;
}
.rs-bottom-nav .usa-button { flex: 1; }

/* ── Validation ──────────────────────────────────── */
.rs-validation { margin-top: var(--sp-2); }
.rs-validation-item { font-size: var(--fs-3); color: var(--theme-color-error); display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; }
.rs-validation-item::before { content: '✕'; flex-shrink: 0; font-weight: var(--fw-bold); }

/* ── Emergency footer ────────────────────────────── */
.rs-emergency-footer {
  position: sticky;
  bottom: 76px;
  z-index: 90;
  margin: 0 var(--sp-3) var(--sp-2);
  padding: var(--sp-2) var(--sp-2);
  background: #fff8f0; border: 1px solid #f6bd60;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  font-size: var(--fs-3); color: #7a4b00; text-align: center;
  line-height: var(--lh-4);
}

/* ── Activity radio tiles ────────────────────────── */
.rs-activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-1);
}
.rs-radio-tile { position: relative; }
.rs-radio-tile input[type=radio] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.rs-radio-tile__label {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  min-height: 52px; padding: var(--sp-1) var(--sp-105);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--fs-3); font-weight: var(--fw-medium);
  color: var(--fg1); cursor: pointer; line-height: var(--lh-3);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.rs-radio-tile__label:hover {
  border-color: var(--theme-color-primary-light);
  background: var(--theme-color-primary-lightest);
}
.rs-radio-tile__label--selected {
  border-color: var(--theme-color-primary);
  background: var(--theme-color-primary-lightest);
  color: var(--theme-color-primary-dark);
  font-weight: var(--fw-bold);
}
.rs-radio-tile input:focus-visible + .rs-radio-tile__label {
  outline: var(--focus-outline); outline-offset: var(--focus-offset);
}

/* ── Location button ─────────────────────────────── */
.rs-location-btn {
  display: flex; align-items: center; gap: var(--sp-1);
  font-size: var(--fs-4); color: var(--theme-color-primary);
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-weight: var(--fw-semibold);
  padding: var(--sp-1) 0; text-decoration: underline;
  text-underline-offset: 2px;
}
.rs-location-btn:disabled { color: var(--fg3); cursor: not-allowed; text-decoration: none; }

/* ── Info callout box ────────────────────────────── */
.rs-info-box {
  background: var(--bg2); border-left: 4px solid var(--theme-color-info);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--sp-2) var(--sp-2); margin-top: var(--sp-2);
}
.rs-info-box__title { font-size: var(--fs-4); font-weight: var(--fw-bold); color: var(--fg1); margin-bottom: var(--sp-05); }
.rs-info-box__list { list-style: none; margin: 0; padding: 0; }
.rs-info-box__list li { font-size: var(--fs-3); color: var(--fg2); margin-bottom: 4px; padding-left: 14px; position: relative; line-height: var(--lh-4); }
.rs-info-box__list li::before { content: '·'; position: absolute; left: 0; font-weight: bold; color: var(--theme-color-info); }

/* ── Location pill (shown river) ─────────────────── */
.rs-river-pill {
  display: flex; align-items: center; gap: var(--sp-1);
  background: var(--theme-color-primary-lightest); border: 1px solid var(--theme-color-primary-light);
  border-radius: var(--radius-pill); padding: var(--sp-05) var(--sp-105);
  font-size: var(--fs-3); color: var(--theme-color-primary-dark); font-weight: var(--fw-semibold);
  margin-top: var(--sp-1);
}

/* ── Divider label ───────────────────────────────── */
.rs-section-label {
  font-size: 11px; font-weight: var(--fw-bold); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--fg3); margin: var(--sp-3) 0 var(--sp-105);
  display: flex; align-items: center; gap: var(--sp-1);
}
.rs-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

/* ── Header info / about button ──────────────────── */
.rs-header__info {
  margin-left: auto; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: none; border: none; cursor: pointer;
  color: var(--uswds-white); font-size: 18px; font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
}
.rs-header__info:hover { background: rgba(255,255,255,0.15); }
.rs-header__info:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }

/* ── Welcome / story intro ───────────────────────── */
.rs-intro { padding: 0; }
.rs-intro-panel {
  flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
  position: relative;
}
.rs-intro-panel--dark { background: var(--theme-color-primary-darker); color: var(--uswds-white); }
.rs-intro-panel--dark .rs-intro-title { color: #cfe8ff; }
.rs-intro-panel--light { background: var(--uswds-white); color: var(--fg1); }
.rs-intro-back {
  position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 2;
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: inherit; padding: var(--sp-1);
}
.rs-intro-back:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.rs-intro-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: var(--sp-8) var(--sp-4) var(--sp-4); text-align: center;
}
.rs-intro-icon { margin: 0 auto var(--sp-3); display: flex; justify-content: center; }
.rs-intro-eyebrow {
  font-size: 11px; font-weight: var(--fw-bold); text-transform: uppercase;
  letter-spacing: 0.1em; margin: 0 0 var(--sp-1); opacity: 0.85;
  color: var(--brand-accent);
}
.rs-intro-title {
  font-family: var(--font-serif); font-size: var(--fs-11); font-weight: var(--fw-bold);
  line-height: 1.15; margin: 0 0 var(--sp-2);
}
.rs-intro-title--dark { color: var(--fg1); }
.rs-intro-text { font-size: var(--fs-5); line-height: var(--lh-5); max-width: 320px; margin: 0 auto; opacity: 0.92; }
.rs-intro-steps { display: flex; flex-direction: column; gap: var(--sp-3); text-align: left; max-width: 320px; margin: var(--sp-2) auto 0; }
.rs-intro-step { display: flex; gap: var(--sp-2); align-items: flex-start; }
.rs-intro-panel--light .rs-intro-eyebrow { color: var(--brand-accent-dark); }
.rs-intro-step__num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-accent-lighter); color: var(--brand-accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: var(--fw-bold); font-size: var(--fs-5);
}
.rs-intro-step__title { font-size: var(--fs-5); font-weight: var(--fw-bold); color: var(--fg1); margin: 0 0 2px; }
.rs-intro-step__desc { font-size: var(--fs-3); color: var(--fg2); margin: 0; }
.rs-intro-footer { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.rs-intro-dots { display: flex; justify-content: center; gap: var(--sp-1); margin-bottom: var(--sp-2); }
.rs-intro-dot { width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; background: rgba(255,255,255,0.35); cursor: pointer; }
.rs-intro-dot--active { background: var(--brand-accent); width: 20px; border-radius: var(--radius-pill); }
.rs-intro-panel--light .rs-intro-dot { background: var(--border-default); }
.rs-intro-panel--light .rs-intro-dot--active { background: var(--brand-accent-dark); }
.rs-intro-cta--light { background: var(--uswds-white); color: var(--theme-color-primary-darker); border-color: var(--uswds-white); }
.rs-intro-cta--light:hover { background: var(--theme-color-primary-lightest); }
