/* ============================================================
   QDRO Division — Ruegg & Ruegg
   Design system: "The Ledger"
   Ink #131B17 · Paper #FBFBF8 · Pine #17513F · Brass #A9803B
   Display: Newsreader · Body: Public Sans · Data: IBM Plex Mono
   ============================================================ */

:root {
  --ink: #131b17;
  --paper: #fbfbf8;
  --white: #ffffff;
  --pine: #17513f;
  --pine-deep: #0e3a2c;
  --mist: #e9efeb;
  --brass: #a9803b;
  --slate: #57625c;
  --line: #d9ded9;
  --radius: 6px;
  --max: 1120px;
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pine-deep); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 251, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.45rem; color: var(--ink); letter-spacing: -0.01em;
}
.brand-name em { font-style: italic; color: var(--pine); }
.brand-firm {
  font-family: var(--font-mono);
  font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate); margin-top: 3px;
}
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; }
nav.primary { display: flex; align-items: center; gap: 26px; }
nav.primary a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink);
  text-decoration: none; letter-spacing: 0.01em;
}
nav.primary a:hover { color: var(--pine); }
nav.primary a.active {
  color: var(--pine);
  border-bottom: 2px solid var(--brass);
  padding-bottom: 2px;
}
.btn {
  display: inline-block;
  font-family: var(--font-body); font-weight: 600; font-size: 0.92rem;
  padding: 11px 22px; border-radius: var(--radius);
  text-decoration: none; border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.btn-solid { background: var(--pine); color: var(--white); }
.btn-solid:hover { background: var(--pine-deep); color: var(--white); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--pine); color: var(--pine); }
.btn-light { background: var(--white); color: var(--pine-deep); }
.btn-light:hover { background: var(--mist); color: var(--pine-deep); }

/* ---------- Division rule (signature motif) ---------- */
.division-rule {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 28px;
}
.division-rule .seg-a { height: 1px; background: var(--ink); flex: 0 0 42px; }
.division-rule .tick { width: 1px; height: 14px; background: var(--brass); }
.division-rule .seg-b { height: 1px; background: var(--line); flex: 1; }
.division-rule .label {
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--pine);
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500; font-size: clamp(2.4rem, 5.4vw, 4rem);
  line-height: 1.08; letter-spacing: -0.02em; max-width: 15ch;
}
.hero h1 em { font-style: italic; color: var(--pine); }
.hero .lede {
  margin-top: 22px; max-width: 58ch;
  font-size: 1.14rem; color: var(--slate);
}
.hero-ctas { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Animated split bar */
.split-demo { margin-top: 64px; max-width: 640px; }
.split-bar {
  display: flex; height: 10px; border-radius: 3px; overflow: hidden;
  background: var(--mist);
}
.split-bar .community { background: var(--pine); flex: 0 0 62%; }
.split-bar .separate { background: var(--brass); flex: 1; }
@media (prefers-reduced-motion: no-preference) {
  .split-bar .community { animation: grow 1.1s cubic-bezier(0.22, 1, 0.36, 1) both 0.25s; }
  @keyframes grow { from { flex-basis: 0%; } to { flex-basis: 62%; } }
}
.split-legend {
  display: flex; justify-content: space-between; margin-top: 10px;
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate);
}
.split-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot-pine { background: var(--pine); }
.dot-brass { background: var(--brass); }

/* ---------- Plans strip ---------- */
.plans-strip {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--white);
  padding: 22px 0;
}
.plans-strip .wrap {
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center;
  font-family: var(--font-mono); font-size: 0.74rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate);
}
.plans-strip span::before { content: "· "; color: var(--brass); }
.plans-strip span:first-child::before { content: ""; }

/* ---------- Sections ---------- */
section.block { padding: 84px 0; }
section.block.tint { background: var(--mist); }
section.block.dark { background: var(--pine-deep); color: var(--paper); }
section.block.dark .division-rule .seg-a { background: var(--paper); }
section.block.dark .division-rule .seg-b { background: rgba(251,251,248,0.25); }
section.block.dark .division-rule .label { color: var(--brass); }
section.block.dark h2, section.block.dark h3 { color: var(--paper); }
section.block.dark p { color: rgba(251,251,248,0.82); }

h2.section-title {
  font-family: var(--font-display);
  font-weight: 500; font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.15; letter-spacing: -0.015em; max-width: 24ch;
  margin-bottom: 18px;
}
h2.section-title em { font-style: italic; color: var(--pine); }
section.block.dark h2.section-title em { color: var(--brass); }
.section-intro { max-width: 62ch; color: var(--slate); margin-bottom: 44px; }
section.block.dark .section-intro { color: rgba(251,251,248,0.82); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
}
.tint .card { background: var(--paper); }
.card h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.22rem; line-height: 1.25; margin-bottom: 10px;
}
.card p { font-size: 0.95rem; color: var(--slate); }
.card .card-kicker {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass);
  display: block; margin-bottom: 12px;
}
.card a.more { font-size: 0.9rem; font-weight: 600; display: inline-block; margin-top: 12px; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step {
  border-top: 2px solid var(--pine);
  padding-top: 18px;
}
.dark .step { border-top-color: var(--brass); }
.step::before {
  counter-increment: step;
  content: "Step " counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass);
  display: block; margin-bottom: 10px;
}
.step h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  margin-bottom: 8px;
}
.step p { font-size: 0.93rem; color: var(--slate); }
.dark .step p { color: rgba(251,251,248,0.82); }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 800px; }
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.faq-list summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem;
  padding: 16px 0;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font-family: var(--font-mono); color: var(--brass);
  font-size: 1.1rem; flex-shrink: 0;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list .answer { padding: 0 0 22px; max-width: 68ch; color: var(--slate); font-size: 0.98rem; }
