/* Veto SMP panel, modelled on the AtomBox panel: rounded panels, pill controls, line icons, a deep-blue hero.
   Radius steps carry hierarchy: hero 24, cards 18, icon squares / inputs 12, controls are pills. */
:root {
  --bg: #071022;
  --side: #0A1528;
  --card: #0E1A31;
  --card2: #13223F;
  --line: #1B2C4D;
  --line2: #263B63;
  --text: #F4EEDC;
  --muted: #9AA6BC;
  --faint: #6B7893;
  --green: #4ADE80;
  --red: #F05D5D;
  --r-hero: 24px;
  --r-card: 18px;
  --r-ctl: 12px;
  color-scheme: dark;
}
/* Themes (palette button / Settings). Royal, Ember and Verdant match the in-game HUD themes. */
:root, [data-theme="royal"] { --gold: #E8B63C; --crimson: #C8323C; --glow: 232, 182, 60; --glow2: 200, 50, 60; --hero1: #12306B; --hero2: #0B1A3A; }
[data-theme="ember"] { --gold: #FF9A3D; --crimson: #E5383B; --glow: 255, 154, 61; --glow2: 229, 56, 59; --hero1: #4A1A22; --hero2: #1A0F1E; }
[data-theme="verdant"] { --gold: #5BE3A0; --crimson: #1FA37A; --glow: 91, 227, 160; --glow2: 31, 163, 122; --hero1: #0F3B3A; --hero2: #0A1A26; }
[data-theme="frost"] { --gold: #7CD4FF; --crimson: #8A63FF; --glow: 124, 212, 255; --glow2: 138, 99, 255; --hero1: #20306F; --hero2: #120F33; }
:root { --accent-grad: linear-gradient(135deg, var(--gold), color-mix(in srgb, var(--gold) 55%, var(--crimson))); --soft: rgba(var(--glow), .14); }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
[hidden] { display: none !important; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-weight: 700; letter-spacing: -0.015em; }
.muted { color: var(--muted); }
.error { color: var(--red); min-height: 1.2em; }
.mono, code, pre { font-family: "Cascadia Code", ui-monospace, Consolas, monospace; font-size: .9em; }
code { color: #DCD3B8; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- background glow (moves slowly; off in Appearance or with reduced motion) */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora span { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; }
.aurora span:nth-child(1) { background: radial-gradient(circle, rgba(var(--glow2), .2), transparent 62%); top: -34vmax; left: -24vmax; animation: drift1 26s ease-in-out infinite alternate; }
.aurora span:nth-child(2) { background: radial-gradient(circle, rgba(var(--glow), .13), transparent 62%); bottom: -40vmax; right: -30vmax; animation: drift2 32s ease-in-out infinite alternate; }
.aurora span:nth-child(3) { background: radial-gradient(circle, rgba(40, 80, 170, .2), transparent 62%); top: 15%; left: 35%; width: 50vmax; height: 50vmax; animation: drift3 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -12vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-20vmax, 10vmax) scale(1.25); } }
html[data-bg="off"] .aurora { display: none; }

/* ---------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; position: relative; z-index: 1; }
.login-card { width: min(380px, 100%); background: rgba(14, 26, 49, .9); border: 1px solid var(--line); border-radius: var(--r-hero); padding: 34px 30px; display: grid; gap: 14px; text-align: center; box-shadow: 0 30px 80px -30px rgba(var(--glow2), .45); }
.login-card img { justify-self: center; border-radius: 16px; animation: float 5s ease-in-out infinite; }
.login-card h1 { font-size: 30px; }
.login-card label { text-align: left; display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.login-card .btn { justify-content: center; padding: 11px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; position: relative; z-index: 1; }
.sidebar { background: rgba(10, 21, 40, .92); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--text); padding: 2px 8px 20px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 11px; animation: float 5s ease-in-out infinite; }
.brand b { font-size: 17px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--muted); font-size: 12.5px; }
.nav-group { margin: 18px 0 6px; padding: 0 12px; font-size: 11.5px; letter-spacing: .1em; color: var(--faint); font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-ctl); color: #C4CBD8; font-weight: 500; transition: background .2s, color .2s; }
.nav-link:hover { background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; }
.nav-link .i { color: var(--faint); transition: color .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.nav-link:hover .i { color: var(--gold); transform: scale(1.12); }
.nav-link.active { background: var(--soft); color: var(--text); font-weight: 650; box-shadow: inset 3px 0 0 var(--gold); }
.nav-link.active .i { color: var(--gold); }
.badge { margin-left: auto; background: var(--crimson); color: #fff; border-radius: 999px; min-width: 20px; padding: 0 6px; text-align: center; font-size: 11.5px; font-weight: 700; line-height: 20px; }
.main { min-width: 0; }

/* ---------- top bar: title on the left, pill controls on the right (as in AtomBox) */
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(7, 16, 34, .88); backdrop-filter: blur(8px); z-index: 10; }
.topbar h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.topbar h2 .i { color: var(--muted); width: 20px; height: 20px; }
.spacer { flex: 1; }
.chip.menu { display: none; } /* two classes so it beats .chip's display */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(19, 34, 63, .7); color: var(--text); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s; }
.chip:hover { border-color: rgba(var(--glow), .5); text-decoration: none; }
.chip .i { width: 16px; height: 16px; color: var(--muted); }
.chip.round { width: 38px; padding: 0; justify-content: center; }
.chip kbd { font: 600 11px "Cascadia Code", Consolas, monospace; color: var(--muted); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; }
.chip.search { color: var(--muted); font-weight: 500; min-width: 170px; }
main { padding: 26px 28px 56px; max-width: 1280px; outline: none; }

/* ---------- pills, buttons, inputs */
.pill { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; border-radius: 999px; padding: 4px 12px; font-weight: 650; font-size: 13px; border: 1px solid var(--line2); background: rgba(19, 34, 63, .7); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.on::before { background: var(--green); animation: ping 2s ease-out infinite; }
.pill.off { color: #FFB4B4; }
.pill.off::before { background: var(--red); }
.topbar .pill { height: 38px; padding: 0 14px; font-size: 14px; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 100% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); background: rgba(19, 34, 63, .75); color: var(--text); border-radius: 999px; padding: 9px 18px; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; transition: background .2s, border-color .2s, transform .12s, box-shadow .2s; }
.btn .i { width: 16px; height: 16px; }
.btn:hover:not(:disabled) { border-color: rgba(var(--glow), .55); background: rgba(var(--glow), .08); text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.gold { background: var(--accent-grad); border-color: transparent; color: #171005; box-shadow: 0 8px 22px -10px rgba(var(--glow), .9); }
.btn.gold:hover:not(:disabled) { background: var(--accent-grad); filter: brightness(1.08); box-shadow: 0 10px 28px -8px rgba(var(--glow), 1); }
.btn.danger { color: #FFB0B0; }
.btn.danger:hover:not(:disabled) { border-color: rgba(240, 93, 93, .55); background: rgba(240, 93, 93, .1); }
.btn.small { padding: 5px 12px; font-size: 12.5px; }
.icon-btn { background: none; border: 0; color: var(--text); cursor: pointer; display: grid; place-items: center; }
input, select, textarea { background: rgba(6, 13, 28, .7); border: 1px solid var(--line2); color: var(--text); border-radius: var(--r-ctl); padding: 10px 14px; font: inherit; width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(var(--glow), .7); box-shadow: 0 0 0 4px rgba(var(--glow), .15); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1; min-width: 160px; width: auto; }

/* ---------- layout */
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); }
.cols-even { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stack > * + * { margin-top: 18px; }
.card { background: rgba(14, 26, 49, .9); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; min-width: 0; }
.card h3 { font-size: 17px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }

/* stat tiles: icon + label on top, big value, small note, like AtomBox */
.tile { padding: 18px 20px; position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s; }
.tile:hover { transform: translateY(-3px); border-color: rgba(var(--glow), .4); box-shadow: 0 16px 34px -18px rgba(var(--glow), .55); }
.tile .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tile .label .i { width: 16px; height: 16px; }
.tile .value { font-size: 30px; font-weight: 750; margin: 8px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tile .value small { font-size: 15px; color: var(--muted); font-weight: 600; }
.tile .sub { color: var(--faint); font-size: 12.5px; }
.tile.accent::after { content: ""; position: absolute; left: 20px; right: 40%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent-grad); }
.gold-text { color: var(--gold); }

/* hero: a deep gradient panel with theme-coloured light, pill buttons, address chip */
.hero { border-radius: var(--r-hero); padding: 32px 32px 26px; border: 1px solid rgba(var(--glow), .22); position: relative; overflow: hidden;
  background: radial-gradient(620px 300px at 92% -10%, rgba(var(--glow), .28), transparent 62%), radial-gradient(520px 280px at -8% 115%, rgba(var(--glow2), .32), transparent 62%), linear-gradient(135deg, var(--hero1), var(--hero2) 70%);
  box-shadow: 0 30px 70px -40px rgba(var(--glow2), .6); }
.hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--glow), .18), transparent 65%); animation: pulse-glow 7s ease-in-out infinite; pointer-events: none; }
@keyframes pulse-glow { 50% { transform: scale(1.25) translate(-30px, 20px); opacity: .7; } }
.hero .eyebrow { font-size: 13px; color: #CBD3E1; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero h1 { font-size: clamp(30px, 4.2vw, 44px); margin: 12px 0 8px; display: flex; align-items: center; gap: 14px; line-height: 1.1; }
.hero h1 .emblem { font-size: .85em; }
.hero p { color: #CFD6E3; max-width: 640px; margin: 0 0 22px; font-size: 15.5px; }
.hero .grid.tiles .card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.addr { display: inline-flex; gap: 10px; align-items: center; border-radius: 999px; padding: 5px 5px 5px 16px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .12); }
.addr code { color: var(--text); font-weight: 600; }
.bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; margin-top: 26px; }
.bar .top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 650; color: #C8D0DE; margin-bottom: 8px; }
.track { height: 7px; background: rgba(255, 255, 255, .1); border-radius: 99px; overflow: hidden; }
.fill { height: 100%; border-radius: 99px; background: var(--accent-grad); animation: grow 1.1s cubic-bezier(.2, .8, .2, 1) both .2s; transform-origin: left; position: relative; overflow: hidden; }
.fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: sweep 2.8s ease-in-out infinite 1.4s; }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes sweep { to { transform: translateX(100%); } }

