/* sitepanel — a small console for one site.
   Dusk sky, pixel headings, square "window" cards. One look, always dark. */
:root {
  --bg: #130e1b; --bg2: #1c1429; --card: #1a1326; --card2: #221a31; --code: #120d1a;
  --text: #ece4f3; --muted: #9d90ad; --line: #3a2d4d; --line2: #54436b;
  --accent: #f3a7c0; --accent-soft: #ffd1df; --accent-text: #1c0f17; --lilac: #b48cff;
  --ok: #8ee6a8; --bad: #ff8e8e; --warn: #ffc978;
  --logbg: #0c0811; --logtext: #d9cfe6;
  --series-1: #b48cff; --series-tint: color-mix(in srgb, #b48cff 28%, transparent);
  --pixel: "DotGothic16", "IBM Plex Mono", monospace;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 3px; --side: 224px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--accent) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border: 2px solid var(--bg); }
::selection { background: var(--accent); color: var(--accent-text); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); }
/* the sky: dusk gradient, a tiled handful of dim stars, scanlines */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, #0f0b16 0%, var(--bg2) 60%, #2a1a3a 100%); }
.sky::before { content: ""; position: absolute; inset: 0; opacity: .25;
  background-image:
    radial-gradient(1px 1px at 11px 19px, var(--text) 50%, transparent 51%),
    radial-gradient(1px 1px at 93px 61px, var(--accent-soft) 50%, transparent 51%),
    radial-gradient(1px 1px at 167px 14px, var(--text) 50%, transparent 51%),
    radial-gradient(1px 1px at 51px 141px, var(--text) 50%, transparent 51%),
    radial-gradient(1px 1px at 135px 177px, var(--text) 50%, transparent 51%),
    radial-gradient(1px 1px at 199px 101px, var(--accent-soft) 50%, transparent 51%),
    radial-gradient(1px 1px at 73px 215px, var(--text) 50%, transparent 51%);
  background-size: 230px 230px;
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 80%);
  mask-image: linear-gradient(to bottom, #000 20%, transparent 80%); }
.sky::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.14) 0 1px, transparent 1px 3px); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; }
code { font-family: var(--mono); background: var(--code); border: 1px solid var(--line); padding: 0 5px; border-radius: var(--r); font-size: .88em; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; letter-spacing: .02em; }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; line-height: 1.2; text-shadow: 2px 2px 0 color-mix(in srgb, var(--accent) 30%, transparent); }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h2::before, h1::before { content: "// "; color: var(--accent); }
h1.msg-title::before, .hero h1::before, .ed-title::before { content: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 10px; }
.wrapgap { flex-wrap: wrap; gap: 14px; }

/* ---- shell: sidebar + content ---- */
body.in { display: grid; grid-template-columns: var(--side) 1fr; grid-template-rows: auto 1fr; }
body.in .side { grid-row: 1 / -1; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 22px 0 14px 18px; overflow: hidden;
  border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 65%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--text); font-family: var(--pixel); font-size: 1.05rem; }
.brand:hover { text-decoration: none; color: var(--accent-soft); }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { flex: none; width: 9px; height: 9px; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.caret { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* the menu is the part that scrolls: the site name stays at the top and the footer at the bottom, however long the list gets */
.menu { margin-top: 20px; padding: 6px 12px 18px 0; display: flex; flex-direction: column; gap: 18px; font-family: var(--mono); font-size: .9rem;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line2) transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%); }
.menu::-webkit-scrollbar { width: 6px; } .menu::-webkit-scrollbar-thumb { background: var(--line2); border: 0; } .menu::-webkit-scrollbar-track { background: transparent; }
.menu .group { flex: none; }
.side > .brand, .side > .admin-banner, .side-foot { margin-right: 18px; flex: none; }
.group { display: flex; flex-direction: column; }
.glabel { font-size: .72rem; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; }
button.glabel { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; padding: 4px 8px 4px 0; cursor: pointer; font: inherit; text-align: left; font-size: .72rem; letter-spacing: .12em; color: var(--muted); }
button.glabel:hover { color: var(--text); } button.glabel:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.glabel .chev { margin-left: auto; margin-right: 10px; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; opacity: .7; }
.group.closed .chev { transform: rotate(-45deg); }
.group.closed > a, .group.closed > form { display: none; }
.menu .group { flex: none; } .group.closed { margin-bottom: -6px; }
.glabel::before { content: "// "; }
.menu a, .menu button.link { display: flex; align-items: center; gap: 9px; padding: 6px 8px 6px 20px; color: var(--text); position: relative; text-align: left; width: 100%;
  font: inherit; background: none; border: 0; cursor: pointer; }
