/* ============================================================
   digqr v0.04 — exact match to Lovable design
   Fonts: Instrument Sans (body/headlines) + DM Mono (labels/chips/buttons)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=DM+Mono:wght@400;500&display=swap');

/* ── Design tokens ── */
:root {
  --radius: 0.75rem;
  --paper:          oklch(0.977 0.008 84);
  --ink:            oklch(0.21 0.024 258);
  --ink-soft:       oklch(0.48 0.018 258);
  --surface:        oklch(1 0 0);
  --surface-2:      oklch(0.955 0.011 84);
  --signal:         oklch(0.652 0.221 37.5);
  --signal-soft:    oklch(0.93 0.05 60);
  --border:         oklch(0.895 0.012 84);
  --primary-fg:     oklch(0.99 0.005 84);
  --shadow-lift:    0 1px 2px oklch(0.21 0.024 258/.05), 0 12px 32px -18px oklch(0.21 0.024 258/.35);
  --shadow-float:   0 2px 4px oklch(0.21 0.024 258/.04), 0 24px 60px -28px oklch(0.21 0.024 258/.42);
  --rail-w:         4rem;
  --font-sans:      'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono:      'DM Mono', ui-monospace, monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); background: var(--paper); color: var(--ink); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
::selection { background: var(--signal); color: var(--primary-fg); }

/* ── Utilities ── */
.label-mono {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lift { box-shadow: var(--shadow-lift); }
.float-card { box-shadow: var(--shadow-float); }

/* ── Dot grid background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  opacity: 0.5;
}

/* ── Layout shell ── */
.shell { display: flex; min-height: 100vh; }
.rail-offset { margin-left: var(--rail-w); }

/* ── Desktop side rail ── */
.side-rail {
  position: fixed;
  inset-y: 0;
  left: 0;
  z-index: 40;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  transition: width 200ms ease;
  overflow: hidden;
}
.side-rail:hover {
  width: 16rem;
}
.side-rail:hover .rail-label { opacity: 1; }
.side-rail:hover .rail-section-title { opacity: 1; }

.rail-top { display: flex; flex-direction: column; gap: 1.5rem; }
.rail-logo {
  padding: 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--signal);
  white-space: nowrap;
}
.rail-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 0.5rem; }
.rail-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  transition: all 0.15s;
  white-space: nowrap;
  width: 100%;
  min-width: 2.5rem;
  height: 2.5rem;
}
.rail-nav-item:hover { background: var(--surface-2); color: var(--ink); }
.rail-nav-item.active { background: var(--surface-2); color: var(--ink); }
.rail-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.rail-label { opacity: 0; transition: opacity 150ms; white-space: nowrap; }

.rail-section {
  padding: 0 1rem;
  overflow: hidden;
}
.rail-section-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  opacity: 0;
  transition: opacity 150ms;
  white-space: nowrap;
}
.rail-history-item {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  padding: 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.rail-history-item:hover { color: var(--ink); }

.rail-bottom { display: flex; flex-direction: column; gap: 0.5rem; padding: 0 0.5rem; }
.rail-upgrade {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--signal);
  padding: 0 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transition: opacity 150ms;
}
.side-rail:hover .rail-upgrade { opacity: 1; }

/* ── Mobile header ── */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250,248,244,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  grid-template-columns: 3rem 1fr 3rem;
  align-items: center;
}
.mobile-header-logo {
  justify-self: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--signal);
}
.mobile-hamburger {
  justify-self: start;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: var(--ink);
  transition: background 0.15s;
}
.mobile-hamburger:hover { background: var(--surface-2); }

/* ── Mobile drawer ── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 50;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed;
  inset-y: 0;
  left: 0;
  width: 18rem;
  background: var(--paper);
  border-right: 1px solid var(--border);
  z-index: 51;
  padding: 1.25rem;
  transform: translateX(-100%);
  transition: transform 300ms ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.drawer.open { transform: translateX(0); }
.drawer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--signal);
}
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  transition: all 0.15s;
}
.drawer-nav-item:hover, .drawer-nav-item.active { background: var(--surface-2); color: var(--ink); }
.drawer-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.drawer-section-title { margin-bottom: 0.5rem; }
.drawer-history-item {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  padding: 0.25rem 0;
  transition: color 0.15s;
}
.drawer-history-item:hover { color: var(--ink); }
.drawer-upgrade {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--signal);
  margin-top: auto;
}

/* ── Hero section ── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.25rem;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  width: 100%;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-logo {
  height: 1.75rem;
  width: auto;
}
.hero-headline {
  margin-top: 2rem;
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--ink-soft);
  max-width: 32rem;
  line-height: 1.6;
}

/* ── Corner tiles ── */
.corner-tile {
  position: absolute;
  pointer-events: none;
  aria-hidden: true;
}
.tile-tr {
  top: 0; right: 0;
  display: none;
}
.tile-br {
  bottom: 200px; right: 0;
  display: none;
}
/* Show on desktop */
@media (min-width: 768px) {
  .tile-tr, .tile-br { display: block; }
}

