/* Running Pace & Split Times Calculator — content styles. Prefix: --rp- */

:root {
  --rp-surface: #ffffff;
  --rp-panel:   #faf8f7;
  --rp-line:    #ebe5e4;
  --rp-text:    #1f191a;
  --rp-muted:   #6e6263;
  --rp-brand:   #8c2f39;
  --rp-ok:      #1b7340;
  --rp-warn:    #b45309;
}

.rp-main {
  padding-block: 1.5rem 3rem;
}

.rp-wrap {
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.rp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 48rem) {
  .rp-grid {
    grid-template-columns: 1fr;
  }
}

.rp-panel {
  background: var(--rp-panel);
  border: 1px solid var(--rp-line);
  border-radius: 2px;
  padding: 1.25rem;
}

.rp-section-title {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rp-muted);
  margin: 0 0 1rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rp-line);
}

.rp-field {
  margin-bottom: 0.85rem;
}

.rp-field label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--rp-text);
  margin-bottom: 0.35rem;
}

.rp-field select,
.rp-field input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--rp-text);
  background: var(--rp-surface);
  border: 1px solid var(--rp-line);
  border-radius: 2px;
  box-sizing: border-box;
}

.rp-field select:focus,
.rp-field input[type="number"]:focus {
  outline: none;
  border-color: var(--tf-accent);
}

.rp-input-group {
  display: flex;
  gap: 0.5rem;
}

.rp-input-group input {
  flex: 1;
}

.rp-input-group select {
  width: auto;
  min-width: 5.5rem;
}

.rp-time-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rp-time-cell {
  position: relative;
  flex: 1;
}

.rp-time-cell input {
  width: 100%;
  padding: 0.55rem 1.75rem 0.55rem 0.55rem;
  font-family: inherit;
  font-size: 0.925rem;
  font-variant-numeric: tabular-nums;
  color: var(--rp-text);
  background: var(--rp-surface);
  border: 1px solid var(--rp-line);
  border-radius: 2px;
  box-sizing: border-box;
}

.rp-time-cell input:focus {
  outline: none;
  border-color: var(--tf-accent);
}

.rp-time-unit {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--rp-muted);
  pointer-events: none;
}

.rp-time-colon {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rp-muted);
}

.rp-action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.rp-btn-primary {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--tf-accent);
  color: #ffffff;
  border: none;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.rp-btn-primary:hover {
  background: var(--tf-accent-hover);
}

.rp-btn-ghost {
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--rp-muted);
  border: 1px solid var(--rp-line);
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.rp-btn-ghost:hover {
  color: var(--rp-text);
  background: var(--rp-panel);
}

/* Results section */
.rp-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rp-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 32rem) {
  .rp-hero-grid {
    grid-template-columns: 1fr;
  }
}

.rp-hero-card {
  background: var(--rp-surface);
  border: 1px solid var(--rp-line);
  border-radius: 2px;
  padding: 1.15rem;
}

.rp-hero-primary {
  border-top: 3px solid var(--tf-accent);
}

.rp-hero-secondary {
  border-top: 3px solid var(--rp-muted);
}

.rp-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.rp-hero-label {
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rp-muted);
}

.rp-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  background: color-mix(in srgb, var(--tf-accent) 15%, transparent);
  color: var(--tf-accent);
  border: 1px solid color-mix(in srgb, var(--tf-accent) 30%, transparent);
}

.rp-hero-val {
  font-size: 2.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--rp-text);
  margin-bottom: 0.35rem;
}

.rp-hero-sub {
  font-size: 0.75rem;
  color: var(--rp-muted);
  line-height: 1.35;
}

.rp-equivalents-card {
  background: var(--rp-panel);
  border: 1px solid var(--rp-line);
  border-radius: 2px;
  padding: 1rem;
}

.rp-card-title {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rp-muted);
  margin: 0 0 0.65rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rp-line);
}

.rp-spec-table {
  display: flex;
  flex-direction: column;
}

.rp-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.775rem;
  padding: 0.35rem 0;
  color: var(--rp-muted);
}

.rp-spec-row strong {
  font-weight: 600;
  color: var(--rp-text);
  font-variant-numeric: tabular-nums;
}

.rp-splits-details {
  background: var(--rp-surface);
  border: 1px solid var(--rp-line);
  border-radius: 2px;
  padding: 0.75rem 1rem;
}

.rp-splits-details summary {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--rp-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.rp-splits-body {
  margin-top: 0.75rem;
}

.rp-splits-table-wrap {
  overflow-x: auto;
}

.rp-splits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.775rem;
}

.rp-splits-table th {
  text-align: left;
  padding: 0.4rem 0.5rem;
  background: var(--rp-panel);
  border-bottom: 1px solid var(--rp-line);
  font-weight: 700;
  color: var(--rp-muted);
  font-size: 0.725rem;
  text-transform: uppercase;
}

.rp-splits-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--rp-line);
  color: var(--rp-text);
  font-variant-numeric: tabular-nums;
}

.rp-splits-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
}

.rp-ad {
  overflow: hidden;
  min-height: 280px;
  margin: 2rem auto;
  text-align: center;
}

/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --rp-surface: var(--tf-surface);
  --rp-panel: var(--tf-surface);
  --rp-line: var(--tf-surface);
  --rp-text: var(--tf-ink);
  --rp-muted: var(--tf-ink-soft);
  --rp-brand: #d48089;
  --rp-ok: #59cf8b;
  --rp-warn: #d9a57d;
}
