/* Shared Codex enhancement layer: conversion affordances and responsive navigation. */
:root { --focus-ring: #ffde8a; --surface-strong: #142b38; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus-ring); outline-offset: 3px;
}
.codex-progress { position: fixed; inset: 0 auto auto 0; width: var(--read-progress, 0%); height: 4px; background: var(--orange); z-index: 1000; transition: width .12s linear; }
.lucide-inline { width: 1em; height: 1em; stroke-width: 2.25; vertical-align: -0.14em; flex: 0 0 auto; }
.emoji-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.15em; height: 1.15em; vertical-align: -0.16em; color: currentColor; }
.emoji-icon .lucide { width: 1em; height: 1em; stroke-width: 2.25; }
.memo::before { content: '' !important; display: block; width: 21px; height: 21px; background: var(--orange); mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M12 17v5"/%3E%3Cpath d="M9 3v4l-3 4v2h12v-2l-3-4V3"/%3E%3Cpath d="M5 3h14"/%3E%3C/svg%3E') center/contain no-repeat; }
.codex-nav-toggle { display: none; appearance: none; border: 1.5px solid rgba(255,255,255,.72); background: transparent; color: #fff; width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; }
.codex-nav-toggle .lucide { width: 21px; height: 21px; }
.codex-menu { position: fixed; inset: 0; z-index: 900; background: var(--blue); color: #fff; opacity: 0; pointer-events: none; transform: translateY(-100%); transition: opacity .28s ease, transform .28s cubic-bezier(.22,.61,.36,1); overflow: auto; }
.codex-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.codex-menu-inner { max-width:var(--site-content-max, 1400px); margin: 0 auto; padding: 20px 32px 48px; }
.codex-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 44px; }
.codex-menu-logo { min-width: 0; color: #fff; }
.codex-menu-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.2rem; }
.codex-menu-close { appearance: none; border: 1.5px solid rgba(255,255,255,.7); background: transparent; color: #fff; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; }
.codex-menu-group + .codex-menu-group { margin-top: 18px; }
.codex-menu .codex-menu-group { padding: 30px 0; }
.codex-menu-group h2 { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: #ffde8a; margin: 0 0 12px; }
.codex-menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.codex-menu-card { display: flex; gap: 12px; align-items: center; min-height: 84px; padding: 16px; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.38); background: rgba(0,0,0,.09); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 650; font-size: .96rem; transition: background .15s ease, transform .15s ease; }
.codex-menu-card:hover { background: var(--orange); transform: translateY(-2px); }
.codex-menu-card .lucide { width: 23px; height: 23px; color: #ffde8a; flex: 0 0 auto; }
.codex-menu-card:hover .lucide { color: #fff; }
.codex-menu-recent { border-top: 1px solid rgba(255,255,255,.28); padding-top: 12px !important; }
.codex-menu-recent .codex-menu-card { background: rgba(255,222,138,.08); }
.codex-menu-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.codex-menu-post-card { display: flex; flex-direction: column; min-width: 0; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.42); background: rgba(255,255,255,.14); transition: background .15s ease, transform .15s ease; }
.codex-menu-post-card:hover, .codex-menu-post-card:focus-visible { background: rgba(255,255,255,.26); transform: translateY(-2px); }
.codex-menu-post-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: rgba(0,0,0,.15); }
.codex-menu-post-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.codex-menu-post-thumb--empty { display: grid; place-items: center; color: #ffde8a; }
.codex-menu-post-thumb--empty .lucide { width: 30px; height: 30px; }
.codex-menu-post-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
.codex-menu-post-meta { color: #ffde8a; font: 10px/1.3 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; }
.codex-menu-post-copy strong { font: 700 1rem/1.2 'Bricolage Grotesque', sans-serif; }
.codex-menu-post-action { margin-top: auto; color: #ffde8a; font: 700 11px 'IBM Plex Mono', monospace; }
.codex-disclosure { border: 1px solid rgba(0,147,200,.3); background: rgba(255,255,255,.42); padding: 13px 16px; margin: 0 0 22px; color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; font-size: .71rem; line-height: 1.55; }
.codex-disclosure strong { color: var(--ink); }
.codex-reveal { opacity: 0; transform: translateY(18px); transition: opacity .45s ease, transform .45s ease; }
.codex-reveal.is-visible { opacity: 1; transform: none; }
.btn-stamp, .nav-cta, .ledger-cta, .table-cta, .calc-btn, #regBtn { position: relative; }
.btn-stamp::after, .nav-cta::after, .ledger-cta::after, .table-cta::after, .calc-btn::after, #regBtn::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px; background: currentColor; mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M5 12h14"/%3E%3Cpath d="m12 5 7 7-7 7"/%3E%3C/svg%3E') center/contain no-repeat; }
@media (max-width: 1024px) {
  nav { position: sticky; }
  .nav-inner { padding: 12px 20px; }
  .nav-links, .nav-cta { display: none !important; }
  .codex-nav-toggle { display: inline-flex; }
}
@media (max-width: 760px) { .codex-menu-grid, .codex-menu-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .codex-menu-inner { padding: 18px 20px 36px; } .codex-menu-grid, .codex-menu-post-grid { grid-template-columns: 1fr; } .codex-menu-card { min-height: 64px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
