:root {
  color-scheme: light;
  --paper: #f7f4ec;
  --surface: #fffcf6;
  --ink: #193028;
  --muted: #465c51;
  --rule: #c7cbbc;
  --green: #173b31;
  --rust: #8b472b;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.46 var(--sans); }
h1, h2, p, figure { margin: 0; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--green); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.frame { inline-size: min(100% - 32px, 1080px); margin-inline: auto; }
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  z-index: 4;
  inset: 8px auto auto 12px;
  padding: 11px 16px;
  background: var(--surface);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.mast { border-block-end: 1px solid var(--rule); }
.mast-inner { min-block-size: 59px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { font: 800 1.6rem/.95 var(--sans); letter-spacing: -.08em; white-space: nowrap; }
.wordmark > span { color: var(--rust); }
.wordmark .wordmark-divider { margin-inline: 9px; color: var(--muted); font: 400 .86rem var(--mono); }
.wordmark .wordmark-parent { color: var(--muted); font: 700 .87rem var(--mono); letter-spacing: -.06em; }
.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--rust);
  font: 700 .65rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.demo-label span { inline-size: 7px; block-size: 7px; border: 1px solid currentColor; transform: rotate(45deg); }

.intro { padding-block: clamp(22px, 4vw, 48px) clamp(17px, 2.8vw, 29px); }
.eyebrow { color: var(--rust); font: 700 .7rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
h1 { margin-block: 5px 8px; font: 400 clamp(2.42rem, 6.7vw, 4.6rem)/.98 var(--serif); letter-spacing: -.064em; }
.intro > p:last-child { color: var(--muted); font-size: .94rem; max-inline-size: 56ch; }
.workbench, .bottom { display: grid; gap: 18px; align-items: start; }
.workbench > *, .bottom > * { min-inline-size: 0; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid #a9b6a8;
  border-radius: 5px;
}
.search svg { position: absolute; inline-size: 20px; inset-inline-start: 11px; pointer-events: none; }
.search input {
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 46px;
  padding: 8px 11px 8px 40px;
  border: 0;
  border-radius: inherit;
  color: var(--ink);
  background: transparent;
}
.search input::placeholder { color: var(--muted); }
#search-results {
  display: grid;
  gap: 1px;
  margin-block-start: 5px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--rule);
}
#search-results button, #search-results p { padding: 8px 12px; text-align: start; background: var(--surface); }
#search-results button {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 10px;
  min-block-size: 44px;
  border: 0;
}
#search-results button:hover { background: #e9eddf; }
#search-results button:focus-visible { position: relative; outline-offset: -3px; }
#search-results span, #search-results p { color: var(--muted); font-size: .82rem; }

