/* Shared styles for pace tools, printable pace charts, and the race time predictor
   (build_tools.py, build_pace_pages.py, build_predictor.py). Loaded after site.css. */
.page-hero { min-height: 0; }
.page-hero picture img { object-position: 65% 28%; }
.page-hero .band-inner { gap: 10px; padding-block: calc(var(--nav-h) + 22px) 20px; }
.page-hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.wrap.tool { padding-top: clamp(20px, 3vw, 32px); }
.tool { grid-template-columns: minmax(0, 1fr); }
.tool .module { min-width: 0; }
.tool .predict .bigtime small { font-size: 0.35em; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.tool .result .stats .v { font-size: var(--step-2); }
.tool .plan-form { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: end; }
.tool .plan-form .p-race-field { flex: 1 1 100%; }
.tool .plan-form .field { min-width: 0; }
.tool .plan-form .seg { justify-self: start; max-width: 100%; overflow-x: auto; }
.tool .plan-form .seg button { white-space: nowrap; }
.tool .plan-form #p-error { flex: 1 1 100%; }
.tool #p-race { width: 100%; font-family: var(--font-body); }
.tool #p-out { min-width: 0; display: grid; gap: 14px; }
.tool #p-out > * { min-width: 0; }
.tool #p-stats { margin: 6px 0 0; }
.tool #p-profile .area { fill: rgba(79, 216, 154, 0.16); stroke: none; }
.tool #p-profile .line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.tool #p-profile .tick { stroke: var(--line); }
.tool #p-profile text { fill: var(--muted); font-size: 11px; font-family: var(--font-data); }
.tool #p-profile text.t { fill: var(--ink); }

.tool table.splits td b { font-weight: 650; }
.tool .print-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tool .linklist { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tool .linklist a { display: inline-flex; align-items: center; border: 1px solid var(--glass-border); border-radius: 999px; padding: 6px 13px; font-size: 0.88rem; text-decoration: none; color: var(--ink); }
.tool .linklist a:hover { border-color: rgba(79, 216, 154, 0.45); color: var(--accent-ink); }
.tool .linklist a[aria-current="page"] { background: rgba(255, 255, 255, 0.92); color: #0b1410; }
.tool .toolcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: clamp(12px, 1.1vw, 18px); }
.tool .toolcard { display: grid; gap: 6px; height: 100%; text-decoration: none; color: var(--ink); }
.tool .toolcard b { font-family: var(--font-display); font-size: 1.1rem; }
.tool .toolcard span { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.tool .toolcard:hover b { color: var(--accent-ink); }
.tool h3, .tool .module h3 { margin: 18px 0 8px; }
.tool .faq-item h3 { margin: 0 0 4px; }
.tool .answer { font-size: 1.15rem; line-height: 1.5; }
.tool .courses td:first-child a { font-weight: 600; }
.tool .r-head { margin-top: 18px; }
.tool #ag-pct { font-variant-numeric: tabular-nums; }
.tool #r-note { margin-top: 8px; }

@media (max-width: 760px) {
  .page-hero .band-inner { padding-block: calc(var(--nav-h) + 18px) 18px; }
  .tool .predict { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) {
  .tool .linklist a { min-height: 44px; display: inline-flex; align-items: center; }
  .tool .race-quick-chips button { min-height: 44px; padding-inline: 14px; }
  .tool .split-link { min-height: 38px; padding-inline: 11px; }
}

/* Calculator UX enhancements (pace calculator + race time predictor) */
.tool .plan-form:has(.stepper-wrap) { align-items: start; }
.tool .field:has(> .stepper-wrap) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-content: start;
  justify-items: start;
}
.tool .field:has(> .stepper-wrap) > .stepper-wrap { width: min(100%, 15.5rem); }
.tool .field:has(> .stepper-wrap) > .preset-row { width: 100%; }
.tool .field:has(> .stepper-wrap) > .input-err { margin-top: 0; }
.tool [role="alert"].hint:not(:empty) { color: #ff9e8a; font-weight: 500; }

.tool .race-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tool .wx-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
  margin: 0;
}
.tool .wx-cards > *,
.tool .wx-card {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 8px 20px rgba(0, 0, 0, 0.22);
  min-width: 0;
}
.tool .wx-cards .eyebrow { font-size: 0.68rem; color: var(--muted); }
.tool .wx-cards .v,
.tool .wx-cards b {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tool .wx-cards .s,
.tool .wx-cards span:not(.eyebrow):not(.v) {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}
.tool .wx-cards .warn .v,
.tool .wx-cards .warn b { color: var(--heat); }
.tool .wx-cards .good .v,
.tool .wx-cards .good b { color: var(--accent-ink); }

.tool .age-group {
  display: grid;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}
.tool .age-group > .eyebrow,
.tool .age-group > .lbl {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.tool .r-headline {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.tool .r-headline .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: 10px;
}
.tool .r-headline .stat {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  min-width: 0;
}
.tool .r-headline .eyebrow { font-size: 0.68rem; color: var(--muted); }
.tool .r-headline .v,
.tool .r-headline b {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tool .r-headline .s,
.tool .r-headline small {
  font-family: var(--font-data);
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tool .r-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(79, 216, 154, 0.4);
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}
.tool #r-table tbody tr:has(.r-tag) { background: rgba(79, 216, 154, 0.06); }
.tool .r-same-note {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 6px;
  max-width: 68ch;
}
.tool .split-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.tool .split-link:hover {
  background: var(--accent-wash);
  border-color: rgba(79, 216, 154, 0.45);
}
.tool .predict { gap: clamp(16px, 1.6vw, 28px); }
@media (min-width: 1600px) {
  .tool .predict { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
  .tool .toolcards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
}
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000 !important; }
  .topbar, .site-foot, .page-hero picture, .noprint, .crumbs { display: none !important; }
  .page-hero { min-height: 0 !important; padding: 0 !important; background: none !important; }
  .page-hero h1, .page-hero p { color: #000 !important; text-shadow: none !important; }
  .tool .module { margin-top: 10px; break-inside: auto; }
  .tool .table-wrap, .tool .panel { background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; }
  .tool table { font-size: 10pt; color: #000; }
  .tool table th, .tool table td { color: #000 !important; border-bottom: 1px solid #ccc; padding: 2px 6px; }
  .tool tr { break-inside: avoid; }
  a { color: #000 !important; text-decoration: none; }
}
