/* Character
   Type: Geist, 800 for headings up to 5.5rem against a 1rem body; Geist Mono for versions, CVEs and times.
   Color: night neutrals with a green cast, mint #14C38E only on the primary action and on patched versions.
   Space: tight inside a group (4 to 12px), wide between sections (8rem).
   Finish: inner pages use 1px hairlines. The home page uses a soft mint glow, as Discord bot sites do. */

@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0A0F0D;
  --surface: #0F1613;
  --raise: #141D19;
  --line: #1F2B27;
  --line-2: #2C3B35;
  --ink: #ECFBF5;
  --ink-2: #C3D3CD;
  --muted: #8A9C95;
  --accent: #14C38E;
  --accent-hover: #3DD9A6;
  --accent-ink: #04120D;
  --warn: #FFB020;
  --bad: #FF4D5E;
  --radius: 6px;
  --gap-tight: 8px;
  --gap: 24px;
  --gap-section: clamp(80px, 11vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Geist", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 12px; }
h3 { font-size: 1rem; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.875em; letter-spacing: 0; }
code { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 24px; }
main.wrap { flex: 1; padding-block: 40px var(--gap-section); }
.skip { position: absolute; left: 12px; top: -64px; z-index: 20; padding: 10px 16px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.skip:focus { top: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 64px; padding: 8px max(24px, calc((100% - 72rem) / 2 + 24px)); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.top__nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.top__nav > a:not(.btn) { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--radius); color: var(--muted); font-size: 0.9rem; text-decoration: none; transition: color 160ms var(--ease); }
.top__nav > a:not(.btn):hover, .top__nav > a[aria-current="page"] { color: var(--ink); }
.top__nav form { margin: 0 0 0 8px; }
@media (max-width: 48rem) { .top__nav > a.top__link { min-height: 36px; padding: 0 8px; font-size: 0.85rem; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent; color: var(--ink); font: 500 0.9rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: border-color 160ms var(--ease), background 160ms var(--ease); }
.btn:hover { border-color: var(--muted); }
.btn--main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn--main:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--quiet { border-color: var(--line); }
.btn--lg { min-height: 48px; padding: 0 22px; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Home, in the style of Discord bot sites: loud hero, glowing gems, Discord-like mocks.
   The soft glow is the one finish on this page; everything else stays flat. */
body { overflow-x: clip; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; min-height: min(640px, 78vh); padding-block: 24px 72px; }
.hero__copy { position: relative; z-index: 2; display: grid; gap: 28px; justify-items: start; }
.hero__brand { display: inline-flex; align-items: center; gap: 18px; font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; }
.hero__brand img { width: clamp(56px, 7vw, 88px); height: auto; filter: drop-shadow(0 0 24px rgba(20, 195, 142, 0.45)); }
.hero__lines { display: grid; gap: 4px; color: var(--ink-2); font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 500; line-height: 1.4; }
.btn { border-radius: 999px; }
.btn--soft { background: var(--raise); border-color: var(--raise); }
.btn--soft:hover { background: var(--line); border-color: var(--line); }
.btn--main { box-shadow: 0 0 0 0 rgba(20, 195, 142, 0); transition: box-shadow 200ms var(--ease), background 160ms var(--ease); }
.btn--main:hover { box-shadow: 0 0 28px rgba(20, 195, 142, 0.35); }

.stage { position: relative; z-index: 1; height: 440px; }
.stage::after { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: min(420px, 100%); aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(20, 195, 142, 0.38), rgba(20, 195, 142, 0.12) 35%, transparent 65%); pointer-events: none; }
.stage__mark { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; transform: translate3d(-50%, -50%, 0); will-change: transform; backface-visibility: hidden; animation: bob 6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.gem { position: absolute; width: 28px; height: 28px; border-radius: 7px; background: linear-gradient(160deg, #5BEBB9, #0A9C70); box-shadow: 0 0 24px rgba(20, 195, 142, 0.7); transform: rotate(45deg); animation: gem-float 7s ease-in-out infinite; }
.gem--1 { left: 8%; top: 14%; }
.gem--2 { right: 10%; top: 8%; width: 40px; height: 40px; animation-delay: -2s; }
.gem--3 { left: 18%; bottom: 12%; width: 18px; height: 18px; animation-delay: -4s; opacity: 0.7; }
.gem--4 { right: 4%; bottom: 26%; width: 22px; height: 22px; animation-delay: -1s; opacity: 0.8; }
.gem--5 { left: 46%; top: 2%; width: 14px; height: 14px; animation-delay: -3s; opacity: 0.6; }
@keyframes float { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0.01deg); } 50% { transform: translate3d(0, -14px, 0) rotate(0.01deg); } }
@keyframes gem-float { 0%, 100% { transform: translate3d(0, 0, 0) rotate(45deg); } 50% { transform: translate3d(0, -14px, 0) rotate(45deg); } }
@keyframes bob { 0%, 100% { transform: translate3d(-50%, -50%, 0) rotate(0.01deg); } 50% { transform: translate3d(-50%, calc(-50% - 10px), 0) rotate(0.01deg); } }
.gem, .toast { will-change: transform; backface-visibility: hidden; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1) !important; }
.toast { position: absolute; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 12px; background: #2B2D31; border: 1px solid rgba(255, 255, 255, 0.06); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); font-size: 0.85rem; animation: float 8s ease-in-out infinite; }
.toast span { display: grid; }
.toast small { color: #B5BAC1; }
.toast--a { left: 0; bottom: 18%; animation-delay: -1s; }
.toast--b { right: 0; top: 18%; animation-delay: -5s; }
@media (prefers-reduced-motion: reduce) { .gem, .toast, .stage__mark, .marquee__list { animation: none !important; } }

/* Product marquee, like a bot's server list */
.marquee { position: relative; margin-inline: calc(50% - 50vw); padding: 28px 0; border-block: 1px solid var(--line); background: var(--surface); }
.marquee__label { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.marquee__track { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__list { display: flex; gap: 12px; margin: 0; padding: 0 6px; list-style: none; flex: none; will-change: transform; animation: scroll 60s linear infinite; }
@keyframes scroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-100%, 0, 0); } }
.chipcard { display: flex; align-items: center; gap: 12px; min-width: 200px; padding: 10px 16px 10px 10px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.chipcard span:last-child { display: grid; }
.chipcard strong { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.chipcard small { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }

/* Feature sections */
.features__title { margin: 120px 0 24px; font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.hl { color: var(--accent); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; padding-block: 64px; }
.feature--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature--flip .feature__copy { order: 2; }
.feature--flip .dchan { margin-left: auto; }
.feature__copy { display: grid; gap: 20px; justify-items: start; }
.feature__copy h2 { margin: 0; color: var(--accent); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }
.feature__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 1.05rem; }
.feature__list li { display: flex; gap: 12px; align-items: baseline; }
.feature__list li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); transform: rotate(45deg) translateY(-1px); box-shadow: 0 0 10px rgba(20, 195, 142, 0.7); }

.collage { position: relative; padding: 28px; }
.spark { position: absolute; z-index: 2; width: 18px; height: 18px; background: var(--accent); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 8px var(--accent)); }
.spark--a { right: 6%; top: 0; }
.spark--b { left: 2%; bottom: 6%; width: 14px; height: 14px; }
.spark--c { right: 2%; bottom: 0; }

/* Discord-like surfaces */
.ok { color: var(--accent); }

.panel__empty { color: #949BA4; padding: 24px 0; }
.plans .features__title { margin-top: 64px; }
.plans__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan { padding: 28px; border-radius: 14px; background: var(--surface); display: grid; gap: 16px; align-content: start; }
.plan--pro { background: linear-gradient(160deg, #11302A, var(--surface) 60%); box-shadow: 0 0 0 1px rgba(20, 195, 142, 0.35); }
.plan h3 { font-size: 1.35rem; font-weight: 800; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--ink-2); }
.plan li::before { content: "✓"; margin-right: 10px; color: var(--accent); font-weight: 700; }
.closer { display: grid; justify-items: center; gap: 20px; margin-top: 120px; padding: 64px 24px; border-radius: 20px; text-align: center; background: radial-gradient(40rem 16rem at 50% 0, rgba(20, 195, 142, 0.18), transparent 70%), var(--surface); }
.closer h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; max-width: 20ch; }
.closer img { filter: drop-shadow(0 0 30px rgba(20, 195, 142, 0.5)); }

@media (max-width: 60rem) {
  .hero, .feature, .feature--flip { grid-template-columns: minmax(0, 1fr); }
  .feature--flip .feature__copy { order: 0; }
  .stage { height: 320px; }
  .feature { padding-block: 40px; gap: 24px; }
  }
@media (max-width: 40rem) {
  .hero { padding-bottom: 96px; min-height: 0; }
  .hero__brand { font-size: 2.6rem; gap: 12px; }
  .stage { height: 260px; }
  .stage__mark { width: 140px; height: 140px; }
  .toast { font-size: 0.75rem; max-width: 78%; }
  .collage { padding: 12px 0; }
          .plans__grid { grid-template-columns: minmax(0, 1fr); }
  .features__title { margin-top: 80px; }
}

/* Legal pages */
.prose { max-width: 68ch; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { margin-top: 40px; }
.prose p + p { margin-top: 12px; }
.prose p { color: var(--ink-2); }

/* Dashboard */
.head { display: grid; gap: 6px; margin-bottom: 32px; }
.back { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.back:hover { color: var(--ink); }
.note { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.note--good { border-color: rgba(20, 195, 142, 0.4); }
.note--warn { border-color: rgba(255, 176, 32, 0.4); }
.note--bad { border-color: rgba(255, 77, 94, 0.45); }
.servers { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--line); }
.server { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.server__name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; }
.card { padding: 32px 0; border-top: 1px solid var(--line); }
.row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.card .row + .row { margin-top: 16px; }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; flex: 1 1 16rem; max-width: 24rem; }
.field span { font-size: 0.85rem; color: var(--muted); }
select, input:not([type="hidden"]) { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; }
.chip:hover { border-color: var(--bad); }

/* Footer, ported from Tunnelcut: the wordmark floats on a sea */
.foot { position: relative; overflow: clip; background: var(--surface); }
.foot__crest { position: relative; overflow: hidden; height: clamp(140px, 17vw, 260px); margin-bottom: 40px; background: var(--bg); }
.foot__word { position: absolute; z-index: 1; left: 50%; bottom: 0; transform: translate(-50%, -26%); display: flex; align-items: flex-end; font-weight: 600; font-size: clamp(48px, 14vw, 220px); line-height: 0.82; letter-spacing: -0.05em; white-space: nowrap; user-select: none; }
.foot__word > span { display: inline-block; transform-origin: 50% 100%; }
.foot__letter { display: inline-block; animation: foot-drift var(--dur, 4.6s) ease-in-out var(--delay, 0s) infinite; }
.foot__sea { position: absolute; z-index: 2; inset: auto 0 0 0; height: 50%; }
.foot__wave, .foot__gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.foot__sea.is-live .foot__wave, .foot__sea:not(.is-live) .foot__gl { display: none; }
.foot__crest:has(.is-live) .foot__letter { animation: none; will-change: transform; }
@keyframes foot-drift { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(var(--amp)) rotate(var(--tilt)); } }
@media (prefers-reduced-motion: reduce) { .foot__letter { animation: none; } }
@media (max-width: 640px) { .foot__crest { height: 26vw; } .foot__word { transform: translate(-50%, -55%); } }
.foot__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 32px; }
.foot__brand { display: grid; gap: 10px; justify-items: start; }
.foot__brand p { max-width: 34ch; }
.foot__links { display: grid; align-content: start; }
.foot__links a, .foot__brand > a:not(.brand) { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.foot__links a:hover, .foot__brand > a:not(.brand):hover { color: var(--ink); }
.sponsor { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; }
.sponsor img { height: 28px; width: auto; opacity: 0.8; transition: opacity 0.15s; }
a.sponsor:hover img, a.sponsor:focus-visible img { opacity: 1; }
.foot__base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 20px; border-top: 1px solid var(--line); font-size: 0.875rem; }

/* Language menu */
.langdd { position: relative; }
.langdd summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink); font-size: 0.875rem; cursor: pointer; list-style: none; }
.langdd summary::-webkit-details-marker { display: none; }
.langdd summary:hover { border-color: var(--muted); }
.langdd img { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; }
.langdd__chev { width: 12px; height: 12px; color: var(--muted); transition: transform 160ms var(--ease); }
.langdd[open] .langdd__chev { transform: rotate(180deg); }
.langdd__menu { position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 20; min-width: 11rem; list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--raise); }
.langdd__menu a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 4px; color: var(--ink-2); font-size: 0.875rem; text-decoration: none; }
.langdd__menu a:hover, .langdd__menu a[aria-current="true"] { background: var(--surface); color: var(--ink); }

