/* ─── Design System ──────────────────────────────────────────────────────── */
:root {
  --bg:           #F5F0E8;
  --surface:      #EDE8DC;
  --text:         #1A1A1A;
  --text-muted:   #5C5448;
  --accent:       #A35200;
  --accent-muted: #E8D5C0;
  --border:       #C8C0B0;
  --code-bg:      #1A1A1A;
  --code-text:    #F5F0E8;
  --max-width:    1000px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

/* ─── Skip link (keyboard accessibility) ────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

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

/* ─── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; opacity: 0.6; }
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 600px) {
  .page { padding: 0 16px; }
  .cta-row { gap: 12px; }
  .cta-row .btn { width: 100%; text-align: center; }
  .step-section.primary { padding: 24px 20px; }
  .setup-hero h1 { font-size: 1.625rem; }
  .supported-platforms { font-size: 0.75rem; }
  .supported-platforms .sep { margin: 0 3px; }
  .keygen-row { flex-direction: column; }
  .keygen-row input { min-width: 0; width: 100%; }
  .keygen-row .btn { width: 100%; text-align: center; }
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h3 { font-size: 1rem;    margin-bottom: 0.25rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:visited { color: var(--accent); }
a:hover   { color: var(--text); }

small, .caption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── Rules ──────────────────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-top: 3px solid var(--accent);
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-logo {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  color: var(--text);
}
.site-logo .ai { color: var(--accent); }
.site-logo:hover, .site-logo:visited { color: var(--text); background: none; }

.site-nav { display: flex; gap: 24px; }
.site-nav a {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
}
.site-nav a:hover                  { color: var(--accent); }
.site-nav a:visited                { color: var(--text); }
.site-nav a.active,
.site-nav a[aria-current="page"]   { color: var(--accent); font-weight: 600; }

.nav-search-icon {
  display: flex;
  align-items: center;
  align-self: center;
  opacity: 0.45;
  margin-left: -4px;
  margin-right: 6px;
}
.nav-search-icon svg { display: block; }
.nav-search-icon:hover { opacity: 1; color: var(--accent); }
.nav-search-icon:visited { color: var(--text); }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 60px;
  padding: 20px 0 32px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a         { color: var(--text-muted); }
.site-footer a:visited { color: var(--text-muted); }
.site-footer a:hover   { color: var(--text); }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 22px;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  border-radius: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover         { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn:visited       { color: var(--bg); }
.btn:hover:visited { color: var(--bg); }

.btn-secondary {
  background: transparent;
  color: var(--text);
}
.btn-secondary:hover   { background: var(--accent-muted); color: var(--accent); border-color: var(--accent); }
.btn-secondary:visited { color: var(--text); }

.btn:disabled, .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Code blocks ─────────────────────────────────────────────────────────── */
pre {
  background: var(--code-bg);
  color: var(--code-text);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8125rem;
  padding: 16px 20px;
  overflow-x: auto;
  line-height: 1.5;
}
pre.wrap {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
}

code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.875em;
}
pre code { font-size: inherit; }

.code-block { position: relative; min-width: 0; max-width: 100%; }

.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: 1px solid var(--code-text);
  color: var(--code-text);
  font-size: 0.75rem;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  padding: 3px 8px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}
.code-copy-btn:hover,
.code-copy-btn:focus-visible {
  opacity: 1;
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-weight: 600;
  text-align: left;
  padding: 6px 10px;
  border-bottom: 2px solid var(--accent);
  white-space: nowrap;
  color: var(--text);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:nth-child(even) td { background: var(--surface); }
tr:hover td { background: var(--accent-muted); }
td a:hover { background: none; }

/* ─── Homepage table: truncate long cells ─────────────────────────────────── */
#recent-table td {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#recent-table td:nth-child(2) { max-width: 280px; }   /* Title — a bit wider  */
#recent-table .models-clamp {                          /* Models — 2 lines     */
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
#recent-table td:last-child  { max-width: none; }      /* Pages — never truncate */

/* ─── Responsive table → card layout (mobile) ───────────────────────────── */
@media (max-width: 600px) {
  #recent-table thead { display: none; }
  #recent-table tbody tr {
    display: block;
    border: 1px solid var(--border);
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--surface);
  }
  #recent-table tbody tr:hover { background: var(--accent-muted); }
  #recent-table tbody td {
    display: grid;
    grid-template-columns: 100px 1fr;
    column-gap: 12px;
    align-items: baseline;
    padding: 3px 0;
    border-bottom: none;
    font-size: 0.8125rem;
    background: transparent !important;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  #recent-table tbody td::before {
    content: attr(data-label);
    font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
  }
  #recent-table tbody td:first-child {
    padding-top: 0;
    font-weight: 500;
  }
  #recent-table tbody td:last-child { padding-bottom: 0; }
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

