/* ————————————————————————————————————————————
   Flatout · the Hyprlab Flask design system
   Inherited from Hyprfeed's "electric editorial".

   Inter everywhere; the accent is spent only on
   new-item markers and active states.

   Rebranding: change --accent / --accent-ink (both
   themes) and the icon in static/img (see templates/partials/mark.html).
   Nothing else hardcodes a brand color.
   ———————————————————————————————————————————— */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --accent: #FFD60A;
  --accent-ink: #171300;        /* text on the accent */
  --accent-glow: rgb(255 214 10 / .35);
  --danger: #AC362E;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;
  --radius-sm: 10px;
  --topbar-h: 59px;             /* 12px padding + 34px controls + 1px rule */
  --sidebar-w: 276px;
  --shadow-1: 0 1px 2px rgb(16 16 16 / .04), 0 4px 16px rgb(16 16 16 / .05);
  --shadow-2: 0 2px 6px rgb(16 16 16 / .07), 0 14px 34px rgb(16 16 16 / .10);
}

/* Surfaces, lines and text are true greys (equal red, green and blue) in both
   themes; the accent is the only color. Each grey has the luminance of the
   warm one it replaced, so every contrast ratio is where it was. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F6F6;
  --panel: #EFEFEF;
  --surface: #FFFFFF;
  --field: #F3F3F3;
  --ink: #191919;
  --muted: #555555;
  --faint: #616161;
  --line: #E4E4E4;
  --line-strong: #D3D3D3;
  --wash: rgb(255 214 10 / .17);
  /* The chosen row (sidebar, settings, the editor's lists) and a row under
     the pointer: grey a step darker than the panel, the accent bar alone
     marking it. */
  --selected: #E2E2E2;
  --hover: #E8E8E8;
  --scrim: rgb(22 22 22 / .40);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --accent: #F7DF1E;
  /* Charcoal rather than black: lifted enough to read comfortably, with
     every text color still at 5:1 or better on each surface. */
  --bg: #202020;
  --panel: #1A1A1A;
  --surface: #292929;
  --field: #222222;
  --ink: #ECECEC;
  --muted: #B0B0B0;
  --faint: #9A9A9A;
  --danger: #EC7A70;
  --line: #373737;
  --line-strong: #474747;
  --wash: rgb(247 223 30 / .10);
  /* Grey here too, a step above the panel: the accent bar alone marks it. */
  --selected: #2F2F2F;
  --hover: #262626;
  --scrim: rgb(0 0 0 / .55);
  --shadow-1: 0 1px 2px rgb(0 0 0 / .35), 0 6px 20px rgb(0 0 0 / .30);
  --shadow-2: 0 2px 8px rgb(0 0 0 / .45), 0 18px 44px rgb(0 0 0 / .45);
}

* { box-sizing: border-box; }
/* The hidden attribute always hides, whatever display a component class sets. */
[hidden] { display: none !important; }
/* Reserve the scrollbar gutter so locking scroll for a dialog doesn't shift
   the layout sideways. */
html { height: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3, h4, p, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ————— Icons & brand ————— */
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mark { display: block; width: 26px; height: 26px; object-fit: contain; }
.mark--xl { width: 56px; height: 56px; }
.wordmark { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.brand { display: inline-flex; align-items: center; gap: 9px; }

/* ————— Buttons & fields ————— */
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  color: var(--muted); transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--wash); color: var(--ink); }
.iconbtn--sm { width: 28px; height: 28px; }
.iconbtn--sm svg { width: 17px; height: 17px; }
.iconbtn--danger:hover { background: rgb(220 70 60 / .12); color: var(--danger); }
.iconbtn.is-busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 650; font-size: 14px; letter-spacing: -0.006em;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px var(--accent-glow); }
.btn--primary:active { transform: none; }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--muted); }
.btn--ghost:hover { border-color: var(--faint); color: var(--ink); }
.btn--danger { border: 1px solid rgb(220 70 60 / .35); color: var(--danger); }
.btn--danger:hover { background: rgb(220 70 60 / .1); border-color: var(--danger); }
.btn--block { width: 100%; }
.btn--xs { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: .6; cursor: default; transform: none !important; box-shadow: none !important; }

.field { display: block; }
.field--narrow { max-width: 320px; }
.field-label {
  display: block; margin-bottom: 6px;
  font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px;
  font: inherit; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash);
}
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.hint { font-size: 13px; color: var(--muted); }
.form-error { font-size: 13.5px; color: var(--danger); font-weight: 550; }
.stack { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.stack .field { width: 100%; }
.inline-form { display: contents; }

.chip {
  display: inline-block; padding: 1px 7px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink); vertical-align: 1px;
}
.chip--muted { background: var(--field); color: var(--muted); border: 1px solid var(--line); }

/* ————— Shell layout ————— */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }

.sidebar {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 18px 14px 14px;
  overflow: hidden;
}
/* Head and foot are pinned; only the middle scrolls, so the wordmark and the
   account row never scroll out of reach on a long list. */
.sidebar-head { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 0 8px 16px; }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  /* Room for the active item's bar, which sits outside the item; the
     scroller would clip it otherwise. The items stay where they were. */
  margin-left: -8px; padding-left: 8px; }
.sidebar-close { display: none; }

.nav-primary { display: flex; flex-direction: column; gap: 2px; }
.navitem {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: background .15s, color .15s;
}
.navitem svg { width: 18px; height: 18px; }
.navitem:hover { color: var(--ink); background: var(--hover); }
.navitem.is-active { color: var(--ink); font-weight: 650; background: var(--selected); }
/* The active item's marker, in the sidebar and the settings window alike: a
   short rounded bar just outside the item, apart from it. */
