/* Live inflation clock page */
.clock-hero { margin: 40px 0 26px; text-align: center; }
.clock-hero h1 { max-width: 17ch; margin: 14px auto 0; font-size: clamp(2.3rem, 6.2vw, 4.6rem); line-height: 1.03; letter-spacing: -.05em; }
.clock-hero .tagline { margin-top: 18px; }
.clock-live-pill { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; margin: 22px auto 0; padding: 10px 18px; border: 1px solid rgba(56,217,138,.35); border-radius: 999px; background: rgba(56,217,138,.08); color: #d1fae5; font-weight: 800; font-size: .95rem; }
.clock-live-pill .status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(56,217,138,.9); animation: clockPulse 2s ease-in-out infinite; }
.clock-live-pill small { color: var(--muted); font-weight: 700; }
@keyframes clockPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .clock-live-pill .status-dot { animation: none; } }

/* ---- the clock face ---- */
.clock-face { margin: 26px 0 0; padding: clamp(24px, 4.5vw, 48px); border: 1px solid rgba(255,77,109,.42); border-radius: 28px; background: radial-gradient(circle at 50% 0%, rgba(255,77,109,.16), transparent 42%), rgba(8,10,16,.94); box-shadow: 0 26px 90px rgba(0,0,0,.32); text-align: center; }
.clock-face-label { margin: 0; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.clock-readout { display: block; margin: 14px 0 0; font-size: clamp(2.1rem, 7.6vw, 5.2rem); line-height: 1; letter-spacing: -.05em; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--red); word-break: break-all; }
.clock-face[data-clock-direction].clock-is-gain .clock-readout { color: var(--green); }
.clock-readout-note { margin: 14px auto 0; max-width: 62ch; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.clock-readout-note strong { color: #e5e7eb; }
.clock-odometers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.clock-odometer { padding: 18px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(5,7,13,.6); }
.clock-odometer span { display: block; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; }
.clock-odometer strong { display: block; margin-top: 8px; font-size: clamp(1.1rem, 2.8vw, 1.7rem); line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--red); word-break: break-all; }
.clock-odometer small { display: block; margin-top: 6px; color: var(--muted); font-size: .78rem; }
.clock-face.clock-is-gain .clock-odometer strong { color: var(--green); }
.clock-reset { margin-top: 18px; min-height: 42px; padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.04); color: #e5e7eb; font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; }
.clock-reset:hover { border-color: rgba(255,255,255,.4); }
.clock-reset:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ---- controls ---- */
.clock-controls { margin-top: 22px; padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); border-radius: 26px; background: rgba(14,20,33,.82); display: grid; gap: 22px; }
/* Grid items default to min-width:auto, so the oversized amount input would push the whole
   panel past the viewport on a phone. Let every track shrink below its content width. */
.clock-controls > *, .clock-control, .clock-rate-grid, .clock-chips, .clock-amount-row { min-width: 0; }
.clock-control h2 { margin: 0 0 4px; font-size: clamp(1.1rem, 2.2vw, 1.4rem); }
.clock-control-help { margin: 0 0 12px; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.clock-amount-row { display: flex; align-items: center; gap: 10px; padding: 8px 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 18px; background: rgba(0,0,0,.28); }
.clock-amount-row:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255,77,109,.16); }
.clock-amount-row > span { color: var(--red); font-weight: 900; font-size: 1.8rem; }
.clock-amount-row input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; outline: none; }
.clock-amount-row input::-webkit-outer-spin-button, .clock-amount-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.clock-amount-row input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.clock-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.clock-chip { min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.04); color: #e5e7eb; font: inherit; font-weight: 800; font-size: .93rem; cursor: pointer; transition: border-color .15s, background .15s; }
.clock-chip:hover { border-color: rgba(255,255,255,.4); }
.clock-chip:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.clock-chip[aria-pressed="true"] { border-color: var(--red); background: rgba(255,77,109,.18); color: #fff; }
.clock-rate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.clock-rate { display: grid; gap: 3px; align-content: start; min-height: 88px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.04); color: #e5e7eb; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.clock-rate:hover { border-color: rgba(255,255,255,.4); }
.clock-rate:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.clock-rate[aria-pressed="true"] { border-color: var(--red); background: rgba(255,77,109,.18); }
.clock-rate strong { font-size: 1.5rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.clock-rate span { font-weight: 800; font-size: .88rem; line-height: 1.3; }
.clock-rate small { color: var(--muted); font-size: .76rem; }
.clock-custom { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; margin-top: 14px; }
.clock-custom[hidden] { display: none; }
.clock-custom-input { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.28); }
.clock-custom-input input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.3rem; font-weight: 800; outline: none; }
.clock-custom-input span { color: var(--muted); font-weight: 800; }
.clock-custom p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* ---- source panel ---- */
.clock-source { margin-top: 18px; padding: 18px 20px; border: 1px solid rgba(92,200,255,.3); border-radius: 18px; background: rgba(92,200,255,.07); display: grid; gap: 6px; }
.clock-source h3 { margin: 0; font-size: 1.05rem; }
.clock-source p { margin: 0; color: #cbd5e1; font-size: .92rem; line-height: 1.6; }
.clock-source p[data-clock="rateSource"] { color: var(--blue); font-weight: 800; }

/* ---- cadence table ---- */
.clock-cadence { margin-top: 26px; padding: clamp(20px, 4vw, 36px); border: 1px solid rgba(255,159,28,.42); border-radius: 26px; background: rgba(8,10,16,.9); }
.clock-cadence h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.03em; }
.clock-cadence-intro { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }
.clock-table-wrap { overflow-x: auto; }
.clock-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.clock-table caption { caption-side: bottom; margin-top: 12px; color: var(--muted); font-size: .88rem; text-align: left; line-height: 1.5; }
.clock-table th, .clock-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.clock-table thead th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.clock-table th[scope="row"], .clock-table thead th:first-child { text-align: left; }
.clock-table tbody th { font-weight: 800; }
.clock-table td.clock-loss { color: #ff7890; font-weight: 800; }
.clock-table td.clock-gain { color: var(--green); font-weight: 800; }
.clock-table tbody tr:last-child th, .clock-table tbody tr:last-child td { border-bottom: 0; font-size: 1.05rem; }

.clock-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.clock-facts div { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); }
.clock-facts span { display: block; color: var(--muted); font-size: .8rem; font-weight: 800; line-height: 1.4; }
.clock-facts strong { display: block; margin-top: 6px; font-size: 1.3rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .clock-odometers, .clock-facts { grid-template-columns: 1fr; }
  .clock-custom { grid-template-columns: 1fr; }
}
