:root {
    color-scheme: light;
    --background: #f1f4f7;
    --surface: #fff;
    --soft: #f5f7fa;
    --heading: #172b40;
    --text: #304256;
    --border: #d4dde6;
    --primary: #284f73;
    --link: #284f73;
    --focus: #1468b8;
    --shadow: 0 3px 12px #162c4310;
    --gutter: clamp(16px, 2.5vw, 48px);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --background: #111a24;
        --surface: #1b2836;
        --soft: #213141;
        --heading: #edf3f9;
        --text: #d5e0eb;
        --border: #405367;
        --primary: #284f73;
        --link: #9dc4e8;
        --focus: #83bdff;
        --shadow: 0 3px 12px #0002;
    }
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); font: 15px/1.5 system-ui, sans-serif; }
header, section { background: var(--surface); border: 1px solid var(--border); }
header { border-width: 0 0 1px; }
header > div, main { width: calc(100% - 2 * var(--gutter)); max-width: 1760px; margin-inline: auto; }
.brand { display: inline-flex; gap: .4em; align-items: center; min-height: 64px; color: var(--heading); font-size: 22px;
    letter-spacing: -.55px; font-weight: 750; text-decoration: none; }
.brand span { font-weight: 500; }
nav, form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
nav { gap: .2rem; padding-block: 0 10px; }
nav a { padding: .55rem .65rem; border-radius: 7px; font-weight: 600; text-decoration: none; }
nav a:hover, nav a[aria-current=page] { color: var(--link); background: var(--soft); }
nav a[aria-current=page] { box-shadow: inset 0 -3px var(--link); }
nav form { margin: 0 0 0 auto; }
nav button { color: var(--link); background: var(--surface); }
main { padding-block: 24px 48px; }
main.compact { max-width: 480px; padding-block-start: 48px; }
main.compact form { display: grid; }
h1, h2 { margin: 0 0 1rem; color: var(--heading); line-height: 1.2; }
h1 { font-size: clamp(26px, 3vw, 32px); letter-spacing: -.6px; }
h2 { font-size: 19px; }
section { border-radius: 10px; padding: clamp(16px, 2.2vw, 24px); margin: 1rem 0; box-shadow: var(--shadow); }
section > :last-child { margin-bottom: 0; }
.table { overflow: auto; padding: 0; }
table { border-collapse: collapse; width: 100%; min-width: 63rem; text-align: left; }
th, td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead { background: var(--soft); color: var(--heading); }
tbody tr:hover { background: var(--soft); }
td, pre { overflow-wrap: anywhere; }
label { display: grid; gap: .25rem; min-width: 0; font-weight: 600; }
[hidden] { display: none !important; }
fieldset { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; border: 1px solid var(--border); border-radius: 8px; }
input, select, textarea, button { max-width: 100%; min-height: 38px; padding: .45rem .65rem; color: inherit; background: var(--surface);
    font: inherit; border: 1px solid var(--border); border-radius: 7px; }
button { color: #fff; background: var(--primary); cursor: pointer; font-weight: 650; }
button:hover { filter: brightness(.9); }
.badge { display: inline-block; padding: .15rem .5rem; color: var(--link); background: var(--soft); border-radius: 6px; font-weight: 600; }
pre { white-space: pre-wrap; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.detail-card { min-width: 0; margin: 0; }
.detail-wide { grid-column: 1 / -1; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 1rem; margin: 0; }
.facts dt { font-size: .82rem; font-weight: 600; }
.facts dd { margin: .25rem 0 0; color: var(--heading); font-weight: 650; overflow-wrap: anywhere; }
.badge-good { color: #105239; background: #def3e8; }
.badge-attention { color: #744507; background: #fff0ce; }
.badge-danger { color: #8c2d31; background: #ffe5e5; }
.operator-actions { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border); }
summary { color: var(--link); font-weight: 650; cursor: pointer; }
.operator-actions > form, .detail-card > form { margin-top: .85rem; }
.operator-actions > section { margin: .8rem 0 0; box-shadow: none; }
.technical-id { display: flex; align-items: center; gap: .5rem; margin-top: .85rem; font-size: .82rem; }
.technical-id code { min-width: 0; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.technical-id button { min-height: 30px; padding: .2rem .45rem; background: var(--soft); color: var(--link); }
.timeline, .trial-usage { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; gap: .25rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.timeline time { font-size: .83rem; }
.timeline pre { padding: .75rem; background: var(--soft); }
.trial-usage li { padding: .4rem 0; }
.release-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.facts + h3 { margin-top: 1.5rem; }

@media (max-width: 1050px) {
    .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .detail-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
    nav { gap: .25rem; }
    nav a { padding-inline: .45rem; }
    nav form { margin-inline-start: 0; }
    section form { align-items: stretch; }
    input, select { width: 100%; }
}
