/* The website wears the app's own tokens (BrainsResult/src/renderer/src/common/styles/base.css):
   same paper, ink, hairlines and mint. Fonts are served from this site; nothing loads from elsewhere. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-mono-400-latin.woff2') format('woff2');
}

:root {
  --sans: Geist, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --bg: #fbfbf9;
  --side: #f5f4f1;
  --chrome: #edece8;
  --hover: #e8e7e2;
  --line: #e5e3de;
  --ink: #1f1e1c;
  --mute: #6f6d67;
  --faint: #a09e97;
  --card: #ffffff;
  --mint: oklch(0.62 0.11 168);
  --mint-ink: oklch(0.42 0.09 168);
  --mintS: oklch(0.94 0.035 168);
  --blue: oklch(0.6 0.12 238);
  --warn: oklch(0.68 0.12 75);
  --red: oklch(0.55 0.17 27);
  --on-mint: #ffffff;
  --shadow: 0 1px 2px rgb(31 30 28 / 0.06), 0 18px 50px -18px rgb(31 30 28 / 0.28);
  --wrap: 1120px;
  color-scheme: light;
}
/* Dark: the reader's system setting, unless they chose a theme with the button. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1b1a19;
    --side: #201f1d;
    --chrome: #151413;
    --hover: #2c2a28;
    --line: #302e2b;
    --ink: #e8e6e1;
    --mute: #9c9992;
    --faint: #6d6a64;
    --card: #242321;
    --mint: oklch(0.78 0.11 168);
    --mint-ink: oklch(0.82 0.1 168);
    --mintS: oklch(0.34 0.05 168);
    --blue: oklch(0.75 0.11 238);
    --red: oklch(0.74 0.14 27);
    --on-mint: #10201a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 60px -20px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1b1a19;
  --side: #201f1d;
  --chrome: #151413;
  --hover: #2c2a28;
  --line: #302e2b;
  --ink: #e8e6e1;
  --mute: #9c9992;
  --faint: #6d6a64;
  --card: #242321;
  --mint: oklch(0.78 0.11 168);
  --mint-ink: oklch(0.82 0.1 168);
  --mintS: oklch(0.34 0.05 168);
  --blue: oklch(0.75 0.11 238);
  --red: oklch(0.74 0.14 27);
  --on-mint: #10201a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 60px -20px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
/* Small capitals in the mono face: the app's section labels. */
.caps {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--mute);
  max-width: 34em;
}
.num {
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover {
  background: var(--hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--mint);
  border-color: transparent;
  color: var(--on-mint);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--mint);
  filter: brightness(1.06);
}
.btn[aria-disabled='true'] {
  color: var(--faint);
  background: transparent;
  cursor: default;
}
.btn[aria-disabled='true']:hover {
  background: transparent;
}

