/* The Streak Method widget
 * All selectors are prefixed .rs- and live under .rs-root so this can be dropped
 * into any site without colliding with the host stylesheet.
 */

.rs-root {
  --rs-accent: #d8ff3e;
  --rs-accent-ink: #101208;
  --rs-ink: #14161a;
  --rs-ink-soft: #5b626e;
  --rs-ink-faint: #8d95a3;
  --rs-surface: #ffffff;
  --rs-surface-2: #f4f5f7;
  --rs-line: #e2e5ea;
  --rs-line-strong: #14161a;
  --rs-radius: 14px;
  --rs-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;

  font-family: var(--rs-font);
  color: var(--rs-ink);
  background: var(--rs-surface);
  border: 1px solid var(--rs-line);
  border-radius: var(--rs-radius);
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  box-sizing: border-box;
}

.rs-root *,
.rs-root *::before,
.rs-root *::after { box-sizing: border-box; }

@media (prefers-color-scheme: dark) {
  .rs-root:not([data-theme="light"]) {
    --rs-ink: #f2f4f7;
    --rs-ink-soft: #a5adba;
    --rs-ink-faint: #79818f;
    --rs-surface: #16181c;
    --rs-surface-2: #212429;
    --rs-line: #2f333a;
    --rs-line-strong: #f2f4f7;
  }
}

.rs-root[data-theme="dark"] {
  --rs-ink: #f2f4f7;
  --rs-ink-soft: #a5adba;
  --rs-ink-faint: #79818f;
  --rs-surface: #16181c;
  --rs-surface-2: #212429;
  --rs-line: #2f333a;
  --rs-line-strong: #f2f4f7;
}

/* --- progress ------------------------------------------------------------ */

.rs-progress {
  height: 3px;
  background: var(--rs-line);
  position: relative;
}
.rs-progress-bar {
  height: 100%;
  background: var(--rs-accent);
  width: 0;
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

.rs-body { padding: 26px 24px 28px; }

@media (max-width: 480px) {
  .rs-body { padding: 20px 16px 22px; }
}

/* --- typography ---------------------------------------------------------- */

.rs-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rs-ink-faint);
  margin: 0 0 8px;
}

.rs-h {
  font-size: 25px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}

.rs-sub {
  font-size: 15px;
  line-height: 1.5;
  color: var(--rs-ink-soft);
  margin: 0 0 22px;
}

.rs-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}

.rs-hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--rs-ink-faint);
  margin: 6px 0 0;
}

.rs-field { margin-bottom: 22px; }

/* --- option cards -------------------------------------------------------- */

.rs-options { display: grid; gap: 10px; }

.rs-option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid var(--rs-line);
  border-radius: 12px;
  background: var(--rs-surface);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color .15s, background .15s, transform .08s;
}
.rs-option:hover { border-color: var(--rs-ink-faint); }
.rs-option:active { transform: scale(.99); }
.rs-option[aria-pressed="true"] {
  border-color: var(--rs-line-strong);
  background: var(--rs-surface-2);
}
.rs-option:focus-visible {
  outline: 2px solid var(--rs-accent);
  outline-offset: 2px;
}

.rs-option-mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--rs-line);
  margin-top: 1px;
  position: relative;
}
.rs-option[aria-pressed="true"] .rs-option-mark {
  border-color: var(--rs-line-strong);
  background: var(--rs-accent);
}
/* A tick is a short wide box rotated -45deg. Taller than wide reads as a
 * chevron, which is why the box is sized explicitly rather than by inset. */
.rs-option[aria-pressed="true"] .rs-option-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--rs-accent-ink);
  border-bottom: 2px solid var(--rs-accent-ink);
  transform: rotate(-45deg);
}

.rs-option-title { display: block; font-size: 15px; font-weight: 650; line-height: 1.3; }
.rs-option-desc {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--rs-ink-soft);
  margin-top: 3px;
}

/* --- chips (numbers, minimums) ------------------------------------------- */

