:root {
  color-scheme: dark;
  --bg: #22252b;            /* matte graphite */
  --bg-2: #2a2e35;
  --fg: #eef0f3;
  --muted: #9aa1ad;
  --faint: #6b7280;
  --line: rgba(255,255,255,.12);
  --glass: linear-gradient(140deg, rgba(255,255,255,.11), rgba(255,255,255,.035));
  --glass-strong: linear-gradient(140deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  --accent: #8fb8ff;
  --open: #6ea8fe;
  --progress: #f5b84b;
  --hold: #b49cf0;
  --complete: #5fcf95;
  --cancelled: #ef7d7d;
  --radius: 26px;
  --page-max: 1760px;       /* widest the content gets; big screens also scale up (see end of file) */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* soft ambient light so the glass has something to refract */
.ambient { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32; }
.ambient i:nth-child(1) { width: 520px; height: 520px; left: -120px; top: -140px; background: #4c6b8a; }
.ambient i:nth-child(2) { width: 460px; height: 460px; right: -100px; top: 30%; background: #7a5c6e; }
.ambient i:nth-child(3) { width: 420px; height: 420px; left: 35%; bottom: -200px; background: #4f7a6a; }
[hidden] { display: none !important; }
/* matte grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- liquid glass ---------- */
.glass {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.25),
    0 12px 40px rgba(0,0,0,.32);
}
.glass::before { /* specular highlight */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 10% -10%, rgba(255,255,255,.16), transparent 55%);
}
.glass > * { position: relative; }

/* ---------- pills & buttons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  color: var(--fg); font: 500 13px var(--font);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .18s, transform .12s, border-color .18s;
}
.pill:hover { background: var(--glass-strong); border-color: rgba(255,255,255,.22); }
.pill:active { transform: scale(.97); }
.pill.primary {
  background: linear-gradient(180deg, #a9c8ff, #7aa6f2); color: #0f1a2c; border-color: rgba(255,255,255,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 20px rgba(122,166,242,.3);
}
.pill.primary:hover { background: linear-gradient(180deg, #b8d2ff, #88b0f5); }
.pill.ghost { background: transparent; box-shadow: none; }
.pill.sm { height: 28px; padding: 0 12px; font-size: 12px; }
.pill.on { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.3); }

.status {
  --c: var(--open);
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 12px; border-radius: 999px;
  font: 600 12px var(--font); letter-spacing: .01em;
  color: color-mix(in srgb, var(--c) 85%, white);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.status[data-s="open"] { --c: var(--open); }
.status[data-s="in_progress"] { --c: var(--progress); }
.status[data-s="on_hold"] { --c: var(--hold); }
.status[data-s="complete"] { --c: var(--complete); }
.status[data-s="cancelled"] { --c: var(--cancelled); }
.status[data-s="overdue"] { --c: var(--cancelled); }
.status.bare { height: auto; padding: 0; border: 0; background: none; box-shadow: none; } /* just the dot, inside filter pills */

.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; font: 700 11px var(--font); color: #10141b;
  border: 1px solid rgba(255,255,255,.35);
}
.avatar.bot { color: var(--fg); background: rgba(255,255,255,.12); }

input, textarea, select {
  width: 100%; font: 400 14px var(--font); color: var(--fg);
  background: rgba(0,0,0,.18); border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 18px; outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
  transition: border-color .15s, background .15s;
}
textarea { border-radius: 20px; resize: vertical; min-height: 84px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: rgba(143,184,255,.6); background-color: rgba(0,0,0,.24); }
input[readonly], input:disabled { opacity: .6; cursor: not-allowed; }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' fill='none' stroke='%239aa1ad' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center;
}
select option { background: var(--bg-2); color: var(--fg); }
select.inline { width: auto; min-width: 0; max-width: 100%; height: 32px; padding: 0 34px 0 14px; font-size: 13px; background-position: right 13px center; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.6); }
::placeholder { color: var(--faint); }
.field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }

