/* skooby plugins: dark, quiet, minimal. Colours below are the defaults; /theme.css (from the admin theme) overrides them. */
:root {
  --bg: #0b0d10;
  --bg-2: #101317;
  --card: #14181d;
  --card-2: #191e24;
  --line: #232a32;
  --line-2: #2d3640;
  --text: #e6e9ed;
  --muted: #8b95a1;
  --dim: #5d6773;
  --accent: #7c8cff;
  --accent-2: #a3adff;
  --discord: #5865f2;
  --discord-hi: #6b77f5;
  --accent-deep: #4b56d6;
  --bg-rgb: 11,13,16;
  --accent-rgb: 124,140,255;
  --discord-rgb: 88,101,242;
  --hover: #fff;            /* strongest text: #fff on dark themes, #000 on light ones (theme.css) */
  --warn-rgb: 217,165,91;
  --warn-text: #e8c48d;
  --error-rgb: 217,115,107;
  --error-text: #f0c2bd;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 50px -20px rgba(0,0,0,.6);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(var(--accent-rgb),.09), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(var(--discord-rgb),.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--hover); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-top: 40px; padding-bottom: 64px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(var(--bg-rgb),.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; letter-spacing: -.02em; font-size: 16px; white-space: nowrap; }
.brand:hover { color: var(--hover); }
.brand-dim { color: var(--dim); font-weight: 500; margin-left: 3px; }
.brand-logo { display: block; height: 22px; width: auto; max-width: 160px; border-radius: 5px; object-fit: contain; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 6px 16px -6px rgba(var(--accent-rgb),.6);
}
.links { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.links::-webkit-scrollbar { display: none; }
.links a {
  color: var(--muted); padding: 7px 12px; border-radius: 8px; font-size: 14px; white-space: nowrap;
  transition: color .15s, background .15s;
}
.links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.links a.on { color: var(--text); background: rgba(255,255,255,.06); }

.profile { position: relative; margin-left: auto; }
.avatar-btn {
  display: flex; align-items: center; gap: 9px;
  background: transparent; border: 1px solid transparent; color: var(--text);
  padding: 3px; border-radius: 999px; cursor: pointer; font: inherit;
  transition: border-color .15s, background .15s;
}
.avatar-btn:hover { background: rgba(255,255,255,.04); border-color: var(--line); }
.avatar-name { font-size: 14px; padding-right: 8px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: block; background: var(--card-2); object-fit: cover; }
.avatar-blank { display: grid; place-items: center; border: 1px solid var(--line-2); }
.avatar-blank svg { fill: none; stroke: var(--dim); stroke-width: 1.8; stroke-linecap: round; }
.avatar-lg { width: 72px; height: 72px; }

.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px;
  box-shadow: var(--shadow);
}
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.menu-head span { color: var(--muted); font-size: 13px; }
.menu a, .menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px;
  color: var(--text); background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer;
}
.menu a:hover, .menu button:hover { background: rgba(255,255,255,.05); color: var(--hover); }
.menu form { margin: 0; }

/* ---- cards and buttons ---- */
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { background: var(--discord-hi); color: #fff; }
.btn-discord.is-off { opacity: .55; cursor: default; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--hover); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--dim); color: var(--hover); }
.btn-wide { width: 100%; }

.notice {
  margin-bottom: 20px; padding: 11px 14px; border-radius: 10px;
  background: rgba(var(--error-rgb),.08); border: 1px solid rgba(var(--error-rgb),.3); color: var(--error-text); font-size: 14px;
}

