/* ==========================================================================
   Axial Bowstrings — site design system v1
   Applied to: index.html, articles/*, topic index pages (build, choices,
   diagnose, science). Order/builder-form/delivery-card use the legacy CSS
   and are scheduled for redesign later.
   ========================================================================== */

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

:root {
  --black: #111;
  --gray: #555;
  --gray-light: #999;
  --gray-lighter: #bbb;
  --border: #e2e2e2;
  --bg: #fff;
  --bg-soft: #f7f7f7;
  --max: 1160px;
  --measure: 720px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  width: min(calc(100% - 3rem), var(--max));
  margin-inline: auto;
}

.measure {
  width: min(calc(100% - 3rem), var(--measure));
  margin-inline: auto;
}

/* ── HEADER ─────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 128px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: 112px;
  width: auto;
  display: block;
}

nav.site-nav {
  display: flex;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray);
}

nav.site-nav a:hover { color: var(--black); }

@media (max-width: 640px) {
  .header-inner { height: 100px; }
  .brand img { height: 84px; }
}

@media (max-width: 480px) {
  nav.site-nav { display: none; }
}

/* ── HOMEPAGE HERO ────────────────────────────────── */
.home-hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
}

.home-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 620px;
}

.home-hero p {
  margin-top: 1rem;
  font-size: 1.0625rem;
  color: var(--gray);
  max-width: 480px;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── HOMEPAGE LANES (welcoming orient strip) ─────── */
.lanes {
  padding: 56px 0 8px;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.lane-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: background 0.15s, border-color 0.15s;
}

.lane-card:hover {
  background: var(--bg-soft);
  border-color: var(--gray-lighter);
}

.lane-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-lighter);
  margin-bottom: 0.75rem;
}

.lane-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.lane-body {
  font-size: 0.9375rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.lane-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--black);
}

.lane-card:hover .lane-cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 768px) {
  .lane-grid { grid-template-columns: 1fr; }
  .lanes { padding: 40px 0 0; }
}

/* ── SECTION LABEL ────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-lighter);
  margin-bottom: 1.5rem;
}

/* ── TOPICS GRID (homepage) ───────────────────────── */
.topics {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  background: var(--bg);
  text-align: center;
  transition: background 0.15s;
}

.topic-card:hover { background: var(--bg-soft); }

.topic-card.disabled {
  cursor: not-allowed;
  color: var(--gray-lighter);
}

.topic-card.disabled:hover { background: var(--bg); }

.topic-logo {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
}

.topic-logo.placeholder {
  border: 1.5px solid var(--black);
  border-radius: 4px;
}

.topic-card.disabled .topic-logo.placeholder {
  border-color: var(--gray-lighter);
  color: var(--gray-lighter);
}

.topic-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.topic-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: inherit;
  line-height: 1.3;
}

/* ── ARTICLES GRID (homepage + topic pages) ─────── */
.articles {
  padding: 64px 0 80px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.article-card {
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.article-img {
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.article-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-lighter);
}

.article-card .article-card-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--black);
}

.article-card:hover .article-card-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-card.coming-soon {
  cursor: default;
  color: var(--gray-lighter);
}

.article-card.coming-soon .article-card-title { color: var(--gray-lighter); }
.article-card.coming-soon:hover .article-card-title { text-decoration: none; }

/* ── LIBRARY PAGE ─────────────────────────────────── */
.library {
  padding: 48px 0 80px;
}

.library-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.library-section:last-child {
  border-bottom: none;
}

.library-section-head {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.75rem;
}

.library-topic-logo {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.library-topic-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.library-topic-copy h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.library-topic-copy p {
  font-size: 0.9375rem;
  color: var(--gray);
  line-height: 1.55;
  max-width: 640px;
}

.library-topic-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--black);
  white-space: nowrap;
  padding-top: 0.5rem;
}

.library-topic-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.library-articles {
  list-style: none;
  padding: 0;
  margin: 0 0 0 72px;
  border-top: 1px solid var(--border);
}

.library-item {
  border-bottom: 1px solid var(--border);
}

.library-item:last-child {
  border-bottom: none;
}

.library-item > a,
.library-item > span {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 0.9rem 0.25rem;
  color: var(--black);
}

.library-item > a:hover .library-item-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.library-item-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-lighter);
}

.library-item-title {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--black);
}

.library-item.soon .library-item-title {
  color: var(--gray-light);
  font-weight: 400;
}

