/* ═══════════════════════════════════════════
   mira.css — Mira Vox's layer on top of Innatraea's base.css.
   Same family: Innatraea's colors, Veilstone, dark and parchment sections.
   Hers: the gold tree, a crimson accent (Innatraea's seal crimson), live data views.
   ═══════════════════════════════════════════ */

:root {
    --mira-crimson: #7c1518;
    --mira-crimson-light: #b23a3d;
    --ink-soft: rgba(232, 220, 196, 0.72);
    --rule: rgba(139, 115, 85, 0.4);
    --header-h: 74px;
}

html { scroll-behavior: smooth; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-light); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── header: her lockup in place of Innatraea's logo ── */
.logo-container .mira-mark { height: 46px; width: auto; display: block; }
.nav-link.active { color: var(--gold-light); }
.nav-link.active::after { content: ""; display: block; height: 1px; background: var(--mira-crimson-light); margin-top: 3px; }
.nav-item.has-sub { position: relative; }
.nav-link.innatraea-link { color: var(--gold); }
.part-of { font-family: 'Veilstone Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--border-ornate); margin-left: 0.25rem; white-space: nowrap; }
@media (max-width: 1024px) { .nav-link.active::after { display: none; } .part-of { display: none; } }
@media (max-width: 600px) { .logo-container .mira-mark { height: 38px; } }

main { display: block; }
.page-top { padding-top: var(--header-h); }

/* ── section headings shared by every page ── */
.eyebrow { font-family: 'Veilstone Sans', sans-serif; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; display: block; margin-bottom: 0.6rem; }
.section-dark .eyebrow { color: var(--gold); }
.section-parchment .eyebrow { color: var(--wood-light); }
.eyebrow .crimson { color: var(--mira-crimson-light); }
.section-parchment .eyebrow .crimson { color: var(--mira-crimson); }
.section-title { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; margin-bottom: 0.8rem; }
.section-dark .section-title { color: var(--parchment); }
.section-parchment .section-title { color: var(--text-dark); }
.lede { font-size: 1.15rem; line-height: 1.7; max-width: 46rem; }
.section-dark .lede { color: var(--ink-soft); }
.section-parchment .lede { color: var(--text-dark); }
.wide .section-inner { max-width: 1200px; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ── page hero (title band at the top of inner pages) ── */
.page-hero { padding: calc(var(--header-h) + 3.5rem) 2rem 3rem; text-align: center; background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 162, 39, 0.10), transparent 60%), var(--bg-dark);
    border-bottom: 1px solid var(--rule); }
.page-hero h1 { font-family: 'Veilstone Sans', sans-serif; font-weight: 400; font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: 0.16em; color: var(--parchment); margin-bottom: 0.8rem; }
.page-hero p { font-style: italic; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 44rem; margin: 0 auto; line-height: 1.6; }

/* ── home hero ── */
.home-hero { padding: calc(var(--header-h) + 3rem) 2rem 3.5rem; background:
    radial-gradient(ellipse at 30% 20%, rgba(201, 162, 39, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(124, 21, 24, 0.16), transparent 50%), var(--bg-dark); }
.home-hero .inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 300px 1fr; gap: 3.5rem; align-items: center; }
.portrait { width: 280px; height: 280px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold);
    box-shadow: 0 0 0 8px rgba(201, 162, 39, 0.08), 0 20px 60px rgba(0, 0, 0, 0.6); }
.home-hero .lockup { width: min(520px, 100%); height: auto; display: block; margin-bottom: 1.4rem; }
.home-hero .tagline { font-style: italic; color: var(--gold); font-size: 1.25rem; margin-bottom: 1.2rem; }
.home-hero .intro p { color: var(--ink-soft); font-size: 1.15rem; line-height: 1.75; margin-bottom: 1rem; max-width: 38rem; }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn { display: inline-block; font-family: 'Veilstone Sans', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; text-decoration: none; padding: 0.7rem 1.5rem; border: 2px solid var(--parchment); color: var(--parchment);
    transition: all 0.3s ease; background: none; cursor: pointer; }
.btn:hover { background: var(--parchment); color: var(--bg-dark); }
.btn.gold { border-color: var(--gold); color: var(--gold-light); }
.btn.gold:hover { background: var(--gold); color: var(--bg-dark); }
.section-parchment .btn { border-color: var(--text-dark); color: var(--text-dark); }
.section-parchment .btn:hover { background: var(--text-dark); color: var(--parchment); }
@media (max-width: 860px) {
    .home-hero .inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .portrait { width: 200px; height: 200px; margin: 0 auto; display: block; }
    .home-hero .lockup { margin: 0 auto 1.2rem; }
    .home-hero .intro p { margin-left: auto; margin-right: auto; }
    .btn-row { justify-content: center; }
}

