/* Han, Lanyi — site styles.
   Idea: the page is a display. Dark by default; "glasses mode" turns it into a
   true-black HUD, because on see-through AR optics black pixels are transparent. */

:root {
  --bg: #0b0d0e;
  --surface: #131618;
  --line: #262b2e;
  --fg: #eceae4;
  --muted: #8d9499;
  --accent: #4bf051;      /* HUD phosphor green */
  --accent-ink: #0b0d0e;
  /* H A N: the three sticker colours of the avatar */
  --h: #cf3d39;           /* History: red walls */
  --a: #4bf051;           /* AI + AR: cyber green */
  --n: #1b95e8;           /* Nomad: sky and sea */
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-hud]) {
    --bg: #f5f4ef; --surface: #ebe9e2; --line: #d5d2c8; --fg: #14171a; --muted: #5d646a;
    --accent: #1c7a38; --accent-ink: #fff;
    color-scheme: light;
  }
}
/* Glasses mode: true black, no fills, bigger type. */
:root[data-hud] {
  --bg: #000; --surface: #000; --line: #2c3a2c; --fg: #f4fff0; --muted: #9db59a;
  font-size: 112.5%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1rem/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
kbd { font: .75em var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: .05em .4em; color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: .5rem .75rem; }
.eyebrow { font: .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.page-pad { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem var(--gutter); }

/* ---------- header ---------- */
.top { max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 1.25rem var(--gutter) .75rem; display: grid; grid-template-columns: 1fr auto; gap: .75rem 1.5rem; align-items: center; }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.brand-en { font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-cjk { color: var(--muted); font-size: .9rem; }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem; justify-content: flex-end; }
.social a { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 6px; color: var(--muted); }
.social a:hover { color: var(--accent); background: var(--surface); }
.social svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.nav { display: flex; gap: 1.25rem; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current] { color: var(--fg); border-color: var(--accent); }
.tools { display: flex; gap: .5rem; justify-content: flex-end; }
.tools button { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: .3rem .6rem; white-space: nowrap; }
.tools button:hover { color: var(--fg); border-color: var(--muted); }
.tools button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
@media (max-width: 40rem) {
  .top { grid-template-columns: 1fr; }
  .social { justify-content: flex-start; margin-left: -.55rem; }
  .tools { justify-content: flex-start; }
  .tools kbd { display: none; }
}

/* ---------- home: stage ---------- */
.stage { max-width: var(--wrap); margin: 0 auto; padding: 1rem var(--gutter) 3rem; display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; }
.player iframe, .poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 4px; overflow: hidden; padding: 0; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .2s; opacity: .88; }
.poster:hover img { transform: scale(1.02); opacity: 1; }
.play { position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem; border-radius: 50%; background: var(--accent); }
.play::after { content: ""; position: absolute; left: 54%; top: 50%; translate: -50% -50%; border-style: solid; border-width: .8rem 0 .8rem 1.3rem; border-color: transparent transparent transparent #0b0d0e; }
.now { padding-top: 1.5rem; }
.now h1 { font-size: clamp(1.5rem, 1rem + 2vw, 2.4rem); margin: .5rem 0 1rem; }
.now-links { display: flex; gap: 1rem; align-items: center; margin: 0; font-size: .95rem; }
.sub { background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; padding: .4rem .9rem; border-radius: 6px; }
.sub:hover { color: var(--accent-ink); filter: brightness(1.1); }
.queue { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .25rem; }
.queue a { display: grid; grid-template-columns: 7.5rem 1fr; grid-template-rows: auto auto 1fr; column-gap: .85rem; padding: .5rem; margin: 0 -.5rem; border-radius: 6px; text-decoration: none; border-left: 2px solid transparent; }
.queue a:hover { background: var(--surface); color: inherit; }
.queue a[aria-current] { background: var(--surface); border-left-color: var(--accent); }
.queue img { grid-row: 1 / 4; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; background: var(--surface); }
.q-title { font-size: .9rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-meta { font: .7rem var(--mono); color: var(--muted); margin-top: .3rem; }
@media (max-width: 56rem) {
  .stage { grid-template-columns: 1fr; }
}

/* ---------- writing lists ---------- */
.writing { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem var(--gutter) 4rem; border-top: 1px solid var(--line); }
.writing.page-pad { border-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.section-head h1, .section-head h2 { color: var(--fg); font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); }
.posts { list-style: none; margin: 0; padding: 0; }
.posts a { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; gap: .2rem 1.5rem; padding: 1.1rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.posts a:hover { color: inherit; }
.posts a:hover .post-title { color: var(--accent); }
.posts time, .post-min { font: .75rem/1.9 var(--mono); color: var(--muted); }
.post-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.post-excerpt { grid-column: 2; color: var(--muted); font-size: .95rem; max-width: 62ch; }
@media (max-width: 40rem) {
  .posts a { grid-template-columns: 1fr auto; }
  .posts time { grid-column: 1; }
  .post-min { grid-column: 2; grid-row: 1; }
  .post-title, .post-excerpt { grid-column: 1 / -1; }
}

/* ---------- article ---------- */
.post { max-width: 44rem; margin: 0 auto; padding: 2.5rem var(--gutter) 4rem; }
.post-head h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); margin: .6rem 0 2rem; }
.prose { font-size: 1.075rem; line-height: 1.7; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15em; }
.prose h1, .prose h2, .prose h3 { margin-top: 2em; }
.prose h1 { font-size: 1.6rem; }
.prose h2 { font-size: 1.3rem; }
.prose h3 { font-size: 1.1rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose img { border-radius: 4px; border: 1px solid var(--line); }
.prose code { font: .9em var(--mono); background: var(--surface); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; overflow-x: auto; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--muted); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: .4rem .7rem; text-align: left; }
.post-foot { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.comments { scroll-margin-top: 5rem; }
.comments h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.giscus { min-height: 8rem; }
.giscus-frame { width: 100%; border: 0; color-scheme: normal; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.pager a { text-decoration: none; font-weight: 600; line-height: 1.3; }
.pager .next { text-align: right; }
.pager span { display: block; font: .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.links { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
.links a { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0 .8rem; align-items: center; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-weight: 600; }
.links a:hover { border-color: var(--accent); }
.links svg { width: 1.4rem; height: 1.4rem; fill: currentColor; grid-row: 1 / 3; }
.links-url { font: .72rem var(--mono); color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- footer ---------- */
.foot { max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 1.5rem var(--gutter) 2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; color: var(--muted); font-size: .85rem; }
.foot p { margin: 0; }

/* ---------- command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .6); display: grid; place-items: start center; padding: 12vh 1rem 1rem; }
.palette[hidden] { display: none; }
.palette-box { width: min(38rem, 100%); background: var(--bg); border: 1px solid var(--accent); border-radius: 8px; overflow: hidden; box-shadow: 0 1.5rem 4rem rgb(0 0 0 / .5); }
.palette input { width: 100%; font: 1.1rem var(--sans); color: var(--fg); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 1rem 1.1rem; outline: none; }
.palette input::placeholder { color: var(--muted); }
.palette ul { list-style: none; margin: 0; padding: .35rem; max-height: 55vh; overflow-y: auto; }
.palette li { display: grid; grid-template-columns: 3.6rem 1fr auto; gap: .75rem; align-items: baseline; padding: .55rem .75rem; border-radius: 5px; cursor: pointer; }
.palette li[aria-selected="true"] { background: var(--surface); box-shadow: inset 2px 0 var(--accent); }
.palette .pk { font: .68rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.palette .pt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .pd { font: .7rem var(--mono); color: var(--muted); }
.palette-empty { padding: 1rem 1.1rem; color: var(--muted); margin: 0; }

/* ---------- glasses mode ---------- */
:root[data-hud] .social-foot, :root[data-hud] .prose img { filter: none; }
:root[data-hud] .queue a:hover, :root[data-hud] .queue a[aria-current] { background: none; }
:root[data-hud] .reading .top .social, :root[data-hud] .reading .nav, :root[data-hud] .reading .foot, :root[data-hud] .reading .pager { display: none; }
:root[data-hud] .reading .post { max-width: 36rem; padding-bottom: 60vh; }
:root[data-hud] .reading .prose { font-size: 1.35rem; line-height: 1.75; font-weight: 500; }
.prompter { position: fixed; left: 50%; bottom: 1rem; translate: -50% 0; z-index: 30; display: flex; align-items: center; gap: .4rem; background: #000; border: 1px solid var(--accent); border-radius: 999px; padding: .35rem .6rem; font: .85rem var(--mono); }
.prompter[hidden] { display: none; }
.prompter button { min-width: 2.5rem; min-height: 2.5rem; border-radius: 999px; padding: 0 .8rem; color: var(--accent); }
.prompter button:hover { background: #162016; }
.prompter [aria-pressed="true"] { background: var(--accent); color: #000; }
.prompter output { min-width: 2.2rem; text-align: center; color: var(--fg); }
.prompter-hint { color: var(--muted); padding-right: .5rem; font-size: .7rem; }
@media (max-width: 30rem) { .prompter-hint { display: none; } }

/* ---------- spatial wall ---------- */
.spatial-page main { display: flex; }
.spatial { flex: 1; display: flex; flex-direction: column; width: 100%; min-height: 34rem; }
.spatial-bar { max-width: var(--wrap); width: 100%; margin: 0 auto; padding: .5rem var(--gutter) 1rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--muted); }
.spatial-bar p { margin: 0; }
.spatial-bar strong { color: var(--fg); }
.spatial-actions { display: flex; gap: .4rem; }
.spatial-actions button { border: 1px solid var(--line); border-radius: 6px; padding: .35rem .75rem; min-width: 2.5rem; }
.spatial-actions button:hover { border-color: var(--accent); color: var(--accent); }
.spatial-actions [aria-pressed="true"] { background: var(--accent); color: #000; border-color: var(--accent); }
.spatial-view { flex: 1; position: relative; display: flex; background: #000; color: #f4fff0; overflow: hidden; min-height: 28rem; outline-offset: -2px; }
.spatial-view.is-stereo { position: fixed; inset: 0; z-index: 60; }
.eye { flex: 1 1 0; position: relative; overflow: hidden; }
.eye + .eye { box-shadow: -1px 0 #1a221a; }
.eye-shift, .eye-persp, .eye-scene { position: absolute; inset: 0; }
.eye-persp { perspective: 900px; }
.eye-scene { transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.s-grid { position: absolute; left: 50%; top: 50%; width: 6000px; height: 3000px; margin: -1500px 0 0 -3000px; background-image: radial-gradient(#2f4a2c 1.5px, transparent 2px); background-size: 90px 90px; transform: translateZ(-900px); }
.s-card { position: absolute; left: 50%; top: 50%; width: 20rem; margin: -9rem 0 0 -10rem; padding: .6rem; background: #050805; border: 1px solid #2c3a2c; border-radius: 6px; transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .45s, border-color .2s; font-family: var(--sans); }
.s-card.is-on { border-color: #4bf051; }
.s-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }
.s-card .s-text { aspect-ratio: 16 / 9; display: grid; align-content: center; padding: .9rem; border: 1px dashed #2c3a2c; border-radius: 3px; font-size: .78rem; line-height: 1.45; color: #9db59a; overflow: hidden; }
.s-kind { font: .65rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #4bf051; margin: .6rem 0 .2rem; }
.s-title { font-weight: 600; font-size: .95rem; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.s-exit { position: absolute; z-index: 3; left: 50%; bottom: .5rem; translate: -50% 0; font: .7rem var(--mono); color: #9db59a; }

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

/* ---------- home: project band ---------- */
.project { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem var(--gutter); border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.project h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); margin: .5rem 0 .75rem; }
.project h2 a { text-decoration: none; }
.project h2 span, .aaa-head h1 span { color: var(--muted); font-weight: 500; }
.project p { max-width: 54ch; margin: 0 0 .75rem; }
.project-go { font-weight: 600; }
/* 27 squares: Anno's body, flattened */
.project-art { display: grid; grid-template-columns: repeat(9, .8rem); gap: .3rem; }
.project-art i { width: .8rem; height: .8rem; background: var(--a); border-radius: 1px; }
.project-art i:nth-child(-n+9) { opacity: .35; }
.project-art i:nth-child(n+19) { opacity: .7; }
@media (max-width: 40rem) { .project { grid-template-columns: 1fr; } .project-art { order: -1; } }

/* ---------- AAA page ---------- */
.aaa { max-width: var(--wrap); margin: 0 auto; padding: 2rem var(--gutter) 4rem; }
.aaa-head h1 { font-size: clamp(2.4rem, 1.4rem + 5vw, 4.5rem); margin: .6rem 0 1rem; }
.aaa-lede { font-size: 1.2rem; max-width: 60ch; margin: 0 0 1.25rem; }
.aaa-links { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 0 0 2.5rem; }
.anno { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.anno-stage { position: relative; background: #000; min-height: 26rem; }
.anno-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.anno-stage canvas:active { cursor: grabbing; }
.anno-note { position: absolute; left: 1rem; bottom: .75rem; margin: 0; font: .7rem var(--mono); color: #9db59a; pointer-events: none; }
.anno-panel { padding: 1.5rem; display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.anno-panel h2 { font-size: 1.5rem; }
.anno-panel p { margin: 0; }
.anno-sub { color: var(--muted); font-size: .95rem; }
.anno-shapes { display: flex; flex-wrap: wrap; gap: .4rem; }
.anno-shapes button, .anno-row button { font: .85rem var(--mono); border: 1px solid var(--line); border-radius: 6px; padding: .45rem .8rem; }
.anno-shapes button:hover, .anno-row button:hover { border-color: var(--accent); color: var(--accent); }
.anno-shapes [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.anno-form label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.anno-row { display: flex; gap: .4rem; }
.anno-row input { flex: 1; min-width: 0; font: .95rem var(--sans); color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .7rem; }
.anno-trace { flex: 1; margin: 0; min-height: 11rem; max-height: 16rem; overflow-y: auto; white-space: pre-wrap; font: .8rem/1.55 var(--mono); background: #000; color: #c9f5bd; border-radius: 6px; padding: .85rem 1rem; }
.anno-fine { font-size: .78rem; color: var(--muted); }
.aaa code { font: .88em var(--mono); background: var(--surface); padding: .1em .35em; border-radius: 4px; }
.aaa-section { margin-top: 4rem; }
.aaa-section > h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); margin-bottom: .75rem; }
.aaa-section > p { max-width: 65ch; margin: 0 0 1.5rem; }
.flow { max-width: 65ch; padding-left: 1.4rem; margin: 0; }
.flow li { padding: .5rem 0 .5rem .4rem; }
.flow li::marker { font-family: var(--mono); color: var(--accent); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem 2rem; margin: 0; }
.choices dt { font-weight: 600; margin-bottom: .25rem; }
.choices dd { margin: 0; color: var(--muted); font-size: .95rem; }
.timeline { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.timeline li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.timeline time { font: .78rem/1.9 var(--mono); color: var(--muted); }
.timeline p { margin: 0; }
.aaa-section > .aaa-legacy { color: var(--muted); font-size: .9rem; margin-top: 1rem; }
@media (max-width: 52rem) {
  .anno { grid-template-columns: 1fr; }
  .anno-stage { min-height: 19rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- AAA demo: tabs + CSS 3D stage ---------- */
.demo-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: .5rem; }
.demo-tabs button { display: flex; align-items: center; gap: .75rem; text-align: left; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.demo-tabs button:hover { border-color: var(--muted); color: var(--fg); }
.demo-tabs b { font: 700 1.6rem/1 var(--mono); }
.demo-tabs span { font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.demo-tabs small { display: block; font: 400 .72rem var(--mono); letter-spacing: .04em; }
.demo-tabs [aria-selected="true"] { border-color: var(--accent); color: var(--fg); box-shadow: inset 0 -3px var(--accent); }
.demo-tabs [aria-selected="true"] b { color: var(--accent); }
.demo-stage { position: relative; background: #000; min-height: 28rem; overflow: hidden; perspective: 1500px; touch-action: none; cursor: grab; }
.demo-stage:active { cursor: grabbing; }
.world, .bx { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.bx { left: 0; top: 0; }
.bx i { position: absolute; left: 0; top: 0; background: color-mix(in srgb, var(--c) var(--s), #000); outline: 1px solid rgb(0 0 0 / .5); outline-offset: -1px; backface-visibility: hidden; }
.bx.is-floor i { outline: 0; background-color: #0c100b; background-image: radial-gradient(#2f4a2c 1.5px, transparent 2px); background-size: 40px 40px; backface-visibility: visible; }
.demo-prompts { display: grid; gap: .35rem; }
.demo-prompts button { text-align: left; font-size: .92rem; border: 1px solid var(--line); border-radius: 6px; padding: .5rem .75rem; }
.demo-prompts button:hover { border-color: var(--accent); color: var(--accent); }
.demo-prompts.is-chips { display: flex; flex-wrap: wrap; }
.demo-prompts.is-chips button { font-family: var(--mono); font-size: .85rem; }
@media (max-width: 52rem) {
  .demo-stage { min-height: 19rem; }
  .demo-tabs button { flex-direction: column; align-items: flex-start; gap: .25rem; padding: .6rem .7rem; }
  .demo-tabs small { display: none; }
}

/* agent colours + Rubik's cube faces */
.demo-tabs [aria-selected="true"] { border-color: var(--agent); box-shadow: inset 0 -3px var(--agent); }
.demo-tabs b, .demo-tabs [aria-selected="true"] b { color: var(--agent); }
.bx.is-rubik i {
  background-color: var(--f);
  background-image:
    repeating-linear-gradient(90deg, #0a0a0a 0 4%, transparent 4% 29.33%, #0a0a0a 29.33% 33.33%),
    repeating-linear-gradient(0deg, #0a0a0a 0 4%, transparent 4% 29.33%, #0a0a0a 29.33% 33.33%);
  outline: 0;
}

/* ---------- H A N ---------- */
.brand { align-items: center; }
.brand-mark { width: 1.75rem; height: 1.75rem; border-radius: 5px; }
.tile { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 5px; font: 700 1rem/1 var(--mono); color: #0b0d0e; flex: none; }
.tile-h { background: var(--h); color: #fff; }
.tile-a { background: var(--a); }
.tile-n { background: var(--n); }
.han { max-width: var(--wrap); margin: 0 auto; padding: 1.5rem var(--gutter); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 2rem; }
.han div { display: flex; gap: .8rem; align-items: flex-start; }
.han p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.45; }
.han strong { display: block; color: var(--fg); font-size: 1rem; }
.han a { text-decoration: none; }
@media (max-width: 46rem) { .han { grid-template-columns: 1fr; } }

/* ---------- About: journey globe ---------- */
.journey { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); gap: 2rem; align-items: center; scroll-margin-top: 1rem; }
.journey .eyebrow { display: flex; align-items: center; gap: .6rem; }
.journey h2 { font-size: 1.6rem; margin: .8rem 0 1.2rem; }
.journey-now { margin: 0 0 1rem; display: grid; gap: .1rem; }
.journey-now span { font: .78rem var(--mono); color: var(--muted); }
.journey-now strong { font-size: 2rem; line-height: 1.1; letter-spacing: -.02em; }
.journey-nav { display: flex; gap: .5rem; margin-bottom: 1.2rem; }
.journey-nav button { border: 1px solid var(--line); border-radius: 6px; padding: .5rem .9rem; font-weight: 600; }
.journey-nav button:hover:not(:disabled) { border-color: var(--n); color: var(--n); }
.journey-nav button:disabled { opacity: .35; cursor: default; }
.journey-stops { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .2rem; counter-reset: stop; font: .8rem var(--mono); }
.journey-stops li { counter-increment: stop; display: flex; align-items: center; }
.journey-stops li + li::before { content: "→"; color: var(--muted); margin-right: .2rem; }
.journey-stops button { color: var(--muted); padding: .15rem .3rem; border-radius: 4px; }
.journey-stops button:hover { color: var(--fg); }
.journey-stops [aria-current="step"] { color: #fff; background: var(--n); }
.journey-globe canvas { width: 100%; aspect-ratio: 1; display: block; touch-action: none; cursor: grab; }
@media (max-width: 40rem) { .journey { grid-template-columns: 1fr; } .journey-globe { order: -1; max-width: 18rem; margin: 0 auto; width: 100%; } }

/* ---------- one colour per section ----------
   Videos: white (it carries all three in the H A N row). Writing: red (H).
   AAA and Spatial: green (A, the default). About: blue (N). */
body.t-white { --accent: #eceae4; --accent-ink: #0b0d0e; }
body.t-red { --accent: #e5504a; --accent-ink: #fff; }
body.t-blue { --accent: #1b95e8; --accent-ink: #0b0d0e; }
@media (prefers-color-scheme: light) {
  :root:not([data-hud]) body.t-white { --accent: #14171a; --accent-ink: #fff; }
  :root:not([data-hud]) body.t-red { --accent: #b52a26; --accent-ink: #fff; }
  :root:not([data-hud]) body.t-blue { --accent: #0f6fb8; --accent-ink: #fff; }
}
