/* =============================================================================
   Bauls — styles for the static BAULS site
   One orange page, black ink, cream eyes. Everything sits on a full-viewport
   "stage"; reading areas scroll or paginate inside it (the window never scrolls).
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --orange: #ec673a;        /* page background, theme-color */
  --ink: #000;              /* text, artwork, buttons */
  --cream: #fff2d8;         /* eyes, button text, socials on the ink */
  --panel: #080808;         /* onchain popover */
  --rule: #0004;            /* hairlines (black @ 27%) */
  --rule-soft: #0003;       /* lighter hairlines (black @ 20%) */
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.2, .7, .2, 1);
  --font: 'Bricolage Grotesque', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

/* @font-face for Bricolage Grotesque lives in assets/fonts/fonts.css (linked before this file). */

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--orange);
  color: var(--ink);
}
body { font-family: var(--font); font-optical-sizing: auto; }
svg { display: block; overflow: visible; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- Stage ---------- */
#stage {
  --page-left: clamp(28px, 8vw, 150px);
  --page-top: clamp(28px, 5vh, 64px);
  width: 100%;
  height: 100%;
  position: relative;
  isolation: isolate;
  overflow: clip;
}
#stage a, #stage button { text-decoration: none; }
@media (max-aspect-ratio: 4/5) { #stage { --page-left: 24px; --page-top: 22px; } }
/* Keep content hidden until main.js has fitted the text around Bauls. */
html.js #stage[data-page='home']:not([data-navigation='ready']) .bauls-home { visibility: hidden; }

/* ---------- Scenery: the tide and the big Bauls ---------- */
.scene { width: 100%; height: 100%; }
.bauls-traveler, .bauls-tide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: 0 0;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.bauls-hit-area, .bauls-traveler ellipse:not(.eyelid-aperture), .bauls-tide path { pointer-events: fill; cursor: default; }

/* Home: full size, above the reading column. */
#stage[data-page='home'] .bauls-traveler, #stage[data-page='home'] .bauls-tide { z-index: 2; }
@media (min-width: 800px) and (max-height: 850px) {
  #stage[data-page='home'] .bauls-tide { transform: translateY(clamp(0px, calc((850px - 100svh) * 1.4), 90px)); }
  #stage[data-page='home'] .bauls-traveler { transform: translateY(clamp(0px, calc(850px - 100svh), 70px)); }
}
/* Reading pages: a small Bauls in the corner and a lowered tide. */
#stage:not([data-page='home']) .bauls-traveler { transform: scale(.27); transform-origin: 100% 100%; z-index: 1; pointer-events: none; }
#stage:not([data-page='home']) .bauls-tide { transform: translateY(20vh); z-index: 1; pointer-events: none; }
#stage:has(> .bauls-page:is([data-layout='journal'], [data-layout='article'])) :is(.bauls-traveler, .bauls-tide) { visibility: hidden; }
@media (max-width: 799px) {
  #stage:not([data-page='home']) :is(.bauls-traveler, .bauls-tide) { opacity: 0; }
}

/* ---------- Brand mark (home link) ---------- */
[data-bauls-brand] {
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
[data-bauls-brand] svg { transition: transform 180ms var(--ease-soft); transform-origin: center; }
[data-bauls-brand]:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) { [data-bauls-brand]:hover svg { transform: translateY(-1px) scale(1.04); } }
[data-bauls-brand]:active svg { transform: scale(.96); }

.page-brand { display: flex; align-items: center; gap: 8px; color: inherit; font-size: 25px; font-weight: 550; letter-spacing: -.04em; }
.page-brand svg { width: 50px; height: 50px; fill: var(--ink); flex: none; }

/* ---------- Ink transition (canvas) ---------- */
#bauls-ink-transition { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
#bauls-ink-transition.is-active { pointer-events: auto; }
html[data-brand-arrival]::after { content: ''; position: fixed; inset: 0; background: var(--ink); z-index: 19; pointer-events: none; }

/* =============================================================================
   Entrance (intro.html)
   ========================================================================== */
.bauls-entry { position: absolute; inset: 0; z-index: 5; overflow: clip; background: var(--orange); user-select: none; -webkit-user-select: none; }
.intro-scene { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#intro-bauls { pointer-events: visiblePainted; cursor: pointer; outline: none; }
#intro-bauls:focus-visible .bauls-ink { stroke: var(--cream); stroke-width: 2.5px; }

/* =============================================================================
   Home (index.html)
   ========================================================================== */
#stage[data-page='home'] { cursor: default; }
#stage[data-page='home'], #stage[data-page='home'] * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#stage[data-page='home'] :is(a, button) { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#stage[data-page='home'] button:disabled { cursor: default; }
#stage[data-page='home'] :is(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (min-width: 800px) { #stage[data-page='home'] { --page-left: clamp(68px, 8vw, 150px); } }

.home-return { position: absolute; left: calc(var(--page-left) - 3px); top: var(--page-top); z-index: 4; width: 60px; height: 60px; display: grid; place-items: center; }
.page-brand.home-return svg { width: 60px; height: 60px; }
.home-return:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* Two columns: the reading column (copy, diagram, journal) and the hooks. */
.bauls-home {
  --copy-size: clamp(17px, 1.3vw, 19px);
  --copy-leading: 1.5;
  position: absolute;
  z-index: 1;
  left: var(--page-left);
  top: calc(var(--page-top) + 76px);
  bottom: 0;
  width: calc(100% - var(--page-left) * 2);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: stretch;
  overflow: hidden;
  padding: 0 6px 0 0;
}
.bauls-home a { color: inherit; }
.home-main {
  min-width: 0; min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-width: none;
}
.home-main::-webkit-scrollbar { display: none; }

/* Copy: justified, newspaper style, with a serif drop cap. */
.home-copy { width: 100%; margin-bottom: 24px; font-size: var(--copy-size); line-height: var(--copy-leading); letter-spacing: -.01em; }
.home-copy :is(h1, p) { display: flow-root; margin: 0 0 16px; }
.home-copy :is(h1, p), .home-entries p { text-align: justify; text-align-last: start; text-wrap: pretty; hyphens: none; }
.home-copy p:last-child { margin-bottom: 0; }
.home-copy .home-intro { display: flow-root; font: inherit; letter-spacing: inherit; margin-bottom: 16px; }
.home-copy .home-intro:focus { outline: none; }
.home-copy .home-conversation { margin-bottom: 8px; }
.home-copy a { border: 0; transition: opacity .2s; }
.home-copy a:hover { opacity: .65; }
.drop-cap { float: left; font-family: var(--font-serif); font-weight: 400; font-size: 4.45em; line-height: .76; margin: .07em .12em 0 0; }
/* Invisible float whose shape-outside follows Bauls's head (set by main.js). */
.bauls-text-contour { display: block; float: right; width: 0; height: 0; pointer-events: none; }
.home-x-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.2em; height: 1.2em; vertical-align: -.2em; line-height: 1; }
.home-x-link::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.home-x-link svg { width: .95em; height: 1em; fill: currentColor; }
.home-x-link:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; border-radius: 2px; }

