/* Cyber Guardian by Security Decoded. Always dark, per the Security Decoded brand brief. */

:root {
  --bg: #173540;
  --bg-deep: #122B34;
  --bg-raise: #1C3E4A;
  --ink: #F7FBFA;
  --ink-soft: #DCE9E8;
  --ink-mute: #9DB8BC;
  --orange: #FF8A3D;
  --sky: #9FE0F5;
  --line: #386170;
  --line-soft: #2A4D59;
  --glow-o: rgba(255, 138, 61, .16);
  --glow-s: rgba(159, 224, 245, .12);
  --grad: linear-gradient(90deg, var(--orange), var(--sky));

  --f-head: 'Bricolage Grotesque', sans-serif;
  --f-body: 'IBM Plex Sans', system-ui, sans-serif;
  --f-mono: 'Space Mono', ui-monospace, monospace;

  --radius: 16px;
  --radius-sm: 12px;
  --sidebar: 280px;
  --topbar: 68px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font: 400 1rem/1.7 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); font-weight: 800; margin: 0; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.07; letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.14; }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.25; }
p { margin: 0; }
a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sky { color: var(--sky); }
.orange { color: var(--orange); }
.mute { color: var(--ink-mute); }
.mono { font-family: var(--f-mono); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

.label {
  display: inline-block;
  font: 700 .72rem/1 var(--f-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sky);
}
.label.accent { color: var(--orange); }

.tag {
  display: inline-flex; align-items: center; gap: .35em;
  font: 700 .68rem/1 var(--f-mono);
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--sky);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .38em .7em;
  white-space: nowrap;
}
.tag.orange { color: var(--orange); border-color: rgba(255, 138, 61, .45); }
.tag.solid { background: var(--orange); color: var(--bg-deep); border-color: var(--orange); }
.tag.muted { color: var(--ink-mute); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 700 .95rem/1 var(--f-body);
  padding: .85em 1.3em;
  border-radius: var(--radius-sm);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--orange); color: var(--bg-deep); box-shadow: 0 8px 28px var(--glow-o), 0 0 0 1px rgba(255, 138, 61, .3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(255, 138, 61, .3); }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--sky); color: var(--sky); }
.btn-ghost { background: transparent; color: var(--ink-soft); padding: .6em .8em; }
.btn-ghost:hover { color: var(--sky); }
.btn-sm { font-size: .82rem; padding: .6em .95em; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-lg { font-size: 1.05rem; padding: 1em 1.6em; }

/* ---------- Forms ---------- */
.field { display: grid; gap: .45rem; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.input, .select {
  width: 100%;
  font: 400 .95rem/1.4 var(--f-body);
  color: var(--ink);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8em 1em;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--ink-mute); }
.input:focus, .select:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--glow-s); }
.select {
  appearance: none;
  padding-right: 2.6em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239FE0F5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9em center;
  background-size: 1.1em;
}
.select optgroup { color: var(--sky); font-style: normal; }
.select option { color: var(--ink); background: var(--bg-deep); }
.hint { font-size: .8rem; color: var(--ink-mute); }
.form-error { font-size: .85rem; color: var(--orange); }

.switch { position: relative; display: inline-flex; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .2s, box-shadow .2s;
}
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-mute); transition: transform .2s, background .2s;
}
.switch input:checked + span { background: rgba(255, 138, 61, .18); box-shadow: inset 0 0 0 1px var(--orange); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--orange); }
.switch input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
.switch input:disabled + span { opacity: .5; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg-deep);
  border-right: 1px solid var(--line-soft);
  padding: 22px 16px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font: 800 1.15rem/1.1 var(--f-head); color: var(--ink); }
.brand-by { display: block; font: 400 .7rem/1.3 var(--f-body); color: var(--ink-mute); letter-spacing: .02em; }