section {
  padding: clamp(56px, 8vw, 104px) 0;
}
.hair {
  border-top: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* ---------- Frame: header, footer, screenshots ---------- */
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in oklab, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; font-size: 16px; }
.brand img { border-radius: 6px; }
.links { display: flex; gap: 22px; margin-left: 8px; font-size: 14.5px; }
.links a { color: var(--mute); text-decoration: none; padding: 6px 0; }
.links a:hover, .links a[aria-current='page'] { color: var(--ink); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.acts { display: flex; align-items: center; gap: 8px; margin-left: -12px; }
.acct { min-height: 38px; padding: 0 14px; font-size: 14px; }
.acct .in, html[data-in] .acct .out { display: none; }
html[data-in] .acct .in { display: inline; }
.tools .menu { display: none; }
.lang, .theme, .menu { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-decoration: none; cursor: pointer; }
.lang:hover, .theme:hover, .menu:hover { background: var(--hover); color: var(--ink); }
.cta { min-height: 38px; padding: 0 14px; font-size: 14px; }
/* Buttons that end or bring back something: red and mint outlines. */
.btn-danger { color: var(--red); border-color: color-mix(in oklab, var(--red) 55%, var(--line)); }
.btn-danger:hover { background: color-mix(in oklab, var(--red) 12%, var(--card)); }
.btn-go { color: var(--mint-ink); border-color: var(--mint); }
.btn-go:hover { background: var(--mintS); }
.foot { padding: 48px 0 28px; font-size: 14.5px; background: var(--side); }
.foot-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-cols h2 { margin-bottom: 12px; font-weight: 400; }
.foot-cols a:not(.brand) { display: block; color: var(--mute); text-decoration: none; padding: 4px 0; }
.foot-cols a:not(.brand):hover { color: var(--ink); }
.about p { color: var(--mute); margin-top: 12px; max-width: 26em; }
.fine { margin-top: 36px; color: var(--faint); font-size: 13px; }

.shot { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #151413; }
.shot.light { background: #edece8; }
.shot-bar { display: flex; gap: 6px; padding: 10px 12px; }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3836; }
.shot.light .shot-bar i { background: #cfcdc7; }
.shot img { width: 100%; }

.h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 12px 0 0; max-width: 20em; }
.body { color: var(--mute); margin-top: 12px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
ul.dots { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
ul.dots li { padding-left: 22px; position: relative; font-size: 15px; }
ul.dots li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

/* ---------- Home ---------- */
.hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: 0; }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); max-width: 17em; margin: 14px 0 20px; }
.note { margin-top: 16px; font-size: 13.5px; color: var(--faint); }
.stage { margin-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(56px, 8vw, 104px); }
.features { display: grid; gap: clamp(56px, 8vw, 104px); margin-top: clamp(40px, 6vw, 72px); }
.feature { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.feature.flip .text { order: 2; }
.tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--mint-ink); margin-bottom: 10px; }
.feature h3 { font-size: clamp(22px, 2.4vw, 28px); }
.tree { margin: 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: var(--mute); overflow-x: auto; }
.own { background: var(--side); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(32px, 5vw, 56px) 0 0; border-top: 1px solid var(--line); }
.facts > div { padding: 22px 22px 4px 0; border-right: 1px solid var(--line); margin-right: 22px; }
.facts > div:last-child { border-right: 0; margin-right: 0; }
.facts dt { font-weight: 600; letter-spacing: -0.01em; }
.facts dd { margin: 8px 0 0; color: var(--mute); font-size: 15px; }
.team { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.split .btn { margin-top: 20px; }
.end { background: var(--chrome); border-top: 1px solid var(--line); text-align: center; }
.end .h2, .end .lede { margin-left: auto; margin-right: auto; }
.end .lede { margin-top: 14px; margin-bottom: 26px; }

/* ---------- Pricing, download, 404 ---------- */
.head { padding-bottom: 0; }
.head h1, .p-404 h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 14px 0 18px; max-width: 16em; }
.p-pricing .h2, .p-download .h2 { font-size: clamp(22px, 2.6vw, 30px); }
.period { display: inline-flex; align-items: center; gap: 4px; margin-top: 32px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--side); }
.period button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); font: inherit; font-size: 14.5px; cursor: pointer; }
.period button[aria-pressed='true'] { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }
.save { font-family: var(--mono); font-size: 12px; color: var(--mint-ink); padding: 0 12px 0 8px; }
.plans-section { padding-top: 36px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 26px 24px 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.plan.featured, .way.main { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mintS); }
.plan h2, .way h2 { font-size: 20px; }
.for { color: var(--mute); font-size: 14.5px; margin-top: 6px; min-height: 3em; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 20px; }
.amount { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; }
.per { color: var(--mute); font-size: 14px; }
[data-show='yearly'] .monthly, [data-show='monthly'] .yearly { display: none; }
ul.checks { list-style: none; padding: 20px 0 0; margin: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 14.5px; }
ul.checks li { padding-left: 22px; position: relative; }
ul.checks li::before { content: ''; position: absolute; left: 3px; top: 0.45em; width: 9px; height: 5px; border-left: 2px solid var(--mint); border-bottom: 2px solid var(--mint); transform: rotate(-45deg); }
.soon { margin-top: 20px; color: var(--mute); font-size: 14.5px; }
.addons { width: 100%; max-width: 720px; margin-top: 20px; border-collapse: collapse; }
.addons th, .addons td { text-align: left; padding: 16px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.addons small { display: block; color: var(--mute); font-weight: 400; font-size: 14px; }
.addons td { text-align: right; white-space: nowrap; font-weight: 600; }
.addons td span { color: var(--mute); font-weight: 400; font-size: 14px; }
.narrow { max-width: 780px; }
.faq .h2 { margin-bottom: 16px; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 18px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-family: var(--mono); color: var(--mute); }
details[open] summary::after { content: '−'; }
details p { color: var(--mute); padding: 0 0 20px; max-width: 44em; }

.ways { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 40px; }
.way { padding: 26px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.way p { color: var(--mute); font-size: 15px; flex: 1; margin-bottom: 8px; }
.two { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); }
.two .h2 { margin-bottom: 18px; }
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 18px; }
ol.steps li { counter-increment: step; padding-left: 44px; position: relative; }
ol.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: var(--mute); }
.p-download ul.dots { color: var(--mute); margin-top: 0; }
.warn { margin-top: 28px; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); border-left: 3px solid var(--warn); background: var(--side); font-size: 15px; }
.warn h3 { font-size: 16px; letter-spacing: -0.01em; }
.warn p { color: var(--mute); margin: 8px 0 12px; }
.warn a { font-weight: 500; }