@media (max-width: 60rem) {
}
@media (max-width: 40rem) {
  .wrap { padding-inline: 16px; }
  .top { padding-inline: 16px; }
  .actions .btn, .row .btn, .row .field { flex-basis: 100%; max-width: none; }
  .server { flex-wrap: wrap; }
}

/* ---------- shared detail ---------- */
.pi { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 700; font-size: 0.9rem; }
.pi img { width: 18px; height: 18px; }
.pi--lg { width: 40px; height: 40px; border-radius: 10px; }
.pi--lg img { width: 20px; height: 20px; }
.led--up { background: var(--accent); box-shadow: 0 0 0 3px rgba(20, 195, 142, 0.18); }
.led--down { background: var(--bad); box-shadow: 0 0 0 3px rgba(255, 77, 94, 0.18); }
.badge { display: inline-flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: 0.85rem; text-decoration: none; transition: border-color 160ms var(--ease); }
.badge:hover { border-color: var(--muted); color: var(--ink); }
.more { color: var(--ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.more:hover { border-color: var(--accent); }
.marquee__label a { color: var(--ink); }

/* ---------- inner pages ---------- */
.ph { display: grid; gap: 14px; padding-block: 32px 48px; max-width: 46rem; }
.ph h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.045em; }
.ph .lead { font-size: 1.1rem; }
.block { padding-block: 48px; border-top: 1px solid var(--line); }
.block > h2, .block__head h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 16px; }
.block__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 48px; align-items: baseline; margin-bottom: 24px; }
.block__head h2 { margin: 0; }
.block > p.muted { max-width: 60ch; margin-bottom: 20px; }

