
@font-face { font-family: 'SpaceGrotesk'; src: url('/assets/fonts/spacegrotesk-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'SpaceGrotesk'; src: url('/assets/fonts/spacegrotesk-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'PlexMono'; src: url('/assets/fonts/plexmono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* Neutral, hairline-delineated system — shadcn restraint, Base typography,
   a touch of macOS frosted depth. Dark theme: flat surfaces on near-black;
   structure comes from borders and space, not shadows. */
:root {
  --paper: #0a0a0b;                 /* page */
  --card: #111114;                  /* surfaces (delimited by hairline) */
  --sc: #1b1b1f;                    /* subtle fill: hover, active, wells */
  --sc-high: #27272c;               /* stronger fill: active indicator */
  --ink: #fafafa;                   /* foreground (near-white) */
  --on-ink: #0a0a0b;                /* text on top of a --ink fill */
  --ink-hover: #e4e4e7;             /* --ink fill hover */
  --muted: #9a9aa4;                 /* secondary text */
  --faint: #6b6b74;                 /* placeholders */
  --line: #262629;                  /* hairline borders / dividers */
  --outline: #3a3a42;               /* field borders */
  --outline-hover: #52525b;         /* field/border hover */
  --accent: #fafafa;
  --accent-ink: #fafafa;
  --r: 12px;                        /* cards, wells */
  --r-lg: 16px;                     /* large panels */
  --r-sm: 9px;                      /* buttons, inputs, badges */
  --ring: 0 0 0 3px rgba(250, 250, 250, .16);  /* focus ring */
  --lift: 0 2px 14px rgba(0, 0, 0, .5);        /* soft depth on hover */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: 'SpaceGrotesk', system-ui, sans-serif; }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; margin: 40px 0 12px; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.012em; margin: 44px 0 14px; }
h3 { font-size: 15px; font-weight: 600; margin: 24px 0 6px; }
p  { margin: 0 0 12px; }
a  { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* mono micro-labels — an editorial, non-generic accent */
.eyebrow, th, .tile .l {
  font-family: 'PlexMono', ui-monospace, monospace;
  text-transform: uppercase; letter-spacing: .1em;
}

.shell { max-width: 1180px; margin: 0 auto; padding: 40px 32px 120px; }
.shell.wide { max-width: 1400px; }
/* Frosted, translucent top app bar (macOS-style vibrancy) */
header.appbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 11, .7);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: 1400px; margin: 0 auto; height: 60px; padding: 0 32px;
  display: flex; align-items: center; gap: 18px;
}
@media (max-width: 640px) { .shell { padding: 28px 18px 80px; } .appbar-inner { padding: 0 18px; gap: 10px; } }
.wordmark {
  font-family: 'SpaceGrotesk', sans-serif; font-weight: 700; font-size: 17px;
  letter-spacing: .24em; text-decoration: none; line-height: 1;
  color: var(--ink);
}
.wordmark:hover { color: var(--muted); }
/* Editorial nav: plain text links, an active underline, a monogram, a divider */
nav.main { display: flex; gap: 22px; align-items: center; margin-left: auto; }
nav.main a {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px;
  white-space: nowrap; padding: 0;
}
nav.main a:hover { color: var(--ink); }
nav.main a.active { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; text-decoration-color: var(--ink); }
nav.main a.btn { text-decoration: none; }
.navsep { width: 1px; height: 22px; background: var(--line); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--on-ink);
  font-family: 'SpaceGrotesk', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0;
  text-decoration: none; transition: background .12s ease, box-shadow .12s ease;
}
.avatar:hover { background: var(--ink-hover); }
.avatar.active { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.linkbtn { background: none; border: none; margin: 0; padding: 0; height: auto; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.linkbtn:hover { color: var(--ink); background: none; box-shadow: none; }
.btn.sm { height: 34px; padding: 0 15px; font-size: 13px; margin-top: 0; }
@media (max-width: 640px) { nav.main { gap: 14px; } nav.main a.active { text-decoration: none; } }

.lede { color: var(--muted); font-size: 17px; line-height: 1.55; max-width: 60ch; margin-bottom: 32px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 32px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; text-decoration: none; color: inherit; display: block;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--outline); box-shadow: var(--lift); transform: translateY(-2px); }
.card .cover { aspect-ratio: 16 / 10; width: 100%; display: block; object-fit: cover; background: #0d0d0f; }
.card .body { padding: 16px 18px 18px; }
.card .name { font-family: 'SpaceGrotesk', sans-serif; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.card .sum { color: var(--muted); font-size: 14px; margin-top: 4px; min-height: 2.6em; }
.card .meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 10px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.pill.paid { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pill.request { border-color: var(--outline); color: var(--ink); }
.pill.ok   { background: var(--sc); border-color: transparent; color: var(--ink); }
.pill.bad  { border-color: var(--outline); color: var(--muted); }

.hero-cover { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--r-lg); margin-top: 28px; background: #0d0d0f; border: 1px solid var(--line); }

table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
th { font-size: 11px; color: var(--muted); background: transparent; font-weight: 500; }

form.stack { max-width: 460px; margin-top: 16px; }
label { display: block; font-size: 13px; font-weight: 500; margin: 18px 0 7px; color: var(--ink); }
/* shadcn-style outlined inputs with a soft focus ring */
input, select, textarea {
  width: 100%; border: 1px solid var(--outline); background: var(--card); color: var(--ink);
  padding: 10px 13px; font: inherit; font-size: 14px; border-radius: var(--r-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--outline-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
/* buttons: solid rectangle (not pill), light fill on dark */
button {
  margin-top: 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--on-ink);
  padding: 0 18px; height: 40px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border-radius: var(--r-sm); transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
button:hover { background: var(--ink-hover); border-color: var(--ink-hover); box-shadow: var(--lift); }
button.ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--outline);
  margin-top: 0; height: 34px; padding: 0 14px; font-size: 13px; font-weight: 500; box-shadow: none;
}
button.ghost:hover { border-color: var(--outline-hover); background: var(--sc); box-shadow: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--on-ink); text-decoration: none; border: 1px solid var(--ink);
  padding: 0 18px; height: 40px; font-size: 14px; font-weight: 600; border-radius: var(--r-sm); margin-top: 12px;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.btn:hover { background: var(--ink-hover); border-color: var(--ink-hover); box-shadow: var(--lift); }
/* secondary (tonal/outline) button */
.btn.tonal { background: var(--sc); color: var(--ink); border-color: var(--line); }
.btn.tonal:hover { background: var(--sc-high); border-color: var(--outline); }
/* primary action with a leading glyph — a button, not a floating FAB */
.fab { height: 44px; padding: 0 20px; margin: 0; gap: 8px; font-size: 14px; border-radius: var(--r-sm); }
.fab .plus { font-size: 18px; line-height: 1; font-weight: 400; }
.oauth { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.oauth a {
  display: inline-flex; align-items: center; text-decoration: none; border: 1px solid var(--outline);
  background: var(--card); border-radius: var(--r-sm); padding: 9px 16px; font-weight: 500; font-size: 14px;
}
.oauth a:hover { border-color: var(--outline-hover); background: var(--sc); }

.msg { background: var(--card); border: 1px solid var(--line); border-left: 2px solid var(--ink); border-radius: var(--r-sm); padding: 13px 16px; margin-top: 26px; font-size: 14px; }
.key, code { font-family: 'PlexMono', ui-monospace, monospace; font-size: 13px; }
pre { font-family: 'PlexMono', ui-monospace, monospace; font-size: 13px; background: var(--sc); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; overflow-x: auto; margin: 12px 0 18px; }
.dim { color: var(--muted); font-size: 13px; }
.inline-form { display: inline-flex; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Admin: quiet sidebar + wide content, all flat */
.admin-shell { display: flex; gap: 40px; align-items: flex-start; margin-top: 20px; }
.rail {
  position: sticky; top: 84px; flex: 0 0 200px;
  display: flex; flex-direction: column; gap: 2px;
}
.rail a {
  display: flex; align-items: center; height: 40px; padding: 0 14px;
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px;
  border-radius: var(--r-sm); transition: background .12s ease, color .12s ease;
}
.rail a:hover { background: var(--sc); color: var(--ink); }
.rail a.active { background: var(--sc); color: var(--ink); font-weight: 600; }
.admin-content { flex: 1 1 auto; min-width: 0; }
.admin-content > h1:first-child, .section-head:first-child { margin-top: 0; }
@media (max-width: 860px) {
  .admin-shell { flex-direction: column; gap: 20px; }
  .rail { position: static; flex: none; width: 100%; flex-direction: row; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 14px; margin: 24px 0 8px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 20px 18px; text-decoration: none; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tile:hover { border-color: var(--outline); box-shadow: var(--lift); transform: translateY(-2px); }
.tile .n { font-family: 'SpaceGrotesk', sans-serif; font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: 11px; margin-top: 10px; }
.back { display: inline-block; color: var(--muted); font-size: 14px; text-decoration: none; margin: 0 0 20px; }
.back:hover { color: var(--ink); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.section-head h1 { margin: 0; }

/* each plugin as its own flat, bordered row */
.plugin-list { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.plugin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 22px; transition: border-color .15s ease, box-shadow .15s ease;
}
.plugin-row:hover { border-color: var(--outline); box-shadow: var(--lift); }
.plugin-row .pr-title { font-family: 'SpaceGrotesk', sans-serif; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.plugin-row .pr-title a { text-decoration: none; }
.plugin-row .pr-meta { color: var(--muted); font-size: 13px; margin-top: 7px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plugin-row .pr-actions { flex: 0 0 auto; }

/* per-plugin shared task list */
.tasks { list-style: none; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.tasks li {
  display: flex; align-items: center; gap: 12px;
  background: var(--sc); border-radius: var(--r-sm); padding: 10px 14px;
}
.tasks li.done { opacity: .6; }
.tasks li.done .t-body { text-decoration: line-through; color: var(--muted); }
.tasks .t-body { flex: 1 1 auto; min-width: 0; }
.tasks .t-who { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tasks .icon-btn { margin: 0; height: 30px; min-width: 30px; padding: 0 9px; font-size: 14px; border-radius: var(--r-sm); }
.card-pane { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }

/* Structured section panel — a bordered card with a header and body,
   used to group forms/tables into clear blocks (account, admin forms). */
.panels { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
.panel-head + table, .panel-head + .panel-body { border-top: 1px solid var(--line); }
.panel-head h2 { font-family: 'SpaceGrotesk', sans-serif; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.panel-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.panel-body { padding: 18px 20px; }
.panel-body > *:first-child { margin-top: 0; }
.panel-body form.stack { max-width: none; margin-top: 0; }
.panel-body form.stack > label:first-of-type { margin-top: 0; }
/* tables sit flush inside a panel — the panel supplies the frame */
.panel table { border: none; border-radius: 0; margin: 0; }
.panel table + .panel-body { border-top: 1px solid var(--line); }
.panel table th { background: var(--sc); }
.panel table th, .panel table td { padding-left: 20px; padding-right: 20px; }
/* compact inline form: one field + a button on a row */
.row-form { display: flex; gap: 10px; align-items: stretch; }
.row-form input { flex: 1 1 auto; }
.row-form button { margin: 0; flex: 0 0 auto; }
@media (max-width: 520px) { .row-form { flex-direction: column; } }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-top: 12px; }
.faq-item h3 { margin-top: 0; }
footer {
  max-width: 1180px; margin: 40px auto 0; padding: 28px 32px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap;
}
footer a { color: var(--muted); }
