
/* ── DEBT CLOCK ── */
.clock-disclosure {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.clock-disclosure svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 1px; /* Aligns the icon perfectly with the text baseline */
    stroke: var(--text-tertiary);
}

.debt-clock-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    transition: background 0.2s, border-color 0.2s;
}

.debt-clock-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.debt-clock-eyebrow {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
}

.runrate-badge {
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    border-radius: 6px;
    padding: 3px 10px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--red);
    white-space: nowrap;
}

.debt-clock-ticker {
    font-family: 'Space Mono', monospace;
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 700;
    color: var(--red);
    letter-spacing: -0.02em;
    line-height: 1;
    display: flex;
    align-items: baseline;
}

.debt-clock-unit {
    font-size: clamp(16px, 1.6vw, 20px);
    font-weight: 400;
    color: var(--text-tertiary);
    margin-left: 0.6rem;
}

[data-lang="th"] .debt-clock-unit { font-family: 'Anuphan', sans-serif; }

.debt-clock-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.dcs-item { display: flex; flex-direction: column; gap: 3px; }

.dcs-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.dcs-value {
    font-family: 'Space Mono', monospace;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.dcs-value.neg  { color: var(--red); }
.dcs-value.pos  { color: var(--green); }
.dcs-value.mute { color: var(--text-secondary); font-size: 14px; }

/* ── FUND GRID ── */
.fund-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.fund-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: background 0.2s, border-color 0.2s;
}

.fund-card-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.fund-card-value {
    font-family: 'Space Mono', monospace;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.fund-card-value.neg  { color: var(--red); }
.fund-card-value.pos  { color: var(--green); }
.fund-card-value.mute { color: var(--text-primary); }
.fund-card-value.blue { color: var(--blue); font-size: 18px; padding-top: 4px; }

.fund-card-unit {
    font-size: 12px;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ── FLOW DIAGRAM ── */
.flow-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    grid-column: span 3;
    transition: background 0.2s, border-color 0.2s;
}

@media (max-width: 800px) { .flow-card { grid-column: span 1; } }

.flow-card-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 1.25rem;
}

.flow-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    row-gap: 1rem;
}

.flow-node {
    background: var(--surface2);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    min-width: 148px;
    text-align: center;
}

.flow-node.deficit {
    border-color: var(--red-border);
    background: var(--red-bg);
}

.flow-node-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.flow-node-val {
    font-family: 'Space Mono', monospace;
    font-size: 17px;
    font-weight: 700;
}

.flow-node-val.neg { color: var(--red); }
.flow-node-val.pos { color: var(--green); }

.flow-node-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 3px;
}

.flow-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 6px;
    gap: 3px;
}

.flow-line {
    height: 2px;
    width: 52px;
    position: relative;
}

.flow-line.fwd { background: linear-gradient(90deg, var(--amber), transparent); }
.flow-line.fwd::after {
    content: '▶';
    position: absolute;
    right: -7px; top: -7px;
    font-size: 8px;
    color: var(--amber);
}

.flow-line.back { background: linear-gradient(90deg, transparent, var(--red)); }
.flow-line.back::before {
    content: '◀';
    position: absolute;
    left: -7px; top: -7px;
    font-size: 8px;
    color: var(--red);
}

.flow-connector-label { font-size: 10px; white-space: nowrap; }
.flow-connector-label.fwd  { color: var(--amber); }
.flow-connector-label.back { color: var(--red); }

.flow-note {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.65;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ── PRICE TABLE ── */
.prices-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: background 0.2s, border-color 0.2s;
}

.prices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.prices-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.prices-meta { display: flex; align-items: center; gap: 10px; }

.prices-legend { font-size: 13px; color: var(--text-secondary); }

.eppo-badge {
    background: var(--blue-bg);
    border: 1px solid var(--blue-border);
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
}

.price-table { width: 100%; border-collapse: collapse; }

.price-table thead th {
    padding: 0.625rem 1.5rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    text-align: right;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.price-table thead th:first-child { text-align: left; }

.price-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

.price-table tbody tr:last-child { border-bottom: none; }
.price-table tbody tr:hover { background: var(--surface2); }

.price-table td {
    padding: 0.9rem 1.5rem;
    font-size: 14px;
    text-align: right;
    color: var(--text-secondary);
}

.price-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

.price-table td.retail {
    font-family: 'Space Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.oil-pill {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.oil-pill.subsidy { background: var(--red-bg);     color: var(--red);           border: 1px solid var(--red-border);     }
.oil-pill.levy    { background: var(--green-bg);   color: var(--green);         border: 1px solid var(--green-border);   }
.oil-pill.neutral { background: var(--neutral-bg); color: var(--text-tertiary); border: 1px solid var(--neutral-border); }

.empty-cell {
    padding: 2.5rem !important;
    text-align: center !important;
    color: var(--text-tertiary);
    font-size: 13px;
}

/* ── CHART ── */
.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: background 0.2s, border-color 0.2s;
}

.chart-header { margin-bottom: 1.25rem; }

.chart-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.chart-sub {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 3px;
}

/* ── FOOTER ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 2rem;
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
    letter-spacing: 0.04em;
    background: var(--surface);
    transition: background 0.2s, border-color 0.2s;
}