.faq-list .answer p + p { margin-top: 12px; }

/* ---------- Resource lists ---------- */
.resource-group { margin-bottom: 52px; }
.resource-group h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.35rem;
  margin-bottom: 6px;
}
.resource-group .group-note { color: var(--slate); font-size: 0.93rem; margin-bottom: 18px; }
ul.resource-list { list-style: none; }
ul.resource-list li {
  padding: 13px 0; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
}
ul.resource-list li a { font-weight: 600; font-size: 0.98rem; }
ul.resource-list li .desc { color: var(--slate); font-size: 0.9rem; }

/* ---------- Contact / info panels ---------- */
.info-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 32px;
}
.info-panel dl { display: grid; grid-template-columns: 130px 1fr; gap: 12px 20px; }
.info-panel dt {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brass); padding-top: 4px;
}
.info-panel dd { font-size: 1rem; }

/* ---------- Notice ---------- */
.notice {
  border-left: 3px solid var(--brass);
  background: var(--white);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.88rem; color: var(--slate); max-width: 760px;
}
.tint .notice, .dark .notice { background: rgba(255,255,255,0.06); color: rgba(251,251,248,0.75); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.015em;
  max-width: 22ch; margin: 0 auto 16px;
}
.cta-band p { max-width: 52ch; margin: 0 auto 30px; }
.cta-band .hero-ctas { justify-content: center; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--ink); color: rgba(251,251,248,0.75);
  padding: 56px 0 36px; font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 14px; font-weight: 500;
}
.footer-grid a { color: rgba(251,251,248,0.85); text-decoration: none; }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--paper);
  margin-bottom: 10px;
}
.footer-notice { font-size: 0.8rem; line-height: 1.6; color: rgba(251,251,248,0.55); max-width: 60ch; }
.footer-bottom {
  border-top: 1px solid rgba(251,251,248,0.15);
  padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem; color: rgba(251,251,248,0.55);
}

/* ---------- Page header (interior pages) ---------- */
.page-head { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.page-head h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -0.02em; line-height: 1.1;
  max-width: 18ch;
}
.page-head h1 em { font-style: italic; color: var(--pine); }
.page-head .lede { margin-top: 16px; max-width: 60ch; color: var(--slate); font-size: 1.08rem; }

/* ---------- Prose ---------- */
.prose { max-width: 72ch; }
.prose p + p { margin-top: 16px; }
.prose h3 { font-family: var(--font-display); font-size: 1.4rem; margin: 34px 0 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid, .card-grid.two { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 30px 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .card-grid, .card-grid.two, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .info-panel dl { grid-template-columns: 1fr; gap: 2px 0; }
  .info-panel dd { margin-bottom: 14px; }
  .hero { padding: 60px 0 52px; }
  section.block { padding: 60px 0; }

  /* Mobile nav */
  .nav-toggle-label {
    display: block; width: 28px; height: 22px; position: relative;
  }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    content: ""; position: absolute; left: 0; width: 100%; height: 2px;
    background: var(--ink); transition: transform 0.2s ease;
  }
  .nav-toggle-label span { top: 10px; }
  .nav-toggle-label span::before { top: -8px; }
  .nav-toggle-label span::after { top: 8px; }
  nav.primary {
    display: none;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start;
    padding: 20px 24px 26px; gap: 18px;
  }
  .nav-toggle:checked ~ nav.primary { display: flex; }
}

/* ---------- Guides ---------- */
.example-box {
  background: var(--white); border: 1px solid var(--line);
  border-left: 3px solid var(--pine); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px; margin: 26px 0; font-size: 0.95rem;
}
.tint .example-box { background: var(--paper); }
.example-box .ex-title {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brass); display: block; margin-bottom: 10px;
}
.example-box p + p { margin-top: 10px; }
.lang-block {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-left: 3px solid var(--brass); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 28px; margin: 26px 0;
  font-family: var(--font-display); font-size: 1.02rem; line-height: 1.75;
}
.copy-btn {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 7px 12px; cursor: pointer; color: var(--slate);
}
.copy-btn:hover { border-color: var(--pine); color: var(--pine); }
.guide-cta {
  margin-top: 44px; background: var(--mist); border-radius: var(--radius);
  padding: 30px 32px;
}
.guide-cta h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: 8px; }
.guide-cta p { color: var(--slate); font-size: 0.95rem; margin-bottom: 18px; max-width: 60ch; }
.takeaway { font-weight: 700; }

/* ---------- Library ---------- */
.episode {
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.episode h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin-bottom: 6px; }
.episode .ep-desc { color: var(--slate); font-size: 0.95rem; max-width: 70ch; margin-bottom: 14px; }
.episode audio { width: 100%; max-width: 560px; display: block; }
.episode .ep-links { margin-top: 10px; font-size: 0.9rem; }
.ep-topic {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brass); display: block; margin-bottom: 8px;
}

/* ---------- Articles ---------- */
.prose ul, .prose ol { margin: 14px 0 14px 24px; }
.prose ul li, .prose ol li { margin-bottom: 7px; color: var(--slate); font-size: 0.97rem; }
.article-byline {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate); margin-top: 14px;
}