/* ---- home ---- */
.hero { padding: 48px 44px; max-width: 760px; }
.eyebrow { color: var(--accent-2); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.15; margin-bottom: 14px; }
.lead { color: var(--muted); font-size: 16px; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; max-width: 760px; }
.fact { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.015); display: flex; flex-direction: column; }
.fact-n { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.fact .muted { font-size: 13px; }

/* ---- pages ---- */
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 28px; margin-bottom: 6px; }
.page-head p { max-width: 64ch; }
.section-title { font-size: 15px; font-weight: 600; margin: 34px 0 12px; }
.section-title .muted { font-weight: 400; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
  border-radius: 999px; padding: 5px 13px; font: inherit; font-size: 13px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip.on { color: var(--text); background: rgba(255,255,255,.06); border-color: var(--dim); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.item {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); transition: border-color .15s, transform .15s;
}
.item:hover { border-color: var(--line-2); transform: translateY(-1px); }
.item[hidden], .group[hidden] { display: none; }
.item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.item h3 { font-size: 15px; }
.item p { color: var(--muted); font-size: 14px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; letter-spacing: .02em; }
/* .tag-<name> colours come from /theme.css (site tags) */

.profile-card { display: flex; align-items: center; gap: 18px; padding: 24px; margin-bottom: 12px; }
.profile-card h2 { font-size: 20px; }
.empty { padding: 28px; }
.empty h1, .empty h2 { font-size: 17px; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }
.locked { text-align: center; padding: 56px 28px; }

/* ---- blocks (v1.1) ---- */
.rich p + p, .rich p + ul, .rich ul + p, .rich ul + ul { margin-top: .7em; }
.rich ul { margin: 0; padding-left: 1.2em; }
.rich li + li { margin-top: .2em; }
.rich strong { font-weight: 650; color: var(--text); }
.rich code {
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px;
}
.prose { max-width: 64ch; margin: 18px 0; }
.sub-head { margin: 34px 0 12px; }
.sub-head .section-title { margin: 0 0 4px; }
.sub-head .rich { max-width: 64ch; }
.group-sub { margin: 34px 0 12px; }

.hero-center { max-width: 440px; margin: 9vh auto 0; padding: 36px 32px; text-align: center; }
.hero-center h1 { font-size: 24px; margin-bottom: 10px; }
.hero-center .lead { font-size: 15px; }
.hero-center .hero-actions { justify-content: center; margin-top: 22px; }
.hero-with-img { max-width: none; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.hero-pic { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }

.facts.n1 { grid-template-columns: minmax(0, 1fr); }
.facts.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
.facts.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: none; }
.facts.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.item-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius-sm) - 3px); margin-bottom: 12px; background: var(--card-2); }
.item-link { position: relative; }
.item-link h3 a { color: var(--text); }
.item-link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.item-link:hover h3 a { color: var(--hover); }
.item-link .rich a { position: relative; z-index: 1; }

.figure { margin: 20px 0; }
.figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.fig-narrow { max-width: 520px; }
.fig-wide { max-width: 760px; }
.fig-full { max-width: none; }
.figure figcaption { font-size: 13px; margin-top: 8px; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn-row.center { justify-content: center; }
.btn-block { margin: 18px 0; }
.empty .btn-row { margin-top: 18px; }
.empty .btn-row .btn { margin-top: 0; }
.locked .btn-row { justify-content: center; }

.card + .card { margin-top: 12px; }
.profile-card + .card { margin-top: 0; }
.card.warn { border-color: rgba(var(--warn-rgb),.4); }
.card.warn h2 { color: var(--warn-text); }

.spacer-s { height: 12px; }
.spacer-m { height: 28px; }
.spacer-l { height: 56px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---- draft preview bar (admins) ---- */
.preview-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 30px;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px;
  background: linear-gradient(rgba(var(--accent-rgb),.18), rgba(var(--accent-rgb),.18)), var(--bg);
  border-bottom: 1px solid var(--line-2); color: var(--text); font-size: 13px; white-space: nowrap;
}
.pv-sep { color: var(--dim); }
.pv-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-2); cursor: pointer; }
.pv-btn:hover { color: var(--hover); }
.pv-btn[disabled] { opacity: .6; cursor: default; }
body.has-preview { padding-top: 30px; }
.has-preview .nav { top: 30px; }

/* ---- modal ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(4,5,7,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .15s ease-out; }
.modal-card {
  position: relative; width: 100%; max-width: 380px; text-align: center;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; padding: 34px 28px 28px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); animation: pop .18s ease-out;
}
.modal-card h2 { font-size: 20px; margin: 14px 0 6px; }
.modal-card p { font-size: 14px; margin-bottom: 22px; }
.modal-x {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 8px;
  background: none; border: 0; color: var(--dim); font-size: 22px; line-height: 1; cursor: pointer;
}
.modal-x:hover { color: var(--text); background: rgba(255,255,255,.05); }
.discord-badge {
  width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center;
  background: rgba(var(--discord-rgb),.12); color: var(--discord-hi); border: 1px solid rgba(var(--discord-rgb),.3);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

.foot { border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; padding: 22px 0; }

/* ---- small screens ---- */
@media (max-width: 720px) {
  .nav-inner { height: auto; flex-wrap: wrap; gap: 0 12px; padding: 10px 16px 0; }
  .brand { height: 40px; }
  .links { order: 3; flex-basis: 100%; margin: 0 -8px; padding: 4px 0 8px; }
  .avatar-name { display: none; }
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 24px; }
  .hero { padding: 30px 22px; }
  .facts, .facts.n2, .facts.n4, .facts.n5, .facts.n6 { grid-template-columns: 1fr; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .hero-with-img { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .profile-card { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
