/* ============================================================
   QueryBen — queryben.com
   Design anchor: SSMS panel lineage + editorial documentation
   Fonts: IBM Plex Mono + IBM Plex Sans (not Inter, not DM Sans)
   Palette: warm near-black, cream, amber from icon
   Radius: intentionally non-uniform (not rounded-2xl everywhere)
   Animation: cursor blink only; no translateY scroll reveals
   ============================================================ */

/* ---- CUSTOM PROPERTIES ---- */
:root {
  /* Brand palette anchored on QueryBen icon */
  --bg:             #1A0F08;
  --surface:        #211409;
  --surface-up:     #2B1C10;
  --panel-chrome:   #261810;
  --panel-toolbar:  #2E1E12;
  --panel-border:   #3A2618;

  --border:         rgba(220, 198, 160, 0.09);
  --border-mid:     rgba(220, 198, 160, 0.14);
  --border-subtle:  rgba(220, 198, 160, 0.05);

  --text:           #E0CBA8;
  --text-muted:     #9A8A6E;
  --text-faint:     rgba(220, 198, 160, 0.30);
  --text-very-faint: rgba(220, 198, 160, 0.16);

  --accent:         #C4975A;
  --accent-hover:   #D4A869;
  --accent-dim:     rgba(196, 151, 90, 0.12);

  /* SQL syntax colors */
  --sql-kw:         #C4975A;
  --sql-fn:         #B8A87C;
  --sql-id:         #8FA88A;
  --sql-punct:      rgba(220, 198, 160, 0.45);
  --sql-op:         rgba(220, 198, 160, 0.55);
  --sql-comment:    rgba(220, 198, 160, 0.22);
  --sql-string:     #8A9E87;

  /* Line numbers */
  --linenum:        rgba(220, 198, 160, 0.16);

  /* Typography — IBM Plex system */
  --font-mono: 'IBM Plex Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale */
  --sz-10: 10px;
  --sz-11: 11px;
  --sz-12: 12px;
  --sz-13: 13px;
  --sz-15: 15px;
  --sz-17: 17px;
  --sz-20: 20px;
  --sz-26: 26px;
  --sz-36: 36px;
  --sz-48: 48px;

  /* Spacing — 4px grid */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Radius — non-uniform */
  --r-none: 0;
  --r-xs:   2px;
  --r-sm:   4px;
  --r-md:   5px;
  --r-lg:   8px;
  --r-xl:   12px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:   110ms;
  --t-normal: 220ms;
}

/* ---- RESET ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--sz-15);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul[role="list"] { list-style: none; }

kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  font-weight: 400;
  background: var(--surface-up);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 1px 5px;
  color: var(--text-muted);
  white-space: nowrap;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(26, 15, 8, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 48px;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.nav-logo img {
  border-radius: var(--r-sm);
}

.nav-wordmark {
  font-family: var(--font-mono);
  font-size: var(--sz-13);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  list-style: none;
  flex: 1;
}

.nav-links a {
  font-size: var(--sz-13);
  font-weight: 400;
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
}

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

.btn-nav {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--sz-12);
  font-weight: 400;
  color: var(--bg);
  background: var(--accent);
  padding: 5px 12px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease);
  flex-shrink: 0;
}

.btn-nav:hover { background: var(--accent-hover); }
.btn-nav:active { background: var(--accent); transform: scale(0.98); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: var(--sp-8);
}

/* ============================================================
   APP PANEL — the distinctive move
   A full-bleed rendered application interface.
   Not a screenshot in a floating laptop. The interface itself.
   Looks like SSMS / Azure Data Studio lineage.
   ============================================================ */
.app-panel {
  margin: 0 var(--sp-6) var(--sp-8);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.4),
    0 8px 32px rgba(0,0,0,0.5),
    0 0 0 1px rgba(0,0,0,0.6);
  font-family: var(--font-mono);
  font-size: var(--sz-12);
}

/* Toolbar */
.app-toolbar {
  background: var(--panel-toolbar);
  border-bottom: 1px solid var(--panel-border);
  padding: 0 12px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.toolbar-conn-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-xs);
  padding: 2px 8px;
  font-size: var(--sz-11);
}

.toolbar-conn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5A9B6A;
  flex-shrink: 0;
}

.toolbar-conn-text {
  color: var(--text);
  font-weight: 500;
}

.toolbar-conn-sep {
  color: var(--text-faint);
}

.toolbar-conn-host {
  color: var(--text-muted);
  font-size: var(--sz-11);
}

