:root {
  --ink: #0e1620;
  --ink-soft: #4a5560;
  --ink-faint: #6e7884;
  --paper: #f5efe3;
  --paper-alt: #fbf6ec;
  --paper-deep: #ece4d3;
  --rule: #cdc4b1;
  --rule-soft: #e4ddcc;
  --accent: #8a3a18;
  --accent-hover: #a64a22;
  --accent-soft: #f0d8c8;
  --gold: #b48a2c;
  --shadow-sm: 0 1px 3px rgba(14, 22, 32, 0.06);
  --shadow-md: 0 4px 16px rgba(14, 22, 32, 0.10);
  --shadow-lg: 0 18px 48px rgba(14, 22, 32, 0.16);
  --max: 720px;
  --max-prose: 680px;
  --max-wide: 1120px;
  --transition: all 0.25s ease;
  --serif: "Source Serif 4", "Iowan Old Style", "Charter", "Newsreader", Georgia, "Times New Roman", serif;
  --display: "Source Serif 4", "Iowan Old Style", "Charter", "Cormorant Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --ink: #f1ece1;
  --ink-soft: #b9b2a4;
  --ink-faint: #8a857a;
  --paper: #0d1117;
  --paper-alt: #161d26;
  --paper-deep: #1f2731;
  --rule: #2d3641;
  --rule-soft: #1c232c;
  --accent: #d99662;
  --accent-hover: #f0b27c;
  --accent-soft: #2a1a10;
  --gold: #d8b769;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1ece1;
    --ink-soft: #b9b2a4;
    --ink-faint: #8a857a;
    --paper: #0d1117;
    --paper-alt: #161d26;
    --paper-deep: #1f2731;
    --rule: #2d3641;
    --rule-soft: #1c232c;
    --accent: #d99662;
    --accent-hover: #f0b27c;
    --accent-soft: #2a1a10;
    --gold: #d8b769;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.7);
  }
}

body.high-contrast {
  --ink: #000; --ink-soft: #1a1a1a; --ink-faint: #333;
  --paper: #fff; --paper-alt: #fff; --paper-deep: #f0f0f0;
  --rule: #000; --rule-soft: #888;
  --accent: #6b0000; --accent-hover: #8b0000;
}
body.font-larger { font-size: 21px; }
body.font-largest { font-size: 23px; }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important; scroll-behavior: auto !important;
}
body.highlight-links a {
  outline: 2px solid var(--accent); outline-offset: 2px; text-decoration: underline;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.2s ease, color 0.2s ease;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-prose { max-width: var(--max-prose); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.15s; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.18; color: var(--ink); letter-spacing: -0.012em; margin: 1.6em 0 0.55em; }
h1 { font-size: 2.4rem; margin-top: 0.3em; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: 0.3em; }

blockquote { border-left: 3px solid var(--accent); margin: 1.5em 0; padding: 0.4em 0 0.4em 1.2em; color: var(--ink-soft); font-style: italic; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4rem auto; max-width: 480px; }

::selection { background: var(--accent-soft); color: var(--ink); }

/* ===== Skip + Header + Nav ===== */
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { position: fixed; left: 1rem; top: 1rem; background: var(--ink); color: var(--paper); padding: 0.5rem 0.75rem; z-index: 9999; border-radius: 4px; }

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
  background: var(--paper);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
}
.header-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.18rem; color: var(--ink); text-decoration: none; line-height: 1.1; display: flex; align-items: center; gap: 12px; letter-spacing: -0.01em; }
.brand-mark { color: var(--ink); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; }
.brand-tag { font-family: var(--sans); font-weight: 400; font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.02em; margin-top: 3px; text-transform: uppercase; }
@media (max-width: 480px) { .brand-mark { width: 32px; height: 32px; } }
.primary { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; }
.primary a { color: var(--ink-soft); text-decoration: none; margin-left: 22px; padding: 6px 0; position: relative; transition: color 0.15s; }
.primary a:first-child { margin-left: 0; }
.primary a:hover { color: var(--ink); }
.primary a[aria-current="page"] { color: var(--ink); }
.primary a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--accent);
}

