@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-page: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-subtle: #eef1f6;
  --bg-hover: #f7f9fc;
  --bg-input: #ffffff;
  --border-hairline: rgba(15, 23, 42, 0.085);
  --border-strong: rgba(15, 23, 42, 0.16);

  --text-primary: #0f172a;
  --text-secondary: #435066;
  --text-muted: #5b687d;
  --text-on-accent: #ffffff;

  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: rgba(29, 78, 216, 0.09);

  --claimed: #047857;
  --claimed-bg: rgba(4, 120, 87, 0.09);
  --claimed-border: rgba(4, 120, 87, 0.22);

  --waf: #b45309;
  --waf-bg: rgba(180, 83, 9, 0.09);

  --danger: #be123c;
  --danger-hover: #9f1239;
  --danger-bg: rgba(190, 18, 60, 0.08);
  --danger-border: rgba(190, 18, 60, 0.22);

  --shadow-surface: 0 10px 28px -12px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-control: 0 1px 2px rgba(15, 23, 42, 0.05);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark {
  --bg-page: #0b0d12;
  --bg-surface: #12161f;
  --bg-subtle: #191f2b;
  --bg-hover: #171d29;
  --bg-input: #0e121a;
  --border-hairline: rgba(199, 210, 234, 0.10);
  --border-strong: rgba(199, 210, 234, 0.20);

  --text-primary: #f1f5f9;
  --text-secondary: #a3b1c6;
  --text-muted: #8494ad;
  --text-on-accent: #ffffff;

  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.15);

  --claimed: #34d399;
  --claimed-bg: rgba(52, 211, 153, 0.12);
  --claimed-border: rgba(52, 211, 153, 0.26);

  --waf: #fbbf24;
  --waf-bg: rgba(251, 191, 36, 0.12);

  --danger: #fb7185;
  --danger-hover: #f43f5e;
  --danger-bg: rgba(251, 113, 133, 0.12);
  --danger-border: rgba(251, 113, 133, 0.26);

  --shadow-surface: 0 14px 34px -12px rgba(0, 0, 0, 0.52), 0 2px 8px -2px rgba(0, 0, 0, 0.36);
  --shadow-control: 0 1px 2px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background-color: var(--accent-soft);
  color: var(--text-primary);
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
}

html.dark {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg-page);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Focus visible discipline */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Top Progress Hairline */
.top-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}

.top-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  opacity: 0;
  transition: width 240ms var(--ease-out-expo), opacity 220ms var(--ease-out-expo);
}

.top-progress-bar.is-active {
  opacity: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hairline);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--text-primary);
  color: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.header-divider {
  width: 1px;
  height: 14px;
  background: var(--border-strong);
  flex-shrink: 0;
}

.engine-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--claimed);
  flex-shrink: 0;
}

.status-dot.is-scanning {
  background: var(--accent);
  animation: pulse-dot 1.2s var(--ease-out-expo) infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-control);
  transition: background-color 180ms var(--ease-out-expo), color 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo);
}

.ghost-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.ghost-btn[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.icon-svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Main Workspace */
.workspace {
  flex: 1;
  padding: 36px 0 64px;
}

.hero-block {
  margin-bottom: 22px;
}

.page-title {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  text-wrap: balance;
}

.page-lead {
  margin: 0;
  max-width: 66ch;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.page-lead code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* Search Console */
.console-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-surface);
  padding: 16px;
  margin-bottom: 18px;
}

.search-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.input-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0 12px;
  height: 46px;
  transition: border-color 180ms var(--ease-out-expo), box-shadow 180ms var(--ease-out-expo);
}

.input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.at-prefix {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.username-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  caret-color: var(--accent);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  height: 100%;
  padding: 0;
}

.username-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 400;
}

.username-input:focus {
  outline: none;
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  border-radius: 5px;
  padding: 1px 6px;
  user-select: none;
}

.clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.clear-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms var(--ease-out-expo), transform 140ms var(--ease-out-expo);
}

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

.primary-btn:active {
  transform: scale(0.985);
}

.primary-btn.is-stop {
  background: var(--danger);
}

.primary-btn.is-stop:hover {
  background: var(--danger-hover);
}