.toolbar-run-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(196, 151, 90, 0.15);
  border: 1px solid rgba(196, 151, 90, 0.3);
  border-radius: var(--r-xs);
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--accent);
  cursor: default;
}

.toolbar-run-btn kbd {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: var(--sz-10);
  padding: 0;
}

.toolbar-meta {
  font-size: var(--sz-11);
  color: var(--text-faint);
}

/* App body: explorer + main */
.app-body {
  display: flex;
  height: 400px;
}

/* Object Explorer */
.app-explorer {
  width: 196px;
  flex-shrink: 0;
  background: var(--panel-chrome);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.explorer-header {
  font-size: var(--sz-11);
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--panel-border);
  letter-spacing: 0.02em;
  background: var(--panel-toolbar);
}

.explorer-tree {
  flex: 1;
  overflow: hidden;
  padding: 4px 0;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: var(--sz-12);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
}

.tree-item--db { padding-left: 8px; }
.tree-item--group { padding-left: 16px; }
.tree-item--table { padding-left: 28px; }

.tree-item--active {
  background: var(--accent-dim);
  color: var(--text);
}

.tree-label--muted {
  color: var(--text-faint);
}

.tree-icon {
  font-size: 8px;
  color: var(--text-faint);
  flex-shrink: 0;
  width: 8px;
}

.tree-icon--leaf {
  display: inline-block;
  width: 8px;
}

.explorer-divider {
  border-top: 1px solid var(--panel-border);
  margin: 4px 0;
}

/* Main editor area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Editor tabs */
.editor-tabs {
  display: flex;
  background: var(--panel-chrome);
  border-bottom: 1px solid var(--panel-border);
}

.editor-tab {
  padding: 6px 16px;
  font-size: var(--sz-12);
  color: var(--text-muted);
  border-right: 1px solid var(--panel-border);
  cursor: default;
  font-weight: 400;
}

.editor-tab--active {
  background: var(--bg);
  color: var(--text);
  position: relative;
}

.editor-tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--bg);
}

/* Editor with line numbers */
.editor-area {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: var(--bg);
}

.editor-gutter {
  width: 36px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.18);
  border-right: 1px solid var(--border-subtle);
  padding: var(--sp-3) 0;
  display: flex;
  flex-direction: column;
}

.editor-gutter span {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--linenum);
  text-align: right;
  padding: 0 8px;
  line-height: 1.7;
  user-select: none;
}

.editor-code {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--sz-12);
  line-height: 1.7;
}

.code-line {
  white-space: pre;
  display: flex;
  align-items: baseline;
}

.indent2 { display: inline-block; width: 1.5em; }

/* SQL tokens */
.kw     { color: var(--sql-kw); font-weight: 500; }
.fn     { color: var(--sql-fn); }
.id     { color: var(--sql-id); }
.punct  { color: var(--sql-punct); }
.op     { color: var(--sql-op); }

/* Blinking cursor — the only animation on the hero */
.code-line--cursor { position: relative; }

.cursor {
  display: inline-block;
  width: 1px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Results panel */
.results-panel {
  flex-shrink: 0;
  border-top: 1px solid var(--panel-border);
  background: var(--surface);
}

.results-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--panel-chrome);
  border-bottom: 1px solid var(--panel-border);
  padding: 0 12px;
  height: 28px;
}

.results-tab {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--panel-border);
  cursor: default;
}

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

.results-meta-right {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
}

/* Results data grid */
.results-grid {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
}

.rg-header {
  display: grid;
  grid-template-columns: 28px 90px 1fr 90px 110px;
  padding: 4px 12px;
  background: var(--panel-chrome);
  border-bottom: 1px solid var(--panel-border);
  gap: 8px;
}

.rg-th {
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: var(--sz-10);
}

.rg-th--num { text-align: right; }

.rg-row {
  display: grid;
  grid-template-columns: 28px 90px 1fr 90px 110px;
  padding: 4px 12px;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.rg-row--alt {
  background: rgba(220, 198, 160, 0.02);
}

.rg-td { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-td--rownum { color: var(--text-very-faint); text-align: right; }
.rg-td--mono { color: var(--text-faint); }
.rg-td--num { text-align: right; color: var(--text-muted); }

/* Status bar */
.app-statusbar {
  background: var(--panel-toolbar);
  border-top: 1px solid var(--panel-border);
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--sz-11);
}

.status-item {
  color: var(--text-faint);
}

.status-sep {
  width: 1px;
  height: 12px;
  background: var(--panel-border);
  flex-shrink: 0;
}

.status-right {
  margin-left: auto;
  color: var(--text-very-faint);
}

/* ============================================================
   HERO TEXT BLOCK (below the panel)
   Left-aligned — not centered
   ============================================================ */
.hero-text {
  padding: var(--sp-10) var(--sp-6) var(--sp-20);
}

.hero-text-inner {
  max-width: 640px;
  /* Intentionally NOT centered — left-aligned, offset from panel */
  margin-left: max(var(--sp-6), calc((100vw - 1100px) / 2));
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--sp-4);
}