label {
  display: block;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 4px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.9375rem;
  font-family: Georgia, serif;
  color: var(--text);
  outline: none;
}
input[type="text"]:focus,
input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
  outline: none;
}

/* ─── Drop zone ──────────────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-muted);
}
.drop-zone-text     { color: var(--text-muted); font-size: 0.875rem; }
.drop-zone-filename {
  color: var(--accent);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

input[type="file"] { display: none; }

/* ─── Skeleton loading ───────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.skeleton {
  background: var(--surface);
  animation: pulse 1.4s ease-in-out infinite;
  height: 1em;
  border-radius: 2px;
  display: inline-block;
  width: 80%;
}

/* ─── Stats bar ──────────────────────────────────────────────────────────── */
.stats-bar {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.stats-bar .mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: var(--text);
  font-weight: 500;
}

/* ─── CTA row ────────────────────────────────────────────────────────────── */
.cta-row {
  display: flex;
  gap: 16px;
  margin: 32px 0;
  flex-wrap: wrap;
}

/* ─── Section label (small caps) ─────────────────────────────────────────── */
.section-label {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}


/* ─── Inline messages ────────────────────────────────────────────────────── */
.msg-success {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  font-size: 0.9375rem;
}
.msg-error {
  color: #8B1A00;
  font-size: 0.875rem;
  margin-top: 6px;
}

/* ─── Key reveal block ───────────────────────────────────────────────────── */
.key-warning {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ─── Details / summary ──────────────────────────────────────────────────── */
details {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
details:last-of-type { border-bottom: 1px solid var(--border); }

summary {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  transition: color 0.15s;
}
summary:hover { color: var(--accent); }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.125rem;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 1.5em;
  text-align: center;
  transition: color 0.15s;
}
details[open] summary::after { content: '\2212'; }
details[open] summary { color: var(--accent); }
.details-body {
  padding-top: 16px;
  padding-left: 2px;
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
  margin-top: 20px;
  display: flex;
  gap: 24px;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
}
.pagination a          { color: var(--accent); }
.pagination a.disabled { color: var(--border); pointer-events: none; text-decoration: none; }

/* ─── Family tabs (homepage) ─────────────────────────────────────────────── */
.family-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.family-tab {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.family-tab:hover { color: var(--text); }
.family-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.family-tabs-centered {
  justify-content: center;
}

/* Mobile: left-align tabs + fade-right scroll hint */
@media (max-width: 600px) {
  .family-tabs-centered {
    justify-content: flex-start;
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
            mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }
}

/* ─── Filter bar ─────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 120px;
}
.filter-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.filter-bar input,
.filter-bar select { width: 100%; }
.filter-bar select {
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.filter-bar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
  outline: none;
}

.filter-clear {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  align-self: flex-end;
  padding-bottom: 10px;
  white-space: nowrap;
}

/* ─── Receipt (upload success) ───────────────────────────────────────────── */
.receipt {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--surface);
}
.receipt-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin: 8px 0;
  color: var(--accent);
}

/* ─── Monospace numbers ──────────────────────────────────────────────────── */
.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }

