/* FOCAL RAYS — shared blog / article styles (tokens mirror focal-rays-tokens.css) */
:root {
  --bg: #F6F1EA;
  --surface: #FBF8F3;
  --border: #E1D6C7;
  --border-ledger: #D9CCBA;
  --border-soft: #E6DCCF;
  --ink: #241A17;
  --ink-title: #1D1714;
  --ink-2: #6D625C;
  --ink-3: #9C9088;
  --ink-feature: #4F4641;
  --amber: #A8823F;
  --amber-hover: #8C6B37;
  --amber-deep: #8A681F;
  --amber-whisper: rgba(168, 130, 63, 0.08);
  --amber-border: rgba(168, 130, 63, 0.28);
  --dark: #11181F;
  --dark-text: #F8F3EC;
  --dark-muted: rgba(248, 243, 236, 0.72);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --nav-height: 64px;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Geist Sans", "Geist", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--amber-deep); text-decoration: underline; text-decoration-color: var(--amber-border); text-underline-offset: 3px; }
a:hover { color: var(--amber-hover); text-decoration-color: currentColor; }

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

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-height);
  background: rgba(246, 241, 234, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-size: 0.875rem; color: var(--ink-2);
  padding: 7px 12px; border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.nav-link:hover { background: var(--border); color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink); background: var(--ink); color: var(--surface);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  text-decoration: none;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.btn:hover { background: var(--amber); border-color: var(--amber); color: var(--surface); }
.btn-large { min-height: 48px; padding: 0 22px; font-size: 0.82rem; }

/* Article layout */
.article-shell {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) 24px 80px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.article-rail { position: sticky; top: calc(var(--nav-height) + 20px); }
.crumbs { font-size: 0.75rem; color: var(--ink-3); margin-bottom: 24px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.rail-label {
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 12px;
}
.toc { display: flex; flex-direction: column; gap: 2px; margin-bottom: 24px; }
.toc a {
  display: block; padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 0.84rem; color: var(--ink-2); text-decoration: none; line-height: 1.35;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.toc a:hover { background: var(--surface); color: var(--ink); }
.rail-cta {
  border: 1px solid var(--border-ledger); background: var(--surface);
  border-radius: var(--radius-md); padding: 16px;
}
.rail-cta p { font-size: 0.84rem; color: var(--ink-2); line-height: 1.5; margin-bottom: 12px; }
.rail-cta .btn { width: 100%; }

.article { min-width: 0; max-width: 720px; }
.article-header { margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--amber-deep);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 16px;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--amber); }
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.05;
  color: var(--ink-title);
}
.lede { margin-top: 18px; color: var(--ink-2); font-size: 1.08rem; line-height: 1.65; }
.byline { margin-top: 18px; font-size: 0.8rem; color: var(--ink-3); }

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600; letter-spacing: -0.01em; line-height: 1.15;
  color: var(--ink-title);
  margin: 48px 0 14px;
  scroll-margin-top: calc(var(--nav-height) + 20px);
}
.article-body h3 { font-size: 1.02rem; font-weight: 650; color: var(--ink); margin: 26px 0 8px; }
.article-body p, .article-body li { color: var(--ink-feature); font-size: 1rem; line-height: 1.75; }
.article-body p + p { margin-top: 14px; }
.article-body ul, .article-body ol { margin: 12px 0 0; padding-left: 1.2rem; display: grid; gap: 8px; }
.article-body li::marker { color: var(--amber); }
.article-body strong { color: var(--ink); font-weight: 650; }

.callout {
  margin: 24px 0; padding: 18px 20px;
  border-left: 3px solid var(--amber);
  background: var(--amber-whisper);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.callout p { color: var(--ink); }

/* Before / after pairs */
.pair { margin: 28px 0; }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair-grid figure { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--border); }
.pair-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pair-tag {
  position: absolute; left: 8px; top: 8px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 3px;
  background: rgba(17, 24, 31, 0.72); color: var(--dark-text);
}
.pair figcaption.pair-caption { margin-top: 10px; font-size: 0.84rem; color: var(--ink-2); line-height: 1.5; }

/* Tables */
.table-wrap { margin: 20px 0; overflow-x: auto; border: 1px solid var(--border-ledger); border-radius: var(--radius-md); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
th { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); background: var(--bg); }
td { color: var(--ink-feature); }
tr:last-child td { border-bottom: 0; }

/* Checklist */
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 7px;
  width: 14px; height: 14px; border: 1.5px solid var(--amber); border-radius: 3px;
}

/* FAQ */
.faq { margin-top: 12px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 14px 28px 14px 0; position: relative;
  font-weight: 600; color: var(--ink); font-size: 0.98rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; color: var(--amber-deep); font-size: 1.2rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; }

/* End CTA */
.end-cta {
  margin-top: 56px; padding: clamp(28px, 5vw, 44px);
  background: var(--dark); color: var(--dark-text);
  border-radius: var(--radius-lg);
}
.end-cta h2 {
  font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 600; line-height: 1.1; color: var(--dark-text); margin: 0 0 10px;
}
.end-cta p { color: var(--dark-muted); margin-bottom: 22px; max-width: 52ch; }
.end-cta .btn { background: #F2C56B; border-color: #F2C56B; color: var(--dark); }
.end-cta .btn:hover { background: #E8B85A; border-color: #E8B85A; }
.end-cta .secondary { margin-left: 16px; color: var(--dark-text); font-size: 0.86rem; }

/* Blog index */
.index-shell { max-width: 880px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) 24px 96px; }
.index-shell h1 {
  font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; color: var(--ink-title);
}
.index-shell .lede { max-width: 56ch; }
.post-list { list-style: none; margin-top: 40px; border-top: 1px solid var(--border); }
.post-card { border-bottom: 1px solid var(--border); }
.post-card a { display: block; padding: 26px 0; text-decoration: none; }
.post-card .meta { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-deep); }
.post-card h2 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1.15; color: var(--ink-title); margin: 6px 0 8px; }
.post-card p { color: var(--ink-2); font-size: 0.95rem; }
.post-card a:hover h2 { color: var(--amber-deep); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 36px 24px 48px; text-align: center; }
.footer-name { font-family: var(--font-display); letter-spacing: 0.18em; font-size: 1.1rem; color: var(--ink); margin-bottom: 14px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 12px; }
.footer-links a, .footer-contact a { font-size: 0.84rem; color: var(--ink-2); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: var(--ink); }
.footer-contact { font-size: 0.84rem; color: var(--ink-3); margin-bottom: 8px; }
.footer-copyright { font-size: 0.78rem; color: var(--ink-3); }

@media (max-width: 860px) {
  .article-shell { grid-template-columns: minmax(0, 1fr); }
  .article-rail { position: static; }
  .crumbs { margin-bottom: 0; }
  .rail-label, .toc, .rail-cta { display: none; }
}
@media (max-width: 560px) {
  .nav-inner { padding: 0 16px; }
  .nav-actions .nav-link { display: none; }
  .brand-mark { font-size: 1.15rem; letter-spacing: 0.14em; white-space: nowrap; }
  .nav .btn { white-space: nowrap; padding: 0 12px; font-size: 0.72rem; }
  .article-shell, .index-shell { padding-left: 16px; padding-right: 16px; }
  .end-cta .secondary { display: block; margin: 14px 0 0; }
}
