/* Navy + emerald theme layer. Loaded after styles.css; removing this file's
   <link> restores the previous look. Layout rules stay in styles.css. */
:root {
  --ink: #0b192c;
  --paper: #f8fafc;
  --lime: #10b981;            /* on navy, or behind navy text */
  --emerald: #059669;         /* fills and borders */
  --emerald-text: #047857;    /* small text on light surfaces (AA) */
  --mint: #ecfdf5;
  --mint-line: #a7f3d0;
  --green-wash: #ecfdf5;
  --orange: #059669;
  --orange-text: #047857;
  --line: #cbd5e1;
  --hairline: #e2e8f0;
  --muted: #475569;
  --surface: #ffffff;
  --radius: 16px;
  --radius-small: 12px;
  --shadow: 0 1px 2px rgba(11, 25, 44, .05);
}

body { background: var(--paper); -webkit-font-smoothing: antialiased; }
.noise { display: none; }
::selection { background: var(--emerald); color: #fff; }

/* Top strip and sticky header */
.top-strip { max-width: 1240px; margin-inline: auto; padding: 8px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; background: var(--ink); color: #cbd5e1; font-size: 11px; line-height: 1.5; box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); }
.top-strip b { display: inline-flex; align-items: center; gap: 7px; padding: 2px 9px; border-radius: 5px; background: rgba(5, 150, 105, .2); color: var(--lime); font: 500 11px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.top-strip b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.standalone-mode .top-strip { display: none; }
.site-header { position: sticky; top: 0; z-index: 30; height: 68px; background: var(--surface); border-bottom: 0; box-shadow: 0 0 0 100vmax var(--surface), 0 1px 0 100vmax var(--hairline); clip-path: inset(0 -100vmax -1px); }
.brand { font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; font-size: 18px; }
.brand-mark { border-radius: var(--radius-small); }
.brand em { padding: 3px 9px; border: 1px solid var(--mint-line); border-radius: 7px; background: var(--mint); color: var(--emerald-text); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.text-button { border-color: var(--hairline); border-radius: var(--radius-small); background: var(--surface); }
.status span { background: var(--lime); box-shadow: 0 0 0 4px rgba(16, 185, 129, .16); }

/* Typography */
h1 { max-width: 880px; font-size: clamp(34px, 5vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -.035em; }
.hero { padding: 44px 0 34px; align-items: end; }
.hero-copy, .section-title > p { max-width: 430px; }
.eyebrow { color: var(--emerald-text); font-weight: 500; }
.hero .eyebrow, .lab-hero .eyebrow, .editorial-header .eyebrow, .run-spots-header .eyebrow, .build-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--mint-line); border-radius: 999px; background: var(--mint); letter-spacing: .08em;
}
.eyebrow .lab-status { margin: 0; padding: 0 0 0 10px; border-left: 1px solid var(--mint-line); color: inherit; }
.lab-status { border-left-color: var(--emerald); }
.lab-hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; }
.lab-deck { font-size: clamp(19px, 2.4vw, 25px); }
.section-kicker h2, .run-location-search h2, .lab-connections h2 { letter-spacing: -.035em; }

/* Navigation as a pill bar */
@media (min-width: 761px) {
  .tabs { display: inline-flex; gap: 4px; margin-top: 20px; padding: 4px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
  .tab { padding: 9px 14px; border-radius: 10px; font-size: 12.5px; }
  .tab:hover { color: var(--ink); background: var(--paper); }
  .tab.active { background: var(--ink); color: #fff; }
  .tab.active svg { color: var(--lime); }
}
.tab.active::after { display: none; }
@media (max-width: 760px) {
  .tab.active { color: var(--ink); }
  .tab.active svg { color: var(--emerald); }
  .tab.active::after { display: block; background: var(--emerald); border-radius: 3px 3px 0 0; }
}

/* Surfaces: white, rounded, hairline border */
.card, .availability-column, .race-strategy, .lab-check-fields, .lab-check-results, .lab-pace-grid article, .lab-roadmap-card,
.weekly-card, .run-match-controls, .run-spot-card, .together-filters,
.race-course-controls, .race-hill-options {
  border-color: var(--hairline); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.result-card, .weekly-lead, .run-plan-context, .newsletter-card, .together-safety, .lab-boundary {
  border-radius: var(--radius);
}
.result-card { border-color: var(--ink); background: var(--ink); box-shadow: 0 10px 30px -18px rgba(11, 25, 44, .6); }
.building-teaser, .building-link-card, .runner-saved, .race-course-context, .lab-caution, .quick-takeaway { border-radius: var(--radius); }
.runner-saved, .lab-caution, .race-course-context { background: var(--mint); }
.lab-introduction, .lab-section { border-bottom-color: var(--hairline); }
.run-plan-context strong, .weekly-lead .eyebrow { color: var(--lime); }
.card-heading > span { border-color: var(--mint-line); background: var(--mint); color: var(--emerald-text); }
.result-card .card-heading > span { border-color: rgba(16, 185, 129, .5); background: rgba(5, 150, 105, .2); color: var(--lime); }

/* Controls */
main button, main select, main textarea, main input:not([type=checkbox]):not([type=radio]):not([type=range]),
dialog button, dialog input { border-radius: var(--radius-small); }
.distance-options span, .strategy-options span, .run-filter-chips span, .filter-chip { border-radius: var(--radius-small); }
.distance-options span { border-color: var(--hairline); background: var(--paper); }
.distance-options input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.lab-digital input, .lab-digital textarea, #runner-workspace input, #runner-workspace select { border-color: var(--line); background: var(--paper); }
.lab-digital input:focus, .lab-digital textarea:focus, #runner-workspace input:focus, #runner-workspace select:focus { border-color: var(--ink); background: var(--surface); outline: 2px solid rgba(5, 150, 105, .35); outline-offset: 1px; }
.lab-check-actions button, .runner-button, #runner-workspace button, .race-export-actions button { color: #fff; }
.lab-check-actions button[type=reset] { color: var(--ink); background: var(--surface); }
.lab-check-actions button:not([type=reset]):not(:disabled):hover, .runner-button:hover, #runner-workspace button:not(:disabled):hover { background: #16263d; }
.run-quick-starts button { border-color: var(--hairline); background: var(--surface); }
.run-quick-starts button:hover, .run-quick-starts button:focus-visible { border-color: var(--ink); background: var(--ink); color: #fff; }
.arrow-link { border-color: var(--emerald); }

/* Tables */
.lab-table-wrap th, .lab-table-wrap td { border-bottom-color: var(--hairline); }
.lab-table-wrap, .race-table-wrap { border-radius: var(--radius-small); }

/* Footer */
footer { border-top-color: var(--hairline); }

@media (max-width: 760px) {
  .top-strip { padding: 7px 16px; }
  .top-strip span:last-child { display: none; }
  .site-header { height: 62px; }
  .hero { padding: 26px 0 22px; }
}
@media print { .top-strip { display: none; } .site-header { position: static; } }

/* Homepage heading follows the calmer editorial scale */
.hero-compact h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.1; }
@media (max-width: 760px) { .hero-compact h1 { font-size: clamp(30px, 8.6vw, 40px); } }
.building-teaser, .building-link-card { border: 1px solid var(--hairline); background: var(--surface); box-shadow: var(--shadow); }

/* Page headers share one scale; label pills hug their text */
.editorial-header h1, .run-spots-header h1, .build-hero h1, .together-hero h1, .article-header h1, .privacy-page h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.06; letter-spacing: -.04em; }
.hero .eyebrow, .lab-hero .eyebrow, .editorial-header .eyebrow, .run-spots-header .eyebrow, .build-hero .eyebrow { width: fit-content; justify-self: start; }
.latest-article { border-radius: var(--radius); overflow: hidden; }
.runner-grid .lab-check-fields, .lab-optional .lab-check-fields { border-radius: 0; background: transparent; box-shadow: none; }
.run-match-controls input, .run-match-controls select, .run-location-search input, .run-custom-minimum input { border-radius: var(--radius-small); }
.build-hero { min-height: 0; padding-top: 56px; }
.together-filters select, .together-filters input, .together-dialog select, .together-dialog input, .together-dialog textarea { border-radius: var(--radius-small); }
.together-empty { border-radius: var(--radius); }

/* Phones: keep the planner close to the top */
@media (max-width: 760px) {
  .top-strip { display: none; }
  .hero-compact { padding: 14px 0 12px; }
  .hero-compact .eyebrow { margin-bottom: 6px; padding: 3px 10px; }
}
