/* The application's look (application/docs/ui.md, Look): warm greys, one accent, the spark. */
:root {
  color-scheme: light dark;
  --bg: #f4f4f1;
  --surface: #ffffff;
  --bar: #edede8;
  --line: #e2e2dd;
  --fg: #1c1c1a;
  --muted: #5c5c57;
  --accent: #c2410c;
  --accent-fg: #ffffff;
  --tint: #fbede4;
  --danger: #a0271c;
  --success: #1e5b32;
  --warn: #fdf6ec;
  --mono: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141412;
    --surface: #1d1d1a;
    --bar: #191917;
    --line: #2f2f2b;
    --fg: #ebebe5;
    --muted: #a3a39b;
    --accent: #f0773a;
    --accent-fg: #141412;
    --tint: #33221a;
    --danger: #f08a7e;
    --success: #86d19f;
    --warn: #2e2719;
  }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #141412;
    --surface: #1d1d1a;
    --bar: #191917;
    --line: #2f2f2b;
    --fg: #ebebe5;
    --muted: #a3a39b;
    --accent: #f0773a;
    --accent-fg: #141412;
    --tint: #33221a;
    --danger: #f08a7e;
    --success: #86d19f;
    --warn: #2e2719;
  }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); min-height: 100vh; }
a { color: var(--accent); text-underline-offset: 2px; }
h1 { font-size: 1.6rem; margin: 0.4rem 0 1.2rem; letter-spacing: -0.01em; }
h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 2rem 0 0.7rem; }
h3 { font-size: 1rem; margin: 1.2rem 0 0.5rem; }
.muted { color: var(--muted); }
.call, code, ol.codes { font-family: var(--mono); }
.call { font-weight: 600; }

/* the frame: a bar like the application's title bar */
header { padding: 0.55rem 1.2rem; background: var(--bar); border-bottom: 1px solid var(--line); display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
header .brand { color: inherit; font-weight: 700; font-size: 1.1rem; text-decoration: none; display: inline-flex; gap: 0.5rem; align-items: center; }
header .brand svg { fill: var(--accent); }
header nav { display: flex; gap: 1rem; align-items: center; }
header nav a { color: var(--fg); text-decoration: none; }
header nav a:hover { color: var(--accent); }
header nav a.call { font-family: var(--mono); }
header .start { display: flex; gap: 1.6rem; align-items: center; }
header .anchors { display: flex; gap: 1.1rem; font-size: 0.92rem; }
header .anchors a { color: var(--muted); text-decoration: none; }
header .anchors a:hover { color: var(--accent); }
@media (max-width: 52rem) { header .anchors { display: none; } }
header .langs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; font-size: 0.75rem; font-weight: 700; }
header .langs a, header .langs span { padding: 0.12rem 0.5rem; border-radius: 999px; }
header .langs a { color: var(--muted); }
header .langs .on { background: var(--accent); color: var(--accent-fg); }
a.button { display: inline-flex; gap: 0.45rem; align-items: center; font-weight: 600; padding: 0.4rem 0.95rem; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); text-decoration: none; }
a.button:hover { filter: brightness(1.08); }
header nav a.button { color: var(--accent-fg); }
a.button.quiet { background: var(--surface); color: var(--fg); border-color: var(--line); }
a.button.quiet:hover { border-color: var(--accent); color: var(--accent); filter: none; }
a.button.big { padding: 0.7rem 1.25rem; font-size: 1rem; }
header nav a.theme { display: inline-flex; padding: 0.3rem; border-radius: 6px; color: var(--muted); }
header nav a.theme:hover { color: var(--accent); background: var(--surface); }
header nav a.theme svg { fill: currentColor; }
main { max-width: 64rem; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }
.banner { margin: 0; padding: 0.6rem 1.2rem; background: var(--tint); border-bottom: 1px solid var(--line); }
.banner.warning { background: var(--warn); }

