:root {
  --bg: #121a26;
  --surface: #121a26;
  --surface-2: #172235;
  --surface-3: #1c2a40;
  --border: #29313d;
  --border-strong: #3a4655;
  --text: #ffffff;
  --muted: #a1a1aa;
  --soft: #7d8590;
  --blue: #60a5fa;
  --blue-2: #2563eb;
  --teal: #60a5fa;
  --amber: #01afaf;
  --red: #ef4444;
  --green: #22c55e;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 3px;
  --header-height: 4.5rem;
  --header-bg: #080d16;
  --bg-base: #060910;
  --bg-surface: var(--bg);
  --bg-surface-hover: var(--surface-2);
  --bg-surface-light: var(--surface);
  --border-subtle: var(--border);
  --border-hover: var(--border-strong);
  --border-active: #4b5a6d;
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --text-tertiary: var(--soft);
  --text-muted: var(--muted);
  --accent-main: var(--blue);
  --accent-hover: #93c5fd;
  --shimmer-base: #24272c;
  --shimmer-edge: #24272c;
  --shimmer-highlight: #2b2f35;
}

* {
  box-sizing: border-box;
}

html.vt-auth-checking {
  background: var(--bg);
}

html.vt-auth-checking body {
  visibility: hidden;
}

/*
 * Keep the blocking session phase visually isolated from page-level skeletons.
 * Some dashboard placeholders explicitly restore child visibility, so the
 * stronger descendant rule prevents both loaders from painting together.
 */
html.vt-auth-checking body,
html.vt-auth-checking body * {
  visibility: hidden !important;
}

html.vt-auth-checking::before {
  content: '';
  position: fixed;
  top: calc(50% - 6px);
  left: 50%;
  z-index: 10000;
  width: min(180px, calc(100vw - 48px));
  height: 12px;
  border-radius: 5px;
  background: var(--shimmer-base);
  transform: translateX(-50%);
  clip-path: inset(0 round 5px);
}

html.vt-auth-checking::after {
  content: '';
  position: fixed;
  top: calc(50% - 6px);
  left: calc(50% - 90px);
  z-index: 10001;
  width: min(62px, calc((100vw - 48px) * 0.34));
  height: 12px;
  border-radius: 5px;
  background: linear-gradient(100deg, var(--shimmer-edge) 0%, var(--shimmer-highlight) 48%, var(--shimmer-edge) 100%);
  animation: vt-dashboard-shimmer-slide 1.65s ease-in-out infinite;
  will-change: transform;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  animation: vt-page-fade 140ms ease-out both;
}

@keyframes vt-page-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes vt-content-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vt-menu-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vt-dashboard-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes vt-dashboard-shimmer-slide {
  from {
    transform: translate3d(-115%, 0, 0);
  }

  to {
    transform: translate3d(215%, 0, 0);
  }
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.mono {
  font-family: var(--mono);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--border);
  opacity: 1;
}

#header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  max-height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--border-subtle);
  opacity: 1;
}

#header .container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 0.75rem;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  flex: 0 0 auto;
  max-width: 198px;
  overflow: hidden;
}

#header .logo img {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-logo-img {
  height: 32px !important;
  width: auto !important;
  max-width: 36px !important;
  object-fit: contain;
}

.brand-text-img {
  height: 30px !important;
  width: auto !important;
  max-width: 240px !important;
  object-fit: contain;
  margin-top: 2px;
}

#header .nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

#header .nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

#header .nav-links a:hover {
  color: var(--text-primary);
}

#header .nav-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.menu-toggle {
  display: none !important;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.tool-header-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--border-subtle);
  opacity: 1;
}

