:root {
  --bg: #f7f1e8;
  --surface: #fffaf2;
  --ink: #2b2118;
  --muted: #6b5b4b;
  --accent: #c2562f;
  --accent-2: #e0a03a;
  --border: #ded2c2;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .08);
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 16px;
}

h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }

p {
  margin: 0 0 16px;
  max-width: 70ch;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--surface);
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { left: 16px; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

/* Tool Hero */
.tool-hero {
  padding: 24px 0 48px;
}
.tool-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.tool-header-row h1 {
  margin-bottom: 8px;
}
.tool-subtitle {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}
.tool-engage {
  display: flex;
  align-items: center;
  gap: 8px;
}
.engage-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.engage-btn:hover {
  border-color: var(--ink);
}
.engage-btn[data-gf-liked],
.engage-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.engage-count {
  font-family: var(--font-mono);
  font-size: 14px;
}
.share-msg {
  font-size: 14px;
  color: var(--muted);
}

/* Bands */
.band {
  padding: 64px 0;
}
.band-tinted {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-intro {
  color: var(--muted);
  margin-bottom: 24px;
}

/* Split Guide (Diagram + Numbered Steps) */
.split-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}
.lead-p {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 24px;
}
.diagram-figure {
  margin: 0;
}
.diagram-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.diagram-figure figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.step-item:first-child {
  padding-top: 0;
  border-top: none;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.step-item h3 {
  margin-bottom: 8px;
}
.step-item p {
  margin: 0;
  color: var(--muted);
}

/* Reference Table */
.ref-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ref-table th,
.ref-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.ref-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #efe7db;
  white-space: nowrap;
}
.ref-table tbody tr:last-child td {
  border-bottom: none;
}
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Asymmetric Tips + Spec Sheet */
.asym-tips {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}
.tip-block {
  margin-bottom: 24px;
}
.tip-block:last-child {
  margin-bottom: 0;
}
.tip-block h3 {
  margin-bottom: 8px;
}
.tip-block p {
  color: var(--muted);
  margin: 0;
}
.spec-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.spec-dl {
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  font-size: 14px;
}
.spec-dl dt {
  color: var(--muted);
}
.spec-dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}
.shortcut-list {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shortcut-row kbd {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
}
.spec-footnote {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* FAQ Accordion */
.faq-list {
  max-width: 820px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  margin: 0 0 24px;
  color: var(--muted);
}

/* Inner Doc & Legal Pages */
.doc-page,
.not-found {
  padding: 48px 0 64px;
}
.doc-container {
  max-width: 820px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.doc-lead {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 32px;
}
.legal-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}
.prose h2 {
  margin-top: 32px;
  margin-bottom: 12px;
}
.prose h3 {
  margin-top: 24px;
  margin-bottom: 8px;
}
.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 24px;
  max-width: 70ch;
}
.prose li {
  margin-bottom: 8px;
}
.doc-faq {
  margin-top: 48px;
}
.doc-cta {
  margin-top: 32px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary:hover {
  background: #aa4724;
}
.nf-code {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-note {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.footer-nav a:hover {
  color: var(--accent);
}
.footer-copy {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .split-guide,
  .asym-tips {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 22px;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }
  .site-nav {
    gap: 16px;
  }
  .band {
    padding: 48px 0;
  }
  .tool-engage {
    width: 100%;
  }
  .engage-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}