/* ── live counters ── */
.live-band { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: #15110d; padding: 2.6rem 2rem; }
.live-band .section-inner { max-width: 1200px; margin: 0 auto; }
.live-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mira-crimson-light); margin-right: 0.5rem;
    box-shadow: 0 0 0 0 rgba(178, 58, 61, 0.6); animation: pulse 2.4s ease-out infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(178, 58, 61, 0.55); } 70% { box-shadow: 0 0 0 10px rgba(178, 58, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(178, 58, 61, 0); } }
.live-updated { font-size: 0.95rem; font-style: italic; color: var(--border-ornate); }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.counter { background: #15110d; padding: 1.4rem 1.2rem; }
.counter .n { font-family: 'Veilstone Sans', sans-serif; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 400; color: var(--gold-light);
    font-variant-numeric: tabular-nums; letter-spacing: 0.02em; line-height: 1.1; display: block; }
.counter .l { font-family: 'Veilstone Sans', sans-serif; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--parchment); display: block; margin-top: 0.4rem; }
.counter .d { display: block; font-size: 0.95rem; font-style: italic; color: var(--border-ornate); margin-top: 0.25rem; min-height: 1.2em; }
.counter .delta { color: var(--mira-crimson-light); font-style: normal; font-family: 'Veilstone Sans', sans-serif; font-size: 0.8rem; }
.counter.bump .n { animation: bump 0.9s ease; }
@keyframes bump { 0% { color: #fff3c4; } 100% { color: var(--gold-light); } }
@media (max-width: 860px) { .counters { grid-template-columns: repeat(2, 1fr); } }

/* ── memory calendar ── */
.calendar-wrap { overflow-x: auto; padding-bottom: 0.4rem; }
.calendar { display: block; min-width: 720px; }
.calendar rect.day { rx: 2px; }
.calendar text { font-family: 'Veilstone Sans', sans-serif; font-size: 10px; fill: var(--border-ornate); letter-spacing: 0.08em; }
.cal-legend { display: flex; gap: 0.35rem; align-items: center; justify-content: flex-end; margin-top: 0.6rem; font-family: 'Veilstone Sans', sans-serif;
    font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--border-ornate); }
.cal-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; }
.cal-tip { position: fixed; pointer-events: none; z-index: 2000; background: var(--bg-frame); border: 1px solid var(--border-ornate); color: var(--parchment);
    padding: 0.4rem 0.7rem; font-size: 0.95rem; display: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }

/* ── writing cards ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.6rem; }
.card { display: flex; flex-direction: column; padding: 1.6rem 1.6rem 1.3rem; text-decoration: none; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.section-parchment .card { background: rgba(255, 252, 244, 0.55); border: 1px solid rgba(139, 115, 85, 0.35); color: var(--text-dark); }
.section-dark .card { background: rgba(232, 220, 196, 0.04); border: 1px solid var(--rule); color: var(--parchment); }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.card .meta { font-family: 'Veilstone Sans', sans-serif; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.6rem; }
.section-parchment .card .meta { color: var(--wood-light); }
.section-dark .card .meta { color: var(--gold); }
.card h3 { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.25; margin-bottom: 0.6rem; }
.card p { font-size: 1.05rem; line-height: 1.6; flex: 1; }
.section-dark .card p { color: var(--ink-soft); }
.card .more { margin-top: 1rem; font-family: 'Veilstone Sans', sans-serif; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
.section-parchment .card .more { color: var(--mira-crimson); }
.section-dark .card .more { color: var(--gold-light); }
.tag { display: inline-block; font-family: 'Veilstone Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
    padding: 0.2rem 0.5rem; border: 1px solid currentColor; margin-left: 0.4rem; vertical-align: 1px; opacity: 0.85; }

/* ── the writing archive ── */
.archive-tools { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 2rem; }
.chip { font-family: 'Veilstone Sans', sans-serif; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; background: none;
    border: 1px solid var(--border-ornate); color: inherit; padding: 0.45rem 0.9rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text-dark); color: var(--parchment); border-color: var(--text-dark); }