.ni { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.menu a:hover .ni, .menu a[aria-current="page"] .ni, .menu button.link:hover .ni { opacity: 1; }
.menu .badge { margin-left: auto; }
.menu a::before, .menu button.link::before { content: ">"; position: absolute; left: 6px; color: var(--muted); opacity: 0; }
.menu a:hover, .menu button.link:hover { text-decoration: none; color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.menu a:hover::before, .menu button.link:hover::before { opacity: 1; }
.menu a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.menu a[aria-current="page"]::before { content: "█"; opacity: 1; color: var(--accent); }
.menu .links a { color: var(--muted); }
.side-foot { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; font: .72rem var(--mono); color: var(--muted); letter-spacing: .06em; }
.side-foot .dim { opacity: .6; }
.topbar, .backdrop { display: none; }
.content { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
main.wrap { flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 30px 28px 10px; }
.foot { max-width: 920px; width: 100%; margin: 0 auto; padding: 18px 28px 26px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px;
  font: .74rem var(--mono); color: var(--muted); letter-spacing: .04em; }
.foot .dim { opacity: .75; } .foot a { color: var(--muted); }

/* ---- cards: little windows with corner marks ---- */
.card { position: relative; background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 24px; margin-bottom: 18px; }
.card::before, .card::after { content: ""; position: absolute; width: 9px; height: 9px; border-color: var(--accent); border-style: solid; pointer-events: none; }
.card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.card::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.narrow { max-width: 440px; margin: 9vh auto; }
.hero { text-align: center; padding: 40px 22px; }
.hero p { max-width: 460px; margin: 0 auto 20px; }
.flash { margin: 0 0 16px; font-family: var(--mono); font-size: .9rem; }
.flash::before { content: "> "; }

/* ---- forms ---- */
label { display: block; font-weight: 500; font-size: .86rem; margin-bottom: 14px; font-family: var(--mono); color: var(--muted); }
label small { font-weight: 400; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; font: 15px/1.5 var(--sans);
  color: var(--text); background: var(--code); border: 1px solid var(--line); border-radius: var(--r); }
textarea, input[type="text"].mono { font-family: var(--mono); }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; color: var(--text); font-family: var(--sans); }
.check input { width: auto; margin: 4px 0 0; accent-color: var(--accent); }
.grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.grid .wide { grid-column: 1 / -1; }

/* ---- buttons: square, mono, pixel shadow ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 8px 16px; font: 500 .85rem var(--mono); letter-spacing: .04em; text-transform: lowercase; cursor: pointer;
  color: var(--text); background: var(--card2); border: 1px solid var(--line2); border-radius: var(--r);
  box-shadow: 3px 3px 0 color-mix(in srgb, #000 45%, transparent); transition: transform .05s, box-shadow .05s; }
.btn:hover { text-decoration: none; color: var(--accent-soft); border-color: var(--accent); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 color-mix(in srgb, #000 45%, transparent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { color: var(--accent-text); background: var(--accent-soft); }
.btn.gh { background: #efe9f5; border-color: #efe9f5; color: #1a1326; }
.btn.danger { color: var(--bad); }
.btn.full { width: 100%; }
.small-btn { min-height: 32px; padding: 4px 12px; font-size: .78rem; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.error { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent);
  padding: 9px 12px; border-radius: var(--r); }
.ok-msg { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
  padding: 9px 12px; border-radius: var(--r); }
.restore { background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid var(--warn); border-radius: var(--r); padding: 8px 12px; font-size: .9rem; }
.perms { padding-left: 20px; }
.pill { font: .74rem var(--mono); padding: 2px 8px; border: 1px solid var(--line2); color: var(--muted); border-radius: var(--r); white-space: nowrap; }
.pill.live { color: var(--ok); border-color: var(--ok); }
.status { font: 500 .74rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.status::before { content: "[ "; } .status::after { content: " ]"; }
.s-success { color: var(--ok); } .s-failed { color: var(--bad); }
.s-building, .s-queued { color: var(--warn); } .s-skipped { color: var(--muted); }
.s-building::before { content: "[ "; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .3; } }

/* ---- lists ---- */
.repo-line { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 1.05rem; margin: 2px 0; }
.repos { display: grid; gap: 8px; margin-bottom: 16px; max-height: 360px; overflow: auto; }
.repo { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r); margin: 0; cursor: pointer; font-weight: 400; color: var(--text); font-family: var(--sans); }
.repo input { width: auto; margin: 0; }
.repo span { display: flex; flex-direction: column; }
.deploys { list-style: none; margin: 0; padding: 0; }
.deploys li { display: grid; grid-template-columns: 96px 1fr auto; gap: 4px 12px; align-items: center;
  padding: 11px 0; border-top: 1px dashed var(--line); }
.deploys li:first-child { border-top: 0; }
.deploys .msg { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deploys .meta { grid-column: 2 / -1; font-family: var(--mono); font-size: .8rem; }
.msg-title { font-size: 1.3rem; word-break: break-word; }
.log { background: var(--logbg); color: var(--logtext); padding: 14px; border: 1px solid var(--line); border-radius: var(--r); margin: 16px 0 0;
  font: 12.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; max-height: 65vh; overflow: auto; }
#log { min-height: 120px; }
.danger-zone { margin: 8px 0 40px; color: var(--muted); font-family: var(--mono); font-size: .85rem; }
.danger-zone summary { cursor: pointer; }
.danger-zone form { margin-top: 8px; }
[hidden] { display: none !important; }

/* ---- blog editor ---- */
.posts .status.live { color: var(--ok); }
.posts .pill { color: var(--accent); }
.editor { display: flex; flex-direction: column; gap: 10px; }
.ed-top { font-size: .92rem; }
.ed-title { font-size: 1.5rem; font-family: var(--pixel); padding: 10px 12px; margin: 0; }
.ed-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.ed-meta label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .82rem; }
.ed-meta input { margin: 0; width: auto; padding: 7px 9px; font-size: .9rem; }
.ed-meta input[name="slug"] { width: 180px; font-family: var(--mono); }
.ed-meta input[name="tags"] { width: 220px; }
.slugwrap { display: inline-flex; align-items: center; gap: 2px; font-family: var(--mono); }
.ed-desc { margin: 0; font-size: .92rem; }
.ed-tabs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.ed-tabs [data-tab] { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 12px;
  font: .85rem var(--mono); color: var(--muted); cursor: pointer; }
.ed-tabs [data-tab].on { color: var(--accent); border-bottom-color: var(--accent); }
.ed-toolbar { margin-left: auto; display: flex; flex-wrap: wrap; gap: 2px; }
.ed-toolbar button { background: none; border: 1px solid transparent; border-radius: var(--r); min-width: 32px; height: 30px; padding: 0 7px;
  font: 13px var(--mono); color: var(--text); cursor: pointer; }
.ed-toolbar button:hover { border-color: var(--line2); background: var(--code); }
#body { min-height: 60vh; resize: vertical; margin: 0; padding: 14px; font: 14px/1.6 var(--mono); tab-size: 2; }
.ed-hint { margin-top: 6px; }
#preview { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.ed-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
.ed-actions > span { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.ed-actions .danger { margin-left: auto; }

/* ---- database ---- */
.dbrows li { grid-template-columns: 1fr auto; }
.dbrows .meta { grid-column: 1 / -1; }
.dbrows .rowact, .dbrows .record { grid-column: 1 / -1; }
.rowact summary, .record summary { cursor: pointer; font: .82rem var(--mono); color: var(--accent); }
.record summary { color: var(--text); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.record .preview { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; flex: 1 1 240px; }
.rowact[open], .record[open] { padding-bottom: 6px; }
.rowact form, .record form { margin-top: 10px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 16px; }
.inline-form label { margin: 0; flex: 1 1 170px; }
.inline-form .btn { flex: none; }
textarea.json { font: 13px/1.5 var(--mono); resize: vertical; }
.keybox { min-height: 0; margin: 0 0 12px; user-select: all; }
.apitable { border-collapse: collapse; width: 100%; margin: 14px 0; }
.apitable th, .apitable td { text-align: left; padding: 7px 10px; border-top: 1px dashed var(--line); vertical-align: top; }
.apitable th { color: var(--muted); font: .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; border-top: 0; }

/* ---- stats + overview ---- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.kpis.four { grid-template-columns: repeat(4, 1fr); }
.kpis .card { margin: 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; }
.kpi-label { font: .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font: 2rem/1.15 var(--pixel); margin-top: 4px; font-variant-numeric: tabular-nums; text-shadow: 2px 2px 0 color-mix(in srgb, var(--accent) 30%, transparent); }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.meter { display: block; height: 6px; margin-top: 10px; background: var(--code); border: 1px solid var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--series-1); }
.svc { font: 500 .85rem var(--mono); line-height: 1.8; }
.chart { position: relative; padding-top: 4px; }
.chart-top { display: flex; font: .74rem var(--mono); color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 2px; }
.cols { display: flex; align-items: stretch; gap: 2px; height: 170px; border-bottom: 1px solid var(--line2); }
.col { flex: 1; display: flex; align-items: flex-end; justify-content: center; min-width: 0; cursor: default; outline: none; }
.bar { display: block; width: 100%; max-width: 24px; background: var(--series-1); border-radius: 3px 3px 0 0; }
.col.on .bar { background: var(--accent); }
.col:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
.chart-x { display: flex; justify-content: space-between; font: .74rem var(--mono); color: var(--muted); padding-top: 4px; }
.tip { position: absolute; top: 0; transform: translateX(-50%); z-index: 2; pointer-events: none; white-space: nowrap;
  background: var(--card2); border: 1px solid var(--line2); border-radius: var(--r); padding: 6px 10px; font: .8rem var(--mono);
  box-shadow: 3px 3px 0 color-mix(in srgb, #000 45%, transparent); display: flex; flex-direction: column; }
.tip[hidden] { display: none; }
.tip strong { font-size: .95rem; color: var(--accent-soft); }
.tip-day { color: var(--muted); }
.tableview { margin-top: 12px; } .tableview summary { cursor: pointer; font: .82rem var(--mono); color: var(--accent); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--mono); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .two .card { margin-bottom: 18px; min-width: 0; }
.ranked { table-layout: fixed; margin: 0; } .ranked th.num, .ranked td.num { width: 76px; }
.ranked td.path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: .88rem;
  background: linear-gradient(to right, var(--series-tint) var(--w), transparent var(--w)) no-repeat 0 50% / 100% 70%; }
.ranked td.path a { color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 16px 0 0; }
.facts dt { font: .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; font-size: .92rem; }
.site-row h2::before { content: none; }

/* ---- phones + narrow screens ---- */
.repo-line a, .msg-title, .card p { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  body.in { display: block; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 20;
    padding: 10px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .menu-btn { background: none; border: 0; color: var(--accent); font: .9rem var(--mono); padding: 8px 2px; cursor: pointer; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 30; width: min(300px, 86vw); transform: translateX(-102%);
    transition: transform .2s ease; background: var(--bg); overflow: hidden; height: auto; }
  body.nav-open .side { transform: none; }
  .backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.55); }
  .side .brand { font-size: 1.1rem; }
  .content { min-height: auto; }
  main.wrap { padding: 18px 14px 6px; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .foot { padding: 14px 14px 30px; }
  .card { padding: 16px; margin-bottom: 12px; }
  .narrow { margin: 16px auto; }
  .hero { padding: 28px 16px; }
  h1 { font-size: 1.35rem; }
  body { font-size: 16px; }
  input, select { font-size: 16px; padding: 11px 12px; }   /* stops iOS zooming into fields */
  .btn { min-height: 46px; padding: 11px 16px; }
  .hero .btn, .card > .row .btn, .card > .row form, .card .row.gap, .card > .row > .row { width: 100%; }
  .card > .row form .btn { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .grid .row.gap { flex-direction: column; } .grid .row.gap .btn { width: 100%; }
  .deploys li { grid-template-columns: 1fr auto; gap: 3px 8px; padding: 12px 0; }
  .deploys .status { grid-column: 1; grid-row: 1; }
  .deploys .pill.live { grid-column: 2; grid-row: 1; }
  .deploys .msg { grid-column: 1 / -1; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding: 2px 0; }
  .deploys .meta { grid-column: 1 / -1; }
  .repo { padding: 13px 12px; } .repos { max-height: 50vh; }
  .log { font-size: 11.5px; padding: 10px; max-height: 60vh; }
  .ed-meta label { width: 100%; }
  .ed-meta input, .ed-meta input[name="slug"], .ed-meta input[name="tags"] { flex: 1; width: auto; }
  .ed-toolbar { margin-left: 0; width: 100%; padding: 4px 0; }
  #body { min-height: 50vh; font-size: 16px; }
  .ed-actions .btn { width: auto; min-height: 42px; }
  .ed-actions .danger { margin-left: 0; width: 100%; }
  .kpis, .kpis.four { grid-template-columns: 1fr 1fr; } .two { grid-template-columns: 1fr; gap: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .apitable.stack td { display: block; border-top: 0; padding: 2px 0; } .apitable.stack tr { display: block; padding: 8px 0; border-top: 1px dashed var(--line); } .apitable.stack tr:first-child { display: none; }
}
@media (max-width: 420px) { .kpis { grid-template-columns: 1fr; } .kpis.four { grid-template-columns: 1fr 1fr; } }
.narrow .check { margin: -2px 0 16px; align-items: center; } .narrow .check input { margin: 0; width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .caret, .s-building::before { animation: none; } .side { transition: none; } }

.login-brand { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; font: 1.1rem var(--pixel); }
body.out .content { min-height: 100vh; }

/* ---- shop + forms ---- */
.prod-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.thumb { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--line); flex: none; background: var(--code); }
.thumb.empty { display: inline-block; }
.products .msg { white-space: normal; }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; min-height: 20px; }
.gi { position: relative; width: 120px; }
.gi img { width: 120px; height: 120px; object-fit: cover; border: 1px solid var(--line); display: block; }
.gi div { display: flex; justify-content: space-between; margin-top: 4px; }
.gi button { background: var(--card2); border: 1px solid var(--line); color: var(--text); font: 12px var(--mono); padding: 2px 8px; cursor: pointer; }
.gi .pill { position: absolute; top: 4px; left: 4px; background: var(--bg); }
.howto { margin-top: 12px; font-size: .9rem; } .howto summary { cursor: pointer; color: var(--accent); font-family: var(--mono); font-size: .85rem; }
.filters input { font-size: .9rem; padding: 7px 10px; }
.tickets .record summary input { margin: 0 4px 0 0; width: auto; }
.tickets .record summary strong { font-weight: 600; }
.ticket { padding: 8px 0 4px; }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; }
.fields div { display: contents; }
.fields dt { font: .74rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.fields dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-actions { margin-top: 4px; grid-column: 1 / -1; }
.ticket-actions label { flex: 1 1 240px; }
.order-detail { padding: 8px 0 4px; } .order-detail ul { margin: 4px 0 8px; padding-left: 18px; }
p.small a.on { color: var(--text); font-weight: 600; }
@media (max-width: 860px) { .fields { grid-template-columns: 1fr; } .fields dt { padding-top: 6px; } }
.ticket-actions > .row { flex: none; }
.plain { margin: 0; padding-left: 18px; } .plain li { margin: 3px 0; }
.facts { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
/* phone: button groups wrap into a 2-up grid instead of running off the edge */
@media (max-width: 860px) {
  .card > .row > .row, .card > .row > form.row { flex-wrap: wrap; width: 100%; }
  .card > .row > .row .btn { width: auto; flex: 1 1 calc(50% - 5px); }
  .card > .row > .row .btn.small-btn { flex: 1 1 auto; }
}
.admin-banner { display: block; margin: 14px 0 0 -18px; padding: 7px 18px; background: color-mix(in srgb, var(--warn) 16%, transparent); border-top: 1px solid var(--warn); border-bottom: 1px solid var(--warn); color: var(--warn); font: .74rem var(--mono); letter-spacing: .06em; }
.admin-banner:hover { text-decoration: none; color: var(--text); }
.todo { list-style: none; padding: 0; margin: 0; } .todo li { padding: 7px 0; border-top: 1px dashed var(--line); } .todo li:first-child { border-top: 0; }
.todo li::before { content: "> "; color: var(--accent); font-family: var(--mono); }

/* ---- site editor ---- */
.jump { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -6px 0 14px; font: .82rem var(--mono); }
.jump a { color: var(--muted); } .jump a:hover { color: var(--accent); }
.lbl { display: block; font: 500 .86rem var(--mono); color: var(--muted); margin-bottom: 6px; }
.imgfield { margin-bottom: 14px; } .imgfield img { display: block; max-width: 220px; max-height: 160px; object-fit: cover; border: 1px solid var(--line); margin-bottom: 8px; }
.colorrow { display: flex; align-items: center; gap: 10px; margin-top: 5px; } .colorrow input { width: 54px; height: 36px; padding: 2px; margin: 0; }
.listfield { margin-bottom: 16px; } .listfield .rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.lrow { display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 2px; border: 1px dashed var(--line); background: color-mix(in srgb, var(--card2) 60%, transparent); }
.lrow > .grid { flex: 1; min-width: 0; } .lrow .grid label, .lrow .imgfield { margin-bottom: 10px; }
.lrow-tools { display: flex; flex-direction: column; gap: 4px; }
.lrow-tools button { background: var(--card2); border: 1px solid var(--line); color: var(--text); font: 11px var(--mono); width: 28px; height: 26px; cursor: pointer; }
.lrow-tools button:hover { border-color: var(--accent); color: var(--accent); }
.tpl { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px dashed var(--line); }
.tpl:first-of-type { border-top: 0; }
.picker { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.picker-box { background: var(--card); border: 1px solid var(--line2); width: min(760px, 100%); max-height: 86vh; overflow: auto; padding: 18px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; min-height: 60px; }
.picker-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid transparent; cursor: pointer; background: var(--code); }
.picker-grid img:hover { border-color: var(--accent); }
@media (max-width: 860px) { .lrow { flex-direction: column; } .lrow-tools { flex-direction: row; } .tpl { flex-direction: column; align-items: stretch; } }
.cond[hidden] { display: none !important; }
.pausebox { margin-top: 12px; }
.steps { margin: 0; padding-left: 20px; } .steps li { margin: 5px 0; } .card h3 { font-size: 1rem; margin: 0 0 6px; }

/* the privacy page: long-form text */
.legal { max-width: 760px; }
.legal h2 { margin: 26px 0 8px; }
.legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 20px; margin: 0; }
.legal li { margin: 0 0 6px; }

/* change requests: the ask box, the thread */
.badge { display: inline-block; font: .68rem var(--mono); padding: 0 6px; background: var(--accent); color: var(--accent-text); border-radius: var(--r); vertical-align: 1px; }
.btn.big { min-height: 52px; font-size: 1.05rem; padding: 0 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip { margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span { display: inline-block; padding: 9px 14px; border: 1px solid var(--line2); border-radius: var(--r); color: var(--text); font: .9rem var(--mono); }
.chip input:checked + span { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ask textarea { font: 1rem/1.55 var(--sans); }
.thread { display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: min(640px, 92%); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card2); }
.bubble.mine { align-self: flex-end; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.bubble .who { margin: 0 0 4px; font: .76rem var(--mono); color: var(--accent); }
.bubble .body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .files { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bubble .files img { width: 120px; height: 120px; object-fit: cover; border: 1px solid var(--line2); border-radius: var(--r); display: block; }
.preview-line { display: inline-block; max-width: 60ch; }
.s-doing { color: var(--lilac); }

/* the customer's home screen: big, plain buttons */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 18px; background: var(--card); border: 1px solid var(--line2);
  border-radius: var(--r); color: var(--text); box-shadow: 3px 3px 0 color-mix(in srgb, #000 40%, transparent); position: relative; }
.tile:hover { text-decoration: none; border-color: var(--accent); color: var(--text); transform: translate(-1px, -1px); }
.tile:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 color-mix(in srgb, #000 40%, transparent); }
.tile .t-title { font: 1.25rem/1.25 var(--pixel); color: var(--accent-soft); }
.tile .t-sub { font-size: .92rem; color: var(--muted); line-height: 1.45; }
.tile .t-num { font: 2.2rem/1 var(--pixel); color: var(--muted); }
.tile.hot { border-color: var(--warn); } .tile.hot .t-num { color: var(--warn); }
.tile.primary { background: var(--accent); border-color: var(--accent); grid-column: span 2; }
.tile.primary .t-title { color: var(--accent-text); font-size: 1.6rem; } .tile.primary .t-sub { color: color-mix(in srgb, var(--accent-text) 82%, transparent); font-size: 1rem; }
.tile.primary:hover { background: var(--accent-soft); }
.hello h1 { margin-bottom: 4px; }
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; }
.facts-row div { display: flex; flex-direction: column; }
.f-num { font: 1.9rem/1.1 var(--pixel); font-variant-numeric: tabular-nums; }
.f-label { font-size: .84rem; color: var(--muted); }
.checklist { margin: 14px 0 0; padding-left: 20px; } .checklist li { margin: 0 0 6px; }
@media (max-width: 560px) { .tile.primary { grid-column: auto; } .tiles { grid-template-columns: 1fr; } .tile { min-height: 0; } }
@media print { .side, .topbar, .foot, .no-print, .sky, .backdrop { display: none !important; } body { background: #fff; color: #000; } .content { margin: 0 !important; padding: 0 !important; }
  .card { border: 1px solid #bbb; box-shadow: none; background: #fff; color: #000; break-inside: avoid; } .card::before, .card::after { display: none; } .muted, .kpi-sub, .kpi-label { color: #444 !important; } h1, h2, .kpi-value { color: #000; text-shadow: none; } a { color: #000; } }

/* tools + logs */
.tablewrap { overflow-x: auto; } .logtable td.uri { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .logtable .mono { font-family: var(--mono); }
.redir-row { margin-top: 10px; }

.quick { max-width: 720px; } .quick input { font-size: 1.05rem; } .quick p.muted { font-size: 1rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 18px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line2); border-radius: var(--r); display: block; }

.changelog h1 { margin-top: 0; } .changelog h2 { margin-top: 34px; } .changelog h3 { margin: 22px 0 8px; color: var(--accent-soft); font: 1rem var(--mono); }
.changelog hr { border: 0; border-top: 1px dashed var(--line2); margin: 30px 0 0; } .changelog code { font-size: .88em; }

/* the public price list */
.price-hero { text-align: center; padding: 34px 8px 18px; }
.price-hero .kicker { font: .8rem var(--mono); letter-spacing: .12em; color: var(--accent); margin: 0 0 10px; }
.price-hero h1 { font-size: clamp(1.7rem, 5vw, 2.7rem); line-height: 1.2; margin: 0 auto 12px; max-width: 26ch; text-wrap: balance; }
.price-hero h1::before { content: none; }
.price-hero .lead { max-width: 58ch; margin: 0 auto 22px; color: var(--muted); font-size: 1.08rem; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; margin-bottom: 18px; }
.plans-1 { grid-template-columns: minmax(0, 420px); justify-content: center; } .plans-2 { grid-template-columns: repeat(2, 1fr); } .plans-4 { grid-template-columns: repeat(4, 1fr); }
.plan { margin: 0; display: flex; flex-direction: column; padding: 24px 22px; }
.plan h2 { margin: 0 0 10px; } .plan h2::before { content: none; }
.plan .amount { margin: 0; } .plan .num { font: 2.6rem/1 var(--pixel); color: var(--text); text-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 30%, transparent); }
.plan .per { color: var(--muted); font: .9rem var(--mono); }
.plan .setup { margin: 6px 0 0; font: .82rem var(--mono); color: var(--lilac); }
.plan .blurb { margin: 14px 0 0; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 16px 0 22px; flex: 1; }
.ticks li { padding: 6px 0 6px 24px; position: relative; border-top: 1px dashed var(--line); font-size: .95rem; }
.ticks li:first-child { border-top: 0; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-family: var(--mono); }
.plan.best { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.ribbon { position: absolute; top: -11px; right: 16px; font: .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px;
  background: var(--accent); color: var(--accent-text); border-radius: var(--r); }
.build { margin-bottom: 18px; }
.build-grid { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 18px 32px; align-items: center; }
.build-price h2 { margin: 0 0 10px; } .build-price h2::before { content: none; }
.build-price .kicker { font: .8rem var(--mono); letter-spacing: .12em; color: var(--accent); margin: 0 0 8px; }
.build-price .amount { margin: 0; } .build-price .num { font: 2.6rem/1 var(--pixel); color: var(--text); text-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 30%, transparent); }
.build-price .per { color: var(--muted); font: .9rem var(--mono); }
.build-ticks { margin: 0; flex: initial; }
.build-custom { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); line-height: 1.6; }
.plans-title .kicker { display: block; font: .8rem var(--mono); letter-spacing: .12em; color: var(--accent); margin-bottom: 8px; }
@media (max-width: 760px) { .build-grid { grid-template-columns: 1fr; } }
.price-note { max-width: 70ch; margin: 4px auto 0; text-align: center; }
@media (max-width: 980px) { .plans, .plans-2, .plans-4 { grid-template-columns: 1fr; } }
main.wrap:has(.price-hero) { max-width: 1120px; }

.tplcard.current { border-color: var(--ok); }

/* choosing a design: each card shows the real thing, shrunk */
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-bottom: 18px; }
.design { margin: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.design.current { border-color: var(--ok); }
.dthumb { display: block; position: relative; width: 100%; aspect-ratio: 16 / 11; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.dthumb iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 880px; border: 0; transform: scale(var(--k, .25)); transform-origin: 0 0; pointer-events: none; }
.design-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.design-body h2 { margin: 0 0 4px; } .design-body .for { margin: 0 0 6px; font: .8rem var(--mono); color: var(--accent); }
.design-body form { margin-top: auto; padding-top: 10px; } .design-body label { margin-bottom: 12px; }
main.wrap:has(.designs) { max-width: 1120px; }

/* the site editor: sections on the left, one open at a time, a bar of actions that stays put */
main.wrap:has(.ed-layout) { max-width: 1120px; }
.ed-head h1 { margin-bottom: 4px; }
.ed-progress { margin-top: 14px; padding: 12px 14px; border: 1px dashed color-mix(in srgb, var(--warn) 60%, transparent); background: color-mix(in srgb, var(--warn) 7%, transparent); }
.ed-progress p { margin: 0 0 8px; font-size: .93rem; }
.sampletag { display: inline-block; font: .68rem var(--mono); padding: 0 6px; border: 1px solid var(--warn); color: var(--warn); border-radius: var(--r); vertical-align: 1px; letter-spacing: 0; text-transform: none; font-weight: 400; }
.ed-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; align-items: start; }
.ed-steps { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 16px; font-family: var(--mono); font-size: .88rem;
  background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 10px; max-height: calc(100vh - 110px); overflow-y: auto; }
.ed-group { display: flex; flex-direction: column; } .ed-group .glabel { padding: 0 8px; }
.ed-steps a { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; padding: 7px 8px; color: var(--text); border-radius: var(--r); }
.ed-steps a:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ed-steps a.on { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent-soft); }
.ed-steps a small { font-size: .68rem; color: var(--muted); }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.st-sample .sdot { background: var(--warn); box-shadow: 0 0 8px var(--warn); } .st-sample small { color: var(--warn); }
.st-off .sdot { background: transparent; border: 1px solid var(--muted); } .st-ok small { color: var(--ok); }
.ed-pick { display: none; }
.ed-main { min-width: 0; } .ed-sec { margin: 0; } .ed-sec h2 { margin-bottom: 6px; } .ed-hint2 { margin: 0 0 18px; max-width: 70ch; }
.moreopts { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 12px; }
.moreopts summary { cursor: pointer; font: .86rem var(--mono); color: var(--accent); } .moreopts summary .muted { font-family: var(--sans); font-size: .8rem; }
.moreopts[open] summary { margin-bottom: 16px; }
.ed-bar { position: sticky; bottom: 0; z-index: 8; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 16px; padding: 12px 14px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--line2); border-radius: var(--r); }
.ed-dirty { color: var(--warn); flex: 1; text-align: center; }
.ed-bar .btn:disabled { opacity: .45; cursor: default; }
.ed-preview { position: fixed; inset: 0; z-index: 60; background: #0b0810; display: flex; flex-direction: column; }
.ed-preview-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line2); background: var(--card); }
.ed-preview-stage { flex: 1; min-height: 0; display: flex; justify-content: center; background: #2a2433; }
.ed-preview #preview { width: 100%; height: 100%; border: 0; border-radius: 0; background: #fff; }
.ed-preview.phone #preview { width: 390px; max-width: 100%; margin: 14px 0; height: calc(100% - 28px); border-radius: 18px; box-shadow: 0 0 0 8px #15101c, 0 20px 60px rgba(0,0,0,.5); }
body.pv-open { overflow: hidden; }
@media (max-width: 860px) {
  .ed-layout { grid-template-columns: 1fr; }
  .ed-steps { position: static; max-height: none; padding: 12px; } .ed-steps .ed-group { display: none; }
  .ed-pick { display: block; margin: 0; } .ed-pick select { margin-top: 6px; }
  .ed-bar { padding: 10px; } .ed-dirty { order: 3; flex-basis: 100%; }
  #pv-phone, #pv-wide { display: none; }
}

/* guide & questions */
.help h2 { margin-bottom: 12px; } .help p { max-width: 74ch; }
.helpsearch { max-width: 460px; margin: 0; } .helpsearch input { font-size: 1.02rem; }
.helpsteps { margin: 0 0 14px; padding-left: 22px; max-width: 76ch; } .helpsteps li { margin: 0 0 10px; padding-left: 4px; } .helpsteps li::marker { color: var(--accent); font-family: var(--pixel); }
.helplist { margin: 0; display: grid; gap: 0; } .helplist > div { display: grid; grid-template-columns: 240px 1fr; gap: 6px 22px; padding: 12px 0; border-top: 1px dashed var(--line); }
.helplist > div:first-child { border-top: 0; padding-top: 0; } .helplist dt { font-weight: 600; } .helplist dd { margin: 0; color: var(--muted); } .helplist dd a { white-space: nowrap; }
.helpbul { margin: 0; padding-left: 20px; max-width: 76ch; } .helpbul li { margin: 0 0 8px; color: var(--muted); } .helpbul strong { color: var(--text); }
.faq details { border-top: 1px dashed var(--line); padding: 2px 0; } .faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; padding: 12px 26px 12px 0; font-weight: 600; position: relative; list-style: none; } .faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font: 1.2rem var(--mono); color: var(--accent); } .faq details[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--accent-soft); } .faq details p { margin: 0 0 14px; color: var(--muted); }
@media (max-width: 700px) { .helplist > div { grid-template-columns: 1fr; } }

.setup { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }

/* plans: locked things are shown, not hidden */
.lock { font-size: .7em; opacity: .75; } .tile.locked { opacity: .78; border-style: dashed; }
.lockedbox { max-width: 720px; } .lockedbox .kicker { font: .8rem var(--mono); letter-spacing: .12em; color: var(--accent); margin: 0 0 8px; }
.lockedbox h1 { margin-bottom: 8px; } .lockedbox .lead { font-size: 1.1rem; }
.askup { margin-top: 18px; } .askup label { max-width: 520px; }
.ed-locked { border-style: dashed; } .ed-locked .grid, .ed-locked .moreopts { opacity: .55; pointer-events: none; }
.lockednote { margin: 0 0 18px; padding: 10px 12px; border: 1px dashed var(--line2); font-size: .92rem; }
.tierform select { padding: 6px 10px; font: .8rem var(--mono); margin: 0; width: auto; }

.every h2 { margin-bottom: 14px; }
.every-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px 22px; }
.every-grid li { padding: 10px 0 10px 24px; position: relative; } .every-grid li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-family: var(--mono); }
.every-grid strong { display: block; } .every-grid span { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.plans-title { text-align: center; margin: 30px 0 18px; }
.ticks li span { display: block; color: var(--muted); font-size: .85rem; line-height: 1.4; }
.ticks li.inherit { font: .78rem var(--mono); color: var(--accent); letter-spacing: .06em; text-transform: uppercase; padding-left: 0; } .ticks li.inherit::before { content: none; }
.cmp { width: 100%; border-collapse: collapse; } .cmp th { text-align: left; padding: 10px; border-bottom: 1px solid var(--line2); font-family: var(--mono); font-size: .85rem; }
.cmp th:not(:first-child), .cmp td.tick { text-align: center; width: 110px; } .cmp td { padding: 10px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.cmp td.tick { font-family: var(--mono); color: var(--ok); font-size: 1.05rem; }
.howit .helpsteps { max-width: none; }

.rm-hero { padding-bottom: 8px; }
.rm-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
.rm-col { margin: 0; } .rm-building { border-color: var(--accent); } .rm-done { opacity: .85; }
.rm-list { list-style: none; margin: 0; padding: 0; } .rm-list li { padding: 12px 0; border-top: 1px dashed var(--line); } .rm-list li:first-child { border-top: 0; }
.rm-list p { margin: 4px 0; color: var(--muted); font-size: .93rem; } .rm-list strong { display: block; }
.rm-area { display: inline-block; font: .68rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lilac); margin-bottom: 2px; }
.rm-edit { border-top: 1px dashed var(--line); padding: 8px 0; } .rm-edit summary { cursor: pointer; } .rm-edit .inline-form { margin-top: 10px; }
main.wrap:has(.rm-cols) { max-width: 1120px; }
@media (max-width: 760px) { .rm-cols { grid-template-columns: 1fr; } }

/* live edit */
main.wrap:has(.lvwrap) { max-width: none; padding-top: 14px; }
.lvwrap { display: flex; flex-direction: column; gap: 8px; min-height: calc(100vh - 120px); }
.lv-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.lv-help { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; min-height: 1.4em; }
#lv-status.bad { color: var(--bad); }
.lv-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) auto; gap: 10px 18px; align-items: center; padding: 10px 14px; border: 1px dashed var(--accent); border-radius: var(--r); font-size: .9rem; }
.lv-addwrap { position: relative; }
.lv-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 45; min-width: 260px; background: var(--card); border: 1px solid var(--line2); border-radius: var(--r); padding: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.lv-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 10px; font: .9rem var(--mono); cursor: pointer; border-radius: var(--r); }
.lv-menu button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-soft); }
.lv-menu-h { margin: 6px 10px 4px; font: .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lv-stage { position: relative; flex: 1; min-height: 70vh; display: flex; justify-content: center; background: #2a2433; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; }
.lvwrap #lf, .lvwrap #lf2 { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .15s; }
.lvwrap #lf.front, .lvwrap #lf2.front { opacity: 1; pointer-events: auto; z-index: 1; }
.lvwrap.phone #lf, .lvwrap.phone #lf2 { width: 390px; max-width: 100%; left: 50%; transform: translateX(-50%); top: 12px; bottom: 12px; height: auto; border-radius: 18px; box-shadow: 0 0 0 8px #15101c; }
.lv-sel { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .9rem; padding: 8px 12px; background: color-mix(in srgb, var(--card) 92%, transparent); border: 1px solid var(--accent); border-radius: var(--r); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); max-width: calc(100% - 24px); }
.lv-toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.lv-toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; background: var(--card); color: var(--text); border: 1px solid var(--line2); border-radius: var(--r); padding: 10px 14px; font-size: .92rem; box-shadow: 0 14px 40px rgba(0,0,0,.5); animation: toastin .18s ease-out; }
.lv-toast.ok { border-color: var(--ok); } .lv-toast.out { opacity: 0; transition: opacity .35s; }
.lv-toast-undo { background: none; border: 1px solid var(--accent); color: var(--accent); border-radius: var(--r); padding: 4px 10px; font: .82rem var(--mono); cursor: pointer; }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } }
#lv-publish.pulse { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); animation: pub 1.6s infinite; }
@keyframes pub { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.lv-panel { position: fixed; right: 14px; bottom: 14px; z-index: 40; width: min(520px, calc(100vw - 28px)); background: var(--card); border: 1px solid var(--accent); border-radius: var(--r); padding: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lv-panel textarea { font: .98rem/1.55 var(--sans); }
.lv-link label { display: flex; align-items: center; gap: 8px; margin: 0; font: .82rem var(--mono); color: var(--muted); } .lv-link input { margin: 0; width: min(360px, 60vw); padding: 6px 9px; font-size: .9rem; }
@media (max-width: 860px) {
  main.wrap:has(.lvwrap) { padding: 8px 8px 0; } .lvwrap { gap: 6px; min-height: calc(100vh - 70px); }
  .lv-bar { gap: 6px; } .lv-bar > span { width: 100%; justify-content: space-between; } .lv-bar .btn { min-height: 36px; padding: 0 10px; font-size: .8rem; }
  .lv-tips { grid-template-columns: 1fr; font-size: .85rem; padding: 8px 10px; } .lv-help { font-size: .8rem; } #lv-samples { display: none; }
  .lv-stage { min-height: 62vh; border-radius: 0; margin: 0 -8px; border-left: 0; border-right: 0; }
  .lvwrap.phone #lf, .lvwrap.phone #lf2 { width: 100%; left: 0; transform: none; top: 0; bottom: 0; border-radius: 0; box-shadow: none; } #lv-phone { display: none; }
  .lv-sel { left: 6px; right: 6px; bottom: 6px; max-width: none; font-size: .85rem; padding: 8px; } .lv-link input { width: 100%; }
  .lv-menu { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; min-width: 0; max-height: 60vh; overflow: auto; }
  .lv-panel { right: 0; left: 0; bottom: 0; width: auto; border-radius: var(--r) var(--r) 0 0; }
}
.addon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.addon { padding: 18px; border: 1px dashed var(--line2); border-radius: var(--r); } .addon h3 { margin: 0 0 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .addon p { margin: 0; color: var(--muted); }

/* ---- theme picker ---- */
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.themes > div { grid-column: 1 / -1; }
.theme-pick { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line2); border-radius: var(--r); cursor: pointer; font-family: var(--sans); color: var(--text); margin: 0; }
.theme-pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.theme-pick input { width: auto; margin: 0; accent-color: var(--accent); }
.theme-swatch { flex: none; display: flex; width: 84px; height: 56px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0,0,0,.2); }
.ts-side { width: 26px; display: flex; flex-direction: column; gap: 4px; padding: 6px 5px; } .ts-side i { display: block; height: 4px; border-radius: 2px; }
.ts-main { flex: 1; padding: 6px; display: flex; flex-direction: column; gap: 4px; } .ts-main b { display: block; height: 7px; width: 60%; border-radius: 2px; } .ts-main i { display: block; height: 4px; border-radius: 2px; }
.t-dusk .theme-swatch { background: #1c1429; } .t-dusk .ts-side { background: #130e1b; } .t-dusk .ts-side i { background: #54436b; } .t-dusk .ts-side i:first-child { background: #f3a7c0; } .t-dusk .ts-main b { background: #f3a7c0; } .t-dusk .ts-main i { background: #3a2d4d; }
.t-clean .theme-swatch { background: #f5f6f8; } .t-clean .ts-side { background: #ffffff; border-right: 1px solid #e3e7ec; } .t-clean .ts-side i { background: #cfd6de; } .t-clean .ts-side i:first-child { background: #2563eb; } .t-clean .ts-main b { background: #1b2430; } .t-clean .ts-main i { background: #d7dde4; }
.t-slate .theme-swatch { background: #0f172a; } .t-slate .ts-side { background: #172036; } .t-slate .ts-side i { background: #334155; } .t-slate .ts-side i:first-child { background: #60a5fa; } .t-slate .ts-main b { background: #e2e8f0; } .t-slate .ts-main i { background: #273449; }

/* ===== themes. ":root" above is "dusk", the original. "clean" (light) and "slate" (dark) are plainer: a normal business tool,
   no pixel lettering, no corner marks, no sky. html.simple carries what the two share. ===== */
[data-theme=clean] { --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #f5f6f8; --bg2: #eef0f3; --card: #ffffff; --card2: #f1f3f6; --code: #f3f4f6; --text: #1b2430; --muted: #5f6b7a; --line: #e3e7ec; --line2: #cfd6de;
  --accent: #2563eb; --accent-soft: #1d4ed8; --accent-text: #ffffff; --lilac: #6d5bd0; --ok: #15803d; --bad: #b91c1c; --warn: #b45309;
  --logbg: #0f172a; --logtext: #e2e8f0; --series-1: #2563eb; --series-tint: color-mix(in srgb, #2563eb 18%, transparent);
  --pixel: var(--ui); --sans: var(--ui); --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; --r: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06); color-scheme: light; }
[data-theme=slate] { --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #0f172a; --bg2: #0f172a; --card: #172036; --card2: #1e293b; --code: #0b1220; --text: #e2e8f0; --muted: #94a3b8; --line: #273449; --line2: #334155;
  --accent: #60a5fa; --accent-soft: #93c5fd; --accent-text: #0b1220; --lilac: #a78bfa; --ok: #4ade80; --bad: #f87171; --warn: #fbbf24;
  --logbg: #0b1220; --logtext: #e2e8f0; --series-1: #60a5fa; --series-tint: color-mix(in srgb, #60a5fa 22%, transparent);
  --pixel: var(--ui); --sans: var(--ui); --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; --r: 8px; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark; }
html.simple { scrollbar-color: var(--line2) var(--bg); }
html.simple ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 999px; border: 2px solid var(--bg); }
html.simple ::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); color: inherit; }
html.simple .sky { background: var(--bg); } html.simple .sky::before, html.simple .sky::after { display: none; }
html.simple h1, html.simple h2, html.simple h3 { font-family: var(--ui); font-weight: 650; letter-spacing: -.01em; }
html.simple h1 { font-size: 1.45rem; text-shadow: none; } html.simple h2 { font-size: 1.08rem; }
html.simple h2::before, html.simple h1::before { content: none; }
html.simple .glabel::before { content: none; }
html.simple .glabel { font: 600 .68rem var(--ui); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 4px 12px; }
html.simple button.glabel { margin-left: 0; padding-left: 12px; }
html.simple .side { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.simple .brand { font: 600 1rem var(--ui); } html.simple .caret { display: none; } html.simple .dot { border-radius: 50%; box-shadow: none; }
html.simple .menu { font-family: var(--ui); font-size: .92rem; gap: 16px; }
html.simple .menu a, html.simple .menu button.link { padding: 7px 10px 7px 12px; border-radius: 6px; margin-right: 10px; width: auto; }
html.simple .menu a::before, html.simple .menu button.link::before, html.simple .menu a[aria-current="page"]::before { content: none; }
html.simple .menu a:hover, html.simple .menu button.link:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
html.simple .menu a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }
html.simple .side-foot, html.simple .foot { font-family: var(--ui); letter-spacing: 0; } html.simple .side-foot { border-top-style: solid; }
html.simple .card { background: var(--card); box-shadow: var(--shadow); } html.simple .card::before, html.simple .card::after { display: none; }
html.simple .flash { font-family: var(--ui); } html.simple .flash::before, html.simple .todo li::before { content: none; }
html.simple .todo li, html.simple .deploys li { border-top-style: solid; }
html.simple label { font-family: var(--ui); font-weight: 600; color: var(--text); }
html.simple input, html.simple select, html.simple textarea { background: var(--card); border-color: var(--line2); }
html.simple input:focus, html.simple select:focus, html.simple textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
html.simple .btn { font: 600 .85rem var(--ui); letter-spacing: 0; text-transform: none; background: var(--card); border-color: var(--line2); box-shadow: var(--shadow); }
html.simple .btn:hover { color: var(--text); background: var(--card2); border-color: var(--line2); }
html.simple .btn:active { transform: translateY(1px); box-shadow: none; }
html.simple .btn.primary, html.simple .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
html.simple .btn.primary:hover { filter: brightness(1.08); }
html.simple .btn.gh { background: var(--text); border-color: var(--text); color: var(--bg); }
html.simple .status { font: 600 .72rem var(--ui); letter-spacing: .02em; text-transform: none; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); }
html.simple .status::before, html.simple .status::after, html.simple .s-building::before { content: none; }
html.simple .pill { font: 500 .74rem var(--ui); border-radius: 999px; } html.simple .badge { font: 600 .68rem var(--ui); border-radius: 999px; padding: 0 7px; }
html.simple .tile { box-shadow: var(--shadow); border-color: var(--line); }
html.simple .tile:hover { transform: none; box-shadow: 0 6px 18px rgba(16,24,40,.1); border-color: var(--accent); }
html.simple .tile:active { transform: none; box-shadow: var(--shadow); }
html.simple .tile .t-title { font: 600 1.1rem/1.3 var(--ui); color: var(--text); } html.simple .tile .t-num { font: 700 2rem/1 var(--ui); color: var(--accent); }
html.simple .kpi-value { font: 700 1.9rem/1.15 var(--ui); text-shadow: none; } html.simple .f-num { font: 700 1.8rem/1.1 var(--ui); }
html.simple .ed-title { font: 600 1.4rem var(--ui); } html.simple .login-brand { font: 600 1.1rem var(--ui); }
html.simple .meter { border-radius: 999px; }
html.simple .danger-zone, html.simple .deploys .meta, html.simple .repo-line { font-family: var(--ui); }
html.simple .lv-menu button, html.simple .lv-toast-undo, html.simple .lv-link label { font-family: var(--ui); }