header,
.site-header,
#header,
.tool-header-shell {
  background-color: var(--header-bg) !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.tool-header-inner {
  position: relative;
  width: 100%;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.tool-header-brand {
  flex: 0 0 auto;
  width: 198px;
  max-width: 198px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  overflow: hidden;
}

.tool-header-mark {
  flex: 0 0 auto;
  width: auto !important;
  max-width: 36px !important;
  height: 32px !important;
  object-fit: contain;
}

.tool-header-word {
  flex: 0 0 auto;
  width: auto !important;
  max-width: 160px !important;
  height: 19.5px !important;
  margin-top: 2px;
  object-fit: contain;
}

.tool-header-links,
.tool-header-actions {
  display: flex;
  align-items: center;
}

.tool-header-links {
  gap: clamp(1.25rem, 2.2vw, 2.25rem);
  margin-left: auto;
}

.tool-header-actions {
  flex: 0 0 auto;
  gap: 0.75rem;
}

.tool-header-links a,
.tool-header-login {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.tool-header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-light);
  color: var(--text-primary);
  line-height: 1.2;
}

.tool-header-login[hidden] {
  display: none !important;
}

.tool-header-links a:hover,
.tool-header-login:hover {
  color: var(--text-primary);
}

.tool-header-login.is-logout {
  order: 2;
  border-color: var(--border-hover);
  background-color: var(--bg-surface-hover);
}

.tool-header-login.is-logout:hover {
  border-color: var(--border-active);
  background-color: var(--bg-surface-light);
}

.tool-header-links a.active {
  color: var(--text-primary);
}

.tool-header-dashboard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tool-header-dashboard:hover,
.tool-header-dashboard.active {
  border-color: var(--border-active);
  background-color: var(--bg-surface-light);
}

.tool-menu-toggle {
  display: none !important;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.tool-menu-toggle svg {
  display: none;
}

.tool-menu-toggle::before {
  content: '';
  width: 24px;
  height: 24px;
  display: block;
  background:
    linear-gradient(currentColor, currentColor) 4px 5px / 16px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 11px / 16px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 17px / 16px 2px no-repeat;
  border-radius: 2px;
}

.tool-menu-toggle:hover {
  background: var(--bg-surface-hover);
}

.tool-header-mobile-actions {
  display: none;
}

.tool-header-links .workspace-menu-link {
  display: none;
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-word {
  width: 158px;
  height: auto;
  object-fit: contain;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a,
.nav-actions a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-actions a:hover,
.nav-links a.active {
  color: var(--text);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: 52px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(34px, 4.4vw, 50px);
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 20px;
}

p {
  color: var(--muted);
}

.lead {
  max-width: 560px;
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.landing-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 8px;
}

.landing-actions .btn {
  min-height: 36px;
  border-radius: 7px;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--blue-2);
  border-color: #1d4ed8;
}

.btn-primary:hover {
  background: var(--blue);
}

.btn-secondary {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.btn-secondary:hover {
  border-color: var(--blue);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.console-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.console-top {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--soft);
}

.dot.green {
  background: var(--green);
}

.dot.amber {
  background: var(--amber);
}

.dot.red {
  background: var(--red);
}

.console-body {
  padding: 18px;
}

.signal-grid {
  display: grid;
  gap: 12px;
}

.signal-row {
  display: grid;
  grid-template-columns: 92px 1fr 58px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.bar span.blue {
  background: var(--blue);
}

.bar span.amber {
  background: var(--amber);
}

.section {
  padding: 58px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 680px;
  margin-bottom: 24px;
}

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

.info-card,
.module-card,
.panel,
.result-panel,
.auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.info-card {
  padding: 18px;
}

.info-card h3 {
  margin-bottom: 8px;
}

.info-card p {
  margin: 0;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--soft);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.app-shell {
  padding: 28px 0 56px;
}

.app-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 22px;
}

.status-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font: 12px var(--mono);
}

.status-pill.ready {
  color: #b7f7d0;
}

.status-pill.warn {
  color: #01afaf;
}

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

.module-card {
  min-height: 154px;
  padding: 20px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.module-card.active,
.module-card:hover {
  border-color: var(--blue);
  background: var(--surface-2);
}

.module-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: var(--surface-2);
}

.module-icon svg {
  width: 22px;
  height: 22px;
}

.module-card p {
  margin: 8px 0 0;
}

.workspace {
  display: none;
}

.workspace.active {
  display: block;
}

.analysis-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.panel-body {
  padding: 18px;
  display: grid;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  color: var(--text);
  background: #0d0e11;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
}

.textarea {
  min-height: 230px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.dropzone {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: #0d0e11;
  padding: 18px;
  display: grid;
  gap: 12px;
  cursor: pointer;
}

.dropzone:hover {
  border-color: var(--blue);
}

.dropzone input {
  display: none;
}

.drop-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drop-content svg {
  width: 30px;
  height: 30px;
  color: var(--blue);
}

.hint {
  color: var(--soft);
  font-size: 12px;
  font-family: var(--mono);
}

.preview-box {
  display: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #050506;
}

.preview-box.active {
  display: block;
}

.preview-box img {
  width: 100%;
  max-height: 310px;
  object-fit: contain;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.result-panel {
  padding: 18px;
  min-height: 220px;
}

.result-empty {
  color: var(--soft);
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
}

.metric {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.metric:last-child {
  border-bottom: 0;
}

.metric span {
  color: var(--muted);
}

.score-meter {
  height: 9px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin: 12px 0;
}

.score-meter span {
  display: block;
  height: 100%;
  background: var(--green);
}

.score-meter span.risk-medium {
  background: var(--amber);
}

.score-meter span.risk-high {
  background: var(--red);
}

.final-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
}

.final-label.good {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.5);
}

.final-label.bad {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.55);
}

.crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.crop-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
}

.crop-card.active,
.crop-card:hover {
  border-color: var(--teal);
}

.crop-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.crop-card div {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.log-box {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  background: #0d0e11;
  font-family: var(--mono);
  font-size: 12px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 34px;
  padding: 34px 0 64px;
}

.governance-panel { display: grid; gap: 16px; }
.privacy-policy-grid, .model-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.privacy-policy-grid > div, .privacy-request-card, .model-card-public, .model-card-empty, .model-governance-summary { border: 1px solid var(--border); background: var(--surface-2, #15181d); border-radius: 4px; padding: 14px; }
.privacy-policy-grid span, .privacy-request-card span, .model-card-public span { display: block; color: var(--soft); font-size: 12px; }
.privacy-policy-grid strong { display: block; margin-top: 5px; color: var(--text); font-size: 14px; }
.privacy-request-list { display: grid; gap: 10px; }
.privacy-request-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; }
.privacy-request-card p, .privacy-request-card a { grid-column: 1 / -1; margin: 0; }
.privacy-request-card .btn { justify-self: start; }
.governance-message { margin: 0; color: var(--soft); }
.governance-message[data-tone="error"], .governance-error { color: #ff8c8c; }
.governance-message[data-tone="success"] { color: #8fe0ad; }
.model-governance-summary { margin-top: 18px; }
.model-governance-summary p, .model-card-empty p { margin-bottom: 0; }
.model-card-public { display: grid; gap: 10px; }
.model-card-public p, .model-card-public small { margin: 0; }
.model-card-public pre { max-height: 340px; overflow: auto; white-space: pre-wrap; color: var(--soft); }

@media (max-width: 700px) {
  .privacy-policy-grid, .model-card-grid { grid-template-columns: 1fr; }
  .privacy-actions { grid-template-columns: 1fr; }
}

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 8px;
}

.toc a {
  color: var(--muted);
  padding: 8px 10px;
  border-left: 2px solid var(--border);
}

.toc a:hover {
  color: var(--text);
  border-left-color: var(--blue);
}

.doc-content {
  max-width: 820px;
}

.doc-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.doc-section p,
.doc-section li {
  color: var(--muted);
}

.doc-section code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 5px;
  color: var(--text);
}

.code-block {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0d0e11;
  padding: 14px;
}

.auth-wrap {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 42px 0;
}

.auth-card {
  width: min(440px, calc(100% - 32px));
  padding: 24px;
}

.auth-card .brand {
  justify-content: center;
  margin-bottom: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
  background: #0d0e11;
}

.tab-btn {
  border: 0;
  min-height: 36px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--text);
  background: var(--surface-2);
}

.auth-form {
  display: none;
  gap: 14px;
}

.auth-form.active {
  display: grid;
}

@media (max-width: 900px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  h1 {
    font-size: 34px;
  }

  .hero-grid,
  .analysis-layout,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .module-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .app-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .nav {
    width: min(100% - 22px, 1180px);
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .drop-content {
    align-items: flex-start;
  }

  .hero {
    min-height: auto;
    padding: 42px 0 34px;
  }

  .lead {
    font-size: 15px;
  }

  .landing-actions {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .landing-actions .btn {
    min-height: 36px;
    padding: 0 6px;
    font-size: 12px;
  }

  .signal-row {
    grid-template-columns: 76px minmax(0, 1fr) 52px;
    font-size: 12px;
  }
}

/* Focused analysis pages */
.tool-shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.tool-header h1 {
  font-size: 34px;
}

.tool-header p {
  max-width: 650px;
  margin: 10px 0 0;
}

.mini-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.mini-nav a.active,
.mini-nav a:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chat-thread {
  display: grid;
  gap: 16px;
}

.chat-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--teal);
  font-weight: 700;
}

.message-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
}

.message-card p {
  margin: 8px 0 0;
}

.tool-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d0e11;
  padding: 16px;
}

.composer-card {
  border-color: var(--border-strong);
  background: var(--surface);
}

.composer-main {
  display: grid;
  gap: 14px;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.compact-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.compact-controls .select {
  width: auto;
  min-width: 190px;
}

.quiet-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0c0f;
  overflow: hidden;
}

.quiet-details summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 600;
}

.quiet-details[open] summary {
  border-bottom: 1px solid var(--border);
}

.quiet-details .form-grid,
.quiet-details .crop-grid,
.quiet-details .log-box {
  margin: 14px;
}

