/* dimitricole.com
   Summit at dawn: scrolling is the climb. The sky moves from night through
   alpenglow to daylight, and an altimeter counts the camps. */

:root {
	--ink: #10132a;
	--ink-2: #2a3160;
	--snow: #f7f5f2;
	--panel: rgba(12, 16, 40, 0.6);
	--panel-line: rgba(255, 255, 255, 0.16);
	--glow: #ffb38a;
	--glow-soft: #ffd9c4;
	--text-soft: rgba(247, 245, 242, 0.84);
	--day-panel: rgba(255, 255, 255, 0.78);
	--day-line: rgba(16, 19, 42, 0.12);
	--day-muted: #4a5470;
	--serif: "Instrument Serif", Georgia, serif;
	--sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
	--gutter: clamp(16px, 4vw, 56px);
	--rail: 190px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding: 80px 0 190px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--sans);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
	line-height: 1.6;
	color: var(--snow);
	background: #0b1030;
	overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--glow-soft); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; }

.visually-hidden {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
	position: absolute; left: -999px; top: 8px; z-index: 100;
	background: var(--snow); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip:focus { left: 8px; }

/* ---------- The scene (fixed behind everything) ---------- */

.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sky { position: absolute; inset: 0; background: linear-gradient(#080c28, #14184a 55%, #2a265c); }
.stars { position: absolute; inset: 0 0 35% 0; }
.stars i {
	position: absolute; width: 2px; height: 2px; border-radius: 50%;
	background: #fff; opacity: var(--o, 0.8);
}
.sun {
	position: absolute; left: 62%; top: 72%; opacity: 0;
	width: 18vmin; height: 18vmin; margin-left: -9vmin; border-radius: 50%;
	background: radial-gradient(circle, #fff6df 0 38%, rgba(255, 220, 170, 0.55) 52%, rgba(255, 190, 140, 0) 72%);
}
.ridge {
	position: absolute; left: 50%; bottom: 0; width: max(104vw, 1100px);
	transform: translateX(-50%); will-change: transform;
}
.ridge svg { display: block; width: 100%; height: 100%; }

/* ---------- Top bar ---------- */

.bar {
	position: fixed; z-index: 20; inset: 0 0 auto 0;
	display: flex; align-items: center; justify-content: space-between;
	padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
	pointer-events: none;
}
.bar > * { pointer-events: auto; }
.mark, .alt-read {
	font-family: var(--serif); line-height: 1; color: var(--snow); text-decoration: none;
	padding: 8px 14px; border-radius: 999px;
	background: rgba(12, 16, 40, 0.5);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border: 1px solid var(--panel-line);
}
.mark {
	display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem;
	opacity: 0; transform: translateY(-8px); pointer-events: none;
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.mark .fas { font-size: 0.72rem; color: var(--glow); }
.mark.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.alt-read { margin: 0; font-variant-numeric: tabular-nums; display: none; }
.alt-num { font-size: 1.35rem; }
.alt-unit { font-family: var(--sans); font-size: 0.8rem; color: var(--text-soft); }

/* ---------- Altimeter rail (desktop) ---------- */

.alt {
	position: fixed; z-index: 10; right: var(--gutter); top: 96px;
	height: min(calc(100vh - 96px - 280px), 420px); width: 150px;
	transition: opacity 0.5s ease;
	text-shadow: 0 1px 8px rgba(10, 14, 40, 0.5);
}
.alt.is-away { opacity: 0; pointer-events: none; }
.alt-track {
	position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
	background: linear-gradient(to top, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.55));
}
.alt-needle {
	position: absolute; left: 50%; top: 100%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
	border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 4px rgba(255, 179, 138, 0.25);
}
.alt-camps { list-style: none; margin: 0; padding: 0; position: absolute; left: 14px; top: 0; bottom: 0; }
.alt-camps li { position: absolute; transform: translateY(-50%); }
.alt-camps a {
	display: inline-block; padding: 4px 8px; border-radius: 6px;
	font-size: 0.84rem; font-weight: 600; color: var(--text-soft); text-decoration: none; white-space: nowrap;
}
.alt-camps a:hover, .alt-camps a[aria-current="true"] { color: #fff; background: rgba(255, 255, 255, 0.14); }

/* ---------- The climb ---------- */

main { position: relative; z-index: 2; }

.leg {
	min-height: 110vh; min-height: 110svh;
	display: flex; align-items: center;
	padding: 14vh calc(var(--gutter) + var(--rail)) 14vh var(--gutter);
}

.hero {
	min-height: 100vh; min-height: 100svh;
	display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr);
	gap: clamp(24px, 5vw, 72px); align-items: center;
	padding-top: 14vh; padding-bottom: 26vh;
}
.hero-copy { max-width: 820px; }
.hero h1 {
	font-family: var(--serif); font-weight: 400;
	font-size: clamp(3.4rem, 1.8rem + 7vw, 8.4rem);
	line-height: 0.92; letter-spacing: -0.015em;
}
.hero h1 em { font-style: italic; color: var(--glow-soft); }
.hero-line { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem); font-weight: 600; margin: 26px 0 12px; }
.hero-lede { max-width: 56ch; margin: 0; color: var(--text-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.cta {
	display: inline-flex; align-items: center; gap: 12px;
	min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
	background: var(--snow); color: var(--ink);
	font: 700 1rem var(--sans); text-decoration: none; cursor: pointer;
	transition: transform 0.15s ease, background-color 0.2s ease;
}
.cta:active { transform: translateY(1px); }
.cta svg { transition: transform 0.3s ease; }
.cta:hover svg { transform: translateY(3px); }
.cta-ghost { background: transparent; color: var(--snow); box-shadow: inset 0 0 0 1px rgba(247, 245, 242, 0.45); }
.cta-ghost:hover { background: rgba(247, 245, 242, 0.1); }

.portrait { margin: 0; justify-self: end; align-self: start; width: 100%; max-width: min(320px, 40vh); }
.portrait img {
	width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
	border-radius: 200px 200px 18px 18px;
	box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
}

@media (prefers-reduced-motion: no-preference) {
	.js .hero-copy > *, .js .portrait { animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
	.js .hero-line { animation-delay: 0.1s; }
	.js .hero-lede { animation-delay: 0.18s; }
	.js .hero-actions { animation-delay: 0.26s; }
	.js .portrait { animation-delay: 0.14s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.panel {
	width: 100%;
	/* leave room on the right for the guide's speech card */
	max-width: max(560px, min(740px, calc(100vw - 612px)));
	background: var(--panel);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
	backdrop-filter: blur(16px) saturate(1.2);
	border: 1px solid var(--panel-line);
	border-radius: 22px;
	padding: clamp(24px, 4vw, 44px);
	transition: box-shadow 0.4s ease;
}
.panel.is-flagged { box-shadow: 0 0 0 3px var(--glow), 0 0 60px rgba(255, 179, 138, 0.35); }
.panel-wide { max-width: max(560px, min(1040px, calc(100vw - 612px))); container-type: inline-size; }

.camp-tag {
	display: flex; align-items: baseline; gap: 14px; margin: 0 0 6px;
	font-weight: 600; color: var(--glow); font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.camp-tag b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; color: var(--snow); }
.panel h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 1.6rem + 3vw, 4.2rem); line-height: 1; }
.role { margin: 12px 0 0; color: var(--text-soft); font-weight: 500; line-height: 1.45; }
.lede { font-family: var(--serif); font-size: 1.45em; line-height: 1.3; margin: 18px 0 0; }
.panel ul { margin: 18px 0 0; padding: 0; list-style: none; }
.panel li { position: relative; padding-left: 22px; margin-top: 10px; }
.panel li::before {
	content: ""; position: absolute; left: 0; top: 0.6em;
	border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--glow);
}
.sub { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--panel-line); }
.sub h3 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.1; }

.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 26px; }
.field { border-top: 2px solid rgba(255, 255, 255, 0.35); padding-top: 14px; }
.field h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; margin-bottom: 8px; }
.field p { margin: 0; color: var(--text-soft); }
.field-join { border-top-color: var(--glow); }

/* Agent console, inside the summit panel */

.agents {
	display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: clamp(20px, 3vw, 40px); align-items: start;
	margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--panel-line);
}
@container (max-width: 900px) { .agents { grid-template-columns: 1fr; } }
.agents-copy h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.1; }
.agents-copy p { margin: 14px 0 0; color: var(--text-soft); }
.agents-copy .fine { font-size: 0.9em; color: rgba(247, 245, 242, 0.66); }