.eyebrow-mono {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.eyebrow-sep {
  color: var(--text-very-faint);
  font-size: var(--sz-11);
}

.hero-headline {
  font-family: var(--font-sans);
  font-size: clamp(var(--sz-26), 4.2vw, var(--sz-48));
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #F0E4C8;
  margin-bottom: var(--sp-5);
  text-wrap: balance;
}

.hero-sub {
  font-size: var(--sz-17);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: var(--sp-8);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

/* Primary button: cream on dark, square-ish corners */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-size: var(--sz-13);
  font-weight: 500;
  color: #1A0F08;
  background: #D4B88A;
  padding: 9px 20px;
  border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #DEC898;
}

.btn-primary:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

/* Secondary button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--sz-13);
  font-weight: 400;
  color: var(--text-muted);
  border: 1px solid var(--border-mid);
  padding: 9px 16px;
  border-radius: var(--r-md);
  transition:
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: rgba(220, 198, 160, 0.22);
}

.btn-secondary:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

/* Text link */
.btn-text {
  font-size: var(--sz-13);
  color: var(--text-faint);
  text-decoration: underline;
  text-decoration-color: rgba(220, 198, 160, 0.18);
  transition: color var(--t-fast) var(--ease);
}

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

/* OS detection strip */
.os-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: var(--sp-3) var(--sp-4);
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  max-width: 540px;
}

.os-strip-text {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-muted);
}

.os-alts {
  font-size: var(--sz-11);
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
}

.os-alts a {
  color: var(--text-faint);
  text-decoration: underline;
  text-decoration-color: rgba(220, 198, 160, 0.15);
  transition: color var(--t-fast) var(--ease);
}

.os-alts a:hover { color: var(--text-muted); }

.os-sep { color: var(--text-very-faint); padding: 0 2px; }

/* ============================================================
   SHARED SECTION STRUCTURE
   ============================================================ */
.section {
  padding: var(--sp-20) 0;
  border-top: 1px solid var(--border-subtle);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  margin-bottom: var(--sp-8);
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

.section-heading {
  font-family: var(--font-sans);
  font-size: clamp(var(--sz-20), 2.8vw, var(--sz-36));
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #F0E4C8;
  text-wrap: balance;
}

.section-sub {
  margin-top: var(--sp-3);
  font-size: var(--sz-15);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 560px;
}

/* ============================================================
   FEATURES — horizontal rows, not three-column cards
   ============================================================ */
.feature-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.feature-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--sp-6) var(--sp-8);
  align-items: start;
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--border-subtle);
}

.feature-row:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.feature-num {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
  padding-top: 4px;
  letter-spacing: 0.04em;
}

.feature-body {
  min-width: 0;
}

.feature-title {
  font-family: var(--font-sans);
  font-size: var(--sz-17);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: var(--sp-3);
}

.feature-desc {
  font-size: var(--sz-15);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

.feature-tag-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  align-items: flex-end;
  flex-shrink: 0;
  padding-top: 3px;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: var(--sz-10);
  color: var(--text-faint);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ============================================================
   COMPARISON — table layout, not cards
   ============================================================ */
.comparison-table {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.ct-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-5);
}

.ct-col-tool,
.ct-col-body {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ct-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--t-normal) var(--ease);
}

.ct-row:last-child { border-bottom: none; }

.ct-row:hover { background: var(--surface); }