.navitem.is-active::before, .settings-navitem.is-active::before {
  content: ""; position: absolute; left: -4px; top: 50%;
  width: 3px; height: 56%; translate: 0 -50%;
  border-radius: 3px; background: var(--accent);
}
.navitem .count { margin-left: auto; }
/* Content has edits not yet published: a pencil, in the row's own grey. */
.navitem .unpublished { margin-left: auto; display: grid; place-items: center; color: var(--muted); }
.navitem .unpublished svg { width: 15px; height: 15px; }
.navitem.is-active .unpublished { color: var(--ink); }
/* Site status in the sidebar: a row that opens its dialog. */
.navitem--button { width: 100%; text-align: left; }
/* The site's editors, folded away while the site is off (shell.html). */
.nav-site-off > summary { cursor: pointer; list-style: none; }
.nav-site-off > summary::-webkit-details-marker { display: none; }
.nav-site-off > summary svg { transition: transform .15s; }
.nav-site-off[open] > summary svg { transform: rotate(90deg); }
.nav-site-off > .nav-primary { margin-top: 2px; padding-left: 12px; }
.status-chip--off { background: transparent; color: var(--faint); border-style: dashed; }
.status-chip {
  margin-left: auto; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--field); color: var(--muted); border: 1px solid var(--line);
}
.status-chip--published { background: rgb(46 194 126 / .14); color: #1a7f52; border-color: transparent; }
.status-chip--maintenance { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
:root[data-theme="dark"] .status-chip--published { color: #7fe0b2; }
.tile-label .status-chip { text-transform: none; letter-spacing: .02em; }

.sidebar-label {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 6px; padding: 0 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint);
}
.sidelist { list-style: none; margin: 0; padding: 0; }
.sideitem {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--muted);
  transition: background .15s, color .15s;
}
.sideitem:hover { color: var(--ink); background: var(--wash); }
.sideitem.is-active { color: var(--ink); font-weight: 600; background: var(--wash); box-shadow: inset 3px 0 0 var(--accent); }
.sideitem-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.sidelist-empty { padding: 10px; font-size: 13px; color: var(--faint); }
.count {
  font-size: 11px; font-weight: 650; color: var(--faint);
  min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 99px;
}
.count--accent { background: var(--accent); color: var(--accent-ink); }

.sidebar-foot {
  display: flex; align-items: center; gap: 4px; flex: none;
  padding: 12px 6px 0; border-top: 1px solid var(--line);
}
.user {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  text-align: left; padding: 4px 6px; margin: -4px 0 -4px -6px;
  border-radius: var(--radius-sm); transition: background .15s;
}
.user:hover { background: var(--wash); }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font-size: 12.5px; font-weight: 700;
}

.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); backdrop-filter: blur(2px); }

/* ————— Topbar ————— */
.content { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px clamp(16px, 3.5vw, 36px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-menu { display: none; }
.context-title {
  font-size: 17px; font-weight: 750; letter-spacing: -0.02em;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.title-chip {
  display: inline-block; margin-left: 9px; padding: 2px 9px;
  border-radius: 99px; background: var(--wash);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  color: var(--muted); vertical-align: 2px;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; }

.viewswitch {
  display: flex; gap: 2px; padding: 3px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.viewswitch-btn {
  display: grid; place-items: center; width: 32px; height: 28px;
  border-radius: 7px; color: var(--faint); transition: background .15s, color .15s;
}
.viewswitch-btn svg { width: 17px; height: 17px; stroke-width: 1.6; }
.viewswitch-btn:hover { color: var(--ink); }
.viewswitch-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: none; }

/* ————— Dropdown menu ————— */
.menu { position: relative; }
.menubtn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--muted);
  font-size: 13px; font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
}
.menubtn svg { width: 16px; height: 16px; }
.menubtn .chev { width: 13px; height: 13px; transition: transform .15s; }
.menubtn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--wash); }
.menu.is-open .menubtn { color: var(--ink); border-color: var(--accent); background: var(--wash); }
.menu.is-open .menubtn .chev { transform: rotate(180deg); }
.menupop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  min-width: 210px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  animation: modal-in .16s cubic-bezier(.2, .9, .3, 1.1) both;
}
.menupop[hidden] { display: none; }
.menupop-head {
  padding: 6px 10px 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menuopt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 550; color: var(--muted);
  transition: background .12s, color .12s;
}
.menuopt svg { width: 17px; height: 17px; flex: none; }
.menuopt span { flex: 1; }
.menuopt .tick { width: 15px; height: 15px; opacity: 0; color: var(--ink); }
.menuopt:hover { background: var(--wash); color: var(--ink); }
.menuopt.is-active { color: var(--ink); font-weight: 700; }
.menuopt.is-active .tick { opacity: 1; }

/* ————— Modals ————— */
.modal, .sheet { border: 0; padding: 0; background: var(--surface); color: var(--ink); }
.modal {
  width: min(430px, calc(100vw - 32px));
  border-radius: 18px; box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
}
.modal--wide { width: min(620px, calc(100vw - 32px)); }
.modal::backdrop, .sheet::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
/* Every dialog is modal, and each leaves viewport around it: the sheet's
   gutters, the backdrop around a modal or the palette. A wheel over that space
   would scroll the page behind, so freeze the page while any dialog is up.
   overflow: hidden keeps the root's scroll offset, so the list is right where
   it was when the dialog closes. */
