@import url("./colors_and_type.css");

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

/* ── Page shell ── */
body {
  min-height: 100vh;
  padding: var(--space-10) var(--gutter) var(--space-12);
}

.wrapper {
  max-width: 720px;
  margin: 0 auto;
}

/* ── Header ── */
.site-header {
  margin-bottom: var(--space-9);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.site-header .brand-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.site-header .brand-row img {
  height: 18px;
  width: auto;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--fg-muted);
  margin-bottom: var(--space-3);
}

.breadcrumb a {
  color: var(--stellar-astral-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--stellar-astral);
  text-decoration: underline;
}

.site-header h1 {
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
}

.site-header .subtitle,
.site-header .meta {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  color: var(--fg-muted);
}

/* ── Section labels ── */
.section-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-brand);
  margin-bottom: var(--space-5);
}

/* ── Entry list (index) ── */
.entries {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.entry {
  border-top: 1px solid var(--border);
}

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

.entry a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-3);
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-2);
  transition: background var(--dur-2) var(--ease-standard);
}

.entry a:hover {
  background: var(--stellar-char-10);
}

.entry a:focus-visible {
  outline: 2px solid var(--stellar-astral-light);
  outline-offset: 2px;
}

.entry-body {
  flex: 1;
  min-width: 0;
}

.entry-title {
  display: block;
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--fg);
  margin-bottom: var(--space-1);
}

.entry a:hover .entry-title {
  color: var(--stellar-astral);
}

.entry-desc {
  display: block;
  font-size: var(--fs-small);
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-date {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Doc sections ── */
section {
  margin-top: var(--space-8);
}

section h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-brand);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-5);
}

.prose p {
  margin-bottom: var(--space-4);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ── Steps ── */
ol.steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

ol.steps > li {
  counter-increment: step;
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

ol.steps > li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--stellar-ignition);
  color: var(--stellar-paper);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

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

.step-body p {
  margin-bottom: var(--space-2);
}

.step-body p:last-child {
  margin-bottom: 0;
}

/* ── Code ── */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-warm);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
}

.copy-label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--space-1);
  margin-top: var(--space-3);
}

.copy-block {
  margin: var(--space-2) 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-3);
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--stellar-astral);
  word-break: break-all;
}

/* ── Callouts ── */
.callout {
  border-radius: var(--radius-3);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0;
  font-size: var(--fs-small);
  border: 1px solid var(--border);
}

.callout-warn {
  background: var(--stellar-ignition-50);
  border-color: var(--stellar-ignition-400);
}

.callout-note {
  background: var(--bg-warm);
}

.callout strong {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--fs-micro);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-brand);
}

/* ── Lists ── */
ul.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

ul.checklist li {
  padding-left: var(--space-5);
  position: relative;
}

ul.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--stellar-ignition);
  border-radius: 1px;
  transform: rotate(45deg);
}

ul.bullets {
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ── Options table ── */
.options-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  margin-top: var(--space-3);
}

.options-table th,
.options-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.options-table th {
  font-weight: 700;
  color: var(--fg-muted);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.options-table td:first-child {
  font-family: var(--font-mono);
  color: var(--stellar-astral);
  white-space: nowrap;
}

/* ── Footer ── */
.site-footer {
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-small);
  color: var(--fg-muted);
}

.site-footer a {
  color: var(--stellar-astral-light);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  body {
    padding-top: var(--space-8);
  }

  .entry a {
    flex-direction: column;
    gap: var(--space-2);
  }

  .entry-desc {
    white-space: normal;
  }

  .entry-date {
    align-self: flex-end;
  }

  ol.steps > li {
    gap: var(--space-3);
  }
}
