/* GENM Live Debt Clock (V1)
/* ----------------------------------------------------------
Loaded only by partials/genm-tools/live-debt-clock.hbs. Every rule is scoped
to .genm-clock. Colors and fonts come only from genm-tokens.css. Nothing here
animates (the number is changed by the script; reduced motion shows the latest figure at once).
The hero number matches the sphere's: IBM Plex Mono, gold on navy. Its size
steps down with the screen width so the longest total ($XX,XXX,XXX,XXX,XXX,
19 characters) fits at 360px wide without sideways scrolling.
Sizes are in px because Source sets the root font size to 10px.
*/

.genm-clock {
    background: var(--genm-navy);
    color: var(--genm-cream);
    border-radius: 12px;
    padding: 24px clamp(16px, 3vw, 32px) 28px;
    font-family: var(--genm-font-sans);
    line-height: 1.5;
    max-width: 100%;
    overflow-wrap: break-word;
}

.genm-clock[hidden] {
    display: none;
}

/* ---------- A. hero ---------- */
.genm-clock-hero {
    text-align: center;
    padding-bottom: 20px;
}

.genm-clock-kicker {
    margin: 0 0 8px;
    font-size: 14px;
    letter-spacing: .04em;
    color: var(--genm-muted);
}

/* 19 mono characters are about 11.4em wide; the page gutter plus the panel's
padding take about 64px at phone widths */
.genm-clock-total {
    margin: 0;
    font-family: var(--genm-font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    font-size: min(72px, calc((100vw - 72px) / 11.8));
    line-height: 1.15;
    color: var(--genm-gold);
    white-space: nowrap;
}

.genm-clock-anchor {
    max-width: 720px;
    margin: 12px auto 0;
    font-size: 15px;
    color: var(--genm-cream);
}

.genm-clock-state {
    max-width: 720px;
    margin: 12px auto 0;
    padding: 8px 12px;
    border: 1px solid var(--genm-alert-red);
    border-radius: 8px;
    font-size: 14px;
}

.genm-clock-state[hidden] {
    display: none;
}

/* ---------- sections ---------- */
.genm-clock-section {
    border-top: 1px solid var(--genm-navy-track);
    padding-top: 20px;
    margin-top: 20px;
}

.genm-clock .genm-clock-h3 {
    margin: 0 0 14px;
    font-family: var(--genm-font-serif);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--genm-cream);
}

.genm-clock-note,
.genm-clock-method {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--genm-muted);
}

/* ---------- figure grids ---------- */
.genm-clock-grid {
    display: grid;
    gap: 10px;
    margin: 0;
}

.genm-clock-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.genm-clock-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.genm-clock-item {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--genm-navy-panel);
}

.genm-clock-item dt {
    font-size: 13px;
    color: var(--genm-muted);
}

.genm-clock-item dd {
    margin: 0;
}

.genm-clock .genm-clock-value {
    margin-top: 4px;
    font-size: clamp(17px, 2.2vw, 22px);
    font-weight: 500;
    color: var(--genm-cream);
}

.genm-clock-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--genm-muted);
}

/* The noscript note links to Treasury's page */
.genm-tool-page .genm-tool-noscript a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--genm-gold);
    text-underline-offset: 3px;
}