/* ===== Hero (homepage) ===== */
.hero-band {
  position: relative;
  overflow: hidden;
  margin: -32px 0 56px;
  padding: 80px 0 88px;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--rule);
}
.hero-band::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("/assets/img/hero-editorial.webp");
  background-size: cover;
  background-position: center right;
  opacity: 0.18;
  z-index: 0;
}
.hero-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--paper-alt) 30%, transparent 80%);
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }
.hero-eyebrow { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.hero-title { font-family: var(--display); font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 16px; max-width: 720px; }
.hero-lede { font-size: 1.22rem; line-height: 1.55; color: var(--ink-soft); margin: 0 0 28px; max-width: 580px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: var(--transition); letter-spacing: 0.01em;
}
.btn-primary { background: var(--accent); color: #fff; border: 1.5px solid var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--rule); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }

/* ===== Stat strip ===== */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  max-width: var(--max-wide); margin: -48px auto 64px; padding: 0 24px; position: relative; z-index: 3;
}
.stat-cell {
  background: var(--paper-alt); border: 1px solid var(--rule); padding: 22px 24px;
  border-right: 0;
}
.stat-cell:last-child { border-right: 1px solid var(--rule); }
.stat-num { font-family: var(--display); font-size: 1.8rem; font-weight: 600; line-height: 1; color: var(--accent); margin: 0 0 4px; }
.stat-label { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin: 0; }
@media (max-width: 800px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-cell { border-right: 1px solid var(--rule); }
  .stat-cell:nth-child(2n) { border-right: 1px solid var(--rule); }
  .stat-cell:nth-child(odd) { border-right: 0; }
}

/* ===== Section heading treatment ===== */
.section-head { max-width: var(--max-wide); margin: 0 auto 28px; padding: 0 24px; }
.section-eyebrow { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.section-title { font-family: var(--display); font-size: 1.9rem; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.015em; }
.section-sub { font-size: 1.05rem; color: var(--ink-soft); margin: 0; max-width: 640px; }

/* ===== Practice cards ===== */
.practice-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: var(--max-wide); margin: 0 auto 72px; padding: 0 24px;
}
@media (max-width: 860px) { .practice-grid { grid-template-columns: 1fr; } }
.practice-card {
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  padding: 28px 26px;
  position: relative;
  transition: var(--transition);
}
.practice-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.practice-card .card-mark {
  font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: var(--accent);
  margin: 0 0 14px; display: block;
}
.practice-card h3 { margin: 0 0 8px; font-size: 1.25rem; }
.practice-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.55; }

/* ===== Bio block ===== */
.bio-block { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; margin: 32px auto 48px; max-width: var(--max-wide); padding: 0 24px; }
.bio-block picture { display: block; width: 260px; height: 260px; }
.bio-block picture img, .bio-block > img { width: 260px; height: 260px; object-fit: cover; object-position: center 35%; border-radius: 50%; background: var(--paper-deep); border: 4px solid var(--paper-alt); box-shadow: var(--shadow-md); display: block; }
.bio-block .bio-text { padding-top: 8px; }
.bio-block h2 { margin-top: 0; }
@media (max-width: 720px) {
  .bio-block { grid-template-columns: 1fr; gap: 24px; padding: 0 24px; justify-items: start; }
  .bio-block picture { width: 180px; height: 180px; }
  .bio-block picture img, .bio-block > img { width: 180px; height: 180px; }
}

/* ===== Credentials grid ===== */
.cred-grid { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; font-family: var(--sans); font-size: 0.95rem; margin: 1em 0 2em; }
.cred-grid dt { color: var(--ink-faint); font-weight: 600; }
.cred-grid dd { margin: 0; }