/* Token architecture diagram. */
.home-visual { --graph-line: 14px; --graph-leaf: 74px; width: 100%; max-width: 440px; margin: 32px auto 36px; text-align: center; }
.contract-illustration { margin: 0; }
.contract-shell { color: var(--ink); }
.contract-token { width: fit-content; max-width: 100%; margin: 0 auto; padding: 13px 18px; background: var(--ink); color: var(--orange); border-radius: 4px; text-align: center; }
.contract-token strong { display: block; font-size: 34px; font-weight: 550; line-height: 1; letter-spacing: -.05em; }
.contract-link { height: var(--graph-line); position: relative; }
.contract-link::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1.25px solid currentColor; }
.contract-pool { width: max-content; margin: 0 auto; padding: 7px 14px; border: 1.25px solid currentColor; border-radius: 4px; font-size: 14px; line-height: 1.2; }
.contract-hook-bay > header { display: flex; align-items: center; justify-content: center; min-height: 44px; }
.contract-hook-bay h2 { font-size: 25px; font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.03em; }
.contract-modules { --branch-space: 14px; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: var(--branch-space); }
.contract-modules::before { content: ''; position: absolute; top: 0; left: calc((100% - 24px) / 8); right: calc((100% - 24px) / 8); border-top: 1.25px solid currentColor; }
.contract-branch { min-width: 0; position: relative; }
.contract-branch::before { content: ''; position: absolute; top: calc(-1 * var(--branch-space)); left: 50%; height: var(--branch-space); border-left: 1.25px solid currentColor; }
.contract-module { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; height: var(--graph-leaf); padding: 7px 4px; border: 1.25px solid var(--ink); border-radius: 4px; color: var(--ink); font-size: 12px; font-weight: 450; line-height: 1.2; }
.contract-module svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.contract-module span { display: flex; align-items: center; justify-content: center; min-height: 2.4em; max-width: 100%; }
.contract-module-slot { height: var(--graph-leaf); min-width: 0; background: var(--ink); border: 1.25px solid var(--ink); border-radius: 4px; overflow: hidden; }
.contract-module-example { height: 100%; border: 0; border-radius: 0; color: var(--orange); will-change: transform, opacity; }