.library-soon-pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-lighter);
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .library-section-head {
    grid-template-columns: 44px 1fr;
    gap: 1rem;
  }
  .library-topic-logo { width: 44px; height: 44px; }
  .library-topic-link {
    grid-column: 1 / -1;
    padding-top: 0;
  }
  .library-articles {
    margin-left: 0;
  }
  .library-item > a,
  .library-item > span {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
  }
  .library-item-tag {
    grid-column: 1 / -1;
    margin-bottom: 0.2rem;
  }
}

/* ── TOPIC PAGE HEADER ────────────────────────────── */
.topic-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
}

.topic-header .breadcrumb {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-lighter);
  margin-bottom: 1.25rem;
}

.topic-header .breadcrumb a:hover { color: var(--black); }

.topic-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 720px;
}

.topic-header p {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  color: var(--gray);
  max-width: 620px;
  line-height: 1.6;
}

/* ── ARTICLE PAGE HEADER ──────────────────────────── */
.article-header {
  padding: 64px 0 48px;
}

.article-header .breadcrumb {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-lighter);
  margin-bottom: 1.25rem;
}

.article-header .breadcrumb a:hover { color: var(--black); }

.article-title {
  font-size: clamp(1.875rem, 3.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 720px;
}

.article-deck {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  color: var(--gray);
  max-width: 620px;
  line-height: 1.55;
}

.article-meta {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--gray-lighter);
  letter-spacing: 0.02em;
}

/* ── ARTICLE BODY ─────────────────────────────────── */
.article-body {
  padding-bottom: 96px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--black);
}

.article-body p { margin-bottom: 1.25rem; }

.article-body h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.article-body strong { font-weight: 600; }

.article-body em {
  font-style: italic;
  color: var(--gray);
}

/* Pull-quote / epigraph */
.pullquote {
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--black);
  background: var(--bg-soft);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--black);
}

/* ── SIDE-INSET FIGURES (article body) ────────────── */
/* Default: floats right, sits beside the text, ~42% of measure column */
.figure-side {
  float: right;
  width: 42%;
  margin: 0.35rem 0 1rem 1.75rem;
  clear: right;
}

.figure-side.left {
  float: left;
  margin: 0.35rem 1.75rem 1rem 0;
  clear: left;
}

.figure-side img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  background: #fff;
}

.figure-side figcaption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--gray);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.figure-side figcaption strong {
  color: var(--black);
  font-weight: 600;
  margin-right: 0.35rem;
}

/* ── ARTICLE DETAIL STRIP (bench galleries) ────── */
.article-detail-strip {
  padding: 3rem 0 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}

.article-detail-strip .section-label {
  margin-bottom: 1.5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.detail-item {
  display: block;
  margin: 0;
}

.detail-item img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  background: #fff;
}

.detail-item figcaption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--gray);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.detail-item figcaption strong {
  color: var(--black);
  font-weight: 600;
  margin-right: 0.35rem;
}

@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Mobile: figures drop back into flow, full width, no float */
@media (max-width: 720px) {
  .figure-side,
  .figure-side.left {
    float: none;
    width: 100%;
    margin: 1.75rem 0;
  }
}

/* ── FIX SECTIONS (article body) ──────────────────── */
.fix {
  margin: 2.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.fix h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.fix h3 .fix-number {
  color: var(--gray-lighter);
  font-weight: 500;
  margin-right: 0.5rem;
}

.verdict {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  background: var(--bg-soft);
  border-left: 2px solid var(--gray-lighter);
  color: var(--black);
}

.verdict.pref { border-left-color: var(--black); }
.verdict.warn { border-left-color: #b45400; background: #fdf6ee; }

.verdict-label {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-right: 0.4rem;
}

/* ── SPEC TABLE (in-article reference tables) ───────── */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.spec-table th,
.spec-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.spec-table thead th {
  border-bottom: 2px solid var(--black);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.spec-table tbody tr:last-child td { border-bottom: none; }

/* ── FOOTER ───────────────────────────────────────── */
/* ORDER CTA PLACEHOLDER (homepage + topic pages) */
.order-cta {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 56px 0;
}

.order-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
}

.order-cta h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.order-cta p {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.55;
  max-width: 560px;
}

.order-cta .order-cta-status {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--gray-lighter);
  color: var(--gray);
  background: #fff;
}

.order-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--black);
  background: var(--black);
  color: #fff;
  white-space: nowrap;
}

.btn:hover { background: #000; }

.btn.btn-ghost {
  background: #fff;
  color: var(--black);
}

.btn.btn-ghost:hover { background: var(--bg-soft); }

.btn.btn-disabled {
  background: #fff;
  color: var(--gray-lighter);
  border-color: var(--border);
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .order-cta-inner {
    grid-template-columns: 1fr;
  }
  .order-cta-actions {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 0.8125rem;
  color: var(--gray);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
  .article-body { font-size: 1rem; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
}