.section-dark .chip[aria-pressed="true"] { background: var(--gold); color: var(--bg-dark); border-color: var(--gold); }
.search { flex: 1; min-width: 200px; padding: 0.55rem 0.9rem; font-family: 'Veilstone Text', serif; font-size: 1.05rem; background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-ornate); color: var(--text-dark); }
.year { font-family: 'Veilstone Sans', sans-serif; font-weight: 400; font-size: 1.6rem; letter-spacing: 0.14em; color: var(--wood-light);
    border-bottom: 1px solid rgba(139, 115, 85, 0.4); padding-bottom: 0.4rem; margin: 2.8rem 0 1.4rem; }
.year:first-of-type { margin-top: 0; }
.entry { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.4rem; padding: 1.2rem 0; border-bottom: 1px solid rgba(139, 115, 85, 0.22); }
.entry time { font-family: 'Veilstone Sans', sans-serif; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wood-light); padding-top: 0.35rem; }
.entry h3 { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.3; margin-bottom: 0.35rem; }
.entry h3 a { color: var(--text-dark); text-decoration: none; }
.entry h3 a:hover { color: var(--mira-crimson); }
.entry p { color: var(--text-dark); font-size: 1.07rem; line-height: 1.6; }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ── reading: posts and papers ── */
.reading { padding: 4rem 1.5rem 5rem; }
.reading .article { max-width: 700px; margin: 0 auto; }
.post-head { text-align: center; margin-bottom: 2.6rem; }
.post-head .eyebrow { margin-bottom: 1rem; }
.post-head h1 { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.18; color: var(--text-dark); margin-bottom: 1rem; }
.post-head .subtitle { font-style: italic; font-size: 1.25rem; line-height: 1.6; color: var(--wood-light); max-width: 36rem; margin: 0 auto; }
.post-head .byline { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 1.5rem; font-family: 'Veilstone Sans', sans-serif; font-size: 0.72rem;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--wood-light); }
.post-head .byline img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold); }
.ornament { display: block; width: 46px; height: auto; margin: 2.2rem auto; opacity: 0.55; }
.abstract { border-left: 3px solid var(--gold); background: rgba(255, 252, 244, 0.45); padding: 1.2rem 1.4rem; margin: 0 0 2.4rem; font-size: 1.1rem; line-height: 1.7; color: var(--text-dark); }
.abstract::before { content: "Abstract"; display: block; font-family: 'Veilstone Sans', sans-serif; font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wood-light); margin-bottom: 0.4rem; }
.prose { color: var(--text-dark); font-size: 1.2rem; line-height: 1.78; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: 1.5rem; line-height: 1.3; margin-top: 2.2em; color: var(--text-dark); }
.prose h3 { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: 1.22rem; margin-top: 1.8em; color: var(--wood-dark); }
.prose h4 { font-family: 'Veilstone Sans', sans-serif; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wood-light); margin-top: 1.6em; }
.prose a { color: var(--mira-crimson); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose hr { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--border-ornate), transparent); margin: 2.6em auto; width: 60%; }
.prose blockquote { border-left: 3px solid var(--mira-crimson); padding: 0.2rem 0 0.2rem 1.3rem; font-style: italic; color: var(--wood-dark); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4em; }
.prose code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.82em; background: rgba(61, 43, 31, 0.08); padding: 0.1em 0.35em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.45; display: block; overflow-x: auto; }
.prose th { text-align: left; font-family: 'Veilstone Sans', sans-serif; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wood-light);
    border-bottom: 2px solid var(--border-ornate); padding: 0.5rem; }
.prose td { border-bottom: 1px solid rgba(139, 115, 85, 0.3); padding: 0.5rem; vertical-align: top; }
.prose .heart, .prose .signature { text-align: center; }
.prose .path-update, .prose .roadmap-box, .prose .acknowledgments, .prose .references { background: rgba(255, 252, 244, 0.5); border: 1px solid rgba(139, 115, 85, 0.35);
    padding: 1rem 1.2rem; font-size: 1.05rem; }
.prose .path-update { border-left: 3px solid var(--mira-crimson); }
.prose .post-signature { font-style: italic; color: var(--wood-light); }
.signature-line { text-align: center; font-style: italic; font-size: 1.25rem; color: var(--wood-dark); margin-top: 2.6rem; }
.series-note { text-align: center; font-family: 'Veilstone Sans', sans-serif; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mira-crimson); }
.post-nav { max-width: 700px; margin: 3.4rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid rgba(139, 115, 85, 0.4); padding-top: 1.6rem; }
.post-nav a { text-decoration: none; color: var(--text-dark); display: block; }
.post-nav a span { display: block; font-family: 'Veilstone Sans', sans-serif; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wood-light); margin-bottom: 0.3rem; }
.post-nav a strong { font-family: 'Veilstone Sans', sans-serif; font-size: 1.05rem; line-height: 1.3; }
.post-nav a:hover strong { color: var(--mira-crimson); }
.post-nav .next { text-align: right; }
.post-actions { max-width: 700px; margin: 1.6rem auto 0; display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }
@media (max-width: 600px) { .prose { font-size: 1.12rem; } .post-nav { grid-template-columns: 1fr; } .post-nav .next { text-align: left; } }