.result-panel.chat-result {
  min-height: 170px;
  border-radius: 12px;
  background: var(--surface);
}

.tool-hub {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.tool-hub h1 {
  font-size: 34px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.choice-card {
  min-height: 154px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  position: relative;
}

.choice-card:hover {
  border-color: var(--blue);
  background: var(--surface-2);
}

.choice-card p {
  margin: 10px 0 0;
}

.choice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.textarea.composer-textarea {
  min-height: 180px;
  border: 0;
  background: transparent;
  resize: vertical;
  padding: 4px;
}

.textarea.composer-textarea:focus {
  border-color: transparent;
}

.dropzone.slim-dropzone {
  border-style: solid;
  background: transparent;
}

.preview-box.soft-preview img {
  max-height: 240px;
}

@media (max-width: 820px) {
  .tool-header {
    flex-direction: column;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .chat-message {
    grid-template-columns: 1fr;
  }

  .avatar {
    display: none;
  }

  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-controls,
  .compact-controls .select,
  .composer-actions .btn {
    width: 100%;
  }
}

.choice-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--soft);
  font-size: 12px;
}

.choice-footer strong {
  color: var(--text);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.panel-title h2 {
  font-size: 18px;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 12px;
}

.tool-hub {
  width: min(1160px, calc(100% - 32px));
  padding: 24px 0 30px;
  animation: vt-content-enter 220ms ease-out both;
}

.tool-hub h1 {
  font-size: clamp(24px, 3.1vw, 32px);
}

.tool-hub .lead {
  max-width: 620px;
  margin: 8px 0 14px;
  font-size: 14px;
}

.choice-grid {
  gap: 14px;
}

.choice-card {
  min-height: 148px;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 14px 14px 56px;
  background: #101216;
  animation: vt-content-enter 240ms ease-out both;
}

.choice-card:nth-child(2) {
  animation-delay: 45ms;
}

.choice-card:hover {
  background: #12161d;
}

.choice-card h2 {
  font-size: 18px;
}

.choice-card p {
  margin-top: 6px;
  font-size: 13px;
}

.choice-card .module-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.choice-card .module-icon svg {
  width: 18px;
  height: 18px;
}

.choice-action {
  margin-left: auto;
  min-width: 68px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  background: var(--bg-surface-hover);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.choice-card:hover .choice-action {
  border-color: var(--border-active);
  background: var(--bg-surface-light);
}

.status-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.status-dot.pending {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(1, 175, 175, 0.12);
}

.workspace-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(1, 175, 175, 0.26);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 16px;
  background: rgba(1, 175, 175, 0.06);
}

.workspace-banner strong {
  display: block;
  font-size: 13px;
}

.workspace-banner p {
  margin: 2px 0 0;
  color: var(--soft);
  font-size: 12px;
}

.workspace-banner a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--bg-surface-hover);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.dashboard-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(var(--header-height) + 30px) 0 32px;
  animation: vt-content-enter 220ms ease-out both;
}

.dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.dashboard-head h1 {
  font-size: clamp(24px, 2.8vw, 32px);
}

.workspace-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 14px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0b0d11;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.workspace-nav a {
  flex: 1 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 650;
  scroll-snap-align: start;
  white-space: nowrap;
}

.workspace-nav a:hover,
.workspace-nav a.active {
  border-color: var(--border-hover);
  background: #15191f;
  color: var(--text);
}

.workspace-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.workspace-card {
  min-width: 0;
  min-height: 152px;
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 16px;
  background: #101216;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.workspace-card:focus-visible,
.workspace-nav a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.workspace-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: #13161b;
}

.workspace-card span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-card strong { color: var(--text); font-size: 17px; }
.workspace-card p { margin: 0; color: var(--soft); font-size: 12px; line-height: 1.55; }
.workspace-card em { margin-top: auto; color: #bfdbfe; font-size: 12px; font-style: normal; font-weight: 650; }

.dashboard-shell .btn {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 650;
}

.dashboard-shell [hidden] {
  display: none !important;
}

.connection-card,
.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101216;
}

.connection-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
}

.connection-card strong,
.account-preview strong,
.setting-list strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.connection-card p,
.account-preview span,
.setting-list em {
  margin: 3px 0 0;
  color: var(--soft);
  font-size: 12px;
  font-style: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
}

.dashboard-panel {
  min-width: 0;
  padding: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.dashboard-panel .status-pill {
  min-height: 24px;
  padding: 0 8px;
  font-size: 10px;
}

.dashboard-wide {
  grid-column: 1 / -1;
}

.account-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  background: #0b0d11;
}

.account-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(59, 130, 246, 0.42);
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
}

.account-avatar.has-image {
  background-position: center;
  background-size: cover;
  color: transparent;
}

.profile-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.profile-edit-form[hidden] {
  display: none;
}

.profile-edit-form .field {
  display: grid;
  gap: 6px;
}

.profile-edit-form .field:nth-child(3),
.profile-edit-form .button-row {
  grid-column: 1 / -1;
}

.profile-edit-form .field span,
.profile-edit-form .field small {
  color: var(--soft);
  font-size: 11px;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.usage-stat {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #0b0d11;
}

.usage-stat span {
  display: block;
  color: var(--soft);
  font-size: 11px;
}

.usage-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 17px;
}

.dashboard-shimmer {
  display: inline-block;
  position: relative;
  overflow: hidden;
  color: transparent !important;
  border-radius: 5px;
  opacity: 1;
  background: var(--shimmer-base);
  contain: paint;
  isolation: isolate;
  clip-path: inset(0 round 5px);
}

.dashboard-shimmer::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(100deg, var(--shimmer-edge) 0%, var(--shimmer-highlight) 48%, var(--shimmer-edge) 100%);
  animation: vt-dashboard-shimmer-slide 1.65s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
}

.dashboard-shimmer-text {
  width: var(--dashboard-shimmer-width, max-content);
  max-width: 100%;
  height: var(--dashboard-shimmer-height, 0.9em);
  min-height: 10px;
}

.dashboard-head .lead.dashboard-shimmer-text,
.account-preview span.dashboard-shimmer-text {
  display: block;
  width: min(var(--dashboard-shimmer-width, 100%), 100%);
}

.dashboard-shimmer-number {
  width: var(--dashboard-shimmer-width, 1ch);
  height: var(--dashboard-shimmer-height, 1.2em);
}

/* Shared asynchronous-state skeleton. The site script applies this class only
   while a control or status region is actively loading, preserving its layout. */
.vt-loading-shimmer {
  position: relative !important;
  overflow: hidden !important;
  color: transparent !important;
  border-color: transparent !important;
  text-shadow: none !important;
  background: var(--shimmer-base) !important;
  contain: paint;
  isolation: isolate;
  clip-path: inset(0 round 5px);
}