.plan { margin-block-start: 9px; }
.map {
  position: relative;
  isolation: isolate;
  inline-size: 100%;
  min-block-size: 218px;
  aspect-ratio: 520 / 288;
  border: 1px solid #adb9aa;
  border-radius: 6px;
  background: #e8eadc;
}
.plan-art { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border-radius: inherit; }
.plan-ground { fill: #e2e7d9; }
.plan-grid { color: #b7c7b6; opacity: .79; }
.plot { fill: #f5f3dd; stroke: #829989; stroke-width: 1.35; }
.plot-inner { fill: #eeecda; }
.plan-green { fill: #d7e2c8; }
.plan-wall { fill: none; stroke: #819587; stroke-width: 1.55; }
.plan-hatch { color: #9cac9c; opacity: .68; }
.plan-path { fill: none; stroke: #81968a; stroke-width: 1.25; stroke-dasharray: 3 4; }
.plan-line { fill: none; stroke: #899b90; stroke-width: 1; }
.map-zone {
  position: absolute;
  z-index: 1;
  inset-block-start: 10%;
  max-inline-size: 38%;
  padding: 2px 4px;
  background: #f5f3dd;
  font: 750 clamp(.58rem, 2vw, .72rem)/1.2 var(--mono);
  letter-spacing: -.035em;
}
.zone-ipe { inset-inline-start: 9%; }
.zone-vento { inset-inline-start: 58%; }
.map-pin {
  position: absolute;
  z-index: 2;
  inset-inline-start: var(--x);
  inset-block-start: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 6px 9px;
  transform: translate(-50%, -50%);
  border: 1px solid #91a497;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 2px 0 #173b3122;
  font-size: .71rem;
  font-weight: 750;
  white-space: nowrap;
}
.map-pin:hover { border-color: var(--green); background: #f2f5e6; }
.map-pin[aria-pressed="true"] { z-index: 3; border-color: var(--green); background: var(--green); color: #fffbed; }
.pin-dot { inline-size: 8px; block-size: 8px; flex: 0 0 8px; border: 1px solid currentColor; border-radius: 50%; }
.map-pin[data-state="closed"] .pin-dot { background: #71a86c; }
.map-pin[data-state="open"] .pin-dot { background: #ebb077; border-radius: 1px; }
.map-pin[data-state="released"] .pin-dot { background: #81c6bd; border-radius: 1px; transform: rotate(45deg); }
.map-pin[data-state="stale"] .pin-dot { border-style: dashed; background: #f5d78e; }
.map-pin[data-pending="true"] .pin-dot { animation: pulse 760ms ease-in-out infinite alternate; }
figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-block-start: 6px;
  color: var(--muted);
  font: 650 .7rem/1.35 var(--mono);
}

.console { border: 1px solid var(--rule); border-radius: 7px; background: var(--surface); }
.reading {
  --state-color: #e3dfbd;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-block-size: 149px;
  padding: 16px clamp(107px, 29%, 150px) 16px 15px;
  border-radius: 6px 6px 0 0;
  color: #fffbed;
  background: var(--green);
  overflow: hidden;
}
.reading[data-state="closed"] { --state-color: #bee1a5; }
.reading[data-state="open"] { --state-color: #ffd09e; }
.reading[data-state="unknown"] { --state-color: #d3e2f2; }
.reading[data-state="stale"] { --state-color: #f8da88; }
.reading[data-state="released"] { --state-color: #b0e3d9; }
.reading-copy { min-inline-size: 0; z-index: 1; }
.reading-location { color: #d8e7d7; font: 650 .68rem/1.35 var(--mono); }
.reading h2 { margin-block: 5px; font: 400 clamp(1.46rem, 4.7vw, 2.17rem)/1 var(--serif); letter-spacing: -.045em; }
.reading-state { color: var(--state-color); font-size: .91rem; font-weight: 760; }
.reading-detail { margin-block-start: 3px; color: #ebebdc; font-size: .78rem; }
.door-drawing {
  position: absolute;
  inset-inline-end: 2px;
  inset-block-start: 50%;
  inline-size: clamp(102px, 29%, 144px);
  transform: translateY(-50%);
  color: var(--state-color);
}
.door-grid { stroke: currentColor; opacity: .2; }
.door-frame, .door-leaf, .door-uncertain, .door-unlatched { stroke: currentColor; stroke-width: 1.55; stroke-linejoin: round; stroke-linecap: round; }
.door-leaf { transform-origin: 48px center; fill: #ffffff0b; transition: transform 350ms cubic-bezier(.2,.7,.25,1); }
.door-uncertain, .door-unlatched { display: none; }
.reading[data-state="open"] .door-leaf { transform: skewY(-29deg) scaleX(.59); }
.reading[data-state="released"] .door-unlatched,
.reading:is([data-state="unknown"], [data-state="stale"], [data-state="idle"]) .door-uncertain { display: block; }
.reading:is([data-state="unknown"], [data-state="stale"], [data-state="idle"]) .door-leaf { display: none; }
.reading[data-state="stale"] .door-uncertain { stroke-dasharray: 3 3; }
.reading[data-pending="true"] .door-frame { animation: pulse 760ms ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .45; } }

.controls { padding: 11px; }
.mode-switch, .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mode-switch { padding: 2px; background: #edeedf; border: 1px solid #d5dacb; border-radius: 5px; }
.mode-switch button, .action {
  flex: 1 1 115px;
  min-block-size: 44px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font-size: .83rem;
  font-weight: 750;
}
.mode-switch button[aria-pressed="true"] { border-color: #aebbae; background: var(--surface); }
.mode-switch button:hover:not([aria-pressed="true"]) { background: #e1e6d4; }
.actions { margin-block-start: 9px; }
.action { border-color: #a6b6a8; }
.action:hover:not(:disabled) { background: #e7ecdf; }
.action.primary:not(:disabled) { border-color: var(--green); background: var(--green); color: #fffbed; }
.action.primary:hover:not(:disabled) { background: #285645; }
.action:disabled { color: #536258; background: #eeeee6; border-color: #d4dacd; }
.mode-help, .command-status { margin-block-start: 7px; color: var(--muted); font-size: .76rem; }
.command-status { padding: 7px 8px; border-inline-start: 2px solid #648572; background: #eaeee0; color: var(--ink); }

.bottom { margin-block-start: 20px; }
.activity, .availability, .foot { padding-block-start: 10px; border-block-start: 1px solid var(--rule); }
.activity h2 { margin-block-end: 4px; font: 700 .72rem/1.25 var(--mono); letter-spacing: .075em; text-transform: uppercase; }
.subtle { color: var(--muted); font-size: .77rem; }
#activity-list { margin: 0; padding: 0; list-style: none; }
#activity-list li {
  display: grid;
  grid-template-columns: 4ch 1fr;
  gap: 0 8px;
  padding-block: 7px;
  font-size: .77rem;
}
#activity-list li + li { border-block-start: 1px solid var(--rule); }
#activity-list time { color: var(--rust); font: 650 .66rem/1.7 var(--mono); }
#activity-list li span:nth-child(2) { font-weight: 750; }
#activity-list li span:last-child { grid-column: 2; color: var(--muted); }
.remember { display: flex; align-items: center; gap: 8px; min-block-size: 44px; font-size: .84rem; font-weight: 750; cursor: pointer; }
.remember input { flex: 0 0 auto; inline-size: 17px; block-size: 17px; margin: 0 2px 0 0; accent-color: var(--green); }
.remember small { display: block; color: var(--muted); font-size: .75rem; font-weight: 400; }
.offline-options { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 5px; margin-block-end: 14px; }
.offline-download { min-block-size: 44px; padding: 7px 12px; border: 1px solid var(--green); border-radius: 5px; background: var(--surface); color: var(--green); font-size: .82rem; font-weight: 750; }
.offline-download:hover:not(:disabled) { background: #e9eddf; }
.offline-download:disabled { border-color: var(--rule); color: var(--muted); }
#offline-progress { inline-size: min(100%, 9rem); accent-color: var(--green); }
.secure-link { display: inline-flex; align-items: center; min-block-size: 44px; font-size: .79rem; font-weight: 700; }
.operator-maps { margin-block-start: 20px; border-block-start: 1px solid var(--rule); padding-block-start: 13px; }
.operator-maps h2 { font-size: .92rem; margin-block-end: 3px; }
.operator-maps ul { display: flex; flex-wrap: wrap; column-gap: 18px; margin: 0; padding: 0; list-style: none; }
.operator-maps a { display: inline-flex; align-items: center; min-block-size: 44px; font-size: .82rem; font-weight: 700; }
.foot { padding-block-end: max(20px, env(safe-area-inset-bottom)); margin-block-start: 16px; color: var(--muted); font-size: .74rem; }

@media (min-width: 755px) {
  .frame { inline-size: min(100% - 64px, 1080px); }
  .workbench, .bottom { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 22px; }
  .reading { min-block-size: 176px; padding-inline-start: 20px; }
  .controls { padding: 13px; }
  .map-pin { gap: 7px; padding-inline: 11px; font-size: .79rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
