:root {
    color-scheme: dark;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
    --canvas: #141819;
    --panel: #1c2224;
    --line: #343e40;
    --text: #eef2ef;
    --muted: #a8b5b3;
    --lime: #c5f265;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--canvas); line-height: 1.5; }
button, input { font: inherit; }
a { color: var(--lime); text-underline-offset: .2em; }
button, summary { cursor: pointer; }
button, input { border: 1px solid var(--line); border-radius: 7px; }
button { padding: .52rem .92rem; font-weight: 600; }
button:hover { filter: brightness(1.09); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
input { min-width: 0; padding: .55rem .7rem; color: var(--text); background: #13191b; }
input:focus { border-color: #919f92; }
input::placeholder { color: #99a6a4; }
label { display: grid; gap: .35rem; color: #c7d1ce; font-size: .86rem; font-weight: 500; }
.primary { color: #1c2616; background: var(--lime); border-color: var(--lime); }
.secondary, .quiet { color: #d2dcda; background: #2a3132; }
.quiet { background: transparent; }
.danger { color: #f6c1b3; background: #442e2b; border-color: #754438; }
.top { background: #191e20; border-bottom: 1px solid var(--line); }
.top-inner, .workspace { width: min(100% - 2.5rem, 1072px); margin-inline: auto; }
.top-inner { min-height: 65px; display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.brand { color: var(--text); font-size: 1.04rem; font-weight: 450; letter-spacing: .105em; text-decoration: none; }
.brand strong { font-weight: 800; }
.workspace { padding-block: 2.25rem 4rem; }
h1, h2, p { margin: 0; }
h1 { margin-bottom: 1.5rem; font-size: clamp(1.7rem, 4.8vw, 2.35rem); font-weight: 650; line-height: 1.2; letter-spacing: -.045em; }
h2, .audit > summary { font-size: 1.15rem; font-weight: 620; line-height: 1.4; }
.panel, .code-box { margin-block: 1rem; padding: clamp(1rem, 2.4vw, 1.55rem); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.code-box { background: #253022; border-color: #526742; }
.code-box p { margin: .6rem 0 .9rem; color: #d1ddcb; }
.code { width: min(100%, 33rem); font: 1.04rem/1.5 Consolas, monospace; letter-spacing: .05em; }
.notice { padding: .8rem 1rem; border: 1px solid #526744; background: #253023; border-radius: 8px; }
.notice.error { border-color: #7a5147; background: #372926; color: #ffcdbe; }
.login { width: min(100% - 2rem, 390px); margin: clamp(3rem, 15vh, 10rem) auto; }
.login-card { padding: 2rem; }
.login-card h1 { font-size: 1.7rem; }
.login-card form { display: grid; gap: 1.15rem; }
.create { display: grid; grid-template-columns: minmax(11rem, 2fr) minmax(9rem, 1fr) auto; gap: 1rem; align-items: end; margin-top: 1rem; }
.section-head, .search, .pages { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.section-head { justify-content: space-between; margin-bottom: 1rem; }
.search input { max-width: 14rem; }
.muted, .last, time { color: var(--muted); }
.columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(9rem, 1fr) minmax(5.5rem, .65fr) minmax(8rem, 1fr); align-items: center; gap: .55rem 1rem; }
.list-head { color: var(--muted); font-size: .8rem; padding: 0 .45rem .65rem 1.3rem; }
.license { border-top: 1px solid var(--line); }
.license > summary { position: relative; padding: .75rem .45rem .75rem 1.3rem; list-style: none; font-size: .9rem; font-variant-numeric: tabular-nums; }
.license > summary::-webkit-details-marker { display: none; }
.license > summary::before { content: ""; position: absolute; left: .22rem; width: .38rem; height: .38rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); }
.license[open] > summary::before { transform: rotate(45deg); }
.license > summary:hover { background: #252d2e; }
.license strong, .event span { overflow-wrap: anywhere; }
.license small { display: none; }
.status { display: inline-block; padding: .16rem .55rem; border-radius: 12px; font-size: .78rem; }
.on { color: #c6e8b0; background: #2d392e; }
.pending { color: #c9dbe8; background: #2c3740; }
.off { color: #eac1ae; background: #3b302c; }
.controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; padding: .4rem .45rem 1.1rem 1.3rem; }
.expiry { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.reset summary { padding: .52rem 0; color: #cfdbd5; }
.reset[open] { width: 100%; }
.reset p { margin: .3rem 0 .7rem; color: var(--muted); }
.pages { justify-content: flex-end; margin-top: .75rem; }
.event { display: grid; grid-template-columns: minmax(10rem, .75fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--line); font-size: .87rem; }
.audit[open] > summary { margin-bottom: .8rem; }
@media (max-width: 760px) {
    .create { grid-template-columns: 1fr 1fr; }
    .create .primary { grid-column: 1 / -1; justify-self: start; }
    .list-head { display: none; }
    .license > summary { grid-template-columns: 1fr 1fr; }
    .license small { display: inline; color: var(--muted); }
    .event { grid-template-columns: 1fr 1fr; }
    .event time { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .top-inner, .workspace { width: calc(100% - 1.5rem); }
    .workspace { padding-top: 1.5rem; }
    .create { grid-template-columns: 1fr; }
    .search { width: 100%; }
    .search input { flex: 1; }
    .controls { padding-left: .3rem; }
    .code { font-size: .85rem; }
}
