/* ITI presentation. Everything fits one screen and scales with its height. */
html, body.deck { height: 100%; margin: 0; overflow: hidden; background: var(--night); font-size: clamp(14px, 1.9vh, 24px); line-height: 1.4; }
#map { position: fixed; inset: 0; background: #EDE6D8; }

#full { position: fixed; inset: 0; z-index: 10; padding: 9vh 7vw; display: flex; flex-direction: column; justify-content: center; }
#full[hidden] { display: none; }
#full.dark { background: var(--night); color: var(--paper); }
#full.paper { background: var(--paper); color: var(--ink); }
#full.terra { background: var(--terra); color: #FFF7EC; align-items: center; text-align: center; }
#full.title { background: var(--paper); color: var(--ink); justify-content: flex-end; padding-bottom: 13vh; }
#full .kick, #card .kick { font-size: .78rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--terra); }
#full.dark .kick { color: #E6A070; }
#full h1 { font: 380 11vh/.98 var(--serif); letter-spacing: -.02em; margin: 2.2vh 0; }
#full h1 em { color: var(--terra); font-weight: 340; }
#full h2 { font: 380 7.4vh/1.04 var(--serif); letter-spacing: -.015em; margin: 1.8vh 0 3.5vh; }
#full blockquote { font: 360 6.8vh/1.1 var(--serif); margin: 2.4vh 0 0; max-width: 24ch; letter-spacing: -.012em; }
#full.terra blockquote { font-size: 9vh; max-width: 19ch; }
#full.terra p { font-size: 1.3rem; max-width: 52ch; color: #FBE6D3; }
#relief { position: absolute; inset: 0; width: 100%; height: 100%; }
.tcopy { position: relative; max-width: 46vw; }
#tphase { font-size: 1.25rem; color: var(--ink-2); min-height: 3.6em; margin: 0; }
#full .logo { position: absolute; left: 7vw; top: 6vh; height: 4vh; }
.srcl { font-size: .8rem; opacity: .7; margin-top: 3vh; }