.ct-row .ct-col-tool {
  padding: var(--sp-6) var(--sp-5);
  border-right: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ct-tool-name {
  font-size: var(--sz-15);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}

.ct-tool-sub {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 400;
}

.ct-row .ct-col-body {
  padding: var(--sp-6) var(--sp-5);
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: 0;
}

.ct-row .ct-col-body p {
  font-size: var(--sz-15);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   SEO PROSE SECTION
   ============================================================ */
.seo-section .section-inner {
  margin-bottom: 0;
}

.seo-prose {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.seo-prose p {
  font-size: var(--sz-15);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 680px;
}

.seo-prose p + p {
  margin-top: var(--sp-4);
}

/* ============================================================
   DOWNLOAD
   ============================================================ */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  margin-bottom: var(--sp-6);
}

.dl-card {
  background: var(--bg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: background var(--t-normal) var(--ease);
}

.dl-card:hover {
  background: var(--surface);
}

/* Target detected OS card styling (set by detect.js) */
.dl-card--active {
  background: var(--surface);
  border-left: 2px solid var(--accent);
}

.dl-card-top {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--sp-4);
}

.dl-os-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.dl-os-icon {
  width: 22px;
  height: 22px;
  color: var(--text-faint);
  flex-shrink: 0;
}

.dl-os-name {
  font-size: var(--sz-17);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.dl-os-sub {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
}

.dl-card-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.dl-meta-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}

.dl-meta-row--hash {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.dl-meta-key {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 52px;
}

.dl-meta-val {
  font-family: var(--font-mono);
  font-size: var(--sz-11);
  color: var(--text-muted);
  word-break: break-all;
}

.dl-hash {
  font-size: var(--sz-10);
  color: var(--text-faint);
  word-break: break-all;
}

.btn-download {
  display: block;
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--sz-13);
  font-weight: 500;
  color: #1A0F08;
  background: #C9A878;
  padding: 9px var(--sp-4);
  border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease);
}

.btn-download:hover { background: #D4B888; }
.btn-download:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

.dl-note {
  font-size: var(--sz-12);
  font-weight: 300;
  color: var(--text-faint);
  line-height: 1.55;
}

.dl-note code {
  background: var(--surface-up);
  color: var(--text-muted);
  padding: 1px 4px;
  border-radius: var(--r-sm);
  font-size: var(--sz-11);
}

.dl-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-6) 0;
}

.release-link {
  font-size: var(--sz-13);
  color: var(--text-faint);
  text-decoration: underline;
  text-decoration-color: rgba(220, 198, 160, 0.12);
  transition: color var(--t-fast) var(--ease);
}

.release-link:hover { color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--sp-8) var(--sp-6);
  margin-top: var(--sp-20);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--sz-13);
  font-weight: 500;
  color: var(--text-muted);
}

.footer-logo img {
  border-radius: var(--r-sm);
}

.footer-copy {
  font-size: var(--sz-12);
  color: var(--text-faint);
  line-height: 1.5;
}

.footer-copy a {
  color: var(--text-faint);
  text-decoration: underline;
  text-decoration-color: rgba(220, 198, 160, 0.12);
  transition: color var(--t-fast) var(--ease);
}

.footer-copy a:hover { color: var(--text-muted); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  align-items: center;
}

.footer-nav a {
  font-size: var(--sz-12);
  color: var(--text-faint);
  transition: color var(--t-fast) var(--ease);
}

.footer-nav a:hover { color: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .hero-text-inner {
    margin-left: var(--sp-6);
  }

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

@media (max-width: 860px) {
  .feature-row {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
  }

  .feature-tag-col {
    grid-column: 2;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .app-explorer {
    width: 150px;
  }

  .ct-head { display: none; }

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

  .ct-row .ct-col-tool {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--sp-3);
  }
}

@media (max-width: 640px) {
  .app-panel {
    margin-left: var(--sp-3);
    margin-right: var(--sp-3);
  }

  .app-body {
    height: auto;
    flex-direction: column;
  }

  .app-explorer {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
  }

  .explorer-tree {
    display: flex;
    overflow-x: auto;
    height: 36px;
    align-items: center;
    padding: 0;
  }

  .tree-item--db,
  .tree-item--group,
  .tree-item--table {
    padding: 0 10px;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
  }

  .explorer-divider { display: none; }

  .editor-area { height: 180px; }

  .results-grid .rg-header,
  .results-grid .rg-row {
    grid-template-columns: 22px 70px 1fr 60px;
  }

  .rg-td--num:last-child,
  .rg-th--num:last-child {
    display: none;
  }

  .hero-text {
    padding-bottom: var(--sp-12);
  }

  .hero-text-inner {
    margin-left: var(--sp-4);
  }

  .app-toolbar {
    padding: 0 8px;
  }

  .toolbar-conn-host {
    display: none;
  }

  .toolbar-meta {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .section {
    padding: var(--sp-12) 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--sp-4);
  }
}

@media (max-width: 400px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
