section.gwc {
    --gwc-paper: #fff;
    --gwc-tint: #f2f7fa;
    --gwc-ink: #123051;
    --gwc-muted: #536581;
    --gwc-edge: #d0d9e6;
    scroll-margin-top: 5.25rem;
    color-scheme: light;
    color: var(--gwc-ink);
    background: var(--gwc-paper);
    border-color: var(--gwc-edge);
    font-family: var(--fr-gw-text-font, system-ui, sans-serif);
    overflow-wrap: break-word;
}
[data-theme="dark"] section.gwc {
    --gwc-paper: #11274b;
    --gwc-tint: #0c243f;
    --gwc-ink: #e3ebf8;
    --gwc-muted: #a6b6ce;
    --gwc-edge: #294261;
    color-scheme: dark;
}
section.gwc h2 { color: var(--gwc-ink); margin: 0; }
.gwc p { margin: .7rem 0 0; line-height: 1.5; font-size: .94rem; }
.gwc .gwc-station {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem 1rem;
    margin-top: .85rem;
}
.gwc .gwc-station h3 { font-size: 1.35rem; line-height: 1.2; margin: 0; letter-spacing: -.025em; }
.gwc h3 a { color: var(--fr-gw-link, #1269aa); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.gwc .gwc-tools { display: flex; align-items: center; gap: .4rem; }
.gwc .gwc-tools :is(.icon-btn, .gw-alert-bell) {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    color: var(--fr-gw-link, #1269aa);
    background: var(--gwc-paper);
    border: 1px solid var(--gwc-edge);
    border-radius: 9px;
}
.gwc .gwc-tools :is(.icon-btn, .gw-alert-bell):hover { background: var(--gwc-tint); border-color: currentColor; }
.gwc p.gwc-location, .gwc p.gwc-status { color: var(--gwc-muted); font-size: .85rem; }
.gwc p.gwc-location { margin-top: .25rem; }
.gwc .gwc-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.25rem), 1fr));
    gap: 1px;
    border: 1px solid var(--gwc-edge);
    border-inline-start: 3px solid var(--fr-gw-water, #0f8f7e);
    border-radius: 10px;
    background: var(--gwc-edge);
    margin: .9rem 0 .65rem;
    overflow: hidden;
}
.gwc .gwc-metrics > div { min-width: 0; padding: .85rem 1rem; background: var(--gwc-tint); }
.gwc-metrics > div > p { margin: 0; }
.gwc .gwc-label { font-size: .82rem; font-weight: 700; color: var(--gwc-muted); }
.gwc .gwc-level, .gwc .gwc-week {
    margin-block: .21rem .26rem;
    font: 700 clamp(1.45rem, 3vw, 1.85rem)/1.2 var(--fr-gw-number-font, ui-monospace, monospace);
    letter-spacing: -.06em;
    color: var(--gwc-ink);
}
.gwc .gwc-level small { font-size: .72em; }
.gwc .gwc-week { font-family: inherit; letter-spacing: -.025em; color: var(--fr-gw-water-ink, #09645e); }
.gwc p.gwc-unit, .gwc p.gwc-date, .gwc p.gwc-gap { color: var(--gwc-muted); font-size: .84rem; line-height: 1.45; }
.gwc p.gwc-date { margin-top: .15rem; }
.gwc p.gwc-gap { margin-top: .4rem; color: var(--gwc-ink); }
.gwc p.gwc-normal { font-size: .94rem; font-weight: 700; margin: .5rem 0 .15rem; }
.gwc .gwc-details { font-size: .86rem; color: var(--gwc-muted); }
.gwc .gwc-details summary { cursor: pointer; width: fit-content; color: var(--fr-gw-link, #1269aa); padding-block: .35rem; }
.gwc .gwc-details p { font-size: .86rem; margin: .15rem 0 .4rem; max-width: 72ch; }
.gwc .gwc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.05rem; margin-top: .6rem; }
.gwc .gwc-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
    font-size: .875rem;
    font-weight: 700;
    color: var(--fr-gw-link, #1269aa);
    text-underline-offset: .2em;
}
.gwc .gwc-actions a:first-child {
    padding: .55rem .95rem;
    border-radius: 9px;
    background: var(--fr-gw-action, #1176c2);
    color: #fff;
    text-decoration: none;
}
.gwc .gwc-actions a:hover { text-decoration: underline; }
.gwc :is(a, button, summary):focus-visible { outline: 3px solid var(--fr-gw-link, #1269aa); outline-offset: 3px; }
.gwc p.gwc-context { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--gwc-edge); max-width: 78ch; }
.gwc p.gwc-context, .gwc p.pfs-note, .gwc p.pl-note { color: var(--gwc-muted); font-size: .8rem; line-height: 1.5; }
@media (max-width: 520px) {
    .gwc .gwc-metrics > div { padding: .7rem .6rem; }
    .gwc .gwc-week, .gwc .gwc-level { font-size: 1.3rem; }
    .gwc .gwc-actions { column-gap: 1.15rem; row-gap: 0; }
    .gwc .gwc-actions a:first-child { width: 100%; }
}

/* A level far outside the borehole's own record: a caution beside it, never a hidden figure (includes/groundwater-suspect.php). */
.gwc-caution { margin-top: 8px; padding: 6px 10px; border-left: 3px solid #d97706; background: rgba(217, 119, 6, .08); color: inherit; font-size: .9em; line-height: 1.4; }
