/*
 * Infernal Citadel writing progress, v0.2.0
 * Scoped to .icws-progress to avoid disturbing Astra / Banner project layouts.
 * Colour references are consistent with the site's dark blue and antique gold.
 */
.icws-progress {
    --icws-ink: #172333;
    --icws-deep: #101925;
    --icws-gold: #c49954;
    --icws-light: #f8f6f1;
    --icws-secondary: #c3cbd5;
    --icws-stroke: rgba(196, 153, 84, .37);
    box-sizing: border-box;
    width: 100%;
    margin: 2rem auto;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--icws-stroke);
    border-radius: 16px;
    background: linear-gradient(125deg, var(--icws-deep), var(--icws-ink));
    box-shadow: 0 9px 28px rgba(0, 0, 0, .16);
    color: var(--icws-light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.icws-progress *, .icws-progress *::before, .icws-progress *::after { box-sizing: border-box; }
.icws-progress__eyebrow {
    font-size: .78rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--icws-gold);
}
.icws-progress h2 {
    color: var(--icws-light);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.28;
    font-weight: 700;
    margin: .3rem 0 1.1rem;
}
.icws-progress__big-number {
    display: flex;
    flex-wrap: wrap;
    gap: .25em .5em;
    align-items: baseline;
    font-variant-numeric: tabular-nums;
    padding: .1rem 0 .8rem;
}
.icws-progress__big-number strong {
    color: var(--icws-light);
    font-size: clamp(2.45rem, 5vw, 4rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.04em;
}
.icws-progress__big-number span {
    color: var(--icws-secondary);
    font-size: clamp(1.02rem, 2vw, 1.28rem);
    font-weight: 500;
}
.icws-progress__track {
    overflow: hidden;
    height: 16px;
    border: 1px solid #526071;
    background: #344252;
    border-radius: 999px;
}
.icws-progress__track span {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #a27a3e, #edc47a);
}
.icws-progress__underbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .55rem;
    color: var(--icws-secondary);
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
}
.icws-progress__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--icws-stroke);
}
.icws-progress__stats > div { display: flex; flex-direction: column; gap: .25rem; }
.icws-progress__stats small { color: var(--icws-secondary); font-size: .75rem; line-height: 1.35; }
.icws-progress__stats strong { color: var(--icws-light); font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.5rem); }
.icws-progress__history { border-top: 1px solid var(--icws-stroke); margin-top: 1.4rem; padding-top: 1rem; }
.icws-progress__history summary {
    cursor: pointer;
    color: var(--icws-gold);
    font-weight: 700;
    padding: .2rem 0;
}
.icws-progress__history summary:focus-visible { outline: 2px solid var(--icws-gold); outline-offset: 3px; }
.icws-progress__history p { font-size: .83rem; color: var(--icws-secondary); margin: .8rem 0; }
.icws-progress__days { display: grid; gap: .65rem; }
.icws-progress__day {
    display: grid;
    grid-template-columns: minmax(75px, 118px) minmax(40px, 1fr) minmax(50px, 74px);
    align-items: center;
    gap: .7rem;
    font-size: .82rem;
    color: var(--icws-secondary);
    font-variant-numeric: tabular-nums;
}
.icws-progress__daytrack { width: 100%; height: 11px; background: #354252; border-radius: 20px; overflow: hidden; }
.icws-progress__daytrack span { display: block; height: 100%; background: var(--icws-gold); border-radius: 20px; }
.icws-progress__daytrack span.is-negative { background: #d9857e; }
.icws-progress__day strong { color: var(--icws-light); text-align: right; }
.icws-progress__source { margin: 1.25rem 0 0 !important; color: var(--icws-secondary); font-size: .76rem; line-height: 1.45; }
@media (max-width: 550px) {
    .icws-progress__stats { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
    .icws-progress__day { grid-template-columns: 85px minmax(20px, 1fr) 45px; gap: .4rem; }
    .icws-progress__day time { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
    .icws-progress * { scroll-behavior: auto; transition: none; animation: none; }
}