/* Grid tile (top right) */
.grid-tile {
  display: grid;
  grid-template-columns: repeat(5, 1.5rem);
  grid-template-rows: repeat(8, 1.5rem);
  gap: 3px;
  padding: 8px;
  border-radius: 0.75rem 0 0 0.75rem;
}
.grid-dot {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
}
.grid-dot.filled { background: var(--signal); opacity: 0.7; }
.grid-dot.empty { background: var(--surface-2); }

/* Orbit tile (bottom right) */
.orbit-tile {
  width: 160px;
  height: 160px;
  border-radius: 1rem 0 0 0;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.orbit-svg { opacity: 0.2; }
.orbit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--signal);
  position: absolute;
}

/* ── Search card ── */
.search-wrap {
  margin-top: 2.25rem;
  width: 100%;
  max-width: 46rem;
}
.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 0.5rem;
  box-shadow: var(--shadow-lift);
  transition: box-shadow 0.2s;
}
.search-card:focus-within {
  box-shadow: var(--shadow-float);
}
.search-textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink);
  resize: none;
  padding: 0.5rem 0.5rem 0.25rem;
  min-height: 2.5rem;
  line-height: 1.5;
}
.search-textarea::placeholder { color: var(--ink-soft); opacity: 0.7; }
.search-bottom {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.25rem 0.25rem;
}
.search-chips {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.search-chips::-webkit-scrollbar { display: none; }

/* Mode chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  color: var(--ink-soft);
  background: transparent;
}
.chip:hover { background: var(--surface-2); color: var(--ink); }
.chip.active-signal {
  background: var(--signal);
  color: var(--primary-fg);
}
.chip.active-neutral {
  background: rgba(30,35,46,0.06);
  color: var(--ink);
}
.chip svg { width: 12px; height: 12px; }

/* DIG button */
.dig-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.875rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--signal);
  color: var(--primary-fg);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  flex-shrink: 0;
  transition: filter 0.15s;
  border: none;
  cursor: pointer;
}
.dig-btn:hover { filter: brightness(1.05); }
.dig-btn:active { filter: brightness(0.95); }
.dig-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dig-btn svg { width: 14px; height: 14px; }

/* Meta row under search */
.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}
.mcp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.mcp-pill:hover { border-color: var(--ink-soft); color: var(--ink); }
.mcp-pill svg { width: 12px; height: 12px; }

/* MCP popover */
.mcp-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.25rem;
  box-shadow: var(--shadow-float);
  min-width: 10rem;
  z-index: 100;
}
.mcp-popover.open { display: block; }
.mcp-popover-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink);
  transition: background 0.15s;
}
.mcp-popover-item:hover { background: var(--surface-2); }

.token-counter {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 64rem;
  margin: 0 auto;
  width: 100%;
}
.footer-mono { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft); }

/* ── Loading overlay ── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.loading-overlay.active { display: flex; }
.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--signal);
  border-radius: 0 2px 2px 0;
  animation: dig-bar 1.6s ease-in-out infinite;
}
.loading-label { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.loading-query { font-size: clamp(1.125rem, 3vw, 1.5rem); font-weight: 500; max-width: 36rem; text-align: center; line-height: 1.3; margin-top: 0.25rem; }
.loading-msg {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  min-height: 1.2em;
  animation: fade-in 0.4s ease-out;
}

/* ── Watch modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%;
  max-width: 26rem;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: var(--ink-soft);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--surface-2); }
.modal-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.25rem; }
.modal-sub { font-size: 0.8125rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
.modal-topic {
  background: var(--surface-2);
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.form-group { margin-bottom: 0.75rem; }
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--signal); }
.form-input::placeholder { color: var(--ink-soft); opacity: 0.7; }
.btn-signal {
  width: 100%;
  padding: 0.75rem;
  background: var(--signal);
  color: var(--primary-fg);
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: filter 0.15s;
  margin-top: 0.5rem;
}
.btn-signal:hover { filter: brightness(1.05); }
.btn-signal:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Results / chat page ── */
.results-page { background: var(--paper); min-height: 100vh; }
.results-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.answer-text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink);
}
.answer-text strong { font-weight: 600; }
.answer-text em { font-style: italic; color: var(--ink-soft); }
.answer-text p + p { margin-top: 1rem; }
sup { font-size: 0.7em; color: var(--signal); }

