/* routine timer — brand-pure (paper / ink / red / quiet), calm by default.
   States while running: work = ink (deep, focused), rest = soft paper (exhale).
   The progress fill is the single red accent on the page. */
.rtimer {
  border: 1px solid var(--border, #E8E3DA);
  background: var(--entry, #FFFCF7);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.2rem;
  margin: 1.2rem 0;
  text-align: center;
}
.rtimer .rtimer-steps { display: none; }

/* sticks to the top of the screen while running, so it survives scrolling */
.rtimer.rt-running {
  position: sticky;
  top: 0.5rem;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(31, 42, 46, 0.12);
}

.rt-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.rt-title { font-weight: 600; color: var(--primary, #1F2A2E); }
.rt-meta { font-size: 0.85rem; color: var(--secondary, #8B8680); font-variant-numeric: tabular-nums; }

/* the stage is the tap-to-pause surface */
.rt-stage {
  border-radius: 10px;
  padding: 0.6rem 0.4rem 0.5rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.4s ease;
}
/* work = ink, rest = soft paper — the state change reads at a glance, in brand */
.rtimer.rt-state-work .rt-stage { background: #1F2A2E; }
.rtimer.rt-state-work .rt-stage * { color: #FAF7F2; }
.rtimer.rt-state-rest .rt-stage { background: #F2EEE5; }
.rtimer.rt-state-rest .rt-stage * { color: #1F2A2E; }
.rtimer.rt-state-rest .rt-stage .rt-next,
.rtimer.rt-state-rest .rt-stage .rt-hint { color: #8B8680; }

.rt-now {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary, #1F2A2E);
  min-height: 1.5em;
}

/* the form cue: what the voice says the first time this exercise comes up. Quiet and
   secondary — the clock stays the thing you glance at mid-rep. */
.rt-cue {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--secondary, #8B8680);
  max-width: 26rem;
  margin: 0.15rem auto 0;
  min-height: 1.2em;
}

.rt-clock {
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.4rem, 14vw, 4.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--primary, #1F2A2E);
}

.rt-next {
  font-size: 0.9rem;
  color: var(--secondary, #8B8680);
  min-height: 1.4em;
}

.rt-hint {
  font-size: 0.75rem;
  color: var(--secondary, #8B8680);
  opacity: 0;
  transition: opacity 0.25s ease;
  margin-top: 0.2rem;
}
.rtimer.rt-running .rt-hint { opacity: 0.8; }

.rt-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--border, #E8E3DA);
  overflow: hidden;
  margin: 0.7rem 0 0.9rem;
}
.rt-bar-fill {
  height: 100%;
  width: 0;
  background: #C25450; /* the page's one red accent */
  border-radius: 3px;
  transition: width 0.3s linear;
}

.rt-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.rt-btn {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border, #E8E3DA);
  background: transparent;
  color: var(--primary, #1F2A2E);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.rt-btn:hover { border-color: var(--primary, #1F2A2E); }
.rt-btn.rt-start {
  background: var(--primary, #1F2A2E);
  color: var(--theme, #FAF7F2);
  border-color: var(--primary, #1F2A2E);
  min-width: 6rem;
}
.rt-btn:active { transform: translateY(1px); }
.rt-btn.rt-voice { font-size: 0.85rem; color: var(--secondary, #8B8680); }

@media (prefers-reduced-motion: reduce) {
  .rt-stage, .rt-bar-fill, .rt-hint { transition: none; }
}
