        :root {
            --primary: #1a73e8;
            --primary-dark: #0d47a1;
            --secondary: #34a853;
            --warning: #fbbc05;
            --danger: #ea4335;
            --light: #f8f9fa;
            --dark: #202124;
            --gray: #5f6368;
            --border: #dadce0;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f5f7fa;
            color: var(--dark);
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            text-align: center;
            margin-bottom: 30px;
            padding: 20px 0;
            border-bottom: 1px solid var(--border);
        }

        header h1 {
            color: var(--primary);
            margin-bottom: 10px;
            font-size: 2.5rem;
        }

        header p {
            color: var(--gray);
            font-size: 1.1rem;
        }

        .search-section {
            background: white;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
            margin-bottom: 30px;
            position: relative;
        }

        .search-form {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: center;
        }

        .search-input-container {
            flex: 1;
            min-width: 250px;
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
            transition: all 0.3s;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
        }

        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            max-height: 300px;
            overflow-y: auto;
            z-index: 1000;
            display: none;
        }

        .search-result-item {
            padding: 12px 15px;
            cursor: pointer;
            border-bottom: 1px solid var(--border);
            transition: background-color 0.2s;
        }

        .search-result-item:hover {
            background-color: var(--light);
        }

        .search-result-item:last-child {
            border-bottom: none;
        }

        .airport-code {
            font-weight: bold;
            color: var(--primary);
        }

        .airport-name {
            font-size: 0.9rem;
            color: var(--gray);
        }

        .airport-location {
            font-size: 0.8rem;
            color: var(--gray);
        }

        .btn {
            padding: 12px 20px;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--primary-dark);
        }

        .btn-secondary {
            background-color: var(--light);
            color: var(--dark);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            background-color: #e8eaed;
        }

        .weather-display {
            display: grid;
            grid-template-columns: 1fr;
            gap: 25px;
        }

        @media (min-width: 768px) {
            .weather-display {
                grid-template-columns: 1fr 1fr;
            }
        }

        .weather-card {
            background: white;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border);
        }

        .card-title {
            font-size: 1.4rem;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .view-controls {
            display: flex;
            gap: 10px;
        }

        .view-toggle {
            background: none;
            border: 1px solid var(--border);
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.8rem;
            color: var(--gray);
            transition: all 0.3s;
        }

        .view-toggle:hover {
            background: var(--light);
        }

        .view-toggle.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .airfield-info {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
        }

        .info-item {
            display: flex;
            flex-direction: column;
        }

        .info-label {
            font-size: 0.85rem;
            color: var(--gray);
            margin-bottom: 5px;
        }

        .info-value {
            font-weight: 600;
            font-size: 1.1rem;
        }

        .weather-data {
            background: var(--light);
            border-radius: 8px;
            padding: 15px;
            margin-top: 15px;
            font-family: monospace;
            white-space: pre-wrap;
            line-height: 1.5;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .data-table th {
            background: var(--primary);
            color: white;
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
        }

        .data-table td {
            padding: 12px 15px;
            border-bottom: 1px solid var(--border);
        }

        .data-table tr:last-child td {
            border-bottom: none;
        }

        .data-table tr:hover {
            background: #f8f9fa;
        }

        .property-name {
            font-weight: 600;
            color: var(--dark);
        }

        .property-value {
            color: var(--gray);
        }

        .property-type {
            color: var(--primary);
            font-size: 0.8rem;
            font-style: italic;
        }

        .loading {
            text-align: center;
            padding: 30px;
            color: var(--gray);
        }

        .loading i {
            font-size: 2rem;
            margin-bottom: 15px;
            color: var(--primary);
        }

        .error {
            background: #ffebee;
            color: var(--danger);
            padding: 15px;
            border-radius: 8px;
            margin-top: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .hidden {
            display: none;
        }

        .nearby-section {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--border);
        }

        .nearby-airfields {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .nearby-item {
            background: var(--light);
            padding: 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .nearby-item:hover {
            background: #e8f0fe;
        }

        .nearby-code {
            font-weight: bold;
            color: var(--primary);
        }

        .nearby-name {
            font-size: 0.9rem;
            color: var(--gray);
        }

        footer {
            text-align: center;
            margin-top: 40px;
            padding: 20px 0;
            color: var(--gray);
            font-size: 0.9rem;
            border-top: 1px solid var(--border);
        }

        .last-updated {
            font-size: 0.8rem;
            color: var(--gray);
            margin-top: 10px;
            text-align: right;
        }

        .weather-condition {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-right: 8px;
            margin-bottom: 8px;
        }

        .condition-vfr {
            color: #ffffff;
            background-color: #28a745;
        }

        .condition-mvfr {
            color: #ffffff;
            background-color: #0080f0;
        }

        .condition-ifr {
            color: #ffffff;
            background-color: #c5221f;
        }

        .condition-lifr {
            color: #ffffff;
            background-color: #9722ce;
        }

        .weather-details {
            margin-top: 15px;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
        }

        .detail-item {
            background: var(--light);
            padding: 12px;
            border-radius: 8px;
            text-align: center;
        }

        .detail-value {
            font-size: 1.5rem;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .detail-label {
            font-size: 0.8rem;
            color: var(--gray);
        }

        .success {
            background: #e6f4ea;
            color: #137333;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 0.9rem;
            margin-top: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .warning {
            background: #fff8e1;
            border-left: 4px solid #fbbc05;
            padding: 12px 15px;
            margin: 10px 0;
            border-radius: 4px;
            font-size: 0.9rem;
        }

        .parsed-section {
            margin-top: 15px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid var(--primary);
        }

        .parsed-item {
            margin-bottom: 10px;
            padding: 8px;
            background: white;
            border-radius: 4px;
        }

        .parsed-label {
            font-weight: 600;
            color: var(--primary);
            margin-right: 8px;
        }

        .cloud-item {
            display: inline-block;
            padding: 4px 8px;
            margin: 2px 4px 2px 0;
            background: #e8f0fe;
            border-radius: 4px;
            font-size: 0.85rem;
        }

        .forecast-period {
            margin-bottom: 15px;
            padding: 12px;
            background: white;
            border-radius: 6px;
            border-left: 3px solid var(--secondary);
        }

        .period-header {
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .taf-change-indicator {
            display: inline-block;
            padding: 2px 6px;
            margin-left: 8px;
            border-radius: 3px;
            font-size: 0.7rem;
            font-weight: bold;
        }

        .change-fm {
            background: #e8f0fe;
            color: #1a73e8;
        }

        .change-tempo {
            background: #fff8e1;
            color: #f29900;
        }

        .change-becmg {
            background: #e6f4ea;
            color: #137333;
        }

        .change-prob {
            background: #fce8e6;
            color: #c5221f;
        }

        .flight-category {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-left: 8px;
        }

        /* ----- Toolbar / chips ----- */
.toolbar {
  display:flex; justify-content:space-between; align-items:center;
  gap:12px; padding:10px 0 6px 0;
}
.toolbar .unit-group { display:flex; align-items:center; gap:6px; }
.toolbar .unit-group label { font-size:.85rem; color:var(--gray); margin-right:2px; }
.chip { border:1px solid var(--border,#e5e7eb); background:var(--card,#fff);
  padding:4px 8px; border-radius:999px; font-size:.85rem; cursor:pointer; }
.chip.toggle.active { background:var(--primary, #0ea5e9); color:#fff; border-color:transparent; }
.chip.select { padding:4px 6px; }
.chip.danger { border-color:#ef4444; color:#ef4444; background:transparent; }
.chip.primary { background:var(--primary,#0ea5e9); color:#fff; border-color:transparent; }
.btn.btn-ghost { background:transparent; border:1px dashed var(--border,#e5e7eb); color:inherit; }
.last-update-small { font-size:.85rem; color:var(--gray); margin-left:8px; }

/* Switch */
.switch { position:relative; display:inline-block; width:42px; height:22px; }
.switch input { opacity:0; width:0; height:0; }
.slider { position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background:#d1d5db; transition:.2s; border-radius:999px; }
.slider:before { position:absolute; content:""; height:18px; width:18px; left:2px; bottom:2px; background:white; transition:.2s; border-radius:50%; }
.switch input:checked + .slider { background:#10b981; }
.switch input:checked + .slider:before { transform:translateX(20px); }

/* Favourites */
.favorites { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:8px 0 12px; }
.fav-bar { display:flex; gap:6px; flex-wrap:wrap; }
.chip.fav { background:#fff7ed; border-color:#fdba74; color:#c2410c; }
.chip.fav .chip-x { margin-left:8px; opacity:.7; }
.chip.fav .chip-x:hover { opacity:1; }

/* Weather badges */
.wx-badge { display:inline-block; padding:2px 6px; border-radius:6px; font-size:.78rem; margin:2px 4px 2px 0; color:#fff; }
.wx-fg { background:#6b7280; }  /* Fog */
.wx-br { background:#3b82f6; }  /* Mist */
.wx-hz { background:#f59e0b; }  /* Haze */
.wx-ra { background:#2563eb; }  /* Rain */
.wx-dz { background:#60a5fa; }  /* Drizzle */
.wx-sn { background:#93c5fd; color:#0f172a; } /* Snow */
.wx-ts { background:#7c3aed; }  /* Thunderstorm */
.wx-gr { background:#374151; }  /* Hail */
.wx-sa, .wx-du { background:#a16207; } /* Sand/Dust */
.wx-va { background:#111827; }
.wx-fu { background:#4b5563; }
.wx-generic { background:#6b7280; }

/* Crosswind card */
.xw-summary { margin-bottom:8px; }
.runway-list { display:flex; flex-direction:column; gap:10px; }
.runway-row { display:grid; grid-template-columns: 120px 200px 1fr; align-items:center; gap:12px; padding:8px; border:1px solid var(--border,#e5e7eb); border-radius:12px; background:var(--card,#fff); }
.rwy-sub { font-size:.85rem; color:var(--gray); }
.viz-col { display:flex; justify-content:center; }
.xw-svg { width:180px; height:60px; }
.rwy-bar { fill:#d1d5db; }
.wind-line { stroke:#111827; stroke-width:3; }
.wind-head { fill:#111827; }
.values-col .xw, .values-col .hw { font-size:.95rem; }

/* ===== Runways & Crosswind Gauges (match mock) ===== */
.xw-panel {
  /*background: #165EA8;*/
  background: #303438;
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.xw-gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  justify-items: center;
}
@media (max-width: 900px){ .xw-gauges { grid-template-columns: 1fr; } }

.gauge-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12);
}

.g-title { font-weight: 700; letter-spacing: .2px; }
.gauge { width: 320px; height: 320px; }
@media (min-width: 1200px){ .gauge { width: 360px; height: 360px; } }

.anim-rotate { transition: transform 1.5s cubic-bezier(.2,.7,.3,1); transform-origin: 50% 50%; }

/* ticks / labels */
.tick { stroke: rgba(255,255,255,.55); stroke-width: 2; }
.tick.major { stroke-width: 3; }
.tick.cardinal { stroke: #fff; stroke-width: 3.5; }
.label { fill: rgba(255,255,255,.9); font-size: 12px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; }
.label.card { font-size: 14px; }

/* runway numeral look */
.rwy-num{
  font-family: 'Teko', 'Anton', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 20px;          /* tweak to taste */
  letter-spacing: 1px;      /* small spacing looks more “stenciled” */
  fill: #fff;
  font-variant-numeric: tabular-nums; /* consistent widths for 08/27, etc. */
}


/* wind arrow */
.wind-stem { stroke: #fff; stroke-width: 3; }
.wind-head { fill: #fff; }

/* component badges (compact like mock) */
.component-labels { display:flex; gap:22px; justify-content:center; }
.badge {
  background: transparent; border: none;
  font-variant-numeric: tabular-nums; font-weight: 600;
  display:flex; align-items:center; gap:6px;
}
.badge .arrow { font-size: 14px; opacity: .9; }

/* speedo */
.spd-tick { stroke: rgba(255,255,255,.7); stroke-width: 2; }
.spd-tick.major { stroke-width: 3; }
.spd-label { fill:#fff; font-size: 12px; text-anchor: middle; dominant-baseline: middle; }
.needle-shaft, .needle-cap { fill: #fff; }


/* Runway editor */
.rwy-editor { padding:10px; border:1px dashed var(--border,#e5e7eb); border-radius:12px; background:var(--subtle,#fafafa); }
.rwy-editor.compact { background:transparent; border-style:solid; }
.rwy-editor-title { font-weight:600; margin-bottom:8px; }
.rwy-edit-row { display:grid; grid-template-columns: 1fr 100px auto; gap:8px; margin-bottom:6px; }
.rwy-name-input, .rwy-hdg-input { width:100%; padding:6px 8px; border:1px solid var(--border,#e5e7eb); border-radius:8px; font-size:.95rem; background:#fff; }
.rwy-edit-actions { display:flex; gap:8px; margin-top:6px; }

/* Small tweaks */
.info-row { margin-bottom:10px; }

/* keep strokes crisp */
.gauge * { vector-effect: non-scaling-stroke; }
.wind-stem { stroke-linecap: round; }


/* force the gauge graphics visible even if older rules exist */
#gauge-compass .runway { fill:#0d0d0d !important; }
#gauge-compass .centerline { stroke:#adadad !important; stroke-width:2 !important; stroke-dasharray:12 10 !important; }
#gauge-compass .threshold rect { fill:#adadad !important; }
#gauge-compass .wind-stem { stroke:#fff !important; stroke-width:3 !important; stroke-linecap:round !important; }
#gauge-compass .wind-head { fill:#fff !important; }

/* while we verify, don't clip the SVG */
.gauge { overflow: visible !important; }  /* you can switch back to hidden after it’s working */


/* Keep the gauge graphics inside the circle */
.gauge { overflow: hidden !important; }

/* subtle glow so arcs pop on dark blue */
.spd-segments { filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }


/* ===== TAF Hourly Timeline ===== */
.taf-timeline { overflow-x: auto; }
.taf-hourly {
  width: max(720px, 100%);
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.taf-hourly thead th {
  position: sticky; top: 0;
  background: #1f2937; color: #fff;
  font-weight: 600; font-size: .85rem;
  padding: 8px 10px; white-space: nowrap;
  z-index: 1;
}
.taf-hourly th.stub {
  position: sticky; left: 0; z-index: 2;
  background: #0f172a; color:#fff; width: 110px;
  text-align: left;
}
.taf-hourly td, .taf-hourly th {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px; text-align: center;
}
.taf-hourly tbody tr:last-child td, .taf-hourly tbody tr:last-child th { border-bottom: none; }
.taf-hourly td { width: 88px; font-size: .9rem; }
.taf-hourly td.wxcell i { opacity: .9; font-size: 1rem; margin-right: 4px; }
.taf-chip {
  display: inline-block; margin-left: 4px; padding: 0 6px;
  font-size: .7rem; border-radius: 999px; background:#fff8e1; color:#b45309; border:1px solid #fbbf24;
}

/* category badges reuse your condition-* colors */
.taf-badge {
  display:inline-block; min-width:48px; padding: 2px 8px; border-radius: 6px;
  font-weight: 700; font-size: .8rem; color: #fff;
}
.taf-badge.condition-vfr  { background:#22c55e; }
.taf-badge.condition-mvfr { background:#0ea5e9; }
.taf-badge.condition-ifr  { background:#ef4444; }
.taf-badge.condition-lifr { background:#8b5cf6; }
