/* Endpaper Panel. Copyright (c) 2026 Alien Tech Services LLC. All rights reserved. */
/* Instrument Sans for text, JetBrains Mono for paths, IPs and code. Both
   ship with the panel, so it never loads anything from the internet. */
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root, [data-theme="light"] {
  --paper:#EEF1F4; --surface:#FFFFFF; --surface-2:#F7F9FB; --ink:#17212B; --muted:#4A5563; --faint:#5B6675; --line:#D9DFE6; --line-soft:#E6EAEF;
  --input-line:#7D8896; --accent-text:#0E6B6B; --accent-fill:#0E6B6B; --on-fill:#FFFFFF; --good:#11612F; --good-bg:#E5F4EA;
  --warn:#7A4200; --warn-fill:#A65A00; --warn-bg:#FFF8EC; --warn-line:#E8C58F; --warn-ink:#5C3A0A; --select-bg:#E1F0EF; --select-ink:#0A4F4F;
  --track-off:#B6C0CB; --toast-bg:#17212B; --toast-fg:#FFFFFF; --toast-line:#5B6675; --bad:#9A1D14; --bad-bg:#FBE4E1; --info-bg:#E1F0EF; --info:#0A4F4F;
  --rail:#17212B; --rail-ink:#C5CFDA; --rail-head:#8B97A6; --rail-hover:#223040; --rail-on:#0E6B6B; --shadow:0 1px 2px rgba(23,33,43,.06);
  color-scheme: light;
}
[data-theme="dark"] {
  --paper:#0F161D; --surface:#17212B; --surface-2:#1C2733; --ink:#E6ECF2; --muted:#A9B4C0; --faint:#93A0AD; --line:#2A3744; --line-soft:#222E3A;
  --input-line:#5E6B78; --accent-text:#6FC7C2; --accent-fill:#138080; --on-fill:#FFFFFF; --good:#7FD39A; --good-bg:#15301F;
  --warn:#F2B266; --warn-fill:#B5650A; --warn-bg:#2E2213; --warn-line:#5A4220; --warn-ink:#EBD2B0; --select-bg:#173634; --select-ink:#BEE9E6;
  --track-off:#3B4856; --toast-bg:#E6ECF2; --toast-fg:#0F161D; --toast-line:#93A0AD; --bad:#F29A90; --bad-bg:#3A1C19; --info-bg:#173634; --info:#BEE9E6;
  --rail:#0B1117; --rail-ink:#C5CFDA; --rail-head:#8B97A6; --rail-hover:#18232E; --rail-on:#138080; --shadow:none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --paper:#0F161D; --surface:#17212B; --surface-2:#1C2733; --ink:#E6ECF2; --muted:#A9B4C0; --faint:#93A0AD; --line:#2A3744; --line-soft:#222E3A;
    --input-line:#5E6B78; --accent-text:#6FC7C2; --accent-fill:#138080; --on-fill:#FFFFFF; --good:#7FD39A; --good-bg:#15301F;
    --warn:#F2B266; --warn-fill:#B5650A; --warn-bg:#2E2213; --warn-line:#5A4220; --warn-ink:#EBD2B0; --select-bg:#173634; --select-ink:#BEE9E6;
    --track-off:#3B4856; --toast-bg:#E6ECF2; --toast-fg:#0F161D; --toast-line:#93A0AD; --bad:#F29A90; --bad-bg:#3A1C19; --info-bg:#173634; --info:#BEE9E6;
    --rail:#0B1117; --rail-ink:#C5CFDA; --rail-head:#8B97A6; --rail-hover:#18232E; --rail-on:#138080; --shadow:none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; }
a { color: var(--accent-text); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.noscript { padding: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout: a dark menu on the left, a white bar on top, the screen below. */
.frame { display: flex; min-height: 100vh; }
.side { flex: 0 0 252px; max-width: 100%; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px 24px; display: flex; flex-direction: column; gap: 14px;
  background: var(--rail); color: var(--rail-ink); scrollbar-width: thin; scrollbar-color: #3A4756 transparent; }
.side .brand { color: #FFFFFF; font-size: 16px; padding: 4px 8px 6px; }
.side .brand svg { color: #FFFFFF; background: var(--rail-on); border-radius: 7px; padding: 4px; width: 28px; height: 28px; }
.workspace { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; min-height: 60px; padding: 8px 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.2px; }
.brand svg { width: 26px; height: 26px; color: var(--accent-text); }
.top-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.top-tools.grow { flex: 1 1 auto; justify-content: flex-end; }
.shell { display: flex; flex-wrap: wrap; align-items: flex-start; }
.main { flex: 1 1 auto; min-width: 0; padding: 24px 28px 72px; display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1400px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1 1 auto; }
.tab { min-height: 42px; padding: 0 14px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab[aria-current="page"] { color: var(--select-ink); border-bottom-color: var(--accent-fill); }
.tab:hover { color: var(--ink); }

/* Menu */
.navgroup { display: flex; flex-direction: column; gap: 1px; }
.navhead { font-size: 12px; font-weight: 600; color: var(--rail-head); padding: 4px 10px 4px; letter-spacing: .2px; }
.nav, .navcat { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer; text-align: start; color: var(--rail-ink); font-weight: 500; }
.nav:hover, .navcat:hover { background: var(--rail-hover); color: #FFFFFF; }
.nav[aria-current="page"], .nav[aria-current="page"]:hover { background: var(--rail-on); color: #FFFFFF; font-weight: 600; }
.nav svg, .navcat svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .count { margin-inline-start: auto; font-size: 12px; color: var(--rail-head); font-weight: 500; }
.nav[aria-current="page"] .count { color: #D4ECEA; }
.nav.alert .count { color: #FFB4AB; font-weight: 700; }
.nav small { color: var(--rail-head); font-size: 12px; }
.navcat { font-weight: 600; }
.navcat .chev { margin-inline-start: auto; display: flex; transition: transform .15s; }
.navcat .chev svg { width: 14px; height: 14px; }
.navcat[aria-expanded="true"] .chev { transform: rotate(90deg); }
.navgroup:not(:has(.navhead)) + .navgroup:not(:has(.navhead)) { margin-top: -13px; }
.navsub { display: flex; flex-direction: column; gap: 1px; margin-block: 1px 4px; }
.side .rail-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--rail-head); }
.top-left { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; font-weight: 600; }
.menu-btn svg { width: 20px; height: 20px; }
.server-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-weight: 600; max-width: 100%; }
.server-chip .mono { color: var(--muted); font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; display: inline-block; }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn-fill); }
.who { position: relative; }
.who > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; border-radius: 999px; padding: 2px 10px 2px 2px; border: 1px solid transparent; }
.who > summary::-webkit-details-marker { display: none; }
.who > summary:hover { border-color: var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-fill); color: var(--on-fill); display: grid; place-items: center; font-weight: 700; text-transform: uppercase; flex: none; }
.who-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 32px rgba(15,22,29,.18); }
.who-menu .seg { align-self: stretch; }
.who-menu .seg button { flex: 1 1 0; }

/* Type */
h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -0.4px; }
h1.hero { font-size: 30px; line-height: 1.15; letter-spacing: -0.5px; max-width: 28ch; }
h2 { margin: 0; font-size: 17px; line-height: 1.3; }
h3 { margin: 0; font-size: 15px; }
.sub { margin: 4px 0 0; color: var(--muted); }
.quiet { color: var(--muted); }
.faint { color: var(--faint); font-size: 13px; }
.mono, code { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.status-good { display: flex; align-items: center; gap: 8px; color: var(--good); font-weight: 700; }
.status-good svg { width: 20px; height: 20px; }

/* Panels and rows */
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.row-wrap > * { flex: 1 1 320px; min-width: 0; }
.row-wrap > .wide { flex: 2 1 480px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.panel.pad { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.panel.focus { border: 1.5px solid var(--accent-fill); }
.panel.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { font-size: 16px; }
.panel-head .end { margin-inline-start: auto; }
.item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.item:first-child { border-top: 0; }
.item .grow { flex: 1 1 260px; min-width: 0; }
.item-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 10px 16px; border: 0; border-top: 1px solid var(--line-soft); background: var(--surface); cursor: pointer; text-align: start; }
.item-btn:first-child { border-top: 0; }
.item-btn strong { color: var(--ink); display: block; font-weight: 600; }
.item-btn span.hint { color: var(--muted); font-size: 13.5px; }
.item-btn:hover { background: var(--surface-2); }
.item-btn svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line-soft); }
.kv:first-child { border-top: 0; }
.ok { color: var(--good); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.warn-t { color: var(--warn); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.6; }
.pill.ok { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.pill.off { background: var(--line-soft); color: var(--muted); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }

/* Health tiles: one number, one bar, one line of context */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.tile .l { color: var(--muted); font-size: 13px; font-weight: 600; }
.tile .v { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.2; }
.tile .v small { font-size: 14px; font-weight: 500; color: var(--muted); }
.tile .faint { font-size: 12.5px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: start; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
td { padding: 10px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.actions { text-align: end; white-space: nowrap; }
td .cell-main { font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-align: start; }
td .cell-main:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
td .cell-sub { display: block; color: var(--muted); font-size: 12.5px; font-family: "Instrument Sans", system-ui, sans-serif; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px;
  background: var(--accent-fill); color: var(--on-fill); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13.5px; }
.btn.line, .btn.quiet { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.line:hover, .btn.quiet:hover { border-color: var(--input-line); filter: none; background: var(--surface-2); }
.btn.quiet { color: var(--muted); }
.btn.warn { background: var(--warn-fill); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .55; cursor: progress; }
.link { background: none; border: 0; padding: 0; min-height: 36px; color: var(--accent-text); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; align-self: flex-start; }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field input, .field select, .field textarea, input.plain { min-height: 40px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 9px; background: var(--surface); font-weight: 400; width: 100%; }
.field textarea, textarea.code { padding: 12px 14px; min-height: 360px; font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px; resize: vertical; width: 100%; border: 1px solid var(--input-line); border-radius: 9px; background: var(--surface); }
.fields { display: flex; flex-wrap: wrap; gap: 14px; }
.fields > * { flex: 1 1 220px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button:not(.btn) { min-height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.pills button:not(.btn):hover { border-color: var(--input-line); }
.pills button:not(.btn)[aria-pressed="true"] { background: var(--select-bg); color: var(--select-ink); border-color: var(--accent-fill); }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--line-soft); }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; font-size: 13.5px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.switch { display: flex; align-items: center; gap: 10px; min-height: 40px; border: 0; background: transparent; cursor: pointer; font-weight: 600; padding: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 11px; background: var(--track-off); display: flex; align-items: center; padding: 3px; flex: none; }
.switch .knob { width: 16px; height: 16px; border-radius: 8px; background: #fff; }
.switch[aria-checked="true"] .track { background: var(--accent-fill); justify-content: flex-end; }
.bar { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent-fill); border-radius: 4px; }
.bar.warn > i { background: var(--warn-fill); }
.bar.bad > i { background: var(--bad); }
.steps { display: flex; align-items: center; gap: 12px; }
.steps b { color: var(--accent-text); }
.steps .bar { flex: 1 1 auto; height: 6px; }

/* Messages: a fixed bar at the bottom, so nothing on the page moves */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; width: min(640px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 10px; background: var(--toast-bg); color: var(--toast-fg); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.toast span { flex: 1 1 auto; }
.toast.error { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad); }
.toast.inline { box-shadow: none; }
.toast button { min-height: 36px; padding: 0 12px; border: 1px solid var(--toast-line); border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font-weight: 600; }
.toast button.undo { border-color: currentColor; }
/* Long jobs: a card at the bottom left with the running time */
.tray { position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 30; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100% - 40px)); }
.job { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--accent-fill); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.job strong { display: block; }
.spin { flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent-text); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.busy { cursor: progress; opacity: .6; }
.btn.danger-fill { background: var(--bad); color: var(--surface); }
/* Dialogs */
dialog.dlg { width: min(520px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surface); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(15, 22, 29, .55); }
dialog.dlg h2 { font-size: 20px; }
dialog.dlg p.bad:empty { display: none; }
.pills.end { justify-content: flex-end; }
/* Search */
.search-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; font-weight: 500; }
.search-btn.wide { flex: 1 1 280px; max-width: 560px; justify-content: flex-start; }
.search-btn.wide kbd { margin-inline-start: auto; }
.search-btn:hover { border-color: var(--input-line); }
.search-btn svg { width: 17px; height: 17px; }
kbd { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--faint); }
dialog.search { margin-top: 10vh; width: min(640px, calc(100% - 32px)); }
.results { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }
.result { display: flex; align-items: baseline; gap: 12px; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; text-align: start; cursor: pointer; }
.result[aria-selected="true"], .result:hover { background: var(--select-bg); color: var(--select-ink); }
.result .kind { flex: none; width: 76px; font-size: 12.5px; font-weight: 600; color: var(--faint); }

/* Website page */
.sub-tabs { border-bottom: 1px solid var(--line); flex: none; }
.site-body > .stack-lg > div > h1, .site-body h1 { font-size: 22px; }
.row-end { display: flex; align-items: center; gap: 10px; flex: none; }
.danger-zone { border-color: var(--bad); }
.field.static { display: flex; flex-direction: column; gap: 6px; font-weight: 600; justify-content: flex-start; }
.field.static .quiet { min-height: 40px; display: flex; align-items: center; font-weight: 400; }
.gap { display: inline-block; width: 12px; }
.breadcrumb [aria-current="page"] { font-weight: 600; padding: 4px; }
/* "Needs you": each problem with the button that fixes it */
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 12px 16px; border-top: 1px solid var(--line-soft); background: var(--surface); }
.notice:first-child { border-top: 0; }
.notice > div { flex: 1 1 320px; min-width: 0; display: flex; gap: 12px; align-items: flex-start; }
.notice strong { display: block; }
.notice .quiet { color: var(--muted); font-size: 13.5px; }
.panel.warn .notice { background: transparent; border-top-color: var(--warn-line); }
.panel.warn .notice .quiet { color: var(--warn-ink); }
.secret { padding: 12px 14px; border-radius: 10px; background: var(--toast-bg); color: var(--toast-fg); font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }

/* Sign-in */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.card h1 { font-size: 26px; }
.card .brand { margin-bottom: 4px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb button { border: 0; background: none; color: var(--accent-text); cursor: pointer; font-weight: 600; padding: 4px; }
.empty { padding: 24px 16px; color: var(--muted); }

@media (max-width: 960px) {
  .frame { display: block; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50; width: min(300px, 86vw); height: 100vh; display: none; box-shadow: 0 0 0 100vmax rgba(15,22,29,.5); }
  .side.open { display: flex; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 720px) {
  h1.hero { font-size: 26px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .v { font-size: 20px; }
  .main { padding: 18px 16px 96px; }
  .top-in { padding: 8px 16px; }
  .server-chip .mono, .who > summary .who-name { display: none; }
  .search-btn kbd, .search-btn span { display: none; }
  .search-btn.wide { flex: 0 0 auto; }
  .tray { left: 16px; right: 16px; bottom: 84px; }
  /* Tables marked cards show one card per row on a phone. */
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
  table.cards td { border: 0; padding: 3px 16px; }
  table.cards td.actions { text-align: start; }
  table.cards td.actions .pills { flex-wrap: wrap; }
  /* Touch targets at least 44 px tall. */
  .btn, .btn.small, .menu-btn, .search-btn, .seg button, select, .lang-pick select, .nav, .navcat, .pills button:not(.btn), .tab { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.field textarea.short, textarea.short { min-height: 0; height: 96px; font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.chart { margin: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.chart figcaption { font-weight: 600; margin-bottom: 8px; }
.chart-svg svg { display: block; width: 100%; height: 120px; }
.chart-line { fill: none; stroke: var(--accent-fill); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-fill { fill: var(--accent-fill); opacity: .12; stroke: none; }
.acting { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line); }
.acting .top-in { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 16px; min-height: 0; }
.brand-logo { height: 28px; width: auto; max-width: 140px; object-fit: contain; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent-fill); }
.pills button:not(.btn):disabled { opacity: .6; cursor: progress; }
.mb-open { border-inline-start: 3px solid var(--accent-fill); background: var(--surface); }
.mb-open h3 { font-size: 15px; margin: 0; }
textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--input-line); border-radius: 9px; background: var(--surface); color: inherit; }
.note-bar { background: var(--info-bg); color: var(--info); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; }
.card-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lang-pick select { min-height: 36px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; width: 100%; }
[dir="rtl"] .chev svg, [dir="rtl"] .item-btn > svg:last-child, [dir="rtl"] .crumb-sep { transform: scaleX(-1); }
.bars { display: block; width: 100%; height: auto; }
.bars .bar-bg { fill: var(--surface-2); }
.bars .bar-bad { fill: var(--bad); }
.bars .bar-warn { fill: var(--warn-fill); opacity: .75; }
.bars .bar-label { fill: var(--faint); font-size: 9px; }
.pad-x { padding: 14px 16px; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.legend .key { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-inline-start: 8px; }
.legend .key.bad { background: var(--bad); }
.legend .key.warn { background: var(--warn-fill); opacity: .75; }
.tile .v.bad { color: var(--bad); }
.tile .v.warn { color: var(--warn); }
.tile .v.mono-v { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 18px; overflow-wrap: anywhere; }
td.actions .seg { display: inline-flex; }
.item p { margin: 2px 0 0; }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.panel.pad > p, .panel.pad > div > p { margin: 0; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
.chart-line.second { stroke-dasharray: 5 4; stroke: var(--warn-fill); }
.legend .key.line, .legend .key.dash { width: 18px; height: 0; border-radius: 0; border-top: 2px solid var(--accent-fill); background: none; }
.legend .key.dash { border-top: 2px dashed var(--warn-fill); }
.chart .legend { margin: 6px 0 0; }
.chart .quiet { margin: 6px 0 0; font-size: 13.5px; }
.term-out { margin: 0; padding: 14px 16px; background: var(--toast-bg); color: var(--toast-fg); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.6; max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
td .mono-sub { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; }
.stack-lg > .seg, .stack > .seg { align-self: flex-start; }
.file-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.file-tools input.plain { flex: 1 1 280px; }
.answer { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 14px 16px; line-height: 1.6; margin: 0; }
.notice .pills { flex: none; }
.field textarea.ask { font-family: inherit; font-size: 15px; min-height: 0; height: auto; }

/* Files: selection bar, row menu, drop zone, code editor */
.bulkbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--accent-fill); border-radius: 10px; background: var(--select-bg); color: var(--select-ink); }
.dropzone.over { outline: 2px dashed var(--accent-fill); outline-offset: -6px; }
details.more { position: relative; }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
.more-list { position: absolute; right: 0; z-index: 20; min-width: 190px; margin-top: 4px; padding: 6px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.more-list button { text-align: left; min-height: 36px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.more-list button:hover, .more-list button:focus-visible { background: var(--select-bg); color: var(--select-ink); }
.editor { display: flex; border: 1px solid var(--input-line); border-radius: 9px; background: var(--surface); overflow: hidden; }
.editor .gutter { margin: 0; padding: 12px 10px 12px 12px; min-width: 3.2em; text-align: right; overflow: hidden; height: 460px; font: 13px/19.5px "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; color: var(--faint, #8a8f98); background: var(--bg, transparent); border-right: 1px solid var(--line); user-select: none; }
.editor textarea.code { flex: 1; min-width: 0; height: 460px; min-height: 460px; border: 0; border-radius: 0; line-height: 19.5px; white-space: pre; overflow: auto; resize: none; }
.editor-body { position: relative; flex: 1; min-width: 0; }
.editor-body .hl { position: absolute; inset: 0; margin: 0; padding: 12px 14px 24px; overflow: hidden; white-space: pre; font: 13px/19.5px "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; color: var(--ink); pointer-events: none; }
.editor-body textarea.code { position: relative; width: 100%; background: transparent; }
.editor-body textarea.code.painted { color: transparent; caret-color: var(--ink); }
.tk-c { color: #5B6675; font-style: italic; } .tk-s { color: #0B6B3A; } .tk-n { color: #A24A00; } .tk-k { color: #5B3FA8; font-weight: 600; } .tk-t { color: #0B5CAD; }
[data-theme="dark"] .tk-c { color: #93A0AD; } [data-theme="dark"] .tk-s { color: #7FD6A0; } [data-theme="dark"] .tk-n { color: #F2B26B; } [data-theme="dark"] .tk-k { color: #BBA6F5; } [data-theme="dark"] .tk-t { color: #7DB8F5; }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .tk-c { color: #93A0AD; } [data-theme="auto"] .tk-s { color: #7FD6A0; } [data-theme="auto"] .tk-n { color: #F2B26B; }
  [data-theme="auto"] .tk-k { color: #BBA6F5; } [data-theme="auto"] .tk-t { color: #7DB8F5; }
}
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.logbox { max-height: 280px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; white-space: pre; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.rewrite-row { display: grid; grid-template-columns: 1fr 1fr 170px auto; gap: 8px; align-items: center; }
@media (max-width: 760px) { .rewrite-row { grid-template-columns: 1fr; } }
.bar { display: block; height: 10px; border-radius: 5px; background: var(--accent-fill); }
textarea.short { min-height: 96px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted, inherit); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* Messages from the hosting provider */
.notice-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--surface); }
.notice-bar.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.notice-bar > span { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }

.ctx-menu { position: fixed; z-index: 60; min-width: 200px; max-height: 80vh; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.ctx-menu button { text-align: left; min-height: 36px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.ctx-menu button:hover, .ctx-menu button:focus-visible { background: var(--select-bg); color: var(--select-ink); outline: none; }
.ctx-menu button.danger { color: var(--bad); }
.ctx-sep { height: 1px; margin: 4px 6px; background: var(--line); }

/* Running tasks */
.pbar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pbar-fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent-fill); transition: width .4s ease; }
.pbar.bad .pbar-fill { background: var(--bad); }
.pbar.wait .pbar-fill { width: 35%; animation: pbar-slide 1.4s ease-in-out infinite; }
@keyframes pbar-slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .pbar.wait .pbar-fill { animation: none; width: 100%; opacity: .5; } .pbar-fill { transition: none; } }
.task { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.task.failed { border-color: var(--bad); }
.task-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.task-pct { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.task-step { margin: 0; overflow-wrap: anywhere; }
.task-log summary { cursor: pointer; }
.task-pre { margin: 8px 0 0; max-height: 220px; overflow: auto; padding: 10px; border-radius: 8px; background: var(--bg, var(--surface)); border: 1px solid var(--line); font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.taskchip { position: relative; }
.taskchip[hidden] { display: none; }
.taskchip > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taskchip > summary::-webkit-details-marker { display: none; }
.task-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--track-off); flex: none; }
.taskchip > summary:has(.busy) .task-dot, .taskchip:has(.busy) .task-dot { background: var(--accent-fill); }
.taskchip-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(420px, 92vw); max-height: 70vh; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.22); }
