.mast { position: sticky; top: 0; z-index: 30; height: var(--mast); display: flex; align-items: stretch; gap: clamp(20px, 3vw, 44px); padding: 0 0 0 max(var(--gutter), env(safe-area-inset-left)); background: var(--ground); border-bottom: 1px solid var(--rule); }
.mark { flex: none; align-self: center; display: block; width: 136px; height: 35px; color: var(--ink); border-radius: 4px; transition: color 0.14s; }
.mark svg { display: block; width: 100%; height: 100%; }
.mark:hover { color: var(--accent-ink); }
.states { flex: 1; min-width: 0; display: flex; align-items: stretch; gap: clamp(16px, 2.4vw, 36px); }
.states a { position: relative; display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none; transition: color 0.15s; }
.states a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); opacity: 0; scale: 0.3 1; transition: opacity 0.18s, scale 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.states [aria-current]::after { opacity: 1; scale: 1 1; }
.states a:focus-visible { outline: none; }
.states a:focus-visible::before { content: ""; position: absolute; inset: 9px -6px; border-radius: 4px; outline: 2px solid var(--accent); }
.states .west { flex: none; color: var(--dim); font: italic 500 20px/1 var(--serif); letter-spacing: -0.01em; }
.states .west[aria-current], .states .west:hover { color: var(--ink); }
.states ul { position: relative; flex: 1; display: flex; justify-content: space-between; gap: 18px; min-width: 0; margin: 0 0 0 -16px; padding: 0 max(28px, env(safe-area-inset-right)) 0 16px; overflow-x: auto; scrollbar-width: none; list-style: none; -webkit-mask: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent); mask: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
.states ul::-webkit-scrollbar { display: none; }
.states li { flex: none; display: flex; }
.states ul a { color: var(--dim); font: 600 16px/1 var(--sans); letter-spacing: 0.005em; }
.states ul a:hover, .states ul [aria-current] { color: var(--ink); }
@media (max-width: 759px) {
	.mast { gap: 16px; }
	.mark { width: 109px; height: 28px; }
	.states { gap: 16px; }
	.states .west { font-size: 18px; }
}

.frame { position: relative; --pad: var(--gutter); --page-w: 1164px; }
.stop { display: none; }
.map-pane { position: relative; background: var(--ground-2); }
.map { position: absolute; inset: 0; }
.map-tools { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 4; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; pointer-events: none; }
.map-tools > * { pointer-events: auto; }
.map-controls:empty { display: none; }
.mode { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 15px 0 12px; border: 1px solid rgb(27 38 44 / 0.16); border-radius: 999px; background: rgb(244 248 246 / 0.94); box-shadow: 0 1px 2px rgb(27 38 44 / 0.1), 0 6px 16px -8px rgb(27 38 44 / 0.4); font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; transition: background-color 0.14s, border-color 0.14s; }
.mode::before { content: ""; position: absolute; inset: -4px; }
.mode svg { flex: none; width: 18px; height: 14px; }
.mode:hover { background: var(--ground); border-color: rgb(27 38 44 / 0.4); }
.mode:active { transform: translateY(1px); }

.grip { display: none; position: absolute; z-index: 5; touch-action: none; transition: opacity 0.2s; }
.grip::before, .grip::after { content: ""; position: absolute; transition: background-color 0.12s, box-shadow 0.12s, opacity 0.12s; }
.grip[data-axis="x"]::before { top: 0; bottom: 0; left: 7px; width: 2px; background: var(--accent); opacity: 0; }
.grip[data-axis="y"]::before { left: 0; right: 0; top: 7px; height: 2px; background: var(--accent); opacity: 0; }
.grip[data-axis="x"]::after { top: 50%; left: 4px; width: 8px; height: 44px; margin-top: -22px; border-radius: 4px; background: var(--ground); box-shadow: 0 0 0 1px rgb(27 38 44 / 0.22), 0 1px 4px rgb(27 38 44 / 0.2); }
.grip[data-axis="y"]::after { left: 50%; top: 4px; width: 44px; height: 8px; margin-left: -22px; border-radius: 4px; background: var(--ground); box-shadow: 0 0 0 1px rgb(27 38 44 / 0.22), 0 1px 4px rgb(27 38 44 / 0.2); }
.grip[data-axis="xy"]::after { box-sizing: content-box; left: 4px; top: 4px; width: 11px; height: 11px; border: solid var(--dim); border-width: 0 2.5px 2.5px 0; border-bottom-right-radius: 6px; }
.grip:focus-visible { outline: none; }
.grip:is(:hover, :focus-visible, .held)::before { opacity: 1; }
.grip:is([data-axis="x"], [data-axis="y"]):is(:hover, :focus-visible, .held)::after { background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 1px 4px rgb(27 38 44 / 0.2); }
.grip[data-axis="xy"]:is(:hover, .held)::after { border-color: var(--accent); }
.resizing { -webkit-user-select: none; user-select: none; }
.frame.morphing .map-pane { z-index: 6; background: transparent; }
.frame.morphing .grip { opacity: 0; transition: none; }

