:root {
  --ink: #11100e;
  --paper: #f0eee7;
  --paper-2: #e6e1d6;
  --muted: #756f66;
  --line: rgba(17,16,14,.14);
  --accent: #d5ff54;
  --accent-ink: #12150b;
  --sandstone: #a9553c;
  --blue: #18485e;
  --radius: 24px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { background: var(--ink); color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(24,72,94,.32); outline-offset: 3px; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .045; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 12px; color: white; background: linear-gradient(180deg, rgba(17,16,14,.66), transparent); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { appearance: none; border: 0; background: transparent; color: inherit; padding: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.brand span:last-child { display: grid; line-height: .95; }
.brand b { font-size: 14px; letter-spacing: .15em; }
.brand small { font-size: 9px; letter-spacing: .28em; margin-top: 4px; }
.brand-mark { width: 25px; height: 31px; position: relative; display: block; }
.brand-mark i { position: absolute; bottom: 0; width: 2px; background: currentColor; transform-origin: bottom center; }
.brand-mark i:nth-child(1){ height: 22px; left: 5px; transform: rotate(-5deg); }
.brand-mark i:nth-child(2){ height: 31px; left: 12px; }
.brand-mark i:nth-child(3){ height: 24px; right: 4px; transform: rotate(5deg); }
.top-actions { display:flex; gap:8px; }
.icon-btn { width: 40px; height:40px; border:1px solid rgba(255,255,255,.4); border-radius:50%; color:white; background:rgba(0,0,0,.22); backdrop-filter: blur(12px); font-size:20px; }
.view { display: none; min-height: 100vh; }
.view.active { display:block; animation: fade .36s ease both; }
@keyframes fade { from { opacity:.2; transform:translateY(8px); } to { opacity:1; transform:none; } }
.hero-image { min-height: 78svh; position:relative; background-image: url('https://upload.wikimedia.org/wikipedia/commons/f/f3/Lichfield_Cathedral_2010-10-13.jpg'), url('assets/fallback-cathedral.svg'); background-size:cover; background-position:center 40%; color:white; display:flex; align-items:flex-end; overflow:hidden; }
.hero-overlay { position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.08) 15%, rgba(5,8,10,.15) 45%, rgba(5,8,10,.88) 94%); }
.hero-copy { position:relative; z-index:2; padding: 120px 24px 70px; max-width:740px; }
.eyebrow { display:block; font-size:11px; font-weight:800; letter-spacing:.17em; text-transform:uppercase; margin-bottom:14px; }
.eyebrow.dark { color: var(--muted); }
.hero-copy h1, .planner-shell h1, .map-header h1, .complete-card h1 { margin:0; font-family: Georgia, 'Times New Roman', serif; font-weight:400; line-height:.98; letter-spacing:-.035em; }
.hero-copy h1 { font-size:clamp(46px, 11vw, 82px); max-width: 680px; text-wrap: balance; }
.hero-copy p { max-width:600px; font-size:17px; line-height:1.55; color:rgba(255,255,255,.82); margin:22px 0 28px; }
.hero-caption { position:absolute; z-index:2; bottom:17px; right:18px; font-size:10px; color:rgba(255,255,255,.62); letter-spacing:.03em; text-align:right; max-width:220px; }
.primary, .secondary, .text-btn { border:0; border-radius:999px; padding:14px 20px; font-weight:750; }
.primary { background:var(--accent); color:var(--accent-ink); box-shadow:0 12px 30px rgba(0,0,0,.15); }
.primary span { margin-left:12px; }
.primary.large { padding:17px 24px; }
.primary.full, .secondary.full { width:100%; }
.secondary { background:transparent; color:var(--ink); border:1px solid var(--line); }
.text-btn { background:transparent; color:var(--muted); }
.manifesto-section { padding:70px 22px 90px; max-width:1100px; margin:auto; }
.section-kicker { font-size:10px; letter-spacing:.17em; font-weight:850; color:var(--muted); }
.manifesto-section h2 { font-family:Georgia,serif; font-size:clamp(36px,7vw,60px); font-weight:400; letter-spacing:-.03em; margin:12px 0 18px; }
.manifesto-section > p { max-width:650px; line-height:1.7; color:#4e4942; font-size:17px; }
.principle-grid { display:grid; gap:1px; background:var(--line); margin-top:45px; border:1px solid var(--line); border-radius:22px; overflow:hidden; }
.principle-grid article { background:var(--paper); padding:28px; }
.principle-grid article > span { font:700 10px/1 ui-monospace,monospace; color:var(--muted); }
.principle-grid h3 { font-size:19px; margin:16px 0 8px; }
.principle-grid p { color:var(--muted); margin:0; line-height:1.55; font-size:14px; }
.planner-view { background: var(--paper); padding:110px 20px 70px; }
.planner-shell { max-width:760px; margin:auto; }
.planner-shell h1 { font-size:clamp(48px,10vw,76px); }
.planner-intro { max-width:570px; line-height:1.65; color:var(--muted); }
.time-options { display:grid; gap:10px; margin:35px 0 26px; }
.time-option { border:1px solid var(--line); background:rgba(255,255,255,.28); border-radius:20px; min-height:110px; padding:20px; text-align:left; display:grid; grid-template-columns:auto 1fr; column-gap:10px; align-items:end; position:relative; transition:.2s ease; }
.time-option strong { font:400 52px/.8 Georgia,serif; }
.time-option span { font-weight:750; font-size:13px; align-self:end; padding-bottom:4px; }
.time-option small { grid-column:1 / -1; color:var(--muted); margin-top:12px; }
.time-option.selected { background:var(--ink); color:white; transform:translateY(-2px); box-shadow:0 18px 45px rgba(0,0,0,.13); }
.time-option.selected small { color:rgba(255,255,255,.62); }
.route-preview { border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin-bottom:28px; padding:20px 0; display:flex; gap:8px; align-items:center; overflow:auto; scrollbar-width:none; }
.route-node { flex:0 0 auto; display:flex; align-items:center; gap:8px; font-size:11px; font-weight:750; white-space:nowrap; }
.route-node .dot { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:var(--ink); color:white; font-size:9px; }
.route-arrow { color:#a8a196; }
.journey-view { background:var(--paper); padding-bottom:calc(90px + var(--safe-bottom)); }
.journey-progress { position:sticky; top:0; z-index:35; background:rgba(240,238,231,.94); backdrop-filter:blur(14px); padding:calc(78px + env(safe-area-inset-top,0px)) 18px 10px; border-bottom:1px solid var(--line); }
.progress-meta { display:flex; justify-content:space-between; font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.progress-track { height:3px; background:rgba(17,16,14,.12); margin-top:10px; overflow:hidden; }
.progress-fill { height:100%; width:20%; background:var(--ink); transition:width .4s ease; }
.stop-visual { min-height:64svh; position:relative; overflow:hidden; background:#25221e; color:white; }
.stop-visual img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .45s ease; }
.stop-visual img.loaded { opacity:1; }
.image-scrim { position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.07),rgba(0,0,0,.16) 45%,rgba(0,0,0,.87)); }
.stop-badge { position:absolute; left:18px; top:20px; width:48px; height:48px; border:1px solid rgba(255,255,255,.7); border-radius:50%; display:grid; place-items:center; font:700 11px/1 ui-monospace,monospace; backdrop-filter:blur(8px); }
.location-pill { position:absolute; right:16px; top:21px; border:1px solid rgba(255,255,255,.35); color:white; background:rgba(0,0,0,.28); border-radius:999px; padding:10px 13px; font-size:10px; font-weight:750; display:flex; align-items:center; gap:8px; backdrop-filter:blur(12px); }
.pulse-dot { width:7px; height:7px; background:var(--accent); border-radius:50%; box-shadow:0 0 0 0 rgba(213,255,84,.55); animation:pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow:0 0 0 8px rgba(213,255,84,0); } 100% { box-shadow:0 0 0 0 rgba(213,255,84,0); } }
.stop-title-wrap { position:absolute; left:20px; right:20px; bottom:26px; }
.stop-title-wrap h1 { font:400 clamp(44px,10vw,72px)/.95 Georgia,serif; letter-spacing:-.035em; margin:0 0 13px; text-wrap:balance; }
.stop-title-wrap p { margin:0; color:rgba(255,255,255,.77); max-width:600px; line-height:1.5; }
.stop-content { max-width:760px; margin:auto; padding:24px 20px 20px; }
.confidence-row { display:flex; justify-content:space-between; align-items:center; gap:12px; border-bottom:1px solid var(--line); padding-bottom:18px; }
.confidence { font-size:10px; color:var(--muted); }
.confidence b { color:#2f6a45; font-size:9px; border:1px solid rgba(47,106,69,.3); border-radius:999px; padding:5px 7px; margin-right:6px; }
.evidence-link, .mini-link { border:0; padding:0; color:var(--ink); background:transparent; text-decoration:underline; text-underline-offset:3px; font-size:11px; font-weight:700; }
.story { font:400 20px/1.62 Georgia,serif; color:#27231e; padding:28px 0; }
.story p { margin:0 0 18px; }
.story strong { font-family:Inter,sans-serif; font-size:.72em; letter-spacing:.04em; text-transform:uppercase; }
.look-card { background:var(--ink); color:white; padding:20px; border-radius:20px; display:flex; gap:16px; align-items:flex-start; }
.look-icon { width:38px; height:38px; flex:0 0 auto; border:1px solid rgba(255,255,255,.25); border-radius:50%; display:grid; place-items:center; }
.look-card span { color:var(--accent); font-size:9px; letter-spacing:.16em; font-weight:850; }
.look-card p { margin:7px 0 0; color:rgba(255,255,255,.8); line-height:1.55; font-size:14px; }
.time-layer, .ask-card { padding:48px 0 8px; }
.section-row, .ask-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-end; }
.section-row h2, .ask-head h2 { font:400 29px/1.05 Georgia,serif; letter-spacing:-.02em; margin:8px 0 0; }
.swipe-hint { color:var(--muted); font-size:10px; }
.timeline { display:flex; gap:10px; overflow:auto; scrollbar-width:none; margin:20px -20px 0; padding:0 20px 8px; scroll-snap-type:x mandatory; }
.time-card { min-width:78%; max-width:420px; flex:0 0 auto; scroll-snap-align:start; border:1px solid var(--line); border-radius:18px; padding:20px; background:rgba(255,255,255,.25); }
.time-card b { font:400 32px/1 Georgia,serif; }
.time-card span { display:block; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.1em; margin:7px 0 13px; text-transform:uppercase; }
.time-card p { margin:0; color:#4c463e; font-size:13px; line-height:1.6; }
.ask-card { border-top:1px solid var(--line); margin-top:42px; }
.grounded-pill { background:#dce7dd; color:#31573d; border-radius:999px; padding:6px 9px; font-size:9px; font-weight:800; }
.prompt-chips { display:flex; gap:7px; overflow:auto; scrollbar-width:none; padding:17px 0 2px; }
.prompt-chip { border:1px solid var(--line); background:transparent; border-radius:999px; padding:9px 12px; white-space:nowrap; font-size:11px; }
.ask-form { display:flex; align-items:center; gap:9px; margin-top:12px; border:1px solid var(--line); background:white; border-radius:18px; padding:7px 7px 7px 15px; }
.ask-form input { flex:1; min-width:0; border:0; background:transparent; outline:none; font-size:14px; }
.ask-form button { width:38px; height:38px; flex:0 0 auto; border:0; border-radius:12px; background:var(--ink); color:white; font-size:18px; }
.answer-box { margin-top:12px; background:#e9e6dd; border-radius:18px; padding:18px; }
.answer-status { font-size:9px; color:var(--muted); display:flex; gap:6px; align-items:center; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.spark { color:#6a7e26; }
.answer-box p { margin:13px 0; font:400 16px/1.58 Georgia,serif; }
.stop-actions { display:grid; grid-template-columns:1fr 1.4fr; gap:8px; padding:35px 0 12px; }
.map-view { padding:110px 20px calc(100px + var(--safe-bottom)); background:#d9d5ca; }
.map-header { max-width:760px; margin:auto; }
.map-header h1 { font-size:clamp(46px,10vw,78px); }
.map-header p { max-width:560px; color:#5f594f; line-height:1.6; }
.schematic-map { max-width:760px; height:min(66vh,620px); margin:32px auto 20px; border-radius:28px; background:#cec9bb; border:1px solid rgba(17,16,14,.12); position:relative; overflow:hidden; box-shadow:inset 0 0 80px rgba(90,79,61,.08); }
.schematic-map:before { content:""; position:absolute; inset:0; opacity:.32; background-image: linear-gradient(rgba(17,16,14,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(17,16,14,.07) 1px, transparent 1px); background-size:28px 28px; transform:rotate(-7deg) scale(1.2); }
.schematic-map svg { position:absolute; inset:0; width:100%; height:100%; }
#routePath { fill:none; stroke:#33302a; stroke-width:.7; stroke-dasharray:2.4 1.6; vector-effect:non-scaling-stroke; }
.map-water { position:absolute; width:42%; height:18%; border-radius:54% 45% 52% 47%; right:-5%; top:13%; transform:rotate(-10deg); background:#668c99; opacity:.75; }
.map-marker { position:absolute; width:42px; height:42px; border:0; border-radius:50%; background:var(--paper); color:var(--ink); box-shadow:0 9px 24px rgba(0,0,0,.14); display:grid; place-items:center; font:800 10px/1 ui-monospace,monospace; transform:translate(-50%,-50%); transition:.2s ease; }
.map-marker.active { background:var(--ink); color:white; transform:translate(-50%,-50%) scale(1.15); }
.map-marker.disabled { opacity:.3; }
.map-label { position:absolute; font:800 9px/1 ui-monospace,monospace; letter-spacing:.14em; opacity:.36; }
.cathedral-label { left:46%; top:48%; transform:rotate(-8deg); }
.stowe-label { right:10%; top:35%; transform:rotate(-4deg); }
.map-north { position:absolute; top:18px; right:18px; font:800 10px/1 ui-monospace,monospace; }
.map-list { max-width:760px; margin:0 auto 20px; display:grid; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.map-row { background:#e5e1d6; padding:14px 16px; display:grid; grid-template-columns:30px 1fr auto; align-items:center; gap:9px; }
.map-row b { font-size:13px; }
.map-row span { font:700 9px/1 ui-monospace,monospace; color:var(--muted); }
.map-row small { color:var(--muted); }
.map-view > .full { max-width:760px; display:block; margin:auto; }
.completion-view { background:var(--paper); }
.complete-image { height:45svh; background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.45)), url('https://upload.wikimedia.org/wikipedia/commons/5/51/Stowe_Pool.jpg'), url('assets/fallback-stowe.svg'); background-size:cover; background-position:center; }
.complete-card { max-width:760px; margin:-38px auto 0; border-radius:30px 30px 0 0; position:relative; background:var(--paper); padding:38px 22px calc(80px + var(--safe-bottom)); }
.complete-card h1 { font-size:clamp(46px,10vw,75px); }
.complete-card > p { color:var(--muted); line-height:1.65; }
.stat-row { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:18px; overflow:hidden; margin:28px 0; }
.stat-row div { background:var(--paper); padding:18px 10px; text-align:center; }
.stat-row strong { display:block; font:400 25px/1 Georgia,serif; }
.stat-row span { display:block; color:var(--muted); font-size:9px; margin-top:7px; text-transform:uppercase; letter-spacing:.1em; }
.bottom-nav { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(10px + var(--safe-bottom)); z-index:45; width:min(340px, calc(100% - 30px)); background:rgba(17,16,14,.92); backdrop-filter:blur(18px); border-radius:22px; padding:7px; box-shadow:0 20px 45px rgba(0,0,0,.25); grid-template-columns:repeat(3,1fr); }
.bottom-nav:not([hidden]) { display:grid; }
.nav-item { border:0; background:transparent; color:rgba(255,255,255,.52); padding:8px; border-radius:16px; display:grid; place-items:center; gap:3px; }
.nav-item span { font-size:17px; }
.nav-item small { font-size:9px; font-weight:750; }
.nav-item.active { background:rgba(255,255,255,.1); color:white; }
.sheet-dialog { width:min(680px, calc(100% - 18px)); max-height:88vh; margin:auto auto 0; border:0; border-radius:28px 28px 0 0; background:var(--paper); color:var(--ink); padding:34px 22px calc(32px + var(--safe-bottom)); box-shadow:0 -20px 80px rgba(0,0,0,.28); }
.sheet-dialog::backdrop { background:rgba(0,0,0,.55); backdrop-filter:blur(4px); }
.dialog-handle { width:42px; height:4px; border-radius:999px; background:rgba(17,16,14,.16); position:absolute; top:10px; left:50%; transform:translateX(-50%); }
.dialog-close { position:absolute; right:15px; top:17px; width:34px; height:34px; border:0; border-radius:50%; background:#ddd8ce; font-size:20px; }
.sheet-dialog h2 { font:400 34px/1.05 Georgia,serif; letter-spacing:-.02em; margin:10px 38px 12px 0; }
.dialog-intro { color:var(--muted); line-height:1.5; }
.source-card { border-top:1px solid var(--line); padding:16px 0; }
.source-card:first-child { margin-top:24px; }
.source-card .source-meta { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.source-card b { font-size:13px; }
.source-card span { font-size:9px; font-weight:800; color:#31573d; }
.source-card p { color:var(--muted); font-size:12px; line-height:1.5; margin:8px 0; }
.source-card a { color:var(--ink); font-size:11px; font-weight:700; }
.about-stack { display:grid; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:18px; overflow:hidden; margin:24px 0; }
.about-stack > div { background:var(--paper); padding:16px; display:grid; grid-template-columns:86px 1fr; gap:12px; }
.about-stack b { font-size:10px; letter-spacing:.1em; }
.about-stack span { color:var(--muted); font-size:12px; line-height:1.5; }
.credits { margin-top:18px; border-top:1px solid var(--line); padding-top:14px; color:var(--muted); font-size:11px; line-height:1.55; }
.credits a { color:var(--ink); }
.toast { position:fixed; z-index:80; left:50%; bottom:calc(92px + var(--safe-bottom)); transform:translate(-50%, 18px); background:var(--ink); color:white; padding:11px 15px; border-radius:999px; font-size:11px; opacity:0; pointer-events:none; transition:.25s ease; max-width:calc(100% - 30px); text-align:center; }
.toast.show { opacity:1; transform:translate(-50%,0); }
@media (min-width:720px) {
  .topbar { padding-left:30px; padding-right:30px; }
  .principle-grid { grid-template-columns:repeat(3,1fr); }
  .time-options { grid-template-columns:repeat(3,1fr); }
  .time-option { min-height:160px; grid-template-columns:1fr; align-content:end; }
  .time-option span { margin-top:4px; }
  .hero-copy { padding-left:max(8vw,60px); }
  .stop-visual { min-height:70svh; }
  .stop-title-wrap { left:max(calc((100% - 760px)/2),30px); right:max(calc((100% - 760px)/2),30px); }
  .stop-badge { left:max(calc((100% - 760px)/2),30px); }
  .location-pill { right:max(calc((100% - 760px)/2),30px); }
  .time-card { min-width:46%; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; } }
