/* Matt for Utah: sandstone, red rock, and evening-sky navy */
:root {
  --ink: #14284b;
  --ink-2: #3a4862;
  --muted: #6b7684;
  --sand: #f7f2ea;
  --sand-2: #efe6d8;
  --paper: #fffdf9;
  --line: #e2d8c8;
  --rock: #b22234;
  --rock-dark: #8c1a29;
  --stone: #b4502c;
  --sage: #4f7a5f;
  --grey-bar: #a9b1ba;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--sand); }
img, svg { max-width: 100%; }
a { color: var(--rock-dark); text-underline-offset: 3px; }
a:hover { color: var(--rock); }
:focus-visible { outline: 3px solid var(--rock); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); font-weight: 700; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- header & menu ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding-top: 4px; background: linear-gradient(90deg, #b22234 0 33.3%, #ffffff 33.3% 66.6%, #14284b 66.6%) top / 100% 4px no-repeat, rgba(255,253,249,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.brand em { font-style: italic; font-weight: 400; color: var(--rock); }
.brand-mark { width: 32px; height: 32px; background: url(/assets/favicon.svg) center/contain no-repeat; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav-list > li > a, .mega-toggle { display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font: 600 15px var(--sans); background: none; border: 0; cursor: pointer; }
.nav-list > li > a:hover, .mega-toggle:hover, .mega-toggle[aria-expanded="true"] { background: var(--sand-2); color: var(--ink); }
.nav-list a[aria-current="page"] { color: var(--rock-dark); }
.mega-toggle::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .15s; }
.mega-toggle[aria-expanded="true"]::after { transform: translateY(0) rotate(-135deg); }
.nav-cta { background: var(--rock) !important; color: #fff !important; margin-left: 6px; }
.nav-cta:hover { background: var(--rock-dark) !important; }
.menu-toggle { display: none; }
.has-mega { position: static; }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(28,40,56,.12);
  padding: 28px max(24px, calc((100vw - var(--wrap)) / 2 + 24px)) 22px; display: none; }
.mega.open { display: block; }
@media (hover: hover) and (min-width: 961px) { .has-mega:hover .mega { display: block; } }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 28px; }
.mega-cat { display: block; font: 700 15px var(--sans); color: var(--ink); text-decoration: none; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 2px solid var(--rock); }
.mega-cat:hover { color: var(--rock-dark); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li { font-size: 14px; line-height: 1.35; padding: 4px 0; }
.mega li a { color: var(--ink-2); text-decoration: none; }
.mega li a:hover { color: var(--rock-dark); text-decoration: underline; }
.mega li a::before { content: "●"; color: var(--rock); font-size: 9px; margin-right: 6px; vertical-align: 2px; }
.mega li.soon { color: #a0a6ad; }
.mega-all { display: inline-block; margin-top: 18px; font-weight: 600; font-size: 14px; }

@media (max-width: 960px) {
  .menu-toggle { display: block; background: var(--ink); color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; font: 600 14px var(--sans); cursor: pointer; }
  .site-nav { position: absolute; left: 0; right: 0; top: 72px; background: var(--paper); border-bottom: 1px solid var(--line); display: none; max-height: calc(100vh - 68px); overflow-y: auto; }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 10px 16px 18px; gap: 2px; }
  .mega-toggle { width: 100%; text-align: left; }
  .mega { position: static; box-shadow: none; border: 0; padding: 6px 14px 12px; }
  .mega-grid { grid-template-columns: 1fr; gap: 14px; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- home hero ---------- */
.hero { position: relative; background: linear-gradient(180deg, #0f1f3d 0%, #1d3360 50%, #5b4a6b 78%, #c7765a 92%, #e9a56c 100%); color: #fff; overflow: hidden; min-height: 600px; }
.hero-inner { padding: 104px 24px 190px; position: relative; z-index: 2; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 700; color: #f3c9b0; margin: 0 0 14px; }
.eyebrow .star { color: #fff; margin-right: 4px; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.25); font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 0 0 20px; letter-spacing: -.01em; }
.hero-lede { font-size: 1.25rem; max-width: 36ch; color: #e6e9ee; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; display: block; }
.hero-edge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 30px; display: block; z-index: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(15,31,61,.55) 0%, rgba(15,31,61,.25) 45%, rgba(15,31,61,0) 70%); pointer-events: none; }

.btn { display: inline-block; padding: 13px 22px; border-radius: 8px; font: 700 15px var(--sans); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--rock); color: #fff; }
.btn-primary:hover { background: var(--rock-dark); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- sections ---------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section-head { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 24px; }
.section-head::after { content: "★ ★ ★"; display: block; font: 11px var(--sans); letter-spacing: .5em; color: var(--rock); margin-top: 10px; }
.cta-box .section-head::after, .cta h2::after { content: none; }
.section-lede { max-width: 60ch; color: var(--ink-2); margin: -10px 0 24px; }
.band { background: var(--sand-2); }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.value { border-top: 3px solid var(--rock); padding-top: 16px; }
.value h3 { font-size: 1.15rem; margin: 0 0 8px; }
.value p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(28,40,56,.1); color: var(--ink); }
.card h3 { font-size: 1.35rem; margin: 6px 0 10px; }
.card p { color: var(--ink-2); margin: 0 0 16px; font-size: 15.5px; }
.card-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--rock-dark); }
.card-more { margin-top: auto; font-weight: 700; color: var(--rock-dark); font-size: 15px; }
.card-soon { background: transparent; border-style: dashed; }
.card-soon h3 { color: var(--muted); font-size: 1.15rem; margin-bottom: 0; }
.card-soon .card-kicker { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chip { padding: 10px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.cat-chip:hover { border-color: var(--rock); color: var(--rock-dark); }
.cta-box { background: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1.5px) 0 0/26px 26px, var(--ink); color: #fff; border-radius: 14px; padding: 44px; text-align: center; }
.cta-box h2 { color: #fff; margin: 0 0 10px; font-size: 1.9rem; }
.cta-box p { color: #d6dbe2; margin: 0 auto 24px; max-width: 46ch; }

.page-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 48px 0 40px; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 6px 0 12px; }
.deck { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; margin: 0; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--rock-dark); }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cat-tile { display: block; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--rock); border-radius: var(--radius); padding: 24px 26px; text-decoration: none; color: var(--ink); }
.cat-tile:hover { box-shadow: 0 12px 28px rgba(28,40,56,.1); color: var(--ink); }
.cat-tile h2 { font-size: 1.4rem; margin: 0 0 8px; }
.cat-tile p { margin: 0 0 12px; color: var(--ink-2); }
.cat-count { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- papers ---------- */
.paper-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.paper-hero h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); margin: 10px 0 14px; }
.paper-hero .meta { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.paper-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 44px; padding-bottom: 64px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; }
.toc-head { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent; line-height: 1.35; }
.toc li a:hover, .toc li a.active { color: var(--rock-dark); border-left-color: var(--rock); }
.prose { max-width: 70ch; }
.prose-solo { margin: 0 auto 0 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.75rem; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.25rem; margin: 1.6em 0 .5em; }
.prose p, .prose li { color: #26313f; }
.prose li { margin: .35em 0; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--sand-2); font-weight: 700; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.callout { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--sage); border-radius: var(--radius); padding: 8px 26px 12px; margin: 2em 0; }
.callout h3 { margin-top: 1em; color: var(--sage); font-family: var(--sans); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }
.callout table { display: table; }
details.appendix { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 24px; margin: 2.4em 0; }
details.appendix summary { cursor: pointer; font: 700 1.25rem var(--serif); padding: 18px 0; list-style: none; }
details.appendix summary::-webkit-details-marker { display: none; }
details.appendix summary::after { content: "+ Show"; float: right; font: 700 13px var(--sans); color: var(--rock-dark); padding-top: 6px; }
details.appendix[open] summary::after { content: "− Hide"; }
details.appendix[open] { padding-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 1.8em 0; }
.stat { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 16px; border-top: 4px solid var(--rock); }
.stat-num { display: block; font: 700 2rem/1.1 var(--serif); color: #fff; margin-bottom: 6px; }
.stat-lbl { display: block; font-size: 13.5px; line-height: 1.4; color: #d6dbe2; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.chart { margin: 2em 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 14px; }
.chart-scroll { overflow-x: auto; }
.chart svg { display: block; width: 100%; min-width: 560px; height: auto; font-family: var(--sans); }
.chart figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.ch-title { font: 700 19px var(--sans); fill: var(--ink); }
.ch-sub { font-size: 14px; fill: var(--muted); }
.ch-lbl { font-size: 14px; fill: var(--ink); }
.ch-val { font-size: 14px; font-weight: 700; fill: var(--ink); }
.ch-val-a { font-size: 14px; font-weight: 700; fill: var(--rock); }
.ch-val-s, .ch-small-s { fill: var(--sage); font-weight: 700; }
.ch-val-s { font-size: 15px; }
.ch-small, .ch-small-s { font-size: 12.5px; }
.ch-small { fill: var(--ink-2); }
.ch-a { fill: var(--rock); }
.ch-m { fill: var(--grey-bar); }
.ch-ink { fill: var(--ink); }
.ch-sage { fill: var(--sage); }
.ch-cost { fill: #e3b59f; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { stroke: var(--ink-2); stroke-width: 1.5; }
.ch-ink-line { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 4; }
.ch-conn { stroke: var(--muted); stroke-dasharray: 3 3; }
.ch-line-a { fill: none; stroke: var(--rock); stroke-width: 3.5; }
.ch-line-m { fill: none; stroke: var(--grey-bar); stroke-width: 3.5; }
.related { background: var(--sand-2); padding: 40px 0 48px; }
.related h2 { font-size: 1.4rem; margin: 0 0 16px; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
.related-list a { font-weight: 600; }
.related-list .soon { color: var(--muted); }
.related-list small { margin-left: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- contact ---------- */
.contact-form { max-width: 640px; display: flex; flex-wrap: wrap; gap: 0 4%; }
.field { width: 100%; margin-bottom: 18px; }
.field-half { width: 48%; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfc4b2; border-radius: 8px; font: 16px var(--sans); background: var(--paper); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--rock); box-shadow: 0 0 0 3px rgba(178,34,52,.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { width: 100%; font-size: 13px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: linear-gradient(90deg, #b22234 0 33.3%, #ffffff 33.3% 66.6%, #5b77a8 66.6%) top / 100% 4px no-repeat, var(--ink); color: #c8cfd8; padding: 48px 0 36px; font-size: 15px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 24px 48px; }
.footer-brand { font: 700 1.3rem var(--serif); color: #fff; margin: 0 0 6px; }
.footer-brand em { color: #f3a3ad; font-weight: 400; }
.footer-head { font-weight: 700; color: #fff; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: #e6e9ee; text-decoration: none; }
.site-footer a:hover { color: #f0b98f; }
.footer-fine { grid-column: 1 / -1; border-top: 1px solid #34435a; padding-top: 18px; margin: 8px 0 0; font-size: 13px; color: #95a0ad; }

@media (max-width: 960px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .paper-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .related-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .value-grid, .cards, .cards-2, .cat-grid, .related-list { grid-template-columns: 1fr; }
  .hero-inner { padding: 56px 24px 260px; }
  .hero { min-height: 700px; }
  .hero-art { top: auto; height: 340px; }
  .hero::after { background: linear-gradient(180deg, rgba(15,31,61,.55) 0%, rgba(15,31,61,0) 60%); }
  .field-half { width: 100%; }
  .cta-box { padding: 32px 22px; }
  .footer-inner { grid-template-columns: 1fr; }
  .chart { padding: 16px 12px 12px; margin-left: -8px; margin-right: -8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .site-header, .site-footer, .toc, .related { display: none; } details.appendix { display: block; } }