/* ---------- views ---------- */
.view { display: none; }
.view.active { display: block; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 16px; z-index: 10;
  margin: 16px auto 0; max-width: var(--page-max); width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 18px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 17px var(--font); letter-spacing: -.02em; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(145deg, #b8d2ff, #6f8fd8); color: #0f1a2c; font-size: 14px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.topbar nav { display: flex; gap: 6px; margin-left: 18px; }
.topbar .search { width: 260px; height: 34px; padding: 0 16px; font-size: 13px; }
.shell { max-width: calc(var(--page-max) + 32px); margin: 28px auto 60px; padding: 0 16px; }

/* ---------- login ---------- */
/* 100vh is scaled by the big-screen zoom, so divide it back out to fit the window exactly. */
#login.active, #set-password.active { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: calc(100vh / var(--zoom, 1)); padding: 24px; }
/* Signed-out pages sit outside the app shell; collapse the empty shell so it adds no scroll height. */
.shell:not(:has(.view.active)) { display: none; }
.login-card { width: 400px; max-width: 100%; padding: 36px 32px 28px; }
.login-card .brand { justify-content: center; font-size: 26px; margin-bottom: 6px; }
.login-card .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 18px; }
.login-card form { display: grid; gap: 14px; margin-top: 26px; }
.login-card .pill { height: 44px; justify-content: center; font-size: 14px; width: 100%; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 4px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 12.5px; white-space: nowrap; }
.login-foot a, .link { color: var(--accent); text-decoration: none; cursor: pointer; }
.legal { margin: 14px 0 0; text-align: center; font-size: 12px; }
.legal a { color: var(--faint); text-decoration: none; }
.legal a:hover { color: var(--accent); }

/* ---------- privacy page ---------- */
.doc-page { max-width: 720px; margin: 48px auto; padding: 36px 40px; }
.doc-page .brand { color: var(--fg); text-decoration: none; margin-bottom: 22px; }
.doc-page h1 { font-size: 28px; margin-bottom: 4px; }
.doc-page h2 { font-size: 16px; margin: 26px 0 8px; }
.doc-page p, .doc-page li { color: #d6dae1; line-height: 1.65; }
.doc-page ol { padding-left: 22px; margin: 0; }
@media (max-width: 760px) { .doc-page { margin: 16px; padding: 26px 22px; } }

/* ---------- list ---------- */
.list-head { display: flex; align-items: end; gap: 16px; margin-bottom: 18px; }
.list-head h1 { font-size: 30px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters .count { font-size: 11px; color: var(--muted); background: rgba(255,255,255,.08); border-radius: 999px; padding: 1px 7px; }
.filters .pill.on .count { color: var(--fg); background: rgba(255,255,255,.18); }
.table { padding: 6px; }
.trow {
  display: grid; grid-template-columns: 92px 1fr 100px 130px 90px 150px 110px 150px; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 18px; cursor: pointer; transition: background .15s;
}
.trow:hover { background: rgba(255,255,255,.06); }
.trow.head { cursor: default; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding-top: 10px; padding-bottom: 6px; }
.trow.head:hover { background: none; }
.trow .title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .title .tag { height: 18px; padding: 0 8px; margin-right: 8px; font-size: 10.5px; vertical-align: 1px; }
.prio { font-size: 12px; color: var(--muted); }
.prio b { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.due { font-size: 13px; }
.due.late { color: #ffb4b4; font-weight: 600; }
input.inline { width: auto; height: 32px; padding: 0 12px; font-size: 13px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- detail ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 28%, 460px); gap: 20px; align-items: start; }
.card { padding: 24px; }
.card + .card { margin-top: 20px; }
.card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.title-head { margin-bottom: 0; }
.doc-title { font-size: 26px; line-height: 1.25; margin: 10px 0 16px; overflow-wrap: anywhere; }
.title-input { font: 650 22px/1.3 var(--font); letter-spacing: -.01em; border-radius: 16px; margin: 10px 0 16px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.2); border: 1px solid var(--line); }
.segmented button {
  --c: var(--open);
  border: 1px solid transparent; background: none; color: var(--muted); font: 500 12.5px var(--font);
  height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: all .18s;
}
.segmented button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); opacity: .55; }
.segmented button:hover { color: var(--fg); background: rgba(255,255,255,.06); }
.segmented button.on {
  color: color-mix(in srgb, var(--c) 85%, white);
  background: color-mix(in srgb, var(--c) 18%, rgba(255,255,255,.04));
  border-color: color-mix(in srgb, var(--c) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 14px color-mix(in srgb, var(--c) 20%, transparent);
}
.segmented button.on::before { opacity: 1; box-shadow: 0 0 8px var(--c); }
.desc { color: #d6dae1; white-space: pre-wrap; }
.comments { display: grid; gap: 14px; }
.comment { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.bubble { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; padding: 10px 14px; }
.bubble .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pill.xs { height: 22px; padding: 0 10px; font-size: 11.5px; }
.edit-comment { margin-left: auto; color: var(--muted); }
.edit-comment:hover { color: var(--fg); }
.comment-edit { display: grid; gap: 8px; margin-top: 4px; }
.comment-edit textarea { min-height: 70px; }
.comment-edit .row { justify-content: flex-end; gap: 6px; }
.via { font-size: 10.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.composer { display: grid; gap: 10px; margin-top: 18px; }
.composer .row { justify-content: flex-end; }
dl.meta { display: grid; grid-template-columns: 100px 1fr; gap: 12px 10px; margin: 0; align-items: center; }
dl.meta dt { color: var(--muted); font-size: 13px; }
dl.meta dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.audit { list-style: none; margin: 0; padding: 0; position: relative; }
.audit::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.audit li { position: relative; padding: 0 0 16px 24px; }
.audit li:last-child { padding-bottom: 0; }
.audit li::before {
  content: ""; position: absolute; left: 1px; top: 5px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--dot, var(--faint));
}
.audit time { display: block; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.audit .what { font-size: 13px; }
.audit .what b { font-weight: 600; }
.audit li.new { animation: flash 1.2s ease; }
@keyframes flash { from { background: rgba(143,184,255,.14); } to { background: transparent; } }

/* ---------- integrations ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 20px; }
.grid2 > * { min-width: 0; } /* long code snippets scroll inside their card instead of widening the page */
.endpoint { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border-radius: 999px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.endpoint code { flex: 1; font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool { font-family: var(--mono); font-size: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.client-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.client-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 15px; border: 1px solid rgba(255,255,255,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.client-head h2 { font-size: 16px; }
.client-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
pre.snippet {
  margin: 0; padding: 14px 16px; border-radius: 16px; background: rgba(0,0,0,.3); border: 1px solid var(--line);
  font: 12px/1.6 var(--mono); color: #cfd6e2; overflow-x: auto; white-space: pre;
}
.token b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tokens { display: grid; gap: 8px; }
.token { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 13px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px; border-radius: 999px; font: 600 11.5px var(--font); border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--muted); white-space: nowrap; }
.tag.admin { color: #cfe0ff; background: rgba(143,184,255,.16); border-color: rgba(143,184,255,.4); }
.tag.google { color: var(--fg); }
.tag.overdue { color: #ffd0d0; background: rgba(239,125,125,.16); border-color: rgba(239,125,125,.45); }
.urow { display: grid; grid-template-columns: minmax(0, 1.6fr) 70px 90px 100px 170px 350px; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; }
.urow .actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.urow:hover { background: rgba(255,255,255,.04); }
.urow.head { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding-top: 10px; padding-bottom: 6px; }
.urow.head:hover { background: none; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who div { min-width: 0; }
.who small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.choice { display: inline-flex; justify-self: start; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.2); border: 1px solid var(--line); }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px; font: 500 12.5px var(--font); color: var(--muted); border: 1px solid transparent; transition: all .18s; }
.choice input:checked + span { color: var(--fg); background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.choice input:focus-visible + span { outline: 2px solid rgba(143,184,255,.6); }
.form-error { margin: 0; padding: 9px 14px; border-radius: 14px; font-size: 13px; color: #ffd0d0; background: rgba(239,125,125,.12); border: 1px solid rgba(239,125,125,.35); }

/* ---------- modal ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(10,12,16,.45); backdrop-filter: blur(4px); }
.scrim.open { display: grid; animation: rise .25s ease; }
.modal { width: 520px; max-width: calc(100% - 32px); padding: 26px; display: grid; gap: 16px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 60; padding: 10px 18px; border-radius: 999px; transition: all .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .trow { grid-template-columns: 80px 1fr 120px; }
  .trow > :nth-child(3), .trow > :nth-child(n+5) { display: none; }
  .topbar .search { display: none; }
}

/* ---------- app additions ---------- */
.pill:disabled { opacity: .55; cursor: progress; transform: none; }
.pill.primary.danger { background: linear-gradient(180deg, #f6a3a3, #e07474); color: #2c0f0f; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 20px rgba(224,116,116,.28); }
.form-error.block { margin-bottom: 18px; }
.warn { margin: 0; padding: 9px 14px; border-radius: 14px; font-size: 13px; color: #ffe2b0; background: rgba(245,184,75,.12); border: 1px solid rgba(245,184,75,.35); }
.info { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.desc textarea { white-space: pre-wrap; min-height: 160px; }
.endpoint.wrap code { white-space: normal; word-break: break-all; user-select: all; padding: 6px 0; }
.trow:focus-visible { outline: 2px solid rgba(143,184,255,.6); }
.modal h2 { font-size: 20px; }
.toast.error { color: #ffd0d0; border-color: rgba(239,125,125,.45); }
@media (max-width: 900px) {
  .urow { grid-template-columns: 1fr auto; }
  .urow > :nth-child(n+2):not(:last-child) { display: none; }
}

/* ---------- liquid crystal glass on hover: pills, chips, table rows ----------
   app.js sets --mx/--my to the pointer's spot inside the element; registered here so the light glides after it. */
@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 0%; }
:root {
  /* bright top edge, prism-tinted side edges (pink left, cyan right), soft inner glow */
  --lg-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -1px 0 rgba(255,255,255,.1),
    inset 1px 0 0 rgba(255,150,215,.32),
    inset -1px 0 0 rgba(130,215,255,.36),
    inset 0 0 14px rgba(255,255,255,.07);
}
:is(.pill, .tag, .status:not(.bare), .tool, .segmented button, .trow:not(.head), .urow:not(.head)) {
  position: relative; isolation: isolate;
  transition: background .3s, border-color .3s, color .2s, box-shadow .35s, backdrop-filter .35s,
    transform .35s cubic-bezier(.2, .9, .3, 1.4), --mx .25s ease-out, --my .25s ease-out;
}
:is(.pill, .tag, .status:not(.bare), .tool, .segmented button, .trow:not(.head), .urow:not(.head))::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(160px circle at var(--mx) var(--my), rgba(255,255,255,.17), rgba(255,255,255,.04) 45%, transparent 75%),
    conic-gradient(from 210deg at var(--mx) var(--my),
      rgba(255,120,200,.08), rgba(120,200,255,.08), rgba(140,255,200,.06), rgba(255,225,120,.06), rgba(255,120,200,.08)),
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 50%);
  mix-blend-mode: screen;
  opacity: 0; transition: opacity .35s;
}
@media (hover: hover) and (pointer: fine) {
  :is(.pill:not(:disabled), .tag, .status:not(.bare), .tool, .segmented button, .trow:not(.head), .urow:not(.head)):hover {
    border-color: rgba(255,255,255,.32);
    box-shadow: var(--lg-shadow), 0 3px 10px rgba(0,0,0,.18);
  }
  /* Chips sit inside rows; a second backdrop blur there shows the row's unlit backdrop as a dark box. */
  :is(.pill:not(:disabled), .trow:not(.head), .urow:not(.head)):hover {
    backdrop-filter: blur(18px) saturate(190%) brightness(1.05);
    -webkit-backdrop-filter: blur(18px) saturate(190%) brightness(1.05);
    box-shadow: var(--lg-shadow), 0 8px 24px rgba(0,0,0,.28);
  }
  :is(.pill:not(:disabled), .tag, .status:not(.bare), .tool, .segmented button, .trow:not(.head), .urow:not(.head)):hover::after { opacity: 1; }
  :is(.pill:not(:disabled), .tag, .status:not(.bare), .tool, .segmented button):hover { transform: translateY(-1px) scale(1.04); }
  :is(.trow:not(.head), .urow:not(.head)):hover { transform: translateY(-1px); background: rgba(255,255,255,.05); }
  :is(.trow:not(.head), .urow:not(.head)):hover .faint { color: var(--muted); }
  .pill:not(:disabled):active { transform: scale(.97); }
  .pill.primary:not(:disabled):hover { box-shadow: var(--lg-shadow), 0 8px 26px rgba(122,166,242,.42); }
  :is(.status:not(.bare), .segmented button):hover {
    border-color: color-mix(in srgb, var(--c) 60%, white);
    box-shadow: var(--lg-shadow), 0 0 18px color-mix(in srgb, var(--c) 32%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(.pill, .tag, .status:not(.bare), .tool, .segmented button, .trow:not(.head), .urow:not(.head)) { transition: none; transform: none !important; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 8px; top: 8px; margin-top: 8px; width: calc(100% - 16px); padding: 10px 12px; border-radius: 24px; }
  .topbar nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar nav .pill { flex: none; }
  .shell { margin-top: 18px; padding: 0 8px; }
  .card { padding: 18px; }
  .list-head { flex-wrap: wrap; }
  .list-head h1 { font-size: 24px; }
  .doc-title { font-size: 22px; }
  .trow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .trow.head { display: none; }
  .trow > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .urow { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .urow.head { display: none; }
  .urow .actions { justify-content: flex-start; flex-wrap: wrap; }
  .token { grid-template-columns: minmax(0, 1fr) auto; }
  .endpoint { border-radius: 18px; }
  .endpoint .faint { display: none; }
  .modal { padding: 20px; }
}

/* ---------- big screens: scale everything up so the page fills the screen and stays readable ---------- */
html { zoom: var(--zoom, 1); }
@media (min-width: 1680px) { :root { --zoom: 1.1; } }
@media (min-width: 1920px) { :root { --zoom: 1.2; } }
@media (min-width: 2400px) { :root { --zoom: 1.35; } }
@media (min-width: 3200px) { :root { --zoom: 1.6; } }
