/* nyrr.css — NYRR 9+1 Coach (web). Self-contained; class-namespaced (.nyrr-*).
   Light-themed to match the app's dashboard. */
:root {
  --nyrr-teal: #0d9488; --nyrr-teal-deep: #0a544e; --nyrr-teal-soft: #dcf0ed;
  --nyrr-amber: #c47d16; --nyrr-amber-soft: #fbeed5; --nyrr-coral: #d1534f;
  --nyrr-surface: #ffffff; --nyrr-bg: #f5f8f7;
  --nyrr-ink: #12201d; --nyrr-ink2: #5c6b66; --nyrr-ink3: #8a968f;
  --nyrr-line: #e6ecea;
  --nyrr-shadow: 0 1px 2px rgba(16,32,28,.05), 0 10px 26px rgba(16,32,28,.08);
}

/* ── dashboard offer card ─────────────────────────────────────────────────── */
.nyrr-offer {
  display: block; position: relative; overflow: hidden; cursor: pointer;
  background: linear-gradient(158deg, #0f766e, #0b5c55); color: #fff;
  border-radius: 18px; padding: 17px 16px 16px; margin: 12px 0;
  box-shadow: 0 10px 24px rgba(11,92,85,.3); border: 0; width: 100%; text-align: left;
}
.nyrr-offer:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nyrr-offer-medal {
  color: #0d9488; position: absolute; right: -8px; top: -8px; font-size: 76px; opacity: .13; transform: rotate(12deg); }
.nyrr-offer-eye { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: #8fe9de; font-weight: 700; margin-bottom: 8px; }
.nyrr-offer-h { font-size: 1.14rem; font-weight: 750; margin: 0 0 6px; line-height: 1.2; }
.nyrr-offer-p { font-size: .86rem; line-height: 1.45; color: #d7f0ec; margin: 0 0 14px; max-width: 46ch; }
.nyrr-offer-cta { display: inline-flex; align-items: center; background: #fff; color: #0b5c55; font-weight: 700; font-size: .88rem; padding: 10px 16px; border-radius: 11px; }

/* ── dashboard progress card (connected) ──────────────────────────────────── */
.nyrr-prog {
  display: block; cursor: pointer; width: 100%; text-align: left; border: 0;
  background: linear-gradient(160deg, #0f766e, #0a544e); color: #fff;
  border-radius: 18px; padding: 15px 16px; margin: 12px 0; box-shadow: 0 10px 24px rgba(10,84,78,.3);
}
.nyrr-prog:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nyrr-prog-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 11px; }
.nyrr-prog-titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nyrr-prog-title { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; color: #fff; }
.nyrr-prog-eye { font-size: .72rem; font-weight: 600; color: #a7ded8; }
.nyrr-prog-num { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.nyrr-prog-num span { font-size: .8rem; font-weight: 600; color: #a7ded8; }
.nyrr-prog-nudge { font-size: .74rem; color: #d7f0ec; background: rgba(255,255,255,.1); border-radius: 8px; padding: 6px 10px; margin: 9px 0; }
.nyrr-prog-nudge.light { color: var(--nyrr-teal-deep); background: var(--nyrr-teal-soft); }
.nyrr-prog-foot { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: #cfeae6; margin-top: 9px; }
.nyrr-prog-open { font-weight: 700; color: #fff; }

/* segmented 9-bar */
.nyrr-seg { display: flex; gap: 3px; margin: 4px 0 2px; }
.nyrr-seg i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.22); }
.nyrr-seg i.on { background: #5ee0d1; }
.nyrr-seg i.maybe { background: rgba(94,224,209,.42); }
.nyrr-season .nyrr-seg i { background: var(--nyrr-line); }
.nyrr-season .nyrr-seg i.on { background: var(--nyrr-teal); }
.nyrr-season .nyrr-seg i.maybe { background: rgba(13,148,136,.38); }

/* ── overlay / modal ──────────────────────────────────────────────────────── */
.nyrr-overlay {
  position: fixed; inset: 0; z-index: 4000; background: rgba(9,20,17,.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .16s ease; padding: 16px;
}
.nyrr-overlay.open { opacity: 1; }
.nyrr-modal {
  position: relative; background: var(--nyrr-bg); color: var(--nyrr-ink);
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  border-radius: 20px; box-shadow: 0 24px 60px rgba(8,20,17,.4);
  -webkit-overflow-scrolling: touch;
}
.nyrr-modal-body { padding: 22px 20px 24px; }
.nyrr-x {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 30px; height: 30px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.06); color: var(--nyrr-ink2);
  font-size: .9rem; cursor: pointer; display: grid; place-items: center;
}
@media (max-width: 520px) {
  .nyrr-overlay { align-items: flex-end; padding: 0; }
  .nyrr-modal { max-width: none; max-height: 92vh; border-radius: 20px 20px 0 0; }
}

/* ── steps / typography ───────────────────────────────────────────────────── */
.nyrr-eyebrow { font-size: .66rem; letter-spacing: .09em; text-transform: uppercase; color: var(--nyrr-teal); font-weight: 700; margin-bottom: 8px; }
.nyrr-h2 { font-size: 1.35rem; font-weight: 780; letter-spacing: -.02em; margin: 0 0 6px; line-height: 1.15; }
.nyrr-sub { font-size: .9rem; color: var(--nyrr-ink2); margin: 0 0 16px; line-height: 1.45; }
.nyrr-sub b { color: var(--nyrr-ink); font-weight: 700; }
.nyrr-note { font-size: .78rem; color: var(--nyrr-ink3); line-height: 1.45; margin: 14px 0; padding: 11px 12px; background: var(--nyrr-surface); border-radius: 10px; }

/* buttons + input */
.nyrr-btn { background: var(--nyrr-teal); color: #fff; border: 0; font-weight: 700; font-size: .88rem; padding: 11px 16px; border-radius: 11px; cursor: pointer; }
.nyrr-btn.primary { background: var(--nyrr-teal); }
.nyrr-btn.ghost { background: transparent; color: var(--nyrr-teal); border: 1.5px solid var(--nyrr-line); }
.nyrr-btn.block { display: block; width: 100%; margin-top: 6px; }
.nyrr-btn:disabled { opacity: .6; cursor: default; }
.nyrr-input { flex: 1; min-width: 0; border: 1.5px solid var(--nyrr-line); border-radius: 11px; padding: 11px 12px; font-size: .9rem; color: var(--nyrr-ink); background: var(--nyrr-surface); }
.nyrr-input:focus { outline: none; border-color: var(--nyrr-teal); }
.nyrr-search { display: flex; gap: 8px; margin-bottom: 14px; }

/* matches */
.nyrr-matches { display: flex; flex-direction: column; gap: 8px; }
.nyrr-match { display: flex; align-items: center; gap: 10px; background: var(--nyrr-surface); border-radius: 12px; box-shadow: var(--nyrr-shadow); padding: 11px 12px; }
.nyrr-match-info { flex: 1; min-width: 0; }
.nyrr-match-info b { font-size: .9rem; font-weight: 700; display: block; }
.nyrr-match-info small { font-size: .74rem; color: var(--nyrr-ink3); }
.nyrr-pick { flex: none; background: var(--nyrr-teal); color: #fff; border: 0; font-size: .76rem; font-weight: 700; padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.nyrr-loading, .nyrr-empty { font-size: .88rem; color: var(--nyrr-ink2); text-align: center; padding: 18px 8px; }
.nyrr-loading-lg { padding: 40px 8px; }

/* confirm blocks */
.nyrr-confirm-block { background: var(--nyrr-surface); border-radius: 12px; box-shadow: var(--nyrr-shadow); padding: 13px; margin-bottom: 10px; }
.nyrr-cb-q { font-size: .84rem; font-weight: 680; margin-bottom: 4px; }
.nyrr-cb-sub { font-size: .74rem; color: var(--nyrr-ink3); margin-bottom: 10px; line-height: 1.4; }
.nyrr-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; background: var(--nyrr-bg); margin-bottom: 6px; }
.nyrr-toggle:last-child { margin-bottom: 0; }
.nyrr-toggle-n { font-size: .82rem; font-weight: 600; }
.nyrr-toggle-n small { display: block; font-weight: 400; color: var(--nyrr-ink3); font-size: .7rem; }
.nyrr-chk { width: 20px; height: 20px; accent-color: var(--nyrr-teal); flex: none; }
.nyrr-credit-add { display: flex; gap: 8px; }
.nyrr-credit-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nyrr-credit-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--nyrr-teal-soft); color: var(--nyrr-teal-deep); font-size: .76rem; font-weight: 600; padding: 5px 9px; border-radius: 16px; }
.nyrr-credit-chip button { border: 0; background: none; color: var(--nyrr-teal-deep); cursor: pointer; font-size: .8rem; }

/* season view */
.nyrr-season-head { background: linear-gradient(160deg, #0f766e, #0a544e); color: #fff; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.nyrr-big { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.nyrr-big span { font-size: .95rem; font-weight: 600; color: #a7ded8; }
.nyrr-season-head .nyrr-seg { margin: 12px 0; }
.nyrr-season-head .nyrr-seg i { background: rgba(255,255,255,.2); }
.nyrr-season-head .nyrr-seg i.on { background: #5ee0d1; }
.nyrr-season-head .nyrr-seg i.maybe { background: rgba(94,224,209,.42); }
.nyrr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.nyrr-chip { font-size: .66rem; font-weight: 600; padding: 5px 9px; border-radius: 16px; background: rgba(255,255,255,.14); color: #eafcf9; }
.nyrr-chip.warn { background: rgba(255,214,148,.22); color: #ffe4b0; }
.nyrr-chip.urge { background: rgba(255,170,165,.2); color: #ffd2cf; }
.nyrr-chip.ok { background: rgba(94,224,209,.24); color: #d6fff8; }
.nyrr-official { font-size: .78rem; color: var(--nyrr-ink2); margin-bottom: 14px; line-height: 1.4; }
.nyrr-official a { color: var(--nyrr-teal); font-weight: 600; }
.nyrr-deck-lbl { font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; color: var(--nyrr-ink3); font-weight: 700; margin: 14px 2px 8px; }
.nyrr-race { background: var(--nyrr-surface); border-radius: 12px; box-shadow: var(--nyrr-shadow); margin-bottom: 8px; overflow: hidden; }
/* 2-column race deck on wider viewports; cards self-manage their own margin inside a flow list, so zero it out inside the grid */
.nyrr-race-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; margin-bottom: 4px; }
.nyrr-race-grid .nyrr-race { margin-bottom: 0; }
@media (max-width: 640px) { .nyrr-race-grid { grid-template-columns: 1fr; } }
.nyrr-race-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.nyrr-race-head[role="button"] { cursor: pointer; }
.nyrr-race-chev { color: var(--nyrr-ink3); font-size: .8rem; flex: none; }
.nyrr-race-body { border-top: 1px solid var(--nyrr-line); padding: 10px 12px; }
.nyrr-course-row { font-size: .78rem; line-height: 1.45; color: var(--nyrr-ink2); margin-bottom: 8px; }
.nyrr-course-row:last-child { margin-bottom: 0; }
.nyrr-course-row b { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--nyrr-ink3); font-weight: 700; margin-bottom: 2px; }
.nyrr-course-row.strat { color: #124a44; }
.nyrr-course-row.strat b { color: var(--nyrr-teal); }
.nyrr-race-m { flex: 1; min-width: 0; }
.nyrr-race-m b { font-size: .86rem; font-weight: 700; display: block; }
.nyrr-race-m small { font-size: .72rem; color: var(--nyrr-ink3); }
.nyrr-race-tag { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 16px; white-space: nowrap; }
.nyrr-race.qualifier .nyrr-race-tag { background: var(--nyrr-teal-soft); color: var(--nyrr-teal); }
.nyrr-race.credit .nyrr-race-tag { background: #e4edfa; color: #3a72c4; }
.nyrr-race.virtual_upgradeable .nyrr-race-tag { background: var(--nyrr-amber-soft); color: var(--nyrr-amber); }
.nyrr-season-actions { display: flex; gap: 10px; margin-top: 16px; }
.nyrr-season-actions .nyrr-btn { flex: 1; }

/* NYRR agent — season coaching read */
.nyrr-coaching:empty { display: none; }
.nyrr-coaching { background: var(--nyrr-teal-soft); border-radius: 14px; padding: 13px 14px; margin-bottom: 14px; }
.nyrr-coach-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.nyrr-coach-av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(140deg,#12b5a6,#0b7d73); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .64rem; flex: none; }
.nyrr-coach-head b { font-size: .92rem; font-weight: 750; color: #0c4f49; line-height: 1.25; }
.nyrr-coach-narr { font-size: .84rem; line-height: 1.5; color: #124a44; margin: 0 0 8px; }
.nyrr-coach-next { font-size: .82rem; color: var(--nyrr-teal-deep); font-weight: 600; }
.nyrr-coach-next-l { display: inline-block; font-size: .62rem; text-transform: uppercase; letter-spacing: .07em; color: var(--nyrr-teal); font-weight: 700; margin-right: 7px; }

/* completed-race metrics grid + deterministic coach read (expandable body) */
.nyrr-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 8px; margin-bottom: 10px; }
.nyrr-metric { background: var(--nyrr-bg); border-radius: 9px; padding: 8px 6px; text-align: center; }
.nyrr-metric-v { display: block; font-size: .92rem; font-weight: 800; color: var(--nyrr-ink); letter-spacing: -.01em; }
.nyrr-metric-l { display: block; font-size: .58rem; text-transform: uppercase; letter-spacing: .05em; color: var(--nyrr-ink3); font-weight: 700; margin-top: 2px; }
.nyrr-analysis { background: var(--nyrr-teal-soft); border-radius: 10px; padding: 9px 11px; margin-bottom: 10px; }
.nyrr-analysis:last-child { margin-bottom: 0; }
.nyrr-analysis-hd { display: flex; align-items: center; gap: 6px; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nyrr-teal); font-weight: 700; margin-bottom: 5px; }
.nyrr-analysis-line { font-size: .82rem; line-height: 1.4; color: #124a44; font-weight: 600; }
.nyrr-analysis-line + .nyrr-analysis-line { margin-top: 3px; }
.nyrr-coach-av.sm { width: 17px; height: 17px; font-size: .5rem; }

/* upcoming — prediction + add-to-plan action row */
.nyrr-up-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 12px 11px; }
.nyrr-pred { display: flex; align-items: baseline; gap: 6px; font-size: .84rem; color: var(--nyrr-ink); }
.nyrr-pred b { font-weight: 800; color: var(--nyrr-teal-deep); }
.nyrr-pred-l { font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--nyrr-ink3); font-weight: 700; }
.nyrr-pred-c { font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--nyrr-ink3); font-weight: 600; background: var(--nyrr-bg); border-radius: 10px; padding: 1px 7px; }
.nyrr-addplan { margin-left: auto; flex: none; background: var(--nyrr-teal); color: #fff; border: 0; font-size: .74rem; font-weight: 700; padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.nyrr-addplan:disabled { opacity: .7; cursor: default; }
.nyrr-addplan.done { background: var(--nyrr-teal-soft); color: var(--nyrr-teal-deep); }

/* upcoming — calendar link (empty state) + per-race register link */
.nyrr-cal-link { display: inline-block; font-size: .84rem; font-weight: 600; color: var(--nyrr-teal); text-decoration: none; padding: 4px 2px; }
.nyrr-reg { flex: none; font-size: .72rem; font-weight: 700; color: var(--nyrr-teal); text-decoration: none; white-space: nowrap; }

/* ── the 9+1 VIEW (#viewNyrr) — a real screen, not a modal ─────────────────── */
#viewNyrr { overflow-y: auto; background: var(--nyrr-bg); -webkit-overflow-scrolling: touch; }
.nyrr-view { width: 100%; max-width: 960px; margin: 0 auto; padding: 16px 16px 72px; box-sizing: border-box; }
/* The in-view "‹ Dashboard" back button + duplicate <h1> were removed: this
   is a bottom-nav destination, and .top-nav already shows "NYRR 9+1 Tracker"
   on both web and native, so both were redundant chrome. Content now starts
   at .nyrr-view's own 16px top padding, matching the other screens. */
.nyrr-view .nyrr-h2 { font-size: 1.4rem; }
.nyrr-view .nyrr-loading-lg { padding: 64px 8px; }
.nyrr-match-last { display: block; margin-top: 2px; color: var(--nyrr-teal-deep); font-weight: 600; }

/* dashboard cards — a touch more premium */
.nyrr-offer, .nyrr-prog { border-radius: 20px; }
.nyrr-prog-num { font-variant-numeric: tabular-nums; }
.nyrr-offer:hover, .nyrr-prog:hover { transform: translateY(-1px); transition: transform .14s ease; }
.nyrr-prog-medal { position: absolute; right: -6px; top: -6px; font-size: 62px; opacity: .1; transform: rotate(12deg); }

/* ── C1 "Track and Train" card — desktop Recent-Activity slot only ─────────────
   Airy frosted look (design C1a). Fills the slot height; content centred; the
   Explore CTA is pinned to the bottom. Mounted by nyrr.js progressCardC1Html. */
.nyrr-c1 {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 100%; height: 100%; box-sizing: border-box; cursor: pointer;
  background: linear-gradient(160deg, #f3fdfb 0%, #e3f5ef 100%);
  border: 1px solid #d3ede5; border-radius: 22px; padding: 20px 16px;
  transition: transform .14s ease, box-shadow .14s ease;
}
.nyrr-c1:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(15,118,110,.10); }
.nyrr-c1:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.nyrr-c1-title { font-size: 27px; font-weight: 800; color: #0b3f39; letter-spacing: -.02em; line-height: 1; }
.nyrr-c1-tag { font-size: 13px; font-weight: 600; color: #0d9488; margin-top: 5px; }
.nyrr-c1-tiles { display: flex; width: 100%; gap: 11px; margin: 16px 0 12px; }
.nyrr-c1-tile {
  flex: 1; background: rgba(255,255,255,.72); border: 1px solid #d6ece5;
  border-radius: 14px; padding: 13px 6px; box-shadow: 0 2px 8px rgba(15,118,110,.05);
}
.nyrr-c1-num { font-size: 25px; font-weight: 800; color: #0f766e; line-height: 1; font-variant-numeric: tabular-nums; }
.nyrr-c1-num span { font-size: 12px; color: #93bfb7; font-weight: 700; }
.nyrr-c1-lbl { font-size: 10.5px; color: #5b8880; margin-top: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.nyrr-c1-race {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  background: rgba(255,255,255,.6); border: 1px solid #d6ece5;
  border-radius: 13px; padding: 10px 12px; margin-bottom: 14px;
}
.nyrr-c1-race-ic { color: #0d9488; flex: none; margin-top: 1px; }
.nyrr-c1-race-body { flex: 1; min-width: 0; }
.nyrr-c1-race-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.nyrr-c1-race-eye { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: #5b8880; font-weight: 700; }
/* Full-width name that wraps to at most two lines — long goal-race names
   ("NYRR Team Championships 5 Mile") must never truncate to "NYRR Team …". */
.nyrr-c1-race-name {
  font-size: 12.5px; font-weight: 700; color: #0b3f39; margin-top: 2px; line-height: 1.28;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nyrr-c1-race-when { font-size: 11.5px; font-weight: 700; color: #0f766e; white-space: nowrap; flex: none; }
/* "Your goal race" — a clear little tag under the name, not a cramped value. */
.nyrr-c1-race-goal {
  display: inline-block; margin-top: 5px; font-size: 10px; font-weight: 700; color: #0d9488;
  background: rgba(13,148,136,.10); border-radius: 6px; padding: 2px 7px; letter-spacing: .02em;
}
.nyrr-c1-cta {
  width: 100%; margin-top: auto; padding: 12px; box-sizing: border-box;
  background: #0d9488; color: #fff; font-size: 13px; font-weight: 700;
  border-radius: 999px; box-shadow: 0 6px 16px rgba(13,148,136,.28);
}
.nyrr-c1:hover .nyrr-c1-cta { background: #0b8177; }
