/* The look (late Oct 2026, the user's: "nothing feels eldritch or super hero"; of three, they picked the Bureau, then "not red: something dark and cold", "a bit of light blue and light green").
   A paranormal agency's files: blue-black ink, cold white, a light blue and light green mixed (--accent, and --accent-grad for the signature pieces); condensed capitals (Oswald) to head, typewriter capitals
   (IBM Plex Mono) to label, Barlow to read; square panels with a file tab cut in a corner, hard offset shadows, a film grain over it all.
   The colours are style.css :root; this file is what sets the Bureau apart. Fonts: SIL Open Font License, latin subset, in fonts/. */
@font-face { font-family: 'Oswald'; font-weight: 500 700; font-display: swap; src: url(fonts/Oswald-700.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-500.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600 700; font-display: swap; src: url(fonts/IBMPlexMono-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(fonts/Barlow-400.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/Barlow-400i.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(fonts/Barlow-500.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(fonts/Barlow-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700 900; font-display: swap; src: url(fonts/Barlow-700.woff2) format('woff2'); }

body::after { content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: overlay; /* film grain */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
h1, h2, h3, .country-name, .logo { font-family: var(--display); font-weight: 700; letter-spacing: .03em; }
h1 { text-transform: uppercase; }
.eyebrow, .hub-group h3, .gl, .zlabel, .daylabels small, .bag-h { font-family: var(--font-label); }
.btn { font-weight: 600; font-size: .9rem; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn.primary { font-weight: 700; }
.btn.primary:hover:not(:disabled) { background: repeating-linear-gradient(-45deg, var(--ice) 0 10px, var(--mint) 10px 20px); }
.btn[aria-pressed="true"] { background: #a2d7cf14; }
.pill { background: #0b0e12; border-color: var(--line); }
.tag { text-transform: uppercase; letter-spacing: .04em; font-size: .7rem; } /* 11 px or more (the phone rule) */

/* the frame: an ink bar with a cold rule under it; the menu in capitals, the open screen marked */
.logo { color: var(--text); letter-spacing: .08em; }
.logo::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 7px; vertical-align: 1px; background: var(--accent-grad); }
.logo span { color: var(--muted); font-weight: 500; }
.topbar { border-bottom: 2px solid; border-image: var(--accent-grad) 1; }
.sidenav a, .sidenav button { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .84rem; }
.sidenav a[aria-current] { background: var(--panel2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.sidenav a[aria-current] .i { color: var(--accent); }
/* the frame in slate (the user's pick of three samples, 2026-10-31: "B looks good"): mottled dark stone (img/slate.svg), a cold bloom in two corners,
   ice-edged; under the screens a cold glow from below, and the stone where no sky is drawn */
:root { --bg-img: url(img/slate.svg); }
:is(.topbar, .sidenav, .chat) { background-color: #090c10; background-image: radial-gradient(80% 35% at 0% 0%, #9cc9e61a, transparent 70%), radial-gradient(80% 35% at 100% 100%, #a8e6b812, transparent 70%), url(img/slate.svg); }
.sidenav { border-right-color: #9cc9e633; } .chat { border-left-color: #9cc9e633; }
body.sky main { background: radial-gradient(ellipse 90% 50% at 50% 115%, #9cc9e614, transparent 70%), linear-gradient(180deg, #06080c00 30%, #06080c80); }
.avatar { border-color: var(--text); }

/* the hub: a case file's heading; sections ruled off */
.eyebrow { color: var(--accent); letter-spacing: .25em; text-shadow: 0 1px 3px #000, 0 0 14px #000; } /* over a picture */
.eyebrow::before { content: 'FILE · '; color: var(--muted); }
.country-name { color: var(--text); text-shadow: 4px 4px 0 #000; }
.hub-group h3 { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .74rem; letter-spacing: .16em; }
.hub-group h3::before { content: '//'; color: var(--accent); }
.hub-group h3::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.scene-tile.g-town { --tint: #1d242c; } .scene-tile.g-train { --tint: #161d33; } .scene-tile.g-hobby { --tint: #11262a; }
.scene-tile b { font-family: var(--display); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; font-size: 1.05rem; }
.scene-tile:not(:disabled):hover { border-color: var(--accent); transform: none; box-shadow: 4px 4px 0 var(--accent); }
.scene-tile.hot { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }

/* the fight */
.tile:hover:not(:disabled) { border-color: var(--text); box-shadow: 4px 4px 0 #000; }
.hud { border-top: 2px solid; border-image: var(--accent-grad) 1; box-shadow: 0 12px 30px #000c; }
@media (max-width: 719px) { /* the phone's tab bar: eight to a row, so plain small words; the open one marked along its top */
  .sidenav a, .sidenav button { text-transform: none; letter-spacing: 0; font-size: 11px; }
  .sidenav a[aria-current] { box-shadow: inset 0 2px 0 var(--accent); }
}

/* ---------- the hub as an agent's HQ (late Oct 2026, the user's: the grid "doesn't feel like a game", the map "extremely messy"):
   you on the left (portrait, level, XP, energy), where you are on the right with Explore; then every place one shape, an icon framed */
.hq { display: grid; gap: 0; padding: 0; overflow: hidden; background: #0b0f13; border-color: #222c36; box-shadow: 0 16px 36px #0009; } /* where you are; you're in the top bar (the user's: the agent box here was pointless) */
.hq-here { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "place place" "wx wx" "bar bar" "mods cta"; align-items: end; gap: 10px 18px; padding: 20px 22px; }
.hq.has-art .hq-here::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0b0f13 10%, #0b0f13b0), var(--art) center / cover; } /* an eldritch area's picture */
.hq-place { grid-area: place; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hq-place .country-name { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1; margin: 2px 0; }
.hq-place .capital { color: var(--muted); } .hq-here .daybar { grid-area: bar; height: 5px; } .hq-wx { grid-area: wx; } .hq-here #hub-mods { grid-area: mods; }
.hq-here .hub-cta { grid-area: cta; justify-content: flex-end; margin-top: 6px; } .hq-here .hero-cta { padding: 14px 34px; font-size: 1.1rem; }
.ico-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.ico-tile { --tc: var(--ice); position: relative; border-radius: var(--r); display: grid; justify-items: center; align-content: start; gap: 8px; min-height: 124px; padding: 16px 8px 12px; text-align: center; text-decoration: none; color: var(--text); font: inherit;
  background: #0b0f13; border: 1px solid #222c36; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.ico-tile.g-train { --tc: var(--mint); } .ico-tile.g-hobby { --tc: #c4b8f4; }
.it-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); background: color-mix(in srgb, var(--tc) 8%, #080b0e); }
.it-ic .i { width: 26px; height: 26px; color: var(--tc); }
.ico-tile b { font: 700 .86rem var(--display); letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; }
.ico-tile small { color: var(--muted); font-size: .72rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ico-tile:not(:disabled):hover, .ico-tile:focus-visible { border-color: var(--tc); box-shadow: 4px 4px 0 color-mix(in srgb, var(--tc) 70%, transparent); }
.ico-tile:not(:disabled):hover .it-ic { background: var(--tc); } .ico-tile:not(:disabled):hover .it-ic .i { color: var(--accent-ink); }
.ico-tile.hot { border-color: color-mix(in srgb, var(--tc) 70%, transparent); } .ico-tile.hot::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--tc); box-shadow: 0 0 10px var(--tc); }
.ico-tile:disabled { opacity: .45; cursor: default; }
@media (max-width: 719px) {
  .hq-here { padding: 14px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "place" "wx" "bar" "mods" "cta"; } .hq-here .hub-cta { justify-content: stretch; } .hq-here .hero-cta { width: 100%; justify-content: center; }
  .ico-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ico-tile { min-height: 104px; padding: 12px 4px 10px; gap: 6px; } .it-ic { width: 44px; height: 44px; } .it-ic .i { width: 22px; height: 22px; }
  .ico-tile b { font-size: .74rem; } .ico-tile small { display: none; } /* the line's on a long press (its title) */
}
/* today's events: case files, stamped Unsolved, then Closed */
#events .case { --sc: var(--ice); position: relative; padding: 14px 14px 12px; background: #0b0f13; border-color: #222c36; box-shadow: inset 3px 0 0 var(--sc); } /* the stamp's colour down the left edge */
#events .case b { padding-right: 84px; }
#events .case .stamp { position: absolute; top: 10px; right: 10px; padding: 1px 6px; border: 1px solid var(--sc); color: var(--sc); font: 600 .7rem var(--font-label); letter-spacing: .14em; text-transform: uppercase; rotate: -4deg; }
#events .case:disabled .stamp { --sc: var(--muted); }
#events-title small { color: var(--muted); text-shadow: 0 1px 3px #000, 0 0 10px #000; } /* over the sky */
.hb-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .hb-acts > * { width: 100%; justify-content: center; } /* a hobby card's two buttons, the same width on every card (the user's: not aligned) */
.hb-card { display: flex; flex-direction: column; container-type: inline-size; } .hb-card .hb-acts { margin-top: auto; } /* the buttons at the card's foot: a row of cards lines up whatever is above them */
.hb-where { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line; the whole of it on a hover or a long press (its title) */
.hb-acts .btn { min-width: 0; padding-inline: 10px; white-space: nowrap; } /* one line each, so a row of buttons is one height */
@container (max-width: 300px) { .hb-acts .btn { padding-inline: 6px; font-size: .8rem; letter-spacing: .03em; } .hb-acts .btn .i { display: none; } } /* a narrow card: the words without the icon */
.job-board .job-card { display: flex; flex-direction: column; } .job-board .job-card > .btn:last-child { margin-top: auto; align-self: flex-start; } /* Take at the card's foot: a two-line name or an In demand tag no longer pushes it out of line (the user's: jobs not aligned) */
.hb-piece, .hb-modes > .card { display: flex; flex-direction: column; } .hb-piece > :last-child, .hb-modes > .card > :last-child { margin-top: auto; } /* the forge's and woodshop's pieces, the circuit's two ways to race: the last row (what it needs, the button) at the card's foot */
.job-board { align-items: stretch; } /* a row's cards one height, so their Take buttons line up */

/* ---------- inside a portal (2026-11-01, the user's: "It feels like players are still on earth"): its world instead of the sky (portal-look.js) ---------- */
#portal-bg { display: none; --pb-art: none; }
body.sky.elsewhere #sky-canvas { display: none; } /* a portal, or an eldritch place (2026-11-01): its painting instead of the sky */
body.sky.elsewhere #portal-bg { display: block; grid-area: main; position: relative; min-height: 0; overflow: hidden; /* its painting (img/portals), darker toward the bottom where the cards are; its colours if the painting's missing */
  background: linear-gradient(180deg, #04060a0d, #04060a59 45%, #04060ab8), radial-gradient(ellipse 90% 75% at 50% 40%, transparent 50%, #00000080), var(--pb-art) center 40% / cover no-repeat, radial-gradient(ellipse 120% 85% at 50% 28%, var(--pb1), var(--pb0) 72%); }
body.fighting #portal-bg { grid-row: main-start / nav-end; grid-column: nav-start / main-end; }
#portal-canvas, #world-wx { position: absolute; inset: 0; width: 100%; height: 100%; }
body.elsewhere { --pb1: #1a2230; --pb0: #05070a; --pbg: #9cc9e6; --pbh: #9cc9e640; }
body.portal[data-biome="drowned"] { --pb1: #0f3a40; --pb0: #020a0d; --pbg: #6fd3c8; --pbh: #5ac8c045; }
body.portal[data-biome="spores"] { --pb1: #2b3a1c; --pb0: #070a05; --pbg: #d2e09a; --pbh: #c8dc8c40; }
body.portal[data-biome="furnace"] { --pb1: #3d1c0c; --pb0: #0a0503; --pbg: #ffb27a; --pbh: #ff965040; }
body.portal[data-biome="dust"] { --pb1: #3a3138; --pb0: #0b090b; --pbg: #d8c8bc; --pbh: #c4b0a040; }
body.portal[data-biome="lightless"] { --pb1: #10141c; --pb0: #020305; --pbg: #a9bbd6; --pbh: #96aac830; }
body.portal[data-biome="lantern"] { --pb1: #131d3a; --pb0: #04060d; --pbg: #ffd08a; --pbh: #ffc87840; }
body.portal[data-biome="glass"] { --pb1: #1d2a3c; --pb0: #05080d; --pbg: #d8ecff; --pbh: #c8e1ff40; }
body.portal[data-biome="choir"] { --pb1: #262236; --pb0: #07060b; --pbg: #d6cbef; --pbh: #c8bae640; }
body.sky.elsewhere main { background: radial-gradient(ellipse 80% 40% at 50% 0%, var(--pbh), transparent 70%), linear-gradient(180deg, #05070a00 40%, #05070a80); }
/* the portal screen: the place is the title, its line under it, the run a path going in */
#portal .ph-kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 .74rem var(--font-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-shadow: 0 1px 4px #000; }
#portal .portal-head { padding: 26px 2px 4px; }
#portal .ph-name { margin: 0; font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1; text-shadow: 0 0 28px var(--pbh), 0 2px 12px #000; }
#portal .ph-name .i { color: var(--pbg); width: .8em; height: .8em; vertical-align: -.06em; }
#portal .ph-epi { margin: 10px 0 0; max-width: 56ch; font-style: italic; color: #dfe5ec; text-shadow: 0 1px 8px #000; }
body.portal #portal .card { border-color: var(--pbh); }
body.portal #portal .card.biome { background: #0b0f14a8; }
body.portal #portal .stages { position: relative; gap: 4px; }
body.portal #portal .stages li { background: #0b0f14b3; border-color: #ffffff14; }
body.portal #portal .stages li.now { color: var(--pbg); border-color: var(--pbg); box-shadow: 0 0 18px var(--pbh), inset 0 0 12px var(--pbh); }
body.portal #portal .stages li.done { opacity: .7; }
/* the crossing: the tear (a canvas over everything, clicks pass through), and the place coming up to meet you through it */
.rift { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 2147483000; pointer-events: none; }
body.crossing:not(.crossing-out) #portal-bg, body.crossing:not(.crossing-out) #portal { animation: portal-in 2.4s cubic-bezier(.3, .6, .2, 1) both; }
/* the party on the move between a portal's nodes (2026-11-01, the user's): a light travels the route (app.js routeMove), the next node waiting for it */
.stages.moving { position: relative; }
.stages .pp-mark { position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--pbg, var(--accent)); box-shadow: 0 0 0 3px #0b0f14cc, 0 0 18px 4px var(--pbh, #9cc9e655); pointer-events: none; z-index: 2; }
.stages li.next { animation: pp-next 1.1s ease-in-out infinite alternate; }
@keyframes pp-next { to { border-color: var(--pbg, var(--accent)); box-shadow: 0 0 16px var(--pbh, #9cc9e655); } }
#portal .pp-on { display: block; margin: -6px 0 2px; font-style: italic; }
@keyframes portal-in { 0%, 48% { transform: scale(1.16); filter: blur(6px) brightness(1.35); } 100% { transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { body.crossing #portal-bg, body.crossing #portal { animation: none; } }
body.portal .bt-env .tag.bio { color: var(--pbg); border-color: var(--pbh); }