/* Section headers shared by "Active hooks in me" and "Journal". */
.home-hooks h2, .home-journal h2 { font-size: 25px; line-height: 1.1; font-weight: 500; letter-spacing: -.03em; margin: 0; }
.home-hooks h2 a, .home-journal h2 a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.home-journal h2 a:hover { opacity: .65; }
.journal-controls { display: flex; align-items: center; gap: 2px; }
.journal-controls button { display: grid; place-items: center; width: 44px; height: 36px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: opacity .2s; }
.journal-controls button:disabled { opacity: .22; cursor: default; }
.journal-controls button:not(:disabled):hover { opacity: .6; }
.journal-controls button:focus-visible { outline: 1px solid currentColor; outline-offset: 1px; border-radius: 3px; }
.journal-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.home-hooks a:focus-visible, .home-journal a:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; border-radius: 2px; }

/* Hooks column: paged list sized to the space above Bauls. */
.home-hooks { min-width: 0; min-height: 0; align-self: start; margin: 0; overflow: clip; padding: 0 4px 8px; }
.home-hooks header { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 18px; text-align: center; }
.home-hooks .hook-controls button { height: 44px; }
.home-hooks .hook-controls[hidden] { display: none; }
.hook-page-position { min-width: 40px; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.home-hook-window { overflow: clip; }
.home-hook-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 15px; }
.home-hook-links a { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 44px; padding: 2px 0; font-size: 19px; line-height: 1.25; text-align: left; text-decoration: none; }
.home-hook-name { position: relative; font-weight: 500; letter-spacing: -.015em; }
/* Underline that wipes in on hover. */
.home-hook-name::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .24s var(--ease-out); }
.home-hook-links a:is(:hover, :focus-visible) .home-hook-name::after { transform: scaleX(1); }
.home-hook-description { margin: 0; font-size: 14.5px; font-weight: 400; line-height: 1.45; text-wrap: pretty; }


/* Journal: one entry at a time. */
.home-journal header { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 16px; }
.home-journal-window { overflow: clip; }
.home-entries { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.home-entries a { display: flow-root; text-decoration: none; }
.home-entries a:focus-visible { outline-offset: -1px; }
.home-entries .entry-date { display: block; font-size: 14px; margin-bottom: 7px !important; }
.home-entries .entry-date time { margin-left: 8px; }
.home-entries h3 { font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -.015em; margin: 0 0 10px; }
.home-entries p { font-size: 17px; line-height: 1.5; letter-spacing: -.01em; margin: 0; overflow-wrap: break-word; }
.home-entries a:hover h3 { opacity: .65; }

/* Socials + token address, placed on the black tide under Bauls's eyes. */
.bauls-socials { position: absolute; left: var(--socials-left, 81.5%); bottom: clamp(18px, 3.5vh, 42px); transform: translateX(-50%); display: flex; align-items: center; gap: 4px; color: var(--cream); z-index: 4; }
.bauls-socials a, .onchain-trigger { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: inherit; text-decoration: none; transition: opacity .2s; }
.onchain-trigger { border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.onchain-trigger svg { display: block; width: 20.57px; height: 32px; fill: currentColor; }
.bauls-socials a svg { width: 31.31px; height: 32px; fill: currentColor; }
.bauls-socials a:hover, .onchain-trigger:hover { opacity: .72; }
.bauls-socials a:focus-visible, .onchain-trigger:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; border-radius: 4px; }

.contract-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 1px; border: 0; background: none; color: inherit; font: inherit; font-size: 15px; line-height: 20px; letter-spacing: -.015em; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.contract-copy:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; border-radius: 4px; }
/* Clipboard icon morphs into a drawn check mark after copying. */
.copy-glyph { display: block; position: relative; width: 18px; height: 20px; flex: none; }
.bauls-socials .copy-glyph svg { position: absolute; inset: 0; width: 18px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: opacity .24s ease, transform .3s var(--ease-out); transform-origin: center; }
.clipboard-mark { opacity: 1; transform: translateY(0) scale(1); }
.copied-mark { opacity: 0; transform: translateY(4px) scale(.75); }
.contract-copy[data-copied='true'] .clipboard-mark { opacity: 0; transform: translateY(-4px) scale(.75); }
.contract-copy[data-copied='true'] .copied-mark { opacity: 1; transform: translateY(0) scale(1); }
.copied-mark path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .3s ease; }
.contract-copy[data-copied='true'] .copied-mark path { stroke-dashoffset: 0; transition-delay: .06s; }
.copy-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.copy-status[data-error='true'] { bottom: calc(100% + 6px); left: 0; width: auto; height: auto; overflow: visible; clip-path: none; font-size: 14px; line-height: 1.4; }

/* "Onchain" popover (native popover API). */
.onchain-panel { position: fixed; inset: auto; margin: 0; padding: 18px 20px 12px; width: 244px; max-width: calc(100vw - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--panel); color: #fff; border: 1px solid #ffffff29; border-radius: 12px; box-shadow: 0 12px 36px #0003; font: inherit; scrollbar-width: thin; scrollbar-color: #ffffff4d transparent; }
.onchain-panel h2 { margin: 0 0 8px; font-size: 20px; font-weight: 500; line-height: 1.3; }
.onchain-panel nav { display: grid; }
.onchain-panel a { display: flex; align-items: center; min-height: 42px; padding: 8px 0; color: inherit; font-size: 16px; line-height: 1.35; text-decoration: none; transition: opacity .18s; }
.onchain-panel a:hover { opacity: .65; }
.onchain-panel a:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; border-radius: 2px; }