.nav-group { margin-top: 10px; }
.nav-group > .label { padding: 12px 12px 10px; font-size: .64rem; color: var(--ink-mute); }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .9rem; font-weight: 600; line-height: 1.3;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.nav a svg { width: 20px; height: 20px; flex: none; stroke: currentColor; }
.nav a:hover { background: var(--bg-raise); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-soft); }
.nav a[aria-current="page"]::before {
  content: ''; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange);
}
.nav a[aria-current="page"] svg { color: var(--orange); }
.nav a.locked { color: var(--ink-mute); opacity: .55; }
.nav a.locked:hover { opacity: .8; background: transparent; }
.nav a .lock { margin-left: auto; width: 14px; height: 14px; }

.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.sidebar-foot .user-menu { width: 100%; }
.sidebar-foot .user-btn { width: 100%; border-radius: 12px; padding: 8px; text-align: left; }
.sidebar-foot .user-btn .who { flex: 1; min-width: 0; display: grid; line-height: 1.3; max-width: none; }
.sidebar-foot .user-btn .who strong { color: var(--ink); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .user-btn .who span { color: var(--ink-mute); font-weight: 400; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .user-btn .chev { width: 18px; height: 18px; color: var(--ink-mute); flex: none; }
.sidebar-foot .dropdown { left: 0; right: 0; top: auto; bottom: calc(100% + 8px); min-width: 0; }
.status { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--ink-mute); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 138, 61, .25); animation: pulse-dot 2s ease-in-out infinite; flex: none; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar);
  display: flex; align-items: center; gap: 12px;
  padding: 0 clamp(16px, 3vw, 40px);
  background: rgba(23, 53, 64, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .crumb { font-size: .85rem; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb strong { color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: transparent; border: 0; color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-raise); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }

.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; padding: 4px 6px 4px 4px; border-radius: 999px; cursor: pointer;
  color: var(--ink-soft); font: 600 .85rem/1 var(--f-body);
}
.user-btn:hover { background: var(--bg-raise); }
.avatar {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-deep); color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 800 .85rem/1 var(--f-head);
  flex: none;
}
.avatar.lg { width: 76px; height: 76px; font-size: 1.6rem; }
.user-btn .who { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 240px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.dropdown .meta { padding: 8px 10px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.dropdown .meta strong { display: block; color: var(--ink); font-size: .9rem; }
.dropdown .meta span { font-size: .78rem; color: var(--ink-mute); word-break: break-all; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 8px;
  font: 600 .88rem/1.2 var(--f-body); color: var(--ink-soft);
  background: transparent; border: 0; text-align: left; text-decoration: none; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg-raise); color: var(--ink); }
.dropdown svg { width: 18px; height: 18px; }

.content {
  flex: 1;
  width: 100%;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px) 64px;
  display: grid; gap: 28px; align-content: start;
}

.page-head { display: grid; gap: 12px; position: relative; }
.page-head p { max-width: 68ch; color: var(--ink-soft); }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.scrim { display: none; }