html:has(dialog[open]) { overflow: hidden; }
.modal[open] { animation: modal-in .22s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes modal-in { from { transform: translateY(14px) scale(.97); opacity: 0; } }
/* One continuous upward pass: the sheet rises in from below the fold and keeps
   going out through the top, handing the eye off to the toast that lands under
   the topbar. .is-closing is set in JS, which delays dialog.close() by the same
   300ms. */
.sheet[open] { animation: sheet-in .3s cubic-bezier(.16, .8, .3, 1) both; }
.sheet.is-closing { animation: sheet-out .3s cubic-bezier(.5, 0, .75, .2) both; }
.sheet[open]::backdrop { animation: scrim-in .3s ease both; }
.sheet.is-closing::backdrop { animation: scrim-out .3s ease both; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(-100%); } }
@keyframes scrim-in { from { opacity: 0; } }
@keyframes scrim-out { to { opacity: 0; } }

/* A dialog reopened after a reload reappears in place: no entrance. */
dialog.is-restoring, dialog.is-restoring::backdrop { animation: none !important; }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 0;
}
.modal-head h3 { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.modal-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; }

/* ————— Settings ————— */
/* Two panes: a rail of sections on the left, styled like the app's own
   sidebar, and the chosen section on the right. The window has a fixed size,
   so moving between sections never resizes it; each pane scrolls on its own. */
#settings-modal {
  width: min(880px, calc(100vw - 32px));
  overflow: hidden;
}
#settings-modal[open] { display: flex; height: min(660px, calc(100dvh - 48px)); }
.settings {
  display: grid; grid-template-columns: 224px minmax(0, 1fr);
  flex: 1; min-height: 0; width: 100%;
}

.settings-nav {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 18px 12px 12px;
}
.settings-nav-head { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 0 4px 12px 10px; }
.settings-nav-title { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.settings-nav-close { display: none; }
.settings-nav-tabs { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.settings-nav-list { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin-left: -8px; padding-left: 8px; }   /* room for the active bar, as in .sidebar-scroll */
.settings-nav-label {
  margin: 14px 0 6px; padding: 0 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint);
}
.settings-nav-label:first-child { margin-top: 2px; }
.settings-navitem {
  position: relative;
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--muted); text-align: left;
  transition: background .15s, color .15s;
}
.settings-navitem svg { width: 18px; height: 18px; }
.settings-navitem span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-navitem-chev { display: none; }
.settings-navitem:hover { color: var(--ink); background: var(--hover); }
.settings-navitem.is-active { color: var(--ink); font-weight: 650; background: var(--selected); }
.settings-nav-foot { flex: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.settings-nav-version { padding: 8px 10px 0; font-size: 11.5px; font-weight: 550; color: var(--faint); }

.settings-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.settings-head {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: 14px 14px 14px 26px; border-bottom: 1px solid var(--line);
}
.settings-head-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 750; letter-spacing: -0.02em; }
.settings-back { display: none; margin-left: -8px; }
.settings-pane { display: none; }
.settings-pane.is-active {
  display: block; flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 22px 26px 28px;
}
.settings-pane:focus-visible { outline-offset: -2px; }

@media (max-width: 700px) {
  /* Phones: full screen, one pane at a time. The list of sections comes
     first; choosing one slides it in, and Back (or Escape) returns. */
  #settings-modal[open] {
    width: 100vw; max-width: 100vw;
    height: 100dvh; max-height: 100dvh;
    margin: 0; border: 0; border-radius: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { border-right: 0; padding: 14px 12px 12px; }
  .settings-nav-close, .settings-back { display: inline-flex; }
  .settings-navitem { padding: 12px 10px; color: var(--ink); }
  .settings-navitem-chev { display: block; width: 16px; height: 16px; color: var(--faint); }
  .settings-navitem.is-active { background: none; font-weight: 500; }
  .settings-navitem.is-active::before { display: none; }
  .settings-main { display: none; }
  #settings-modal.is-showing-pane .settings-nav { display: none; }
  #settings-modal.is-showing-pane .settings-main { display: flex; animation: pane-in .22s cubic-bezier(.2, .8, .3, 1) both; }
  .settings-head { padding-left: 12px; }
  .settings-pane.is-active { padding: 20px 18px 28px; }
}
@keyframes pane-in { from { transform: translateX(24px); opacity: 0; } }
.setting-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.setting-label--flush { margin-bottom: 0; }
.setting-label--spaced { margin-top: 22px; }
.setting-row { margin-top: 18px; }

