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

:root {
  --bg:         #0f1117;
  --surface:    #181c27;
  --surface2:   #1e2334;
  --border:     #2a3047;
  --accent:     #d4451a;
  --accent-dim: rgba(212,69,26,0.12);
  --text:       #e8eaf0;
  --text-muted: #8b92a8;
  --text-dim:   #5c6380;
  --code-bg:    #0d1118;
  --tag-deb:    #1a6b3c;
  --tag-deb-fg: #6ee7a0;
  --tag-rpm:    #1a4a7a;
  --tag-rpm-fg: #7ec8ff;
  --radius:     8px;
  /* System font stacks replacing Google Fonts */
  --mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-mark {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  color: #fff;
  letter-spacing: -0.5px;
}

header h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
}

header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Layout ── */
.layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: calc(100vh - 80px);
}

/* ── Sidebar ── */
nav.sidebar {
  border-right: 1px solid var(--border);
  padding: 32px 0;
  position: sticky;
  top: 0;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

nav.sidebar ul { list-style: none; }

.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  padding: 20px 14px 6px;
}

.nav-group-label:first-child { padding-top: 0; }

nav.sidebar a {
  display: block;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav.sidebar a:hover {
  color: var(--text);
  border-left-color: var(--border);
}

/* ── Main content ── */
main {
  padding: 40px 48px;
  min-width: 0;
}

/* ── GPG Keys banner ── */
.gpg-banner {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 48px;
}

.gpg-banner h2 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.gpg-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.gpg-row:last-child { margin-bottom: 0; }

.pkg-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.tag-deb { background: var(--tag-deb); color: var(--tag-deb-fg); }
.tag-rpm { background: var(--tag-rpm); color: var(--tag-rpm-fg); }

.gpg-fp {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

/* ── Version sections ── */
.version-section {
  margin-bottom: 64px;
}

.version-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.version-badge {
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}

.version-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.4px;
}

.version-header .new-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Distro cards ── */
.distro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  min-width: 0;
}

.distro-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.distro-icon {
  width: 28px; height: 28px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.icon-deb { background: var(--tag-deb); }
.icon-rpm { background: var(--tag-rpm); }

.distro-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.distro-header .supported {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* ── FCT / FCTS tabs ── */
.product-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.tab-btn {
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--sans);
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.3px;
}

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

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-note {
  font-size: 11px;
  color: var(--text-dim);
  padding: 10px 20px;
  margin-left: auto;
  align-self: center;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Steps ── */
.steps {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
}

.step-num {
  width: 22px; height: 22px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}

.step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

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

.cmd-wrapper {
  position: relative;
}

.cmd-wrapper:hover .copy-btn { opacity: 1; }

.copy-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  line-height: 1.6;
  letter-spacing: 0.2px;
}

.copy-btn:hover {
  background: var(--border);
  color: var(--text);
}

.copy-btn.copied {
  color: var(--tag-deb-fg);
  border-color: var(--tag-deb);
  opacity: 1;
}

.cmd-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 44px 10px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #c8d3f5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.55;
  min-width: 0;
}

.cmd-block .cmd-comment {
  color: var(--text-dim);
  font-style: italic;
}

/* Single-line scrollable blocks (sources.list content) */
.cmd-block.cmd-scroll {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  overflow-x: auto;
}

/* Highlighted filepath in step labels */
code.filepath {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--tag-deb-fg);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  nav.sidebar { display: none; }
  main { padding: 24px 20px; }
  header { padding: 20px; }
}

/* ── Utility Classes (CSP Fixes) ── */
.badge-new {
  color: var(--accent);
  font-size: 10px;
}

.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}