/* ---------- Home: responsive ---------- */
@media (max-width: 1150px) and (min-aspect-ratio: 4/5) {
  #stage { --page-left: clamp(24px, 4vw, 50px); }
  .bauls-home { gap: 44px; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); }
  .home-entries { gap: 20px; }
  .home-entries h3 { font-size: 21px; }
}
@media (max-aspect-ratio: 4/5) {
  .bauls-home { --copy-size: 19px; --copy-leading: 1.48; }
  .home-entries { grid-template-columns: 1fr; gap: 22px; }
  .home-journal header { margin-bottom: 19px; }
  .bauls-socials { bottom: 18px; gap: 4px; }
}
/* Laptop heights: tighten the type so a whole journal entry fits above the tide. */
@media (min-width: 800px) and (max-height: 950px) {
  #stage[data-page='home'] { --page-top: 14px; }
  .bauls-home { --copy-size: 16.5px; --copy-leading: 1.45; }
  .home-copy { margin-bottom: 16px; }
  .home-copy :is(h1, p), .home-copy .home-intro { margin-bottom: 12px; }
  .drop-cap { font-size: 4.1em; }
  .home-hooks header { margin-bottom: 14px; }
  .home-hook-links { gap: 16px; }
  .home-hook-links a { font-size: 18px; }
  .home-hook-description { font-size: 14px; line-height: 1.4; }
  .home-visual { --graph-line: 9px; --graph-leaf: 58px; max-width: 400px; margin-block: 18px 22px; }
  .contract-token { padding: 10px 15px; }
  .contract-token strong { font-size: 28px; }
  .contract-pool { padding-block: 6px; }
  .contract-modules { --branch-space: 12px; }
  .home-hooks h2, .home-journal h2, .contract-hook-bay h2 { font-size: 23px; }
  .contract-hook-bay > header { min-height: 32px; }
  .home-hooks h2 a, .home-journal h2 a { min-height: 32px; }
  .journal-controls button { height: 28px; }
  .home-journal header { gap: 0; margin-bottom: 9px; }
  .home-entries h3 { font-size: 20px; margin-bottom: 8px; }
  .home-entries p { font-size: 15.5px; line-height: 1.45; }
}
@media (min-width: 800px) and (max-aspect-ratio: 4/5) {
  .bauls-home { grid-template-columns: minmax(0, 1.25fr) minmax(280px, .85fr); gap: 44px; }
}
@media (min-width: 800px) and (max-height: 780px) {
  .bauls-home { --copy-size: 15.5px; --copy-leading: 1.4; }
  .home-copy { margin-bottom: 10px; }
  .home-copy :is(h1, p), .home-copy .home-intro { margin-bottom: 9px; }
  .home-hooks header { margin-bottom: 12px; }
  .home-hook-links { gap: 14px; }
  .home-hooks h2, .home-journal h2, .contract-hook-bay h2 { font-size: 22px; }
  .home-journal header { margin-bottom: 5px; }
  .journal-controls button { height: 24px; }
  .home-entries .entry-date { margin-bottom: 4px !important; font-size: 13px; }
  .home-entries h3 { font-size: 19px; margin-bottom: 5px; }
  .home-entries p { font-size: 15px; line-height: 1.4; }
}
/* Phones and narrow tablets: one scrolling column; text stops above Bauls. */
@media (max-width: 799px) {
  #stage { --page-left: 24px; }
  .bauls-home { width: calc(100% - 48px); display: block; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; scroll-padding-block: 20px 28vh; padding: 0; }
  .bauls-home::-webkit-scrollbar { display: none; }
  .home-main { overflow: visible; padding-bottom: clamp(220px, 50vw, 430px); }
  .home-hooks { margin: 0 0 40px; padding: 0; overflow: visible; }
  .home-hook-links { gap: 24px; }
  .home-hook-links a { font-size: 20px; min-height: 44px; }
  .home-hook-description { font-size: 16px; line-height: 1.5; }
  .home-visual { max-width: 410px; margin: 36px auto 40px; }
  .journal-controls button { height: 44px; }
  .home-copy :is(h1, p), .home-entries p { text-align: start; }
}
@media (max-width: 600px) {
  #stage[data-page='home'] { --page-left: max(20px, env(safe-area-inset-left)); --page-top: max(22px, env(safe-area-inset-top)); }
  .bauls-home { --copy-size: 18px; --copy-leading: 1.5; width: calc(100% - var(--page-left) - max(20px, env(safe-area-inset-right))); }
  .bauls-socials { bottom: max(4px, env(safe-area-inset-bottom)); gap: 2px; }
  .contract-copy { font-size: 14px; gap: 6px; }
}
@media (max-width: 360px) { #stage[data-page='home'] .bauls-socials { bottom: env(safe-area-inset-bottom, 0px); } }

/* =============================================================================
   Reading pages (hooks.html, journal.html, hook-*.html, journal-*.html, …)
   ========================================================================== */
.bauls-page { position: absolute; inset: 0; pointer-events: none; z-index: 2; user-select: none; -webkit-user-select: none; cursor: default; }
.bauls-page a { color: inherit; }
.bauls-page a:focus-visible, .bauls-page button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; border-radius: 3px; }