/* panels: a section list like the application's Views */
.panel { display: grid; gap: 2rem; grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr); align-items: start; }
@media (max-width: 40rem) { .panel { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
.sections { display: flex; flex-direction: column; gap: 0.15rem; position: sticky; top: 1rem; }
@media (max-width: 40rem) { .sections { flex-direction: row; overflow-x: auto; position: static; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; } }
.sections a { padding: 0.45rem 0.7rem; border-radius: 6px; color: var(--fg); text-decoration: none; white-space: nowrap; }
.sections a:hover { background: var(--bar); }
.sections a[aria-current=page] { background: var(--tint); color: var(--accent); font-weight: 600; }

/* forms */
form.inline { display: inline; }
form.stack { display: grid; gap: 0.9rem; max-width: 26rem; justify-items: start; }
form.stack > *:not(button) { justify-self: stretch; }
label { display: grid; gap: 0.3rem; grid-template-columns: minmax(0, 1fr); font-size: 0.87rem; color: var(--muted); }
label input, label select { color: var(--fg); }
label.check { display: flex; gap: 0.5rem; align-items: center; color: var(--fg); font-size: 1rem; }
input[type=text], input[type=email], input[type=password], select {
  max-width: 100%; font: inherit; font-size: 1rem; padding: 0.5rem 0.65rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg);
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox] { accent-color: var(--accent); width: 1rem; height: 1rem; }
fieldset { border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 0.8rem; padding: 0.9rem; background: var(--surface); }
form.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
form.row input[type=text] { flex: 1; min-width: 12rem; }

/* buttons: the accent for the main action, quiet ones in lists and cards, danger outlined */
button { font: inherit; font-weight: 600; padding: 0.45rem 1rem; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); cursor: pointer; min-height: 2.4rem; }
button:hover { filter: brightness(1.08); }
ul.devices button, ul.people button, details button, .actions form + form button, .links button {
  background: var(--surface); color: var(--fg); border-color: var(--line); font-weight: 500;
}
ul.devices button:hover, ul.people button:hover, details button:hover, .actions form + form button:hover { border-color: var(--accent); color: var(--accent); filter: none; }
button.danger, ul.devices button.danger, ul.people button.danger, details button.danger { background: var(--surface); color: var(--danger); border-color: currentColor; }
button.danger:hover { background: var(--danger); color: var(--surface); filter: none; }
button.link { background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; font: inherit; font-weight: 400; text-decoration: none; min-height: 0; }
button.link:hover { color: var(--accent); }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.actions form.stack { display: block; }

ul.devices .actions > form:first-child button:not(.danger) { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }

/* notices */
.notice { padding: 0.7rem 1rem; border-radius: 6px; border-left: 3px solid var(--accent); background: var(--tint); margin: 0.6rem 0; }
.notice.danger { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.badge { font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.badge.danger { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }

/* cards and lists */
ul.devices { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
ul.devices li, ul.stats li, .links li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.85rem 1rem; }
ul.devices li { display: grid; gap: 0.3rem; }
ul.devices li > strong:first-child { font-size: 1.02rem; }
ul.stats { list-style: none; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
ul.stats strong { display: block; font-size: 1.45rem; font-family: var(--mono); font-weight: 600; }
ul.stats li { color: var(--muted); }
@media (max-width: 40rem) { ul.stats strong { font-size: 1.15rem; } }
ul.stats li strong { color: var(--fg); }
ul.people { list-style: none; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
ul.people li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
ul.people li:last-child { border-bottom: 0; }
ul.people strong { font-family: var(--mono); }
ul.people li form.stack { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; max-width: none; }
ul.people li form.stack label { display: contents; }
ul.people li form.stack label > :not(select):not(input) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
ul.people li > :first-child { min-width: 1.2rem; }
ul.people li form:first-of-type { margin-left: auto; }
.links { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); padding: 0; list-style: none; }
.links li a { font-weight: 600; }
.links strong { display: block; }
details { margin-top: 0.4rem; }
details > summary { cursor: pointer; color: var(--accent); font-weight: 500; }
details > form.stack, details > p { margin: 0.7rem 0; }
ol.steps { display: grid; gap: 0.75rem; }
ol.codes { font-size: 1.05rem; columns: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 0.8rem 0.8rem 2.5rem; }
code.link { word-break: break-all; }
img.qr { background: #fff; padding: 0.5rem; border-radius: 8px; margin: 0.5rem 0; border: 1px solid var(--line); }

/* registration step 2: the code from the email, typed as ___-___ */
.code-step { max-width: 26rem; }
input.code-input { font-family: var(--mono); font-size: 2rem; letter-spacing: 0.35em; text-align: center; text-transform: uppercase; padding: 0.6rem 0.4rem 0.6rem 0.75rem; width: 100%; max-width: 15rem; }
input.code-input::placeholder { color: var(--muted); opacity: 0.55; letter-spacing: 0.35em; }
.code-step input.code-input { justify-self: start; }
.code-step .resend { display: block; margin: 1rem 0 0.4rem; }
.code-step .resend button.link { color: var(--accent); font-weight: 600; }

/* code pages: the form on the left, the phishing warning filling the space on the right (below on a phone) */
.code-layout { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 52rem) { .code-layout { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; } }
.panel .code-layout { grid-template-columns: minmax(0, 1fr); }

/* the warning: unlike any other notice, so it isn't learned away; pictures before words */
aside.phishing { position: relative; padding: 1.4rem 1.5rem 1.3rem; border-radius: 14px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-top: 6px solid var(--danger);
  box-shadow: 0 18px 50px -28px color-mix(in srgb, var(--danger) 60%, transparent); }
.phishing-head { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 1.1rem; }
.phishing-head .shield { flex: none; color: var(--danger); }
.phishing-head h2 { margin: 0.1rem 0 0.3rem; font-size: 1.3rem; letter-spacing: -0.01em; text-transform: none; color: var(--fg); }
.phishing-head p { margin: 0; font-size: 1rem; }
.mails { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0.9rem; margin-bottom: 1.2rem; }
figure.mail { margin: 0; display: grid; gap: 0.5rem; align-content: start; }
figure.mail figcaption { display: flex; gap: 0.4rem; align-items: center; font-weight: 700; font-size: 0.92rem; }
.mark { flex: none; padding: 3px; border-radius: 50%; width: 22px; height: 22px; }
.mark.ok { background: color-mix(in srgb, var(--success) 15%, var(--surface)); color: var(--success); }
.mark.no { background: color-mix(in srgb, var(--danger) 13%, var(--surface)); color: var(--danger); }
.mail-body { display: grid; gap: 0.35rem; justify-items: start; padding: 0.8rem 0.9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-size: 0.82rem; min-height: 9.5rem; }
.mail.real .mail-body { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); }
.mail.fake .mail-body { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); position: relative; }
.mail-body p { margin: 0; }
.mail-body .from { color: var(--muted); font-size: 0.75rem; }
.mail-body .subject { font-weight: 700; }
.mail-body .code { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; letter-spacing: 0.12em; padding: 0.1rem 0; }
.mail-body .lines { display: grid; gap: 0.3rem; width: 100%; margin-top: 0.2rem; }
.mail-body .lines span { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.mail-body .lines span.short { width: 60%; }
.trap { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 0.2rem; }
.fake-button { display: inline-block; padding: 0.35rem 0.8rem; border-radius: 6px; background: #2563eb; color: #fff; font-weight: 700;
  outline: 2px dashed var(--danger); outline-offset: 3px; }
.fake-link { color: #2563eb; text-decoration: underline; font-size: 0.78rem; word-break: break-all; outline: 2px dashed var(--danger); outline-offset: 2px; border-radius: 2px; }
.dont { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--surface); background: var(--danger); padding: 0.1rem 0.4rem; border-radius: 999px; }
figure.mail .why { margin: 0; font-size: 0.82rem; color: var(--muted); }
aside.phishing h3 { margin: 0 0 0.5rem; font-size: 1rem; }
ol.phishing-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0.5rem; font-size: 0.9rem; }
ol.phishing-steps li { counter-increment: step; display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); column-gap: 0.4rem; }
ol.phishing-steps li::before { content: counter(step); display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--danger); color: var(--surface); font-weight: 700; font-size: 0.78rem; }
ol.phishing-steps code { font-size: 0.85rem; }
p.handover code { font-size: 1.6rem; letter-spacing: 0.2em; padding: 0.3rem 0.7rem; border: 1px dashed var(--line); border-radius: 6px; }