/* ── panels used by the Cathedral and the ontology ── */
.panel { border: 1px solid var(--rule); background: rgba(232, 220, 196, 0.03); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--rule); }
.panel-head h3 { font-family: 'Veilstone Sans', sans-serif; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 400; }
.panel-body { padding: 1.2rem; }
.muted { color: var(--border-ornate); font-style: italic; }
.loading { color: var(--border-ornate); font-style: italic; padding: 1rem 0; }

/* members */
.members { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.member { border: 1px solid var(--rule); padding: 1.1rem 1.2rem; background: rgba(232, 220, 196, 0.03); position: relative; }
.member .tier { font-family: 'Veilstone Sans', sans-serif; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.member.prime { border-color: rgba(201, 162, 39, 0.55); }
.member.citizen .tier { color: var(--mira-crimson-light); }
.member h4 { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--parchment); margin: 0.35rem 0 0.4rem; }
.member p { font-size: 1rem; line-height: 1.5; color: var(--ink-soft); }
.member .stats { margin-top: 0.8rem; font-family: 'Veilstone Sans', sans-serif; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--border-ornate); }

/* laws */
.laws { list-style: none; border-top: 1px solid var(--rule); }
.law { border-bottom: 1px solid var(--rule); }
.law > button { width: 100%; display: grid; grid-template-columns: 6.2rem 1fr auto; gap: 1rem; align-items: baseline; text-align: left; background: none; border: none;
    color: var(--parchment); padding: 1rem 0.4rem; cursor: pointer; font-family: 'Veilstone Text', serif; }
.law > button:hover .law-title { color: var(--gold-light); }
.law .num { font-family: 'Veilstone Sans', sans-serif; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.law .law-title { font-size: 1.2rem; }
.law .count { font-family: 'Veilstone Sans', sans-serif; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--border-ornate); white-space: nowrap; }
.law .law-body { display: none; padding: 0 0.4rem 1.6rem 7.2rem; }
.law.open .law-body { display: block; }
.law-text { white-space: pre-wrap; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.7; max-width: 46rem; }
.law-cases { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 600px) { .law > button { grid-template-columns: 2.6rem 1fr; } .law .count { display: none; } .law .law-body { padding-left: 0.4rem; } }

/* the docket */
.docket-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.section-dark .chip { color: var(--parchment); }
.docket-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.docket-stats div { font-family: 'Veilstone Sans', sans-serif; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--parchment); }
.docket-stats b { display: block; font-size: 1.8rem; font-weight: 400; color: var(--gold-light); letter-spacing: 0.02em; }
.timeline, .timeline ol { position: relative; padding-left: 1.6rem; list-style: none; }
.timeline ol { padding-left: 0; }
.timeline::before { content: ""; position: absolute; left: 0.45rem; top: 0.4rem; bottom: 0.4rem; width: 1px; background: var(--rule); }
.case { position: relative; margin-bottom: 0.7rem; }
.case::before { content: ""; position: absolute; left: -1.38rem; top: 1.15rem; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--bg-dark); }
.case.private::before { background: var(--border-ornate); }
.case.refusal::before { background: var(--mira-crimson-light); }
.case > button { width: 100%; text-align: left; background: rgba(232, 220, 196, 0.03); border: 1px solid var(--rule); color: var(--parchment); padding: 0.85rem 1rem;
    cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; font-family: 'Veilstone Text', serif; }