.vt-loading-shimmer:is(h1, h2, h3, strong, em, span) {
  display: inline-block;
  min-width: 7ch;
  min-height: 0.9em;
}

.vt-loading-shimmer::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(
    100deg,
    var(--shimmer-edge) 0%,
    var(--shimmer-highlight) 48%,
    var(--shimmer-edge) 100%
  );
  animation: vt-dashboard-shimmer-slide 1.65s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
}

.vt-loading-shimmer :is(.spinner, svg) {
  visibility: hidden;
}

.vt-loading-shimmer:is(.result-loading, .loading-state, .gateway-result, .gateway-history-item) > * {
  visibility: hidden;
}

.vt-loading-shimmer:is(.btn, .learning-btn).is-loading::before {
  display: none;
}

.vt-loading-shimmer:is(button, .btn, .learning-btn) {
  cursor: wait;
}

/* Keep the real dashboard geometry in place while session/profile data loads.
   Every visible body element becomes its own same-size skeleton; the global
   header is intentionally excluded. */
.dashboard-is-loading .dashboard-grid :is(h1, h2, p, strong, em, button, a, input, .account-avatar, .status-pill),
.dashboard-is-loading .dashboard-grid span:not(.status-dot) {
  position: relative;
  overflow: hidden;
  color: transparent !important;
  border-color: transparent !important;
  caret-color: transparent;
  text-shadow: none !important;
  background: var(--shimmer-base) !important;
  contain: paint;
  isolation: isolate;
  clip-path: inset(0 round 4px);
}

.dashboard-is-loading .dashboard-grid :is(h1, h2, p, strong, em, button, a, .account-avatar, .status-pill)::after,
.dashboard-is-loading .dashboard-grid span:not(.status-dot)::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(100deg, var(--shimmer-edge) 0%, var(--shimmer-highlight) 48%, var(--shimmer-edge) 100%);
  animation: vt-dashboard-shimmer-slide 1.65s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
}

.dashboard-is-loading .dashboard-grid input {
  background: var(--shimmer-base) !important;
}

.dashboard-is-loading .dashboard-grid * {
  border-color: transparent !important;
  box-shadow: none !important;
}

.dashboard-is-loading .dashboard-grid :is(button, a, input, .account-avatar, .status-pill) {
  border-radius: inherit;
}

.dashboard-is-loading .dashboard-grid input::placeholder {
  color: transparent;
}

.dashboard-is-loading .dashboard-grid :is(svg, .status-dot) {
  visibility: hidden;
}

.dashboard-is-loading .dashboard-grid .billing-meter i,
.dashboard-is-loading .dashboard-grid .billing-meter b {
  position: relative;
  overflow: hidden;
  background: var(--shimmer-base);
  contain: paint;
  isolation: isolate;
  clip-path: inset(0 round 999px);
}

.dashboard-is-loading .dashboard-grid .billing-meter i::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  background: linear-gradient(100deg, var(--shimmer-edge) 0%, var(--shimmer-highlight) 48%, var(--shimmer-edge) 100%);
  animation: vt-dashboard-shimmer-slide 1.65s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
}

.dashboard-skeleton-table .scan-row span.dashboard-shimmer {
  width: 72%;
  height: 12px;
}

.dashboard-skeleton-table .scan-row span.dashboard-shimmer:nth-child(2) {
  width: 58%;
}

.dashboard-skeleton-table .scan-row span.dashboard-shimmer:nth-child(3) {
  width: 46%;
}

.dashboard-skeleton-table .scan-row span.dashboard-shimmer:nth-child(4) {
  width: 64%;
}

.dashboard-skeleton-table .scan-row span.dashboard-shimmer:nth-child(5) { width: 70%; }
.dashboard-skeleton-table .scan-row span.dashboard-shimmer:nth-child(6) { width: 54%; }
.dashboard-skeleton-table .scan-row span.dashboard-shimmer:nth-child(7) { width: 82%; }

.dashboard-skeleton-table .scan-head span.dashboard-shimmer {
  width: 52%;
  height: 10px;
}

.empty-state-table {
  min-height: 138px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  background: #0b0d11;
}

.empty-state-table p {
  max-width: 420px;
  margin: 0;
  color: var(--soft);
  font-size: 12px;
}

.empty-state-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--teal);
}

.empty-state-icon svg {
  width: 20px;
  height: 20px;
}

.scan-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 10px;
}

.scan-filters button,
.scan-actions button {
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 8px;
  background: #0b0d11;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.scan-filters button.active,
.scan-filters button:hover,
.scan-actions button:hover {
  border-color: var(--blue);
  color: var(--text);
  background: #12161d;
}

.risk-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px !important;
  font-weight: 800;
}

.risk-badge-low {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}

.risk-badge-medium {
  color: #01afaf;
  border-color: rgba(1, 175, 175, 0.45);
  background: rgba(1, 175, 175, 0.08);
}

.risk-badge-high {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.52);
  background: rgba(239, 68, 68, 0.08);
}

.risk-badge-critical {
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.72);
  background: rgba(244, 63, 94, 0.14);
}

.scan-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b0d11;
}

.scan-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.05fr) minmax(78px, 0.55fr) minmax(74px, 0.52fr) minmax(82px, 0.58fr) minmax(90px, 0.62fr) minmax(88px, 0.58fr) minmax(230px, 1.28fr);
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.scan-row-rich {
  align-items: center;
}

.scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.scan-actions button {
  flex: 0 0 auto;
}

.scan-detail-row {
  border-bottom: 1px solid var(--border);
  padding: 6px 10px;
  background: #090b0f;
}

.scan-detail-row:last-child {
  border-bottom: 0;
}

.scan-detail-row summary {
  width: fit-content;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.scan-detail-row p {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 12px;
}

.scan-detail-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.scan-detail-signals span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: #101216;
  font-size: 11px;
}

.scan-detail-id {
  font-family: var(--mono);
}

.scan-gateway-signals {
  margin-top: 12px;
}

.scan-gateway-signals h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 12px;
}

.scan-gateway-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scan-gateway-signal {
  min-width: 0;
  padding: 10px;
  border-radius: 2px;
  background: var(--surface-2);
}

.scan-gateway-signal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scan-gateway-signal-head strong {
  color: var(--text);
  font-size: 11px;
}

.scan-gateway-signal-head > span {
  flex: 0 0 auto;
  color: var(--soft);
  font: 600 8.5px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scan-detail-row .scan-gateway-signal > p {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.45;
}

.scan-gateway-signal .scan-detail-signals {
  margin-top: 7px;
}

.scan-gateway-signal .scan-detail-signals span {
  padding: 3px 6px;
  font-size: 9.5px;
}

@media (max-width: 900px) {
  .scan-gateway-signal-grid {
    grid-template-columns: 1fr;
  }
}

.scan-row:last-child {
  border-bottom: 0;
}

.developer-panel {
  align-self: start;
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.developer-panel .panel-title {
  margin-bottom: 0;
}

.developer-panel .panel-title .btn {
  white-space: nowrap;
}

.api-key-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, auto);
  gap: 14px;
  align-items: end;
  margin: 0;
}