/* ---------- Panels ---------- */
.panel {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 28px);
  overflow: hidden;
}
.panel::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--grad);
  opacity: 0; transition: opacity .3s;
}
.panel.accent::before, .panel.hoverable:hover::before { opacity: 1; }
.panel.hoverable { transition: transform .3s, box-shadow .3s, border-color .3s; }
.panel.hoverable:hover { transform: translateY(-6px); border-color: var(--line); box-shadow: 0 20px 40px rgba(0, 0, 0, .25), 0 0 40px var(--glow-s); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head .sub { font-size: .85rem; color: var(--ink-mute); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.stat { background: var(--bg-deep); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 6px; }
.stat .k { font: 700 .66rem/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.stat .v { font: 800 1.9rem/1 var(--f-head); color: var(--ink); }
.stat .v.is-empty { color: var(--line); }

/* Query bar */
.query { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.query-actions { display: flex; gap: 10px; }
.add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: start; margin-top: 16px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; line-height: 1.45; }
th {
  text-align: left; font: 700 .66rem/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 12px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); vertical-align: middle; }
tbody tr:hover td { background: rgba(159, 224, 245, .03); }
tbody tr:last-child td { border-bottom: 0; }
td.strong { color: var(--ink); font-weight: 600; }
td.nowrap, th.nowrap { white-space: nowrap; }
td.num, th.num { text-align: right; }
td.wrap-any { overflow-wrap: anywhere; min-width: 180px; }
tr.removed td { opacity: .5; }
.detail { font-family: var(--f-mono); font-size: .74rem; color: var(--ink-mute); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.toolbar .field { min-width: 160px; flex: 1; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: .85rem; color: var(--ink-mute); flex-wrap: wrap; }

/* ---------- Empty and locked states ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 36px 16px; }
.empty p { max-width: 46ch; color: var(--ink-mute); }
.empty h3 { font-size: 1.2rem; }

/* Artwork exhibits (assets/js/artwork.js), motion as on securitydecoded.com */
.art { width: 100%; max-width: 17rem; aspect-ratio: 1; margin: 0 auto; }
.art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.art.sm { max-width: 11rem; }
.art .spin-slow, .art .spin-rev, .art .sweep, .art .swing { transform-box: fill-box; transform-origin: center; }
.spin-slow { animation: art-spin 48s linear infinite; }
.spin-rev { animation: art-spin 32s linear infinite reverse; }
.sweep { animation: art-spin 6s linear infinite; }
.swing { animation: art-swing 9s ease-in-out infinite; }
.drift { animation: art-drift 3.4s ease-in-out infinite; }
.pulse { animation: art-pulse 3.2s ease-in-out infinite; }
.d1 { animation-delay: 1.1s; }
.d2 { animation-delay: 2.2s; }
.searching .sweep { animation-duration: 1.6s; }

.locked-view { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.locked-art { display: grid; place-items: center; }
.locked-copy { display: grid; gap: 16px; }
.locked-copy ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.locked-copy li { display: flex; gap: 10px; align-items: baseline; }
.locked-copy li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); flex: none; transform: translateY(-2px); }

/* Profile */
.profile-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-card .id { display: grid; gap: 4px; min-width: 0; }
.profile-card .id strong { font: 800 1.4rem/1.15 var(--f-head); color: var(--ink); }
.profile-card .id span { color: var(--ink-mute); word-break: break-all; }
.profile-card .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; font-size: .9rem; }
.kv dt { color: var(--ink-mute); }
.kv dd { margin: 0; color: var(--ink); font-family: var(--f-mono); font-size: .82rem; }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 100; }
.toast {
  background: var(--bg-deep); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--sky);
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: .88rem; max-width: 360px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35); animation: rise .3s ease-out;
}
.toast.warn { border-left-color: var(--orange); }

/* ---------- Landing ---------- */
.landing { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.landing::before, .landing::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.landing::before { width: 900px; height: 900px; right: -260px; top: -240px; background: radial-gradient(circle, var(--glow-o), transparent 62%); }
.landing::after { width: 800px; height: 800px; left: -300px; bottom: -320px; background: radial-gradient(circle, var(--glow-s), transparent 62%); }
.landing-nav { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 24px clamp(16px, 5vw, 64px); }
.landing-main {
  position: relative; z-index: 1; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center;
  padding: 24px clamp(16px, 5vw, 64px) 64px; max-width: 1320px; width: 100%; margin: 0 auto;
}
.landing h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
.hero-copy { display: grid; gap: 22px; }
.hero-copy p.lead { font-size: 1.1rem; max-width: 52ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.hero-note { font-size: .8rem; color: var(--ink-mute); display: flex; align-items: center; gap: 8px; }
.hero-art { display: grid; place-items: center; }
.logo3d { width: 100%; max-width: min(100%, 26rem); margin: 0 auto; aspect-ratio: 1; position: relative; }
.logo3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.logo3d-static { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .45s ease; }
.logo3d-static img { width: 66%; height: 66%; }
.logo3d-static.is-out { opacity: 0; }
.modules { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.landing-foot { position: relative; z-index: 1; padding: 20px clamp(16px, 5vw, 64px); border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-mute); background: var(--bg-deep); }
.g-icon { width: 20px; height: 20px; background: var(--ink); border-radius: 50%; padding: 3px; }

/* ---------- Motion ---------- */
@keyframes art-spin { to { transform: rotate(360deg); } }
@keyframes art-drift { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes art-pulse { 0%, 100% { opacity: .2; } 45% { opacity: .9; } }
@keyframes art-swing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 9px rgba(255, 138, 61, .10); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-raise) 25%, var(--line-soft) 50%, var(--bg-raise) 75%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; width: min(var(--sidebar), 86vw);
    transform: translateX(-100%); transition: transform .3s ease;
  }
  .nav-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .4); }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(10, 25, 30, .6); }
  .menu-btn { display: inline-grid; margin-left: -8px; }
  .grid-2, .locked-view, .landing-main { grid-template-columns: 1fr; }
  .locked-art { order: -1; }
  .locked-art .art { max-width: 12rem; }
  .hero-art { order: -1; }
  .logo3d { max-width: min(72vw, 19rem); }
}