/* the "// " on kickers is a dusk decoration */
.kicker::before { content: "// "; }
html.simple .kicker::before { content: none; }
html.simple .kicker { font: 600 .72rem var(--ui); letter-spacing: .08em; text-transform: uppercase; }

/* client logo, report summary */
.brand-logo { width: 22px; height: 22px; object-fit: contain; flex: none; }
.login-logo { margin: 0 0 10px; text-align: center; } .login-logo img { max-height: 72px; max-width: 220px; object-fit: contain; }
.report-summary { margin: 10px 0 0; font-size: 1.05rem; max-width: 640px; }

/* ===== motion, panel-wide. Cards and tiles arrive with a small stagger, buttons and tiles lift under the pointer,
   pages cross-fade when the browser supports view transitions. All of it is off under prefers-reduced-motion. ===== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms ease-out both vt-out; }
::view-transition-new(root) { animation: 260ms cubic-bezier(.2, .7, .2, 1) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
.side, .topbar { view-transition-name: side; }
::view-transition-old(side), ::view-transition-new(side) { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  main.wrap > .card, main.wrap > .kpis > .card, main.wrap > .tiles > .tile, main.wrap > .two > .card, main.wrap > .hero, main.wrap > .plans > .card, main.wrap > section:not(.landing *) {
    animation: arrive .55s cubic-bezier(.2, .7, .2, 1) both; }
  main.wrap > :nth-child(2), main.wrap > .kpis > .card:nth-child(2), main.wrap > .tiles > .tile:nth-child(2) { animation-delay: 60ms; }
  main.wrap > :nth-child(3), main.wrap > .kpis > .card:nth-child(3), main.wrap > .tiles > .tile:nth-child(3) { animation-delay: 120ms; }
  main.wrap > :nth-child(4), main.wrap > .kpis > .card:nth-child(4), main.wrap > .tiles > .tile:nth-child(4) { animation-delay: 180ms; }
  main.wrap > :nth-child(5), main.wrap > .tiles > .tile:nth-child(5) { animation-delay: 240ms; }
  main.wrap > :nth-child(n+6), main.wrap > .tiles > .tile:nth-child(n+6) { animation-delay: 300ms; }
  @keyframes arrive { from { opacity: 0; transform: translateY(14px); } }
  .card { transition: border-color .25s, box-shadow .3s, transform .3s cubic-bezier(.2, .7, .2, 1); }
  .btn { transition: transform .15s cubic-bezier(.34, 1.4, .64, 1), box-shadow .15s, border-color .2s, color .2s, background .2s; }
  .btn:hover { transform: translateY(-1px); box-shadow: 3px 4px 0 color-mix(in srgb, #000 45%, transparent); }
  .btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 color-mix(in srgb, #000 45%, transparent); }
  .tile { transition: transform .3s cubic-bezier(.34, 1.4, .64, 1), border-color .2s, box-shadow .3s; }
  .tile:hover { transform: translateY(-3px); box-shadow: 3px 6px 0 color-mix(in srgb, #000 40%, transparent), 0 14px 30px -14px color-mix(in srgb, var(--accent) 50%, transparent); }
  .menu a { transition: color .15s, background .2s, padding-left .2s; }
  .menu a:hover { padding-left: 24px; }
  html.simple .menu a:hover { padding-left: 16px; }
  .menu a[aria-current="page"] { animation: navin .35s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes navin { from { opacity: .4; transform: translateX(-4px); } }
  .deploys li, .dbrows li, .apitable tr { transition: background .2s; }
  .deploys li:hover, .dbrows li:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
  .kpi-value { animation: countin .6s cubic-bezier(.2, .7, .2, 1) both .2s; }
  @keyframes countin { from { opacity: 0; transform: translateY(6px) scale(.98); } }
  .flash { animation: arrive .4s cubic-bezier(.2, .7, .2, 1) both; }
  .glabel .chev { transition: transform .2s cubic-bezier(.34, 1.4, .64, 1); }
  input:focus, select:focus, textarea:focus { transition: border-color .15s, box-shadow .15s; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
  .pill, .badge { transition: transform .2s; } .tile:hover .pill { transform: translateY(-1px); }
  .chip span { transition: border-color .15s, background .15s, transform .15s; } .chip:hover span { transform: translateY(-1px); }
  details > summary { transition: color .15s; }
}