.api-key-form .field {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.api-key-form .field span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.api-key-form .input {
  width: 100%;
  min-height: 44px;
  font-size: 15px;
}

.api-key-form .btn {
  min-height: 44px;
  padding-inline: 18px;
  white-space: nowrap;
}

.developer-panel .api-usage-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.developer-panel .usage-stat {
  min-height: 74px;
  display: grid;
  align-content: center;
  padding: 12px;
}

.developer-panel .usage-stat strong {
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.billing-panel {
  display: grid;
  gap: 12px;
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.billing-plan-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.billing-plan-card > div,
.billing-meter {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b0d11;
}

.billing-plan-card > div {
  min-width: 0;
  padding: 10px;
}

.billing-plan-card span,
.billing-meter span {
  display: block;
  color: var(--soft);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.billing-plan-card strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
}

.billing-meter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.billing-meter {
  padding: 10px;
}

.billing-meter > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.billing-meter strong {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.billing-meter i {
  display: block;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.billing-meter b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transition: width 180ms ease;
}

.billing-meter b.is-warning {
  background: linear-gradient(90deg, #01afaf, #facc15);
}

.billing-meter b.is-danger {
  background: linear-gradient(90deg, #ef4444, #fb7185);
}

.api-key-created {
  padding: 0.9rem;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
}

.api-key-created strong,
.api-key-row strong {
  color: var(--text-primary);
}

.api-key-secret {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.65rem;
}

.api-key-secret code {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #bfdbfe;
  background: rgba(0, 0, 0, 0.28);
}

.api-key-list {
  display: grid;
  gap: 10px;
}

.api-key-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(600px, 1.65fr) minmax(86px, auto);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.api-key-row > div {
  min-width: 0;
}

.api-key-row > div:last-child {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.api-key-main {
  display: grid;
  gap: 4px;
}

.api-key-main small {
  color: var(--soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.api-key-meta {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(130px, 0.7fr);
  gap: 8px;
  align-items: stretch;
}

.api-key-meta span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
}

.api-key-meta small {
  overflow: hidden;
  color: var(--soft);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.api-key-meta strong {
  overflow: visible;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.api-key-controls {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.api-key-row em {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: normal;
}

.api-key-row code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #bfdbfe;
  font-size: 0.82rem;
}

.api-key-row .status-pill {
  width: fit-content;
}

.api-key-row .api-key-status {
  min-width: 62px;
  min-height: 24px;
  display: inline-flex;
  justify-content: center;
  padding: 0 9px;
  border-color: rgba(183, 247, 208, 0.2);
  background: rgba(16, 185, 129, 0.08);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.api-key-row .btn {
  min-width: 86px;
  min-height: 34px;
}

.scan-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 0 2px;
}

.scan-pagination p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
}

.scan-pagination .btn {
  min-width: 112px;
}

.legal-footer {
  width: min(calc(100% - 32px), 1180px);
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.55rem;
  row-gap: 0.65rem;
  align-items: center;
  justify-content: center;
  margin: 28px auto 0;
  padding: 1.15rem 16px 1.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.4;
  text-align: center;
}

.legal-footer a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.legal-footer a:hover {
  color: var(--text-primary);
}

.legal-footer span[aria-hidden="true"] {
  color: var(--soft);
  opacity: 0.7;
  line-height: 1;
}

.scan-head {
  color: var(--soft);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.scan-verdict {
  font-weight: 700;
}

.scan-verdict-danger {
  color: #f87171 !important;
}

.scan-verdict-safe {
  color: #4ade80 !important;
}

.scan-verdict-neutral {
  color: var(--muted) !important;
}

.setting-list {
  display: grid;
  gap: 8px;
}

.setting-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.setting-list span:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.docs-layout {
  padding-top: 24px;
  font-size: 14px;
}

.doc-section {
  padding: 20px 0;
}

.doc-section h1 {
  font-size: clamp(24px, 3vw, 32px);
}

.doc-section h2 {
  font-size: clamp(18px, 2.2vw, 23px);
}

.doc-section p,
.doc-section li {
  font-size: 14px;
  line-height: 1.55;
}

.toc a {
  font-size: 13px;
}

.tool-header-shell + .tool-hub {
  padding-top: calc(var(--header-height) + 42px);
}

.tool-header-shell + .docs-layout {
  padding-top: calc(var(--header-height) + 24px);
}

@media (max-width: 1050px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs-layout > *,
  .doc-content,
  .doc-section {
    min-width: 0;
    max-width: 100%;
  }

  #header .nav-links {
    display: none;
  }

  #header .nav-actions {
    display: flex;
  }

  #header .nav-actions .btn-secondary,
  #header .nav-actions .login-link {
    display: none;
  }

  #header .menu-toggle {
    display: block !important;
  }

  .tool-header-links {
    display: none;
  }

  .tool-header-actions {
    display: flex;
    gap: 0.75rem;
  }

  .tool-header-login,
  .tool-header-dashboard {
    display: none;
  }

  .tool-header-actions .tool-header-login.is-logout {
    display: none;
  }

  .tool-menu-toggle {
    display: block !important;
  }

  .tool-header-links.is-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--header-bg) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    animation: vt-menu-drop 180ms ease-out both;
  }

  .tool-header-links.is-open a {
    width: min(240px, 100%);
    padding: 0.12rem 0;
    text-align: center;
  }

  .tool-header-links.is-open .workspace-menu-link {
    display: block;
  }

  .tool-header-links.is-open .workspace-menu-link:first-of-type {
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
  }

  .tool-header-links.is-open .tool-header-mobile-actions {
    display: flex;
    width: min(280px, 100%);
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border-subtle);
  }

  .tool-header-links.is-open .tool-header-mobile-actions a {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-hover);
    border-radius: 6px;
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    font-weight: 600;
  }

  .tool-header-links.is-open .tool-header-mobile-actions a:hover {
    border-color: var(--border-active);
    background: var(--bg-surface-light);
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .tool-hub,
  .choice-card,
  .tool-header-links.is-open,
  .dashboard-shimmer,
  .dashboard-shimmer::after,
  .vt-loading-shimmer::after,
  .dashboard-is-loading .dashboard-shell ::after,
  .dashboard-is-loading .legal-footer ::after,
  html.vt-auth-checking::after {
    animation: none !important;
  }
}

/* Site-wide typography: all visible copy uses a regular, non-bold weight. */
html body,
html body * {
  font-weight: 400 !important;
}

/* Unified page chrome: shared by every public, product, workspace, and legal page. */
.vt-site-header .tool-header-inner {
  max-width: 1240px;
  padding-inline: clamp(16px, 3vw, 28px);
}

.tool-header-brand-group {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-header-brand-group .tool-header-brand {
  width: auto;
  max-width: 198px;
}

.tool-header-context {
  max-width: 150px;
  padding-left: 14px;
  overflow: hidden;
  border-left: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font: 600 0.68rem/1.2 var(--font-mono, var(--mono));
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.vt-site-header .tool-header-links a.active {
  position: relative;
  color: var(--text-primary);
}

.vt-site-header .tool-header-links a.active::after {
  position: absolute;
  right: 0;
  bottom: -12px;
  left: 0;
  height: 2px;
  background: var(--accent-main, var(--teal));
  content: "";
}

.vt-site-footer {
  width: 100%;
  margin: 64px 0 0;
  padding: 42px clamp(20px, 4vw, 48px) 22px;
  border-top: 1px solid var(--border-subtle);
  background: var(--header-bg) !important;
  color: var(--text-secondary);
}

.vt-site-footer-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(0, 2.45fr);
  gap: clamp(36px, 6vw, 86px);
}

.vt-site-footer-brand {
  align-content: start;
  display: grid;
  gap: 16px;
}

.vt-site-footer-brand .tool-header-brand {
  width: min(100%, 198px);
}

.vt-site-footer-brand p {
  max-width: 310px;
  margin: 0;
  color: var(--text-tertiary);
  font-size: 0.86rem;
  line-height: 1.65;
}

.vt-site-footer-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: clamp(20px, 4vw, 44px);
}

.vt-site-footer-groups section {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.vt-site-footer-groups h2 {
  margin: 0 0 5px;
  color: var(--text-primary);
  font: 700 0.68rem/1.2 var(--font-mono, var(--mono));
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.vt-site-footer-groups a {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  line-height: 1.35;
  text-decoration: none;
}

.vt-site-footer-groups a:hover,
.vt-site-footer-groups a:focus-visible {
  color: var(--text-primary);
}

.vt-site-footer-bottom {
  width: min(100%, 1240px);
  margin: 34px auto 0;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.vt-auth-page > .vt-site-header + .auth-layout {
  padding-top: var(--header-height);
}

body[data-page="index"] > .vt-site-footer {
  padding: 42px clamp(20px, 4vw, 48px) 22px;
}

@media (max-width: 980px) {
  .tool-header-context {
    display: none;
  }

  .vt-site-footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .vt-site-header .tool-header-links a.active::after {
    display: none;
  }

  .vt-site-footer {
    margin-top: 44px;
    padding-inline: 18px;
  }

  .vt-site-footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }

  .vt-site-footer-bottom {
    flex-direction: column;
    gap: 7px;
  }
}

@media (max-width: 440px) {
  .vt-site-footer-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .tool-header-inner {
    padding: 0 0.75rem;
    gap: 0.75rem;
  }

  .tool-header-brand {
    width: auto;
    max-width: calc(100vw - 188px);
  }

  .tool-header-word {
    max-width: 126px !important;
  }

  .tool-header-dashboard {
    padding: 0.48rem 0.8rem;
  }
}

@media (max-width: 380px) {
  .tool-header-word {
    max-width: 98px !important;
  }

  .tool-header-dashboard {
    padding: 0.45rem 0.7rem;
    font-size: 0.8125rem;
  }

  .tool-menu-toggle {
    padding: 0.45rem;
  }
}

@media (max-width: 560px) {
  .docs-layout {
    width: min(100% - 24px, 1180px);
    gap: 18px;
    padding-top: calc(var(--header-height) + 18px);
    padding-bottom: 36px;
  }

  .toc {
    gap: 5px;
  }

  .toc a {
    padding: 6px 8px;
    font-size: 12px;
  }

  .doc-section {
    padding: 16px 0;
  }

  .doc-section h1 {
    font-size: 24px;
  }

  .doc-section h2 {
    font-size: 18px;
  }

  .doc-section p,
  .doc-section li {
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (max-width: 820px) {
  .dashboard-head,
  .dashboard-grid,
  .workspace-banner {
    grid-template-columns: 1fr;
  }

  .dashboard-head {
    align-items: start;
  }

  .dashboard-head .btn {
    width: fit-content;
  }

  .workspace-banner {
    align-items: start;
  }

  .usage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scan-table:not(.dashboard-skeleton-table) {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .scan-table:not(.dashboard-skeleton-table) .scan-head {
    display: none;
  }

  .scan-row-rich {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: #0b0d11;
  }

  .scan-row-rich > span[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--soft);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .scan-row-rich .scan-actions::before {
    flex: 0 0 100%;
  }

  .scan-detail-row {
    margin: -4px 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
  }

  .dashboard-shell {
    width: min(100% - 24px, 1160px);
    padding-top: calc(var(--header-height) + 34px);
  }

  .developer-panel .api-usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-plan-card,
  .billing-meter-grid {
    grid-template-columns: 1fr;
  }

  .billing-actions {
    justify-content: flex-start;
  }

  .api-key-form,
  .api-key-row {
    grid-template-columns: 1fr;
  }

  .api-key-form .btn {
    width: 100%;
  }

  .api-key-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .api-key-row > div:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    justify-items: stretch;
    align-items: center;
  }

  .profile-edit-form {
    grid-template-columns: 1fr;
  }

  .profile-edit-form .field:nth-child(3),
  .profile-edit-form .button-row {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .dashboard-shell {
    width: min(100% - 22px, 1080px);
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 24px;
  }

  .dashboard-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  .workspace-hub {
    grid-template-columns: 1fr;
  }

  .workspace-card {
    min-height: 138px;
    padding: 14px;
  }

  .workspace-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: hidden;
    width: 100%;
    margin: 0 0 12px;
    padding: 4px;
    border-radius: 8px;
  }

  .workspace-nav a {
    min-width: 0;
    min-height: 32px;
    padding: 0 4px;
    font-size: 10.5px;
  }

  .workspace-nav a[href="account.html"] {
    display: none;
  }

  .dashboard-head .lead {
    margin: 8px 0 0;
    font-size: 13px;
  }

  .dashboard-panel {
    padding: 10px;
  }

  .account-preview,
  .setting-list span {
    align-items: flex-start;
  }

  .button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-shell .btn {
    min-height: 32px;
    padding: 0 10px;
    font-size: 11.5px;
  }

  .usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .usage-stat {
    padding: 8px;
  }

  .usage-stat span {
    font-size: 10px;
  }

  .usage-stat strong {
    font-size: 16px;
  }

  .panel-title {
    gap: 8px;
  }

  .panel-title h2 {
    font-size: 16px;
  }

  .panel-title p {
    font-size: 11px;
  }

  .scan-row-rich {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px;
  }

  .developer-panel {
    gap: 12px;
  }

  .developer-panel .panel-title {
    align-items: stretch;
  }

  .developer-panel .panel-title .btn,
  .billing-actions .btn {
    width: 100%;
  }

  .billing-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .billing-meter > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .developer-panel .api-usage-grid {
    grid-template-columns: 1fr;
  }

  .developer-panel .usage-stat {
    min-height: 64px;
  }

  .api-key-form {
    gap: 10px;
  }

  .api-key-form .input,
  .api-key-form .btn {
    min-height: 40px;
  }

  .api-key-secret {
    align-items: stretch;
    flex-direction: column;
  }

  .api-key-row {
    gap: 10px;
    padding: 12px;
  }

  .api-key-meta {
    grid-template-columns: 1fr;
  }

  .api-key-row > div:last-child {
    display: grid;
    justify-items: stretch;
  }

  .api-key-row .status-pill,
  .api-key-row .btn {
    width: 100%;
  }

  .scan-row .scan-verdict {
    width: fit-content;
  }

  .empty-state-table {
    min-height: 124px;
  }
}

@media (max-width: 420px) {
  .dashboard-head .btn,
  .button-row .btn,
  .button-row a {
    width: 100%;
  }

  .button-row {
    grid-template-columns: 1fr;
  }

  .workspace-card {
    min-height: 132px;
  }

  .scan-actions button {
    flex: 1 1 100%;
  }
}

/* Final shared VeriTrust product system */
body:not(.vt-dashboard-page) {
  background-color: var(--bg-base);
  background-image: radial-gradient(circle at 50% -8%, #10213b 0, #09111f 30rem, #060910 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
}

html.vt-auth-checking,
html.vt-auth-checking::before {
  background: var(--bg-base);
}

h1,
h2,
h3,
h4,
.display {
  font-family: var(--display);
}

header,
.site-header,
#header,
.tool-header-shell {
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: none;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.tool-header-dashboard,
.tool-header-login.is-logout,
.tool-menu-toggle,
.menu-toggle,
.btn,
.choice-action,
.workspace-banner a,
.scan-filters button,
.scan-actions button {
  border: 0;
  border-radius: 2px;
  box-shadow: none;
}

.btn,
.tool-header-dashboard,
.tool-header-login.is-logout,
.choice-action,
.scan-filters button,
.scan-actions button {
  transition: background-color 160ms ease, color 160ms ease;
}

.btn-primary {
  background: var(--blue-2);
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary,
.btn-ghost,
.tool-header-dashboard,
.tool-header-login.is-logout,
.choice-action,
.scan-filters button,
.scan-actions button {
  background: var(--surface-2);
}

.btn-secondary:hover,
.btn-ghost:hover,
.tool-header-dashboard:hover,
.tool-header-login.is-logout:hover,
.choice-action:hover,
.scan-filters button:hover,
.scan-actions button:hover {
  background: var(--surface-3);
}

.console-preview,
.info-card,
.module-card,
.panel,
.result-panel,
.message-card,
.tool-card,
.quiet-details,
.choice-card,
.dashboard-head,
.connection-card,
.dashboard-panel,
.workspace-card,
.scan-table,
.billing-panel,
.developer-panel,
.code-block,
.empty-state-table {
  border: 0;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: none;
}

.module-card:hover,
.module-card.active,
.choice-card:hover,
.workspace-card:hover {
  border: 0;
  background: var(--surface-2);
  box-shadow: none;
  transform: none;
}

.module-icon,
.account-preview,
.usage-stat,
.crop-card,
.billing-plan-card > div,
.billing-meter,
.api-key-created,
.api-key-secret code,
.api-key-row,
.api-key-meta span,
.scan-detail-signals span,
.empty-state-icon {
  border: 0;
  border-radius: 2px;
  background: var(--surface-2);
  box-shadow: none;
}

.input,
.select,
.textarea,
.form-input {
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--surface-2);
  box-shadow: none;
}

.input:focus,
.select:focus,
.textarea:focus,
.form-input:focus {
  border-color: var(--blue);
  background: var(--surface-2);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.22);
  outline: none;
}

.dropzone {
  border: 1px dashed var(--border-strong);
  border-radius: 3px;
  background: var(--surface-2);
  box-shadow: none;
}

.preview-box,
.log-box {
  border: 0;
  border-radius: 3px;
  background: var(--surface-2);
  box-shadow: none;
}

.workspace-banner {
  border: 0;
  border-radius: 3px;
  box-shadow: none;
}

.status-pill,
.risk-badge,
.final-label,
.mini-nav a,
.api-key-row .api-key-status {
  border: 0;
  border-radius: 2px;
  box-shadow: none;
}

.status-dot {
  box-shadow: none;
}

.bar,
.score-meter,
.billing-meter i {
  border-radius: 2px;
}

.doc-section {
  border-bottom: 0;
}

.doc-section code {
  border: 0;
  border-radius: 2px;
  background: var(--surface-2);
}

.code-block {
  background: var(--surface);
}

.dashboard-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  min-height: 160px;
  margin-bottom: 14px;
  padding: clamp(21px, 3vw, 30px);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: none;
}

.dashboard-head::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: -115px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
  filter: blur(44px);
  pointer-events: none;
}

.dashboard-head > div {
  min-width: 0;
  max-width: 760px;
}

.dashboard-head .eyebrow {
  width: fit-content;
  margin-bottom: 9px;
  padding: 4px 8px;
  border: 0;
  border-radius: 2px;
  background: rgba(59, 130, 246, 0.08);
  color: #93c5fd;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.dashboard-head h1 {
  max-width: 720px;
  font-size: clamp(27px, 3.4vw, 35px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.dashboard-head .lead {
  max-width: 720px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: clamp(12.5px, 1.35vw, 14px);
  line-height: 1.58;
}

.dashboard-head > .btn {
  position: relative;
  z-index: 1;
  min-width: 108px;
  min-height: 38px;
  padding-inline: 14px;
  font-size: 12px;
}

.dashboard-shell .btn,
.workspace-nav a {
  border: 0;
  border-radius: 2px;
}

.workspace-nav {
  position: sticky;
  top: calc(var(--header-height) + 10px);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid rgba(83, 101, 126, 0.72);
  border-radius: 3px;
  background: #121a26;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.workspace-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.workspace-nav a:hover {
  border: 0;
  background: var(--surface-2);
}

.workspace-nav a.active {
  border: 0;
  background: rgba(59, 130, 246, 0.08);
  box-shadow: none;
}

.dashboard-panel,
.workspace-card {
  background: var(--surface);
}

.usage-stat,
.account-preview {
  background: var(--surface-2);
}

.dashboard-shimmer {
  background: var(--shimmer-base);
  border-radius: 2px;
  clip-path: inset(0 round 2px);
  animation: vt-dashboard-muted-pulse 2.4s ease-in-out infinite;
}

.dashboard-shimmer::after {
  content: none;
  display: none;
}

.dashboard-loading-state {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 2px;
  background: var(--surface-2);
}

.dashboard-loading-state span {
  display: block;
  width: 72%;
  height: 10px;
  border-radius: 2px;
  background: var(--shimmer-base);
  animation: vt-dashboard-muted-pulse 2.4s ease-in-out infinite;
}

.dashboard-loading-state span:last-child {
  width: 52%;
}

.dashboard-is-loading .dashboard-grid {
  pointer-events: none;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel {
  position: relative;
  min-height: 124px;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel > * {
  visibility: hidden;
}

.dashboard-is-loading .dashboard-grid :is(h1, h2, p, strong, em, button, a, .account-avatar, .status-pill)::after,
.dashboard-is-loading .dashboard-grid span:not(.status-dot)::after,
.dashboard-is-loading .dashboard-grid .billing-meter i::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel::before,
.dashboard-is-loading .dashboard-grid .dashboard-panel::after {
  content: '';
  position: absolute;
  left: clamp(14px, 2vw, 20px);
  display: block;
  border-radius: 2px;
  background: #272b31;
  animation: vt-dashboard-muted-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel::before {
  top: 20px;
  width: min(32%, 180px);
  height: 11px;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel::after {
  top: 48px;
  width: min(68%, calc(100% - 40px));
  height: 48px;
  background: #22262b;
  animation-delay: 180ms;
}

@keyframes vt-dashboard-muted-pulse {
  0%, 100% { opacity: 0.58; }
  50% { opacity: 0.78; }
}

.profile-edit-form,
.legal-footer {
  border-top-color: var(--border-subtle);
}

.tool-header-links.is-open,
#header .nav-links.is-open {
  border-radius: 0;
  background: var(--header-bg) !important;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.tool-header-links.is-open > a,
#header .nav-links.is-open > a {
  border-radius: 2px;
}

.tool-header-links.is-open {
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.75rem clamp(1rem, 4vw, 2rem) 1rem;
  text-align: left;
}

.tool-header-links.is-open > a {
  width: auto;
  min-height: 0;
  display: block;
  padding: 0.75rem;
  text-align: left;
}

.tool-header-links.is-open .tool-header-mobile-actions {
  width: 100%;
  gap: 0.25rem;
}

.tool-header-links.is-open .tool-header-mobile-actions a {
  width: auto;
  min-height: 0;
  display: block;
  padding: 0.75rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
}

.tool-header-links.is-open .tool-header-mobile-actions a:hover {
  border: 0;
  background: var(--surface-2);
  color: var(--text-primary);
}

@media (max-width: 760px) {
  .dashboard-shell,
  .legal-footer {
    width: min(100% - 24px, 1160px);
  }

  .dashboard-head {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }

  .dashboard-head > .btn {
    width: fit-content;
  }

  .workspace-nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .workspace-nav a,
  .workspace-nav a[href="account.html"] {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 94px;
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  .dashboard-head {
    gap: 20px;
    padding: 22px 18px;
    border-radius: 4px;
  }

  .dashboard-head h1 {
    font-size: clamp(26px, 8vw, 31px);
  }

  .dashboard-head .lead {
    font-size: 13px;
    line-height: 1.6;
  }

  .dashboard-head > .btn {
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .dashboard-head > .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-loading-state span,
  .dashboard-is-loading .dashboard-grid .dashboard-panel::before,
  .dashboard-is-loading .dashboard-grid .dashboard-panel::after {
    animation: none;
  }
}

/* Session verification is a distinct blocking phase; data skeletons begin after it. */
html.vt-auth-checking::before {
  top: calc(50% - 30px);
  left: calc(50% - 15px);
  width: 30px;
  height: 30px;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: #60a5fa;
  border-radius: 50%;
  background: transparent;
  transform: none;
  clip-path: none;
  animation: vt-session-spin 0.8s linear infinite;
}

html.vt-auth-checking::after {
  content: 'Verifying session';
  top: calc(50% + 18px);
  left: 50%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #aab4c3;
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: none;
}

@keyframes vt-session-spin {
  to { transform: rotate(360deg); }
}

/* Loading surfaces stay close to their final graphite panels without glare. */
.dashboard-is-loading {
  --shimmer-base: #1c222a;
  --shimmer-edge: #1c222a;
  --shimmer-highlight: #242b34;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel {
  background: rgba(18, 26, 38, 0.9);
  box-shadow: none;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel::before {
  background: #20262e;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel::after {
  background: #1c222a;
}

.dashboard-is-loading .dashboard-loading-state {
  background: rgba(23, 34, 53, 0.68);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  html.vt-auth-checking::before {
    animation-duration: 1.6s;
  }
}

/* Dashboard uses the same subtle moving skeleton language as Learning. */
.dashboard-is-loading {
  --shimmer-base: #20252c;
  --shimmer-edge: #20252c;
  --shimmer-highlight: #282e36;
}

.dashboard-shimmer::after {
  content: '' !important;
  display: block !important;
  background: linear-gradient(100deg, var(--shimmer-edge), var(--shimmer-highlight), var(--shimmer-edge));
  animation: vt-dashboard-shimmer-slide 1.85s ease-in-out infinite !important;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel > * {
  visibility: visible;
}

.dashboard-is-loading .dashboard-grid .dashboard-panel::before,
.dashboard-is-loading .dashboard-grid .dashboard-panel::after {
  content: none !important;
  display: none !important;
}

.dashboard-is-loading .dashboard-grid :is(h1, h2, p, strong, em, button, a, .account-avatar, .status-pill)::after,
.dashboard-is-loading .dashboard-grid span:not(.status-dot)::after,
.dashboard-is-loading .dashboard-grid .billing-meter i::after {
  content: '' !important;
  display: block !important;
  background: linear-gradient(100deg, var(--shimmer-edge), var(--shimmer-highlight), var(--shimmer-edge));
  animation: vt-dashboard-shimmer-slide 1.85s ease-in-out infinite !important;
}

.dashboard-loading-state span {
  position: relative;
  overflow: hidden;
  animation: none;
}

.dashboard-loading-state span::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  background: linear-gradient(100deg, var(--shimmer-edge), var(--shimmer-highlight), var(--shimmer-edge));
  animation: vt-dashboard-shimmer-slide 1.85s ease-in-out infinite;
}

@media (max-width: 680px) {
  html.vt-auth-checking::before {
    top: calc(50% - 28px);
    left: calc(50% - 14px);
    width: 28px;
    height: 28px;
    border-width: 3px;
  }

  html.vt-auth-checking::after {
    top: calc(50% + 14px);
    font-size: 10.5px;
    letter-spacing: 0.06em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-shimmer::after,
  .dashboard-is-loading .dashboard-grid :is(h1, h2, p, strong, em, button, a, .account-avatar, .status-pill)::after,
  .dashboard-is-loading .dashboard-grid span:not(.status-dot)::after,
  .dashboard-is-loading .dashboard-grid .billing-meter i::after,
  .dashboard-loading-state span::after {
    animation: none !important;
  }
}