/* ===== Tags ===== */
.tag { display: inline-block; font-family: var(--sans); font-size: 0.78rem; font-weight: 500; color: var(--ink-soft); border: 1px solid var(--rule); padding: 4px 10px; border-radius: 999px; margin: 0 6px 6px 0; text-decoration: none; transition: var(--transition); }
.tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.tag.tag-accent { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Essay list ===== */
.essay-list { list-style: none; padding: 0; margin: 0; max-width: var(--max-prose); }
.essay-list li { border-bottom: 1px solid var(--rule-soft); padding: 24px 0; }
.essay-list li:last-child { border-bottom: 0; }
.essay-list .meta { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.essay-list h3 { margin: 0 0 8px; font-size: 1.45rem; line-height: 1.25; }
.essay-list h3 a { color: var(--ink); text-decoration: none; transition: color 0.15s; }
.essay-list h3 a:hover { color: var(--accent); }
.essay-list .excerpt { margin: 0; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.55; }

/* ===== Essay article ===== */
.essay { max-width: var(--max-prose); margin: 0 auto; }
.essay-meta { font-family: var(--sans); color: var(--ink-faint); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.essay h1 { font-family: var(--display); font-size: clamp(2rem, 4.5vw, 2.8rem); line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.015em; }
.essay-lede { font-size: 1.32rem; line-height: 1.5; color: var(--ink-soft); margin: 0 0 32px; font-style: italic; border-left: 3px solid var(--accent); padding-left: 18px; }
.essay p { margin-bottom: 1.2em; }
.essay h2 { margin-top: 2em; font-size: 1.55rem; }
.essay h2::before {
  content: ""; display: block; width: 36px; height: 2px; background: var(--accent); margin-bottom: 12px;
}

/* Drop cap on the first paragraph after the lede (or first paragraph if no lede) */
.essay .essay-lede + p::first-letter,
.essay > p:first-of-type:not(.essay-lede)::first-letter {
  font-family: var(--display);
  font-size: 4.2em;
  font-weight: 600;
  line-height: 0.85;
  float: left;
  margin: 0.08em 0.12em 0 -0.04em;
  color: var(--accent);
  font-feature-settings: "salt" on, "ss01" on;
}

/* Pull-quote treatment */
.essay .pullquote {
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.32;
  color: var(--ink);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0 22px;
  margin: 32px 0;
  font-style: italic;
  position: relative;
}
.essay .pullquote::before {
  content: "\201C";
  position: absolute;
  left: -0.6em;
  top: -0.1em;
  font-size: 3rem;
  color: var(--accent);
  font-family: Georgia, serif;
  line-height: 1;
}
.essay .pullquote cite {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-style: normal;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 12px;
}
@media (max-width: 720px) {
  .essay .pullquote::before { left: 0; top: -0.35em; font-size: 2.2rem; }
  .essay .pullquote { padding-left: 0; }
}

/* ===== Essay article-hero ===== */
.article-hero {
  width: calc(100% + 80px); margin-left: -40px; margin-right: -40px;
  max-width: var(--max-wide); margin-bottom: 32px;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-deep);
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) { .article-hero { width: 100%; margin: 0 0 24px; } }

/* ===== Page header (Practice, About, etc.) ===== */
.page-header {
  position: relative;
  margin: -32px 0 48px;
  padding: 64px 0 72px;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.page-header.has-image::before {
  content: ""; position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.16; z-index: 0;
}
.page-header.practice-bg::before { background-image: url("/assets/img/practice-rockies.webp"); }
.page-header::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--paper) 100%); opacity: 0.4; z-index: 1;
}
.page-header-inner { position: relative; z-index: 2; max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }
.page-header h1 { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3rem); margin: 0 0 12px; letter-spacing: -0.02em; }
.page-header .lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 640px; margin: 0; }

/* ===== Callouts ===== */
.callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 40px auto; max-width: var(--max-wide); padding: 0 24px; }
@media (max-width: 700px) { .callouts { grid-template-columns: 1fr; } }
.callout { border: 1px solid var(--rule); padding: 24px 26px; background: var(--paper-alt); border-radius: 2px; }
.callout h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.1rem; }
.callout p { margin: 0; color: var(--ink-soft); }

/* ===== Footer ===== */
.site-footer { margin-top: 96px; border-top: 1px solid var(--rule); padding: 40px 0 32px; background: var(--paper-alt); }
.footer-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; font-family: var(--sans); font-size: 0.88rem; color: var(--ink-soft); }
@media (max-width: 640px) { .footer-wrap { grid-template-columns: 1fr; } }
.foot-line { margin: 0 0 6px; }
.foot-name { margin: 0 0 8px; color: var(--ink); font-size: 1rem; font-weight: 600; font-family: var(--display); }
.foot-legal { text-align: right; }
@media (max-width: 640px) { .foot-legal { text-align: left; } }