/* notice strip: rounded, icon, pill action on the right */
.banner { display: flex; align-items: center; gap: 12px; border: 1px solid rgba(var(--glow), .35); background: rgba(var(--glow), .07); border-radius: var(--r-card); padding: 12px 14px 12px 18px; font-weight: 550; }
.banner .i { color: var(--gold); }

/* gradient title text */
.grad-text { background: linear-gradient(90deg, var(--text) 0%, var(--gold) 45%, var(--crimson) 70%, var(--text) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 9s linear infinite; }
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: 250% 0; } }
@keyframes float { 50% { transform: translateY(-3px) rotate(-3deg); } }

/* ---------- tables, lists, tags */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 12.5px; font-weight: 650; position: sticky; top: 0; background: #0E1A31; }
tbody tr:hover td { background: rgba(255, 255, 255, .025); }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; max-height: 70vh; overflow-y: auto; border-radius: var(--r-ctl); }
.head { width: 26px; height: 26px; border-radius: 8px; vertical-align: middle; margin-right: 10px; background: var(--card2); image-rendering: pixelated; }
.tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line2); color: var(--muted); background: rgba(255, 255, 255, .03); }
.tag.open { color: var(--gold); border-color: rgba(var(--glow), .45); background: rgba(var(--glow), .08); }
.tag.claimed { color: #8CC8F5; border-color: rgba(140, 200, 245, .45); background: rgba(140, 200, 245, .08); }
.tag.closed { color: var(--faint); }
.tag.live { color: #171005; background: var(--accent-grad); border-color: transparent; }
.list > div { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--r-ctl); }
.list > div:hover { background: rgba(255, 255, 255, .035); }
pre.console { background: rgba(3, 8, 18, .85); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; margin: 0; color: #CFD5E0; }
.seg { display: inline-flex; background: rgba(6, 13, 28, .7); border: 1px solid var(--line2); border-radius: 999px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--muted); padding: 4px 12px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.chart svg { width: 100%; height: 240px; display: block; }
.chart .draw { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 1.6s cubic-bezier(.4, 0, .2, 1) forwards .15s; }
.chart .area { opacity: 0; animation: fade .9s ease forwards .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rule-card { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; background: rgba(19, 34, 63, .55); display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; align-items: start; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s; }
.rule-card:hover { transform: translateY(-2px); border-color: rgba(var(--glow), .35); }
.rule-card .emblem { grid-row: span 3; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: rgba(255, 255, 255, .06); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.rule-card:hover .emblem { transform: scale(1.1) rotate(-6deg); }
.rule-card.active { border-color: rgba(var(--glow), .6); background: linear-gradient(160deg, rgba(var(--glow), .14), transparent 60%), rgba(19, 34, 63, .55); animation: active-glow 3s ease-in-out infinite; }
.rule-card.active .emblem { background: rgba(var(--glow), .18); }
@keyframes active-glow { 50% { box-shadow: 0 0 0 1px rgba(var(--glow), .45), 0 0 30px -6px rgba(var(--glow), .5); } }
.rule-card p { margin: 0; }
.countdown { font-size: 40px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, var(--gold), var(--crimson), var(--gold)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
.empty { color: var(--faint); padding: 24px 0; text-align: center; }
.toast { position: fixed; right: 18px; bottom: 18px; display: flex; gap: 10px; align-items: center; background: var(--card2); border: 1px solid var(--line2); padding: 12px 18px; border-radius: 999px; z-index: 60; max-width: min(460px, calc(100vw - 36px)); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); animation: toast-in .35s cubic-bezier(.2, .8, .2, 1); font-weight: 550; }
.toast::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.toast.bad::before { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }

/* ---------- theme menu (palette button) and Ctrl K search */
.popover { position: absolute; top: 60px; right: 28px; width: 300px; background: var(--card2); border: 1px solid var(--line2); border-radius: var(--r-card); padding: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); z-index: 30; animation: pop .18s cubic-bezier(.2, .8, .2, 1); }
.popover h4 { margin: 0 0 12px; font-size: 14px; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.swatch { border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); color: var(--text); border-radius: 14px; padding: 8px 10px; display: flex; gap: 10px; align-items: center; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 650; transition: border-color .2s, transform .2s; }
.swatch i { width: 26px; height: 26px; border-radius: 9px; display: block; flex: none; }
.swatch:hover { transform: translateY(-1px); border-color: rgba(var(--glow), .5); }
.swatch.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.toggle { display: flex; align-items: center; gap: 12px; padding: 9px 0; cursor: pointer; font-weight: 550; }
.toggle input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: rgba(255, 255, 255, .14); position: relative; cursor: pointer; flex: none; padding: 0; border: 0; transition: background .2s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.toggle input:checked { background: var(--accent-grad); }
.toggle input:checked::after { transform: translateX(18px); }
.palette-bg { position: fixed; inset: 0; background: rgba(2, 6, 15, .6); backdrop-filter: blur(3px); z-index: 50; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; animation: fade .15s ease forwards; }
.palette { width: min(560px, 100%); background: var(--card2); border: 1px solid var(--line2); border-radius: 20px; box-shadow: 0 40px 100px rgba(0, 0, 0, .6); overflow: hidden; animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
.palette .find { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line2); }
.palette .find .i { color: var(--muted); }
.palette .find input { border: 0; background: none; padding: 0; font-size: 16px; box-shadow: none; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-ctl); cursor: pointer; color: #C9D0DC; }
.palette li .i { color: var(--faint); }
.palette li small { margin-left: auto; color: var(--faint); }
.palette li.on { background: var(--soft); color: var(--text); }
.palette li.on .i { color: var(--gold); }

/* ---------- one entrance sequence when a page opens */
.view-enter > * { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.view-enter .grid > *, .view-enter .stack > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.view-enter .grid > *:nth-child(2), .view-enter .stack > *:nth-child(2) { animation-delay: .05s; }
.view-enter .grid > *:nth-child(3), .view-enter .stack > *:nth-child(3) { animation-delay: .1s; }
.view-enter .grid > *:nth-child(4), .view-enter .stack > *:nth-child(4) { animation-delay: .15s; }
.view-enter .grid > *:nth-child(n+5), .view-enter .stack > *:nth-child(n+5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); }
  .chip.menu { display: inline-flex; }
  .cols-2 { grid-template-columns: 1fr; }
  main { padding: 18px 16px 44px; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .chip.search span, .chip.search kbd, .chip.server, #who { display: none; }
  .chip.search { min-width: 0; width: 38px; padding: 0; justify-content: center; }
  .popover { right: 16px; left: 16px; width: auto; }
  .hero { padding: 24px 20px 20px; }
  .card { padding: 18px; }
}

/* motion off: the Appearance switch, or the system's reduced-motion setting */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html[data-motion="off"] .chart .draw { stroke-dashoffset: 0; }
html[data-motion="off"] .chart .area { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .chart .draw { stroke-dashoffset: 0; }
  .chart .area { opacity: 1; }
  .aurora { display: none; }
}