.content { min-width: 0; padding: 26px var(--pad) 56px; }
.content [tabindex="-1"]:focus { outline: none; }
.trail { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: -6px 0 18px; }
.trail .back { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; margin-left: -10px; padding: 0 14px 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; transition: background-color 0.12s; }
.trail .back::before { content: ""; flex: none; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 1.7px 1.7px; transform: rotate(45deg); transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1); }
.trail .back:hover { background: var(--ground-2); }
.trail .back:hover::before { transform: translateX(-2px) rotate(45deg); }
.trail ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; color: var(--dim); font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; }
.trail li { display: inline-flex; align-items: center; }
.trail li + li::before { content: ""; width: 5px; height: 5px; margin: 0 9px 0 6px; border: solid currentColor; border-width: 1.2px 1.2px 0 0; transform: rotate(45deg); opacity: 0.7; }
.trail ol a { padding: 6px 0; color: inherit; text-decoration: none; }
.trail ol a:hover { color: var(--ink); text-decoration: underline; }
.trail .and { margin: 0 0.45em; font-style: italic; letter-spacing: 0; text-transform: none; }

.foot { clear: both; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px 56px; padding: 30px var(--pad) calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--ground); }
.foot a { text-decoration: none; transition: color 0.12s; }
.foot-id { flex: 1 1 250px; min-width: 0; }
.foot-mark { display: inline-block; padding: 6px 0; margin: -6px 0; font: italic 600 21px/1 var(--serif); letter-spacing: -0.005em; white-space: nowrap; }
.foot-line { margin: 10px 0 0; color: var(--dim); font: 15px/1.45 var(--serif); text-wrap: balance; }
.foot-mail { margin: 16px 0 0; color: var(--dim); font-size: 14px; overflow-wrap: anywhere; }
.foot-mail a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--accent) 70%, transparent); }
.foot-nav { flex: 0 1 auto; }
.foot-nav ul { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; gap: 0 40px; margin: -11px 0 0; padding: 0; list-style: none; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14.5px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.foot :is(.foot-mark, .foot-nav a, .foot-mail a):hover { color: var(--accent-ink); }
.foot-nav a:hover { text-decoration: underline; text-decoration-color: currentColor; }
.foot-fine { flex: 1 1 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin: 6px 0 0; padding-top: 16px; border-top: 1px solid color-mix(in oklab, var(--rule) 60%, transparent); color: var(--dim); font-size: 12.5px; line-height: 1.5; }

@media (min-width: 760px) {
	.frame { --pad: clamp(24px, 2.8vw, 44px); --map-w: clamp(280px, calc(var(--split, 0.5) * 100%), calc(100% - 360px)); --box-h: max(240px, calc(var(--box, 0.5) * (100dvh - var(--mast)))); }
	.frame:not([data-mode="page"]) .map-pane { z-index: 2; }
	.frame[data-mode="expanded"] { display: grid; grid-template-columns: var(--map-w) minmax(0, 1fr); align-items: start; min-height: calc(100dvh - var(--mast)); }
	.frame[data-mode="expanded"] .map-pane { grid-row: span 2; position: sticky; top: var(--mast); height: calc(100dvh - var(--mast)); }
	.frame[data-mode="expanded"] .foot { grid-column: 2; }
	.frame[data-mode="reduced"] .map-pane { float: left; width: var(--map-w); height: var(--box-h); margin: 0 var(--pad) var(--pad) 0; }
	.frame:not([data-mode="page"]) .grip[data-axis="x"] { display: block; top: 0; bottom: 0; right: -8px; width: 16px; cursor: col-resize; }
	.frame[data-mode="reduced"] .grip[data-axis="y"] { display: block; left: 0; right: 0; bottom: -8px; height: 16px; cursor: row-resize; }
	.frame[data-mode="reduced"] .grip[data-axis="xy"] { display: block; right: -12px; bottom: -12px; width: 24px; height: 24px; cursor: nwse-resize; }
	.frame.resizing, .frame.resizing * { cursor: inherit; }
}

@media (max-width: 759px) {
	.frame { --peek: calc(172px + env(safe-area-inset-bottom)); }
	:root:has(.frame[data-mode="expanded"]) { scroll-snap-type: y mandatory; }
	.frame[data-mode="expanded"] { display: flow-root; }
	.frame[data-mode="expanded"] .stop { display: block; position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; scroll-margin-top: var(--mast); }
	.frame[data-mode="expanded"] .stop[data-stop="peek"] { top: 0; }
	.frame[data-mode="expanded"] .stop[data-stop="half"] { top: calc(50svh - var(--peek)); }
	.frame[data-mode="expanded"] .map-pane { position: fixed; top: var(--mast); left: 0; right: 0; bottom: 0; }
	.frame[data-mode="expanded"] .content { position: relative; z-index: 1; min-height: calc(100svh - var(--mast)); margin-top: calc(100svh - var(--mast) - var(--peek)); padding-top: 30px; border-radius: 18px 18px 0 0; background: var(--ground); box-shadow: 0 -1px 0 rgb(27 38 44 / 0.08), 0 -12px 32px -14px rgb(27 38 44 / 0.4); scroll-snap-align: start; scroll-margin-top: var(--mast); }
	.frame[data-mode="expanded"] .content::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: color-mix(in oklab, var(--rule) 70%, var(--dim)); }
	.frame[data-mode="expanded"] .foot { position: relative; z-index: 1; scroll-snap-align: end; }
	.frame[data-mode="reduced"] .map-pane { height: calc(0.5 * (100svh - var(--mast))); }
	.frame.morphing .content { position: relative; z-index: 1; }
}

.frame[data-mode="page"] :is(.content, .foot) { max-width: calc(var(--page-w) + 2 * var(--pad)); margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
	.mark, .states a, .states a::after, .grip, .grip::before, .grip::after, .trail .back, .trail .back::before, .foot a { transition: none; }
}