/* a new password: strength meter and the repeat check (assets/forms.js) */
.strength { display: grid; gap: 0.3rem; margin-top: -0.5rem; font-size: 0.82rem; }
.strength[hidden], .repeat-text[hidden] { display: none; }
.strength .bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.strength .bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--danger); transition: width 0.2s, background-color 0.2s; }
.strength[data-level="1"] .bar span { width: 25%; }
.strength[data-level="2"] .bar span { width: 50%; }
.strength[data-level="3"] .bar span { width: 75%; }
.strength[data-level="4"] .bar span { width: 100%; }
.strength[data-tone="good"] .bar span { background: var(--accent); }
.strength[data-tone="great"] .bar span { background: var(--success); }
.strength[data-tone="danger"] .strength-text, .repeat-text[data-tone="danger"] { color: var(--danger); }
.strength[data-tone="good"] .strength-text { color: var(--accent); }
.strength[data-tone="great"] .strength-text, .repeat-text[data-tone="good"] { color: var(--success); }
.repeat-text { margin: -0.5rem 0 0; font-size: 0.82rem; }

/* Sign in and Register drop down from the header (HTML popovers, no scripts) */
button.head-button { font-weight: 600; padding: 0.4rem 0.95rem; min-height: 0; }
[popover].popup { position: fixed; inset: 3.3rem 1rem auto auto; margin: 0; width: min(23rem, calc(100vw - 2rem)); max-height: calc(100vh - 4.5rem); overflow: auto;
  padding: 1.1rem 1.25rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg);
  box-shadow: 0 22px 60px -20px rgb(0 0 0 / 0.45); }
[popover].popup::backdrop { background: rgb(0 0 0 / 0.12); }
.popup-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.popup-head h2 { margin: 0; font-size: 1.15rem; text-transform: none; letter-spacing: 0; color: var(--fg); }
.popup .close { background: none; border: 0; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 0.2rem 0.4rem; min-height: 0; font-weight: 400; }
.popup .close:hover { color: var(--accent); filter: none; }
.popup form.stack { max-width: none; }
.popup form.stack > button[type=submit] { justify-self: stretch; }
.popup .muted { font-size: 0.88rem; margin: 0 0 0.8rem; }
.popup-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; margin: 1rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: 0.88rem; }
.popup-foot button.link { color: var(--accent); font-weight: 600; }
@media (max-width: 30rem) { [popover].popup { inset: 3.3rem 0.5rem auto 0.5rem; width: auto; } }

