:root {
  --bg-canvas: #f3e9d8;
  --bg-surface: #fffaf2;
  --bg-surface-hover: #f9efe0;
  --text-primary: #262626;
  --text-muted: #5c5346;
  --accent-primary: #8a4b22;
  --accent-secondary: #683616;
  --border-subtle: #d8c8b0;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 10px 28px -6px rgba(38, 26, 14, 0.14);
  --glow-accent: 0 0 18px -4px rgba(138, 75, 34, 0.35);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: Charter, Cambria, Georgia, serif;
  line-height: 1.65;
  overflow-wrap: anywhere;
  hyphens: auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  object-fit: cover;
  filter: contrast(1.06) brightness(0.95);
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease-kinetic);
}

a:hover {
  color: var(--accent-secondary);
}

.small-caps, .badge, .meta-label, th, .nav-link, .tab-btn {
  font-variant: small-caps;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.dot-grid-bg {
  background-image: radial-gradient(rgba(138, 75, 34, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose {
  max-width: 70ch;
  margin: 0 auto;
}

/* Header: Static, Left-Aligned Brand, 2nd Row Nav */
.site-header {
  position: relative;
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--border-subtle);
  padding: 1rem 0 0 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: var(--accent-primary);
  border: 2px solid var(--text-primary);
}

.header-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

.nav-row {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  padding: 0.65rem 0;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.98rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
}

/* Buttons: Borderless Bronze Pills */
.btn-pill {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #fffaf2;
  border: none;
  border-radius: 999px;
  padding: 0.68rem 1.45rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic), background-color 0.2s ease;
}

.btn-pill:hover {
  background-color: var(--accent-secondary);
  color: #fffaf2;
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

.btn-secondary {
  background-color: #3d352e;
}

/* Hero Section */
.hero-section {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-frame {
  position: relative;
  background-color: #1a1612;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  opacity: 0.62;
}

.hero-overlay {
  position: relative;
  margin-top: -280px;
  padding: 2rem;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: end;
}

.hero-copy-box {
  background-color: rgba(255, 250, 242, 0.96);
  padding: 2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
}

.hero-copy-box h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.18;
  margin: 0.4rem 0 0.85rem;
}

.hero-briefing {
  background-color: var(--bg-surface);
  border: 2px solid var(--accent-primary);
  padding: 1.35rem;
  box-shadow: var(--shadow-elevation);
}

.briefing-title {
  font-size: 0.9rem;
  color: var(--accent-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
  margin-bottom: 0.85rem;
}

.fact-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.fact-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: 0.45rem;
  font-size: 0.92rem;
}

.fact-item strong {
  color: var(--accent-primary);
}

/* Sections & Headings */
section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--text-primary);
  padding-bottom: 0.6rem;
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.25;
}

h3 {
  font-size: 1.22rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

/* Metric Strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  margin: 1.5rem 0;
}

.metric-cell {
  padding: 1.15rem 1.25rem;
  border-right: 1px solid var(--border-subtle);
}

.metric-cell:last-child {
  border-right: none;
}

.metric-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: block;
}

/* Cards with Crossing Bronze Badge */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ledger-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic);
}

.ledger-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevation);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: #1f1b18;
}

.card-media img {
  width: 100%;
  height: 100%;
}

.crossing-badge {
  position: absolute;
  bottom: -13px;
  left: 1rem;
  background-color: var(--accent-primary);
  color: #fffaf2;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  z-index: 2;
  border: 1px solid #fffaf2;
}

.card-body {
  padding: 1.45rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Weekly Calendar Strip */
.calendar-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.day-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
}

.day-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.35rem;
  margin-bottom: 0.6rem;
  color: var(--accent-primary);
}

/* Recipe-for-a-Post Panel */
.recipe-panel {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.mock-graphic {
  position: relative;
  border: 1px solid var(--text-primary);
}

.mock-caption-overlay {
  background-color: rgba(26, 22, 18, 0.88);
  color: #fffaf2;
  padding: 0.85rem;
  font-size: 0.85rem;
  border-top: 2px solid var(--accent-primary);
}

/* Accordions & Disclosures */
.accordion-group {
  display: grid;
  gap: 0.75rem;
}

details.ledger-disclosure {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0;
}

details.ledger-disclosure summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface);
}

details.ledger-disclosure summary::-webkit-details-marker {
  display: none;
}

details.ledger-disclosure summary::after {
  content: "+";
  color: var(--accent-primary);
  font-size: 1.25rem;
}

details.ledger-disclosure[open] summary {
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-hover);
}

details.ledger-disclosure[open] summary::after {
  content: "−";
}

.disclosure-content {
  padding: 1.15rem 1.25rem;
  color: var(--text-muted);
}

/* Tabs */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border-subtle);
  gap: 0.35rem;
}

.tab-btn {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  padding: 0.65rem 1.15rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.tab-btn[aria-selected="true"] {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  border-top: 3px solid var(--accent-primary);
}

.tab-panel {
  display: none;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: none;
  padding: 1.5rem;
}

.tab-panel.active {
  display: block;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-surface);
  font-size: 0.92rem;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background-color: var(--bg-surface-hover);
  color: var(--accent-primary);
}

/* Forms & Message Docket */
.docket-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  background-color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.docket-preview {
  background-color: var(--bg-surface);
  border: 2px solid var(--text-primary);
  padding: 1.25rem;
  font-family: monospace;
  font-size: 0.86rem;
  white-space: pre-wrap;
  min-height: 240px;
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 2px solid var(--text-primary);
  padding: 2.5rem 0;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-block;
  }
  .header-tagline {
    display: none;
  }
  .nav-row {
    display: none;
  }
  .nav-row.open {
    display: block;
  }
  .main-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1rem 0;
  }
  .hero-overlay, .recipe-panel, .docket-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-overlay {
    margin-top: -120px;
    padding: 1rem;
  }
  .metric-cell {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