/* ─── Hero (home page centered block) ───────────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 0 40px;
}
.hero .stats-bar {
  margin-top: 20px;
  margin-bottom: 0;
  justify-content: center;
}
.hero .cta-row {
  justify-content: center;
}

/* ─── Value prop (home) ──────────────────────────────────────────────────── */
.value-prop {
  font-size: 2.375rem;
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.value-prop-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 0;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Setup page hero ───────────────────────────────────────────────────── */
.setup-hero {
  text-align: center;
  padding: 24px 0 40px;
}
.setup-hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

/* ─── Step indicator (setup page numbered sections) ─────────────────────── */
.step-section { margin-bottom: 48px; }
.step-section.primary {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  overflow: hidden;
}
.step-heading {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
}
.step-title {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.step-body {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ─── Section divider with label ─────────────────────────────────────────── */
.divider-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 48px 0;
  color: var(--text-muted);
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

/* ─── Supported platforms bar ────────────────────────────────────────────── */
.supported-platforms {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  margin-bottom: 0;
}
.supported-platforms .sep {
  color: var(--border);
  margin: 0 6px;
  font-weight: 400;
}

/* ─── Hint text below sections ───────────────────────────────────────────── */
.hint { margin-top: 16px; }

/* ─── Manual setup section ──────────────────────────────────────────────── */
.manual-setup-section {
  border: none;
  border-top: 1px solid var(--border);
  padding: 0;
  margin-top: 48px;
}
.manual-setup-heading {
  font-size: 1.125rem;
  font-weight: 600;
  padding: 20px 0 8px;
  color: var(--text-muted);
  margin: 0;
}
.manual-setup-section > details {
  padding-left: 16px;
}
.manual-setup-section > details > summary {
  font-size: 0.875rem;
}

/* ─── Claude Code plugin install steps ──────────────────────────────────── */
.plugin-steps {
  list-style: none;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.plugin-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.plugin-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--bg);
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}
.plugin-step-body { flex: 1; min-width: 0; }
.plugin-step-body h3 { font-size: 0.9375rem; margin-bottom: 6px; }
.plugin-step-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 0;
}
.plugin-commands { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.keygen-success {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  color: #1a9e45;
  margin-top: 12px;
  margin-bottom: 0;
}
.plugin-done-note {
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 20px;
}
.plugin-done-note p { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0; }
@media (max-width: 600px) {
  .plugin-step { gap: 12px; }
  .plugin-step-num { width: 24px; height: 24px; font-size: 0.75rem; }
}

/* ─── Diagram sections (inline SVG explainer graphics) ─────────────────── */
.diagram-section {
  margin-top: 48px;
  margin-bottom: 48px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.diagram-section .section-label {
  margin-bottom: 16px;
}
.diagram-section img {
  display: block;
  height: auto;
}
.diagram-landscape {
  width: 100%;
  max-width: 100%;
}
.diagram-portrait {
  width: 80%;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile: full-bleed so SVG's internal viewBox padding aligns diagram boxes
   with the page content column (matches catalog card edges visually) */
@media (max-width: 768px) {
  .diagram-section img {
    width: calc(100% + 32px) !important;
    max-width: calc(100% + 32px) !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
  }
}

/* ─── Platform config paths list ─────────────────────────────────────────── */
.config-paths {
  margin: 12px 0;
  padding-left: 20px;
  font-size: 0.875rem;
}
.config-paths li { margin-bottom: 4px; }
.config-paths code { font-size: 0.8125em; }

/* ─── Document detail page ───────────────────────────────────────────────── */
.detail-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.detail-section:last-child { border-bottom: none; }
.detail-section h2 { margin-bottom: 12px; }
.detail-section h3 { margin-top: 20px; margin-bottom: 12px; font-size: 1rem; }

.detail-dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 6px 16px;
  margin: 0;
}
.detail-dl dt {
  color: var(--text-muted);
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
}
.detail-dl dd { margin: 0; }

/* ─── Utility ────────────────────────────────────────────────────────────── */
.accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.empty-state {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 16px;
}

/* Orange inline highlight for values in dark code blocks */
.code-highlight { color: var(--accent); }
.catalog-link { margin-top: 12px; font-size: 0.875rem; }
.compat-note  { margin-top: 16px; margin-bottom: 0; }

/* Spacing utilities */
.mt-sm  { margin-top: 8px; }
.mt-md  { margin-top: 16px; }
.mt-lg  { margin-top: 24px; }

/* ─── Upload file list (pre-submission preview) ──────────────────────────── */
.upload-file-list {
  list-style: none;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.upload-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}
.upload-file-item:last-child { border-bottom: none; }
.upload-file-name {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-file-size { white-space: nowrap; }

/* ─── Upload progress list (post-submission) ─────────────────────────────── */
.upload-progress-list {
  list-style: none;
  border: 1px solid var(--border);
}
.upload-progress-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.upload-progress-item:last-child { border-bottom: none; }
.upload-progress-filename {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8125rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-progress-status {
  white-space: nowrap;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-pending   { color: var(--text-muted); }
.status-uploading { color: var(--text); }
.status-success   { color: #4A7C59; }
.status-error     { color: #8B1A00; }

/* drop-zone summary line (selected file count) */
.drop-zone-summary {
  color: var(--accent);
  font-weight: 500;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
}

/* ─── Platform tabs ─────────────────────────────────────────────────────── */
.platform-tabs {
  margin-top: 20px;
}
.tab-labels {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border);
  border-bottom: none;
}
.tab-btn {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 20px;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.tab-btn:last-child { border-right: none; }
.tab-btn:hover { background: var(--accent-muted); color: var(--text); }
.tab-btn.active {
  background: var(--code-bg);
  color: var(--code-text);
  font-weight: 600;
}
.tab-panel { display: none; padding-top: 0; }
.tab-panel.active { display: block; }

/* ─── Inline keygen form ─────────────────────────────────────────────────── */
.keygen-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}
.keygen-row input {
  flex: 1;
  min-width: 180px;
}
.keygen-row .btn {
  white-space: nowrap;
}

/* ─── Admin grid ────────────────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.admin-card {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--surface);
}
.admin-card h2 { margin-bottom: 8px; }
.admin-card p  { font-size: 0.875rem; color: var(--text-muted); }
.admin-card .btn { margin-top: 12px; }

/* ─── Quarantine dashboard ──────────────────────────────────────────────── */
.q-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .q-layout { grid-template-columns: 1fr; }
}

/* Sidebar list */
.q-list {
  border: 1px solid var(--border);
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}
.q-list-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.q-list-item:last-child { border-bottom: none; }
.q-list-item:hover { background: var(--accent-muted); }
.q-list-item.selected { background: var(--accent-muted); border-left: 3px solid var(--accent); }
.q-list-title {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.q-list-reason {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.q-list-date {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Detail panel */
.q-detail {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 24px;
  min-height: 300px;
}
.q-detail-empty {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding-top: 80px;
}

/* Action bar */
.q-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.q-actions .btn { font-size: 0.8125rem; padding: 7px 16px; }
.btn-danger {
  background: #8B1A00;
  border-color: #8B1A00;
  color: var(--bg);
}
.btn-danger:hover { background: #6B1400; border-color: #6B1400; }
.btn-danger:visited { color: var(--bg); }

/* Tabs (reusing existing tab-btn/tab-panel pattern) */
.q-tabs { margin-bottom: 16px; }

/* Metadata comparison table */
.q-meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.q-meta-table th {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-bottom: 2px solid var(--accent);
}
.q-meta-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.q-meta-table tr:nth-child(even) td { background: var(--bg); }
.q-meta-field {
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
}

/* Confidence badges */
.conf-high   { color: #4A7C59; font-weight: 600; }
.conf-medium { color: #A37800; font-weight: 600; }
.conf-low    { color: #8B1A00; font-weight: 600; }

/* Page viewer */
.q-page-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
}
.q-page-nav .btn { font-size: 0.75rem; padding: 4px 12px; }
.q-page-text {
  background: var(--code-bg);
  color: var(--code-text);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  padding: 16px 20px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  max-height: 60vh;
  overflow-y: auto;
  line-height: 1.5;
}

/* Enrichment history */
.q-enrich-table { font-size: 0.8125rem; }
.q-enrich-table td { font-size: 0.8125rem; }

/* Inline edit form */
.q-edit-form { margin-top: 16px; }
.q-edit-form .form-group { margin-bottom: 12px; }
.q-edit-form label { font-size: 0.75rem; color: var(--text-muted); }
.q-edit-form input[type="text"] { font-size: 0.8125rem; padding: 6px 8px; }

/* Auth bar */
.q-auth {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 24px;
  max-width: 600px;
}
.q-auth input { flex: 1; font-size: 0.8125rem; }
.q-auth .btn { font-size: 0.8125rem; white-space: nowrap; }

/* Status badge */
.q-status {
  display: inline-block;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border: 1px solid;
}
.q-status-quarantined { color: #8B1A00; border-color: #8B1A00; }
.q-status-pending     { color: var(--text-muted); border-color: var(--border); }
.q-status-live        { color: #4A7C59; border-color: #4A7C59; }
.q-status-failed      { color: #8B1A00; border-color: #8B1A00; }
.q-status-completed   { color: #4A7C59; border-color: #4A7C59; }
.q-status-partial     { color: #A37800; border-color: #A37800; }
