/* Cayman Compliance AI — site styles */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --maroon: #4A1F1A;
  --maroon-2: #6B2E26;
  --maroon-link: #8a3d33;
  --ink: #2a1a14;
  --ink-soft: #4a3a32;
  --ink-muted: #7a6a60;
  --cream: #f5ebd9;
  --cream-2: #efe2cb;
  --cream-3: #faf3e3;
  --line: rgba(74, 31, 26, 0.18);
  --line-soft: rgba(74, 31, 26, 0.10);
  --shadow-card: 0 1px 0 rgba(74,31,26,0.04), 0 12px 40px -18px rgba(74,31,26,0.25);
  --shadow-card-hover: 0 1px 0 rgba(74,31,26,0.06), 0 22px 60px -18px rgba(74,31,26,0.35);

  --serif-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --serif-text: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1100px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--serif-text);
  color: var(--ink);
  /* The painterly warm gradient from the screenshots */
  background:
    radial-gradient(120% 80% at 30% 0%, #f3e2c6 0%, #e9d2ad 35%, transparent 70%),
    radial-gradient(80% 60% at 90% 10%, #f7e9cd 0%, transparent 60%),
    radial-gradient(100% 90% at 70% 100%, #8c7e72 0%, #a1907f 30%, #d6c2a4 60%, transparent 80%),
    linear-gradient(180deg, #e9d3ae 0%, #b9a48d 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--maroon-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--maroon); }

/* ---------- Top nav (matches existing) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(245, 235, 217, 0.55);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--maroon);
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

/* pulse dot */
.pulse {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--maroon-2);
  flex-shrink: 0;
}
.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--maroon-2);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70%,
  100% {
    transform: scale(3.6);
    opacity: 0;
  }
}
.pulse.green {
  background: #2f7a4f;
}
.pulse.green::after {
  background: #2f7a4f;
}
@media (prefers-reduced-motion: reduce) {
  .pulse::after {
    animation: none;
  }
}
.search {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  width: 100%;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-muted);
}
.search svg {
  flex-shrink: 0;
  opacity: 0.55;
  width: 16px;
  height: 16px;
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}
.search input::placeholder { color: var(--ink-muted); opacity: 0.85; }
.nav-links {
  display: flex;
  gap: 22px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-links a { color: inherit; text-decoration: none; cursor: pointer; }
.nav-links a:hover, .nav-links a.active { color: var(--maroon); }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.section { padding: 72px 0; position: relative; }
.section.tight { padding: 48px 0; }
.section.lg { padding: 110px 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.eyebrow.maroon { color: var(--maroon); }

h1.display, h2.display, h3.display { font-family: var(--serif-display); color: var(--maroon); font-weight: 600; letter-spacing: -0.005em; margin: 0; }
h1.display { font-size: clamp(48px, 6.4vw, 84px); line-height: 1.02; }
h2.display { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.06; }
h3.display { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; }

.lede {
  font-family: var(--serif-text);
  font-style: italic;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  text-wrap: pretty;
}

.rule {
  height: 1px;
  background: var(--line);
  width: 64px;
  margin: 28px 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid var(--maroon);
  transition: transform .15s ease, background .15s ease, color .15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--maroon); color: #f5ebd9; }
.btn-primary:hover { background: #3a1714; color: #f5ebd9; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--maroon); }
.btn-ghost:hover { background: rgba(74,31,26,0.06); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Cards ---------- */
.card {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
  border-radius: 2px;
  padding: 28px 30px;
  position: relative;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card.hover:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.card .label {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 14px;
  display: block;
}
.card .title-italic {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--maroon);
  line-height: 1.2;
  margin: 0;
  word-break: break-word;
}
.card .meta {
  margin-top: 10px;
  font-family: var(--serif-text);
  font-size: 14px;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.45;
}

/* ---------- Hero search demo (live dropdown) ---------- */
.hero-search-wrap {
  margin: 36px 0 0;
  position: relative;
  max-width: 720px;
}
.hero-search {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  box-shadow: 0 18px 40px -22px rgba(74,31,26,0.35);
}
.hero-search input {
  border: 0; outline: 0; background: transparent;
  font-family: var(--sans);
  font-size: 16px;
  flex: 1;
  color: var(--ink);
  min-width: 0;
}
.hero-search .clear-btn {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
}
.hero-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 24px 60px -20px rgba(74,31,26,0.35);
  z-index: 20;
  animation: dropdown .18s ease-out;
  max-height: 650px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
.hero-results::-webkit-scrollbar {
  width: 8px;
}
.hero-results::-webkit-scrollbar-track {
  background: var(--cream-3);
}
.hero-results::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
.hero-results::-webkit-scrollbar-thumb:hover {
  background: var(--maroon);
}
.hero-results .results-list {
  display: block;
}
.hero-results .more-btn {
  display: block;
  width: 100%;
  padding: 12px 22px;
  background: var(--cream-3);
  border: 0;
  border-top: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--maroon);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.hero-results .more-btn:hover {
  background: var(--cream-2);
  color: var(--maroon-2);
}
.hero-results .more-btn:disabled {
  background: var(--cream-3);
  color: var(--ink-muted);
  cursor: not-allowed;
  opacity: 0.6;
}
@keyframes dropdown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-results .count {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
}
.hero-result {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.hero-result:last-child { border-bottom: 0; }
.hero-result:hover { background: var(--cream-3); }
.hero-result .h {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 6px;
}
.hero-result .snip {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.hero-result .snip mark {
  background: rgba(74,31,26,0.12);
  color: var(--maroon);
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 500;
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.stat { padding: 0 24px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: 0; }
.stat .num {
  font-family: var(--serif-display);
  font-size: 44px;
  color: var(--maroon);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat .lbl {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 10px;
  display: block;
}

/* ---------- Feature blocks ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  padding: 32px 30px;
  border-radius: 2px;
  box-shadow: var(--shadow-card);
}
.feature h3 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--maroon);
  margin: 18px 0 10px;
  line-height: 1.2;
}
.feature p {
  font-family: var(--serif-text);
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
  text-wrap: pretty;
}
.feature .ico {
  width: 32px; height: 32px;
  border: 1px solid var(--maroon);
  display: grid;
  place-items: center;
  color: var(--maroon);
  border-radius: 2px;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 16px;
}

/* ---------- Coverage grid ---------- */
.coverage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.cov-item {
  background: rgba(245,235,217,0.55);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  min-height: 110px;
}
.cov-item .name {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: var(--maroon);
  line-height: 1.25;
}
.cov-item .desc {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.cov-status {
  position: absolute;
  top: 18px; right: 20px;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--maroon); display: inline-block; }
.dot.live { background: #2f7a4f; }
.dot.soon { background: #b48a3a; }
.dot.queue { background: var(--ink-muted); }

/* ---------- How it works (numbered steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step .n {
  font-family: var(--serif-display);
  font-size: 56px;
  color: var(--maroon);
  font-weight: 600;
  line-height: 1;
  opacity: 0.85;
}
.step h4 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  margin: 14px 0 8px;
}
.step p {
  font-family: var(--serif-text);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Audit preview mock ---------- */
.audit-mock {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 30px 70px -28px rgba(74,31,26,0.35);
  overflow: hidden;
  font-family: var(--sans);
  font-size: 13px;
}
.audit-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--cream-3);
}
.audit-head .dots { display: flex; gap: 6px; }
.audit-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(74,31,26,0.18); display: block; }
.audit-head .file {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-soft);
}
.audit-body { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 360px; }
.audit-doc {
  padding: 22px 24px;
  border-right: 1px solid var(--line-soft);
  background: #fff;
  font-family: var(--serif-text);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  overflow: hidden;
}
.audit-doc h5 {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--maroon);
  margin: 0 0 12px;
}
.audit-doc p { margin: 0 0 12px; }
.audit-doc .flag {
  background: rgba(180, 138, 58, 0.18);
  border-bottom: 1px dashed #b48a3a;
  cursor: pointer;
}
.audit-doc .flag.miss {
  background: rgba(178, 60, 50, 0.12);
  border-bottom: 1px dashed #b23c32;
}
.audit-side { padding: 18px 20px; background: var(--cream-3); overflow-y: auto; }
.audit-side .group-title {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 4px 0 12px;
}
.finding {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-left: 3px solid #b48a3a;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 2px;
  font-size: 12.5px;
}
.finding.crit { border-left-color: #b23c32; }
.finding.ok { border-left-color: #2f7a4f; }
.finding .ftitle {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 4px;
}
.finding .fmeta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.finding .fbody {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.5;
}

/* ---------- Quote / testimonial ---------- */
.quote {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
  color: var(--maroon);
  text-wrap: balance;
}
.quote-attr {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 24px;
}

/* ---------- Pricing ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tier {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  padding: 36px 32px;
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.tier.featured {
  background: var(--maroon);
  color: #f3e2c6;
  border-color: var(--maroon);
}
.tier.featured .tier-name,
.tier.featured .tier-price,
.tier.featured h4 { color: #f5ebd9; }
.tier.featured .tier-desc,
.tier.featured ul li { color: rgba(245,235,217,0.85); }
.tier.featured .check { color: #e6c98f; }
.tier-name {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.tier-price {
  font-family: var(--serif-display);
  font-size: 56px;
  font-weight: 600;
  color: var(--maroon);
  line-height: 1;
  margin: 18px 0 4px;
}
.tier-price .per {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  text-transform: lowercase;
  font-weight: 400;
}
.tier-desc {
  font-family: var(--serif-text);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 8px 0 24px;
  line-height: 1.45;
}
.tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.tier ul li {
  font-family: var(--serif-text);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.45;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.check {
  color: var(--maroon);
  font-family: var(--mono);
  font-weight: 500;
  flex-shrink: 0;
}
.tier .btn {
  width: 100%;
  justify-content: center;
}
.tier.featured .btn-primary {
  background: #f5ebd9;
  color: var(--maroon);
  border-color: #f5ebd9;
}
.tier.featured .btn-primary:hover { background: #fff; color: var(--maroon); }

/* ---------- Roadmap timeline ---------- */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}
.tl-item { position: relative; padding: 0 0 36px 24px; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -34px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--maroon);
}
.tl-item.live::before { background: var(--maroon); }
.tl-item .when {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.tl-item h4 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--maroon);
  margin: 6px 0 8px;
}
.tl-item p {
  font-family: var(--serif-text);
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
  max-width: 620px;
}
.pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  margin-left: 10px;
  vertical-align: middle;
  font-weight: 500;
}
.pill.live { background: rgba(47,122,79,0.14); color: #2f7a4f; }
.pill.soon { background: rgba(180,138,58,0.16); color: #8a6520; }
.pill.queue { background: rgba(74,31,26,0.10); color: var(--ink-muted); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 44px 0 60px;
}
.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
}
.foot h6 {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot a { color: var(--ink); text-decoration: none; cursor: pointer; }
.foot a:hover { color: var(--maroon); }
.foot .desc { font-family: var(--serif-text); font-size: 14px; color: var(--ink-soft); line-height: 1.5; max-width: 320px; }
.foot-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* ---------- Pages: about ---------- */
.prose {
  font-family: var(--serif-text);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.prose > *:first-child {
  margin-top: 0;
}
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--maroon); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .features, .coverage, .steps, .tiers { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line-soft); padding: 16px 8px; }
  .audit-body { grid-template-columns: 1fr; }
  .audit-doc { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .nav-inner { grid-template-columns: 1fr auto; }
  .search { grid-column: 1 / -1; order: 3; }
  .foot { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  .nav-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 16px;
    justify-items: center;
  }
  .brand {
    order: 1;
  }
  .search {
    order: 2;
    grid-column: unset;
    width: 100%;
  }
  .nav-links {
    order: 3;
    justify-content: center;
    width: 100%;
    gap: 16px;
    margin-top: 4px;
  }
}

/* ---------- Wiki Styles (Unified) ---------- */
.prose h1 {
  font-family: var(--serif-display);
  color: var(--maroon);
  font-size: clamp(44px, 5.5vw, 64px);
  font-weight: 600;
  line-height: 1.1;
  margin: 36px 0 18px;
}
.prose h2 {
  font-family: var(--serif-display);
  color: var(--maroon);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  margin: 32px 0 16px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}
.prose h3 {
  font-family: var(--serif-display);
  color: var(--maroon-2);
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  margin: 28px 0 14px;
}
.prose h4 {
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 24px 0 12px;
}
.prose ul, .prose ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.prose li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 32px 0;
}
.prose blockquote {
  border-left: 4px solid var(--maroon);
  padding: 8px 0 8px 20px;
  margin: 0 0 24px;
  font-style: italic;
  color: var(--ink-soft);
}
.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(74, 31, 26, 0.05);
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--maroon-2);
  border: 1px solid rgba(74, 31, 26, 0.08);
  word-break: break-all;
}
.prose pre {
  background: var(--cream-3);
  border: 1px solid var(--line-soft);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 24px;
}
.prose pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: var(--ink);
  font-size: 13.5px;
}

