:root {
  --bg: #0f172a; --surface: #1e293b; --border: #334155;
  --accent: #38bdf8; --danger: #ef4444; --ok: #22c55e; --warn: #f97316;
  --text: #f1f5f9; --muted: #94a3b8; --hint: #64748b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: Arial, sans-serif;
       font-size: 18px; padding: 0 0 24px; }
body.large-text { font-size: 22px; }

/* Skip link — keyboard/screen-reader accessibility */
.skip-link { position: absolute; top: -100px; left: 8px; background: var(--accent);
             color: #0c1a2e; padding: 8px 16px; border-radius: 4px; font-weight: bold;
             z-index: 1000; transition: top .2s; }
.skip-link:focus { top: 8px; }

header { display: flex; align-items: center; justify-content: space-between;
         padding: 12px 16px; border-bottom: 1px solid var(--border); }
h1 { font-size: 1.3em; color: var(--accent); }
h2 { font-size: 1.05em; color: var(--accent); margin-bottom: 12px; }

/* Tabs */
.tab-row { display: flex; background: var(--bg); border-bottom: 1px solid var(--border); }
.tab { flex: 1; padding: 10px 4px; text-align: center; font-size: 13px; color: var(--muted);
       background: none; border: none; border-bottom: 2px solid transparent;
       cursor: pointer; transition: all .2s; font-family: inherit;
       min-height: 48px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: bold; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Main sections */
section { padding: 14px 16px; }

/* Zone list */
.zone-item { display: flex; align-items: center; gap: 10px; padding: 10px;
             background: var(--surface); border-radius: 8px; margin-bottom: 6px; }
.density-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.zone-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.zone-info strong { font-size: 14px; }
.zone-level { font-size: 11px; color: var(--muted); }
.zone-wait  { font-size: 11px; color: var(--accent); }

/* Forms */
.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hint { display: block; font-size: 11px; color: var(--hint); margin-top: 3px; }
input[type="text"] { width: 100%; padding: 12px; background: var(--bg); color: var(--text);
                     border: 1px solid var(--border); border-radius: 8px; font-size: 1em;
                     font-family: inherit; }
input[type="text"]:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.toggle-row { display: flex; align-items: flex-start; justify-content: space-between;
              gap: 12px; margin: 10px 0; }
input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; flex-shrink: 0; accent-color: var(--accent); }

/* Buttons */
button { background: var(--accent); color: #0c1a2e; border: none; padding: 12px 20px;
         border-radius: 8px; font-size: 1em; font-weight: bold; cursor: pointer;
         min-height: 48px; font-family: inherit; width: 100%; }
button:hover { opacity: .87; }
button:focus-visible { outline: 3px solid white; outline-offset: 2px; }
.quick-q { background: var(--surface); color: var(--muted); border: 1px solid var(--border);
           font-size: 12px; padding: 7px 10px; border-radius: 6px; width: auto;
           min-height: 36px; font-weight: normal; }
.quick-q:hover { color: var(--text); border-color: var(--accent); }

/* Route result */
.route-result-card { background: #0c2a3d; border: 1px solid var(--accent);
                     border-radius: 8px; padding: 12px; margin-top: 10px; }
.route-path { font-size: 13px; color: #7dd3fc; line-height: 1.8; margin-bottom: 8px; }
.route-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.route-note { font-size: 12px; color: var(--muted); margin-top: 8px; font-style: italic; }

/* Chips */
.chip { font-size: 11px; padding: 3px 8px; border-radius: 4px;
        background: #1e3a5f; color: #93c5fd; }
.chip-green { background: #14532d; color: #86efac; }
.chip-blue  { background: #1e3a5f; color: #7dd3fc; }

/* Alerts */
.alert-item { padding: 10px 12px; border-radius: 8px; margin-bottom: 6px;
              border-left: 3px solid var(--accent); background: var(--surface);
              font-size: 14px; line-height: 1.5; }
.alert-emergency { border-left-color: var(--danger); background: #1f0a0a; }
.alert-type-badge { font-size: 10px; font-weight: bold; letter-spacing: .5px;
                    margin-right: 6px; color: var(--accent); }
.alert-emergency .alert-type-badge { color: var(--danger); }

/* AI assistant */
.ai-thinking { color: var(--muted); font-style: italic; border-left-color: var(--muted); }
.ai-answer-card { background: #0c2a3d; border: 1px solid var(--accent);
                  border-radius: 8px; padding: 12px; }
.ai-answer-chips { margin-bottom: 8px; }
.ai-answer-text { font-size: 15px; line-height: 1.6; color: var(--text); }