#full .b { opacity: 0; transform: translateY(1.6vh); transition: opacity .7s var(--ease), transform .7s var(--ease); }
#full .b.in { opacity: 1; transform: none; }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3vw; margin-top: 5vh; }
.tri b { display: block; font: 400 3.1vh var(--serif); color: #fff; margin-bottom: .6vh; }
.tri div { color: #BEC5BC; font-size: 1.05rem; border-top: 1px solid rgba(246, 241, 231, .25); padding-top: 1.6vh; }
.ring { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6vh 2vw; }
.ring span { font: 400 3.2vh/1.15 var(--serif); border-top: 2px solid var(--terra); padding-top: 1.2vh; }
.hub { margin-top: 5vh; font: italic 370 3.2vh/1.25 var(--serif); color: var(--terra); }
.five { list-style: none; padding: 0; margin: 2vh 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2vw; }
.five li { border-top: 2px solid var(--terra); padding-top: 1.6vh; font-size: 1.02rem; color: var(--ink-2); }
.five b { display: block; font: 420 3.6vh var(--serif); color: var(--ink); margin-bottom: .6vh; }
.road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2vw; }
.road div { border: 1px dashed rgba(23, 33, 31, .36); border-radius: 6px; padding: 2.6vh; font-size: 1.1rem; }
.road small { display: block; color: var(--ink-3); }
.road b { display: block; font: 380 9vh/1.05 var(--serif); }
.live { display: flex; align-items: baseline; gap: 1.2vw; }
.live b { font: 360 11vh/1 var(--serif); }
.live span { color: #BEC5BC; font-size: 1.1rem; }
.grid { list-style: none; padding: 0; margin: 3vh 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1vh 2.4vw; font-size: 1.02rem; }
.grid li { display: flex; align-items: center; gap: .6em; border-top: 1px solid rgba(246, 241, 231, .14); padding-top: .9vh; }
.grid i { width: .6em; height: .6em; border-radius: 50%; background: #4B5550; }
.grid i.up { background: #57C98A; box-shadow: 0 0 0 .2em rgba(87, 201, 138, .2); } .grid i.down { background: #EE6A50; }
.open { align-self: flex-start; margin-top: 3vh; color: #E6A070; }

#card { position: fixed; left: 3vw; bottom: 11vh; width: min(38vw, 620px); z-index: 5; background: rgba(251, 248, 241, .95); padding: 2.6vh 2vw; border-radius: 8px; box-shadow: 0 1.4vh 4vh rgba(23, 33, 31, .2); }
#card.flash { animation: rise .7s var(--ease); }
#card h2 { font: 400 5vh/1.06 var(--serif); letter-spacing: -.012em; margin: 1vh 0; }
#card p { margin: 0; color: var(--ink-2); font-size: 1.05rem; }
#card .status { display: inline-block; margin-top: 1.4vh; font-size: .74rem; font-weight: 600; padding: .2em .8em; border-radius: 999px; background: var(--paper-3); }
@keyframes rise { from { opacity: 0; transform: translateY(1.6vh); } }

#metrics { position: fixed; right: 3vw; top: 4vh; z-index: 5; display: grid; gap: 1vh; width: 19vw; min-width: 200px; }
#metrics[hidden] { display: none; }
#metrics div { background: rgba(251, 248, 241, .95); border-radius: 6px; padding: 1.1vh 1.1vw; }
#metrics b { display: block; font: 380 4.3vh/1.05 var(--serif); font-feature-settings: "tnum"; }
#metrics span { font-size: .8rem; color: var(--ink-2); }
#spark { position: fixed; right: 3vw; bottom: 11vh; width: 19vw; min-width: 200px; z-index: 5; background: rgba(251, 248, 241, .95); border-radius: 6px; padding: .8vh; }
#spark svg { display: block; width: 100%; } #spark polyline { fill: none; stroke: var(--terra); stroke-width: 2; } #spark circle { fill: var(--ink); }
#source { position: fixed; left: 3vw; bottom: 6.6vh; z-index: 5; font-size: .76rem; max-width: 46vw; color: var(--ink); background: rgba(251, 248, 241, .88); padding: .25em .7em; border-radius: 4px; }

#agent { position: fixed; right: 0; top: 0; bottom: 5.4vh; width: min(34vw, 520px); z-index: 8; display: flex; flex-direction: column; background: rgba(251, 248, 241, .98); box-shadow: -1vh 0 4vh rgba(23, 33, 31, .22); }
#agent[hidden] { display: none; }
#agent header { padding: 1.8vh 1.4vw 1.2vh; border-bottom: 1px solid var(--rule); position: relative; }
#agent h3 { font: 420 3vh var(--serif); margin: 0; }
#agent header p { margin: .2vh 0 0; font-size: .74rem; color: var(--ink-3); }
#agentClose { position: absolute; right: 1vw; top: 1.4vh; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--ink-3); }
#log { flex: 1; min-height: 0; overflow-y: auto; padding: 1.4vh 1.4vw; }
.turn { margin-bottom: 2vh; }
.turn .q { font: italic 400 1.2rem/1.25 var(--serif); }
.steps { list-style: none; margin: 1vh 0; padding: 0; font-size: .86rem; color: var(--ink-2); }
.steps li { padding: .25vh 0 .25vh 1.5em; position: relative; }
.steps li::before { content: ""; position: absolute; left: .2em; top: .62em; width: .55em; height: .55em; border-radius: 50%; border: 2px solid var(--terra); border-right-color: transparent; animation: spin .8s linear infinite; }
.steps li.done::before { animation: none; background: var(--terra); }
@keyframes spin { to { transform: rotate(360deg); } }
.answer { animation: rise .5s var(--ease); border-left: 3px solid var(--terra); padding-left: .9vw; }
.answer p { margin: 0; font-size: 1.1rem; }
.answer small { display: block; margin-top: .7vh; color: var(--ink-3); font-size: .74rem; }
#chips { display: flex; flex-wrap: wrap; gap: .5vh .4vw; padding: 1vh 1.4vw 0; border-top: 1px solid var(--rule); max-height: 19vh; overflow-y: auto; }
#chips button { border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: .25vh .7vw; font-size: .74rem; cursor: pointer; text-align: left; }
#chips button:hover { background: var(--ink); color: var(--paper); }
#ask { display: flex; gap: .5vw; padding: 1vh 1.4vw 1.4vh; }
#q { flex: 1; min-width: 0; border: 1px solid var(--ink); border-radius: 999px; padding: .7vh 1vw; background: #fff; font-size: 1rem; }
#ask button { border: 0; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 0 1.1vw; cursor: pointer; }

.pin { position: relative; width: 0; height: 0; z-index: 4; }
.pin i { position: absolute; left: -1.2vh; top: -1.2vh; width: 2.4vh; height: 2.4vh; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 .4vh #fff; }
.pin i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--terra); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { transform: scale(4.5); opacity: 0; } }
.pin b { position: absolute; left: 2vh; top: -1.6vh; white-space: nowrap; background: var(--ink); color: var(--paper); font: 600 1rem var(--sans); padding: .15em .6em; border-radius: 4px; }

#hud { position: fixed; left: 0; right: 0; bottom: 0; height: 5.4vh; min-height: 40px; z-index: 12; display: flex; align-items: center; gap: .6vw; padding: 0 1.2vw; background: rgba(16, 27, 26, .9); color: var(--paper); }
#hud button { border: 0; background: rgba(246, 241, 231, .12); color: var(--paper); height: 3.6vh; min-height: 28px; min-width: 3.4vw; border-radius: 4px; cursor: pointer; font-size: .9rem; }
#hud button:hover, #hud a:hover { background: var(--terra); }
#hud a { display: inline-flex; align-items: center; height: 3.6vh; min-height: 28px; padding: 0 .8vw; border-radius: 4px; background: rgba(246, 241, 231, .12); color: var(--paper); text-decoration: none; font-size: .9rem; }
#hud .track { flex: 1; height: 3px; background: rgba(246, 241, 231, .2); border-radius: 2px; overflow: hidden; }
#bar { height: 100%; width: 0; background: #E6A070; transition: width .4s var(--ease); }
#count { font-size: .78rem; font-feature-settings: "tnum"; min-width: 4em; text-align: right; }
.maplibregl-ctrl-bottom-right { bottom: 5.4vh; }
body.agent-open .maplibregl-ctrl-bottom-right { right: min(34vw, 520px); }
body.agent-open #metrics { right: calc(min(34vw, 520px) + 1.5vw); }