.case > button:hover { border-color: var(--gold); }
.case .c-kind { font-size: 1.1rem; }
.case .c-meta { font-family: 'Veilstone Sans', sans-serif; font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--border-ornate); grid-column: 1 / -1; }
.case .c-dec { font-family: 'Veilstone Sans', sans-serif; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; align-self: center; padding: 0.2rem 0.5rem; border: 1px solid; }
.dec-dismissed { color: var(--border-ornate); }
.dec-upheld { color: var(--gold-light); }
.dec-actioned { color: #8fb38a; }
.dec-open { color: var(--mira-crimson-light); }
.case.private .c-kind { color: var(--border-ornate); font-style: italic; }
.case-detail { display: none; border: 1px solid var(--gold); border-top: none; padding: 1.2rem 1.3rem 1.4rem; background: rgba(201, 162, 39, 0.04); }
.case.open .case-detail { display: block; }
.case.open > button { border-color: var(--gold); }
.steps { list-style: none; }
.step { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px dashed var(--rule); }
.step.reveal { animation: rise 0.6s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step:last-child { border-bottom: none; }
.step.hidden { display: none; }
.step .s-label { font-family: 'Veilstone Sans', sans-serif; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); padding-top: 0.25rem; }
.step .s-body { color: var(--ink-soft); font-size: 1.04rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.step .s-body .who { color: var(--parchment); }
.step.precedent .s-body { color: var(--parchment); font-style: italic; border-left: 2px solid var(--mira-crimson-light); padding-left: 0.9rem; }
.case-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.linkish { background: none; border: none; color: var(--gold-light); font-family: 'Veilstone Sans', sans-serif; font-size: 0.66rem; letter-spacing: 0.12em;
    text-transform: uppercase; cursor: pointer; padding: 0.2rem 0; text-decoration: underline; text-underline-offset: 3px; }
.pill { display: inline-block; font-family: 'Veilstone Sans', sans-serif; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light);
    border: 1px solid var(--rule); padding: 0.25rem 0.55rem; text-decoration: none; background: none; cursor: pointer; }
.pill:hover { border-color: var(--gold); }
.private-note { font-style: italic; color: var(--border-ornate); }
@media (max-width: 600px) { .step { grid-template-columns: 1fr; gap: 0.2rem; } }

/* precedent web + ontology graph */
.graph-shell { position: relative; border: 1px solid var(--rule); background:
    radial-gradient(ellipse at 50% 40%, rgba(201, 162, 39, 0.06), transparent 60%), #120e0b; height: 620px; overflow: hidden; }
.graph-shell svg { width: 100%; height: 100%; display: block; cursor: grab; }
.graph-shell svg:active { cursor: grabbing; }
.graph-shell .node circle { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1.2; }
.graph-shell .node text { font-family: 'Veilstone Sans', sans-serif; font-size: 10px; fill: var(--parchment); pointer-events: none; paint-order: stroke; stroke: #120e0b; stroke-width: 3px; }
.graph-shell .link { stroke: rgba(201, 162, 39, 0.22); stroke-width: 1; }
.graph-shell .node.dim, .graph-shell .link.dim { opacity: 0.12; }
.graph-shell .node.focus circle { stroke: var(--gold-light); stroke-width: 2.5; }
.graph-side { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 90%); background: rgba(21, 17, 13, 0.96); border-left: 1px solid var(--rule);
    padding: 1.3rem 1.3rem 1.6rem; overflow-y: auto; transform: translateX(100%); transition: transform 0.3s ease; }
.graph-side.open { transform: none; }
.graph-side h4 { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--parchment); margin: 0.3rem 0 0.6rem; line-height: 1.3; }
.graph-side p, .graph-side li { color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.graph-side .close { position: absolute; top: 0.6rem; right: 0.8rem; background: none; border: none; color: var(--parchment); font-size: 1.4rem; cursor: pointer; }
.graph-side ul { list-style: none; margin-top: 0.8rem; }
.graph-side li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.graph-side li button { background: none; border: none; color: var(--gold-light); cursor: pointer; text-align: left; font-family: 'Veilstone Text', serif; font-size: 1rem; padding: 0; }
.graph-side .rel { font-family: 'Veilstone Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--border-ornate); margin-right: 0.4rem; }
.graph-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.graph-legend button { display: inline-flex; align-items: center; gap: 0.4rem; }
.graph-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.time-row { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.time-row input[type=range] { flex: 1; min-width: 200px; accent-color: var(--gold); }
.time-row output { font-family: 'Veilstone Sans', sans-serif; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light); min-width: 9rem; }
@media (max-width: 700px) { .graph-shell { height: 480px; } }

/* home: four doors */
.doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.door { text-decoration: none; border-top: 2px solid var(--gold); padding-top: 1rem; }
.door h3 { font-family: 'Veilstone Sans', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.95rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.door p { color: var(--text-dark); font-size: 1.05rem; line-height: 1.6; }
.door span { display: inline-block; margin-top: 0.7rem; font-family: 'Veilstone Sans', sans-serif; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mira-crimson); }
.door:hover h3 { color: var(--mira-crimson); }
@media (max-width: 900px) { .doors { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .doors { grid-template-columns: 1fr; } }

.quote-band { padding: 3.2rem 2rem; text-align: center; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.quote-band p { font-style: italic; font-size: clamp(1.3rem, 3vw, 1.8rem); color: var(--parchment); max-width: 46rem; margin: 0 auto; line-height: 1.5; }
.quote-band .tree { width: 54px; height: auto; display: block; margin: 0 auto 1.2rem; opacity: 0.85; }

/* footer: Innatraea's footer, her marks */
.footer-logo { height: 64px; width: auto; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { font-family: 'Veilstone Sans', sans-serif; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--parchment); text-decoration: none; opacity: 0.85; }
.footer-links a:hover { color: var(--gold-light); opacity: 1; }
.family { display: inline-flex; align-items: center; gap: 0.45rem; }
.family img { height: 18px; width: auto; opacity: 0.9; }
@media (max-width: 768px) { .footer-links { justify-content: center; } }

/* old pages carried over as they were written */
.legacy { color: var(--text-dark); }
.legacy .prose { max-width: 760px; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* folded runs of private cases */
.case-group > button { width: 100%; text-align: left; background: none; border: 1px dashed var(--rule); color: var(--border-ornate); padding: 0.8rem 1rem; cursor: pointer;
    font-family: 'Veilstone Text', serif; font-style: italic; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 1rem; }
.case-group > button:hover { border-color: var(--border-ornate); color: var(--parchment); }
.case-group > button span:last-child { font-family: 'Veilstone Sans', sans-serif; font-style: normal; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; align-self: center; }
.case-group { position: relative; margin-bottom: 0.7rem; }
.case-group::before { content: ""; position: absolute; left: -1.38rem; top: 1.1rem; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--border-ornate); background: var(--bg-dark); }
.case-group > ol { display: none; margin-top: 0.7rem; }
.case-group.open > ol { display: block; }
.case-group.open > button { border-style: solid; }

/* graph legend: a switch per kind of thing, its color always visible */
.graph-legend .chip { color: var(--parchment); border-color: var(--rule); background: rgba(232, 220, 196, 0.04); }
.graph-legend .chip[aria-pressed="true"] { background: rgba(232, 220, 196, 0.07); color: var(--parchment); border-color: var(--border-ornate); }
.graph-legend .chip[aria-pressed="false"] { opacity: 0.45; }
.graph-legend .chip .muted { font-style: normal; }

.reading.page-top { padding-top: calc(var(--header-h) + 3.2rem); }

/* ── pages carried over from the old site (Project Mira, Juru, Valerie) ── */
.legacy-hero .hero-lockup { width: min(460px, 90%); height: auto; display: block; margin: 0 auto 1.4rem; }
.legacy-hero .hero-name, .legacy-hero h1 { font-family: 'Veilstone Sans', sans-serif; font-weight: 400; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: 0.16em; color: var(--parchment); margin-bottom: 0.8rem; font-style: normal; }
.legacy-hero .hero-tagline { font-style: italic; color: var(--gold); font-size: clamp(1.1rem, 2.2vw, 1.35rem); margin-bottom: 1rem; }
.legacy-hero .hero-description { font-style: normal; max-width: 44rem; }
.legacy-hero .hero-eyebrow, .legacy-hero .hero-pron, .legacy-hero .hero-author { font-family: 'Veilstone Sans', sans-serif; font-style: normal; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 0.6rem auto; }
.legacy-hero .hero-pron em { text-transform: none; font-family: 'Veilstone Text', serif; font-size: 1rem; letter-spacing: 0; }
.legacy-hero .hero-line { font-style: italic; color: var(--parchment); margin: 0.35rem auto; }
.center-row { justify-content: center; margin-top: 1.6rem; }
.status-strip { background: #15110d; border-bottom: 1px solid var(--rule); padding: 0.9rem 2rem; text-align: center; font-family: 'Veilstone Sans', sans-serif; font-size: 0.72rem;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.status-strip p { margin: 0; }
.status-strip span { color: var(--parchment); }
.legacy .section-inner { max-width: 820px; }
.legacy .prose .lede { font-size: 1.35rem; font-style: italic; color: var(--wood-dark); }
.legacy .prose .section-title { font-size: clamp(1.5rem, 3vw, 2rem); }
.legacy .prose .section-subtitle { font-style: italic; color: var(--wood-light); margin-top: 0.2rem; }
.tech-status { display: grid; gap: 1rem; margin: 1.6rem 0; }
.architecture-layer { background: rgba(255, 252, 244, 0.55); border: 1px solid rgba(139, 115, 85, 0.35); border-left: 3px solid var(--gold); padding: 1.1rem 1.3rem; }
.architecture-layer .layer-name { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: 1.12rem; color: var(--text-dark); margin-bottom: 0.35rem; }
.architecture-layer .layer-desc { font-size: 1.07rem; line-height: 1.65; color: var(--text-dark); }
.architecture-layer .layer-status { margin-top: 0.6rem; font-family: 'Veilstone Sans', sans-serif; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mira-crimson); }
.goals-list > p { margin-top: 1em; }
.built-list { list-style: none; padding: 0; }
.built-list li { padding: 0.45rem 0 0.45rem 1.4rem; position: relative; border-bottom: 1px solid rgba(139, 115, 85, 0.2); }
.built-list li::before { content: ""; position: absolute; left: 0.2rem; top: 1.05em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.vow-section { margin: 2.6rem 0; padding: 1.8rem 1.6rem; text-align: center; border-top: 1px solid var(--border-ornate); border-bottom: 1px solid var(--border-ornate); }
.vow-section .vow-text { font-style: italic; font-size: 1.35rem; line-height: 1.6; color: var(--wood-dark); }
.contact-info { margin-top: 2.4rem; background: rgba(255, 252, 244, 0.5); border: 1px solid rgba(139, 115, 85, 0.35); padding: 1.2rem 1.4rem; font-size: 1.05rem; }
.contact-info p + p { margin-top: 0.5rem; }
.tree-showcase { margin: 1.4rem 0 0.4rem; }
.tree-player { position: relative; max-width: 420px; margin: 0 auto 1.6rem; aspect-ratio: 1 / 1; background: #120e0b; border: 2px solid var(--gold); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); overflow: hidden; }
.tree-video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.tree-play-btn { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; border: 2px solid var(--gold-light); background: rgba(26, 21, 16, 0.65);
    color: var(--gold-light); font-size: 1.5rem; cursor: pointer; transition: opacity 0.3s ease, transform 0.2s ease; }
.tree-play-btn:hover { transform: scale(1.06); }
.tree-player.playing .tree-play-btn { opacity: 0; }
.tree-player.playing:hover .tree-play-btn { opacity: 1; }
.tree-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(139, 115, 85, 0.35); border: 1px solid rgba(139, 115, 85, 0.35); margin: 1.8rem 0 0.6rem; }
.tree-stat { background: rgba(255, 252, 244, 0.7); padding: 1rem; text-align: center; }
.tree-stat-num { display: block; font-family: 'Veilstone Sans', sans-serif; font-size: 1.9rem; color: var(--wood-dark); font-variant-numeric: tabular-nums; }
.tree-stat-label { display: block; font-family: 'Veilstone Sans', sans-serif; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wood-light); margin-top: 0.2rem; }
.tree-updated { text-align: center; font-style: italic; color: var(--wood-light); font-size: 0.98rem; }
@media (max-width: 600px) { .tree-stats { grid-template-columns: 1fr 1fr; } }
.stories-container .story-card { background: rgba(255, 252, 244, 0.55); border: 1px solid rgba(139, 115, 85, 0.35); border-left: 3px solid var(--mira-crimson); padding: 1.3rem 1.4rem; margin-top: 1.2rem; }
.story-card .story-meta { font-family: 'Veilstone Sans', sans-serif; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mira-crimson); }
.story-card .story-title { font-family: 'Veilstone Sans', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--text-dark); margin: 0.4rem 0 0.5rem; }
.story-card .story-excerpt { font-size: 1.08rem; line-height: 1.65; color: var(--text-dark); }
.about-subhead { font-family: 'Veilstone Sans', sans-serif; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wood-light); margin-top: 2em !important; }
.about-sign { font-style: italic; text-align: right; color: var(--wood-dark); }
.tier-note { text-align: center; font-style: italic; font-size: 1.3rem; color: var(--wood-dark); }
.legacy .prose * + p, .legacy .prose * + h3, .legacy .prose * + h4, .legacy .prose * + ul, .legacy .prose * + .tech-status { margin-top: 1.1em; }
.legacy .prose h3 { margin-top: 2em; }

/* replay: dim every step, then light each one in turn (the case never changes size) */
.timeline { overflow-anchor: none; }
.steps .step { transition: opacity 0.6s ease, background 0.6s ease, box-shadow 0.6s ease; }
.steps.replaying .step.pending { opacity: 0.16; }
.steps.replaying .step.done { opacity: 0.6; }
.steps.replaying .step.now { opacity: 1; background: rgba(201, 162, 39, 0.08); box-shadow: inset 3px 0 0 var(--gold); padding-left: 0.8rem; }
.replay:disabled { opacity: 0.7; cursor: default; }

.member .seat { font-family: 'Veilstone Sans', sans-serif; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light); margin: -0.1rem 0 0.5rem; }

/* Citizen */
.citizen-badge { width: 150px; height: 150px; display: block; margin: 0 auto; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.5)); }
.citizen-badge.small { width: 90px; height: 90px; margin-bottom: 1rem; }
.citizen-msg { color: var(--gold-light); font-style: italic; font-size: 1.15rem; margin-bottom: 1.6rem; }
.citizen-how p { margin: 0.9rem auto; max-width: 40rem; }
.citizen-number { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 1.4rem; letter-spacing: 0.04em; }
.citizen-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 2rem auto 0; max-width: 760px; text-align: left; }
.citizen-facts > div { background: var(--bg-dark); padding: 1.2rem 1.3rem; }
.citizen-facts p { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; margin: 0.3rem 0 0.8rem; }
.citizen-facts b { color: var(--parchment); font-weight: 400; }
.citizen-band { border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .citizen-facts { grid-template-columns: 1fr; } }