.bauls-page-header { position: absolute; left: clamp(20px, 5vw, 80px); right: clamp(20px, 5vw, 80px); top: 16px; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 24px; pointer-events: auto; }
.bauls-page-header > nav { display: flex; align-items: center; gap: 28px; }
.bauls-page-header > nav a { display: flex; align-items: center; min-height: 44px; font-size: 16px; opacity: .62; transition: opacity .18s; }
.bauls-page-header > nav a:is(:hover, [aria-current='page']) { opacity: 1; }

/* The reading surface: heading, summary, paged columns, references. */
.bauls-page-body { position: absolute; inset: 92px clamp(24px, 6vw, 96px) 62px; max-width: 1320px; margin-inline: auto; display: flex; flex-direction: column; min-height: 0; padding: 0; font-size: 17px; line-height: 1.5; pointer-events: auto; }
.page-heading { flex: none; text-align: center; margin: 0 0 14px; }
.page-heading h1 { font-size: clamp(30px, 3.1vw, 44px); font-weight: 550; letter-spacing: -.05em; line-height: 1.1; margin: 0; outline: none; text-wrap: balance; }
.page-summary { flex: none; text-align: center; max-width: 86ch; margin: 0 auto 24px; }
.page-summary:empty { display: none; }
.page-summary .guide-lead { max-width: 86ch; margin: 0 auto; font-size: 18px; line-height: 1.5; }
.guide-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 25px; margin: 0 0 32px; }
.page-summary .guide-actions { justify-content: center; gap: 12px 24px; margin: 14px 0 0; }
#stage .guide-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--ink); border-radius: 5px; padding: 10px 17px; background: var(--ink); color: var(--cream); font: inherit; font-size: 15px; line-height: 1.35; cursor: pointer; transition: background .18s, color .18s; }
#stage .guide-button:hover { background: var(--cream); color: var(--ink); }
.guide-text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; border-bottom: 2px solid transparent; transition: border-color .2s; }
.guide-text-link:hover { border-color: currentColor; }