.console {
	background: #0c1130; border: 1px solid #262c5c; border-radius: 16px; overflow: hidden;
	box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.8);
}
.console-top { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid #262c5c; }
.console-tabs { display: flex; gap: 4px; }
.console-tabs button, .console-replay, .console-actions button {
	font: 600 0.9rem var(--sans); min-height: 36px; padding: 0 12px; border-radius: 8px; border: 0;
	cursor: pointer; background: transparent; color: #b9bede; white-space: nowrap;
}
.console-tabs button:hover, .console-replay:hover { color: #fff; background: #1a2050; }
.console-tabs button[aria-selected="true"] { background: #262c5c; color: #fff; }
.console-replay { margin-left: auto; width: 36px; padding: 0; }
.console-log { padding: 16px; height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; }
.msg { max-width: 90%; padding: 10px 14px; border-radius: 14px; line-height: 1.5; animation: pop 0.25s ease both; }
.msg-user { align-self: flex-end; background: var(--glow); color: var(--ink); font-weight: 600; border-bottom-right-radius: 4px; }
.msg-agent { align-self: flex-start; background: #1a2050; border-bottom-left-radius: 4px; }
.tool { align-self: stretch; font-family: var(--mono); font-size: 0.78rem; line-height: 1.55; border: 1px solid #262c5c; border-radius: 10px; overflow: hidden; animation: pop 0.25s ease both; }
.tool-head { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; background: #141a44; color: #9ea6d8; }
.tool-head b { color: #fff; font-weight: 500; }
.tool pre { margin: 0; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; color: #d8dcf4; font: inherit; }
.tool .ok { color: #8fe0b0; }
.console-actions { display: flex; gap: 8px; align-self: flex-start; animation: pop 0.25s ease both; }
.console-actions .approve { background: var(--glow); color: var(--ink); }
.console-actions .cancel { box-shadow: inset 0 0 0 1px #3a4178; }
.console-actions .cancel:hover { color: #fff; }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #9ea6d8; animation: blink 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ---------- Above the summit: daylight ---------- */

.ridge-top { padding: 6vh 0 0; }
.day { padding: clamp(40px, 6vw, 72px) var(--gutter); color: var(--ink); }
.day-inner {
	max-width: max(560px, min(1120px, calc(100vw - 612px))); margin: 0;
	background: var(--day-panel);
	-webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 24px;
	padding: clamp(24px, 4vw, 52px);
	box-shadow: 0 30px 80px -50px rgba(16, 19, 42, 0.5);
}
.day a { color: var(--ink); }
.day-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); line-height: 1; }
.day-lede { margin: 14px 0 0; max-width: 58ch; color: var(--day-muted); font-size: 1.08em; }

.talk-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 34px; }
.col-title { font-size: 1.1rem; font-weight: 700; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.links { list-style: none; margin: 0; padding: 0; }
.links li { border-bottom: 1px solid var(--day-line); }
.links a, .links li.plain { display: flex; flex-direction: column; gap: 2px; padding: 13px 0; text-decoration: none; }
.links strong { font-weight: 700; line-height: 1.3; }
.links span { color: var(--day-muted); font-size: 0.93em; }
.links a strong {
	width: fit-content;
	background: linear-gradient(var(--glow), var(--glow)) 0 100% / 0 40% no-repeat;
	transition: background-size 0.3s ease;
}
.links a:hover strong, .links a:focus-visible strong { background-size: 100% 40%; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.tile { background: rgba(255, 255, 255, 0.7); border: 1px solid var(--day-line); border-radius: 16px; padding: 22px; }
.tile .fas {
	width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
	background: var(--ink); color: var(--glow-soft); font-size: 1.05rem;
}
.tile h3 { font-size: 1.12rem; margin: 16px 0 6px; line-height: 1.25; }
.tile p { margin: 0; color: var(--day-muted); }

#mountains .day-inner { margin-bottom: 18px; }
.gallery {
	display: flex; flex-wrap: wrap; gap: 8px;
	max-width: 1400px; margin: 0 auto;
	--row: clamp(150px, 19vw, 260px);
}
/* Justified rows: each photo grows in proportion to its aspect ratio */
.gallery::after { content: ""; flex: 999 1 0; }
.gallery a {
	position: relative; display: block; overflow: hidden; border-radius: 10px; color: #fff;
	flex: var(--r) 1 calc(var(--r) * var(--row)); height: var(--row);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery a::after {
	content: attr(data-caption);
	position: absolute; inset: auto 0 0 0; padding: 28px 14px 12px;
	font-weight: 600; font-size: 0.92rem;
	background: linear-gradient(transparent, rgba(10, 14, 40, 0.7));
	opacity: 0; transition: opacity 0.25s ease;
}
.gallery a:hover::after, .gallery a:focus-visible::after { opacity: 1; }

.contacts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.contacts a {
	display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px;
	border-radius: 999px; background: var(--ink); color: var(--snow);
	font-weight: 600; text-decoration: none; transition: background-color 0.2s ease;
}
.contacts a:hover { background: var(--ink-2); }
.foot-small { margin: 36px 0 0; font-size: 0.9rem; color: var(--day-muted); }
.foot { padding-bottom: calc(150px + env(safe-area-inset-bottom)); min-height: 100vh; }

/* ---------- The guide (Ask me) ---------- */

.ask-fab {
	position: fixed; z-index: 30;
	right: calc(var(--gutter) - 6px); bottom: calc(12px + env(safe-area-inset-bottom));
	width: 150px; height: 172px; padding: 0; border: 0; background: none; cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.guide { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35)); }
.g-shadow { fill: rgba(0, 0, 0, 0.25); }
.g-glow { fill: rgba(255, 179, 138, 0.35); }
.g-body, .g-hand, .g-eyes, .g-glow { transform-box: fill-box; }
.g-hand { transform-origin: 50% 100%; }
.g-eyes { transform-origin: center; }
.g-glow { transform-origin: center; }
.guide-bubble {
	pointer-events: none;
	position: absolute; right: 128px; top: 8px;
	background: var(--snow); color: var(--ink); font: 700 0.86rem var(--sans);
	padding: 7px 12px; border-radius: 14px 14px 4px 14px; white-space: nowrap;
	box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.4);
	opacity: 0; transform: translateY(6px) scale(0.96); transform-origin: right bottom;
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.ask-fab:hover .guide-bubble, .ask-fab:focus-visible .guide-bubble, .ask-fab.is-greeting .guide-bubble { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
	.g-body { animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
	.g-eyes { animation: blinkeyes 5s infinite; }
	.g-glow { animation: pulse 2.6s ease-in-out infinite; }
	.ask-fab:hover .g-hand, .ask-fab:focus-visible .g-hand, .ask-fab.is-greeting .g-hand { animation: wave 0.9s ease-in-out 2; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes blinkeyes { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes pulse { 0%, 100% { opacity: 0.6; transform: scale(0.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes wave { 0%, 100% { transform: translate(0, 0) rotate(0); } 30% { transform: translate(-2px, -16px) rotate(-18deg); } 60% { transform: translate(-4px, -14px) rotate(14deg); } }

.ask {
	width: min(440px, calc(100vw - 24px)); max-height: min(640px, calc(100dvh - 202px - env(safe-area-inset-bottom)));
	margin: auto var(--gutter) calc(186px + env(safe-area-inset-bottom)) auto;
	padding: 0; border: 1px solid var(--panel-line); border-radius: 22px;
	background: rgba(14, 18, 48, 0.92);
	-webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
	color: var(--snow);
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}
.ask[open] { display: flex; flex-direction: column; animation: sheet 0.28s cubic-bezier(0.2, 0.8, 0.2, 1.05) both; }
.ask::backdrop { background: rgba(8, 10, 30, 0.35); }
@keyframes sheet { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

.ask-head { display: flex; gap: 10px; align-items: center; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--panel-line); }
.tip { position: relative; }
.tip-btn {
	width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35);
	background: transparent; color: var(--text-soft); font-size: 0.72rem; cursor: pointer;
}
.tip-btn:hover, .tip-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.tip-text {
	position: absolute; z-index: 2; left: 50%; top: calc(100% + 10px); transform: translateX(-50%);
	width: 240px; margin: 0; padding: 10px 12px; border-radius: 12px;
	background: var(--snow); color: var(--ink); font-size: 0.84rem; line-height: 1.45;
	box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.5);
	opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s;
}
.tip-btn:focus-visible + .tip-text, .tip-btn[aria-expanded="true"] + .tip-text { opacity: 1; visibility: visible; }
@media (hover: hover) { .tip-btn:hover + .tip-text { opacity: 1; visibility: visible; } }
.ask-head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; line-height: 1.05; }
.ask-close {
	flex: none; margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 0;
	background: rgba(255, 255, 255, 0.1); color: var(--snow); cursor: pointer;
}
.ask-close:hover { background: rgba(255, 255, 255, 0.2); }
.ask-log { flex: 1; overflow-y: auto; padding: 16px 20px 6px; display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.ask-log .msg { font-size: 0.95rem; }
.ask-go {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
	min-height: 38px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
	background: var(--snow); color: var(--ink); font: 700 0.9rem var(--sans);
	animation: pop 0.25s ease both;
}
.ask-go:hover { background: #fff; }
.ask-chips { flex: none; display: flex; gap: 8px; padding: 10px 20px 4px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.ask-chips::-webkit-scrollbar { display: none; }
.ask-chips button {
	min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.06);
	color: var(--snow); font: 600 0.88rem var(--sans); white-space: nowrap; flex: none;
	transition: background-color 0.2s ease;
}
.ask-chips button:hover { background: rgba(255, 255, 255, 0.16); }
.ask-form { display: flex; gap: 8px; padding: 12px 20px 20px; }
.ask-form input {
	flex: 1; min-width: 0; min-height: 44px; padding: 0 16px; border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(0, 0, 0, 0.2);
	color: var(--snow); font: 500 1rem var(--sans);
}
.ask-form input::placeholder { color: rgba(247, 245, 242, 0.55); }
.ask-form button {
	flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--glow); color: var(--ink); font-size: 1rem;
}

/* Tour card: the guide's speech, anchored above the guide */

.tour {
	position: fixed; z-index: 31;
	right: calc(var(--gutter) + 136px); bottom: calc(40px + env(safe-area-inset-bottom));
	width: min(340px, calc(100vw - 32px));
	background: var(--snow); color: var(--ink);
	border-radius: 20px 20px 6px 20px;
	padding: 18px 18px 16px;
	box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.55);
	animation: sheet 0.3s cubic-bezier(0.2, 0.8, 0.2, 1.05) both;
}
.tour-step { margin: 0; font-size: 0.8rem; font-weight: 700; color: #8a5a3c; font-variant-numeric: tabular-nums; }
.tour-text { margin: 6px 0 0; padding-right: 18px; font-size: 1rem; line-height: 1.5; }
.tour-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tour-actions button {
	min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--day-line); background: transparent; color: var(--ink);
	font: 700 0.9rem var(--sans);
}
.tour-actions button:hover { background: rgba(16, 19, 42, 0.06); }
.tour-actions .primary { background: var(--ink); color: var(--snow); border-color: var(--ink); }
.tour-actions .primary:hover { background: var(--ink-2); }
.tour-close {
	position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
	border: 0; background: transparent; color: var(--day-muted); cursor: pointer;
}
.tour-close:hover { background: rgba(16, 19, 42, 0.08); }
.ask-fab.is-touring .guide-bubble { display: none; }

/* ---------- Lightbox ---------- */

.lightbox {
	width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0; background: rgba(8, 10, 30, 0.95); color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 60px 16px 24px; }
.lightbox img { max-width: min(92vw, 1400px); max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 10px; }
.lightbox figcaption { font-weight: 600; }
.lb-btn {
	position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0;
	background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.1rem; cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
	.agents { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
	:root { --rail: 0px; }
	.alt { display: none; }
	.alt-read { display: block; }
	.bar {
		background: linear-gradient(rgba(10, 13, 36, 0.55), rgba(10, 13, 36, 0));
		padding-bottom: 22px;
	}
	.fields { grid-template-columns: 1fr; }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
	.hero { grid-template-columns: 1fr; padding-top: 84px; padding-bottom: 36vh; align-items: start; position: relative; }
	.portrait { position: absolute; top: 84px; right: var(--gutter); width: 92px; }
	.hero h1 { font-size: clamp(2.7rem, 12vw, 3.4rem); padding-right: 100px; }
	.hero-line { margin-top: 18px; padding-right: 100px; }
	.talk-cols { grid-template-columns: 1fr; }
	.leg { padding-top: 10vh; padding-bottom: 10vh; }
}

@media (max-width: 560px) {
	.panel { border-radius: 18px; }
	.tiles { grid-template-columns: 1fr; }
	.day { padding-left: 12px; padding-right: 12px; }
	.day-inner { border-radius: 20px; }
	.console-log { height: 470px; padding: 12px; }
	.console-tabs button { padding: 0 9px; font-size: 0.84rem; }
	.msg { max-width: 94%; }
	.gallery { gap: 5px; --row: 116px; padding: 0 12px; }
	.gallery a::after { display: none; }
	.ask-fab { width: 104px; height: 120px; right: 4px; }
	.guide-bubble { right: 88px; }
	.ask { margin: auto auto calc(132px + env(safe-area-inset-bottom)); }
	.tour { left: 12px; right: 96px; width: auto; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 14px 14px 12px; }
	.tour-text { font-size: 0.95rem; }
	.tour-actions button { min-height: 38px; padding: 0 14px; }
	.ask { max-height: calc(100dvh - 150px - env(safe-area-inset-bottom)); }
	.lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 560px) and (max-height: 720px) {
	.tour { padding: 12px 12px 10px; }
	.tour-step { display: none; }
	.tour-text { margin-top: 0; font-size: 0.88rem; line-height: 1.4; padding-right: 28px; }
	.tour-actions { margin-top: 10px; }
	.hero-lede { font-size: 0.95rem; }
}
