:root {
  --bg: #eef8f3;
  --surface: #ffffff;
  --ink: #071f2a;
  --muted: #47616b;
  --line: #c8ddd5;
  --accent: #79ef88;
  --accent-ink: #07331d;
  --danger: #b7192d;
  --danger-dark: #7e0f1e;
  --focus: #ffbf00;
  --radius: 24px;
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: radial-gradient(circle at top left, #fff 0, transparent 36%), var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: -100px; left: 18px; z-index: 100; border-radius: 12px; background: var(--ink); color: #fff; padding: 14px 18px; font-weight: 900; }
.skip-link:focus { top: 18px; }
.topbar { display: flex; width: min(1180px, calc(100% - 32px)); min-height: 86px; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 16px; background: var(--accent); color: var(--accent-ink); font-size: 30px; font-weight: 900; }
.brand strong, .brand small { display: block; }.brand strong { font-size: 24px; }.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.connection { display: flex; align-items: center; gap: 9px; border: 2px solid var(--line); border-radius: 99px; background: var(--surface); padding: 10px 14px; font-size: 13px; }
.connection span { width: 11px; height: 11px; border-radius: 50%; background: #687a80; }
.connection.online span { background: #16883c; }.connection.offline { border-color: #e5a8af; }.connection.offline span { background: var(--danger); }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 60px; }
.screen { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 78px); align-items: start; padding: clamp(35px, 7vh, 76px) 0 40px; }
.hero { text-align: left; }
.eyebrow { margin: 0; color: #146f39; font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1 { max-width: 700px; margin: 14px 0 0; font-size: clamp(48px, 7vw, 88px); line-height: .96; letter-spacing: -.06em; }
.lead { max-width: 650px; margin: 22px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 23px); font-weight: 650; line-height: 1.55; }
.voice-button { position: relative; display: grid; width: 210px; min-height: 210px; place-items: center; margin-top: 34px; border: 10px solid #d2e6dd; border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: 0 24px 60px rgb(14 80 53 / .16); }
.voice-button .mic-symbol { display: grid; width: 126px; height: 126px; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 50px; }
.voice-button strong { position: absolute; bottom: -34px; width: 190px; font-size: 16px; }
.voice-button.listening { border-color: var(--accent); }.voice-button.listening .mic-symbol { background: var(--accent); color: var(--accent-ink); }.voice-button.listening::before { position: absolute; inset: -18px; border: 4px solid var(--accent); border-radius: 50%; content: ""; animation: listening 1.7s infinite; }
.speech { max-width: 650px; margin-top: 60px; border-left: 8px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface); padding: 20px 22px; box-shadow: 0 14px 45px rgb(7 31 42 / .08); }
.speech small { color: var(--muted); font-weight: 900; text-transform: uppercase; }.speech strong { display: block; margin-top: 5px; font-size: 20px; }.speech p { margin: 12px 0 0; color: var(--muted); font-size: 18px; font-weight: 700; line-height: 1.5; }

.route-panel { border-radius: 32px; background: var(--ink); color: #fff; padding: 26px; box-shadow: 0 28px 70px rgb(7 31 42 / .25); }
.route-heading { display: flex; align-items: center; gap: 15px; }.route-heading > span { display: grid; flex: 0 0 58px; height: 58px; place-items: center; border-radius: 18px; background: var(--accent); color: var(--accent-ink); font-size: 31px; font-weight: 900; }.route-heading small { color: var(--accent); font-size: 12px; font-weight: 900; text-transform: uppercase; }.route-heading h2 { margin: 4px 0 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.1; }
.next-instruction { min-height: 92px; margin: 24px 0 0; border-radius: 18px; background: rgb(255 255 255 / .1); padding: 20px; font-size: 22px; font-weight: 850; line-height: 1.35; }
.route-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 0; }.route-stats div { border: 2px solid rgb(121 239 136 / .25); border-radius: 16px; padding: 14px; }.route-stats dt { color: rgb(255 255 255 / .66); font-size: 12px; font-weight: 800; }.route-stats dd { margin: 5px 0 0; color: var(--accent); font-size: 19px; font-weight: 900; }
.route-actions, .dialog-actions, .simulation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.action { min-height: 58px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); padding: 12px 18px; font-weight: 900; cursor: pointer; }
.action.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }.action.danger { border-color: var(--danger); background: var(--danger); color: #fff; }

.quick-actions { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.screen:has(.route-panel[hidden]) .quick-actions { grid-column: 2; grid-row: 1; grid-template-columns: 1fr 1fr; align-self: center; margin-top: 74px; }
.quick-actions button { display: flex; min-height: 112px; align-items: center; gap: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 18px; text-align: left; cursor: pointer; box-shadow: 0 10px 30px rgb(7 31 42 / .06); }
.quick-actions span { display: grid; flex: 0 0 48px; height: 48px; place-items: center; border-radius: 14px; background: #dff5e7; font-size: 24px; font-weight: 900; }.quick-actions strong { font-size: 16px; line-height: 1.25; }.quick-actions .emergency { border-color: #e7a2aa; }.quick-actions .emergency span { background: var(--danger); color: #fff; }

.secondary-panel { max-width: 920px; margin: 30px auto 0; border: 2px solid var(--line); border-radius: 32px; background: rgb(255 255 255 / .92); padding: clamp(22px, 5vw, 42px); box-shadow: 0 24px 70px rgb(7 31 42 / .12); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }.panel-heading h2 { margin: 6px 0 0; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.04em; }.secondary-panel > p { color: var(--muted); font-size: 17px; font-weight: 700; }.close-panel { min-height: 52px; border: 2px solid var(--line); border-radius: 15px; background: var(--surface); padding: 0 18px; font-weight: 900; cursor: pointer; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }.contact-form label, .simulation-tools label { color: var(--muted); font-weight: 850; }.contact-form input, .contact-form select, .simulation-tools input, .setting select { display: block; width: 100%; min-height: 56px; margin-top: 8px; border: 2px solid var(--line); border-radius: 14px; background: #f8fcfa; color: var(--ink); padding: 0 14px; font-size: 18px; }.contact-form fieldset { grid-column: 1 / -1; border: 2px solid var(--line); border-radius: 16px; padding: 15px; }.contact-form legend { padding: 0 8px; font-weight: 900; }.contact-form .check { display: inline-flex; align-items: center; gap: 9px; margin: 8px 18px 4px 0; }.contact-form .check input { width: 28px; min-height: 28px; margin: 0; }.contact-form > .action { grid-column: 1 / -1; }
.contact-list { display: grid; gap: 12px; margin-top: 25px; }.contact-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; border: 2px solid var(--line); border-radius: 18px; padding: 16px; }.contact-card strong, .contact-card small { display: block; }.contact-card strong { font-size: 20px; }.contact-card small { margin-top: 5px; color: var(--muted); font-weight: 700; }.contact-card .contact-actions { display: flex; gap: 8px; }.contact-card button { min-width: 54px; min-height: 54px; border: 2px solid var(--line); border-radius: 14px; background: #f6fbf8; font-weight: 900; cursor: pointer; }.empty { border: 2px dashed var(--line); border-radius: 18px; padding: 30px; color: var(--muted); text-align: center; font-weight: 800; }

.settings-grid { display: grid; gap: 14px; margin-top: 28px; }.setting { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 18px; border: 2px solid var(--line); border-radius: 18px; padding: 16px; }.setting strong, .setting small { display: block; }.setting strong { font-size: 18px; }.setting small { margin-top: 4px; color: var(--muted); font-weight: 700; }.setting input[type="checkbox"] { width: 58px; height: 34px; accent-color: var(--accent-ink); }.setting select, .setting input[type="text"] { width: min(360px, 48%); min-height: 56px; margin: 0; border: 2px solid var(--line); border-radius: 14px; background: #f8fcfa; color: var(--ink); padding: 0 14px; font-size: 17px; }
.simulation-tools { margin-top: 24px; border: 2px solid #b7cde8; border-radius: 22px; background: #eef6ff; padding: 20px; }.simulation-tools h3 { margin: 0 0 18px; font-size: 24px; }.simulation-tools > .action { width: 100%; margin-top: 12px; }.technical-log { margin-top: 22px; border: 2px solid var(--line); border-radius: 18px; padding: 16px; }.technical-log summary { font-size: 17px; font-weight: 900; cursor: pointer; }.technical-log pre { overflow: auto; max-height: 300px; border-radius: 12px; background: #071f2a; color: #e9fff0; padding: 14px; white-space: pre-wrap; }

dialog { width: min(580px, calc(100% - 28px)); border: 0; border-radius: 28px; padding: 0; box-shadow: 0 30px 90px rgb(0 0 0 / .4); }dialog::backdrop { background: rgb(3 18 25 / .72); backdrop-filter: blur(5px); }dialog form { padding: 28px; }dialog h2 { margin: 8px 0 0; font-size: 34px; }dialog #confirmation-text { color: var(--muted); font-size: 20px; font-weight: 750; line-height: 1.5; }.confirmation-help { font-weight: 800; }
noscript { display: block; background: var(--danger); color: #fff; padding: 20px; text-align: center; font-weight: 900; }

body.low-vision { --line: #82998f; font-size: 125%; background: #fff; }
body.low-vision .topbar, body.low-vision main { width: min(1280px, calc(100% - 20px)); }
body.low-vision .action, body.low-vision .close-panel { min-height: 72px; font-size: 20px; }
body.low-vision .quick-actions button { min-height: 142px; }.low-vision .quick-actions strong { font-size: 21px; }

@keyframes listening { 50% { opacity: .18; transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
@media (max-width: 820px) {
  .topbar, main { width: min(100% - 24px, 680px); }.connection strong { font-size: 0; }.connection strong::after { content: "Red"; font-size: 13px; }
  .screen { grid-template-columns: 1fr; padding-top: 28px; }.screen:has(.route-panel[hidden]) .quick-actions { grid-column: 1; grid-row: auto; margin-top: 8px; }.hero { text-align: center; }.lead { margin-inline: auto; }.voice-button { width: 184px; min-height: 184px; margin-inline: auto; }.voice-button .mic-symbol { width: 112px; height: 112px; }.speech { text-align: left; }
  .quick-actions { grid-template-columns: 1fr 1fr; }.contact-form { grid-template-columns: 1fr; }.contact-form fieldset, .contact-form > .action { grid-column: 1; }.panel-heading { display: block; }.close-panel { width: 100%; margin-top: 18px; }.setting { align-items: flex-start; flex-direction: column; }.setting select, .setting input[type="text"] { width: 100%; }.simulation-actions { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .quick-actions, .route-stats, .route-actions, .dialog-actions { grid-template-columns: 1fr; }.quick-actions button { min-height: 88px; }h1 { font-size: 48px; }.route-panel { padding: 20px; }.next-instruction { font-size: 19px; }
}
.route-map { overflow: hidden; margin-top: 22px; border: 3px solid rgb(121 239 136 / .45); border-radius: 20px; background: #e7f5f1; }
.route-map svg { display: block; width: 100%; height: auto; }
.attribution { display: block; margin-top: 7px; color: rgb(255 255 255 / .72); font-size: 11px; text-align: right; }
.download-box { display: grid; gap: 10px; margin: 22px 0; border: 2px solid var(--line); border-radius: 20px; background: #f7fffa; padding: 20px; }
.download-box strong { font-size: 22px; }.download-box small { color: var(--muted); font-weight: 750; }.download-box progress { width: 100%; height: 20px; accent-color: var(--accent-ink); }
.map-list { display: grid; gap: 14px; margin-top: 22px; }.map-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 2px solid var(--line); border-radius: 18px; padding: 16px; }.map-card strong,.map-card small { display: block; }.map-card small { margin-top: 5px; color: var(--muted); font-weight: 700; }.map-card > div:last-child { display: flex; gap: 8px; }
.simulation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.simulation-fields input { display: block; width: 100%; min-height: 54px; margin-top: 7px; border: 2px solid var(--line); border-radius: 14px; padding: 0 13px; }
@media (max-width: 600px) { .simulation-fields, .map-card { display: grid; grid-template-columns: 1fr; }.map-card > div:last-child { display: grid; } }