/* Controls Row */
.controls-bar {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

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

.segmented {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: 8px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out-expo), color 160ms var(--ease-out-expo);
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.is-active {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-control);
}

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.select-compact {
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.samples-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.sample-chip {
  border: 1px solid var(--border-hairline);
  background: var(--bg-page);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 160ms var(--ease-out-expo), color 160ms var(--ease-out-expo), background-color 160ms var(--ease-out-expo);
}

.sample-chip:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Alert Banner */
.alert-banner {
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Drawer Panels (API & Sites Directory) */
.drawer-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-surface);
  padding: 18px;
  margin-bottom: 18px;
}

.drawer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.drawer-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.code-block {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: 9px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
  margin: 8px 0 0;
}

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

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

.api-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.sites-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.site-dir-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-page);
  font-size: 12.5px;
  text-decoration: none;
  transition: border-color 150ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo);
}

.site-dir-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.site-dir-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Telemetry Strip */
.telemetry-strip {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-control);
}

.telemetry-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 9px;
}

.telemetry-headline {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.telemetry-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.metric-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.metric-claimed strong {
  color: var(--claimed);
}

.metric-waf strong {
  color: var(--waf);
}

.progress-rail {
  height: 5px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 220ms var(--ease-out-expo);
}

/* Ledger Workbench */
.ledger-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-surface);
  overflow: hidden;
}

.ledger-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out-expo), color 160ms var(--ease-out-expo);
}

.tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tab-btn.is-active {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-hairline);
  font-weight: 600;
}

.tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out-expo), color 160ms var(--ease-out-expo), border-color 160ms var(--ease-out-expo);
}

.mini-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.mini-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ledger-subbar {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-hairline);
  background: color-mix(in srgb, var(--bg-subtle) 45%, var(--bg-surface));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.subfilter-input-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
}

.subfilter-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 12.5px;
}

.subfilter-input::placeholder {
  color: var(--text-muted);
}

.subfilter-input:focus {
  outline: none;
}

/* Results Grid (2-column compact ledger on desktop, 1-column on mobile) */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hairline);
  transition: background-color 160ms var(--ease-out-expo);
  animation: row-enter 260ms var(--ease-out-expo) both;
}

.result-row:nth-child(odd) {
  border-right: 1px solid var(--border-hairline);
}

.result-row:hover {
  background: var(--bg-hover);
}

@keyframes row-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.row-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.site-monogram {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  user-select: none;
}

.row-text {
  min-width: 0;
  flex: 1;
}

.row-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.site-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  flex-shrink: 0;
}

.status-pill.is-claimed {
  background: var(--claimed-bg);
  color: var(--claimed);
}

.status-pill.is-available {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.status-pill.is-waf {
  background: var(--waf-bg);
  color: var(--waf);
}

.status-pill.is-unknown {
  background: var(--danger-bg);
  color: var(--danger);
}

.profile-url {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.profile-url:hover {
  color: var(--accent);
  text-decoration: underline;
}

.profile-url mark {
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
}

.row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.latency-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 2px;
}

.row-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo);
}

.row-icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Empty & Initial States */
.empty-state {
  padding: 56px 24px;
  text-align: center;
}

.empty-icon-box {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 11px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-desc {
  margin: 0 auto;
  max-width: 48ch;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 70;
  background: var(--text-primary);
  color: var(--bg-surface);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 9px;
  box-shadow: var(--shadow-surface);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 200ms var(--ease-out-expo), transform 200ms var(--ease-out-expo);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  padding: 18px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

[hidden] {
  display: none !important;
}

/* Mobile Responsive Collapse (< 768px) */
@media (max-width: 767px) {
  .container {
    padding: 0 16px;
  }

  .workspace {
    padding: 24px 0 44px;
  }

  .header-divider,
  .kbd-hint {
    display: none;
  }

  .engine-status {
    display: none;
  }

  .search-form {
    flex-direction: column;
  }

  .primary-btn {
    width: 100%;
  }

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

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

  .result-row:nth-child(odd) {
    border-right: 0;
  }

  .ghost-btn span.btn-label-hide-sm {
    display: none;
  }
}
