/* Enlist. Dark first, because that is how Discord people live, with a light
   mode that is designed rather than inverted. */

:root {
  --bg: #0a0b10;
  --bg-2: #101219;
  --surface: #14161f;
  --surface-2: #1a1d28;
  --line: #242836;
  --line-2: #333849;
  --text: #eef0f6;
  --text-2: #a3a9bd;
  --text-3: #6e7488;
  --accent: #5b8cff;
  --accent-2: #8a6bff;
  --accent-ink: #ffffff;
  --good: #35c191;
  --warn: #f0a63c;
  --bad: #f2605c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .8);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f8fc;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #f2f4fa;
    --line: #e3e6f0;
    --line-2: #ccd1e0;
    --text: #12141c;
    --text-2: #565d75;
    --text-3: #858ca4;
    --shadow: 0 18px 45px -24px rgba(20, 26, 60, .35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; margin: 0; font-weight: 640; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }

/* ------------------------------------------------------------------ chrome */

header.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
header.top.stuck { border-bottom-color: var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 1rem; height: 68px; }

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 650; letter-spacing: -.02em; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
  object-fit: cover; display: block;
  background: #0a0b10;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.spacer { flex: 1; }

.nav-links { display: flex; gap: 1.4rem; }
.nav-links a { color: var(--text-2); font-size: .92rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .68rem 1.15rem; border-radius: var(--radius-sm);
  font-size: .93rem; font-weight: 560; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--text-3); }
.btn:active { transform: translateY(0) scale(.985); }

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 90%, transparent);
}
.btn.primary:hover { box-shadow: 0 16px 38px -14px color-mix(in srgb, var(--accent) 95%, transparent); }
.btn.ghost { background: transparent; }
.btn.big { padding: .85rem 1.5rem; font-size: 1rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* --------------------------------------------------------------------- hero */

.hero { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: -30% -20% auto -20%; height: 720px; z-index: -1;
  background:
    radial-gradient(50% 45% at 22% 30%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(45% 40% at 78% 18%, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 70%);
  filter: blur(20px);
  animation: drift 22s var(--ease) infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 3%, 0) scale(1.08); }
}

.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1.05fr .95fr; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.1rem;
  padding: .35rem .7rem .35rem .45rem; border-radius: 100px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: .8rem; color: var(--text-2);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 70%, transparent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero p.lede { margin-top: 1.3rem; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-2); max-width: 34rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ------------------------------------------------------------ discord panel */