.rs-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Day counts read as a single row of equal cells rather than a ragged wrap. */
.rs-chips-days { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.rs-chips-days .rs-chip { min-width: 0; padding: 11px 2px; }

.rs-chip {
  flex: 1 1 auto;
  min-width: 46px;
  padding: 11px 8px;
  border: 1.5px solid var(--rs-line);
  border-radius: 10px;
  background: var(--rs-surface);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  color: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s;
}
.rs-chip:hover { border-color: var(--rs-ink-faint); }
.rs-chip[aria-pressed="true"] {
  background: var(--rs-accent);
  border-color: var(--rs-accent);
  color: var(--rs-accent-ink);
}
.rs-chip:focus-visible { outline: 2px solid var(--rs-accent); outline-offset: 2px; }
.rs-chip small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: .7;
  margin-top: 1px;
}

/* --- inputs -------------------------------------------------------------- */

.rs-input,
.rs-select {
  width: 100%;
  padding: 12px 13px;
  border: 1.5px solid var(--rs-line);
  border-radius: 10px;
  background: var(--rs-surface);
  color: var(--rs-ink);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming on focus */
  appearance: none;
  -webkit-appearance: none;
}
.rs-select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%238d95a3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px;
  padding-right: 34px;
}
.rs-input:focus,
.rs-select:focus {
  outline: none;
  border-color: var(--rs-line-strong);
}
.rs-input.rs-invalid { border-color: #e5484d; }

.rs-row { display: flex; gap: 10px; }
.rs-row > * { flex: 1; min-width: 0; }

/* Two text inputs side by side truncate their placeholders on a phone. */
@media (max-width: 460px) {
  .rs-row-stack { flex-direction: column; }
}

.rs-unit-toggle {
  display: inline-flex;
  border: 1.5px solid var(--rs-line);
  border-radius: 9px;
  overflow: hidden;
}
.rs-unit-toggle button {
  border: 0;
  background: var(--rs-surface);
  color: var(--rs-ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 7px 14px;
  cursor: pointer;
}
.rs-unit-toggle button[aria-pressed="true"] {
  background: var(--rs-line-strong);
  color: var(--rs-surface);
}

/* --- buttons ------------------------------------------------------------- */

.rs-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 26px;
}

.rs-btn {
  padding: 13px 22px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .08s;
}
.rs-btn:active { transform: scale(.98); }
.rs-btn:focus-visible { outline: 2px solid var(--rs-accent); outline-offset: 2px; }

.rs-btn-primary {
  background: var(--rs-line-strong);
  color: var(--rs-surface);
  flex: 1;
}
.rs-btn-primary:disabled { opacity: .35; cursor: not-allowed; }

.rs-btn-ghost {
  background: transparent;
  color: var(--rs-ink-soft);
  border-color: var(--rs-line);
  padding: 13px 16px;
}

.rs-btn-block { width: 100%; display: block; text-align: center; }

.rs-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--rs-ink-faint);
  text-decoration: underline;
  cursor: pointer;
}

/* --- plan preview -------------------------------------------------------- */

.rs-phase {
  border: 1.5px solid var(--rs-line);
  border-radius: 12px;
  padding: 16px 17px;
  margin-bottom: 12px;
  background: var(--rs-surface-2);
}
.rs-phase-tag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--rs-ink-faint);
  margin-bottom: 7px;
}
.rs-phase-h { font-size: 17px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
.rs-phase-p { font-size: 13.5px; line-height: 1.5; color: var(--rs-ink-soft); margin: 0; }

/* Phase 0: informational only, nothing scheduled yet - visually lighter than
   the real, scheduled phases so it doesn't read as "step 1 of the plan". */
.rs-phase-muted {
  background: transparent;
  border-style: dashed;
  opacity: .8;
}

/* --- objection handling (native <details>, no JS needed) ----------------- */

.rs-faq {
  border: 1.5px solid var(--rs-line);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 0 16px;
}
.rs-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rs-faq summary::-webkit-details-marker { display: none; }
.rs-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  color: var(--rs-ink-faint);
}
.rs-faq[open] summary::after { content: "\2212"; }
.rs-faq[open] summary { padding-bottom: 10px; }
.rs-faq-body { font-size: 13.5px; line-height: 1.55; color: var(--rs-ink-soft); padding: 0 0 16px; }
.rs-faq-body p { margin: 0 0 10px; }
.rs-faq-body p:last-child { margin-bottom: 0; }