/* ---------- Markdown Tables ---------- */
.prose .table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-family: var(--sans);
  font-size: 13.5px;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}
.prose th {
  background: var(--cream-2);
  color: var(--maroon);
  font-weight: 600;
}
.prose tr:nth-child(even) {
  background: rgba(245, 235, 217, 0.3);
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--cream-3);
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 6px;
  margin-top: 48px;
  box-shadow: var(--shadow-card);
}
.cta-banner h4 {
  font-family: var(--serif-display);
  color: var(--maroon);
  font-size: 20px;
  margin: 0 0 12px;
  font-style: italic;
  font-weight: 600;
}
.cta-banner p {
  font-family: var(--serif-text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

/* ---------- Breadcrumb Navigation ---------- */
.breadcrumbs {
  margin: 0 0 24px 0;
  padding: 0;
  overflow: hidden;
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0 0 8px 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.breadcrumbs__list::-webkit-scrollbar {
  display: none;
}
.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.breadcrumbs__link {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumbs__link:hover {
  color: var(--maroon);
  text-decoration: underline;
}
.breadcrumbs__separator {
  margin: 0 10px;
  color: var(--line);
  user-select: none;
  flex-shrink: 0;
}
.breadcrumbs__item--active {
  color: var(--ink);
  font-weight: 700;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 768px) {
  .breadcrumbs__list {
    padding-bottom: 0;
  }
  .breadcrumbs__item--active {
    max-width: 380px;
  }
}

/* Search term highlighting on page load */
mark.search-highlight {
  background-color: rgba(180, 138, 58, 0.22);
  color: var(--maroon);
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 500;
  animation: highlight-pulse 1.5s ease-out;
}

@keyframes highlight-pulse {
  0% {
    background-color: rgba(180, 138, 58, 0.6);
  }
  100% {
    background-color: rgba(180, 138, 58, 0.22);
  }
}
