.iton-wt {
    --iton-green: #19573e;
    --iton-ink: #193328;
    --iton-edge: #cce1d3;
    color: var(--iton-ink);
    margin-block: 1.5rem;
}
.iton-wt-card {
    background: #f1f8f2;
    border: 1px solid var(--iton-edge);
    border-radius: 1rem;
    padding: clamp(1rem, 3vw, 1.6rem);
}
.iton-wt h2, .iton-wt h3 {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0 0 .75rem;
    color: var(--iton-green);
    font-size: clamp(1.15rem, 3vw, 1.45rem);
    line-height: 1.35;
}
.iton-wt h2::before, .iton-wt h2::after,
.iton-wt h3::before, .iton-wt h3::after { content: none; }
.iton-wt-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 1rem;
    align-items: center;
}
.iton-wt-mascot {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.iton-wt-card .iton-wt-mascot {
    max-width: 220px;
    max-height: 210px;
    justify-self: center;
}
.iton-wt .iton-wt-date, .iton-wt .iton-wt-goal {
    margin: 0;
    font-size: .9rem;
}
.iton-wt .iton-wt-weight {
    margin: .2rem 0 .5rem;
    font-size: clamp(1.65rem, 5vw, 2.5rem);
    line-height: 1.15;
    font-weight: 750;
    color: var(--iton-green);
}
.iton-wt .iton-wt-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin: .5rem 0;
}
.iton-wt .iton-wt-metrics dt { font-size: .85rem; }
.iton-wt .iton-wt-metrics dd { margin: 0; font-weight: 700; }
.iton-wt .iton-wt-note, .iton-wt .iton-wt-link { margin: .5rem 0 0; overflow-wrap: anywhere; }
.iton-wt a { color: var(--iton-green); text-decoration: underline; }
.iton-wt .iton-wt-records, .iton-wt .page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
}
.iton-wt .iton-wt-records > li {
    display: grid;
    grid-template-columns: minmax(72px, 110px) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--iton-edge);
    margin: 0;
    padding: .8rem 0;
}
.iton-wt .iton-wt-record-weight { font-weight: 700; margin: .25rem 0; }
.iton-wt .iton-wt-pagination ul { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.iton-wt .iton-wt-plot {
    border: 1px solid var(--iton-edge);
    border-radius: .75rem;
    padding: .75rem;
    margin: .75rem 0;
    background: #fff;
}
.iton-wt .iton-wt-plot canvas { display: block; width: 100%; height: 220px; }
.iton-wt [hidden] { display: none !important; }
@media (max-width: 520px) {
    .iton-wt-card-body { grid-template-columns: 1fr; gap: .5rem; }
    .iton-wt-card .iton-wt-mascot { max-width: 170px; max-height: 145px; }
}


/* The public history dashboard shares the base palette with the article card. */
.iton-wt-history .iton-wt-dashboard {
    overflow: hidden;
    border: 1px solid var(--iton-edge);
    border-radius: 1.25rem;
    background: #f5faf6;
}
.iton-wt-history .iton-wt-dashboard-header {
    padding: clamp(1rem, 4vw, 2rem);
    background: #174d37;
    color: #fff;
}
.iton-wt-history .iton-wt-dashboard-header h2 {
    margin: 0;
    color: inherit;
    font-size: clamp(1.25rem, 3.5vw, 1.8rem);
    text-wrap: balance;
}
.iton-wt-history .iton-wt-period {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .15rem .5rem;
    margin: .5rem 0 0;
    color: #e0f1e5;
    font-size: .875rem;
}
.iton-wt-history time { white-space: nowrap; }
.iton-wt-history .iton-wt-dashboard-content {
    display: grid;
    gap: .9rem;
    padding: clamp(.75rem, 3vw, 1.65rem);
}
.iton-wt-history .iton-wt-hero {
    display: grid;
    grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
    gap: clamp(.5rem, 3vw, 2rem);
    align-items: center;
    padding: clamp(.65rem, 2.5vw, 1.2rem);
    border-radius: .9rem;
    background: #e6f3e9;
}
.iton-wt-history .iton-wt-hero .iton-wt-mascot {
    max-width: 190px;
    justify-self: center;
}
.iton-wt-history .iton-wt-hero-label,
.iton-wt-history .iton-wt-hero-date,
.iton-wt-history .iton-wt-previous,
.iton-wt-history .iton-wt-status {
    margin: .25rem 0;
    font-size: .875rem;
}
.iton-wt-history .iton-wt-hero-label { font-weight: 700; }
.iton-wt-history .iton-wt-status { color: #435a4c; }
.iton-wt-history .iton-wt-hero-weight,
.iton-wt-history .iton-wt-target-weight {
    margin: .15rem 0;
    color: var(--iton-green);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    white-space: nowrap;
}
.iton-wt-history .iton-wt-hero-weight { font-size: clamp(2rem, 6vw, 3.8rem); }
.iton-wt-history .iton-wt-target-weight { font-size: clamp(1.9rem, 5vw, 3rem); }
.iton-wt-history .iton-wt-dashboard-content > .iton-wt-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
    margin: 0;
}
.iton-wt-history .iton-wt-dashboard-content > .iton-wt-metrics > div {
    padding: .55rem .65rem;
    border: 1px solid var(--iton-edge);
    border-radius: .65rem;
    background: #fff;
}
.iton-wt-history .iton-wt-dashboard-content > .iton-wt-metrics dd {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    white-space: nowrap;
}
.iton-wt-history .iton-wt-target,
.iton-wt-history .iton-wt-dashboard-note {
    padding: clamp(.7rem, 2.5vw, 1.15rem);
    border-radius: .75rem;
}
.iton-wt-history .iton-wt-target {
    border: 1px solid var(--iton-edge);
    background: #fff;
}
.iton-wt-history .iton-wt-target h3,
.iton-wt-history .iton-wt-dashboard-note h3 {
    margin: 0;
    font-size: 1rem;
}
.iton-wt-history .iton-wt-target .iton-wt-celebration {
    font-size: clamp(1.65rem, 5vw, 2.6rem);
}
.iton-wt-history .iton-wt-progress-caption,
.iton-wt-history .iton-wt-progress-ends {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .15rem .5rem;
    font-size: .8rem;
}
.iton-wt-history .iton-wt-progress-caption { margin-top: .55rem; }
.iton-wt-history .iton-wt-progress-caption strong { color: var(--iton-green); }
.iton-wt-history .iton-wt-target progress {
    display: block;
    width: 100%;
    height: .72rem;
    margin: .4rem 0;
    appearance: none;
    border: 0;
    border-radius: 1rem;
    background: #dbece0;
    color: #26754f;
}
.iton-wt-history .iton-wt-target progress::-webkit-progress-bar {
    border-radius: 1rem;
    background: #dbece0;
}
.iton-wt-history .iton-wt-target progress::-webkit-progress-value {
    border-radius: 1rem;
    background: #26754f;
}
.iton-wt-history .iton-wt-target progress::-moz-progress-bar {
    border-radius: 1rem;
    background: #26754f;
}
.iton-wt-history .iton-wt-dashboard-note { background: #e6f3e9; }
.iton-wt-history .iton-wt-dashboard-note p {
    margin: .3rem 0 0;
    overflow-wrap: anywhere;
}
.iton-wt-history .iton-wt-records > li {
    grid-template-columns: clamp(90px, 20vw, 116px) minmax(0, 1fr);
    gap: clamp(.5rem, 3vw, 1rem);
    margin: .5rem 0;
    padding: .6rem .75rem;
    border: 1px solid var(--iton-edge);
    border-radius: .75rem;
    background: #fff;
}
.iton-wt-history .iton-wt-record-heading {
    display: flex;
    flex-wrap: wrap;
    gap: .1rem .8rem;
    align-items: baseline;
}
.iton-wt-history .iton-wt-record-heading time { font-size: .875rem; }
.iton-wt-history .iton-wt-record-weight {
    margin: 0;
    color: var(--iton-green);
    font-size: clamp(1.1rem, 3vw, 1.45rem);
    line-height: 1.25;
    white-space: nowrap;
}
.iton-wt-history .iton-wt-records .iton-wt-metrics {
    gap: .15rem .75rem;
    margin: .3rem 0 0;
}
.iton-wt-history .iton-wt-records .iton-wt-note {
    margin: .35rem 0 0;
    line-height: 1.5;
}
@media (max-width: 640px) {
    .iton-wt-history .iton-wt-dashboard-content > .iton-wt-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .iton-wt-history .iton-wt-hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    }
}
@media (max-width: 360px) {
    .iton-wt-history .iton-wt-hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    }
    .iton-wt-history .iton-wt-hero-weight { font-size: 1.8rem; }
}