@media (max-width: 860px) {
  .feature, .feature.flip, .team, .split, .plans { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .text { order: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding: 18px 16px 18px 0; }
  .for { min-height: 0; }
}
@media (max-width: 760px) {
  /* The menu button opens the links and the two buttons under the bar. */
  .tools .menu { display: inline-grid; }
  .bar { gap: 0 12px; flex-wrap: wrap; }
  .links, .acts { display: none; flex-basis: 100%; margin: 0; }
  .top.open .links { display: grid; gap: 0; order: 3; padding: 6px 0 10px; border-top: 1px solid var(--line); font-size: 16px; }
  .top.open .links a { padding: 11px 0; }
  .top.open .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; order: 4; padding: 0 0 16px; }
  .top.open .acts .btn { min-height: 44px; font-size: 15px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .about { grid-column: 1 / -1; }
  .ways, .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; }
}

/* ---------- Pages behind a sign-in: forms, account ---------- */
.p-shop h1 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 14px; }
.p-shop .h2 { font-size: 22px; margin: 44px 0 16px; }
.hint { color: var(--mute); font-size: 14px; margin-top: 10px; }
.hint a { color: inherit; }
.alert, .notice { margin: 20px 0; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--side); font-size: 15px; }
.alert { border-left: 3px solid var(--red, #c0504d); }
.notice { border-left: 3px solid var(--mint); color: var(--mute); }
.form { display: grid; gap: 10px; margin-top: 26px; max-width: 460px; }
.form label { font-weight: 500; font-size: 14.5px; margin-top: 8px; }
.form input[type='email'], .form input[type='text'], .form input[type='number'] { min-height: 46px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; width: 100%; }
.form input:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.form input.code { font-family: var(--mono); font-size: 24px; letter-spacing: 0.3em; text-align: center; }
.form .btn { margin-top: 12px; justify-self: start; }
.form fieldset { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.form legend { font-weight: 500; font-size: 14.5px; padding: 0; margin-bottom: 8px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; margin: 0; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mintS); }
.choice:has(input:disabled) { opacity: 0.5; cursor: default; }
.choice input { accent-color: var(--mint); width: 18px; height: 18px; }
.choice small { display: block; color: var(--mute); font-size: 13.5px; }
.form.buy:has(input[name='plan'][value='pro']:checked) .team-only { display: none; }
.team-only { display: grid; gap: 6px; }
.team-only .hint { margin: 0 0 6px; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 12px; }
.total b { font-size: 26px; letter-spacing: -0.02em; }
.secret { margin: 22px 0; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--mint); background: var(--card); }
.key { font-family: var(--mono); font-size: clamp(17px, 2.6vw, 24px); letter-spacing: 0.06em; margin: 8px 0 0; overflow-wrap: anywhere; user-select: all; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.inline { display: inline; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.license { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 20px 22px; margin-bottom: 14px; }
.license header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.license h3 { font-size: 18px; }
.license h3 small, .license h4 small { color: var(--mute); font-weight: 400; font-size: 13.5px; margin-left: 6px; }
.license h4 { font-size: 14.5px; margin: 18px 0 6px; font-weight: 600; letter-spacing: 0; }
.license code, .orders code { font-family: var(--mono); font-size: 13px; }
.pill { font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.pill.on { color: var(--mint-ink); border-color: var(--mint); }
ul.rows { list-style: none; padding: 0; margin: 0; }
ul.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
ul.rows small { color: var(--mute); margin-left: 6px; }
.license-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
/* Stop / resume sit apart from the everyday buttons. */
.license-actions .end { margin-left: auto; }
.orders { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.orders td { padding: 12px 8px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.orders small { display: block; color: var(--mute); font-size: 13px; }
.orders td.num { text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
  .orders td:nth-child(2) { display: none; }
  .account-head { flex-direction: column; }
}

/* Terms (step 14.6) */
.prose h2 { font-size: 20px; margin: 34px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--mute); margin: 0 0 12px; line-height: 1.7; }
.prose a { color: var(--ink); }

/* Account: user packs per connection, stopped subscriptions (step 14.6) */
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.packs { display: inline-flex; align-items: center; gap: 6px; }
.packs input { width: 64px; min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }

/* ---------- Admin (step 14.8) ---------- */
.p-admin { --wrap: 1240px; }
.p-admin section { padding: 36px 0 72px; }
.p-admin h1 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.p-admin h1 code { font-family: var(--mono); font-size: 0.8em; letter-spacing: 0; }
.p-admin .h2 { font-size: 19px; margin: 40px 0 12px; }
.p-admin .h2 small { color: var(--mute); font-weight: 400; font-size: 14px; }
.p-admin .brand small { font-family: var(--mono); font-size: 11px; color: var(--mute); font-weight: 400; margin-left: 4px; text-transform: uppercase; letter-spacing: 0.08em; }
.p-admin .links { gap: 18px; }
.p-admin .who { font-family: var(--mono); font-size: 12.5px; color: var(--mute); }
.p-admin .menu { font-size: 18px; }
.p-admin .caps a { color: inherit; }
.form input[type='password'], .form input[type='search'], .form select, .search input { min-height: 46px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; width: 100%; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400 !important; }
.check input { width: 18px; height: 18px; accent-color: var(--mint); }
.btn[disabled] { opacity: 0.5; cursor: default; }
button.btn { cursor: pointer; font-family: inherit; }
.search { display: flex; gap: 8px; margin: 18px 0 10px; max-width: 620px; }
.search input { min-height: 40px; font-size: 15px; }
.search .btn { min-height: 40px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; font-size: 14px; }
.tabs a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--mute); }
.tabs a[aria-current='page'] { color: var(--ink); border-color: var(--ink); }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.grid { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.grid th { text-align: left; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); font-weight: 400; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.grid tbody tr:first-child td { border-top: 0; }
.grid tbody tr:hover { background: var(--side); }
.grid small { display: block; color: var(--mute); font-size: 13px; }
.grid td small:only-child, .grid td > small:not(:first-child) { margin-top: 1px; }
.grid code, .p-admin dd code, .p-admin .rows code { font-family: var(--mono); font-size: 13px; }
.grid .num, .grid th.num { text-align: right; white-space: nowrap; }
.grid.audit td { font-size: 13.5px; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.pager .hint { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 20px; }
.stat { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 16px 18px; }
.stat .big { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.stat .big a { text-decoration: none; }
.stat .hint { margin-top: 2px; }
.facts2 { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 20px 0 0; font-size: 15px; }
.facts2 dt { color: var(--mute); }
.facts2 dd { margin: 0; overflow-wrap: anywhere; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.card.form { margin: 0; max-width: none; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 18px 20px; }
.card h3 { font-size: 16px; letter-spacing: -0.01em; }
.card .hint { margin: 0; }
.steps { color: var(--mute); padding-left: 20px; margin: 16px 0; display: grid; gap: 6px; font-size: 15px; }
.enroll { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 20px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.qr { width: 188px; height: 188px; background: #fff; border-radius: 8px; padding: 6px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.enroll .key { font-size: 17px; }
@media (max-width: 1080px) {
  /* Seven links don't fit beside the name: the admin menu folds earlier than the site's. */
  .p-admin .menu { display: inline-grid; }
  .p-admin .bar { gap: 0 12px; flex-wrap: wrap; }
  .p-admin .links, .p-admin .acts { display: none; flex-basis: 100%; margin: 0; }
  .p-admin .top.open .links { display: grid; gap: 0; order: 3; padding: 6px 0 10px; border-top: 1px solid var(--line); font-size: 16px; }
  .p-admin .top.open .links a { padding: 11px 0; }
  .p-admin .top.open .acts { display: flex; justify-content: space-between; order: 4; padding: 0 0 16px; }
}
@media (max-width: 560px) {
  .facts2 { grid-template-columns: 1fr; gap: 2px; }
  .facts2 dd { margin-bottom: 10px; }
}
.hint.switch { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 460px; font-size: 15px; }
.hint.switch a { color: var(--ink); font-weight: 500; }
.card.form input[type='text'], .card.form input[type='number'], .card.form select { background: var(--bg); }