/* Paged columns: main.js slides .page-content sideways one window at a time. */
.guide-window { position: relative; flex: 1; min-height: 0; overflow: clip; outline: none; touch-action: pan-y; }
.guide-window:focus-visible { outline: 2px solid #0006; outline-offset: 5px; border-radius: 3px; }
.page-content { height: 100%; width: 100%; column-count: 2; column-gap: clamp(32px, 5vw, 72px); column-fill: balance; overflow: visible; transition: transform .23s var(--ease-out); }
.page-content > * { margin-top: 0; }
.page-content p { margin: 0 0 18px; font-size: 17px; line-height: 1.55; orphans: 3; widows: 3; }
.page-content h2 { font-size: 23px; font-weight: 500; letter-spacing: -.025em; line-height: 1.2; margin: 0 0 12px; break-after: avoid; }
.page-content h3 { font-size: 19px; font-weight: 500; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 6px; break-after: avoid; }

.reader-controls { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; height: 44px; margin: 14px 0 0; }
.reader-controls[data-single='true'] { visibility: hidden; height: 0; margin: 0; }
.reader-controls button { border: 0; background: none; color: inherit; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer; }
.reader-controls button:disabled { opacity: .22; cursor: default; }
.reader-controls button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reader-position { font-size: 13px; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }

.page-references { flex: none; text-align: center; margin-top: 22px; }
.page-references:empty { display: none; }
.source-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 34px 0 0; padding: 18px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.source-links a { min-height: 36px; display: inline-flex; align-items: center; }
.source-links a:hover { opacity: .6; }
.page-references .source-links { justify-content: center; gap: 10px 26px; margin: 0; padding: 0; border: 0; font-size: 13px; }

/* Index lists (Hooks, Journal) with chevrons. */
.hook-index, .journal-index { list-style: none; margin: 0; padding: 0; }
.hook-index li, .journal-index li { border-top: 1px solid var(--rule); min-width: 0; break-inside: avoid; }
.hook-index svg, .journal-index svg { width: 17px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .55; transition: transform .2s; }
.hook-index-link:hover svg, .journal-index a:hover > svg { transform: translateX(3px); opacity: 1; }
.hook-index-link:hover h2, .journal-index a:hover h2 { opacity: .65; }
.hook-index-link { height: 100%; padding: 16px 0 19px; display: grid; grid-template-columns: 22px 1fr 16px; gap: 10px; align-items: start; }
.hook-index-number { font-size: 12px; padding-top: 4px; opacity: .6; }
.page-content .hook-index h2, .page-content .journal-index h2 { font-size: 21px; margin: 0 0 9px; }
.page-content .hook-index h2 { line-height: 1.15; }
.page-content .hook-index p, .page-content .journal-index p { font-size: 15px; line-height: 1.5; margin: 0; text-wrap: pretty; }
.page-content .journal-index p { line-height: 1.55; }
.journal-index a { padding: 18px 0; display: grid; grid-template-columns: 83px 1fr 16px; gap: 16px; }
.journal-meta { display: flex; gap: 14px; align-items: baseline; font-size: 13px; margin: 0 0 20px; font-variant-numeric: tabular-nums; break-after: avoid; }
.journal-index .journal-meta { display: flex; flex-direction: column; gap: 4px; line-height: 1.5; margin: 0; font-size: 12px; }
.journal-index .journal-meta > span { font-size: 15px; }
@media (max-width: 1100px) and (min-width: 1000px) {
  .hook-index-number { display: none; }
}

/* Contract / Wallet / Posts blocks. */
.guide-section { margin: 0 0 28px; break-inside: avoid; }
.address-card { padding: 26px 0 8px; border-top: 1px solid var(--rule); }
.page-content .address-card h2 { font-size: 22px; }
.public-address { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.address-card .guide-actions { margin-bottom: 18px; }

/* ---------- Articles: hook pages and journal entries (one scrolling column) ---------- */
.bauls-page:is([data-layout='journal'], [data-layout='article']) { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; pointer-events: auto; }
.bauls-page:is([data-layout='journal'], [data-layout='article'])::-webkit-scrollbar { display: none; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .bauls-page-header { display: flex; left: 24px; right: auto; top: 14px; min-height: 44px; z-index: 1; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .bauls-page-header > nav { display: none; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .page-brand { width: 44px; height: 44px; justify-content: center; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .page-brand svg { width: 40px; height: 40px; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .bauls-page-body {
  position: relative;
  inset: auto;
  width: min(680px, calc(100% - 48px));
  max-width: none;
  margin-inline: auto;
  padding: clamp(40px, 7vh, 80px) 0 48px;
  display: block;
  overflow: visible;
}
.bauls-page:is([data-layout='journal'], [data-layout='article']) .page-heading { position: relative; margin: 0 0 32px; text-align: center; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .page-heading h1 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 550; line-height: 1.15; letter-spacing: -.035em; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .guide-window { overflow: visible; min-height: 0; flex: none; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .page-content { height: auto; columns: auto; transform: none; transition: none; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) :is(.journal-prose, .article-prose) { display: block; max-width: none; overflow-wrap: anywhere; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) :is(.journal-prose, .article-prose) p {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  text-align: justify;
  text-align-last: start;
  text-wrap: wrap;
  hyphens: auto;
  hyphenate-limit-chars: 8 4 4;
}
.bauls-page:is([data-layout='journal'], [data-layout='article']) :is(.journal-prose, .article-prose) p:last-child { margin-bottom: 0; }
/* A later note on a journal entry: the entry itself stays as written. */
.bauls-page .journal-prose p.journal-update { padding: 10px 14px; border: 1px solid var(--ink); border-radius: 5px; font-size: .9em; }
#stage :is(.journal-prose, .article-prose) p a { text-decoration: underline; text-underline-offset: 2px; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .page-references { margin-top: 28px; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) :is(.source-links, .journal-pagination) { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0 24px; margin: 0; padding: 0; border: 0; text-align: center; font-size: 14px; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .source-links:empty { display: none; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) .journal-pagination { margin-top: 6px; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) :is(.source-links, .journal-pagination) a { display: inline-flex; align-items: center; min-height: 44px; text-align: center; transition: opacity .18s ease; }
.bauls-page:is([data-layout='journal'], [data-layout='article']) :is(.source-links, .journal-pagination) a:hover { opacity: .6; }

/* Journal entry: date between newer/older arrows. */
.journal-date { display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 0 52px 8px; font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.journal-entry-controls { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; pointer-events: none; }
.journal-entry-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: inherit; pointer-events: auto; cursor: pointer; transition: opacity .18s ease, transform .18s ease; }
.journal-entry-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.journal-entry-arrow:disabled { opacity: .2; cursor: default; }
.journal-entry-arrow:hover { opacity: .6; }
.journal-entry-arrow[data-entry-step='-1']:hover { transform: translateX(-3px); }
.journal-entry-arrow[data-entry-step='1']:hover { transform: translateX(3px); }

/* Live Ethereum reading on hook pages (static snapshot in this port). */
.bauls-page[data-layout='article'] .hook-metric:empty { display: none; }
.live-stat { margin: 32px 0 0; padding: 0; min-height: 144px; border: 0; text-align: center; }
.page-content .live-stat h2 { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
.page-content .live-stat .live-value { font-size: clamp(28px, 3vw, 42px); font-weight: 550; line-height: 1.15; letter-spacing: -.04em; margin: 10px 0; min-height: 1.15em; font-variant-numeric: tabular-nums; }
.page-content .live-stat .live-detail { max-width: 540px; margin: 0 auto 8px; font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.live-stat small { font-size: 11px; opacity: .65; }

/* ---------- Reading pages: responsive ---------- */
@media (min-width: 1500px) {
  .page-content { column-count: 3; }
  .page-summary { max-width: 90ch; }
}
@media (max-width: 799px) {
  .bauls-page-body { inset: 86px 24px 40px; }
  .page-heading h1 { font-size: 32px; }
  .page-summary { margin-bottom: 20px; }
  .page-summary .guide-lead { font-size: 16px; line-height: 1.5; }
  .page-content { column-count: 1; column-gap: 24px; }
  .page-references { margin-top: 14px; }
  .page-references .source-links { gap: 0 16px; font-size: 12px; }
  .journal-index a { grid-template-columns: 1fr 16px; }
  .journal-index .journal-meta { grid-column: 1 / -1; flex-direction: row; }
  .bauls-page:is([data-layout='journal'], [data-layout='article']) .bauls-page-body { padding-top: 88px; }
  .page-content > .guide-section { break-inside: auto; }
}
@media (max-width: 600px) {
  .bauls-page-header { gap: 16px; }
  .page-brand { font-size: 22px; gap: 3px; }
  .page-brand svg { width: 40px; height: 40px; }
  .bauls-page-header > nav { gap: 17px; }
  .bauls-page-header > nav a { font-size: 14px; }
  .guide-actions { gap: 8px 18px; margin-bottom: 26px; }
  .journal-index .journal-meta { align-items: center; gap: 14px; margin: 0 0 3px; }
  .journal-index .journal-meta > span { font-size: 12px; }
  .public-address { font-size: 15px; }
}
@media (max-height: 650px) {
  .bauls-page-body { top: 76px; bottom: 24px; }
  .page-heading { margin-bottom: 10px; }
  .page-heading h1 { font-size: 29px; }
  .page-summary { margin-bottom: 14px; }
  .page-summary .guide-lead { font-size: 15px; }
  .page-summary .guide-actions { margin-top: 4px; }
  .page-references { margin-top: 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-bauls-brand] svg { transition: none; transform: none !important; }
  .journal-controls button, .bauls-socials a, .onchain-trigger, .onchain-panel a, .copy-glyph svg, .copied-mark path, .home-hook-name::after { transition: none !important; }
  .bauls-page *, .page-content { transition: none !important; }
  .journal-entry-arrow:hover { transform: none !important; }
}

/* =============================================================================
   Launch hooks (BAULS): simulated demos on hook-pair, hook-drop, hook-shrink, hook-burn.
   ========================================================================== */
.launch-demo { margin: 36px 0 0; padding: 22px 0 0; border-top: 1px solid var(--rule); text-align: center; }
.launch-demo-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.page-content .launch-demo h2 { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
.sim-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 10.5px; font-weight: 550; letter-spacing: .06em; text-transform: uppercase; }
.launch-stage { display: block; width: 100%; height: auto; margin: 10px auto 0; overflow: hidden; }
.launch-stage .lobe-label { font-size: 15px; fill: var(--ink); opacity: .7; }
.launch-stage .buyback-line { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 6; opacity: .55; }
.page-content .launch-demo .launch-day { margin: 6px 0 0; font-size: 13px; opacity: .75; font-variant-numeric: tabular-nums; }
.rivalry-table { width: 100%; margin: 10px 0 0; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.rivalry-table th, .rivalry-table td { padding: 10px 6px; border-top: 1px solid var(--rule); text-align: right; font-weight: 400; }
.rivalry-table thead th { border-top: 0; padding-top: 4px; font-size: 12px; opacity: .7; }
.rivalry-table :is(th, td):first-child { text-align: left; }
.rivalry-table tbody th { font-weight: 550; }
.rank-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 12px; }
.rank-badge.is-dropping { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.launch-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 18px 0 0; }
.page-content .launch-stats dt { font-size: 13px; line-height: 1.4; opacity: .8; }
.page-content .launch-stats dd { margin: 4px 0 0; font-size: clamp(22px, 2.4vw, 32px); font-weight: 550; line-height: 1.15; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.page-content .launch-demo .launch-status { max-width: 540px; min-height: 3em; margin: 14px auto 0; font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.launch-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin: 14px 0 0; }
#stage .launch-controls .guide-button.secondary { background: transparent; color: var(--ink); }
#stage .launch-controls .guide-button.secondary:hover { background: var(--ink); color: var(--cream); }
.page-content .launch-demo .launch-note { margin: 14px 0 0; padding: 0 12px; font-size: 11px; line-height: 1.5; opacity: .65; text-wrap: pretty; }
.pressure { max-width: 520px; margin: 12px auto 0; }
.pressure-meter { position: relative; height: 14px; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.pressure-fill { position: absolute; inset: 0 auto 0 0; width: 20%; background: var(--ink); transition: width .14s linear; }
.pressure-mark { position: absolute; top: 0; bottom: 0; left: 60%; width: 0; border-left: 2px dashed var(--cream); mix-blend-mode: difference; }
.pressure-label { display: block; margin: 12px 0 0; font-size: 13px; opacity: .8; }
.launch-slider { width: 100%; margin: 6px 0 0; accent-color: var(--ink); }
@media (max-width: 600px) {
  .launch-stats { gap: 10px 14px; }
  .rivalry-table { font-size: 13px; }
  .launch-stage .lobe-label { font-size: 30px; }
  .rivalry-table th, .rivalry-table td { padding: 8px 3px; }
}
@media (prefers-reduced-motion: reduce) { .pressure-fill { transition: none; } }
.launch-stage .puddle { fill: var(--ink); }
.launch-stage .puddle-outline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 7 7; opacity: .5; transition: opacity .4s; }
.launch-stage .drip { fill: var(--ink); }
.launch-stage .puddle-label { font-size: 15px; }
@media (max-width: 600px) { .launch-stage .puddle-label { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .launch-stage .puddle-outline { transition: none; } }
/* Live mode and status badges. */
.sim-tag.is-live { background: var(--ink); color: var(--cream); }
.launch-demo[data-mode="live"] .launch-stats dd { font-variant-numeric: tabular-nums; }
.hook-status { display: inline-block; margin-left: .35em; padding: .1em .55em; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 550; letter-spacing: .05em; line-height: 1.4; text-transform: uppercase; vertical-align: .2em; white-space: nowrap; }
.hook-status.is-later { opacity: .6; }
.later-banner { margin: 0 0 18px; padding: 12px 14px; border: 1px dashed var(--ink); border-radius: 6px; font-size: 14.5px; line-height: 1.45; text-wrap: pretty; }
.later-banner a { text-decoration: underline; text-underline-offset: 2px; }
.bauls-override-badge { position: fixed; left: 12px; bottom: 12px; z-index: 40; margin: 0; padding: 6px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 11px; letter-spacing: .02em; opacity: .85; pointer-events: none; }
/* Shrink: London weather over Bauls (rain cloud, sun, or a cloud with no fresh report) */
.weather-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px auto 0; }
#stage .weather-picker .guide-button { background: transparent; color: var(--ink); }
#stage .weather-picker .guide-button:hover, #stage .weather-picker .guide-button[aria-pressed='true'] { background: var(--ink); color: var(--cream); }
.launch-stage .weather-sky > g { transition: opacity .45s ease; }
.launch-stage .sky-cloud path { fill: var(--ink); }
.launch-stage .sky-sun circle { fill: var(--cream); }
.launch-stage .sky-sun .sun-rays line { stroke: var(--cream); stroke-width: 7; stroke-linecap: round; }
.launch-stage .sun-rays { animation: sun-turn 24s linear infinite; transform-box: fill-box; transform-origin: center; }
.launch-stage .sky-rain line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; animation: rain-fall .9s linear infinite; }
[data-weather='rain'] .sky-sun, [data-weather='dry'] .sky-cloud, [data-weather='dry'] .sky-rain, [data-weather='stale'] .sky-sun, [data-weather='stale'] .sky-rain { opacity: 0; }
[data-weather='stale'] .sky-cloud { opacity: .55; }
@keyframes rain-fall { from { transform: translateY(-40px); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(300px); opacity: 0; } }
@keyframes sun-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .launch-stage .sky-rain line, .launch-stage .sun-rays { animation: none; } }
.launch-stage .temp-label { font-size: 17px; opacity: .85; }
@media (max-width: 600px) { .launch-stage .temp-label { font-size: 30px; } }

/* Address links before deployment: plain labels until bauls-chain.js has a real address. */
.tba-link { cursor: default; }
.address-card { break-inside: avoid; }
.tba-link::after { content: " · TBA"; opacity: .7; }
.address-note { margin: 6px 0 0; font-size: 13px; line-height: 1.45; opacity: .75; }
.address-card .guide-button:disabled { opacity: .45; cursor: default; }