.theme-picker { display: flex; gap: 10px; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.theme-opt input:checked + .theme-chip { border-color: var(--accent); color: var(--ink); background: var(--wash); }
.theme-opt input:focus-visible + .theme-chip { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-chip-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); }
.theme-chip--system .theme-chip-dot { background: linear-gradient(90deg, #FFF 50%, #292929 50%); }
.theme-chip--light .theme-chip-dot { background: #FFF; }
.theme-chip--dark .theme-chip-dot { background: #292929; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; padding: 6px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.manage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.manage-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.manage-item:last-child { border-bottom: 0; }
.manage-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.manage-title { font-size: 14px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-sub { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-item .avatar { width: 30px; height: 30px; font-size: 13px; }

/* Security: Turnstile */
.ts-status { display: flex; align-items: center; gap: 10px; margin: 14px 0 18px; }
.ts-challenge { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ts-challenge[hidden] { display: none; }
#ts-widget { min-height: 65px; }
.ts-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ts-recovery { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.backup-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  margin: 16px 0 6px; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); }
.backup-file[hidden] { display: none; }
.backup-file > svg { width: 26px; height: 26px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.backup-file-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.backup-file-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hint code { font-family: var(--mono); font-size: .92em; background: var(--field); padding: 1px 5px; border-radius: 5px; color: var(--ink); }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }

.account-meta { margin-top: 20px; }
.admin-stats { margin: 10px 0 18px; }
.inst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.inst-grid + .hint { margin-top: 8px; }
.adduser { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: center; margin-bottom: 14px; }
.adduser input {
  padding: 9px 11px; font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.adduser input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash); }
.adduser-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adduser .check { font-size: 13.5px; }
.adduser .btn { justify-self: end; padding: 8px 16px; }
.adduser + .form-error { margin-bottom: 12px; }
@media (max-width: 700px) {
  /* Phones: admin fields stack instead of sitting side by side. */
  .inst-grid, .adduser { grid-template-columns: 1fr; }
}

/* ————— About section ————— */
.about-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(180px, 220px) 1fr; gap: 22px;
  padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
}
.about-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .14; z-index: 0; pointer-events: none; filter: saturate(.7);
}
html[data-theme="dark"] .about-hero-bg { opacity: .2; filter: saturate(.55); }
.about-hero > :not(.about-hero-bg) { position: relative; z-index: 1; min-width: 0; }
.about-brand { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.mark--about { width: 56px; height: 56px; margin-bottom: 8px; }
.about-name { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.about-version { font-size: 12.5px; font-weight: 550; color: var(--muted); }
.about-tagline { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-top: 8px; }
.about-credit, .about-license { font-size: 12px; color: var(--muted); }
.about-credit { margin-top: 10px; }
.about-credit a, .about-license a {
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 2px;
}
.hyprlab-credit { display: inline-flex; align-items: center; gap: 5px; vertical-align: -3px; }
.hyprlab-credit img { width: 16px; height: 16px; border-radius: 4px; }
.about-stack { display: flex; flex-direction: column; gap: 10px; }
.about-stack-label { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.tech-stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.tech-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  transition: border-color .15s, transform .15s, background .15s;
}
.tech-tile:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface); }
.tech-icon {
  width: 26px; height: 26px; background-color: var(--ink);
  -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center;
  mask-size: contain; mask-repeat: no-repeat; mask-position: center;
}
.tech-tile-name { font-size: 11px; font-weight: 500; color: var(--muted); text-align: center; line-height: 1.2; }
/* Light mode: the animated hero gradient sits behind this section, so greys
   lose contrast. Full black for readability, in this section only. */
html[data-theme="light"] .about-stack-label,
html[data-theme="light"] .tech-tile-name { color: #000; }

.about-details { border-top: 1px solid var(--line); margin-top: 16px; }
.about-summary {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 0; cursor: pointer; list-style: none;
}
.about-summary::-webkit-details-marker { display: none; }
.about-summary h4 { font-size: 14px; font-weight: 750; letter-spacing: -0.01em; flex: 1; }
.about-summary span { font-size: 12px; color: var(--faint); flex: 1; }
.about-summary::after {
  content: ""; width: 7px; height: 7px; flex: none; align-self: center;
  border-right: 1.8px solid var(--faint); border-bottom: 1.8px solid var(--faint);
  transform: rotate(-45deg); transition: transform .15s;
}
.about-details[open] > .about-summary::after { transform: rotate(45deg); }
.about-summary:hover h4 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.release-list { list-style: none; margin: 0; padding: 0 0 14px; display: flex; flex-direction: column; gap: 12px; }
.release-list > li { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 12px 14px; }
.rel-version { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.rel-meta { font-size: 12px; color: var(--faint); font-weight: 550; }
.rel-body { font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.rel-body pre { overflow-x: auto; }
.rel-body p { margin: 0 0 8px; }
.rel-body p:last-child { margin-bottom: 0; }
.rel-body h3, .rel-body h4 {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink); margin: 12px 0 4px;
}
.rel-body ul { margin: 0 0 8px; padding-left: 1.25em; }
.rel-body li { margin: 3px 0; }
.rel-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; }
.rel-body strong { color: var(--ink); }
.rel-body code { font-family: var(--mono); font-size: .9em; background: var(--field); padding: 1px 4px; border-radius: 4px; }

@media (max-width: 560px) {
  .about-hero { grid-template-columns: 1fr; gap: 16px; }
  .about-brand { align-items: center; text-align: center; }
}

/* ————— Long-form body copy ————— */
.prose { font-size: 16.5px; line-height: 1.72; }
.prose p { margin: 0 0 1.15em; }
.prose a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--wash); }
.prose img { border-radius: var(--radius-sm); margin: 8px 0; height: auto; }
.prose h3, .prose h4 { font-weight: 750; letter-spacing: -0.02em; margin: 1.6em 0 .5em; line-height: 1.25; }
.prose h3 { font-size: 21px; }
.prose h4 { font-size: 17.5px; }
.prose blockquote {
  margin: 1.2em 0; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted); font-style: italic;
}
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.15em; }
.prose li { margin-bottom: .35em; }
.prose pre {
  background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55;
}
.prose code { font-family: var(--mono); font-size: .92em; background: var(--field); padding: 1px 5px; border-radius: 5px; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.prose figure { margin: 1.2em 0; }
.prose figcaption { font-size: 13px; color: var(--faint); margin-top: 6px; }

/* ————— Toast ————— */
/* Toasts sit just under the topbar: the sheet leaves through the top, so that
   is where the eye already is when the message lands. */
.toast {
  position: fixed; left: 50%; top: calc(var(--topbar-h) + 12px); transform: translateX(-50%);
  z-index: 100;
  background: var(--ink); color: var(--bg);
  font-size: 13.5px; font-weight: 600;
  padding: 10px 18px; border-radius: 99px; box-shadow: var(--shadow-2);
  animation: toast-in .25s ease both;
}
@keyframes toast-in { from { transform: translate(-50%, -10px); opacity: 0; } }
.toast.is-leaving { animation: toast-out .25s ease forwards; }
@keyframes toast-out { to { transform: translate(-50%, -16px); opacity: 0; } }
.toast--error { background: var(--danger); color: #fff; }
/* Dark: a raised charcoal pill with light text, where the light theme's is
   dark on light; the accent Undo reads on both. */
html[data-theme="dark"] .toast { background: #353535; color: var(--ink); box-shadow: var(--shadow-2), 0 0 0 1px var(--line-strong); }
html[data-theme="dark"] .toast--error { background: #4E2320; color: #FFE1DD; box-shadow: var(--shadow-2), 0 0 0 1px #6E302B; }
.toast-action {
  margin-left: 12px; color: var(--accent); font-weight: 750; font-size: 13px;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ————— Auth, setup and error pages ————— */
.auth-body { display: grid; grid-template-rows: 1fr auto; place-items: center; min-height: 100dvh; padding: 24px; }
.auth-wrap { width: 100%; display: grid; place-items: center; }
.auth-card {
  width: min(400px, 100%);
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-1);
  padding: clamp(26px, 5vw, 40px);
}
.auth-mark { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 26px; text-align: center; }
.auth-mark .mark { width: 64px; height: 64px; margin-bottom: 4px; }
.auth-mark .wordmark { font-size: 26px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .cf-turnstile { display: flex; justify-content: center; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.auth-version { margin-top: 24px; font-size: 12.5px; color: var(--muted); }
.auth-alt a { font-weight: 650; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.flash {
  font-size: 13.5px; font-weight: 550;
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px;
}
.flash--error { background: rgb(220 70 60 / .1); color: #C4443B; border: 1px solid rgb(220 70 60 / .25); }
.flash--info { background: var(--wash); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.error-code { font-size: 64px; font-weight: 850; letter-spacing: -0.05em; line-height: 1; color: var(--accent); text-align: center; }
.error-text { text-align: center; color: var(--muted); margin: 12px 0 22px; }

.wizard { width: min(460px, 100%); }
.wizard .auth-mark { margin-bottom: 14px; }
.wiz-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.wiz-dot { width: 22px; height: 4px; border-radius: 99px; background: var(--line); transition: background .25s; }
.wiz-dot.is-active { background: var(--accent); }
.wiz-step { display: none; }
.wiz-step.is-active { display: block; animation: wiz-in .25s ease both; }
@keyframes wiz-in { from { opacity: 0; transform: translateX(10px); } }
.wiz-title { font-size: 20px; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 8px; }
.wiz-text { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.wiz-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.wiz-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.wiz-list li::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px; flex: none;
  background: var(--accent); box-shadow: 0 0 6px var(--accent-glow);
}
.wiz-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; }
.wiz-nav .btn--primary:only-child { width: 100%; }
.wiz-nav .btn--primary:not(:only-child) { flex: 1; }
.wiz-nav--stack { flex-direction: column; }
.restore-progress { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.restore-progress[hidden] { display: none; }
.restore-progress progress { width: 100%; accent-color: var(--accent); }
.wizard .auth-form { gap: 13px; }
.wizard .form-error { margin-top: 12px; }
.wiz-added { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wiz-added li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 550; color: var(--ink); }
.wiz-added li::before {
  content: ""; width: 12px; height: 7px; flex: none;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-2px);
}

/* ————— Responsive ————— */
@media (max-width: 1060px) {
  .row { grid-template-columns: 10px minmax(0, 1fr) max-content 30px; }
  .row-dek { display: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    width: min(300px, 84vw);
    transform: translateX(-104%);
    transition: transform .25s ease;
    box-shadow: none;
  }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-2); }
  .sidebar-close { display: inline-flex; }
  .topbar-menu { display: inline-flex; }
  .sheet {
    /* Full-bleed on phones: the dialog's UA max-width would otherwise inset it
       about 2em from the viewport edges. */
    width: 100vw; max-width: 100vw;
    margin: 0; border: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}
@media (max-width: 560px) {
  .context-title { font-size: 15.5px; }
  .viewswitch { display: none; }  /* the view lives in settings on phones */
  .records { padding-inline: 14px; }
  .grid--cards { grid-template-columns: 1fr; }
  .theme-picker { flex-direction: column; }
}

/* ————— Motion & scrollbars ————— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ————————————————————————————————————————————
   Flatout's admin pages: panels and tiles, the site editor, the media
   library, releases, the installs chart, tokens.
   ———————————————————————————————————————————— */

.page-body { padding: clamp(18px, 3vw, 34px) clamp(16px, 3.5vw, 36px) 60px; display: flex; flex-direction: column; gap: 18px; max-width: 1180px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-1); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-title { font-size: 15px; font-weight: 750; letter-spacing: -0.015em; margin-bottom: 10px; }
.panel > .hint { margin-bottom: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.tile-big { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.tile-warn { color: var(--ink); font-weight: 600; }
.tile-formats { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.tile-format { color: var(--ink); font-weight: 650; }
.tile-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.banner { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.banner--warn { background: rgb(220 150 0 / .12); border: 1px solid rgb(220 150 0 / .35); }
.banner p { margin: 0; }
.banner p + p { margin-top: 6px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: .92em; }

/* Getting started: each step's marker is a checkbox, ticked by detection or by hand. */
.checklist-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist-steps li { display: flex; gap: 12px; align-items: flex-start; }
.checklist-steps a { color: var(--ink); }
.checklist-steps .is-done a { color: var(--muted); text-decoration: line-through; }
.checklist-done { margin: -4px 0 10px; }
.step-check { position: relative; flex: none; cursor: pointer; }
.step-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.step-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--field); border: 1px solid var(--line); color: var(--muted); transition: background .15s, border-color .15s; }
.step-mark svg { width: 15px; height: 15px; stroke-width: 2.4; display: none; }
.step-check:hover .step-mark { border-color: var(--accent); }
.step-check input:focus-visible + .step-mark { outline: 2px solid var(--accent); outline-offset: 2px; }
.is-done .step-mark { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.is-done .step-mark svg { display: block; }
.is-done .step-num { display: none; }
.step-text { display: flex; flex-direction: column; gap: 1px; }
.step-how { font-size: 12px; color: var(--faint); }
.checklist-show { margin: -6px 0 0; }
.checklist-show .link { background: none; border: 0; padding: 0; cursor: pointer; }

/* A checkbox drawn as a switch. */
input.switch { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(14px); }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::after { transition: none; } }

/* ——— The site editor ——— */
.admin--editor .content { display: flex; flex-direction: column; height: 100dvh; }
.editor { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); }
.editor-panel { overflow-y: auto; border-right: 1px solid var(--line); background: var(--panel); padding: 16px 16px 60px; overscroll-behavior: contain; }
.editor-loading { padding: 20px 4px; }
.editor-preview { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.preview-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.preview-open { margin-left: auto; }
.preview-stage { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 0; --preview-w: 100%; }
.preview-stage.is-device { padding: 18px; background: var(--panel); }
.preview-frame { width: var(--preview-w); max-width: 100%; height: 100%; border: 0; background: #fff; }
.preview-stage.is-device .preview-frame { border-radius: 14px; box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.save-state { font-size: 12.5px; color: var(--faint); white-space: nowrap; margin-right: 4px; }
.save-state.is-error { color: var(--danger); }
@media (max-width: 1000px) {
  .admin--editor .content { height: auto; }
  .editor { grid-template-columns: 1fr; }
  .editor-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-stage { height: 80dvh; }
}

.ed-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 16px 6px 8px; }
.ed-label:first-child { margin-top: 2px; }
.ed-label--row { display: flex; align-items: center; justify-content: space-between; }
.ed-label--row .btn svg { width: 14px; height: 14px; }
.ed-row { display: flex; align-items: center; gap: 4px; border-radius: var(--radius-sm); }
.ed-row:hover { background: var(--hover); }
.ed-row-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 8px; text-align: left; border-radius: var(--radius-sm); }
.ed-row-open > svg { color: var(--faint); width: 16px; height: 16px; }
.ed-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-row-title { font-size: 14px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-row-sub { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-sections { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ed-section { border-radius: var(--radius-sm); }
.ed-section.is-off .ed-row-title { color: var(--faint); }
.ed-section.is-dragging { opacity: .45; }
.ed-section.is-over { box-shadow: inset 0 2px 0 var(--accent); }
.ed-grip { color: var(--faint); cursor: grab; display: grid; place-items: center; width: 20px; padding-left: 4px; }
.ed-grip svg { width: 16px; height: 16px; stroke-width: 3; }
.ed-switch { display: grid; place-items: center; padding: 0 6px 0 4px; }
.ed-foot { margin: 14px 6px 0; }
.ed-detail-head { display: flex; align-items: center; gap: 6px; margin: -2px 0 6px; }
.ed-detail-title { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; flex: 1; }
.ed-detail-actions { display: flex; gap: 2px; }
.ed-intro { margin-bottom: 10px; }
.ed-shown { margin: 4px 0 12px; }
.ed-form { display: flex; flex-direction: column; gap: 14px; }
.ed-field { display: flex; flex-direction: column; gap: 5px; }
.ed-field .field-label { margin-bottom: 0; }
.ed-field--inline { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-field--inline .field-label { font-size: 14px; font-weight: 550; color: var(--ink); text-transform: none; letter-spacing: 0; cursor: pointer; }
.ed-field--inline .ed-hint { flex-basis: 100%; }
.ed-field input:not([type=checkbox]):not([type=color]), .ed-field textarea, .ed-field select {
  width: 100%; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 10px; font: inherit; font-size: 14px; color: var(--ink);
}
.ed-field textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.ed-field textarea.ed-md { font-family: var(--mono); font-size: 13px; }
.ed-field input:focus, .ed-field textarea:focus, .ed-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash); }
.ed-hint { font-size: 12px; margin-top: 1px; }
.has-error input, .has-error textarea, .has-error select, .has-error .ed-image-thumb { border-color: var(--danger) !important; }
.ed-error { font-size: 12.5px; margin: 2px 0 0; }
.ed-help { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 14px; font-size: 13px; }
.ed-help summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.ed-placeholders { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 2px; font-size: 12.5px; }
.ed-placeholders dd { margin: 0; color: var(--muted); }
.ed-conflict { background: rgb(220 150 0 / .12); border: 1px solid rgb(220 150 0 / .35); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; }
.ed-conflict-actions { display: flex; gap: 8px; margin-top: 8px; }

.ed-group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 0 12px; }
.ed-group[open] { padding-bottom: 12px; }
.ed-group-title { cursor: pointer; padding: 10px 0; font-weight: 650; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.ed-group-title::-webkit-details-marker { display: none; }
.ed-group-title::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(-45deg); transition: transform .15s; }
.ed-group[open] > .ed-group-title::before { transform: rotate(45deg); }
.ed-group-body { display: flex; flex-direction: column; gap: 12px; }

.ed-listfield { display: flex; flex-direction: column; gap: 6px; }
.ed-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.ed-item-head { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; cursor: pointer; list-style: none; }
.ed-item-head::-webkit-details-marker { display: none; }
.ed-item-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-item-actions { display: flex; gap: 0; }
.ed-item-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.ed-item:not([open]) .ed-item-body { display: none; }
.ed-add { align-self: flex-start; }
.ed-add svg { width: 14px; height: 14px; }

.ed-color { display: flex; gap: 8px; align-items: center; }
.ed-color .ed-hex { flex: 1; font-family: var(--mono); }
.ed-color input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); cursor: pointer; }
.ed-image { display: flex; gap: 10px; align-items: flex-start; }
.ed-image-thumb { flex: none; width: 76px; height: 76px; border-radius: var(--radius-sm); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
  background: repeating-conic-gradient(var(--field) 0% 25%, var(--surface) 0% 50%) 50% / 14px 14px; color: var(--faint); }
.ed-image-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ed-image-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ed-image-actions { display: flex; gap: 6px; }
.ed-icon { position: relative; }
.ed-icon-current { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); font-size: 14px; }
.ed-icon-glyph .ico, .ed-icon-opt .ico { width: 20px; height: 20px; display: block; }
.ed-icon-img { width: 20px; height: 20px; object-fit: contain; }
.ed-icon-none { color: var(--faint); }
.ed-icon-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 288px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-2); }
.ed-icon-pop[hidden] { display: none; }
.ed-icon-opt { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; color: var(--ink); }
.ed-icon-opt:hover, .ed-icon-opt:focus-visible { background: var(--wash); }
.ed-icon-opt--wide { grid-column: 1 / -1; aspect-ratio: auto; padding: 6px; font-size: 13px; color: var(--muted); }
.ico { width: 20px; height: 20px; }
.ico--stroke { fill: none; stroke: currentColor; stroke-width: 2; }
.ico--fill { fill: currentColor; stroke: none; }

.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.type-card { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); }
.type-card:hover, .type-card:focus-visible { border-color: var(--accent); background: var(--wash); }
.type-card strong { font-size: 14px; }
.type-card span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) { .type-grid { grid-template-columns: 1fr; } }

/* ——— Media ——— */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; min-height: 120px; border-radius: var(--radius); }
.media-grid.is-dropping, .content.is-dropping .media-grid, .modal.is-dropping .media-grid { outline: 2px dashed var(--accent); outline-offset: 6px; }
.media-grid--pick { max-height: min(60dvh, 560px); overflow-y: auto; padding: 2px; }
.media-empty { grid-column: 1 / -1; padding: 30px 0; text-align: center; }
.media-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.media-card--pick { cursor: pointer; }
.media-card--pick:hover, .media-card--pick:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash); }
.media-thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
  background: repeating-conic-gradient(var(--field) 0% 25%, var(--surface) 0% 50%) 50% / 16px 16px; }