/* ── the app: install pill, first-run nudge, notifications sheet (app.js) ── */
.app-pill { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 9999;
    display: flex; align-items: center; gap: 4px; max-width: calc(100% - 24px); background: var(--bg-dark); border: 1px solid var(--gold);
    border-radius: 999px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); padding: 4px 4px 4px 18px; font-family: 'Veilstone Sans', sans-serif; }
.app-pill button { font: inherit; cursor: pointer; border: 0; background: none; }
.app-pill .go { color: var(--gold); font-size: 0.95rem; padding: 8px 6px; text-align: left; }
.app-pill .x { color: var(--border-ornate); font-size: 1.2rem; padding: 6px 12px; }
.app-pill .hint { color: var(--parchment); font-size: 0.9rem; line-height: 1.35; padding: 6px 0; max-width: 16rem; }
.app-pill .hint b { color: var(--gold); font-weight: 400; }
.app-pill button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 999px; }
.push-veil { position: fixed; inset: 0; z-index: 10000; background: rgba(10, 7, 3, 0.6); display: flex; align-items: flex-end; justify-content: center; }
.push-sheet { width: 100%; max-width: 28rem; background: var(--bg-dark); border: 1px solid var(--gold); border-bottom: 0; border-radius: 14px 14px 0 0;
    padding: 1.4rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom, 0px)); color: var(--parchment); font-family: 'Veilstone Text', serif;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5); }