.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.specs > div { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs > div:nth-child(3n) { border-right: 0; }
.specs > div:nth-last-child(-n + 3) { border-bottom: 0; }
.specs dt { font-weight: 600; margin-bottom: 6px; }
.specs dd { margin: 0; color: var(--muted); font-size: 0.92rem; }

.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.flow li { display: grid; gap: 12px; align-content: start; padding: 20px; border-radius: 12px; background: var(--surface); }
.flow__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); font: 600 0.8rem/1 var(--mono); color: var(--accent); }
.flow h3 { margin-bottom: 4px; }
.flow p { color: var(--muted); font-size: 0.92rem; }

.cmds { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cmds li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cmds code { justify-self: start; color: var(--ink); }
.cmds span { color: var(--ink-2); }
.tag { padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(20, 195, 142, 0.4); color: var(--accent); font-size: 0.75rem; font-weight: 600; }

.compare { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.compare__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.compare__row--head { border-top: 0; background: var(--surface); font-weight: 700; }
.compare__row > span:nth-child(3) { color: var(--ink); }
.compare__row > span:nth-child(2) { color: var(--ink-2); }
.compare__row--head > span:nth-child(3) { color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.tile span:last-child, .chipcard span:last-child { display: grid; min-width: 0; }
.tile strong { font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile small { color: var(--muted); font-size: 0.78rem; }

.summary { display: flex; align-items: center; gap: 12px; padding: 18px 20px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 1.05rem; }
.summary--up { border-color: rgba(20, 195, 142, 0.35); }
.services { margin: 0 0 24px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; }
.service { padding: 20px; }
.service + .service { border-top: 1px solid var(--line); }
.service__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.service__top .muted { font-size: 0.85rem; }
.service__pct { margin-left: auto; color: var(--ink-2); }
.bar--down { background: var(--bad); }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 10px; margin: 0; }
.meters > div { padding: 16px; border-radius: 12px; background: var(--surface); }
.meters dt { color: var(--muted); font-size: 0.8rem; margin-bottom: 6px; }
.meters dd { margin: 0; font-size: 1.4rem; font-weight: 600; }

.legal { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 56px; padding-top: 24px; }
.legal__nav { position: sticky; top: 88px; align-self: start; display: grid; gap: 2px; }
.legal__nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 0.92rem; text-decoration: none; }
.legal__nav a:hover { color: var(--ink); background: var(--surface); }
.legal__nav a[aria-current="page"] { color: var(--ink); background: var(--raise); }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.04em; margin: 8px 0 24px; }
.prose h2 { font-size: 1.1rem; font-weight: 700; margin-top: 36px; }
.who { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.who h2 { margin-top: 0; }
.who dl { display: grid; gap: 10px; margin: 0; }
.who dl > div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 12px; }
.who dt { color: var(--muted); }
.who dd { margin: 0; }
.table-wrap { overflow-x: auto; margin: 24px 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.ctable { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ctable th, .ctable td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.ctable thead th { border-top: 0; background: var(--surface); color: var(--muted); font-weight: 500; }

.foot__cols { display: grid; grid-template-columns: repeat(3, minmax(9rem, auto)); gap: 32px 56px; }
.foot__cols > div { display: grid; align-content: start; }
.foot__h { color: var(--ink); font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.foot__cols a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.foot__cols a:hover { color: var(--ink); }

@media (max-width: 60rem) {
  .specs { grid-template-columns: minmax(0, 1fr); }
  .specs > div { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .specs > div:last-child { border-bottom: 0 !important; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .block__head { grid-template-columns: minmax(0, 1fr); }
  .legal { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .legal__nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 40rem) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .cmds li { grid-template-columns: minmax(0, 1fr) auto; }
  .cmds li > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .compare__row { padding: 12px 14px; gap: 10px; font-size: 0.9rem; }
  .bars { gap: 2px; }
  .who dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

/* ---------- Discord, drawn after its dark theme and Components V2 ---------- */
.dm, .dchan, .dpick, .dwin, .mockdash { --d-bg: #313338; --d-box: #2B2D31; --d-deep: #1E1F22; --d-line: #3F4147; --d-text: #DBDEE1; --d-head: #F2F3F5; --d-mute: #949BA4; --d-btn: #4E5058; --d-sel: #404249; --d-blurple: #5865F2;
  position: relative; z-index: 1; border-radius: 12px; background: var(--d-bg); color: var(--d-text); font-family: "gg sans", "Noto Sans", var(--sans); font-size: 0.95rem; line-height: 1.375; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05); }
.dm { padding: 16px 16px 18px; }
.dm__author { display: grid; grid-template-columns: 40px auto auto 1fr; align-items: center; column-gap: 8px; }
.dm__avatar { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--d-deep); padding: 6px; align-self: start; }
.dm__name { color: var(--d-head); font-weight: 600; }
.dm__app { display: inline-flex; align-items: center; gap: 2px; height: 15px; padding: 0 4px 0 2px; border-radius: 3px; background: var(--d-blurple); color: #fff; font-size: 0.625rem; font-weight: 600; line-height: 15px; }
.dm__app svg { width: 12px; height: 12px; fill: #fff; }
.dm__time { color: var(--d-mute); font-size: 0.75rem; }
.dm__body { margin: 4px 0 0 48px; }
.cv2 { display: grid; gap: 8px; max-width: 520px; padding: 16px; border-radius: 8px; background: var(--d-box); border: 1px solid rgba(255, 255, 255, 0.04); }
.cv2 p { margin: 0; }
.cv2__section { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.cv2__text { display: grid; gap: 4px; }
.cv2__thumb { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 8px; background: var(--d-deep); }
.cv2__sep { margin: 4px 0; border: 0; border-top: 1px solid var(--d-line); }
.cv2__row { display: flex; flex-wrap: wrap; gap: 8px; }
.md-h3 { color: var(--d-head); font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.md-sub { color: var(--d-mute); font-size: 0.78rem; }
.cv2 strong { color: var(--d-head); font-weight: 600; }
.md-code { padding: 1px 4px; border-radius: 4px; background: var(--d-deep); font: 0.82rem/1.5 var(--mono); color: var(--d-text); }
.dbtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; background: var(--d-btn); color: #fff; font-size: 0.875rem; font-weight: 500; text-decoration: none; }
.dbtn:hover { background: #6D6F78; }
.dbtn svg { width: 14px; height: 14px; fill: currentColor; opacity: 0.85; }

.dchan { overflow: hidden; }
.dchan__head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--d-deep); color: var(--d-head); font-weight: 600; }
.dchan__hash { color: var(--d-mute); font-size: 1.3rem; font-weight: 400; margin-right: 2px; }
.dchan__topic { margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--d-line); color: var(--d-mute); font-size: 0.82rem; font-weight: 400; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dchan__msgs { display: grid; gap: 6px; padding: 16px; max-height: 420px; overflow: hidden; mask-image: linear-gradient(#000 80%, transparent); }
.dchan__msg { position: relative; padding-left: 48px; }
.dchan__when { position: absolute; left: 0; top: 4px; width: 44px; color: var(--d-mute); font-size: 0.62rem; opacity: 0; }
.dchan__msg:hover .dchan__when { opacity: 1; }
.cv2--sm { padding: 10px 12px; gap: 6px; }
.dchan__title { color: var(--d-head); font-weight: 600; font-size: 0.9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cv2--sm .dbtn { height: 26px; padding: 0 10px; font-size: 0.8rem; }

.dpick { padding: 0; background: transparent; box-shadow: none; display: grid; gap: 8px; max-width: 560px; }
.dpick__pop { display: grid; grid-template-columns: 48px minmax(0, 1fr); border-radius: 8px; background: var(--d-box); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05); overflow: hidden; }
.dpick__rail { padding: 8px; background: var(--d-deep); }
.dpick__railicon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.dpick__railicon.is-on { background: var(--d-sel); }
.dpick__list { padding: 8px; display: grid; gap: 2px; }
.dpick__head { margin: 0; padding: 4px 8px 6px; color: var(--d-mute); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.dpick__item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 4px; }
.dpick__item img { border-radius: 50%; }
.dpick__item.is-sel { background: var(--d-sel); }
.dpick__main { display: grid; min-width: 0; }
.dpick__cmd { color: var(--d-head); font-weight: 600; }
.dpick__args { margin-left: 8px; color: var(--d-mute); font-size: 0.85rem; }
.dpick__about { color: var(--d-mute); font-size: 0.8rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dpick__app { color: var(--d-mute); font-size: 0.75rem; }
.dinput { display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; border-radius: 8px; background: #383A40; color: var(--d-text); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04); }
.dinput__plus { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #B5BAC1; color: #383A40; font-weight: 700; line-height: 1; }
.dinput__text { color: var(--d-head); }
.dinput__hint { display: none; }
.caret { display: inline-block; width: 1px; height: 1.1em; margin-left: 1px; vertical-align: -3px; background: var(--d-head); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

.alert-demo, .cmds__demo { margin-bottom: 24px; max-width: 640px; }
@media (max-width: 40rem) {
  .dm__body { margin-left: 0; margin-top: 10px; }
  .cv2__thumb { width: 52px; height: 52px; }
  .dchan__msg { padding-left: 0; }
  .dchan__topic, .dpick__app { display: none; }
  .dpick__pop { grid-template-columns: minmax(0, 1fr); }
  .dpick__rail { display: none; }
}
.panel__empty { padding: 24px 16px; color: #949BA4; }

/* ---------- status detail ---------- */
.summary--warn { border-color: rgba(255, 176, 32, 0.4); }
.summary__time { margin-left: auto; font-size: 0.85rem; }
.span { margin-top: 14px; }
.span__head { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 0.8rem; }
.span__head .mono { color: var(--ink-2); }
.bars { position: relative; display: grid; grid-template-columns: repeat(48, minmax(0, 1fr)); gap: 3px; height: 30px; }
.bars--days { grid-template-columns: repeat(30, minmax(0, 1fr)); }
.bar { position: relative; border-radius: 2px; background: var(--accent); opacity: 0.8; transition: opacity 120ms; }
.bar:hover { opacity: 1; }
.bar--none { background: var(--line); }
.bar--down { background: var(--bad); }
.bar[data-tip]:hover::after { content: attr(data-tip); position: absolute; z-index: 5; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); font: 500 0.78rem/1.3 var(--sans); white-space: nowrap; pointer-events: none; }
.bars > .bar:nth-child(-n + 6):hover::after { left: 0; transform: none; }
.bars > .bar:nth-last-child(-n + 6):hover::after { left: auto; right: 0; transform: none; }
.service__top { margin-bottom: 4px; }
.incident { margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.incident--live { border-color: rgba(255, 176, 32, 0.4); }
.incident__head { display: grid; gap: 4px; margin-bottom: 14px; }
.incident__head h3 { font-size: 1.05rem; }
.incident__head p { font-size: 0.88rem; }
.timeline { margin: 0; padding: 0 0 0 16px; list-style: none; border-left: 1px solid var(--line-2); display: grid; gap: 14px; }
.timeline p { margin: 0; color: var(--ink-2); }
.timeline__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 2px !important; }
.timeline__meta strong { color: var(--ink); font-size: 0.9rem; }
.timeline__meta .mono { font-size: 0.8rem; }
.small-note { margin-top: 32px; font-size: 0.85rem; }
@media (max-width: 40rem) { .summary { flex-wrap: wrap; } .summary__time { margin-left: 0; width: 100%; } .bars { gap: 2px; } }

/* Home: glow, numbers, eyebrows, bento cards */
.hero::before { content: ""; position: absolute; z-index: 0; inset: -10% -20% auto auto; width: min(760px, 90vw); aspect-ratio: 1; background: radial-gradient(circle, rgba(20, 195, 142, 0.2), rgba(20, 195, 142, 0.12) 25%, rgba(20, 195, 142, 0.05) 45%, transparent 68%); pointer-events: none; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 72px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.stat { display: grid; gap: 6px; padding: 32px 28px; border-left: 1px solid var(--line); }
.stat:nth-child(3n+1) { border-left: 0; }
.stat:nth-child(n+4) { border-top: 1px solid var(--line); }
.stat strong { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat > span { color: var(--ink-2); font-size: 0.95rem; }
.eyebrow { justify-self: start; display: block; width: fit-content; margin: 120px 0 0; padding: 4px 12px; border: 1px solid rgba(20, 195, 142, 0.3); border-radius: 999px; color: var(--accent); font: 600 0.75rem/1.6 var(--mono, var(--sans)); letter-spacing: 0.08em; text-transform: uppercase; }
.eyebrow + .features__title { margin-top: 14px; }
.bento { position: relative; margin-top: 40px; }
.bento::before { content: ""; position: absolute; inset: 60px -10vw -40px; z-index: -1; background: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 24px 24px; -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); pointer-events: none; }
.bento__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { --mx: 50%; --my: 50%; position: relative; display: grid; align-content: start; gap: 10px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(20, 195, 142, 0.1), transparent 45%), var(--surface); transition: border-color 0.2s, transform 0.2s; }
.tile:hover { border-color: rgba(20, 195, 142, 0.35); transform: translateY(-2px); }
.tile--wide { grid-column: span 2; }
.tile h3 { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.tile p { margin: 0; color: var(--ink-2); }
.closer { position: relative; border: 1px solid rgba(20, 195, 142, 0.25); box-shadow: 0 0 80px -20px rgba(20, 195, 142, 0.35); }
@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-left: 1px solid var(--line); border-top: 0; }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bento__grid { grid-template-columns: minmax(0, 1fr); }
  .tile--wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }

/* Home: feature tour. Six working Discord windows behind tabs. */
.tour { margin-top: 0; }
.tour__lead { max-width: 60ch; margin: 0 0 28px; color: var(--ink-2); font-size: 1.1rem; }
.tour__tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin-bottom: 28px; width: fit-content; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tour__tab { padding: 9px 16px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 600 0.95rem/1 var(--sans); cursor: pointer; transition: background 0.15s, color 0.15s; }
.tour__tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.tour__tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tour__tab:focus-visible, .chip:focus-visible, .seg__opt:focus-visible, .cmdlist__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tour__pane { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(50rem 24rem at 100% 0, rgba(20, 195, 142, 0.1), transparent 60%), var(--surface); }
.tour__pane + .tour__pane { margin-top: 20px; }
.js .tour__pane:not(.is-on) { display: none; }
.js .tour__pane + .tour__pane { margin-top: 0; }
.js .tour__pane.is-on { animation: tour-in 0.35s ease-out; }
@keyframes tour-in { from { opacity: 0; transform: translateY(8px); } }
.tour__copy { display: grid; gap: 16px; align-content: start; }
.tour__copy h3 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.tour__copy p { margin: 0; color: var(--ink-2); }
.tour__count { color: var(--accent) !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--ink-2); font: 600 0.9rem/1 var(--sans); cursor: pointer; }
.chip img { filter: none; }
.chip:hover { color: var(--ink); border-color: rgba(20, 195, 142, 0.4); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); background: rgba(20, 195, 142, 0.12); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; width: fit-content; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.seg__opt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: 600 0.9rem/1 var(--sans); cursor: pointer; }
.seg__opt[aria-checked="true"], .seg__opt[aria-pressed="true"] { background: var(--line); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(20, 195, 142, 0.5); }

.dwin { display: grid; grid-template-columns: 56px 168px minmax(0, 1fr); min-height: 380px; border-radius: 14px; overflow: hidden; background: var(--d-bg); color: var(--d-text); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05); font-size: 0.92rem; }
.dwin__rail { display: grid; align-content: start; justify-items: center; gap: 8px; padding: 12px 0; background: var(--d-deep); }
.dwin__srv { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--d-bg); color: var(--d-head); font-size: 0.75rem; font-weight: 700; transition: border-radius 0.2s; }
.dwin__srv.is-on { border-radius: 14px; background: var(--accent); color: var(--accent-ink); }
.dwin__side { display: grid; align-content: start; gap: 2px; padding: 0 8px 12px; background: var(--d-box); }
.dwin__guild { margin: 0 -8px 8px; padding: 14px 16px; border-bottom: 1px solid var(--d-deep); color: var(--d-head); font-weight: 700; font-size: 0.9rem; }
.dwin__cat { margin: 6px 4px 4px; color: var(--d-mute); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; }
.dwin__ch { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 4px; color: var(--d-mute); font-size: 0.88rem; }
.dwin__ch.is-on { background: var(--d-sel); color: var(--d-head); }
.dwin__badge { display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #F23F43; color: #fff; font-size: 0.7rem; font-weight: 700; }
.dwin__chat { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.dwin__msgs { padding: 8px 0 16px; overflow: hidden; }
.dmention { display: inline-block; margin: 0 0 6px; padding: 0 3px; border-radius: 3px; background: rgba(88, 101, 242, 0.3); color: #C9CDFB; font-weight: 500; }
.dm:has(.dmention:not([hidden])) { background: rgba(240, 177, 50, 0.08); box-shadow: inset 2px 0 0 #F0B232; }

.sevfeed { display: grid; gap: 2px; margin: 6px 16px 0 64px; padding: 0; list-style: none; }
.sevfeed__row { display: grid; grid-template-columns: 8px 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 6px; background: var(--d-box); transition: opacity 0.25s, transform 0.25s; }
.sevfeed__row strong { color: var(--d-head); font-weight: 600; }
.sevfeed__row > span:nth-child(3) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sevfeed__row.is-out { opacity: 0.25; transform: scale(0.98); }
.sevfeed__row.is-out .sevfeed__lvl { text-decoration: line-through; }
.sevfeed__lvl { color: var(--d-mute); font-size: 0.78rem; }
.sevdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sevdot--1 { opacity: 0.3; } .sevdot--2 { opacity: 0.55; } .sevdot--3 { opacity: 0.8; } .sevdot--4 { box-shadow: 0 0 8px var(--accent); }

.cmdlist { display: grid; gap: 6px; }
.cmdlist__item { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: 500 0.92rem/1.3 var(--sans); text-align: left; cursor: pointer; }
.cmdlist__item:hover { border-color: rgba(20, 195, 142, 0.4); }
.cmdlist__item[aria-pressed="true"] { border-color: var(--accent); background: rgba(20, 195, 142, 0.1); }
.dcmd { padding: 4px 16px 0; }
.dcmd .dm__author, .dcmd .dm__body { margin-left: 0; }
.dcmd .dm__body { margin-left: 48px; }
.dcmd__used { margin: 0 0 6px 48px; color: var(--d-mute); font-size: 0.8rem; }
.dcmd__who { color: var(--d-head); font-weight: 600; }
.dcmd__eph { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--d-mute); font-size: 0.75rem; }
.dcmd__eph svg { width: 14px; height: 14px; fill: currentColor; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 44px; height: 24px; border-radius: 12px; background: var(--line-2); transition: background 0.2s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }

.mockdash { display: grid; gap: 4px; padding: 20px; border-radius: 16px; background: var(--d-box); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05); color: var(--d-text); }
.mockdash__head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--d-line); }
.mockdash__head strong { display: block; color: var(--d-head); }
.mockdash__head small { color: var(--d-mute); }
.mockdash__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--d-mute); }
.mockdash__val { padding: 4px 10px; border-radius: 6px; background: var(--d-deep); color: var(--d-head); }
.mockdash__label { margin: 10px 0 4px; color: var(--d-mute); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.mockdash__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.pcheck { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--d-line); border-radius: 10px; background: var(--d-deep); cursor: pointer; transition: border-color 0.15s; }
.pcheck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pcheck span:first-of-type { flex: 1; color: var(--d-head); font-weight: 500; }
.pcheck__box { width: 18px; height: 18px; border: 2px solid var(--d-mute); border-radius: 5px; }
.pcheck:has(input:checked) { border-color: var(--accent); }
.pcheck:has(input:checked) .pcheck__box { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.2 11.3 2.9 8l1.1-1.1 2.2 2.2 5.7-5.7L13 4.5z' fill='%2304120D'/%3E%3C/svg%3E") center / 14px no-repeat; }
.pcheck:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcheck:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.mockdash__note { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(20, 195, 142, 0.1); color: var(--d-head); font-size: 0.85rem; }

@media (max-width: 900px) {
  .tour__pane { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 24px; }
  .dwin { grid-template-columns: minmax(0, 1fr); }
  .dwin__rail, .dwin__side { display: none; }
  .sevfeed { margin-left: 16px; }
}
@media (prefers-reduced-motion: reduce) { .js .tour__pane.is-on { animation: none; } .sevfeed__row { transition: none; } }
[hidden] { display: none !important; }

/* Dashboard: one server's settings */
.gs { display: flex; align-items: center; gap: 18px; margin: 8px 0 28px; }
.gs h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.gs__icon { flex: none; width: 64px; height: 64px; border-radius: 18px; object-fit: cover; }
.gs__icon--none { display: grid; place-items: center; background: var(--line); color: var(--ink); font-size: 1.6rem; font-weight: 800; }
.gs__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
.pill { padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: 0.78rem; font-weight: 600; }
.pill--on { border-color: rgba(20, 195, 142, 0.5); color: var(--accent); }
.dcard { display: grid; gap: 18px; align-content: start; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.dcard + .dcard, .dcard + .dgrid { margin-top: 20px; }
.dcard h2 { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.dcard form { display: grid; gap: 16px; }
.dcard__head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 12px; }
.dcard__head p { margin: 4px 0 0; }
.dcount { margin: 0 !important; padding: 6px 14px; border-radius: 999px; background: rgba(20, 195, 142, 0.12); color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.pickbar { display: grid; gap: 12px; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 195, 142, 0.2); }
.ftags { display: flex; flex-wrap: wrap; gap: 6px; }
.ftag { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 0.82rem/1.2 var(--sans); cursor: pointer; }
.ftag:hover { color: var(--ink); }
.ftag[aria-pressed="true"] { border-color: var(--accent); background: rgba(20, 195, 142, 0.12); color: var(--ink); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 440px; margin: 0; padding: 2px; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.pcard { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.pcard:hover { border-color: var(--line-2); }
.pcard input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pcard__text { display: grid; flex: 1; min-width: 0; }
.pcard__text strong { font-size: 0.92rem; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pcard__text small { color: var(--muted); font-size: 0.75rem; }
.pcard__box { flex: none; width: 20px; height: 20px; border: 2px solid var(--line-2); border-radius: 6px; }
.pcard:has(input:checked) { border-color: rgba(20, 195, 142, 0.6); background: rgba(20, 195, 142, 0.07); }
.pcard:has(input:checked) .pcard__box, .ropt:has(input:checked)::after { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.2 11.3 2.9 8l1.1-1.1 2.2 2.2 5.7-5.7L13 4.5z' fill='%2304120D'/%3E%3C/svg%3E") center / 14px no-repeat; }
.pcard:has(input:focus-visible), .ropt:has(input:focus-visible), .segr:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }
.pempty { margin: 0; }
.savebar { position: sticky; bottom: 12px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(10, 15, 13, 0.92); backdrop-filter: blur(8px); color: var(--muted); }
.savebar.is-dirty { border-color: rgba(20, 195, 142, 0.5); color: var(--ink); }
.rlist { display: grid; gap: 4px; max-height: 280px; margin: 0; padding: 2px; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.rlist--short { max-height: 200px; }
.ropt { position: relative; display: flex; align-items: center; gap: 6px; padding: 10px 40px 10px 12px; border-radius: 10px; color: var(--ink-2); cursor: pointer; }
.ropt:hover { background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.ropt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ropt::after { content: ""; position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); border: 2px solid var(--line-2); border-radius: 50%; }
.ropt:has(input:checked) { background: rgba(20, 195, 142, 0.1); color: var(--ink); }
.ropt__hash, .ropt__at { color: var(--muted); font-weight: 600; }
.newch { padding-top: 16px; border-top: 1px solid var(--line); }
.fset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.fset legend { margin-bottom: 10px; padding: 0; color: var(--muted); font-size: 0.85rem; }
.segs { display: flex; flex-wrap: wrap; gap: 6px; }
.segr { position: relative; cursor: pointer; }
.segr input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segr span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink-2); font-size: 0.9rem; font-weight: 600; }
.segr:hover span { color: var(--ink); }
.segr:has(input:checked) span { border-color: var(--accent); background: rgba(20, 195, 142, 0.12); color: var(--ink); }
@media (max-width: 900px) { .dgrid { grid-template-columns: minmax(0, 1fr); } .dcard { padding: 20px; } }

/* ---------- interaction layer ----------
   Patterns taken from shadcn/ui, Radix, Sonner, cmdk, NumberFlow and Magic UI, written as plain CSS.
   Motion is ease-out under 300ms for anything the pointer starts, longer only for numbers and toasts. */
.btn:active, .ftag:active, .seg__opt:active, .tour__tab:active, .kbar:active, .copy:active, .combo__trigger:active { transform: scale(0.97); }
.btn, .ftag, .seg__opt, .tour__tab, .kbar, .copy, .combo__trigger { transition-property: transform, background, border-color, color, box-shadow; transition-duration: 160ms; transition-timing-function: var(--ease); }

/* Search trigger in the top bar (cmdk) */
.kbar { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; min-width: 15rem; padding: 0 8px 0 12px; margin-inline: auto 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font: 400 0.88rem/1 var(--sans); cursor: pointer; }
.kbar:hover { border-color: var(--line-2); color: var(--ink-2); }
.kbar svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.kbar__text { flex: 1; text-align: left; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; padding: 0 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--bg); color: var(--ink-2); font: 500 0.72rem/1 var(--mono); }
@media (max-width: 48rem) { .kbar { min-width: 0; width: 40px; height: 40px; padding: 0; justify-content: center; } .kbar__text, .kbar__key { display: none; } }

/* Command palette */
.palette { width: min(640px, calc(100vw - 24px)); max-height: min(520px, calc(100dvh - 120px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(20, 195, 142, 0.06); overflow: hidden; }
.palette[open] { display: flex; animation: pal-in 180ms var(--ease); }
.palette::backdrop { background: rgba(4, 8, 6, 0.6); backdrop-filter: blur(4px); animation: fade-in 180ms var(--ease); }
@keyframes pal-in { from { opacity: 0; transform: scale(0.96) translateY(-6px); } }
@keyframes fade-in { from { opacity: 0; } }
.palette__box { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.palette__search { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette__search svg { width: 18px; height: 18px; fill: var(--muted); flex: none; }
.palette__search input { flex: 1; min-width: 0; height: 56px; border: 0; background: transparent; color: var(--ink); font: 400 1.02rem/1 var(--sans); outline: none; }
.palette__search input::placeholder { color: var(--muted); }
.palette__list { flex: 1; min-height: 0; margin: 0; padding: 8px; overflow-y: auto; list-style: none; scroll-padding: 8px; overscroll-behavior: contain; }
.palette__group { padding: 10px 10px 6px; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.palette__opt a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; }
.palette__opt[aria-selected="true"] a { background: rgba(20, 195, 142, 0.1); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(20, 195, 142, 0.25); }
.palette__glyph { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.palette__glyph svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.palette__opt[aria-selected="true"] .palette__glyph { border-color: rgba(20, 195, 142, 0.5); color: var(--accent); }
.palette__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__t mark { background: none; color: var(--accent); font-weight: 600; }
.palette__s { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.8rem; }
.palette__empty { margin: 0; padding: 32px 16px; color: var(--muted); text-align: center; }
.palette__foot { display: flex; gap: 16px; margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; }
.palette__foot span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 40rem) { .palette { margin-top: 12px; max-height: calc(100dvh - 24px); } .palette__foot { display: none; } }
.tile:target { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 195, 142, 0.2); }

/* Toasts (Sonner): a stack that fans out on hover and can be swiped away */
.sn { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; width: min(356px, calc(100vw - 32px)); height: var(--front-h, 0px); margin: 0; padding: 0; list-style: none; transition: height 400ms var(--ease); }
.sn.is-open { height: var(--all-h, 0px); }
.sn__t { --i: 0; --dx: 0px; position: absolute; right: 0; bottom: 0; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 14px 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--raise); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); font-size: 0.9rem; touch-action: pan-y; transform-origin: 50% 100%; transform: translateX(var(--dx)) translateY(calc(var(--i) * -12px)) scale(calc(1 - var(--i) * 0.05)); transition: transform 400ms var(--ease), opacity 400ms var(--ease), height 400ms var(--ease); }
.sn__t:not(.is-front) { height: var(--front-h); overflow: hidden; }
.sn__t:not(.is-front) > * { opacity: 0; transition: opacity 200ms; }
.sn.is-open .sn__t { height: auto; transform: translateX(var(--dx)) translateY(calc(var(--y, 0px) * -1)); }
.sn.is-open .sn__t > * { opacity: 1; }
.sn__t:not(.is-in) { opacity: 0; transform: translateY(110%); }
.sn__t.is-out { opacity: 0; transform: translateX(var(--dx)) translateY(calc(var(--i) * -12px + 30%)) scale(0.96); }
.sn__t.is-gone { opacity: 0; pointer-events: none; }
.sn__t.is-drag { transition: none; }
.sn__icon { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; }
.sn__icon svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sn__t--ok .sn__icon { background: var(--accent); color: var(--accent-ink); }
.sn__t--wait .sn__icon { background: rgba(255, 176, 32, 0.16); color: var(--warn); }
.sn__t--bad .sn__icon { background: rgba(255, 77, 94, 0.16); color: var(--bad); }
.sn__body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.sn__body strong { font-weight: 600; }
.sn__body span { color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; }
.sn__body span:empty { display: none; }
.sn__x { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -2px -4px 0 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.sn__x:hover { background: var(--line); color: var(--ink); }
.sn__x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; }
@media (max-width: 40rem) { .sn { right: 12px; left: 12px; width: auto; } }

/* Rolling digits (NumberFlow) */
.nf { display: inline-flex; line-height: 1; vertical-align: baseline; }
.nf__d { display: inline-block; height: 1em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent); }
.nf__col { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -1em)); transition: transform 1100ms cubic-bezier(0.22, 1, 0.36, 1); }
.nf__col > span, .nf__s { display: block; height: 1em; line-height: 1; }
.nf__s { display: inline-block; opacity: 0; transition: opacity 600ms var(--ease); }
.nf.is-run .nf__s { opacity: 1; }
.nf__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stat strong.nf-host { background: none; color: var(--ink); }
.stat .nf__col > span, .stat .nf__s { background: linear-gradient(180deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Segmented controls and tab lists with a gliding thumb (Radix Tabs, shadcn ToggleGroup) */
.has-glide { position: relative; isolation: isolate; }
.glide { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 9px; pointer-events: none; opacity: 0; }
.has-glide.is-ready .glide { opacity: 1; transition: transform 260ms var(--ease), width 260ms var(--ease), height 260ms var(--ease), opacity 160ms; }
.tour__tabs .glide { border-radius: 10px; background: var(--accent); box-shadow: 0 4px 20px rgba(20, 195, 142, 0.3); }
.tour__tabs.is-ready .tour__tab[aria-selected="true"] { background: transparent; }
.seg .glide, .segs .glide { background: var(--line); box-shadow: inset 0 0 0 1px rgba(20, 195, 142, 0.5); }
.seg.is-ready .seg__opt[aria-checked="true"], .seg.is-ready .seg__opt[aria-pressed="true"] { background: transparent; box-shadow: none; }
.segs.has-glide { gap: 2px; padding: 4px; width: fit-content; max-width: 100%; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.segs.has-glide .segr span { border-color: transparent; border-radius: 9px; }
.segs.is-ready .segr:has(input:checked) span { background: transparent; }
.segr input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Combobox (shadcn Popover with a command list inside) */
.combo { position: relative; display: grid; gap: 10px; }
.combo__trigger { display: none; }
.combo.is-js .combo__trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); font: 500 0.95rem/1.2 var(--sans); text-align: left; cursor: pointer; }
.combo.is-js .combo__trigger:hover { border-color: var(--muted); }
.combo.is-open .combo__trigger { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 195, 142, 0.2); }
.combo__trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo__trigger svg { flex: none; width: 14px; height: 14px; color: var(--muted); transition: transform 200ms var(--ease); }
.combo.is-open .combo__trigger svg { transform: rotate(180deg); }
.combo__pop { display: grid; gap: 8px; }
.combo.is-js .combo__pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 8; padding: 8px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--raise); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); transform-origin: 50% 0; opacity: 0; transform: scale(0.97) translateY(-4px); visibility: hidden; transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s 160ms; }
.combo.is-open .combo__pop { opacity: 1; transform: none; visibility: visible; transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
.combo.is-js .search input { height: 40px; background: var(--surface); }
.combo.is-js .rlist { max-height: 240px; }
.ropt:has(input:checked)::after { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 4px, transparent 5px); }
.ropt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Copyable commands */
.copy { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.copy svg { width: 15px; height: 15px; opacity: 0; transition: opacity 160ms; }
.copy:hover svg, .copy:focus-visible svg { opacity: 1; }
.copy:hover code { border-color: rgba(20, 195, 142, 0.5); }
@media (hover: none) { .copy svg { opacity: 0.7; } }

/* Busy submit buttons */
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--accent-ink) var(--accent-ink) transparent transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.btn:not(.btn--main).is-busy::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Border beam on the save bar once something changed (Magic UI) */
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.savebar.is-dirty::before { content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; background: conic-gradient(from var(--beam), transparent 0 70%, rgba(20, 195, 142, 0.2) 80%, var(--accent) 92%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: beam 3.2s linear infinite; pointer-events: none; }
@keyframes beam { to { --beam: 360deg; } }

/* A calm ripple on the live status light */
.summary--up .led--up { position: relative; }
.summary--up .led--up::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); animation: ripple 2.4s var(--ease) infinite; }
@keyframes ripple { from { opacity: 0.6; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }

@media (prefers-reduced-motion: reduce) {
  .palette[open], .palette::backdrop, .savebar.is-dirty::before, .summary--up .led--up::after, .btn.is-busy::after { animation: none; }
  .sn, .sn__t, .nf__col, .nf__s, .glide, .combo__pop, .combo__trigger svg { transition: none !important; }
  .btn:active, .ftag:active, .seg__opt:active, .tour__tab:active, .kbar:active, .copy:active, .combo__trigger:active { transform: none; }
}