@media (max-width: 640px) {
  .query, .add-row { grid-template-columns: 1fr; }
  .query-actions { flex-direction: column; }
  .grid-4 { gap: 12px; }
  .stat { padding: 14px 16px; }
  .stat .v { font-size: 1.5rem; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .toasts { left: 16px; right: 16px; }
  .topbar .crumb { display: none; }
}

/* Small utilities */
.strong { color: var(--ink); font-weight: 600; }
.profile-card .spacer { flex: 1; }
.empty .skeleton { width: min(320px, 80%); }
td .profile-card { gap: 12px; flex-wrap: nowrap; }
td .profile-card .id { gap: 0; }
td .tag + .tag { margin-left: 6px; }
.icon-btn.menu-btn { display: none; }
.field > .hint { font-weight: 400; font-size: .8rem; color: var(--ink-mute); }
.tag svg { width: 1.15em; height: 1.15em; }
.locked-copy > .tag { justify-self: start; }
.add-row > .btn { margin-top: 31px; }
.add-row .switch { margin-top: 10px; }

@media (max-width: 960px) {
  .icon-btn.menu-btn { display: inline-grid; }
}
@media (max-width: 640px) {
  .add-row > .btn { margin-top: 0; }
}
td .profile-card .id span { word-break: normal; white-space: nowrap; }

/* Results view toggle and JSON view */
.head-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.seg-btn {
  font: 700 .8rem/1 var(--f-body); color: var(--ink-mute); background: transparent; border: 0;
  padding: .55em 1em; border-radius: 8px; cursor: pointer; transition: background .2s, color .2s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--orange); color: var(--bg-deep); }
.json-view { display: grid; gap: 10px; }
.json-tools { display: flex; justify-content: flex-end; }
.json {
  margin: 0; max-height: 560px; overflow: auto;
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 16px 18px; font: 400 .8rem/1.6 var(--f-mono); color: var(--sky); white-space: pre; tab-size: 2;
}
/* Results table: fixed column proportions (set per query type via <colgroup>), roomy cells.
   Below the min width the table scrolls sideways inside .table-wrap instead of squashing. */
table.results { table-layout: fixed; min-width: 980px; }
table.results th, table.results td { padding: 14px 16px; }
table.results td { overflow-wrap: break-word; vertical-align: top; line-height: 1.5; }
table.results td.mono { overflow-wrap: anywhere; }
table.results td.desc { color: var(--ink-mute); }
.panel > form.add-row { margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.panel-head .head-text { flex: 1 1 360px; min-width: 0; }
td .icon-btn { width: 34px; height: 34px; color: var(--ink-mute); }
td .icon-btn:hover { color: var(--orange); }
td .icon-btn svg { width: 18px; height: 18px; }