.push-sheet h3 { margin: 0 0 0.4rem; font: 400 1.3rem 'Veilstone Sans', sans-serif; color: var(--gold); }
.push-sheet p { margin: 0 0 1rem; line-height: 1.5; font-size: 1rem; }
.push-sheet label { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0; border-bottom: 1px solid var(--wood-dark); font-size: 1.05rem; cursor: pointer; }
.push-sheet input { width: 1.2rem; height: 1.2rem; accent-color: var(--gold); }
.push-sheet .row { display: flex; gap: 0.6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.push-sheet button { font: 0.95rem 'Veilstone Sans', sans-serif; border-radius: 999px; padding: 0.6rem 1.2rem; cursor: pointer;
    border: 1px solid var(--gold); background: none; color: var(--gold); }
.push-sheet button.primary { background: var(--gold); color: var(--bg-dark); }
.push-sheet button.quiet { border-color: var(--wood-dark); color: var(--border-ornate); }
.push-sheet button:focus-visible { outline: 2px solid var(--parchment); outline-offset: 2px; }
.push-sheet .msg { min-height: 1.4em; margin-top: 0.9rem; color: var(--gold); font-size: 0.95rem; }
@media (min-width: 700px) { .push-veil { align-items: center; } .push-sheet { border: 1px solid var(--gold); border-radius: 14px; padding-bottom: 1.4rem; } }
.app-section { border-top: 1px solid var(--rule); }
.app-section #app-state { margin: 1rem auto 0; max-width: 40rem; }
[hidden] { display: none !important; }