/* ===== Floating UI ===== */
.floating-stack { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 991; display: flex; flex-direction: column-reverse; gap: 0.55rem; align-items: center; bottom: calc(1.5rem + 64px); }
.fab { width: 46px; height: 46px; border-radius: 50%; background: var(--paper-alt); border: 1.5px solid var(--rule); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); box-shadow: var(--shadow-md); padding: 0; font-family: var(--sans); }
.fab:hover { border-color: var(--accent); background: var(--accent); color: #fff; transform: scale(1.08); }
.fab svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fab.fontsize-toggle { font-size: 0.8rem; font-weight: 700; letter-spacing: -0.5px; }
.fab.scroll-btn { opacity: 0.5; }
.fab.scroll-btn.visible { opacity: 1; }
.a11y-floating-btn { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 991; width: 46px; height: 46px; padding: 0; background: var(--paper-alt); border: 1.5px solid var(--rule); border-radius: 50%; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); box-shadow: var(--shadow-md); }
.a11y-floating-btn:hover { border-color: var(--accent); background: var(--accent); color: #fff; transform: scale(1.08); }
.a11y-floating-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.a11y-dialog { border: 1px solid var(--rule); border-radius: 8px; padding: 0; background: var(--paper-alt); color: var(--ink); max-width: 420px; width: 92vw; box-shadow: var(--shadow-lg); }
.a11y-dialog::backdrop { background: rgba(14, 22, 32, 0.55); backdrop-filter: blur(4px); }
.a11y-dialog-inner { padding: 24px 26px 26px; }
.a11y-dialog h2 { margin: 0 0 0.4em; font-size: 1.3rem; font-family: var(--display); }
.a11y-dialog p { margin: 0 0 1.2em; color: var(--ink-soft); font-size: 0.95rem; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--rule-soft); font-family: var(--sans); font-size: 0.95rem; }
.a11y-row:first-of-type { border-top: 0; }
.a11y-row button { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-family: var(--sans); font-size: 0.85rem; }
.a11y-row button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.a11y-dialog .a11y-close { display: block; margin: 20px 0 0 auto; background: var(--ink); color: var(--paper); border: 0; padding: 8px 18px; border-radius: 999px; cursor: pointer; font-family: var(--sans); font-weight: 600; }