.rs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rs-line);
  border: 1px solid var(--rs-line);
  border-radius: 11px;
  overflow: hidden;
  margin: 0 0 18px;
}
.rs-stat { background: var(--rs-surface); padding: 13px 12px; }
.rs-stat-v {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.rs-stat-l {
  font-size: 11px;
  color: var(--rs-ink-faint);
  margin-top: 3px;
  font-weight: 550;
}

.rs-minimum {
  border: 1.5px solid var(--rs-accent);
  background: color-mix(in srgb, var(--rs-accent) 14%, transparent);
  border-radius: 12px;
  padding: 15px 16px;
  margin-bottom: 18px;
}
.rs-minimum-h { font-size: 15px; font-weight: 750; margin: 0 0 4px; }
.rs-minimum-p { font-size: 13.5px; line-height: 1.5; margin: 0; color: var(--rs-ink-soft); }

.rs-table-wrap {
  border: 1px solid var(--rs-line);
  border-radius: 11px;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  /* iOS momentum scrolling for the table when it is wider than the card. */
  -webkit-overflow-scrolling: touch;
}
/* Five columns (Week / Per run / Distance / Pace / Treadmill) don't fit a
   narrow phone at comfortable padding. Auto layout + min-width lets the
   table scroll horizontally inside its card instead of cramming or
   clipping the last column. */
.rs-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; table-layout: auto; }
.rs-table th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--rs-ink-faint);
  font-weight: 700;
  padding: 10px 10px;
  background: var(--rs-surface-2);
  border-bottom: 1px solid var(--rs-line);
  white-space: nowrap;
}
.rs-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--rs-line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .rs-table { font-size: 13px; }
  .rs-table th, .rs-table td { padding-left: 8px; padding-right: 8px; }
}
.rs-table tr:last-child td { border-bottom: 0; }
.rs-table td:first-child { font-weight: 650; color: var(--rs-ink-soft); }

.rs-locked { position: relative; }
.rs-locked-rows { filter: blur(4px); opacity: .5; pointer-events: none; user-select: none; }
.rs-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 650;
  color: var(--rs-ink-soft);
}

/* --- gate ---------------------------------------------------------------- */

.rs-gate {
  border: 1.5px solid var(--rs-line-strong);
  border-radius: 12px;
  padding: 19px 18px;
  margin-top: 18px;
}
.rs-gate-h { font-size: 17px; font-weight: 700; margin: 0 0 5px; letter-spacing: -.01em; }
.rs-gate-p { font-size: 13.5px; line-height: 1.5; color: var(--rs-ink-soft); margin: 0 0 14px; }

.rs-consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--rs-ink-faint);
  cursor: pointer;
}
.rs-consent input {
  flex: 0 0 auto;
  margin: 1px 0 0;
  width: 15px;
  height: 15px;
  accent-color: var(--rs-line-strong);
}

.rs-error {
  font-size: 13px;
  color: #e5484d;
  margin: 9px 0 0;
  font-weight: 550;
}

/* --- success ------------------------------------------------------------- */

.rs-tick {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--rs-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.rs-tick::after {
  content: "";
  width: 15px;
  height: 8px;
  border-left: 2.5px solid var(--rs-accent-ink);
  border-bottom: 2.5px solid var(--rs-accent-ink);
  transform: rotate(-45deg) translate(1px, -2px);
}

.rs-download {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid var(--rs-line);
  border-radius: 12px;
  background: var(--rs-surface);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
  margin-bottom: 10px;
}
.rs-download:hover { border-color: var(--rs-ink-faint); }
.rs-download-icon { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.rs-download-t { display: block; font-size: 14.5px; font-weight: 650; }
.rs-download-d {
  display: block;
  font-size: 12.5px;
  color: var(--rs-ink-soft);
  margin-top: 2px;
  line-height: 1.4;
}

.rs-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: rs-spin .6s linear infinite;
  vertical-align: -2px;
  margin-right: 7px;
}
@keyframes rs-spin { to { transform: rotate(360deg); } }

.rs-step { animation: rs-in .28s cubic-bezier(.4, 0, .2, 1); }
@keyframes rs-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rs-root *, .rs-root *::before, .rs-root *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