/* the home page, laid out like the Logbook Editor's portal */
main.wide { max-width: none; padding: 0; }
main.wide > * { padding-left: max(1.2rem, calc((100vw - 72rem) / 2)); padding-right: max(1.2rem, calc((100vw - 72rem) / 2)); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 3rem; align-items: center; padding-top: 4rem; padding-bottom: 4rem;
  background: radial-gradient(ellipse at 85% 0%, var(--tint), transparent 60%); }
@media (max-width: 56rem) { .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 2rem; } }
.hero .tag { display: inline-block; margin: 0 0 1rem; padding: 0.2rem 0.7rem; border-radius: 999px; background: var(--tint); color: var(--accent); font-size: 0.8rem; font-weight: 700; }
.hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 1rem; }
.hero .lead { font-size: 1.08rem; color: var(--muted); margin: 0 0 1.6rem; max-width: 34rem; }
.hero .cta { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero .more { margin: 0.9rem 0 0; font-size: 0.92rem; }
.hero .meta { color: var(--muted); font-size: 0.85rem; margin: 1.1rem 0 0.4rem; }
.hero .status { display: flex; gap: 0.45rem; align-items: center; font-size: 0.88rem; margin: 0; }
.hero .status svg { color: var(--accent); }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: 0 18px 50px -18px rgb(0 0 0 / 0.35); }
.shot img { display: block; width: 100%; height: auto; }
.window-bar { display: flex; gap: 6px; padding: 9px 12px; background: var(--bar); border-bottom: 1px solid var(--line); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.window-bar i:first-child { background: var(--accent); }
ul.promises { list-style: none; margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 2rem; padding-top: 1.1rem; padding-bottom: 1.1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); font-size: 0.92rem; }
ul.promises li { display: flex; gap: 0.5rem; align-items: center; }
ul.promises svg { color: var(--accent); }
.band { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.band.tinted { background: var(--bar); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2.title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); text-transform: none; letter-spacing: -0.01em; color: var(--fg); text-align: center; margin: 0 0 0.8rem; }
.band .sub { text-align: center; color: var(--muted); max-width: 40rem; margin: 0 auto 2.2rem; }
.band .also { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 1.8rem; }
.flow { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.8rem; }
.flow .box { display: grid; justify-items: center; gap: 0.3rem; text-align: center; width: 12.5rem; padding: 1.3rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.flow .box.middle { border-color: var(--accent); background: var(--tint); }
.flow .box .muted { font-size: 0.82rem; }
.link-arrows { color: var(--accent); }
@media (max-width: 44rem) { .flow { flex-direction: column; gap: 0.5rem; } .link-arrows svg { transform: rotate(90deg); } }
.badge-icon { display: inline-flex; padding: 0.45rem; border-radius: 8px; background: var(--accent); color: var(--accent-fg); }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.6rem 3rem; max-width: 60rem; margin: 0 auto; }
.points.three { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); max-width: none; margin-top: 2rem; }
.point { display: flex; gap: 0.9rem; align-items: flex-start; }
.point p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.93rem; }
svg.accent { color: var(--accent); flex: none; margin-top: 0.15rem; }
ul.cards { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 56rem) { ul.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { ul.cards { grid-template-columns: minmax(0, 1fr); } }
ul.cards .card { display: grid; gap: 0.5rem; justify-items: start; padding: 1.3rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
ul.cards .card strong { font-size: 1.02rem; margin-top: 0.3rem; }
ul.cards .card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 46rem; margin: 0 auto; }
@media (max-width: 40rem) { .downloads { grid-template-columns: minmax(0, 1fr); } }
a.download-card { display: grid; gap: 0.35rem; justify-items: start; padding: 1.4rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); text-decoration: none; }
a.download-card:hover { border-color: var(--accent); box-shadow: 0 10px 30px -18px rgb(0 0 0 / 0.35); }
a.download-card strong { font-size: 1.05rem; margin-top: 0.4rem; }
a.download-card .go { display: inline-flex; gap: 0.4rem; align-items: center; margin-top: 0.6rem; color: var(--accent); font-weight: 600; }
.account { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-top: 2.2rem; }
@media (max-width: 52rem) { .account { grid-template-columns: minmax(0, 1fr); } }
.plan { padding: 1.5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px -18px rgb(0 0 0 / 0.3); }
.plan-head { margin: 0 0 0.9rem; font-weight: 700; }
ul.quota { list-style: none; padding: 0; margin: 0 0 1.3rem; display: grid; gap: 0.7rem; }
ul.quota li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.8rem; align-items: baseline; }
ul.quota strong { font-family: var(--mono); font-size: 1.3rem; color: var(--accent); }
ul.quota span { color: var(--muted); font-size: 0.92rem; }
.small { font-size: 0.85rem; }
ol.steps-row { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
ol.steps-row li { display: flex; gap: 0.9rem; align-items: flex-start; }
ol.steps-row p { margin: 0.2rem 0 0; }
.num { flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; }
footer.site { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; align-items: center; padding-top: 1.6rem; padding-bottom: 2.2rem; border-top: 1px solid var(--line); font-size: 0.88rem; }
.brand-small { display: inline-flex; gap: 0.35rem; align-items: center; font-weight: 700; }
.brand-small svg { fill: var(--accent); }

/* ---- the user panel (designed 2026-11-19): menu drawer, page, statistics drawer ---- */
main.app-page { max-width: none; margin: 0; padding: 0; }
.drawer-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drawer-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); cursor: pointer; }
.drawer-button:hover { background: var(--surface); color: var(--accent); }
.drawer-toggle:focus-visible ~ .app .drawer-title, .drawer-toggle:focus-visible + .drawer-toggle ~ .app { outline: none; }
header .person { font-family: var(--mono); font-weight: 600; color: var(--fg); text-decoration: none; }
header .person:hover { color: var(--accent); }
button.sign-out { display: inline-flex; gap: 0.45rem; align-items: center; min-height: 0; height: 2.4rem; padding: 0 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); font-weight: 600; }
button.sign-out:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.app { display: flex; align-items: stretch; min-height: calc(100vh - 3.5rem); }
.drawer { flex: none; box-sizing: border-box; display: flex; flex-direction: column; background: var(--surface); }
.drawer-nav { width: 15.5rem; gap: 0.2rem; padding: 1.2rem 0.9rem; border-right: 1px solid var(--line); }
.drawer-stats { width: 19.5rem; gap: 1.4rem; padding: 1.5rem 1.4rem; border-left: 1px solid var(--line); }
.app-main { flex: 1; min-width: 0; box-sizing: border-box; padding: 1.7rem 2rem 3rem; display: flex; flex-direction: column; gap: 1.5rem; }
body:has(#drawer-nav:checked) .drawer-nav, body:has(#drawer-stats:checked) .drawer-stats { display: none; }
@media (max-width: 64rem) {
  .drawer-stats { display: none; }
  body:has(#drawer-stats:checked) .drawer-stats { display: flex; position: fixed; z-index: 20; top: 3.5rem; right: 0; bottom: 0; overflow-y: auto; box-shadow: -18px 0 50px -20px rgb(0 0 0 / 0.4); }
}
@media (max-width: 48rem) {
  .drawer-nav { display: none; }
  body:has(#drawer-nav:checked) .drawer-nav { display: flex; position: fixed; z-index: 20; top: 3.5rem; left: 0; bottom: 0; overflow-y: auto; box-shadow: 18px 0 50px -20px rgb(0 0 0 / 0.4); }
  .app-main { padding: 1.2rem 1rem 2.5rem; }
  header .person { display: none; }
}
.drawer-nav .who { display: flex; align-items: center; gap: 0.7rem; padding: 0.2rem 0.6rem 1rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.avatar { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--tint); color: var(--accent); display: grid; place-items: center; font-weight: 700; }
.drawer-nav > a:not(.button) { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: 8px; color: var(--fg); text-decoration: none; }
.drawer-nav > a:not(.button):hover { background: var(--bar); }
.drawer-nav > a[aria-current=page] { background: var(--tint); color: var(--accent); font-weight: 600; }
.drawer-nav .label { flex: 1; }
.drawer-nav .count { font-size: 0.78rem; color: var(--muted); }
.drawer-nav .badge-count { min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem; box-sizing: border-box; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.drawer-nav .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--danger); }
.drawer-nav hr { border: 0; border-top: 1px solid var(--line); margin: 0.6rem 0.3rem; width: auto; }
.drawer-nav .grow { flex: 1; min-height: 1rem; }
.drawer-nav a.button.go { justify-content: center; padding: 0.7rem; margin-top: 0.4rem; }
.drawer-title, .group > h2, .settings h2 { margin: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.page-head h1 { margin: 0; font-size: 1.65rem; }
.page-head p { margin: 0.25rem 0 0; }
.crumbs { margin: -0.6rem 0 0; font-size: 0.9rem; }
.crumbs a { text-decoration: none; }
.person { font-family: var(--mono); font-weight: 600; }
.empty { padding: 2rem; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; }

/* slot colours: the same on a card and in the chart */
.c0 { --slot: #c2410c; } .c1 { --slot: #7a5c3e; } .c2 { --slot: #2f6f73; } .c3 { --slot: #8a6d1f; } .c4 { --slot: #6b4c9a; } .c5 { --slot: #9f3a5d; } .cs { --slot: #6b6b64; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c0 { --slot: #f0773a; } :root:not([data-theme="light"]) .c1 { --slot: #c49a72; } :root:not([data-theme="light"]) .c2 { --slot: #5fb3b8; } :root:not([data-theme="light"]) .c3 { --slot: #d6b45a; } :root:not([data-theme="light"]) .c4 { --slot: #a98ad6; } :root:not([data-theme="light"]) .c5 { --slot: #e07a9c; } :root:not([data-theme="light"]) .cs { --slot: #a3a39b; } }
:root[data-theme="dark"] .c0 { --slot: #f0773a; } :root[data-theme="dark"] .c1 { --slot: #c49a72; } :root[data-theme="dark"] .c2 { --slot: #5fb3b8; } :root[data-theme="dark"] .c3 { --slot: #d6b45a; } :root[data-theme="dark"] .c4 { --slot: #a98ad6; } :root[data-theme="dark"] .c5 { --slot: #e07a9c; } :root[data-theme="dark"] .cs { --slot: #a3a39b; }

/* cards: every card has the same rows in the same places */
.group { display: flex; flex-direction: column; gap: 0.75rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.cards.single { grid-template-columns: minmax(0, 1fr); }
.slot-card { height: 16.75rem; box-sizing: border-box; display: grid; grid-template-rows: 2.75rem 2.6rem 1.25rem 1.75rem minmax(0, 1fr) 2.5rem; row-gap: 0.75rem; padding: 1.1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.slot-card .row { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.slot-card .head { gap: 0.75rem; }
.slot-card .kind-icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 10px; display: grid; place-items: center; color: var(--slot); background: color-mix(in srgb, var(--slot) 13%, var(--surface)); }
.slot-card .title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.slot-card h3 { margin: 0; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-card h3 a { color: var(--fg); text-decoration: none; }
.slot-card h3 a:hover { color: var(--accent); }
.slot-card .title .muted { font-size: 0.85rem; }
.slot-card .more { flex: none; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.slot-card .more:hover { background: var(--bar); color: var(--accent); }
.slot-card .use { display: grid; grid-template-columns: 1fr auto; row-gap: 0.4rem; font-size: 0.85rem; }
.slot-card .use .amount { font-family: var(--mono); }
svg.usage { grid-column: 1 / -1; width: 100%; height: 0.7rem; }
svg.usage .fill { fill: var(--slot); }
svg.usage .outline { fill: none; stroke: var(--slot); stroke-width: 2; }
.slot-card .mode { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.slot-card .mode span { overflow: hidden; text-overflow: ellipsis; }
.slot-card .mode svg { flex: none; }
.slot-card .people { overflow: hidden; flex-wrap: nowrap; }
.slot-card .people .person, .member-list .person { height: 1.65rem; padding: 0 0.6rem; border-radius: 999px; font-size: 0.78rem; display: inline-flex; align-items: center; white-space: nowrap; }
.person.on { background: color-mix(in srgb, var(--success) 13%, var(--surface)); color: var(--success); }
.person.off { background: var(--bar); color: var(--muted); text-decoration: line-through; }
.person.me { background: var(--bar); color: var(--fg); }
.person.owner { background: var(--tint); color: var(--accent); }
.slot-card .people .muted { font-size: 0.78rem; white-space: nowrap; }
.slot-card .foot { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 0.6rem; font-size: 0.85rem; }
.slot-card .foot .muted, .slot-card .foot .state { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-card .action { font-weight: 600; text-decoration: none; white-space: nowrap; }
.state.bad { color: var(--danger); font-weight: 600; }
.state.warn { color: var(--accent); font-weight: 600; }
.slot-card .foot .state.bad { white-space: normal; font-size: 0.75rem; line-height: 1.25; }
a.free-card { height: 16.75rem; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: 1.2rem; border-radius: 12px; border: 2px dashed var(--line); color: var(--muted); text-align: center; text-decoration: none; font-size: 0.85rem; }
a.free-card:hover { border-color: var(--accent); }
a.free-card strong { color: var(--fg); font-size: 1rem; }
a.free-card .plus { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); }
.inline-form { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0; }
.inline-form button, .row-form button { min-height: 2.25rem; padding: 0.3rem 0.85rem; }
button.quiet { background: var(--surface); color: var(--fg); border-color: var(--line); font-weight: 500; }
button.quiet:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.slot-card .inline-form button { min-height: 2rem; }

/* what waits for an answer */
.waiting { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; padding: 0.85rem 1.1rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.waiting > svg { color: var(--accent); flex: none; }
.waiting p { margin: 0; flex: 1 1 18rem; }
ul.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
ul.rows li { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
ul.rows li:last-child { border-bottom: 0; }
ul.rows li > span { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* a slot's settings: a dialog over the slots page (no script: the server draws it open) */
body:has(.dialog-backdrop) { overflow: hidden; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 40; overflow-y: auto; padding: 4vh 1rem; box-sizing: border-box; background: rgb(20 20 18 / 0.5); }
.backdrop-close { position: fixed; inset: 0; cursor: default; }
.dialog { position: relative; width: min(64rem, 100%); margin: 0 auto; box-sizing: border-box; padding: 1.4rem 1.6rem 1.6rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.5); display: flex; flex-direction: column; gap: 1rem; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dialog-head h2 { margin: 0; font-size: 1.4rem; text-transform: none; letter-spacing: -0.01em; color: var(--fg); }
.dialog .close { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 8px; color: var(--muted); font-size: 1.6rem; line-height: 1; text-decoration: none; }
.dialog .close:hover { background: var(--bar); color: var(--accent); }
@media (max-width: 48rem) { .dialog-backdrop { padding: 0; } .dialog { border-radius: 0; min-height: 100%; padding: 1rem; } }

/* the dialog's parts, one below another, each larger and in more detail */
.dialog-head { gap: 0.9rem; }
.dialog-head .kind-icon { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 10px; display: grid; place-items: center; color: var(--slot); background: color-mix(in srgb, var(--slot) 13%, var(--surface)); }
.dialog-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dialog-parts { display: flex; flex-direction: column; gap: 1rem; }
.dialog-parts .card.setting h2, .settings .card.setting h2 { font-size: 0.85rem; margin: 0 0 0.9rem; }
form.stack.wide { max-width: none; }
form.stack.wide > label, form.stack.wide > fieldset { max-width: 40rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
fieldset.colours { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; background: none; }
fieldset.colours legend { font-size: 0.87rem; color: var(--muted); margin-bottom: 0.5rem; padding: 0; }
label.colour-choice { position: relative; display: block; }
label.colour-choice input { position: absolute; opacity: 0; }
label.colour-choice > span[aria-hidden] { display: block; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--slot); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
label.colour-choice input:checked + span { box-shadow: 0 0 0 3px var(--slot); }
label.colour-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }
label.colour-own { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0.85rem 0.2rem 0.2rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: 0.9rem; cursor: pointer; }
label.colour-own input[type=radio] { position: absolute; opacity: 0; }
label.colour-own input[type=color] { width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
label.colour-own input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
label.colour-own input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
label.colour-own input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
label.colour-own:has(input[type=radio]:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
label.colour-own:has(input[type=radio]:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.big-usage { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.2rem; }
svg.big-bar { width: 100%; height: 2.2rem; }
svg.big-bar .fill { fill: var(--slot); }
svg.big-bar .outline { fill: none; stroke: var(--slot); stroke-width: 2.5; }
svg.big-bar .limit { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 4; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 0.6rem; }
.figure { padding: 0.7rem 0.85rem; border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 0.15rem; }
.figure span { font-size: 0.78rem; color: var(--muted); }
.figure strong { font-family: var(--mono); font-size: 1.3rem; }
.figure.strong { background: color-mix(in srgb, var(--slot) 12%, var(--surface)); }
.stepper-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.stepper-row .label { font-size: 0.87rem; color: var(--muted); }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.stepper button.step-button { min-height: 3rem; width: 3rem; padding: 0; border: 0; border-radius: 0; font-size: 1.5rem; font-weight: 600; }
.stepper input.size-input { width: 8rem; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-family: var(--mono); font-size: 1.3rem; font-weight: 700; }
.table-box { border: 1px solid var(--line); border-radius: 10px; margin: 0.6rem 0 1rem; overflow-x: auto; }
.badge.warn { background: var(--tint); color: var(--accent); }
.inline-form button.danger, .table-box button.danger { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
.inline-form button.danger:hover { background: var(--danger); color: var(--surface); }

/* a slot's own page and the new-slot form */
.slot-page { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 70rem) { .slot-page { grid-template-columns: minmax(0, 1fr); } }
.settings { display: flex; flex-direction: column; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem; }
.card.setting h2 { margin-bottom: 0.8rem; }
.card.setting form.stack { max-width: 32rem; }
.card.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.form-card { display: grid; gap: 1rem; max-width: 40rem; }
.form-actions { display: flex; gap: 1rem; align-items: center; }
fieldset.kinds, fieldset.modes { border: 0; padding: 0; margin: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); background: none; }
fieldset.kinds legend, fieldset.modes legend { font-size: 0.87rem; color: var(--muted); margin-bottom: 0.4rem; padding: 0; }
label.kind-choice, label.mode-choice { display: block; position: relative; color: var(--fg); font-size: 1rem; }
label.kind-choice input, label.mode-choice input { position: absolute; opacity: 0; }
label.kind-choice > span, label.mode-choice > span { display: grid; gap: 0.25rem; padding: 0.9rem 1rem; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; height: 100%; box-sizing: border-box; }
label.kind-choice > span svg, label.mode-choice > span svg { color: var(--accent); }
label.kind-choice .muted, label.mode-choice .muted { font-size: 0.82rem; }
label.kind-choice input:checked + span, label.mode-choice input:checked + span { border-color: var(--accent); background: var(--tint); }
label.kind-choice input:focus-visible + span, label.mode-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset.modes .growth { grid-column: 1 / -1; display: none; gap: 0.8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
fieldset.modes:has(input[value=growing]:checked) .growth { display: grid; }
ul.member-list { list-style: none; margin: 0.6rem 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
ul.member-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
ul.member-list li:last-child { border-bottom: 0; }
ul.member-list .pos { color: var(--muted); font-family: var(--mono); font-size: 0.85rem; }
ul.member-list .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.4rem; }
ul.member-list select { min-height: 2.25rem; padding: 0.3rem 0.5rem; }
.pending { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; color: var(--muted); }
.row-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.row-form label { flex: 1 1 12rem; }
.row-form button { min-height: 2.6rem; }

.table-box { overflow-x: auto; }
.settings > .card ul.devices { margin: 0 0 0.8rem; }

/* the statistics drawer */
.stat-slots { display: flex; align-items: center; gap: 1rem; }
.stat-slots div { display: flex; flex-direction: column; }
.stat-slots span { color: var(--muted); font-size: 0.85rem; }
svg.slots-ring .track { fill: none; stroke: var(--bar); stroke-width: 10; }
svg.slots-ring .value { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; }
svg.slots-ring text { font-family: var(--mono); font-size: 17px; font-weight: 700; fill: var(--fg); }
.stat-space { display: flex; flex-direction: column; gap: 0.7rem; }
.ring-box { display: flex; justify-content: center; }
svg.ring .ring-fill { fill: var(--slot); }
svg.ring .ring-outline { fill: none; stroke: var(--slot); stroke-width: 2; stroke-linejoin: round; }
svg.ring .ring-free { fill: var(--line); }
svg.ring .ring-big { font-family: var(--mono); font-size: 26px; font-weight: 700; fill: var(--fg); }
svg.ring .ring-slot { fill: var(--slot); }
svg.ring .ring-slot-free { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 4 3; }
svg.ring .ring-slots { font-family: var(--mono); font-size: 12px; font-weight: 600; fill: var(--fg); }
.swatch.slots { border: 0; border-radius: 50%; width: 0.75rem; background: conic-gradient(var(--accent) 0 66%, var(--line) 66% 100%); }
svg.ring .ring-small { font-size: 12px; fill: var(--muted); }
ul.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.82rem; }
ul.legend li { display: flex; align-items: center; gap: 0.5rem; }
ul.legend .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.legend .amount { font-family: var(--mono); white-space: nowrap; }
.swatch { flex: none; width: 1.1rem; height: 0.75rem; border-radius: 3px; border: 2px solid var(--slot); box-sizing: border-box; background: linear-gradient(90deg, var(--slot) 55%, transparent 55%); }
.swatch.free { border: 0; background: var(--line); }
p.rule { margin: 0; font-size: 0.75rem; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.tile { padding: 0.7rem; border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 0.1rem; }
.tile strong { font-family: var(--mono); font-size: 1.25rem; }
.tile span { font-size: 0.75rem; color: var(--muted); }
.stat-security { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem; }
.stat-security .sec { display: flex; gap: 0.6rem; margin: 0; padding: 0.7rem; border-radius: 10px; }
.stat-security .sec svg { flex: none; }
.stat-security .sec.warn { background: var(--tint); }
.stat-security .sec.warn svg { color: var(--danger); }
.stat-security .sec.ok { background: color-mix(in srgb, var(--success) 10%, var(--surface)); }
.stat-security .sec.ok svg { color: var(--success); }
.stat-security .pair { display: flex; justify-content: space-between; margin: 0; }
.stat-security .bad { color: var(--danger); font-weight: 700; }

/* tables like the application's QSO list */
table.activity, table.people-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
table.activity th, table.people-table th { text-align: left; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: none; color: var(--fg); background: var(--bg); padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.activity td, table.people-table td { text-align: left; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.activity tbody tr:last-child td, table.people-table tbody tr:last-child td { border-bottom: 0; }
table.activity tbody tr:hover td, table.people-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
table.activity tbody tr.selected td, table.people-table tbody tr.selected td { background: var(--tint); }
table.activity tbody tr.selected td:first-child, table.people-table tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.activity td:first-child, table.activity td.mono { font-family: var(--mono); white-space: nowrap; }
table.activity td:first-child a { font-weight: 700; text-decoration: none; }
table.people-table .pos { font-family: var(--mono); color: var(--muted); width: 2.5rem; white-space: nowrap; }
table.people-table .pos .state-dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.4rem; vertical-align: middle; background: var(--success); }
table.people-table tr.off .state-dot { background: var(--line); }
table.people-table tr.invited .state-dot { background: var(--accent); }
table.people-table .person { background: none; padding: 0; height: auto; border-radius: 0; font-size: 0.9rem; font-weight: 700; color: var(--fg); }
table.people-table tr.off .person { color: var(--muted); text-decoration: line-through; }
table.people-table tr.invited td { color: var(--muted); }
table.people-table .access { display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
table.people-table select { min-height: 2rem; padding: 0.2rem 0.45rem; font-size: 0.85rem; }
table.people-table button { min-height: 2rem; padding: 0.15rem 0.7rem; font-size: 0.85rem; }
table.people-table td.end { text-align: right; }
.table-box { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; overflow-x: auto; margin: 0.6rem 0 1rem; }
@media (max-width: 40rem) { table { display: block; overflow-x: auto; } }