.media-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-font { font-size: 44px; color: var(--ink); }
.media-meta { padding: 8px 10px 4px; display: flex; flex-direction: column; min-width: 0; }
.media-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-sub { font-size: 11.5px; color: var(--faint); }
.media-actions { display: flex; align-items: center; gap: 2px; padding: 4px 6px 8px 10px; }
.media-alt { flex: 1; min-width: 0; font: inherit; font-size: 12px; background: var(--field); border: 1px solid var(--line); border-radius: 7px; padding: 4px 7px; color: var(--ink); }
.media-toolbar { display: flex; align-items: center; gap: 12px; }
.media-upload-btn { cursor: pointer; }
.modal--media { width: min(880px, calc(100vw - 32px)); }

/* ——— Releases ——— */
.upload { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 18px; }
@media (max-width: 820px) { .upload { grid-template-columns: 1fr; } }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 22px; min-height: 180px;
  border: 2px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer; background: var(--field); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-dropping { border-color: var(--accent); background: var(--wash); }
.dropzone.has-file { border-style: solid; border-color: var(--accent); }
.dropzone svg { width: 34px; height: 34px; color: var(--muted); }
.dropzone-text { font-size: 14px; }
.upload-pick { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.upload-pick .dropzone { flex: 1; }   /* as tall as the fields beside it; shorter as bundles are listed */
.upload-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.upload-file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 40px;
  padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); font-size: 13px; }