.floating-contact-btn { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 992; width: 56px; height: 56px; padding: 0; background: var(--accent); color: #fff; border: 0; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); transition: var(--transition); }
.floating-contact-btn:hover { background: var(--accent-hover); transform: scale(1.08); }
.floating-contact-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.floating-contact-btn .fc-icon-close { display: none; }
.floating-contact-btn.fc-active .fc-icon-msg { display: none; }
.floating-contact-btn.fc-active .fc-icon-close { display: block; }

.floating-contact-panel { position: fixed; top: 0; right: 0; width: 100%; max-width: 440px; height: 100%; background: var(--paper-alt); z-index: 1000; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: -10px 0 50px rgba(0, 0, 0, 0.2); overflow-y: auto; }
.floating-contact-panel.fc-open { transform: translateX(0); }
.fc-panel-inner { padding: 32px 28px 48px; }
.fc-panel-header h3 { margin: 0 0 6px; font-family: var(--display); font-size: 1.5rem; }
.fc-panel-header p { margin: 0 0 22px; color: var(--ink-soft); font-size: 0.94rem; }
.fc-form .form-group { margin-bottom: 16px; }
.fc-form .form-group label { display: block; font-family: var(--sans); font-size: 0.84rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.fc-form .form-group input, .fc-form .form-group textarea, .fc-form .form-group select { width: 100%; padding: 11px 14px; border: 1px solid var(--rule); border-radius: 4px; font-family: var(--sans); font-size: 0.95rem; background: var(--paper); color: var(--ink); }
.fc-form .form-group input:focus, .fc-form .form-group textarea:focus, .fc-form .form-group select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.fc-form textarea { min-height: 100px; resize: vertical; }
.fc-form .fc-submit-btn { width: 100%; padding: 13px; background: var(--accent); color: #fff; border: 0; border-radius: 4px; font-family: var(--sans); font-weight: 700; font-size: 1rem; cursor: pointer; transition: var(--transition); letter-spacing: 0.02em; }
.fc-form .fc-submit-btn:hover { background: var(--accent-hover); }
.fc-disclaimer { margin-top: 14px; font-size: 0.78rem; color: var(--ink-faint); font-family: var(--sans); line-height: 1.5; }
.fc-overlay { position: fixed; inset: 0; background: rgba(14, 22, 32, 0.5); backdrop-filter: blur(2px); z-index: 998; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.fc-overlay.fc-open { opacity: 1; pointer-events: auto; }

@media (max-width: 560px) {
  .floating-stack { right: 1rem; bottom: calc(1rem + 60px); }
  .a11y-floating-btn { left: 1rem; bottom: 1rem; }
  .floating-contact-btn { right: 1rem; bottom: 1rem; }
}

/* ===== Reading progress bar (essays) ===== */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--accent); z-index: 1001; transition: width 0.1s ease-out;
  pointer-events: none;
}

/* ===== Tabbed sub-nav (about page) ===== */
.sub-nav {
  position: sticky; top: 78px; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  margin: -20px auto 32px;
  max-width: var(--max-wide);
  padding: 8px 24px 0;
}
.sub-nav-tabs { display: flex; gap: 0; flex-wrap: wrap; font-family: var(--sans); font-size: 0.92rem; }
.sub-nav-tabs a {
  color: var(--ink-soft); text-decoration: none;
  padding: 12px 18px; border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.sub-nav-tabs a:hover { color: var(--ink); }
.sub-nav-tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ===== Related essays ===== */
.related-essays {
  max-width: var(--max-wide); margin: 56px auto 0; padding: 32px 24px 0;
  border-top: 1px solid var(--rule);
}
.related-essays h2 {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 24px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  border: 1px solid var(--rule);
  background: var(--paper-alt);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: var(--transition);
  display: block;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.related-card .related-meta { font-family: var(--sans); font-size: 0.76rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px; }
.related-card h3 { font-family: var(--display); margin: 0; font-size: 1.1rem; line-height: 1.3; color: var(--ink); }

/* ===== Print stylesheet ===== */
@media print {
  body { font-size: 12pt; background: #fff !important; color: #000 !important; }
  .site-header, .site-footer, .floating-stack, .floating-contact-btn, .floating-contact-panel,
  .fc-overlay, .a11y-floating-btn, .a11y-dialog, .read-progress, .related-essays, .sub-nav,
  .hero-cta, .callouts, .practice-grid, .stat-strip, .topic-pills, .skip { display: none !important; }
  main, .essay, .wrap-prose { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
  h1 { font-size: 22pt; page-break-after: avoid; }
  h2 { font-size: 16pt; page-break-after: avoid; }
  h3 { font-size: 13pt; page-break-after: avoid; }
  p, blockquote, .pullquote { page-break-inside: avoid; }
  a { color: #000 !important; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #555; }
  .article-hero, .page-header { display: none !important; }
  .essay::before { content: "Walter Allison · walterallison.com"; display: block; font-size: 10pt; color: #555; margin-bottom: 18pt; border-bottom: 1pt solid #ccc; padding-bottom: 6pt; }
}

/* ===== Tools styling ===== */
.tool-card { border: 1px solid var(--rule); background: var(--paper-alt); padding: 28px 28px 32px; margin: 0 0 24px; }
.tool-card h2 { margin-top: 0; font-size: 1.4rem; }
.tool-card .tool-desc { color: var(--ink-soft); font-size: 1rem; margin-bottom: 18px; }
.tool-form .form-group { margin-bottom: 14px; }
.tool-form label { display: block; font-family: var(--sans); font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.tool-form input[type="text"], .tool-form input[type="number"], .tool-form select, .tool-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; font-family: var(--sans); font-size: 0.95rem; background: var(--paper); color: var(--ink);
}
.tool-form textarea { min-height: 140px; resize: vertical; font-family: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace; font-size: 0.88rem; }
.tool-form button { background: var(--accent); color: #fff; border: 0; padding: 12px 24px; border-radius: 4px; font-family: var(--sans); font-weight: 700; cursor: pointer; transition: var(--transition); }
.tool-form button:hover { background: var(--accent-hover); }
.tool-form button:disabled { opacity: 0.6; cursor: wait; }
.tool-output { margin-top: 24px; }
.tool-output-body { background: var(--paper); border: 1px solid var(--rule); padding: 22px 26px; }
.tool-output-body h2 { margin-top: 0.6em; font-size: 1.25rem; }
.tool-output-body h3 { margin-top: 1.2em; font-size: 1.05rem; }
.tool-output-body code { background: var(--paper-deep); padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }
.tool-loading { font-family: var(--sans); color: var(--ink-faint); font-style: italic; }
.tool-error { background: #fff3ec; border: 1px solid var(--accent); color: var(--accent); padding: 16px 18px; }
.tool-disclaim { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-faint); margin-top: 14px; line-height: 1.55; }
.tool-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 700px) { .tool-list { grid-template-columns: 1fr; } }
.tool-list a {
  display: block; padding: 24px 26px; background: var(--paper-alt); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); transition: var(--transition);
}
.tool-list a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tool-list h3 { font-family: var(--display); margin: 0 0 6px; }
.tool-list p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.tool-list .tool-tag { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 8px; }

/* ===== Topic pill list ===== */
.topic-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.topic-pills a {
  font-family: var(--sans); font-size: 0.85rem; text-decoration: none;
  border: 1px solid var(--rule); padding: 6px 14px; border-radius: 999px;
  color: var(--ink-soft); transition: var(--transition);
}
.topic-pills a:hover, .topic-pills a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