.discord {
  background: #313338; border-radius: var(--radius); padding: 1rem 1.15rem;
  box-shadow: var(--shadow); border: 1px solid #23252b; color: #dbdee1;
  font-size: .9rem;
}
.discord .who { display: flex; align-items: center; gap: .55rem; margin-bottom: .6rem; }
.discord .av {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}
.discord .name { color: #9fc0ff; font-size: .88rem; }
.discord .tag { background: #5865f2; color: #fff; font-size: .68rem; padding: .05rem .3rem; border-radius: 3px; }

.card-v2 { background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 5px; overflow: hidden; }
.card-v2 .banner {
  padding: 1rem 1.1rem; color: #fff;
  background: linear-gradient(120deg, #0c3d7c, #3b2c8e);
}
.card-v2 .banner .kicker { font-size: .68rem; letter-spacing: .1em; opacity: .75; }
.card-v2 .banner .title { font-size: 1.12rem; font-weight: 600; margin-top: .15rem; }
.card-v2 .body { padding: .9rem 1.1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.chip {
  font-size: .7rem; padding: .16rem .5rem; border-radius: 100px;
  background: #3f4147; color: #dbdee1;
}
.chip.on { background: #14503f; color: #8fe3c4; }

.statline { display: flex; gap: 1.1rem; padding: .65rem 0; border-block: 1px solid #3f4147; margin: .75rem 0; }
.statline div p { margin: 0; }
.statline .k { font-size: .68rem; color: #949ba4; }
.statline .v { font-size: .95rem; color: #f2f3f5; }

.dbtns { display: flex; flex-wrap: wrap; gap: .45rem; }
.dbtn { font-size: .82rem; padding: .42rem .85rem; border-radius: 4px; background: #4e5058; color: #fff; }
.dbtn.brand { background: #5865f2; }

/* ----------------------------------------------------------------- sections */

section.band { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
section.band + section.band { border-top: 1px solid var(--line); }
.section-head { max-width: 42rem; margin-bottom: 2.6rem; }
.section-head p { margin-top: .8rem; color: var(--text-2); }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card .n {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent); font-size: .82rem; font-weight: 650; margin-bottom: .9rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--text-2); font-size: .93rem; }

/* -------------------------------------------------------------- reveal */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

/* --------------------------------------------------------------- app pages */

.page { padding: 2.5rem 0 4rem; }
.page-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.page-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }

.servers { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.server {
  display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.server:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.server .icon {
  width: 44px; height: 44px; border-radius: 13px; flex: 0 0 auto; object-fit: cover;
  background: var(--surface-2); display: grid; place-items: center;
  font-weight: 650; color: var(--text-2); font-size: .95rem;
}
.server .nm { font-weight: 560; font-size: .95rem; line-height: 1.25; }
.server.absent { opacity: .55; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.1rem;
}
.panel > header { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; }
.panel > header h2 { font-size: 1.15rem; }
.panel > header p { color: var(--text-2); font-size: .88rem; }

.rolelist { display: grid; gap: .5rem; }
.role {
  display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2);
  cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.role:hover { border-color: var(--line-2); transform: translateX(2px); }
.role input { accent-color: var(--accent); width: 17px; height: 17px; cursor: pointer; }
.role .swatch { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.role .rn { font-size: .92rem; }
.role .why { margin-left: auto; font-size: .72rem; color: var(--text-3); }
.role:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-2)); }

select, textarea,
input[type="text"], input[type="number"], input[type="search"], input[type="url"] {
  width: 100%; padding: .58rem .8rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: .92rem; line-height: 1.4;
  appearance: none; -webkit-appearance: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
textarea { line-height: 1.55; resize: vertical; }

select {
  padding-right: 2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238a90a6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 11px;
}

::placeholder { color: var(--text-3); opacity: 1; }

select:hover, textarea:hover,
input[type="text"]:hover, input[type="number"]:hover, input[type="search"]:hover {
  border-color: var(--line-2);
}

select:focus, textarea:focus, input:focus {
  outline: none; border-color: var(--accent); background: var(--bg-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

input[type="search"]::-webkit-search-cancel-button { filter: invert(.5); cursor: pointer; }

/* Search boxes get a magnifier so they read as search, not as an empty field. */
.filter, .combo-search {
  padding-left: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%238a90a6' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.4'/%3E%3Cpath d='M10.4 10.4 14 14'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left .7rem center; background-size: 15px;
}
label.field { display: block; margin-bottom: 1rem; }
label.field span { display: block; font-size: .82rem; color: var(--text-2); margin-bottom: .35rem; }

.warn {
  display: flex; gap: .7rem; padding: .8rem .95rem; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  font-size: .88rem; margin-bottom: .6rem;
}
.warn b { color: var(--warn); font-weight: 600; }

/* The last panel needs room so the floating bar never covers it. */
#setup, #formeditor { padding-bottom: 1rem; }

.publishbar {
  position: sticky; bottom: 1rem; z-index: 15;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}

.pill {
  font-size: .74rem; padding: .2rem .6rem; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--text-2);
}
.pill.live { border-color: color-mix(in srgb, var(--good) 45%, transparent); color: var(--good); }
.pill.draft { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }

.empty { text-align: center; padding: 4rem 1rem; color: var(--text-2); }

footer.foot { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--text-3); font-size: .85rem; }
footer.foot .wrap { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.toast {
  position: fixed; left: 50%; bottom: 2rem; translate: -50% 0; z-index: 90;
  padding: .8rem 1.2rem; border-radius: 100px; font-size: .9rem;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================= app shell */

.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 880px) { .shell { grid-template-columns: 1fr; } }

.side {
  display: flex; flex-direction: column; gap: 1rem; padding: 1.2rem 1rem;
  border-right: 1px solid var(--line); background: var(--bg-2);
  position: sticky; top: 0; height: 100vh;
}
@media (max-width: 880px) {
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
}

.brand.small { font-size: .98rem; padding: .2rem .3rem; }

.serverpick {
  display: flex; align-items: center; gap: .7rem; padding: .7rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .2s, transform .2s var(--ease);
}
.serverpick:hover { border-color: var(--line-2); transform: translateY(-1px); }
.serverpick .sicon {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto; object-fit: cover;
  background: var(--surface-2); display: grid; place-items: center;
  font-size: .8rem; font-weight: 650; color: var(--text-2);
}
.serverpick .nm { font-size: .9rem; font-weight: 560; }
.serverpick .swap { margin-left: auto; font-size: .7rem; color: var(--text-3); }
.good { color: var(--good); }
.warnc { color: var(--warn); }

.sidenav { display: grid; gap: .15rem; }
.sidelink {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem;
  border-radius: var(--radius-sm); font-size: .92rem; color: var(--text-2);
  transition: background .18s, color .18s;
}
.sidelink:hover { background: var(--surface); color: var(--text); }
.sidelink.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.sidelink .ic { width: 18px; text-align: center; opacity: .8; }
.sidefoot { display: grid; gap: .1rem; border-top: 1px solid var(--line); padding-top: .8rem; }

/* Locked until the server is published, or until a team role allows it. */
.sidelink.locked { color: var(--text-3); cursor: not-allowed; }
.sidelink.locked:hover { background: transparent; color: var(--text-3); }
.sidelink .lock { margin-left: auto; font-size: .72rem; opacity: .7; }

.sidenote {
  margin: 0; padding: .6rem .7rem; font-size: .76rem; line-height: 1.45;
  color: var(--text-3); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.main { padding: 2rem clamp(1.2rem, 3vw, 2.6rem) 5rem; max-width: 1000px; }

.mainhead { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.mainhead h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.mainhead .muted { margin-top: .3rem; font-size: .92rem; }
.back { font-size: .82rem; color: var(--text-3); display: inline-block; margin-bottom: .4rem; }
.back:hover { color: var(--text); }

/* ----------------------------------------------------------------- stats */

.stats {
  display: grid; gap: .7rem; margin-bottom: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.stat .k { font-size: .74rem; color: var(--text-3); margin: 0; }
.stat .v { font-size: 1.5rem; font-weight: 600; margin: .15rem 0 0; letter-spacing: -.02em; }
.stat.good .v { color: var(--good); }
.stat.bad .v { color: var(--warn); }

/* ---------------------------------------------------------------- notice */

.notice {
  border: 1px solid color-mix(in srgb, var(--warn) 38%, transparent);
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.2rem;
}
.notice.bad {
  border-color: color-mix(in srgb, var(--bad) 40%, transparent);
  background: color-mix(in srgb, var(--bad) 9%, transparent);
}
.notice h3 { font-size: .95rem; margin-bottom: .45rem; }
.notice ul { margin: 0; padding-left: 1.1rem; color: var(--text-2); font-size: .9rem; display: grid; gap: .25rem; }

/* ---------------------------------------------------------------- panels */

.panel > header { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.panel > header .filter { margin-left: auto; max-width: 220px; }
.two { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.three { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
.flabel { display: block; font-size: .85rem; font-weight: 560; margin-bottom: .25rem; }
.fhint { display: block; font-size: .78rem; color: var(--text-3); margin-bottom: .45rem; }
.filter { margin-bottom: .7rem; }

/* ------------------------------------------------------------ role chips */

.rolegrid { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.rolegrid.short { max-height: 190px; overflow-y: auto; padding-right: .3rem; }
.rchip {
  display: flex; align-items: center; gap: .55rem; padding: .48rem .6rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2);
  cursor: pointer; font-size: .88rem; transition: border-color .18s, background .18s;
}
.rchip:hover { border-color: var(--line-2); }
.rchip input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; flex: 0 0 auto; }
.rchip .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.rchip .rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rchip .why { margin-left: auto; font-size: .68rem; color: var(--text-3); white-space: nowrap; }
.rchip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-2)); }
.rchip[hidden] { display: none; }

/* -------------------------------------------------------------- combobox */

.combo { position: relative; }
.combo-btn {
  width: 100%; display: flex; align-items: center; gap: .5rem; text-align: left;
  padding: .6rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: inherit; font-size: .92rem; cursor: pointer;
}
.combo-btn:hover { border-color: var(--text-3); }
.combo-btn .caret { margin-left: auto; color: var(--text-3); font-size: .7rem; }
.combo-pop {
  position: absolute; z-index: 100; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .5rem; max-height: 300px; display: flex; flex-direction: column;
}
/* display:flex above beats the browser's own [hidden] rule, so say it here or
   the list never actually closes. */
.combo-pop[hidden] { display: none; }

/* Near the bottom of the page the list opens upward instead of under the
   sticky publish bar. */
.combo-pop.up { top: auto; bottom: calc(100% + 4px); }
.combo[data-open] { z-index: 100; }
.combo-search { margin-bottom: .4rem; }
.combo-list { overflow-y: auto; display: grid; gap: 1px; }
.combo-opt {
  display: flex; align-items: center; gap: .35rem; width: 100%; text-align: left;
  padding: .45rem .55rem; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer;
}
.combo-opt:hover, .combo-opt.cursor { background: var(--surface-2); }
.combo-opt .hash { color: var(--text-3); }
.combo-opt .otag { margin-left: auto; font-size: .7rem; color: var(--text-3); }
.combo-opt[hidden] { display: none; }
.combo-none { font-size: .84rem; color: var(--text-3); padding: .5rem; margin: 0; }

/* ------------------------------------------------------------- segmented */

.segs {
  display: inline-flex; padding: 3px; gap: 3px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: block; padding: .4rem .95rem; border-radius: 6px; font-size: .88rem;
  color: var(--text-2); cursor: pointer; transition: background .2s, color .2s;
}
.seg:has(input:checked) span { background: var(--accent); color: #fff; }

/* ------------------------------------------------------------ form cards */

.fcards { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.fcard {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.fcard:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.fc-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.fc-top h3 { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .9rem; font-size: .76rem; color: var(--text-3); }
.fc-meta .dim { opacity: .6; }

/* --------------------------------------------------------- question rows */

.qlist { display: grid; gap: .6rem; }
.qrow {
  display: flex; align-items: flex-start; gap: .6rem; padding: .7rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  transition: border-color .2s, box-shadow .2s, opacity .2s;
}
.qrow.dragging { opacity: .4; }
.qrow.over { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.qrow .grip { cursor: grab; color: var(--text-3); letter-spacing: -3px; padding-top: .5rem; user-select: none; }
.qrow .qnum {
  width: 22px; height: 22px; border-radius: 7px; flex: 0 0 auto; margin-top: .35rem;
  display: grid; place-items: center; font-size: .72rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.qbody { flex: 1; display: grid; gap: .4rem; min-width: 0; }
.qline { display: flex; gap: .4rem; flex-wrap: wrap; }
.qline > input[type="text"] { flex: 1 1 190px; min-width: 0; }
.qline select { flex: 0 0 auto; width: auto; min-width: 120px; }
.qline.sub input { font-size: .85rem; }
.tiny-in { flex: 0 0 74px !important; }
.iconbtn {
  background: transparent; border: 1px solid var(--line); color: var(--text-3);
  border-radius: var(--radius-sm); width: 30px; height: 30px; cursor: pointer; margin-top: .3rem;
  transition: color .2s, border-color .2s;
}
.iconbtn:hover { color: var(--bad); border-color: var(--bad); }

/* ----------------------------------------------------------- guided setup */

.startwrap { max-width: 780px; }

.starthead { margin-bottom: 2.4rem; }
.starthead .kicker {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem;
}
.starthead h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.starthead .muted { margin-top: .6rem; max-width: 34rem; }

.progress { display: flex; align-items: center; gap: .8rem; margin-top: 1.4rem; }
.bar { flex: 1; height: 5px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.bar span {
  display: block; height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: fill 1.1s var(--ease) both;
}
@keyframes fill { from { width: 0 !important; } }

/* Each step arrives after the one above it. */
.steps-rail { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: .8rem; }
.steps-rail::before {
  content: ""; position: absolute; left: 19px; top: 34px; bottom: 34px; width: 2px;
  background: linear-gradient(var(--line), var(--line) 60%, transparent);
}

.stepcard {
  position: relative; display: flex; gap: 1.1rem; padding: 1.3rem 1.4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  animation: stepin .55s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
  transition: border-color .3s, background .3s, opacity .3s;
}
@keyframes stepin { from { opacity: 0; transform: translateY(14px); } }

.bead {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 13px; z-index: 1;
  display: grid; place-items: center; font-size: .95rem; font-weight: 650;
  background: var(--surface-2); color: var(--text-3);
  border: 1px solid var(--line); transition: all .35s var(--ease);
}

.stepcard h3 { font-size: 1.12rem; letter-spacing: -.015em; }
.stepcard .lede { color: var(--text-2); font-size: .92rem; margin-top: .3rem; }
.stepbody { flex: 1; min-width: 0; }
.stepinner { margin-top: 1.1rem; animation: openup .5s var(--ease) both .12s; }
@keyframes openup { from { opacity: 0; transform: translateY(-6px); } }

.stepcard.waiting { opacity: .5; }
.stepcard.waiting:hover { opacity: .75; }

.stepcard.done { padding: .95rem 1.4rem; }
.stepcard.done .bead {
  width: 34px; height: 34px; font-size: .82rem;
  background: color-mix(in srgb, var(--good) 18%, transparent);
  color: var(--good); border-color: transparent;
}
.stepcard.done h3 { font-size: .98rem; color: var(--text-2); font-weight: 560; }
.donesummary {
  font-size: .84rem; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24rem;
}

/* A finished step folds away but opens again on click. */
.reopen summary {
  display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap;
  cursor: pointer; list-style: none;
}
.reopen summary::-webkit-details-marker { display: none; }
.reopen summary:hover h3 { color: var(--text); }
.reopen .chev {
  margin-left: auto; color: var(--text-3); font-size: .7rem;
  transition: transform .25s var(--ease);
}
.reopen[open] .chev { transform: rotate(180deg); }
.reopen[open] .donesummary { display: none; }
.reopen[open] summary h3 { color: var(--text); }

.stepcard.current {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  box-shadow: 0 18px 44px -28px color-mix(in srgb, var(--accent) 90%, transparent);
}
.stepcard.current .bead {
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; border-color: transparent;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  animation: beat 2.6s infinite;
}
@keyframes beat {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Every step gets its own accent so no two look the same. */
.stepcard.current.tone-access { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 6%, var(--surface)); }
.stepcard.current.tone-access .bead { background: linear-gradient(140deg, #f0a63c, #e2704a); }
.stepcard.current.tone-publish { border-color: color-mix(in srgb, var(--good) 55%, transparent); background: color-mix(in srgb, var(--good) 6%, var(--surface)); }
.stepcard.current.tone-publish .bead { background: linear-gradient(140deg, #35c191, #1f9ec9); }
.stepcard.current.tone-panel .bead { background: linear-gradient(140deg, #8a6bff, #d264c8); }

/* Step one: what it found */
.found { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.foundicon {
  width: 46px; height: 46px; border-radius: 14px; object-fit: cover; flex: 0 0 auto;
  background: var(--surface-2); display: grid; place-items: center; font-weight: 650; color: var(--text-2);
}
.found .big { font-weight: 600; }
.readout { margin-left: auto; display: grid; gap: .2rem; text-align: right; font-size: .8rem; color: var(--text-3); }
.readout b { color: var(--text); font-size: .95rem; }

/* Step two: what to fix */
.fixlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.fixlist li {
  display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem;
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  border-radius: var(--radius-sm); padding: .7rem .85rem;
}
.fixlist .x {
  width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: var(--warn); color: #1a1200; font-weight: 700; font-size: .74rem;
}
.inlineform { margin-top: .9rem; }
.allgood { font-size: .95rem; display: flex; gap: .6rem; align-items: center; }
.allgood .tick { color: var(--good); font-size: 1.1rem; }

/* Step five: what publishing will do */
.summary { display: grid; gap: .5rem; }
.summary div { display: flex; gap: 1rem; font-size: .92rem; padding: .55rem .75rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.summary .k { color: var(--text-3); flex: 0 0 160px; }
.summary .v { color: var(--text); }

/* Step six: a taste of the form builder */
.formteaser { display: grid; gap: .45rem; margin-bottom: 1.1rem; }
.mockq {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; font-size: .9rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text-2);
}
.mockq .qn {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-size: .7rem; font-weight: 650;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}

/* Step seven: which form goes where */
.routes { display: grid; gap: .5rem; }
.route {
  display: flex; align-items: center; gap: .8rem; padding: .65rem .85rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .92rem; transition: border-color .2s, transform .2s var(--ease);
}
.route:hover { border-color: var(--accent); transform: translateX(2px); }
.route .rf { font-weight: 560; }
.route .arrow { color: var(--text-3); }
.route .rc.ok { color: var(--good); }
.route .rc.missing { color: var(--warn); }

/* Two ways to do the same thing, side by side */
.howto {
  display: grid; gap: .8rem; margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.way {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .9rem 1rem;
}
.wayn {
  display: inline-block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .55rem;
}
.way ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; }
.way li { font-size: .88rem; color: var(--text-2); }
.way li b { color: var(--text); font-weight: 560; }

/* Step eight: the command to run */
.cmd { margin: .8rem 0; }
.cmd code {
  display: inline-block; font-size: 1rem; padding: .5rem .9rem;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  color: var(--accent);
}

/* --------------------------------------------------------------- finale */

.finale { max-width: 620px; padding: 2.5rem 0 4rem; text-align: center; margin-inline: auto; }

.burst { position: relative; width: 132px; height: 132px; margin: 0 auto 2.2rem; }
.finalemark {
  position: absolute; inset: 50% auto auto 50%; translate: -50% -50%;
  width: 76px; height: 76px; border-radius: 24px; object-fit: cover; z-index: 2;
  box-shadow: 0 20px 50px -18px color-mix(in srgb, var(--accent) 90%, transparent);
  animation: land .8s var(--ease) both;
}
@keyframes land {
  0% { opacity: 0; transform: scale(.55) rotate(-14deg); }
  60% { transform: scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* Three rings leaving the mark, one after the other, forever. */
.ring {
  position: absolute; inset: 50% auto auto 50%; translate: -50% -50%;
  width: 76px; height: 76px; border-radius: 26px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
  animation: ripple 3s var(--ease) infinite;
  opacity: 0;
}
.ring.r2 { animation-delay: 1s; border-color: color-mix(in srgb, var(--accent-2) 55%, transparent); }
.ring.r3 { animation-delay: 2s; }
@keyframes ripple {
  0% { opacity: .85; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.85); }
}

.finale h1 {
  font-size: clamp(2rem, 4.4vw, 2.7rem); letter-spacing: -.03em;
  animation: rise .7s var(--ease) both .25s;
}
.finalelede {
  color: var(--text-2); margin-top: .9rem; font-size: 1.02rem;
  animation: rise .7s var(--ease) both .38s;
}
.finalelede b { color: var(--text); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.finalestats {
  display: flex; justify-content: center; gap: 2.4rem; margin: 2.2rem 0;
  animation: rise .7s var(--ease) both .5s;
}
.finalestats div { display: grid; gap: .15rem; }
.finalestats .v {
  font-size: 1.9rem; font-weight: 650; letter-spacing: -.03em;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.finalestats .k { font-size: .76rem; color: var(--text-3); }

.finalecta {
  display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap;
  animation: rise .7s var(--ease) both .62s;
}
.finalefoot { margin-top: 2rem; animation: rise .7s var(--ease) both .74s; }

@media (prefers-reduced-motion: reduce) {
  .finalemark, .finale h1, .finalelede, .finalestats, .finalecta, .finalefoot { animation: none !important; }
  .ring { display: none; }
}

/* A default that no form is actually using. */
.override {
  margin-top: .7rem; padding: .7rem .85rem;
  border: 1px solid color-mix(in srgb, var(--warn, #e0a458) 35%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn, #e0a458) 7%, transparent);
}
.override p { font-size: .85rem; margin: 0; }
.override ul { margin: .45rem 0 .5rem; padding-left: 1.1rem; display: grid; gap: .2rem; }
.override li { font-size: .85rem; color: var(--text-2); }
.override a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.override .chan { color: var(--accent-2); }

/* A re-opened step saves on its own. */
.restep {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line);
}

/* Step nine: try it yourself */
.tryit { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .45rem; }
.tryit li { font-size: .92rem; color: var(--text-2); }
.tryit li b { color: var(--text); font-weight: 560; }
.ifnot {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .9rem 1rem;
}
.ifnot p { font-size: .9rem; }

.donebar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem;
  padding: 1.1rem 1.3rem; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--good) 40%, transparent);
  background: color-mix(in srgb, var(--good) 7%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .stepcard, .stepinner, .bar span { animation: none !important; }
  .stepcard.current .bead { animation: none !important; }
}

/* ------------------------------------------------------- one application */

.answer { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.answer:last-child { border-bottom: 0; padding-bottom: 0; }
.answer .q { font-size: .88rem; font-weight: 560; color: var(--text-2); margin: 0 0 .3rem; }
.answer .a { font-size: .95rem; white-space: pre-wrap; word-break: break-word; margin: 0; }

.detail { width: 100%; border-collapse: collapse; font-size: .9rem; }
.detail td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.detail td:first-child { color: var(--text-3); width: 160px; }
.detail tr:last-child td { border-bottom: 0; }

code {
  font-family: var(--font-mono), ui-monospace, Consolas, monospace;
  font-size: .85em; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 5px; padding: .1rem .35rem;
}

/* ------------------------------------------------------------ team people */

.memberlist { display: grid; gap: .45rem; margin-bottom: 1.3rem; }
.member {
  display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2);
}
.member .rn { font-size: .92rem; }
.member .micon {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; object-fit: cover;
  background: var(--surface-2); display: grid; place-items: center;
  font-size: .68rem; font-weight: 650; color: var(--text-2);
}
.member .rolepick { margin-left: auto; }
.member .rolepick select { width: auto; min-width: 108px; font-size: .84rem; padding: .32rem 1.9rem .32rem .6rem; }
.member .pill { margin-left: auto; }
.member form + form { margin-left: .4rem; }

.perms { width: 100%; border-collapse: collapse; font-size: .84rem; }
.perms th, .perms td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.perms th { color: var(--text-3); font-weight: 500; font-size: .76rem; }
.perms th:not(:first-child), .perms td:not(:first-child) { text-align: center; width: 78px; }
.perms td:not(:first-child) { color: var(--good); }
.perms tbody tr:last-child td { border-bottom: 0; }

.btn.danger { border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.pb-title { font-weight: 560; }