.upload-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.upload-file-state { color: var(--muted); font-variant-numeric: tabular-nums; }
.upload-file.is-failed { grid-template-columns: minmax(0, 1fr) auto; border-color: var(--danger); }
.upload-file.is-failed .upload-file-state { grid-column: 1 / -1; grid-row: 2; color: var(--danger); padding-bottom: 4px; }
.upload-fields { display: flex; flex-direction: column; gap: 12px; }
.upload-fields input:not([type=radio]), .upload-fields textarea { width: 100%; }
.upload-actions { display: flex; align-items: center; gap: 12px; }
.upload-actions progress { flex: 1; accent-color: var(--accent); }
.term-like summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.term-like[open] summary { margin-bottom: 8px; }
.release-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.release-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.release-row:last-child { border-bottom: 0; }
.release-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.release-version { font-weight: 750; font-size: 15px; }
.release-sub { grid-column: 1; font-size: 12.5px; color: var(--faint); }
.release-row .form-error { grid-column: 1 / -1; font-size: 13px; }
.release-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; align-items: center; }
.release-row.is-superseded .release-version, .release-row.is-ended .release-version { color: var(--muted); font-weight: 650; }
.release-file { font-weight: 650; }
.release-row.is-withdrawn .release-file, .release-row.is-pruned .release-file { color: var(--faint); text-decoration: line-through; }
#release-modal .modal-body > .release-rows { margin-bottom: 12px; }
.release-row.is-withdrawn .release-version, .release-row.is-pruned .release-version { color: var(--faint); font-weight: 650; text-decoration: line-through; }
.status { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--field); color: var(--muted); border: 1px solid var(--line); }
.status--live { background: rgb(46 194 126 / .14); color: #1a7f52; border-color: transparent; }
.status--failed { background: rgb(220 70 60 / .12); color: var(--danger); border-color: transparent; }
.status--queued, .status--processing { background: var(--wash); color: var(--ink); border-color: transparent; }
:root[data-theme="dark"] .status--live { color: #7fe0b2; }
/* Commands to copy, on the Packages page: one block per way of installing. */
.pkg-command { margin: 0 0 14px; }
.pkg-command .setting-label { margin: 0 0 6px; }
.pkg-command-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.pkg-command pre { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.joblog { max-height: 340px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.5; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; white-space: pre-wrap; word-break: break-all; }
.field-input { width: 100%; }

/* ——— Signing and addresses ——— */
.addresses { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 6px 0 4px; font-size: 13.5px; align-items: baseline; }
.addresses dt { color: var(--muted); font-weight: 600; }
.addresses dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.addresses .addresses-note { grid-column: 1 / -1; }
.app-ids { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#app-form > .panel { align-self: stretch; }
.addresses dd code { background: var(--field); padding: 2px 6px; border-radius: 6px; }
.key-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 820px) { .key-choices { grid-template-columns: 1fr; } }
.key-choice { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.key-choice .field { width: 100%; }
.key-choice textarea { width: 100%; font-family: var(--mono); font-size: 12px; }

/* ——— The installs chart ——— */
.admin--stats { --series-1: #2a78d6; --chart-grid: var(--line); }
:root[data-theme="dark"] .admin--stats { --series-1: #3987e5; }
.filters { display: flex; gap: 10px; }
.chart { position: relative; margin-top: 6px; transition: opacity .2s; }
.chart.is-loading { opacity: .5; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; stroke: none; fill: none; }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart-bar { fill: var(--series-1); }
.chart-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; stroke: none; }
.chart-label { fill: var(--ink); font-size: 11.5px; font-weight: 700; stroke: none; }
.chart-hit { fill: transparent; cursor: default; outline: none; }
.chart-hit.is-hover, .chart-hit:focus-visible { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.chart-tip { position: absolute; transform: translate(-50%, -100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; box-shadow: var(--shadow-2);
  padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; pointer-events: none; white-space: nowrap; z-index: 5; }
.chart-tip strong { font-size: 14px; }
.chart-tip span { color: var(--muted); }
.table-view { margin-top: 12px; }
.table-view summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: middle; }
.data-table .mono { font-family: var(--mono); font-size: 12px; }
.table-scroll { overflow-x: auto; }
.table-scroll .data-table td, .table-scroll .data-table th { white-space: nowrap; }
.tile-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.stats-meta { margin: 0; }
#stats-page .panel-head { align-items: center; flex-wrap: wrap; }
#stats-detail > .panel-head { margin-bottom: 14px; }
#stats-detail .seg { max-width: 100%; overflow-x: auto; }
.stats-view > .hint { margin-bottom: 4px; }
.stats-view .stats-subhint { margin-top: 18px; }
.table-more { margin-top: 10px; }
.arch-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.arch-row { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 4px; align-items: baseline; font-size: 13px; }
.arch-name { font-weight: 650; }
.arch-num { font-weight: 750; font-variant-numeric: tabular-nums; }
.arch-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.arch-bar span { display: block; height: 100%; border-radius: 3px; background: var(--series-1); }

/* ——— API and agents ——— */
.token-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.token-form input:not([type=checkbox]) { width: 100%; }
.token-scopes { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.token-new { margin: 14px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--wash); border: 1px solid var(--accent); }
.code-line { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.code-line code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; }
#token-list { margin-top: 12px; }
.snippet { background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; margin: 4px 0 12px; }
.endpoint { padding: 12px 16px; }
.endpoint-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.endpoint-path { font-size: 13.5px; font-weight: 650; }
.endpoint-summary { margin: 6px 0 2px; font-size: 14px; }
.method { font-family: var(--mono); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--field); border: 1px solid var(--line); }
.method--get { color: #1c6fbf; } .method--post { color: #1a7f52; } .method--patch, .method--put { color: #8a5a00; } .method--delete { color: var(--danger); }
:root[data-theme="dark"] .method--get { color: #6aaef0; }
:root[data-theme="dark"] .method--post { color: #7fe0b2; }
:root[data-theme="dark"] .method--patch, :root[data-theme="dark"] .method--put { color: #ffd36b; }

/* ——— The site status dialog ——— */
.status-options { display: grid; gap: 8px; }
.status-option { position: relative; cursor: pointer; }
.status-option input { position: absolute; opacity: 0; pointer-events: none; }
.status-option-face { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); }
.status-option-face .status-chip { margin-left: 0; font-size: 12px; }
.status-option:hover .status-option-face { border-color: var(--line-strong); }
.status-option input:checked + .status-option-face { border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash); background: var(--surface); }
.status-option input:focus-visible + .status-option-face { outline: 2px solid var(--accent); outline-offset: 2px; }
.status-page-fields { border: 0; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.status-page-fields .field input, .status-page-fields .field textarea { width: 100%; }

/* Filter bars: segmented filters in one row above what they filter. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 6px; }
.seg--filter span { padding: 5px 11px; font-size: 12.5px; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-search { margin-left: auto; width: 130px; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.filter-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash); }
.release-empty { padding: 14px 0; }
.history-meta { display: flex; gap: 12px; font-variant-numeric: tabular-nums; }
#stats-detail .filter-bar { margin: 0 0 10px; }
.stats-checks { color: var(--ink); }
.format-list { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.format-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 96px 210px; align-items: center; gap: 14px; font-size: 13px; }
.format-name { font-weight: 650; }
.format-bar { grid-column: auto; height: 8px; border-radius: 4px; }
.format-bar span { border-radius: 4px; }
.format-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.format-num strong { color: var(--ink); font-weight: 750; }
.format-sub { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .format-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .format-bar { grid-column: 1 / -1; grid-row: 2; }
  .format-sub { grid-column: 1 / -1; }
}