.findings-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.finding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.875rem 1rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.finding-card:hover { border-color: rgba(232,93,38,0.4); }
.finding-body { flex: 1; min-width: 0; }
.finding-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.finding-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}
.finding-takeaway { font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.5; }
.finding-arrow {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink-soft);
  transition: transform 0.15s, color 0.15s;
  margin-top: 0.125rem;
}
.finding-card:hover .finding-arrow { transform: translate(2px,-2px); color: var(--signal); }

/* Connector row */
.connector-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.connector-label { font-size: 0.8125rem; color: var(--ink-soft); }
.connector-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  color: var(--ink);
  background: var(--surface);
  transition: all 0.15s;
}
.connector-btn:hover { background: var(--surface-2); }

/* Mini search bar on results page */
.mini-search-wrap {
  position: sticky;
  top: 0;
  background: rgba(250,248,244,0.9);
  backdrop-filter: blur(8px);
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

/* ── Finds page ── */
.page-inner {
  max-width: 32rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 6rem;
}
.page-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.page-sub { font-size: 0.9375rem; color: var(--ink-soft); margin-bottom: 2.5rem; }
.success-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: center;
}
.success-emoji { font-size: 2.5rem; margin-bottom: 1rem; }
.success-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.success-sub { font-size: 0.875rem; color: var(--ink-soft); }
.btn-quiet {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 1rem;
}
.btn-quiet:hover { background: var(--surface-2); }

/* ── Admin page ── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-rail {
  width: 13rem;
  background: var(--ink);
  color: var(--paper);
  padding: 1.5rem 0;
  position: fixed;
  inset-y: 0;
  left: 0;
  display: flex;
  flex-direction: column;
}
.admin-logo {
  padding: 0 1.25rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--signal);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.75rem;
}
.admin-nav-item {
  display: block;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: rgba(250,248,244,0.6);
  cursor: pointer;
  transition: all 0.15s;
}
.admin-nav-item:hover, .admin-nav-item.active { color: var(--paper); background: rgba(255,255,255,0.05); }
.admin-main { margin-left: 13rem; padding: 2rem; flex: 1; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.25rem; }
.stat-number { font-size: 2rem; font-weight: 700; font-family: var(--font-mono); color: var(--ink); }
.stat-label { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.25rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; padding: 0.5rem 0.75rem; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 0.75rem; border-bottom: 1px solid var(--border); }
.admin-btn { padding: 0.5rem 1rem; background: var(--signal); color: var(--primary-fg); border-radius: 0.5rem; font-size: 0.8125rem; border: none; cursor: pointer; transition: filter 0.15s; }
.admin-btn:hover { filter: brightness(1.05); }
.admin-btn-outline { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 0.5rem; font-size: 0.8125rem; background: transparent; cursor: pointer; transition: all 0.15s; }
.admin-btn-outline:hover { background: var(--surface-2); }
.admin-key-box { font-family: var(--font-mono); font-size: 0.75rem; background: var(--surface-2); padding: 0.75rem; border-radius: 0.625rem; word-break: break-all; margin-top: 0.75rem; display: none; }
.admin-key-box.show { display: block; }

/* ── Keyframes ── */
@keyframes dig-bar {
  0% { width: 0%; left: -20%; }
  50% { width: 40%; }
  100% { width: 0%; left: 120%; }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes dig-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.875rem 1.25rem;
  border-radius: 0.875rem;
  font-size: 0.875rem;
  max-width: 22rem;
  z-index: 999;
  line-height: 1.5;
  animation: fade-in 0.3s ease-out;
}
.toast.error { background: oklch(0.577 0.245 27.325); }

/* ── Responsive ── */
@media (max-width: 767px) {
  .side-rail { display: none; }
  .mobile-header { display: grid; }
  .rail-offset { margin-left: 0; }
  .hero { padding: 2rem 1.25rem; }
  .hero-logo { height: 1.75rem; }
  .admin-rail { display: none; }
  .admin-main { margin-left: 0; }
}
@media (min-width: 768px) {
  .mobile-header { display: none; }
  .hero-logo { height: 2.25rem; }
}
