/* FreeAgent — restrained editorial. One column, one accent, hairline rules. */

:root {
  --bg:        #111110;
  --surface:   #1a1917;
  --text:      #e7e3d8;
  --muted:     #9a958a;
  --rule:      #2b2925;
  --accent:    #c79a52;
  --accent-2:  #e0b878;
  --code-bg:   #181715;
  --code-tx:   #d4cfbe;
  --ok:        #7da062;

  --serif:     'Source Serif 4', 'Iowan Old Style', Charter, Georgia, serif;
  --sans:      ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure:   680px;
  --frame:     960px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── layout ──────────────────────────────────────────────────────────── */
.wrap {
  max-width: var(--frame);
  margin: 0 auto;
  padding: 0 28px;
}
.wrap.narrow { max-width: var(--measure); }

.section { padding: 64px 0; }
.hero    { padding: 56px 0 64px; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  max-width: var(--frame);
  margin: 0 auto;
}

/* ── masthead ────────────────────────────────────────────────────────── */
.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
}
.masthead .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
}
.brand-mark {
  color: var(--accent);
  font-size: 14px;
  position: relative;
  top: -1px;
}
.masthead nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}
.masthead nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.masthead nav a:hover { color: var(--text); border-bottom-color: var(--rule); }

/* ── typography ──────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}
h1 {
  font-size: clamp(32px, 4.6vw, 46px);
  line-height: 1.12;
  margin: 16px 0 20px;
}
h2 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 18px;
}
h3.subhead {
  font-size: 17px;
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 36px 0 14px;
}
p { margin: 0 0 16px; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}
.lede {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: #d6d2c6;
}
.footnote {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--code-tx);
  background: var(--code-bg);
  border: 1px solid var(--rule);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── snippets ────────────────────────────────────────────────────────── */
.snippet {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px 16px;
  margin: 14px 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--code-tx);
}
.snippet code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}
.snippet.block code { white-space: pre; }
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy:hover { color: var(--text); border-color: var(--accent); }
.copy.copied { color: var(--ok); border-color: var(--ok); }

/* ── tabs ─────────────────────────────────────────────────────────────── */
.install-quick { margin: 28px 0 12px; }
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin: 0 0 0;
}
.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  margin-bottom: -1px;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tabs-pair { margin: 8px 0 24px; }
.tabs-pair > div[data-panel] { margin-top: 14px; }

/* ── tables ──────────────────────────────────────────────────────────── */
table.models, table.cmd {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 8px;
  font-size: 15px;
}
table.models th, table.models td,
table.cmd td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.models th {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}
table.models td:first-child { font-weight: 500; width: 22%; white-space: nowrap; }
table.models td:nth-child(2) { width: 38%; }
table.cmd td:first-child { width: 38%; white-space: nowrap; }
table.cmd td:last-child { color: var(--muted); }

/* ── footer ──────────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--rule);
  padding: 28px 0 56px;
  color: var(--muted);
  font-size: 14px;
}
.foot p { margin: 0; }

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 48px 0; }
  .masthead nav a:not([href*="github"]) { display: none; }
  table.models, table.cmd { font-size: 14px; }
  table.models td, table.cmd td { padding: 8px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
