    :root {
      --primary: #2563EB;
      --primary-dark: #1D4ED8;
      --success: #10B981;
      --warning: #F59E0B;
      --danger: #EF4444;
      --gray-50: #F9FAFB;
      --gray-100: #F3F4F6;
      --gray-200: #E5E7EB;
      --gray-300: #D1D5DB;
      --gray-400: #9CA3AF;
      --gray-500: #6B7280;
      --gray-600: #4B5563;
      --gray-700: #374151;
      --gray-800: #1F2937;
      --gray-900: #111827;
      --radius-sm: 6px;
      --radius-md: 10px;
      --radius-lg: 16px;
      --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
      --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    }

    * { box-sizing: border-box; }

    body, html {
      margin: 0;
      height: 100%;
      overflow: hidden;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--gray-100);
      color: var(--gray-800);
    }

    #map { width: 100%; height: 100%; }

    /* Multi-select confirmation bar */
    #multi-select-bar {
      position: absolute;
      bottom: 32px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 1000;
      background: linear-gradient(135deg, #122640, #1f4268);
      color: white;
      padding: 10px 20px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      gap: 16px;
      font-size: 13px;
      font-weight: 500;
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
      white-space: nowrap;
    }
    #multi-select-bar button {
      padding: 5px 14px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: background 0.15s;
    }
    #ms-confirm {
      background: #DFFF00;
      color: #1a1a1a;
    }
    #ms-confirm:hover { background: #c8e600; }
    #ms-cancel {
      background: rgba(255,255,255,0.15);
      color: white;
    }
    #ms-cancel:hover { background: rgba(255,255,255,0.25); }

    /* Control Panel */
    /* ── Icon Toolbar ── */
    .icon-toolbar {
      position: absolute;
      top: 68px;
      left: 12px;
      width: 44px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 6px 0;
      background: rgba(31,41,55,0.95);
      backdrop-filter: blur(10px);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      z-index: 10;
    }

    .toolbar-icon {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      background: transparent;
      color: rgba(255,255,255,0.55);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s;
      padding: 0;
    }
    .toolbar-icon:hover {
      background: rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.9);
    }
    .toolbar-icon.active {
      background: rgba(37,99,235,0.2);
      color: #60a5fa;
    }

    .toolbar-divider {
      width: 24px;
      border: none;
      border-top: 1px solid rgba(255,255,255,0.12);
      margin: 4px 0;
    }

    /* ── Floating Panels ── */
    .floating-panel {
      position: absolute;
      top: 68px;
      left: 68px;
      width: 240px;
      max-height: calc(100vh - 84px);
      overflow-y: auto;
      padding: 12px;
      background: rgba(31,41,55,0.95);
      backdrop-filter: blur(10px);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      z-index: 10;
      display: none;
    }
    .floating-panel.active {
      display: block;
      animation: panelSlideIn 0.15s ease-out;
    }
    @keyframes panelSlideIn {
      from { opacity: 0; transform: translateX(-8px); }
      to { opacity: 1; transform: translateX(0); }
    }

    .floating-panel-header {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: rgba(255,255,255,0.45);
      margin-bottom: 8px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    /* ── Header Search Group ── */
    .header-search-group {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
      max-width: 560px;
      min-width: 0;
    }

    .header-search-group select {
      padding: 7px 28px 7px 10px;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.85);
      font-size: 12px;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.15s;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 8px center;
      white-space: nowrap;
      min-width: 0;
      max-width: 150px;
    }
    .header-search-group select:hover {
      border-color: rgba(255,255,255,0.25);
      background-color: rgba(255,255,255,0.12);
    }
    .header-search-group select:focus {
      outline: none;
      border-color: rgba(255,255,255,0.35);
    }
    .header-search-group select option {
      background: #1f2937;
      color: white;
    }

    .unified-search-wrapper {
      position: relative;
      flex: 1;
      min-width: 0;
    }
    .unified-search-wrapper .search-input {
      width: 100%;
      padding: 7px 12px 7px 32px;
      margin-bottom: 0;
      font-size: 13px;
      border-radius: var(--radius-sm);
    }
    .unified-search-icon {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: rgba(255,255,255,0.35);
      pointer-events: none;
    }
    .unified-search-wrapper .autocomplete-dropdown {
      z-index: 1000;
    }

    .header-adv-search-btn {
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.08);
      cursor: pointer;
      transition: all 0.15s;
      flex-shrink: 0;
      padding: 0 10px;
      white-space: nowrap;
    }
    .header-adv-search-btn:hover {
      background: rgba(255,255,255,0.15);
      border-color: rgba(255,255,255,0.25);
    }
    .header-adv-search-btn .adv-search-btn-label,
    .header-adv-search-btn svg {
      background: linear-gradient(180deg, #ffe080, #ff9500);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      filter: drop-shadow(0 0 4px rgba(255, 170, 40, 0.3));
    }
    .header-adv-search-btn svg {
      stroke: #ffb830;
      -webkit-text-fill-color: unset;
      background: none;
    }
    .header-adv-search-btn:hover .adv-search-btn-label {
      background: linear-gradient(180deg, #fff0a0, #ffaa20);
      -webkit-background-clip: text;
      background-clip: text;
      filter: drop-shadow(0 0 8px rgba(255, 200, 60, 0.5));
    }
    .header-adv-search-btn:hover svg {
      stroke: #ffd060;
      filter: drop-shadow(0 0 6px rgba(255, 200, 60, 0.4));
    }
    .header-adv-search-btn svg {
      flex-shrink: 0;
    }
    .adv-search-btn-label {
      font-size: 12px;
      font-weight: 500;
    }
    .header-adv-search-btn.locked {
      color: rgba(245,158,11,0.6);
      border-color: rgba(245,158,11,0.2);
    }
    .header-adv-search-btn.locked:hover {
      color: rgba(245,158,11,0.9);
      background: rgba(245,158,11,0.1);
      border-color: rgba(245,158,11,0.3);
    }

    /* Header Bar */
    .header-bar {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 56px;
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 0 16px;
      background: linear-gradient(to bottom, rgba(31,41,55,0.98), rgba(31,41,55,0.95));
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(55,65,81,0.6);
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      z-index: 11;
    }

    /* MapLibre Navigation Controls - High visibility */
    .maplibregl-ctrl-group {
      background: rgba(255,255,255,0.95) !important;
      backdrop-filter: blur(10px);
      border-radius: var(--radius-md) !important;
      box-shadow: 0 2px 12px rgba(0,0,0,0.15) !important;
      border: 1px solid rgba(0,0,0,0.1) !important;
      overflow: hidden;
    }

    .maplibregl-ctrl-group button {
      width: 36px !important;
      height: 36px !important;
      background-color: transparent !important;
      border: none !important;
      transition: background-color 0.15s !important;
    }

    .maplibregl-ctrl-group button:hover {
      background-color: var(--gray-100) !important;
    }

    .maplibregl-ctrl-group button + button {
      border-top: 1px solid var(--gray-200) !important;
    }

    /* High contrast mode for satellite basemap */
    body.satellite-mode .maplibregl-ctrl-group:not(.map-toolbar) {
      background: rgba(30,30,30,0.9) !important;
      border: 1px solid rgba(255,255,255,0.2) !important;
    }

    body.satellite-mode .maplibregl-ctrl-group:not(.map-toolbar) button:hover {
      background-color: rgba(255,255,255,0.15) !important;
    }

    body.satellite-mode .maplibregl-ctrl-group:not(.map-toolbar) button + button {
      border-top: 1px solid rgba(255,255,255,0.15) !important;
    }

    /* ── Map Control Cluster ── */
    /* ── Unified Map Toolbar ── */
    .map-toolbar {
      background: rgba(31,41,55,0.95) !important;
      backdrop-filter: blur(10px);
      border-radius: 10px !important;
      box-shadow: 0 2px 16px rgba(0,0,0,0.2) !important;
      border: 1px solid rgba(255,255,255,0.1) !important;
      overflow: visible !important;
      padding: 0 !important;
    }

    .map-toolbar button {
      width: 36px !important;
      height: 36px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      background: transparent !important;
      border: none !important;
      cursor: pointer !important;
      padding: 0 !important;
      transition: background-color 0.15s !important;
      position: relative;
    }

    .map-toolbar button:hover {
      background-color: rgba(255,255,255,0.1) !important;
    }

    .map-toolbar button + button {
      border-top: 1px solid rgba(255,255,255,0.08) !important;
    }

    .map-toolbar button svg {
      width: 18px;
      height: 18px;
      stroke: rgba(255,255,255,0.7);
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
      transition: stroke 0.15s;
    }

    .map-toolbar .ctrl-compass-svg {
      transition: transform 0.15s ease-out;
    }

    .map-toolbar .ctrl-tilt-btn.tilted {
      background: rgba(96,165,250,0.2) !important;
    }

    .map-toolbar .ctrl-tilt-btn.tilted svg {
      stroke: #60a5fa;
    }

    .map-toolbar .toolbar-section-divider {
      height: 1px;
      background: rgba(255,255,255,0.12);
      margin: 2px 6px;
    }

    .map-toolbar .ctrl-zoom-readout {
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
      font-size: 10px;
      font-weight: 600;
      color: rgba(255,255,255,0.6);
      letter-spacing: 0.3px;
      pointer-events: none;
      user-select: none;
      border-top: 1px solid rgba(255,255,255,0.08);
    }

    /* Satellite mode — toolbar stays the same (already dark) */
    body.satellite-mode .map-toolbar {
      background: rgba(24,24,28,0.92) !important;
      border: 1px solid rgba(255,255,255,0.14) !important;
    }

    /* ── Custom Scale Bar ── */
    .map-scale-bar {
      cursor: grab;
      z-index: 5;
      user-select: none;
      padding: 0 !important;
      background: none !important;
      border: none !important;
      box-shadow: none !important;
    }

    .map-scale-bar:active { cursor: grabbing; }

    .scale-bar-track {
      height: 20px;
      min-width: 50px;
      background: rgba(255,255,255,0.88);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(0,0,0,0.15);
      border-top: 3px solid #374151;
      border-radius: 0 0 3px 3px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 6px;
    }

    .scale-bar-label {
      font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
      font-size: 10px;
      font-weight: 600;
      color: #374151;
      white-space: nowrap;
      pointer-events: none;
    }

    body.satellite-mode .scale-bar-track {
      background: rgba(24,24,28,0.88);
      border-color: rgba(255,255,255,0.2);
      border-top-color: #e5e7eb;
    }

    body.satellite-mode .scale-bar-label {
      color: #d1d5db;
    }

    /* ── Measurement Tools Control ── */
    .map-measure-tools-legacy {
      display: flex !important;
      flex-direction: row-reverse !important;
      align-items: center !important;
      background: none !important;
      border: none !important;
      box-shadow: none !important;
      padding: 0 !important;
      overflow: visible !important;
      gap: 6px;
    }

    /* Measure toggle button (inside .map-toolbar) */
    .map-toolbar .measure-toggle-btn {
      border-top: none !important;
    }

    .map-toolbar .measure-toggle-btn.expanded {
      background: rgba(14,165,233,0.15) !important;
    }

    .map-toolbar .measure-toggle-btn.expanded svg {
      stroke: #38bdf8;
    }

    /* Measure flyout — pops left from toolbar */
    .measure-flyout {
      position: absolute;
      right: 42px;
      bottom: 26px;
      display: flex;
      flex-direction: row;
      background: rgba(31,41,55,0.92);
      backdrop-filter: blur(12px);
      border-radius: 10px;
      box-shadow: 0 2px 16px rgba(0,0,0,0.25);
      border: 1px solid rgba(255,255,255,0.1);
      overflow: hidden;
      opacity: 0;
      transform: translateX(6px) scale(0.95);
      pointer-events: none;
      transition: opacity 0.18s ease, transform 0.18s ease;
      transform-origin: right center;
    }

    .measure-flyout.open {
      opacity: 1;
      transform: translateX(0) scale(1);
      pointer-events: auto;
    }

    .measure-flyout button {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 0;
      transition: background-color 0.15s;
    }

    .measure-flyout button:hover {
      background-color: rgba(255,255,255,0.1);
    }

    .measure-flyout button + button {
      border-left: 1px solid rgba(255,255,255,0.08);
    }

    .measure-flyout button svg {
      width: 18px;
      height: 18px;
      stroke: rgba(255,255,255,0.7);
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
      transition: stroke 0.15s;
    }

    .measure-flyout button.active {
      background: rgba(14,165,233,0.2);
    }

    .measure-flyout button.active svg {
      stroke: #38bdf8;
    }

    /* ── Measurement Labels ── */
    .measure-label {
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(6px);
      padding: 2px 8px;
      border-radius: 4px;
      font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
      font-size: 11px;
      font-weight: 600;
      color: #0c4a6e;
      white-space: nowrap;
      pointer-events: auto;
      cursor: context-menu;
      box-shadow: 0 1px 4px rgba(0,0,0,0.15);
      border: 1px solid rgba(14, 165, 233, 0.3);
    }

    .measure-label-total {
      background: rgba(14, 165, 233, 0.15);
      border-color: #0EA5E9;
      font-size: 12px;
      font-weight: 700;
      padding: 3px 10px;
    }

    .measure-label-area {
      font-size: 12px;
      font-weight: 700;
    }

    body.satellite-mode .measure-label {
      background: rgba(24,24,28,0.92);
      color: #bae6fd;
      border-color: rgba(56, 189, 248, 0.4);
    }

    body.satellite-mode .measure-label-total {
      background: rgba(14, 165, 233, 0.25);
    }

    /* ── Measurement Rotate Handle ── */
    .measure-rotate-handle {
      width: 22px;
      height: 22px;
      background: rgba(255,255,255,0.95);
      border: 2px solid #0EA5E9;
      border-radius: 50%;
      cursor: grab;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 1px 4px rgba(0,0,0,0.2);
      transition: background 0.15s, transform 0.15s;
      pointer-events: auto;
    }
    .measure-rotate-handle:hover {
      background: #0EA5E9;
    }
    .measure-rotate-handle:hover svg {
      stroke: white;
    }
    .measure-rotate-handle svg {
      width: 12px;
      height: 12px;
      stroke: #0EA5E9;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }
    .measure-rotate-handle.dragging {
      cursor: grabbing;
      background: #0EA5E9;
      transform: scale(1.15);
    }
    .measure-rotate-handle.dragging svg {
      stroke: white;
    }

    body.satellite-mode .measure-rotate-handle {
      background: rgba(24,24,28,0.92);
      border-color: #38bdf8;
    }
    body.satellite-mode .measure-rotate-handle svg {
      stroke: #38bdf8;
    }
    body.satellite-mode .measure-rotate-handle:hover,
    body.satellite-mode .measure-rotate-handle.dragging {
      background: #0EA5E9;
    }
    body.satellite-mode .measure-rotate-handle:hover svg,
    body.satellite-mode .measure-rotate-handle.dragging svg {
      stroke: white;
    }

    .logo-text {
      font-weight: 700;
      font-size: 18px;
      color: #F9FAFB;
      cursor: pointer;
      padding: 8px 0;
      transition: opacity 0.2s;
    }

    .logo-text:hover {
      opacity: 0.8;
    }

    .logo-divider {
      width: 1px;
      height: 20px;
      background: rgba(255,255,255,0.2);
    }

    .logo-project {
      font-size: 13px;
      font-weight: 500;
      color: rgba(255,255,255,0.6);
      cursor: pointer;
      padding: 8px 0;
      transition: opacity 0.2s;
    }

    .logo-project:hover {
      opacity: 0.8;
    }

    /* pill-button removed — replaced by icon toolbar */

    /* Form Elements */
    .search-section {
      margin-bottom: 16px;
      padding-bottom: 16px;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .search-input {
      width: 100%;
      padding: 10px 14px;
      margin-bottom: 8px;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: var(--radius-md);
      font-size: 14px;
      font-family: inherit;
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.9);
      transition: all 0.2s;
    }

    .search-input::placeholder {
      color: rgba(255,255,255,0.4);
    }

    .search-input:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    }

    .search-wrapper {
      position: relative;
    }

    .autocomplete-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: #1F2937;
      border: 1px solid rgba(255,255,255,0.15);
      border-top: none;
      border-radius: 0 0 var(--radius-md) var(--radius-md);
      box-shadow: var(--shadow-md);
      max-height: 250px;
      overflow-y: auto;
      z-index: 100;
      display: none;
    }

    .autocomplete-dropdown.active {
      display: block;
    }

    .autocomplete-item {
      padding: 10px 14px;
      cursor: pointer;
      font-size: 13px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      transition: background 0.15s;
    }

    .autocomplete-item:last-child {
      border-bottom: none;
    }

    .autocomplete-item:hover {
      background: rgba(255,255,255,0.08);
    }

    .autocomplete-item-main {
      color: rgba(255,255,255,0.9);
      font-weight: 500;
    }

    .autocomplete-item-secondary {
      color: rgba(255,255,255,0.5);
      font-size: 12px;
      margin-top: 2px;
    }

    .autocomplete-loading {
      padding: 12px 14px;
      text-align: center;
      color: rgba(255,255,255,0.5);
      font-size: 13px;
    }

    .autocomplete-empty {
      padding: 12px 14px;
      text-align: center;
      color: rgba(255,255,255,0.4);
      font-size: 13px;
    }

    select {
      width: 100%;
      padding: 10px 14px;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: var(--radius-md);
      font-size: 14px;
      font-family: inherit;
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.9);
      cursor: pointer;
    }

    select:focus {
      outline: none;
      border-color: var(--primary);
    }

    select option {
      background: #1F2937;
      color: #F9FAFB;
    }

    /* Category Filters */
    .category-filters {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--gray-200);
    }

    .category-filters label {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
      font-size: 14px;
      cursor: pointer;
      padding: 6px 8px;
      margin: 0 -8px 4px -8px;
      border-radius: var(--radius-sm);
      transition: background 0.15s;
    }

    .category-filters label {
      color: rgba(255,255,255,0.85);
    }

    .category-filters label:hover {
      background: rgba(255,255,255,0.08);
    }

    .category-color-box {
      width: 16px;
      height: 16px;
      margin-left: auto;
      border-radius: 4px;
      flex-shrink: 0;
    }

    /* Layer Toggles */
    .layer-toggle {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
      font-size: 14px;
      color: rgba(255,255,255,0.85);
    }

    /* Advanced Search Button */
    .advanced-search-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      padding: 10px 16px;
      margin-top: 12px;
      border: none;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, #122640, #1b3a5c);
      color: white;
      font-size: 14px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.2s;
    }

    .advanced-search-btn:hover {
      background: linear-gradient(135deg, #1b3a5c, #2a5a8a);
      box-shadow: 0 2px 8px rgba(27,58,92,0.4);
    }

    .advanced-search-btn.locked {
      opacity: 0.75;
    }

    .advanced-search-btn.locked:hover {
      background: rgba(245,158,11,0.15);
      border-color: var(--warning);
    }

    .advanced-search-icon {
      font-size: 14px;
    }

    .advanced-search-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 4px;
      background: var(--warning);
      color: #fff;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    /* Advanced Search Modal */
    .advanced-search-modal .modal-content {
      width: 720px;
    }

    .advanced-search-modal .modal-header {
      background: linear-gradient(135deg, #0f1d30, #1b3a5c);
      border-bottom: none;
      padding: 16px 24px;
    }
    .advanced-search-modal .modal-header h2 {
      color: #e2e8f0;
      font-size: 16px;
      font-weight: 600;
      letter-spacing: 0.3px;
    }
    .advanced-search-modal .modal-header h2::before {
      display: none;
    }
    .advanced-search-modal .modal-close {
      color: rgba(255,255,255,0.6);
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.12);
    }
    .advanced-search-modal .modal-close:hover {
      color: #fff;
      background: rgba(255,255,255,0.15);
    }

    .advanced-search-modal .modal-body {
      padding: 24px;
      overflow-y: auto;
    }

    .adv-search-section-title {
      font-size: 11.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: #1b3a5c;
      margin: 0 0 12px 0;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--gray-200);
    }

    .adv-search-section-title:not(:first-child) {
      margin-top: 24px;
    }

    .adv-search-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .search-filter-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .search-filter-group.full-width {
      grid-column: 1 / -1;
    }

    .search-filter-group label {
      font-size: 12px;
      font-weight: 500;
      color: var(--gray-600);
    }

    .search-filter-group input,
    .search-filter-group select {
      padding: 8px 10px;
      border: 1px solid var(--gray-300);
      border-radius: var(--radius-sm);
      font-size: 13px;
      font-family: inherit;
      color: var(--gray-800);
      background: white;
      transition: border-color 0.2s;
    }

    .search-filter-group input:focus,
    .search-filter-group select:focus {
      outline: none;
      border-color: #1b3a5c;
      box-shadow: 0 0 0 3px rgba(27,58,92,0.1);
    }

    .range-row {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .range-row input {
      flex: 1;
      min-width: 0;
    }

    .range-row .range-sep {
      font-size: 12px;
      color: var(--gray-400);
      flex-shrink: 0;
    }

    .adv-search-checkbox-group {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 0;
    }

    .adv-search-checkbox-group input[type="checkbox"] {
      width: 16px;
      height: 16px;
      accent-color: #1b3a5c;
    }

    .adv-search-checkbox-group label {
      font-size: 13px;
      color: var(--gray-700);
      cursor: pointer;
    }

    .adv-search-slider-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .adv-search-slider-group label {
      font-size: 12px;
      font-weight: 500;
      color: var(--gray-600);
    }

    .adv-search-slider-group input[type="range"] {
      width: 100%;
      accent-color: #1b3a5c;
    }

    .adv-search-slider-value {
      font-size: 12px;
      color: var(--gray-500);
      text-align: right;
    }

    .adv-search-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 16px 24px;
      border-top: 1px solid var(--gray-200);
    }

    .adv-search-footer button {
      padding: 10px 20px;
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.2s;
    }

    .adv-search-btn-primary {
      background: linear-gradient(135deg, #122640, #1f4268);
      color: white;
      border: none;
    }

    .adv-search-btn-primary:hover {
      background: linear-gradient(135deg, #1a3355, #2a5080);
    }

    .adv-search-btn-secondary {
      background: white;
      color: #1b3a5c;
      border: 1px solid var(--gray-300);
    }

    .adv-search-btn-secondary:hover {
      background: var(--gray-50);
    }

    /* ── Presets Bar ── */
    .adv-search-presets {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 0 16px 0;
      margin-bottom: 16px;
      border-bottom: 1px solid var(--gray-200);
      flex-wrap: wrap;
    }

    .adv-search-presets-label {
      font-size: 11.5px;
      font-weight: 600;
      color: var(--gray-400);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      flex-shrink: 0;
    }

    .adv-search-presets button {
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 500;
      font-family: inherit;
      color: #1b3a5c;
      background: white;
      border: 1px solid #c7d2e0;
      border-radius: 20px;
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
    }

    .adv-search-presets button:hover {
      background: #1b3a5c;
      color: white;
      border-color: #1b3a5c;
    }

    .adv-search-presets button.preset-active {
      background: #1b3a5c;
      color: white;
      border-color: #1b3a5c;
    }

    .preset-more-wrap {
      position: relative;
    }

    .preset-more-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .preset-more-btn .more-badge {
      font-size: 9px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      background: #e8edf3;
      color: #1b3a5c;
      padding: 1px 5px;
      border-radius: 3px;
      margin-left: 2px;
    }

    .preset-more-btn:hover .more-badge {
      background: rgba(255,255,255,0.3);
      color: white;
    }

    .preset-more-dropdown {
      display: none;
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      min-width: 200px;
      background: white;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      box-shadow: 0 6px 20px rgba(0,0,0,0.12);
      z-index: 20;
      padding: 4px 0;
    }

    .preset-more-dropdown.open { display: block; }

    .preset-more-dropdown button {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      width: 100%;
      padding: 8px 14px;
      border: none;
      border-radius: 0;
      background: none;
      color: var(--gray-700);
      font-size: 12.5px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      text-align: left;
      transition: background 0.1s;
    }

    .preset-more-dropdown button:hover {
      background: var(--gray-50);
      color: #1b3a5c;
    }

    .preset-more-dropdown .preset-desc {
      font-size: 10.5px;
      font-weight: 400;
      color: var(--gray-400);
      margin-top: 1px;
    }

    /* ── Exclude Exempt Toggle ── */
    .adv-search-exclude-exempt {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 0 12px 0;
    }

    .adv-search-exclude-exempt input[type="checkbox"] {
      width: 15px;
      height: 15px;
      accent-color: #1b3a5c;
      flex-shrink: 0;
    }

    .adv-search-exclude-exempt label {
      font-size: 12.5px;
      font-weight: 500;
      color: var(--gray-600);
      cursor: pointer;
    }

    /* ── Active Filter Chips ── */
    .active-filter-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 0 0 14px 0;
      min-height: 26px;
    }

    .active-filter-chips:empty::before {
      content: 'No filters applied';
      font-size: 11.5px;
      color: var(--gray-400);
      font-style: italic;
    }

    .filter-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 6px 3px 10px;
      background: #1b3a5c;
      color: white;
      font-size: 11px;
      font-weight: 500;
      border-radius: 12px;
      white-space: nowrap;
      animation: chipIn 0.15s ease;
    }

    @keyframes chipIn {
      from { opacity: 0; transform: scale(0.9); }
      to { opacity: 1; transform: scale(1); }
    }

    .filter-chip button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 14px;
      height: 14px;
      padding: 0;
      border: none;
      border-radius: 50%;
      background: rgba(255,255,255,0.15);
      color: rgba(255,255,255,0.7);
      cursor: pointer;
      transition: background 0.15s, color 0.15s;
      line-height: 1;
    }

    .filter-chip button:hover {
      background: rgba(255,255,255,0.35);
      color: white;
    }

    .filter-chip button svg {
      width: 8px;
      height: 8px;
    }

    /* ── Collapsible Sections ── */
    .adv-search-section {
      margin-bottom: 4px;
    }

    .adv-search-section-title {
      cursor: pointer;
      user-select: none;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .adv-search-section-title .section-chevron {
      width: 14px;
      height: 14px;
      stroke: var(--gray-400);
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
      transition: transform 0.25s ease;
      flex-shrink: 0;
    }

    .adv-search-section:not(.collapsed) .section-chevron {
      transform: rotate(180deg);
    }

    .section-filter-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      background: #1b3a5c;
      color: white;
      font-size: 10px;
      font-weight: 700;
      border-radius: 9px;
      margin-left: auto;
    }

    .section-filter-count:empty,
    .section-filter-count[data-count="0"] {
      display: none;
    }

    .adv-search-section-body {
      overflow: hidden;
      max-height: 500px;
      opacity: 1;
      transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
      padding-bottom: 8px;
    }

    .adv-search-section.collapsed .adv-search-section-body {
      max-height: 0;
      opacity: 0;
      padding-bottom: 0;
    }

    /* Advanced Search Results Panel */
    .adv-results-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 0 14px 0;
      border-bottom: 1px solid var(--gray-200);
      margin-bottom: 14px;
    }

    .adv-results-count {
      flex: 1;
      font-size: 12px;
      font-weight: 500;
      color: var(--gray-500);
    }

    .adv-results-back {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: none;
      border: none;
      color: #1b3a5c;
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      padding: 6px 10px 6px 4px;
      border-radius: var(--radius-sm);
      transition: background 0.15s;
    }

    .adv-results-back:hover {
      background: var(--gray-100);
    }

    .adv-results-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-height: 420px;
      overflow-y: auto;
    }

    .adv-result-card {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 16px;
      background: white;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s;
    }

    .adv-result-card:hover {
      border-color: #1b3a5c;
      box-shadow: 0 2px 8px rgba(27,58,92,0.1);
      transform: translateY(-1px);
    }

    .adv-result-score {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 700;
      flex-shrink: 0;
      color: white;
    }

    .adv-result-score.prime { background: linear-gradient(135deg, #10B981, #059669); }
    .adv-result-score.strong { background: linear-gradient(135deg, #3B82F6, #2563EB); }
    .adv-result-score.moderate { background: linear-gradient(135deg, #F59E0B, #D97706); }
    .adv-result-score.weak { background: linear-gradient(135deg, #EF4444, #DC2626); }
    .adv-result-score.excluded, .adv-result-score.restricted { background: linear-gradient(135deg, #DC2626, #991B1B); }
    .adv-result-score.none { background: linear-gradient(135deg, #6b7280, #9ca3af); }

    .adv-result-select {
      width: 16px;
      height: 16px;
      flex-shrink: 0;
      accent-color: #1b3a5c;
      cursor: pointer;
      margin: 0;
    }

    .adv-result-info {
      flex: 1;
      min-width: 0;
    }

    .adv-result-address {
      font-size: 14px;
      font-weight: 600;
      color: var(--gray-800);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .adv-result-jurisdiction {
      font-size: 12px;
      color: var(--gray-500);
      margin-top: 2px;
    }

    .adv-result-stats {
      display: flex;
      gap: 14px;
      margin-top: 6px;
      flex-wrap: wrap;
    }

    .adv-result-stat {
      font-size: 11px;
      color: var(--gray-700);
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .adv-result-stat .stat-label {
      font-weight: 400;
      color: var(--gray-400);
      font-size: 10px;
    }

    .adv-result-owner {
      font-size: 11px;
      color: var(--gray-500);
      margin-top: 4px;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .adv-result-owner svg { color: var(--gray-400); }

    .adv-result-match {
      flex-shrink: 0;
      text-align: right;
      min-width: 52px;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 3px;
    }

    .adv-result-match-text {
      font-size: 11px;
      font-weight: 600;
    }

    .adv-result-match-text.high { color: #059669; }
    .adv-result-match-text.medium { color: #d97706; }
    .adv-result-match-text.low { color: #9ca3af; }

    .adv-result-match-bar {
      width: 40px;
      height: 3px;
      background: var(--gray-200);
      border-radius: 2px;
      overflow: hidden;
    }

    .adv-result-match-bar-fill {
      height: 100%;
      border-radius: 2px;
      transition: width 0.3s;
    }

    .adv-result-match-bar-fill.high { background: #059669; }
    .adv-result-match-bar-fill.medium { background: #d97706; }
    .adv-result-match-bar-fill.low { background: #9ca3af; }

    .adv-result-arrow {
      flex-shrink: 0;
      color: var(--gray-400);
      font-size: 16px;
    }

    /* Results toolbar: sort + page size */
    .adv-results-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 0 10px 0;
      gap: 10px;
      flex-wrap: wrap;
    }

    .adv-results-toolbar-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .adv-results-toolbar-right {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .adv-results-toolbar select {
      font-size: 12px;
      padding: 4px 8px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      background: white;
      color: var(--gray-600);
      font-family: inherit;
      cursor: pointer;
    }

    .adv-results-toolbar select.sort-select {
      max-width: 160px;
    }

    .adv-results-toolbar select.pagesize-select {
      width: 52px;
    }

    .adv-results-toolbar label {
      font-size: 11px;
      color: var(--gray-400);
      font-weight: 500;
    }

    .adv-results-select-all {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
      color: var(--gray-500);
      cursor: pointer;
    }

    .adv-results-select-all input {
      accent-color: #1b3a5c;
      cursor: pointer;
      width: 14px;
      height: 14px;
    }

    /* Pagination */
    .adv-results-pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 10px 0 2px 0;
    }

    .adv-results-pagination button {
      padding: 4px 10px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      background: white;
      cursor: pointer;
      font-size: 12px;
      font-family: inherit;
      color: var(--gray-600);
      transition: border-color 0.15s;
    }

    .adv-results-pagination button:hover:not(:disabled) { border-color: #1b3a5c; color: #1b3a5c; }
    .adv-results-pagination button:disabled { opacity: 0.35; cursor: default; }
    .adv-results-pagination .page-info { font-size: 12px; color: var(--gray-500); }

    /* Result action buttons (Export, Compare) */
    .adv-results-action-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 5px 10px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      background: white;
      font-size: 12px;
      font-weight: 500;
      font-family: inherit;
      color: var(--gray-600);
      cursor: pointer;
      transition: all 0.15s;
    }

    .adv-results-action-btn:hover { border-color: #1b3a5c; color: #1b3a5c; }
    .adv-results-action-btn:disabled { opacity: 0.35; cursor: default; }

    .adv-results-loading {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 60px 20px;
      color: var(--gray-500);
      gap: 12px;
    }

    .adv-results-loading .spinner {
      width: 28px;
      height: 28px;
      border: 3px solid var(--gray-200);
      border-top-color: #1b3a5c;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .adv-results-empty {
      text-align: center;
      padding: 60px 20px;
      color: var(--gray-500);
    }

    .adv-results-empty .empty-icon {
      font-size: 32px;
      margin-bottom: 12px;
      opacity: 0.5;
    }

    .adv-results-empty h4 {
      margin: 0 0 6px 0;
      color: var(--gray-700);
      font-size: 15px;
    }

    .adv-results-empty p {
      margin: 0;
      font-size: 13px;
    }

    /* Saved Searches */
    .saved-searches-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 24px;
      background: var(--gray-50);
      border-bottom: 1px solid var(--gray-200);
      position: relative;
    }

    .saved-searches-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      background: none;
      border: 1px solid var(--gray-300);
      border-radius: 6px;
      padding: 6px 12px;
      font-size: 12.5px;
      font-weight: 600;
      color: #1b3a5c;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.2s;
    }

    .saved-searches-toggle:hover {
      background: white;
      border-color: #1b3a5c;
    }

    .saved-searches-toggle.active {
      background: #1b3a5c;
      color: white;
      border-color: #1b3a5c;
    }

    .saved-searches-toggle .ss-count {
      background: #1b3a5c;
      color: white;
      font-size: 10px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 10px;
      min-width: 18px;
      text-align: center;
    }

    .saved-searches-toggle.active .ss-count {
      background: rgba(255,255,255,0.25);
    }

    .saved-searches-dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      border-bottom: 1px solid var(--gray-200);
      box-shadow: 0 8px 24px rgba(0,0,0,0.1);
      max-height: 280px;
      overflow-y: auto;
      z-index: 10;
    }

    .saved-searches-dropdown.open {
      display: block;
    }

    .saved-searches-empty {
      padding: 24px;
      text-align: center;
      color: var(--gray-400);
      font-size: 13px;
      line-height: 1.5;
    }

    .saved-search-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 24px;
      border-bottom: 1px solid var(--gray-100);
      cursor: pointer;
      transition: background 0.15s;
    }

    .saved-search-item:hover {
      background: var(--gray-50);
    }

    .saved-search-item:last-child {
      border-bottom: none;
    }

    .saved-search-info {
      flex: 1;
      min-width: 0;
    }

    .saved-search-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-800);
      margin-bottom: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .saved-search-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }

    .saved-search-chip {
      display: inline-block;
      padding: 1px 7px;
      background: var(--gray-100);
      border-radius: 4px;
      font-size: 10.5px;
      font-weight: 500;
      color: var(--gray-500);
      white-space: nowrap;
    }

    .saved-search-date {
      font-size: 11px;
      color: var(--gray-400);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .saved-search-delete {
      background: none;
      border: none;
      color: var(--gray-300);
      cursor: pointer;
      font-size: 16px;
      padding: 4px;
      line-height: 1;
      border-radius: 4px;
      transition: all 0.15s;
      flex-shrink: 0;
    }

    .saved-search-delete:hover {
      color: #dc2626;
      background: rgba(220,38,38,0.08);
    }

    .save-search-inline {
      display: none;
      align-items: center;
      gap: 8px;
      margin-left: auto;
    }

    .save-search-inline.active {
      display: flex;
    }

    .save-search-inline input {
      padding: 5px 10px;
      border: 1px solid var(--gray-300);
      border-radius: 5px;
      font-size: 12.5px;
      font-family: inherit;
      color: var(--gray-800);
      width: 200px;
    }

    .save-search-inline input:focus {
      outline: none;
      border-color: #1b3a5c;
      box-shadow: 0 0 0 3px rgba(27,58,92,0.1);
    }

    .save-search-inline button {
      padding: 5px 12px;
      border-radius: 5px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      border: none;
      transition: all 0.2s;
    }

    .save-search-confirm {
      background: linear-gradient(135deg, #122640, #1f4268);
      color: white;
    }

    .save-search-confirm:hover {
      box-shadow: 0 2px 8px rgba(18,38,64,0.3);
    }

    .save-search-cancel {
      background: var(--gray-100);
      color: var(--gray-600);
      border: 1px solid var(--gray-200) !important;
    }

    .save-search-cancel:hover {
      background: var(--gray-200);
    }

    .adv-results-save-btn {
      background: none;
      border: 1px solid var(--gray-300);
      border-radius: 5px;
      padding: 5px 10px;
      font-size: 12px;
      font-weight: 600;
      color: #1b3a5c;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .adv-results-save-btn:hover {
      background: var(--gray-50);
      border-color: #1b3a5c;
    }

    /* Collapsible Filter Sections */
    .filter-section {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid rgba(255,255,255,0.1);
    }

    .filter-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      user-select: none;
      padding: 4px 0;
      margin-bottom: 8px;
    }

    .filter-header:hover {
      opacity: 0.8;
    }

    .filter-header h4 {
      margin: 0;
      font-size: 13px;
      font-weight: 600;
      color: rgba(255,255,255,0.85);
    }

    .filter-toggle {
      font-size: 10px;
      color: rgba(255,255,255,0.4);
      transition: transform 0.2s;
    }

    .filter-toggle.collapsed {
      transform: rotate(-90deg);
    }

    .filter-content {
      overflow: hidden;
      transition: max-height 0.3s ease;
    }

    .filter-content.collapsed {
      max-height: 0 !important;
    }

    /* Map Layers Section */
    .map-layers-section {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid rgba(255,255,255,0.1);
    }

    .layer-group {
      margin-bottom: 16px;
    }

    .layer-group:last-child {
      margin-bottom: 0;
    }

    .layer-group-title {
      font-size: 11px;
      font-weight: 600;
      color: rgba(255,255,255,0.45);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 8px;
      padding-bottom: 4px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    /* Floating Compare Bar */
    .compare-bar {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: white;
      border-radius: var(--radius-lg);
      box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
      padding: 12px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      z-index: 1000;
      transition: all 0.3s ease;
      opacity: 0;
      pointer-events: none;
    }

    .compare-bar.visible {
      opacity: 1;
      pointer-events: auto;
    }

    .compare-bar-count {
      font-size: 14px;
      font-weight: 600;
      color: var(--gray-700);
    }

    .compare-bar-count span {
      color: var(--primary);
    }

    .compare-bar-actions {
      display: flex;
      gap: 8px;
    }

    .compare-bar .btn {
      padding: 8px 16px;
      font-size: 13px;
      border-radius: var(--radius-md);
    }

    .compare-bar .btn-clear {
      background: var(--gray-100);
      color: var(--gray-600);
      border: none;
    }

    .compare-bar .btn-clear:hover {
      background: var(--gray-200);
    }

    .compare-bar .btn-compare {
      background: var(--primary);
      color: white;
      border: none;
    }

    .compare-bar .btn-compare:hover {
      background: var(--primary-dark);
    }

    .layer-item {
      display: flex;
      align-items: center;
      gap: 10px;
      color: rgba(255,255,255,0.85);
      padding: 8px 10px;
      margin: 0 -10px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: background 0.15s;
      font-size: 13px;
    }

    .layer-item:hover {
      background: rgba(255,255,255,0.08);
    }

    .layer-item input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
      accent-color: var(--primary);
    }

    .layer-item .layer-name {
      flex: 1;
    }

    .layer-item .layer-color {
      width: 14px;
      height: 14px;
      border-radius: 3px;
      flex-shrink: 0;
    }

    .layer-item .layer-icon {
      font-size: 14px;
      width: 20px;
      text-align: center;
    }

    .layer-item.disabled {
      opacity: 0.5;
      pointer-events: none;
    }


    /* Incentive Zone Colors - Distinct from zoning categories */
    .layer-color.opportunity-zone {
      background: #D97706;
      border: 2px solid rgba(217,119,6,0.5);
    }

    .layer-color.enterprise-zone {
      background: #F43F5E;
      border: 2px dashed #BE123C;
    }

    /* Power Infrastructure Layer Colors */
    .layer-color.transmission-line {
      background: linear-gradient(90deg, #FBBF24 0%, #F59E0B 50%, #D97706 100%);
      border: 2px solid #B45309;
    }

    .layer-color.substation {
      background: #10B981;
      border: 2px solid #059669;
      border-radius: 50%;
    }

    /* Voltage Legend */
    .voltage-legend {
      margin-top: 12px;
      padding: 10px;
      background: var(--gray-50);
      border-radius: var(--radius-sm);
      font-size: 11px;
    }

    .legend-title {
      font-weight: 600;
      color: var(--gray-600);
      margin-bottom: 8px;
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
      color: var(--gray-600);
    }

    .legend-line {
      width: 24px;
      height: 3px;
      border-radius: 2px;
    }

    .legend-line.voltage-345 { background: #DC2626; }
    .legend-line.voltage-230 { background: #FACC15; }
    .legend-line.voltage-115 { background: #3B82F6; }
    .legend-line.voltage-low { background: #EC4899; height: 4px; }

    /* Popup */
    .maplibregl-popup { max-width: 280px; }
    .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
      border-top-color: #fff !important;
    }
    .maplibregl-popup-anchor-top .maplibregl-popup-tip {
      border-bottom-color: #1b3a5c !important;
    }
    .maplibregl-popup-anchor-left .maplibregl-popup-tip {
      border-right-color: #1b3a5c !important;
    }
    .maplibregl-popup-anchor-right .maplibregl-popup-tip {
      border-left-color: #fff !important;
    }

    .maplibregl-popup-content {
      padding: 0;
      border-radius: 10px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.18);
      overflow: hidden;
      border: 1px solid rgba(27,58,92,0.15);
    }

    .popup-parcel-header {
      background: linear-gradient(135deg, #1b3a5c, #234a72);
      padding: 8px 12px;
      font-size: 13px;
      font-weight: 600;
      color: #fff;
      letter-spacing: 0.2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 260px;
    }

    .popup-parcel-body {
      padding: 8px 12px 6px;
    }

    .popup-row {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      padding: 3px 0;
      font-size: 12px;
      color: var(--gray-700);
    }

    .popup-label {
      font-weight: 500;
      color: var(--gray-400);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .popup-value {
      font-weight: 600;
      color: #1b3a5c;
      text-align: right;
    }

    .popup-hint {
      padding: 5px 12px 8px;
      font-size: 10px;
      color: var(--gray-400);
      border-top: 1px solid var(--gray-100);
      text-align: center;
      letter-spacing: 0.2px;
    }

    /* Buttons */
    .btn {
      padding: 10px 20px;
      border-radius: var(--radius-md);
      border: none;
      font-weight: 600;
      cursor: pointer;
      font-size: 14px;
      font-family: inherit;
      transition: all 0.2s;
    }

    .btn-primary {
      background: linear-gradient(135deg, #122640 0%, #1f4268 100%);
      color: white;
    }

    .btn-primary:hover {
      background: linear-gradient(135deg, #0d1b2a 0%, #1b3a5c 100%);
    }

    .btn-secondary {
      background: var(--gray-100);
      color: var(--gray-700);
    }

    .btn-secondary:hover {
      background: var(--gray-200);
    }

    .btn-full { width: 100%; }

    /* Modal Base */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.5);
      backdrop-filter: blur(4px);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-overlay.active { display: flex; }

    .modal-content {
      background: white;
      border-radius: var(--radius-lg);
      max-width: 95%;
      max-height: 90vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: var(--shadow-lg);
    }

    .modal-header {
      padding: 16px 24px;
      border-bottom: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
      background: linear-gradient(135deg, #f8fafc 0%, #ffffff 60%, #f8fafc 100%);
      z-index: 1;
      box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    }

    .modal-header h2 {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      color: var(--gray-800);
      letter-spacing: -0.01em;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .modal-header h2::before {
      content: '';
      display: inline-block;
      width: 3px;
      height: 18px;
      background: #1b3a5c;
      border-radius: 2px;
      flex-shrink: 0;
    }

    .modal-close {
      background: none;
      border: 1px solid var(--gray-200);
      font-size: 18px;
      cursor: pointer;
      color: var(--gray-400);
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      border-radius: 6px;
      transition: all 0.15s;
    }

    .modal-close:hover {
      color: var(--gray-600);
      background: var(--gray-100);
      border-color: var(--gray-300);
    }

    .modal-body {
      padding: 16px 24px 0;
      overflow: hidden;
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }

    .modal-actions {
      padding: 12px 24px;
      border-top: 1px solid var(--gray-200);
      display: flex;
      gap: 12px;
      justify-content: flex-end;
      flex-shrink: 0;
      background: white;
    }

    /* Onboarding Modal */
    .onboarding-content {
      text-align: center;
      padding: 40px;
    }

    .onboarding-content h1 {
      font-size: 28px;
      margin-bottom: 8px;
    }

    .onboarding-content p {
      color: var(--gray-500);
      margin-bottom: 32px;
    }

    .project-type-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
      max-width: 600px;
      margin: 0 auto;
    }

    .project-type-card {
      padding: 24px;
      border: 2px solid var(--gray-200);
      border-radius: var(--radius-lg);
      cursor: pointer;
      transition: all 0.2s;
      text-align: left;
    }

    .project-type-card:hover {
      border-color: var(--primary);
      background: rgba(37, 99, 235, 0.02);
    }

    .project-type-card.selected {
      border-color: var(--primary);
      background: rgba(37, 99, 235, 0.05);
    }

    .project-type-icon {
      font-size: 32px;
      margin-bottom: 12px;
    }

    .project-type-card h3 {
      margin: 0 0 6px 0;
      font-size: 16px;
    }

    .project-type-card p {
      margin: 0;
      font-size: 13px;
      color: var(--gray-500);
      text-align: left;
    }

    /* Parcel Detail Grid — sidebar + content layout */
    .parcel-detail-grid {
      display: flex;
      flex-direction: column;
      gap: 0;
      flex: 1;
      min-height: 0;
    }

    /* Hero Bar — 3-column merged header */
    .parcel-hero-bar {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: start;
      gap: 0 20px;
      padding: 16px 28px 16px;
      background: linear-gradient(135deg, #122640 0%, #1f4268 60%, #1a3756 100%);
      border-radius: var(--radius-lg) var(--radius-lg) 0 0;
      margin: -16px -24px 14px -24px;
      flex-shrink: 0;
      color: white;
      position: relative;
      border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    }

    .hero-score-circle {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 700;
      flex-shrink: 0;
      box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }

    .hero-score-circle.prime { background: linear-gradient(135deg, #10B981, #059669); }
    .hero-score-circle.strong { background: linear-gradient(135deg, #3B82F6, #2563EB); }
    .hero-score-circle.moderate { background: linear-gradient(135deg, #F59E0B, #D97706); }
    .hero-score-circle.weak { background: linear-gradient(135deg, #EF4444, #DC2626); }
    .hero-score-circle.excluded, .hero-score-circle.restricted { background: linear-gradient(135deg, #DC2626, #991B1B); }

    .hero-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      min-width: 0;
    }

    .hero-meta-sep {
      color: rgba(255,255,255,0.3);
      font-size: 15px;
    }

    .hero-meta-item {
      font-size: 15px;
      color: rgba(255,255,255,0.6);
    }

    .hero-badges {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      justify-content: center;
      align-content: center;
      flex-shrink: 0;
      max-width: 340px;
    }

    /* Hero bar — 3-column layout */
    .hero-left {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .hero-address {
      font-size: 19px;
      font-weight: 700;
      color: white;
      letter-spacing: -0.02em;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .hero-center {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .hero-score-label {
      font-size: 19px;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: white;
      line-height: 1.2;
    }

    .hero-score-block {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .hero-right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-shrink: 0;
      align-self: center;
    }

    /* hero-close removed — modal closes via footer Close button or overlay click */

    /* Sidebar + Content body layout */
    .parcel-body-layout {
      display: flex;
      gap: 0;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    /* Left sidebar — vertical tab nav */
    .analysis-sidebar {
      display: flex;
      flex-direction: column;
      gap: 2px;
      width: 180px;
      flex-shrink: 0;
      padding-right: 16px;
      border-right: 1px solid var(--gray-200);
    }

    .sidebar-section-label {
      font-size: 11.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: #1b3a5c;
      padding: 10px 14px 4px;
      margin-top: 4px;
    }
    .sidebar-section-label:first-child {
      margin-top: 0;
      padding-top: 4px;
    }

    .analysis-tab {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border: none;
      background: transparent;
      color: var(--gray-500);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      border-radius: var(--radius-sm);
      transition: all 0.15s;
      white-space: nowrap;
      text-align: left;
      width: 100%;
    }

    .analysis-tab:hover {
      color: var(--gray-700);
      background: var(--gray-100);
    }

    .analysis-tab.active {
      background: var(--gray-100);
      color: var(--gray-800);
      font-weight: 600;
    }

    .analysis-tab-icon {
      width: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      opacity: 0.55;
    }

    .analysis-tab.active .analysis-tab-icon {
      opacity: 0.85;
    }

    /* Right content area — this is now the scroll container */
    .analysis-content-area {
      flex: 1;
      min-width: 0;
      min-height: 0;
      padding-left: 20px;
      overflow-y: auto;
    }

    .analysis-tab-content {
      display: none;
    }

    .analysis-tab-content.active {
      display: block;
    }

    .tab-panel {
      background: var(--gray-50);
      border-radius: var(--radius-md);
      padding: 18px 18px 10px;
      margin-top: 0;
    }

    /* removed max-width — content fills available space */

    .tab-panel h4 {
      margin: 0 0 12px 0;
      font-size: 14px;
      font-weight: 600;
      color: var(--gray-700);
    }

    /* Opposition Risk Card */
    .risk-tab-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      align-items: start;
    }
    .risk-tab-col {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    /* Risk factor items (Lucide icon + label + detail) */
    .risk-factor-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      background: white;
      border-radius: var(--radius-sm);
      border-left: 3px solid var(--gray-300);
    }
    .risk-factor-item.safe { border-left-color: #10B981; }
    .risk-factor-item.caution { border-left-color: #F59E0B; }
    .risk-factor-item.warning { border-left-color: #EF4444; }
    .risk-factor-icon {
      flex-shrink: 0;
      width: 20px;
      height: 20px;
    }
    .risk-factor-icon svg {
      width: 20px;
      height: 20px;
      stroke-width: 1.75;
      fill: none;
    }
    .risk-factor-item.safe .risk-factor-icon svg { stroke: #10B981; }
    .risk-factor-item.caution .risk-factor-icon svg { stroke: #F59E0B; }
    .risk-factor-item.warning .risk-factor-icon svg { stroke: #EF4444; }
    .risk-factor-label {
      font-weight: 600;
      color: var(--gray-800);
      font-size: 14px;
    }
    .risk-factor-detail {
      font-size: 13px;
      color: var(--gray-500);
      line-height: 1.5;
    }
    .risk-empty-state {
      padding: 16px;
      color: var(--gray-400);
      font-size: 13px;
      text-align: center;
    }
    .opposition-risk-card {
      background: white;
      border-radius: var(--radius-md);
      padding: 18px;
      border: 1px solid var(--gray-100);
      box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    }
    .opposition-risk-header {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 14px;
    }
    .opposition-level-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 4px;
      font-weight: 700;
      font-size: 11px;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      flex-shrink: 0;
    }
    .opposition-level-badge.low { background: #D1FAE5; color: #065F46; }
    .opposition-level-badge.moderate { background: #FEF3C7; color: #92400E; }
    .opposition-level-badge.high { background: #FEE2E2; color: #991B1B; }
    .opposition-level-badge .level-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
    }
    .opposition-level-badge.low .level-dot { background: #10B981; }
    .opposition-level-badge.moderate .level-dot { background: #F59E0B; }
    .opposition-level-badge.high .level-dot { background: #EF4444; }
    .opposition-factors {
      display: flex;
      flex-direction: column;
      gap: 0;
      font-size: 13px;
      border-top: 1px solid var(--gray-100);
    }
    .opposition-factor {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid var(--gray-100);
    }
    .opposition-factor-name { color: var(--gray-600); font-size: 13px; }
    .opposition-factor-level {
      font-weight: 600;
      font-size: 11px;
      letter-spacing: 0.3px;
      padding: 2px 8px;
      border-radius: 3px;
    }
    .opposition-factor-level.high { background: #FEE2E2; color: #991B1B; }
    .opposition-factor-level.med { background: #FEF3C7; color: #92400E; }
    .opposition-factor-level.low { background: #D1FAE5; color: #065F46; }
    .opposition-factor-level.none { background: var(--gray-50); color: var(--gray-400); }
    .opposition-mitigations {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--gray-100);
      font-size: 13px;
      color: var(--gray-600);
    }
    .opposition-mitigations strong {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--gray-500);
      font-weight: 600;
    }
    .opposition-mitigations ul {
      margin: 6px 0 0 0;
      padding-left: 16px;
    }
    .opposition-mitigations li { margin-bottom: 4px; line-height: 1.5; }
    .opposition-notification {
      font-size: 12px;
      color: var(--gray-400);
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--gray-100);
    }

    /* Entitlement Pathway Steps */
    .entitlement-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 14px;
      flex-wrap: wrap;
    }
    .pathway-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 600;
      color: white;
    }
    .pathway-badge.by_right { background: #10B981; }
    .pathway-badge.conditional_use { background: #F59E0B; color: #92400E; }
    .pathway-badge.rezoning { background: #EF4444; }
    .pathway-summary {
      font-size: 14px;
      color: var(--gray-600);
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
    }
    .pathway-summary span { display: flex; align-items: center; gap: 5px; }
    .pathway-summary svg { flex-shrink: 0; }
    .entitlement-steps {
      display: flex;
      flex-direction: column;
      gap: 0;
      position: relative;
      padding-left: 20px;
    }
    .entitlement-step {
      position: relative;
      background: white;
      border-radius: var(--radius-sm);
      padding: 12px 14px;
      margin-bottom: 6px;
      border-left: 3px solid #1b3a5c;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }
    .entitlement-step.env-step {
      border-left-color: #F59E0B;
      background: #FFFBEB;
    }
    .entitlement-step-number {
      position: absolute;
      left: -26px;
      top: 10px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: linear-gradient(135deg, #122640, #1f4268);
      color: white;
      font-size: 10px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .entitlement-step.env-step .entitlement-step-number {
      background: #F59E0B;
    }
    .entitlement-step-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
    }
    .entitlement-step-name {
      font-weight: 600;
      font-size: 14px;
      color: var(--gray-800);
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .env-badge {
      font-size: 9px;
      font-weight: 700;
      background: #F59E0B;
      color: #92400E;
      padding: 1px 5px;
      border-radius: 3px;
    }
    .entitlement-step-duration {
      font-size: 13px;
      color: var(--gray-500);
      white-space: nowrap;
      font-weight: 500;
    }
    .entitlement-step-desc {
      font-size: 13px;
      color: var(--gray-500);
      line-height: 1.5;
      margin-top: 4px;
    }
    .entitlement-step-submissions {
      margin-top: 4px;
      font-size: 12px;
      color: var(--gray-400);
    }
    .entitlement-footer {
      margin-top: 12px;
      padding: 10px 12px;
      background: var(--gray-100);
      border-radius: var(--radius-sm);
      font-size: 13px;
      color: var(--gray-500);
      display: flex;
      align-items: center;
      gap: 4px;
    }
    /* Historical Context Section (inside detail-section card) */
    .approval-rate-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      background: white;
      border-radius: var(--radius-sm);
      font-size: 14px;
      margin-bottom: 10px;
      border: 1px solid var(--gray-100);
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }
    .approval-rate-badge .rate {
      font-weight: 700;
      font-size: 18px;
    }
    .comparable-case {
      background: white;
      padding: 10px 12px;
      border-radius: var(--radius-sm);
      margin-bottom: 5px;
      border-left: 3px solid var(--gray-300);
      font-size: 13px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }
    .comparable-case.approved { border-left-color: #10B981; }
    .comparable-case.denied { border-left-color: #EF4444; }
    .comparable-case.approved_with_conditions { border-left-color: #F59E0B; }
    .case-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 3px;
    }
    .case-decision {
      font-weight: 600;
      font-size: 11px;
      padding: 2px 8px;
      border-radius: 3px;
    }
    .case-decision.approved { background: #D1FAE5; color: #065F46; }
    .case-decision.denied { background: #FEE2E2; color: #991B1B; }
    .case-decision.approved_with_conditions { background: #FEF3C7; color: #92400E; }
    .case-decision.withdrawn { background: var(--gray-100); color: var(--gray-600); }

    /* Land Assembly Tab */
    .assembly-layout {
      display: grid;
      grid-template-columns: 55fr 45fr;
      gap: 16px;
      align-items: start;
    }
    .assembly-col-left, .assembly-col-right {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .assembly-col-header {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--gray-400);
      margin-bottom: -4px;
    }
    .assembly-summary {
      background: white;
      padding: 16px;
      border-radius: var(--radius-md);
      border: none;
      border-top: 3px solid #F97316;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    }
    .assembly-summary-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .assembly-stat {
      padding: 10px 12px;
      background: var(--gray-50);
      border-radius: 8px;
      text-align: center;
    }
    .assembly-stat-value {
      font-size: 22px;
      font-weight: 700;
      color: #1b3a5c;
    }
    .assembly-stat-label {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--gray-400);
      margin-top: 2px;
    }
    .assembly-shape-eff-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--gray-100);
    }
    .assembly-shape-eff-label {
      font-size: 11px;
      font-weight: 600;
      color: var(--gray-500);
      white-space: nowrap;
    }
    .assembly-shape-eff-bar-wrap {
      flex: 1;
      height: 6px;
      background: var(--gray-100);
      border-radius: 3px;
      overflow: hidden;
    }
    .assembly-shape-eff-bar {
      height: 100%;
      border-radius: 3px;
      transition: width 0.3s ease;
    }
    .assembly-shape-eff-value {
      font-size: 13px;
      font-weight: 700;
      color: #1b3a5c;
      min-width: 32px;
      text-align: right;
    }
    .assembly-zoning-bar {
      display: flex;
      height: 8px;
      border-radius: 4px;
      overflow: hidden;
      margin-top: 14px;
      gap: 2px;
    }
    .assembly-zoning-segment {
      font-size: 0;
      border-radius: 2px;
      min-width: 12px;
    }
    .assembly-zoning-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 8px;
      font-size: 11px;
      color: var(--gray-500);
    }
    .assembly-legend-item {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .assembly-legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .assembly-shape-card {
      background: white;
      padding: 14px;
      border-radius: var(--radius-md);
      box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    }
    .assembly-shape-toggle {
      display: flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      user-select: none;
      margin-bottom: 8px;
    }
    .assembly-shape-toggle .chevron {
      transition: transform 0.2s ease;
      flex-shrink: 0;
    }
    .assembly-shape-toggle.open .chevron {
      transform: rotate(90deg);
    }
    .assembly-shape-body {
      display: none;
    }
    .assembly-shape-body.open {
      display: block;
    }
    .assembly-shape-legend {
      display: flex;
      gap: 14px;
      margin-top: 8px;
      font-size: 10.5px;
      color: var(--gray-500);
    }
    .assembly-shape-legend-item {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .assembly-shape-legend-swatch {
      width: 14px;
      height: 3px;
      border-radius: 1px;
    }
    .assembly-same-owner-section {
      background: white;
      padding: 14px;
      border-radius: var(--radius-md);
      border-left: 4px solid #10B981;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    }
    .assembly-same-owner-header {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 10px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--gray-100);
    }
    .assembly-same-owner-title {
      font-size: 12px;
      font-weight: 700;
      color: #10B981;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .assembly-same-owner-count {
      font-size: 11px;
      color: var(--gray-400);
      font-weight: 400;
    }
    .assembly-ring-card {
      background: white;
      padding: 14px;
      border-radius: var(--radius-md);
      box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
      overflow: hidden;
    }
    .assembly-ring-card.ring-adjacent { border-left: 4px solid #3B82F6; }
    .assembly-ring-card.ring-extended { border-left: 4px solid #6366F1; }
    .assembly-ring-card.ring-outer { border-left: 4px solid #1b3a5c; }
    .assembly-ring-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--gray-100);
    }
    .assembly-ring-label {
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .assembly-ring-card.ring-adjacent .assembly-ring-label { color: #3B82F6; }
    .assembly-ring-card.ring-extended .assembly-ring-label { color: #6366F1; }
    .assembly-ring-card.ring-outer .assembly-ring-label { color: #1b3a5c; }
    .assembly-ring-stats {
      display: flex;
      gap: 12px;
      font-size: 12.5px;
      color: var(--gray-400);
    }
    .assembly-ring-stat-value {
      font-weight: 700;
      font-size: 13.5px;
      color: var(--gray-700);
    }
    .assembly-parcel-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 6px 8px;
      border-radius: 5px;
      cursor: pointer;
      transition: background 0.15s;
      border-bottom: 1px solid var(--gray-50);
    }
    .assembly-parcel-row:last-child { border-bottom: none; }
    .assembly-parcel-row:hover { background: var(--gray-50); }
    .assembly-parcel-row.same-owner { background: #F0FDF4; }
    .assembly-parcel-row.same-owner:hover { background: #DCFCE7; }
    .assembly-row-main {
      flex: 1;
      min-width: 0;
      overflow: hidden;
    }
    .assembly-row-address {
      font-size: 12px;
      font-weight: 600;
      color: var(--gray-800);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
    }
    .assembly-row-owner {
      font-size: 11px;
      color: var(--gray-400);
      display: block;
      margin-top: 1px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .assembly-row-stats {
      display: flex;
      gap: 10px;
      flex-shrink: 0;
      margin-left: 8px;
    }
    .assembly-row-stat {
      font-size: 11px;
      color: var(--gray-500);
      white-space: nowrap;
    }
    .assembly-row-stat-label {
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--gray-400);
      display: block;
      line-height: 1;
      margin-bottom: 1px;
    }
    .assembly-owner-group {
      margin-bottom: 8px;
      padding-bottom: 4px;
      border-bottom: 1px solid var(--gray-50);
    }
    .assembly-owner-group:last-child {
      margin-bottom: 0;
      border-bottom: none;
    }
    .assembly-owner-header {
      font-size: 11px;
      font-weight: 700;
      color: var(--gray-500);
      margin-bottom: 2px;
      padding: 3px 8px;
    }
    .assembly-limit-toggle {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 12px;
    }
    .assembly-limit-btn {
      padding: 4px 12px;
      border: 1px solid var(--gray-200);
      border-radius: 6px;
      background: white;
      color: var(--gray-500);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }
    .assembly-limit-btn:hover { border-color: var(--gray-300); color: var(--gray-700); }
    .assembly-limit-btn.active {
      background: #1b3a5c;
      border-color: #1b3a5c;
      color: white;
    }
    .assembly-ring-badge {
      display: inline-block;
      font-size: 9px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      padding: 1px 5px;
      border-radius: 3px;
      background: var(--gray-100);
      color: var(--gray-500);
      margin-left: 4px;
      vertical-align: 1px;
    }

    .detail-section {
      background: white;
      padding: 18px;
      border-radius: var(--radius-md);
      border: none;
      border-top: 3px solid #1b3a5c;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    }

    .detail-section h3 {
      margin: 0 0 14px 0;
      font-size: 11.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: #1b3a5c;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--gray-100);
    }

    .detail-row {
      display: flex;
      align-items: baseline;
      margin-bottom: 2px;
      font-size: 13.5px;
      gap: 8px;
      padding: 4px 6px;
      border-radius: 4px;
    }

    .detail-row:last-child { margin-bottom: 0; }

    .detail-label {
      font-weight: 600;
      color: var(--gray-400);
      flex-shrink: 0;
      white-space: nowrap;
      font-size: 12.5px;
      letter-spacing: 0.1px;
    }

    .detail-label::after {
      content: ':';
    }

    .detail-value {
      color: var(--gray-800);
      font-weight: 600;
      word-break: break-word;
    }

    /* Left-column cards (Parcel Info + Property Details): uniform label width
       based on longest label "Zoning Category" (15 chars at 600 weight) */
    .overview-col-stack:first-child .detail-label {
      width: 130px;
      min-width: 130px;
    }

    /* Financial card: fixed-width labels for vertical currency alignment */
    #financial-overrides .detail-label {
      width: 160px;
      min-width: 160px;
    }

    .mix-arrow-btn {
      width: 22px; height: 22px; border: 1px solid #d1d5db; border-radius: 4px;
      background: #f9fafb; color: #374151; font-size: 14px; font-weight: 600; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      padding: 0; line-height: 1;
      display: flex; align-items: center; justify-content: center; padding: 0;
      line-height: 1; flex-shrink: 0; transition: background 0.15s, border-color 0.15s;
    }
    .mix-arrow-btn:hover { background: #e5e7eb; border-color: #9ca3af; }

    /* Use Mix slider — solid track with white thumb */
    .mix-slider {
      -webkit-appearance: none; appearance: none;
      width: 80px; height: 5px; border-radius: 3px; cursor: pointer; direction: rtl;
      background: linear-gradient(90deg, #1f4268, #3b82f6);
    }
    .mix-slider::-webkit-slider-thumb {
      -webkit-appearance: none; appearance: none;
      width: 14px; height: 14px; border-radius: 50%;
      background: #fff; border: 2px solid #3b82f6;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
      cursor: pointer;
    }
    .mix-slider::-moz-range-thumb {
      width: 14px; height: 14px; border-radius: 50%;
      background: #fff; border: 2px solid #3b82f6;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
      cursor: pointer;
    }
    .mix-slider::-moz-range-track {
      height: 5px; border-radius: 3px;
      background: linear-gradient(90deg, #1f4268, #3b82f6);
    }
    .mix-reset-btn {
      font-size: 10px; color: #6B7280; background: none; border: 1px solid #d1d5db;
      border-radius: 4px; padding: 1px 6px; cursor: pointer; margin-left: 2px;
      line-height: 1.4; transition: background 0.15s, color 0.15s;
    }
    .mix-reset-btn:hover { background: #e5e7eb; color: #374151; }

    /* Score Section — light background for overview tab */
    .score-section {
      background: var(--gray-50);
      color: var(--gray-800);
    }

    .score-section h3 {
      color: var(--gray-600);
      border-bottom-color: var(--gray-200);
    }

    .score-main {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }

    .score-circle {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      font-weight: 700;
      flex-shrink: 0;
    }

    .score-circle.prime { background: linear-gradient(135deg, #10B981, #059669); }
    .score-circle.strong { background: linear-gradient(135deg, #3B82F6, #2563EB); }
    .score-circle.moderate { background: linear-gradient(135deg, #F59E0B, #D97706); }
    .score-circle.weak { background: linear-gradient(135deg, #EF4444, #DC2626); }
    .score-circle.excluded, .score-circle.restricted { background: linear-gradient(135deg, #DC2626, #991B1B); }

    .score-tier {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
      padding: 4px 10px;
      border-radius: 4px;
      margin-bottom: 4px;
      display: inline-block;
    }

    .score-tier.prime { background: rgba(16, 185, 129, 0.2); color: #10B981; }
    .score-tier.strong { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
    .score-tier.moderate { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }
    .score-tier.weak { background: rgba(239, 68, 68, 0.2); color: #F87171; }
    .score-tier.excluded, .score-tier.restricted { background: rgba(220, 38, 38, 0.2); color: #F87171; }

    .owner-excluded .detail-label {
      color: #dc2626;
    }

    .owner-excluded .detail-value {
      display: flex;
      flex-direction: column;
    }

    .owner-excluded-reason {
      font-size: 11px;
      font-weight: 500;
      color: #dc2626;
      margin-top: 1px;
      opacity: 0.75;
    }

    .zoning-restricted-reason,
    .structure-excluded-reason {
      font-size: 11px;
      font-weight: 500;
      color: #dc2626;
      margin-top: 2px;
      opacity: 0.8;
      width: 100%;
      flex-basis: 100%;
    }

    .zoning-restricted {
      border: 1.5px solid rgba(220, 38, 38, 0.6);
      border-radius: 6px;
      padding: 6px 8px;
      background: rgba(220, 38, 38, 0.08);
      flex-wrap: wrap;
    }

    .zoning-restricted .detail-label {
      color: #F87171;
    }

    .structure-excluded {
      border: 1.5px solid rgba(220, 38, 38, 0.6);
      border-radius: 6px;
      padding: 6px 8px;
      background: rgba(220, 38, 38, 0.08);
      flex-wrap: wrap;
    }

    .structure-excluded .detail-label {
      color: #F87171;
    }

    .score-description {
      font-size: 13.5px;
      margin: 6px 0;
      padding: 12px 14px;
      line-height: 1.65;
      background: white;
      border-radius: var(--radius-sm);
      border-left: 3px solid #1b3a5c;
      box-shadow: 0 1px 2px rgba(0,0,0,0.04);
      text-align: left;
      letter-spacing: 0.01em;
      color: #1b3a5c;
    }

    .score-factors {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--gray-200);
      font-size: 13px;
      color: var(--gray-500);
    }

    .score-factors-title {
      font-weight: 600;
      color: var(--gray-600);
      margin-bottom: 6px;
    }

    .factor-positive { color: #10B981; }
    .factor-negative { color: #F87171; }
    .factor-neutral { color: var(--gray-400); }

    .score-label {
      font-size: 14px;
      color: var(--gray-500);
    }

    .score-breakdown {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }

    .exempt-toggle-scores {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
      color: #6B7280;
      text-decoration: none;
      margin-top: 8px;
      cursor: pointer;
    }
    .exempt-toggle-scores:hover { color: #1b3a5c; }
    .exempt-toggle-scores svg { width: 14px; height: 14px; }

    .exempt-show-badges {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      color: rgba(255,255,255,0.6);
      text-decoration: none;
      margin-top: 4px;
      cursor: pointer;
    }
    .exempt-show-badges:hover { color: rgba(255,255,255,0.9); }
    .exempt-show-badges svg { width: 13px; height: 13px; }

    .score-item {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 13px;
      padding: 10px 10px 8px;
      background: white;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      position: relative;
      overflow: hidden;
    }

    .score-item-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .score-item-label {
      color: var(--gray-500);
      font-size: 11.5px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .score-item-value {
      font-weight: 700;
      font-size: 15px;
    }

    .score-item-bar {
      height: 3px;
      background: var(--gray-200);
      border-radius: 2px;
      overflow: hidden;
    }

    .score-item-bar-fill {
      height: 100%;
      border-radius: 2px;
      transition: width 0.4s ease;
    }

    .score-bar {
      height: 4px;
      background: var(--gray-200);
      border-radius: 2px;
      margin-top: 6px;
      overflow: hidden;
    }

    .score-bar-fill {
      height: 100%;
      border-radius: 2px;
      transition: width 0.3s ease;
    }

    .infrastructure-badges {
      display: flex;
      gap: 6px;
      margin-top: 10px;
      flex-wrap: wrap;
    }

    /* Overview grid — 2-column layout: stacked cards left, financial + blurb right */
    .overview-grid {
      display: grid;
      grid-template-columns: 2fr 3fr;
      gap: 14px;
      margin-bottom: 16px;
    }

    .overview-grid .detail-section {
      margin-bottom: 0;
    }

    .overview-grid .detail-label {
      font-weight: 700;
    }

    .overview-grid .detail-value {
      font-weight: 500;
      background: linear-gradient(135deg, #122640, #1f4268);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .overview-grid .detail-value a {
      -webkit-text-fill-color: initial;
      background: none;
    }

    .overview-grid #fin-market-value {
      -webkit-text-fill-color: #4338CA;
      background: none;
    }

    .overview-col-stack {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    /* Overview score area — score description + 4-col breakdown */
    .overview-score-area {
      margin-bottom: 0;
      margin-top: -4px;
    }

    .overview-score-area .score-main {
      margin-bottom: 10px;
    }

    /* Entitlement layout — 2-column grid for timeline + historical context */
    .entitlement-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      align-items: start;
    }

    .entitlement-layout-left {
      display: flex;
      flex-direction: column;
    }

    .entitlement-layout-right {
      display: flex;
      flex-direction: column;
    }

    /* Site Analysis Section */
    .site-analysis-section {
      background: var(--gray-50);
      border: 1px solid var(--gray-200);
    }

    .site-analysis-section h3 {
      color: var(--gray-600);
      border-bottom-color: var(--gray-200);
    }

    /* Site tab — featured KPI cards */
    /* Site Analysis — KPI cards */
    .site-kpi-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
      gap: 10px;
      margin-bottom: 18px;
    }
    .site-kpi-row.site-kpi-sparse {
      grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
      justify-content: start;
    }
    .site-kpi {
      background: white;
      border: 1px solid var(--gray-200);
      border-top: 3px solid var(--kpi-accent, #1b3a5c);
      border-radius: var(--radius-sm);
      padding: 14px 14px 12px;
      text-align: center;
      box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
      position: relative;
      transition: box-shadow 0.2s, transform 0.2s;
    }
    .site-kpi:hover {
      box-shadow: 0 4px 12px rgba(27,58,92,0.08);
      transform: translateY(-1px);
    }
    .site-kpi-icon {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      background: var(--kpi-icon-bg, rgba(27,58,92,0.08));
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 6px;
    }
    .site-kpi-icon svg { width: 14px; height: 14px; stroke: var(--kpi-accent, #1b3a5c); stroke-width: 2; fill: none; }
    .site-kpi-value {
      font-size: 19px;
      font-weight: 700;
      color: #122640;
      line-height: 1.2;
    }
    .site-kpi-label {
      font-size: 10.5px;
      color: var(--gray-500);
      font-weight: 600;
      margin-top: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .site-kpi-note {
      font-size: 11px;
      color: var(--gray-400);
      margin-top: 3px;
      line-height: 1.3;
    }

    /* Site Analysis — 2-column detail layout */
    .site-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      min-width: 0;
      flex: 1;
    }
    .site-layout.site-layout--single {
      grid-template-columns: 1fr;
      max-width: 520px;
    }

    .site-glossary-wrapper .site-layout {
      min-width: 600px;
    }

    .site-layout .detail-section h3 {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .site-layout .detail-section h3 .section-icon {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
    }
    .site-layout .detail-section h3 .section-icon svg {
      width: 20px;
      height: 20px;
      stroke: #1b3a5c;
      stroke-width: 1.75;
      fill: none;
    }

    .site-layout .detail-label {
      width: 135px;
      min-width: 135px;
    }

    .site-metric-group {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: #1b3a5c;
      margin: 14px 0 6px 0;
      padding: 10px 10px 6px;
      background: linear-gradient(135deg, #f0f4f8 0%, #e8eef6 100%);
      border-radius: 4px;
      border-left: 3px solid #1b3a5c;
    }
    .site-metric-group:first-child {
      margin-top: 0;
    }

    .site-layout .detail-row {
      border-bottom: 1px solid #f0f2f5;
      padding: 5px 6px;
      min-height: 42px;
      align-content: center;
      border-radius: 3px;
      transition: background 0.15s;
    }
    .site-layout .detail-row:hover {
      background: var(--gray-50);
    }
    .site-layout .detail-row:last-child {
      border-bottom: none;
    }

    .site-layout .detail-value {
      font-weight: 600;
      color: #122640;
    }

    .site-layout .detail-value input,
    .site-layout .site-far-inline span {
      background: none;
    }

    .site-detail-note {
      font-size: 12px;
      color: var(--gray-400);
      font-weight: 400;
      display: block;
      margin-left: 0;
      margin-top: 1px;
    }

    .site-far-inline {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      margin-left: 8px;
    }

    /* Site Analysis — footer strip */
    .site-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 12px;
      padding-top: 10px;
      border-top: 1px solid var(--gray-200);
      gap: 12px;
    }
    .site-footer-note {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: var(--gray-400);
      line-height: 1.4;
    }
    .site-footer-note svg { width: 14px; height: 14px; stroke: var(--gray-400); stroke-width: 1.75; fill: none; flex-shrink: 0; }
    .site-glossary-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: #1b3a5c;
      background: white;
      border: 1px solid var(--gray-300);
      border-radius: var(--radius-sm);
      padding: 6px 14px;
      cursor: pointer;
      font-weight: 600;
      font-family: inherit;
      letter-spacing: 0.2px;
      transition: all 0.15s;
      white-space: nowrap;
    }
    .site-glossary-btn:hover {
      background: var(--gray-50);
      border-color: #1b3a5c;
      box-shadow: 0 1px 3px rgba(27,58,92,0.1);
    }
    .site-glossary-btn svg { width: 14px; height: 14px; stroke: #1b3a5c; stroke-width: 1.75; fill: none; }

    /* Site Analysis — empty state */
    .site-empty-state {
      text-align: center;
      padding: 48px 24px;
    }
    .site-empty-state svg { width: 40px; height: 40px; stroke: var(--gray-300); stroke-width: 1.5; fill: none; margin-bottom: 12px; }
    .site-empty-title { font-size: 14px; font-weight: 600; color: var(--gray-500); margin-bottom: 6px; }
    .site-empty-desc { font-size: 13px; color: var(--gray-400); max-width: 360px; margin: 0 auto; line-height: 1.5; }

    /* Site Glossary Overlay */
    .glossary-panel {
      background: #fff;
      border-radius: 12px;
      max-width: 740px;
      width: 92vw;
      max-height: 85vh;
      overflow-y: auto;
      box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    }
    .glossary-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 24px 14px;
      border-bottom: 1px solid #e5e7eb;
    }
    .glossary-header h3 {
      margin: 0;
      font-size: 15px;
      font-weight: 700;
      color: #1b3a5c;
      letter-spacing: 0.3px;
    }
    .glossary-close {
      width: 28px; height: 28px;
      border: none; background: #f3f4f6;
      border-radius: 6px; font-size: 18px;
      color: #6B7280; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.15s;
    }
    .glossary-close:hover { background: #e5e7eb; color: #374151; }
    .glossary-body {
      padding: 20px 24px 24px;
    }
    .glossary-section-label {
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: #9ca3af;
      margin-bottom: 10px;
    }
    .glossary-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0 24px;
      margin: 0;
    }
    .glossary-item {
      padding: 8px 0;
      border-bottom: 1px solid #f3f4f6;
    }
    .glossary-item dt {
      font-size: 12.5px;
      font-weight: 600;
      color: #1b3a5c;
      margin-bottom: 2px;
    }
    .glossary-item dd {
      font-size: 12px;
      color: #6B7280;
      margin: 0;
      line-height: 1.5;
    }
    .glossary-assumptions {
      list-style: none;
      padding: 0;
      margin: 0;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px 24px;
    }
    .glossary-assumptions li {
      font-size: 12px;
      color: #6B7280;
      padding: 4px 0;
      padding-left: 12px;
      position: relative;
    }
    .glossary-assumptions li::before {
      content: '\2022';
      position: absolute;
      left: 0;
      color: #9ca3af;
    }
    .glossary-assumptions li strong {
      color: #374151;
      font-weight: 600;
    }

    /* Pinned glossary panel inside parcel body layout */
    .glossary-pinned-panel {
      width: 340px;
      flex-shrink: 1;
      min-width: 260px;
      background: #fff;
      border: 1px solid var(--gray-200);
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.08);
      display: flex;
      flex-direction: column;
      max-height: min(600px, 70vh);
      align-self: flex-start;
      position: sticky;
      top: 0;
      overflow: hidden;
      animation: glossarySlideIn 0.2s ease;
    }
    @keyframes glossarySlideIn {
      from { transform: translateX(100%); opacity: 0; }
      to { transform: translateX(0); opacity: 1; }
    }
    .glossary-pinned-panel .glossary-header {
      flex-shrink: 0;
      background: #fff;
      z-index: 2;
      border-bottom: 1px solid #e5e7eb;
    }
    .glossary-pinned-panel .glossary-close {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 3;
    }
    .glossary-pinned-panel .glossary-body {
      flex: 1;
      overflow-y: auto;
      min-height: 0;
    }
    .glossary-pinned-panel .glossary-grid {
      grid-template-columns: 1fr;
    }
    .glossary-pinned-panel .glossary-assumptions {
      grid-template-columns: 1fr;
    }

    .analysis-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }

    .analysis-card {
      background: white;
      padding: 12px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--gray-200);
      overflow: visible;
    }

    .analysis-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 4px;
      gap: 4px;
      min-height: 0;
      overflow: visible;
    }

    .analysis-card-label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--gray-500);
      line-height: 1.3;
      word-break: break-word;
    }

    .analysis-card-hint {
      font-size: 11px;
      color: var(--gray-400);
      cursor: help;
    }

    .analysis-card-value {
      font-size: 18px;
      font-weight: 700;
      color: var(--gray-800);
      line-height: 1.2;
    }

    .analysis-card-value.positive { color: #10B981; }
    .analysis-card-value.negative { color: #EF4444; }
    .analysis-card-value.warning { color: #F59E0B; }

    .analysis-card-subtext {
      font-size: 12px;
      color: var(--gray-500);
      margin-top: 3px;
    }

    .analysis-card.full-width {
      grid-column: 1 / -1;
    }

    /* timeline CSS removed — entitlement timeline now only on Entitle tab */

    .infra-badge {
      font-size: 11.5px;
      padding: 4px 10px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      gap: 4px;
      letter-spacing: 0.15px;
      white-space: nowrap;
    }

    .infra-badge.positive { background: rgba(5, 150, 105, 0.9); color: white; font-weight: 600; }
    .infra-badge.negative { background: rgba(220, 38, 38, 0.9); color: white; font-weight: 600; }
    .infra-badge.neutral { background: #6B7280; color: #fff; font-weight: 700; border: none; }

    /* Incentives Section */
    .incentives-section h3 {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .incentive-zones-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 12px;
    }

    .zone-badge {
      font-size: 11px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .zone-badge.zone-opportunity_zone {
      background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
      color: white;
    }

    .zone-badge.zone-enterprise_zone {
      background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%);
      color: white;
    }

    .zone-badge.zone-none {
      background: var(--gray-100);
      color: var(--gray-500);
    }

    .incentive-summary {
      font-size: 13px;
      color: var(--gray-600);
      margin-bottom: 12px;
      padding: 8px 12px;
      background: rgba(16, 185, 129, 0.1);
      border-radius: var(--radius-sm);
      border-left: 3px solid #10B981;
    }

    .incentive-summary .incentive-count {
      font-weight: 700;
      font-size: 16px;
      color: #10B981;
    }

    .incentive-summary .zone-bonus {
      font-size: 11px;
      color: var(--gray-500);
      margin-left: 4px;
    }

    .incentive-summary.no-incentives {
      background: rgba(107, 114, 128, 0.1);
      border-left-color: var(--gray-400);
      color: var(--gray-500);
    }

    .incentive-programs-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .incentive-program-card {
      background: white;
      border: 1px solid var(--gray-100);
      border-radius: var(--radius-sm);
      padding: 12px 14px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }

    .program-header {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 4px;
    }

    .program-level {
      font-size: 12px;
    }

    .program-name {
      font-size: 12px;
      font-weight: 600;
      color: var(--gray-700);
    }

    .program-value {
      font-size: 11px;
      color: var(--gray-600);
      margin-bottom: 4px;
    }

    .program-zone-req {
      display: inline-block;
      font-size: 10px;
      color: var(--gray-500);
      background: var(--gray-100);
      padding: 2px 6px;
      border-radius: 3px;
      margin-right: 8px;
    }

    .program-link {
      font-size: 11px;
      color: var(--primary);
      text-decoration: none;
    }

    .program-link:hover {
      text-decoration: underline;
    }

    .more-programs {
      font-size: 11px;
      color: var(--gray-500);
      text-align: center;
      padding: 8px;
    }

    /* Resource Cards (Resources tab) */
    .resources-links {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .resource-card {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 10px 12px;
      background: white;
      border: 1px solid var(--gray-100);
      border-radius: var(--radius-sm);
      text-decoration: none;
      color: inherit;
      transition: border-color 0.15s, box-shadow 0.15s;
      cursor: pointer;
    }
    .resource-card:hover {
      border-color: var(--primary);
      box-shadow: 0 1px 4px rgba(27, 58, 92, 0.08);
    }
    .resource-card-icon {
      flex-shrink: 0;
      width: 18px;
      height: 18px;
      color: var(--primary);
      margin-top: 1px;
    }
    .resource-card-content {
      flex: 1;
      min-width: 0;
    }
    .resource-card-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-800);
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .resource-card-desc {
      font-size: 11.5px;
      color: var(--gray-500);
      line-height: 1.4;
      margin-top: 2px;
    }

    /* District Intent Tag */
    .district-intent-tag {
      display: inline-block;
      margin-left: 6px;
      padding: 1px 7px;
      font-size: 10.5px;
      font-weight: 500;
      color: var(--gray-500);
      background: var(--gray-50);
      border: 1px solid var(--gray-200);
      border-radius: 3px;
      vertical-align: middle;
      letter-spacing: 0.2px;
    }

    /* Strategy Cards (Incentives & Tax tab) */
    .strategy-card {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px 14px;
      background: white;
      border-radius: var(--radius-sm);
      border-left: 3px solid #10B981;
      margin-bottom: 8px;
    }
    .strategy-card.info { border-left-color: #3B82F6; }
    .strategy-card.highlight { border-left-color: #F59E0B; }
    .strategy-card.caution { border-left-color: #EF4444; }
    .strategy-card-icon {
      flex-shrink: 0;
      width: 20px;
      height: 20px;
    }
    .strategy-card-icon svg {
      width: 20px;
      height: 20px;
      stroke: #10B981;
      stroke-width: 1.75;
      fill: none;
    }
    .strategy-card.info .strategy-card-icon svg { stroke: #3B82F6; }
    .strategy-card.highlight .strategy-card-icon svg { stroke: #F59E0B; }
    .strategy-card.caution .strategy-card-icon svg { stroke: #EF4444; }
    .strategy-card-content { flex: 1; min-width: 0; }
    .strategy-card-title {
      font-weight: 600;
      color: var(--gray-800);
      font-size: 13px;
      margin-bottom: 2px;
    }
    .strategy-card-body {
      font-size: 12.5px;
      color: var(--gray-600);
      line-height: 1.5;
    }
    .zone-explanation {
      font-size: 12px;
      color: var(--gray-600);
      line-height: 1.5;
      padding: 8px 12px;
      background: rgba(59, 130, 246, 0.05);
      border-radius: var(--radius-sm);
      margin-top: 8px;
    }
    .gain-summary {
      font-size: 11.5px;
      color: var(--gray-500);
      margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid var(--gray-100);
      font-style: italic;
    }
    .zone-badge.zone-rise_zone {
      background: linear-gradient(135deg, #8B5CF6, #7C3AED);
      color: white;
    }

    /* Loading & Error States */
    .loading-state, .error-state {
      grid-column: 1 / -1;
      text-align: center;
      padding: 60px 20px;
    }

    .loading-state { color: var(--gray-500); }
    .error-state { color: var(--danger); }

    .spinner {
      width: 32px;
      height: 32px;
      border: 3px solid var(--gray-200);
      border-top-color: var(--primary);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 0 auto 12px;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Confirm Dialog */
    .confirm-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.5);
      backdrop-filter: blur(4px);
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .confirm-box {
      background: white;
      border-radius: var(--radius-md);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
      padding: 28px 32px 24px;
      max-width: 380px;
      width: 90%;
      text-align: center;
    }

    .confirm-box p {
      font-size: 15px;
      font-weight: 500;
      color: var(--gray-700);
      line-height: 1.5;
      margin-bottom: 24px;
    }

    .confirm-actions {
      display: flex;
      gap: 10px;
      justify-content: center;
    }

    .confirm-actions .btn {
      min-width: 100px;
    }

    /* Comparison Modal */
    #compareModal .modal-header h2::before,
    #mapExportModal .modal-header h2::before {
      display: none;
    }

    #mapExportModal .modal-header {
      background: linear-gradient(135deg, #122640 0%, #1f4268 60%, #1a3756 100%);
      border-bottom: none;
    }

    #mapExportModal .modal-header h2 {
      color: white;
    }

    #mapExportModal .modal-header .btn.btn-secondary {
      background: rgba(255,255,255,0.1);
      border-color: rgba(255,255,255,0.2);
      color: rgba(255,255,255,0.85);
    }

    #mapExportModal .modal-header .btn.btn-secondary:hover {
      background: rgba(255,255,255,0.18);
    }

    #mapExportModal .modal-header .modal-close {
      color: rgba(255,255,255,0.6);
      border-color: rgba(255,255,255,0.15);
    }

    #mapExportModal .modal-header .modal-close:hover {
      color: white;
      background: rgba(255,255,255,0.12);
    }

    #mapExportModal .modal-header .expand-btn {
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.15);
      color: rgba(255,255,255,0.7);
    }

    #mapExportModal .modal-header .expand-btn:hover {
      background: rgba(255,255,255,0.18);
      color: white;
    }

    #mapExportModal .modal-body {
      background: var(--gray-50);
      padding: 16px 24px 16px;
      overflow-y: auto;
    }

    #compareModal .modal-body {
      flex-direction: row;
      overflow-y: auto;
      overflow-x: hidden;
    }

    /* Report Builder Layout */
    .report-builder-sidebar {
      width: 260px;
      min-width: 260px;
      background: white;
      border-right: 1px solid var(--gray-200);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .rb-sidebar-panel {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 0;
    }

    .rb-sidebar-header {
      padding: 16px 18px 12px;
      border-bottom: 1px solid var(--gray-100);
    }

    .rb-sidebar-header h4 {
      font-size: 13px;
      font-weight: 700;
      color: #1b3a5c;
      margin: 0 0 2px;
    }

    .rb-section-count {
      font-size: 11px;
      color: var(--gray-400);
    }

    .rb-section-list {
      flex: 1;
      overflow-y: auto;
      padding: 6px 10px;
    }

    .rb-section-toggle {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 8px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .rb-section-toggle:hover {
      background: var(--gray-50);
    }

    .rb-section-toggle input[type="checkbox"] {
      margin-top: 2px;
      accent-color: #1b3a5c;
      flex-shrink: 0;
    }

    .rb-section-info {
      min-width: 0;
    }

    .rb-section-name {
      font-size: 12.5px;
      font-weight: 500;
      color: var(--gray-700);
      display: block;
    }

    .rb-section-desc {
      font-size: 10.5px;
      color: var(--gray-400);
      display: block;
      margin-top: 1px;
    }

    .rb-sidebar-footer {
      padding: 14px 18px;
      border-top: 1px solid var(--gray-100);
    }

    .rb-generate-btn {
      width: 100%;
      padding: 10px 16px;
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      background: linear-gradient(135deg, #122640, #1f4268);
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s;
    }

    .rb-generate-btn:hover {
      background: linear-gradient(135deg, #1a3756, #2a5580);
    }

    .rb-generate-status {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 12px;
      color: var(--gray-500);
      padding: 10px 0;
    }

    .rb-spinner {
      width: 16px;
      height: 16px;
      border: 2px solid var(--gray-200);
      border-top-color: #1b3a5c;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    .report-builder-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 0;
    }

    .rb-tabs {
      display: flex;
      gap: 0;
      border-bottom: 1px solid var(--gray-200);
      background: white;
      padding: 0 16px;
      flex-shrink: 0;
    }

    .rb-tab {
      padding: 10px 20px;
      font-size: 13px;
      font-weight: 500;
      font-family: inherit;
      color: var(--gray-400);
      background: none;
      border: none;
      border-bottom: 2px solid transparent;
      cursor: pointer;
      transition: all 0.15s;
    }

    .rb-tab:hover {
      color: var(--gray-600);
    }

    .rb-tab.active {
      color: #1b3a5c;
      border-bottom-color: #1b3a5c;
      font-weight: 600;
    }

    .rb-tab-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: var(--gray-50);
      min-height: 0;
    }

    .rb-tab-panel {
      display: none;
      padding: 16px 20px;
      flex: 1;
      min-height: 0;
    }

    .rb-tab-panel.active {
      display: flex;
      flex-direction: column;
    }

    #rbPanelParcels.active {
      overflow-y: auto;
    }

    #inlineMapPreviewWrap {
      display: flex;
      gap: 0;
      flex: 1;
      min-height: 0;
      min-width: 0;
      overflow: hidden;
    }

    #inlineMapPreviewWrap .export-preview-main {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
    }

    #inlineMapPreviewWrap .preview-container {
      flex: 1;
      min-height: 350px;
    }

    #inlineMapPreviewWrap .live-preview-map {
      height: 100%;
    }

    /* Map options now rendered in left sidebar, not inline */

    @media (max-width: 900px) {
      #compareModal .modal-body {
        flex-direction: column !important;
      }
      .report-builder-sidebar {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        max-height: 180px;
      }
      #inlineMapPreviewWrap {
        flex-direction: column;
      }
    }

    .comparison-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 420px));
      gap: 20px;
    }

    .comparison-grid-single {
      grid-template-columns: 1fr;
      max-width: 560px;
    }

    .comparison-parcel {
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-md);
      background: white;
      position: relative;
      overflow: hidden;
      transition: transform 0.2s, box-shadow 0.2s;
      cursor: grab;
      max-width: 420px;
    }

    .comparison-parcel:hover {
      box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    }

    .comparison-parcel-header {
      background: linear-gradient(135deg, #122640 0%, #1f4268 60%, #1a3756 100%);
      padding: 14px 18px 12px;
      position: relative;
    }

    .comparison-parcel-header h4 {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
      color: white;
    }

    .comparison-parcel-header .comp-address {
      font-size: 12px;
      color: rgba(255,255,255,0.65);
      margin-top: 3px;
    }

    .comparison-parcel-header .comp-score-badge {
      position: absolute;
      top: 12px;
      right: 42px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .comp-score-circle {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 700;
      color: white;
    }

    .comp-score-circle.prime { background: linear-gradient(135deg, #059669, #10B981); }
    .comp-score-circle.strong { background: linear-gradient(135deg, #2563EB, #3B82F6); }
    .comp-score-circle.moderate { background: linear-gradient(135deg, #D97706, #F59E0B); }
    .comp-score-circle.weak { background: linear-gradient(135deg, #6B7280, #9CA3AF); }
    .comp-score-circle.excluded, .comp-score-circle.restricted { background: linear-gradient(135deg, #DC2626, #991B1B); }

    .comp-tier-label {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: rgba(255,255,255,0.7);
    }

    .comparison-parcel h4 {
      display: none; /* Hidden — replaced by header h4 */
    }

    .remove-parcel {
      position: absolute;
      top: 12px;
      right: 12px;
      background: rgba(255,255,255,0.15);
      color: rgba(255,255,255,0.7);
      border: none;
      border-radius: 50%;
      width: 24px;
      height: 24px;
      cursor: pointer;
      font-size: 14px;
      line-height: 1;
      transition: all 0.15s;
      z-index: 2;
    }

    .remove-parcel:hover { background: rgba(220,38,38,0.8); color: white; }

    .comparison-parcel-body {
      padding: 16px 18px 18px;
    }

    .comparison-section {
      margin-bottom: 16px;
    }

    .comparison-section:last-child {
      margin-bottom: 0;
    }

    .comparison-section-title {
      font-weight: 600;
      font-size: 10px;
      color: #1b3a5c;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-bottom: 8px;
      padding-bottom: 6px;
      border-bottom: 2px solid #f0f2f5;
    }

    .comparison-item {
      font-size: 13px;
      margin-bottom: 6px;
      display: flex;
      justify-content: space-between;
      align-items: baseline;
    }

    .comparison-item-label {
      font-weight: 500;
      color: var(--gray-500);
      font-size: 12px;
      flex-shrink: 0;
    }

    .comparison-item-value {
      font-weight: 600;
      color: var(--gray-800);
      text-align: right;
    }

    .comp-zoning-chip {
      display: inline-block;
      font-size: 11px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 4px;
      background: var(--gray-100);
      color: var(--gray-700);
    }

    /* Comparison Summary */
    .comparison-summary {
      background: linear-gradient(135deg, #122640 0%, #1f4268 60%, #1a3756 100%);
      color: white;
      padding: 18px 24px;
      border-radius: var(--radius-md);
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 32px;
    }

    .summary-stat {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .summary-stat-value {
      font-size: 20px;
      font-weight: 700;
    }

    .summary-stat-label {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: rgba(255,255,255,0.5);
    }

    .summary-breakdown {
      display: flex;
      gap: 8px;
      margin-left: auto;
      flex-wrap: wrap;
    }

    .summary-chip {
      font-size: 11px;
      font-weight: 600;
      padding: 4px 12px;
      border-radius: 20px;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.1);
    }

    /* Value Highlighting */
    .value-best {
      color: #059669;
      font-weight: 700;
    }

    .value-worst {
      color: #DC2626;
      font-weight: 700;
    }

    .value-indicator {
      font-size: 9px;
      margin-left: 3px;
    }

    /* Drag and Drop */
    .comparison-parcel:active {
      cursor: grabbing;
    }

    .comparison-parcel.dragging {
      opacity: 0.5;
      transform: scale(0.98);
    }

    .comparison-parcel.drag-over {
      border-color: #3B82F6;
      box-shadow: 0 0 0 2px #3B82F6;
    }

    .drag-handle {
      position: absolute;
      top: 14px;
      left: 12px;
      color: rgba(255,255,255,0.35);
      font-size: 14px;
      cursor: grab;
      z-index: 2;
    }

    .drag-handle:hover {
      color: rgba(255,255,255,0.7);
    }

    .drag-handle:active {
      cursor: grabbing;
    }

    /* Star/Favorite System */
    .star-button {
      background: var(--gray-100);
      border: 1px solid var(--gray-300);
      font-size: 22px;
      cursor: pointer;
      padding: 6px 10px;
      border-radius: var(--radius-md);
      transition: all 0.15s;
      line-height: 1;
    }

    .star-button:hover {
      transform: scale(1.1);
      background: var(--gray-200);
    }

    .star-button.starred {
      color: #F59E0B;
      background: #FEF3C7;
      border-color: #F59E0B;
    }

    .star-button:not(.starred) {
      color: var(--gray-500);
    }

    /* Note button & input */
    .note-button {
      background: var(--gray-100);
      border: 1px solid var(--gray-300);
      cursor: pointer;
      padding: 10px 10px;
      border-radius: var(--radius-md);
      transition: all 0.15s;
      line-height: 1;
      color: var(--gray-500);
      display: flex;
      align-items: center;
    }
    .note-button:hover {
      transform: scale(1.1);
      background: var(--gray-200);
    }
    .note-button.has-note {
      color: #1b3a5c;
      background: #e0e7ff;
      border-color: #818cf8;
    }
    .note-input-wrap {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .note-input {
      width: 220px;
      padding: 6px 10px;
      border: 1px solid var(--gray-300);
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-family: inherit;
      color: var(--gray-800);
      transition: border-color 0.15s;
    }
    .note-input:focus {
      outline: none;
      border-color: #1b3a5c;
      box-shadow: 0 0 0 2px rgba(27,58,92,0.1);
    }
    .note-save-btn {
      padding: 6px 12px;
      background: #1b3a5c;
      color: white;
      border: none;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.15s;
      white-space: nowrap;
    }
    .note-save-btn:hover {
      background: #2a5580;
    }

    .favorites-section {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--gray-200);
    }

    .favorites-list {
      max-height: 150px;
      overflow-y: auto;
      margin-top: 8px;
    }

    .favorite-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 8px;
      margin: 0 -8px;
      border-radius: var(--radius-sm);
      font-size: 13px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .favorite-item:hover {
      background: var(--gray-100);
    }

    .favorite-item-remove {
      margin-left: auto;
      color: var(--gray-400);
      font-size: 16px;
      cursor: pointer;
    }

    .favorite-item-remove:hover {
      color: var(--danger);
    }

    /* Score Weights (Settings modal) */
    .weight-slider-group {
      margin-bottom: 12px;
    }

    .weight-slider-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 4px;
    }

    .weight-slider-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-700);
    }

    .weight-slider-value {
      font-size: 12px;
      font-weight: 600;
      color: #1b3a5c;
      min-width: 36px;
      text-align: right;
    }

    .weight-slider {
      width: 100%;
      height: 6px;
      -webkit-appearance: none;
      appearance: none;
      background: var(--gray-200);
      border-radius: 3px;
      outline: none;
    }

    .weight-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #1b3a5c;
      cursor: pointer;
      transition: transform 0.15s;
    }

    .weight-slider::-webkit-slider-thumb:hover {
      transform: scale(1.2);
    }

    .weight-slider::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #1b3a5c;
      cursor: pointer;
      border: none;
    }

    .weights-total {
      font-size: 12px;
      color: var(--gray-500);
      text-align: center;
      padding: 8px;
      background: var(--gray-50);
      border-radius: var(--radius-sm);
      margin-top: 8px;
    }

    .weights-total.invalid {
      color: var(--danger);
      background: rgba(239, 68, 68, 0.1);
    }

    .weights-reset {
      font-size: 12px;
      color: #3B82F6;
      cursor: pointer;
      text-align: center;
      margin-top: 8px;
    }

    .weights-reset:hover {
      text-decoration: underline;
    }

    .weight-dynamic-hint {
      transition: color 0.2s;
    }

    .scoring-toggle-group {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .scoring-toggle-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
    }

    .scoring-toggle-info {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .scoring-toggle-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-700);
    }

    .scoring-toggle-hint {
      font-size: 11px;
      color: var(--gray-400);
      line-height: 1.4;
      transition: color 0.2s;
    }

    /* Comparison Annotations */
    .comparison-annotation {
      margin-bottom: 0;
    }

    .annotation-label {
      width: 100%;
      padding: 6px 0;
      border: none;
      border-bottom: 1px dashed rgba(255,255,255,0.25);
      border-radius: 0;
      font-size: 12px;
      font-family: inherit;
      font-weight: 500;
      color: rgba(255,255,255,0.8);
      background: transparent;
      transition: all 0.2s;
    }

    .annotation-label:focus {
      outline: none;
      border-bottom-color: rgba(255,255,255,0.6);
      color: white;
    }

    .annotation-label::placeholder {
      font-weight: 400;
      color: rgba(255,255,255,0.35);
    }

    .annotation-notes {
      width: 100%;
      min-height: 60px;
      padding: 10px 12px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-family: inherit;
      line-height: 1.5;
      resize: vertical;
      background: var(--gray-50);
      transition: all 0.2s;
    }

    .annotation-notes:focus {
      outline: none;
      border-color: #1b3a5c;
      background: white;
    }

    .annotation-notes::placeholder {
      color: var(--gray-400);
    }

    /* Export Buttons */
    .export-buttons {
      display: flex;
      gap: 8px;
      margin-right: auto;
    }

    .btn-export {
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 600;
      font-family: inherit;
      background: var(--gray-100);
      color: var(--gray-700);
      border: none;
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .btn-export:hover {
      background: var(--gray-200);
    }

    /* Comparison Map Markers */
    .comparison-marker-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      cursor: pointer;
    }

    .comparison-marker {
      width: 24px;
      height: 24px;
      background: #1b3a5c;
      border: 2px solid white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: 700;
      font-size: 11px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
      cursor: pointer;
      transition: transform 0.15s;
    }

    .comparison-marker:hover {
      transform: scale(1.15);
    }

    .comparison-marker-label {
      margin-top: 4px;
      padding: 2px 8px;
      background: rgba(0,0,0,0.75);
      color: white;
      font-size: 11px;
      font-weight: 600;
      border-radius: 4px;
      white-space: nowrap;
      max-width: 120px;
      overflow: hidden;
      text-overflow: ellipsis;
      box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    }

    .comparison-marker-label.hover-label {
      opacity: 0;
      transition: opacity 0.15s;
      pointer-events: none;
    }

    .comparison-marker-container:hover .comparison-marker-label.hover-label {
      opacity: 1;
    }

    /* Distance Matrix */
    .distance-matrix {
      background: var(--gray-50);
      border-radius: var(--radius-md);
      padding: 16px;
      margin-bottom: 20px;
      overflow-x: auto;
    }

    .distance-matrix h4 {
      margin: 0 0 12px 0;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--gray-500);
    }

    .distance-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .distance-table th,
    .distance-table td {
      padding: 8px;
      text-align: center;
      border: 1px solid var(--gray-200);
    }

    .distance-table th {
      background: var(--gray-100);
      font-weight: 600;
      color: var(--gray-600);
    }

    .distance-table td {
      background: white;
    }

    .distance-table td.diagonal {
      background: var(--gray-100);
      color: var(--gray-400);
    }

    .distance-close {
      color: #10B981;
      font-weight: 600;
    }

    .distance-far {
      color: #EF4444;
    }

    /* Score Bars */
    .score-bars-section {
      background: white;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-md);
      padding: 18px 20px;
      margin-bottom: 20px;
    }

    .score-bars-section h4 {
      margin: 0 0 14px 0;
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: #1b3a5c;
    }

    .score-bars-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 20px;
    }

    .score-bars-column h5 {
      margin: 0 0 10px 0;
      font-size: 11px;
      font-weight: 700;
      color: var(--gray-700);
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .score-bar-item {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }

    .score-bar-label {
      font-size: 11px;
      color: var(--gray-500);
      width: 60px;
      flex-shrink: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .score-bar-track {
      flex: 1;
      height: 6px;
      background: var(--gray-100);
      border-radius: 3px;
      overflow: hidden;
    }

    .score-bar-fill {
      height: 100%;
      border-radius: 3px;
      transition: width 0.4s ease;
    }

    .score-bar-fill.physical { background: linear-gradient(90deg, #7C3AED, #8B5CF6); }
    .score-bar-fill.power { background: linear-gradient(90deg, #D97706, #F59E0B); }
    .score-bar-fill.zoning { background: linear-gradient(90deg, #059669, #10B981); }
    .score-bar-fill.economic { background: linear-gradient(90deg, #2563EB, #3B82F6); }

    .score-bar-value {
      font-size: 11px;
      font-weight: 700;
      color: var(--gray-700);
      width: 28px;
      text-align: right;
    }

    /* Print Styles */
    @media print {
      body * {
        visibility: hidden;
      }
      #compareModal, #compareModal * {
        visibility: visible;
      }
      #compareModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
      }
      .modal-overlay {
        position: static;
        background: none;
        padding: 0;
      }
      .modal-content {
        box-shadow: none;
        max-width: 100%;
        max-height: none;
      }
      .modal-close, .modal-actions {
        display: none !important;
      }
      .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      .comparison-parcel {
        break-inside: avoid;
        page-break-inside: avoid;
        max-width: none;
      }
      .remove-parcel, .drag-handle {
        display: none;
      }
      .comparison-parcel-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
      }
    }

    /* Responsive */
    @media (max-width: 900px) {
      .parcel-hero-bar {
        grid-template-columns: 1fr;
        gap: 10px 0;
        padding: 14px 18px 12px;
      }
      .hero-address {
        font-size: 16px;
      }
      .hero-center {
        flex-direction: row;
        gap: 10px;
      }
      .hero-meta {
        gap: 6px;
      }
      .hero-right {
        justify-content: flex-start;
      }
      .hero-badges {
        justify-content: flex-start;
        max-width: none;
      }
      .parcel-body-layout {
        flex-direction: column;
        overflow: visible;
      }
      .modal-body {
        overflow-y: auto;
      }
      .analysis-sidebar {
        flex-direction: row;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding-right: 0;
        padding-bottom: 8px;
        margin-bottom: 12px;
        overflow-x: auto;
        flex-shrink: 0;
      }
      .analysis-tab {
        padding: 8px 12px;
        font-size: 13px;
      }
      .analysis-content-area {
        padding-left: 0;
        overflow-y: visible;
      }
      .overview-grid {
        grid-template-columns: 1fr;
      }
      .entitlement-layout {
        grid-template-columns: 1fr;
      }
      .site-layout {
        grid-template-columns: 1fr;
      }
      .site-kpi-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
      }
      .site-kpi {
        padding: 10px 10px 8px;
      }
      .site-kpi-value {
        font-size: 16px;
      }
      .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
      .risk-tab-layout {
        grid-template-columns: 1fr;
      }
      .assembly-layout {
        grid-template-columns: 1fr;
      }
      .power-dc-grid {
        grid-template-columns: 1fr 1fr;
      }
      .power-infra-grid {
        grid-template-columns: 1fr;
      }
      .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      .score-breakdown {
        grid-template-columns: repeat(2, 1fr);
      }
    }
    @media (max-width: 768px) {
      .project-type-grid { grid-template-columns: 1fr; }
      .icon-toolbar { left: 8px; }
      .floating-panel { left: 60px; width: 220px; }
    }

    /* Map Export Preview Modal */
    #mapExportModal .modal-content {
      width: 95%;
      max-width: 1200px;
      transition: all 0.3s ease;
    }

    #mapExportModal .modal-content.expanded {
      max-width: 98%;
      width: 98%;
      height: 95vh;
      max-height: 95vh;
    }

    #mapExportModal .modal-content.expanded .modal-body {
      height: calc(100% - 60px);
    }

    #mapExportModal .modal-content.expanded .export-preview-layout {
      height: 100%;
    }

    #mapExportModal .modal-content.expanded .export-preview-main {
      height: 100%;
    }

    #mapExportModal .modal-content.expanded .preview-container {
      height: 100%;
    }

    #mapExportModal .modal-content.expanded .live-preview-map {
      height: calc(100% - 30px);
    }

    .modal-header-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .expand-btn {
      background: white;
      border: 1px solid var(--gray-200);
      width: 34px;
      height: 34px;
      border-radius: var(--radius-sm);
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
      color: var(--gray-500);
    }

    .expand-btn:hover {
      background: var(--gray-50);
      border-color: var(--gray-300);
      color: #1b3a5c;
    }

    .export-preview-layout {
      display: flex;
      gap: 24px;
    }

    .export-preview-main {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
    }

    .export-preview-sidebar {
      width: 280px;
      flex-shrink: 0;
      max-height: 70vh;
      overflow-y: auto;
      padding-bottom: 8px;
    }

    .preview-container {
      background: var(--gray-800);
      border-radius: var(--radius-md);
      min-height: 450px;
      position: relative;
      overflow: hidden;
    }

    .live-preview-map {
      width: 100%;
      height: 450px;
      border-radius: var(--radius-md);
    }

    .preview-instructions {
      text-align: center;
      font-size: 12px;
      color: var(--gray-500);
      margin-top: 8px;
    }

    .preview-status {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      color: var(--gray-400);
      padding: 20px;
      background: rgba(0,0,0,0.5);
      border-radius: var(--radius-md);
    }

    .preview-status.loading::after {
      content: '';
      display: block;
      width: 32px;
      height: 32px;
      margin: 16px auto 0;
      border: 3px solid var(--gray-600);
      border-top-color: #1b3a5c;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Custom Tags Overlay */
    .custom-tags-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      pointer-events: none;
      z-index: 10;
    }

    .custom-tag-marker {
      position: absolute;
      background: rgba(255, 255, 255, 0.95);
      border: 2px solid #1b3a5c;
      border-radius: var(--radius-sm);
      padding: 4px 10px;
      font-size: 12px;
      font-weight: 600;
      color: #1b3a5c;
      cursor: move;
      pointer-events: auto;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
      white-space: nowrap;
      user-select: none;
      transform: translate(-50%, -50%);
    }

    .custom-tag-marker:hover {
      border-color: #122640;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .custom-tag-marker .tag-delete {
      position: absolute;
      top: -8px;
      right: -8px;
      width: 18px;
      height: 18px;
      background: var(--danger);
      color: white;
      border: none;
      border-radius: 50%;
      font-size: 12px;
      line-height: 1;
      cursor: pointer;
      display: none;
      align-items: center;
      justify-content: center;
    }

    .custom-tag-marker:hover .tag-delete {
      display: flex;
    }

    /* Custom Tags Input */
    .custom-tags-input {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }

    .custom-tags-input input {
      flex: 1;
      padding: 8px 10px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      font-size: 13px;
      font-family: inherit;
    }

    .custom-tags-input input:focus {
      outline: none;
      border-color: #1b3a5c;
    }

    .btn-add-tag {
      background: #1b3a5c;
      color: white;
      border: none;
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      white-space: nowrap;
    }

    .btn-add-tag:hover {
      background: #122640;
    }

    .custom-tags-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .custom-tags-hint {
      font-size: 11px;
      color: var(--gray-400);
      font-style: italic;
    }

    .custom-tag-chip {
      display: flex;
      align-items: center;
      gap: 6px;
      background: var(--gray-100);
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      padding: 4px 8px;
      font-size: 12px;
      cursor: grab;
    }

    .custom-tag-chip:active {
      cursor: grabbing;
    }

    .custom-tag-chip .chip-remove {
      background: none;
      border: none;
      color: var(--gray-400);
      cursor: pointer;
      font-size: 14px;
      line-height: 1;
      padding: 0;
    }

    .custom-tag-chip .chip-remove:hover {
      color: var(--danger);
    }

    .custom-tag-chip.on-map {
      background: var(--success);
      color: white;
      border-color: var(--success);
    }

    .custom-tag-chip.on-map .chip-remove {
      color: rgba(255,255,255,0.7);
    }

    .custom-tag-chip.on-map .chip-remove:hover {
      color: white;
    }

    /* Drawing Toolbar */
    .drawing-toolbar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      background: linear-gradient(135deg, #f8fafc, #f1f5f9);
      border-radius: var(--radius-md) var(--radius-md) 0 0;
      border-bottom: 1px solid var(--gray-200);
      flex-wrap: wrap;
    }

    .toolbar-group {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .toolbar-divider {
      width: 1px;
      height: 24px;
      background: var(--gray-300);
      margin: 0 4px;
    }

    .tool-btn {
      width: 34px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: white;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s;
      font-family: inherit;
    }

    .tool-btn:hover {
      background: var(--gray-50);
      border-color: var(--gray-300);
      box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

    .tool-btn.active {
      background: linear-gradient(135deg, #122640, #1b3a5c);
      border-color: #1b3a5c;
      color: white;
      box-shadow: 0 1px 3px rgba(27, 58, 92, 0.3);
    }

    .tool-btn .tool-icon {
      font-size: 14px;
      line-height: 1;
    }

    .color-picker {
      width: 34px;
      height: 34px;
      padding: 3px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      cursor: pointer;
      background: white;
      transition: all 0.15s;
    }
    .color-picker:hover {
      border-color: var(--gray-300);
      box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

    .color-picker::-webkit-color-swatch-wrapper {
      padding: 2px;
    }

    .color-picker::-webkit-color-swatch {
      border-radius: 2px;
      border: none;
    }

    .stroke-select {
      display: none;
    }

    /* Text tool selects — shown when text tool is active */
    #textFontStyle, #textSizeSelect {
      height: 32px;
      padding: 0 8px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-family: inherit;
      color: var(--gray-700);
      background: white;
      cursor: pointer;
      transition: all 0.15s;
    }
    #textFontStyle:hover, #textSizeSelect:hover {
      border-color: var(--gray-300);
      background: var(--gray-50);
    }
    #textFontStyle:focus, #textSizeSelect:focus {
      outline: none;
      border-color: #1b3a5c;
    }

    .stroke-btn-group {
      display: flex;
      align-items: center;
      gap: 3px;
    }

    .stroke-btn {
      width: 34px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: white;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s;
      padding: 0;
    }

    .stroke-btn:hover {
      background: var(--gray-50);
      border-color: var(--gray-300);
      box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

    .stroke-btn.active {
      background: linear-gradient(135deg, #122640, #1b3a5c);
      border-color: #1b3a5c;
      box-shadow: 0 1px 3px rgba(27, 58, 92, 0.3);
    }

    .stroke-btn .stroke-line {
      display: block;
      border-radius: 1px;
      background: var(--gray-600);
    }

    .stroke-btn.active .stroke-line {
      background: white;
    }

    /* Drawing Canvas */
    .drawing-canvas {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 5;
    }

    .drawing-canvas.active {
      pointer-events: auto;
      cursor: crosshair;
    }

    .btn-fit-parcels {
      background: white;
      border: 1px solid var(--gray-300);
      color: #1b3a5c;
      padding: 10px 16px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.2s;
      width: 100%;
      margin-bottom: 8px;
    }

    .btn-fit-parcels:hover {
      background: var(--gray-50);
      border-color: var(--gray-400);
    }

    .export-options-section {
      background: white;
      border-radius: var(--radius-md);
      padding: 10px 14px;
      margin-bottom: 8px;
    }

    .export-options-section h4 {
      margin: 0 0 8px 0;
      font-size: 13px;
      font-weight: 700;
      color: #1b3a5c;
      letter-spacing: 0.01em;
    }

    .export-option-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 0;
      border-bottom: 1px solid var(--gray-100);
    }

    .export-option-row:last-child {
      border-bottom: none;
    }

    .export-option-label {
      font-size: 12.5px;
      color: var(--gray-600);
      font-family: inherit;
    }

    .export-toggle {
      position: relative;
      width: 44px;
      height: 24px;
      background: var(--gray-300);
      border-radius: 12px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .export-toggle.active {
      background: #1b3a5c;
    }

    .export-toggle::after {
      content: '';
      position: absolute;
      width: 20px;
      height: 20px;
      background: white;
      border-radius: 50%;
      top: 2px;
      left: 2px;
      transition: transform 0.2s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

    .export-toggle.active::after {
      transform: translateX(20px);
    }

    .export-slider-group {
      padding: 8px 0;
    }

    .export-slider-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 6px;
    }

    .export-slider {
      width: 100%;
      height: 6px;
      border-radius: 3px;
      background: var(--gray-200);
      outline: none;
      -webkit-appearance: none;
    }

    .export-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #1b3a5c;
      cursor: pointer;
    }

    .parcel-labels-section {
      max-height: 200px;
      overflow-y: auto;
    }

    .parcel-label-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 0;
      border-bottom: 1px solid var(--gray-100);
    }

    .parcel-label-row:last-child {
      border-bottom: none;
    }

    .parcel-label-number {
      width: 24px;
      height: 24px;
      background: var(--primary);
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 600;
      flex-shrink: 0;
    }

    .parcel-label-input {
      flex: 1;
      padding: 6px 8px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      font-size: 12px;
    }

    .parcel-label-input:focus {
      outline: none;
      border-color: var(--primary);
    }

    .export-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .btn-regenerate {
      background: white;
      border: 1px solid var(--gray-300);
      color: var(--gray-700);
      padding: 10px 16px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-regenerate:hover {
      background: var(--gray-50);
      border-color: var(--gray-400);
    }

    .export-actions {
      padding-top: 4px;
    }

    .btn-export-map {
      background: white;
      border: 1px solid var(--gray-300);
      color: #1b3a5c;
      padding: 10px 16px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      width: 100%;
      margin-bottom: 8px;
    }
    .btn-export-map:hover {
      background: var(--gray-50);
      border-color: var(--gray-400);
    }

    .btn-export-pdf {
      background: linear-gradient(135deg, #122640 0%, #1f4268 100%);
      border: none;
      color: white;
      padding: 12px 16px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.2s;
      width: 100%;
    }

    .btn-export-pdf:hover {
      background: linear-gradient(135deg, #1a3756 0%, #2a5580 100%);
    }

    .btn-export-pdf:disabled {
      background: var(--gray-300);
      cursor: not-allowed;
    }

    @media (max-width: 900px) {
      .export-preview-layout {
        flex-direction: column;
      }
      .export-preview-sidebar {
        width: 100%;
      }
    }

    /* My Projects header button */
    .header-projects-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: var(--radius-sm);
      color: rgba(255,255,255,0.85);
      font-size: 13px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
    }
    .header-projects-btn:hover {
      background: rgba(255,255,255,0.14);
      border-color: rgba(255,255,255,0.25);
      color: white;
    }
    .header-projects-btn.active {
      background: rgba(255,255,255,0.18);
      border-color: rgba(255,255,255,0.3);
      color: white;
    }
    .header-projects-btn svg { stroke: currentColor; flex-shrink: 0; }
    .projects-badge {
      background: linear-gradient(135deg, #10B981, #059669);
      color: white;
      font-size: 10px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 10px;
      min-width: 16px;
      text-align: center;
      line-height: 1.4;
    }

    /* Feed Panel */
    .feed-panel {
      position: absolute;
      top: 56px;
      right: 0;
      width: 420px;
      height: calc(100vh - 56px);
      background: white;
      border-left: 1px solid var(--gray-200);
      box-shadow: -4px 0 24px rgba(0,0,0,0.1);
      z-index: 10;
      display: flex;
      flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .feed-panel.open {
      transform: translateX(0);
    }
    .feed-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--gray-200);
      background: linear-gradient(135deg, #f8fafc, #f1f5f9);
      flex-shrink: 0;
    }
    .feed-panel-header h3 {
      font-size: 15px;
      font-weight: 700;
      color: #1b3a5c;
      margin: 0;
    }
    .feed-filters {
      padding: 10px 16px;
      border-bottom: 1px solid var(--gray-100);
      flex-shrink: 0;
    }
    .feed-filter-row {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .feed-filter-row + .feed-filter-row {
      margin-top: 8px;
    }
    .feed-pills {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
    }
    .feed-pill {
      padding: 4px 10px;
      border-radius: 12px;
      border: 1px solid var(--gray-200);
      background: white;
      color: var(--gray-600);
      font-size: 11.5px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
    }
    .feed-pill:hover {
      border-color: var(--gray-300);
      background: var(--gray-50);
    }
    .feed-pill.active {
      background: #1b3a5c;
      border-color: #1b3a5c;
      color: white;
    }
    .feed-state-select {
      padding: 5px 10px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-family: inherit;
      color: var(--gray-700);
      background: white;
      cursor: pointer;
      width: 100%;
    }
    .feed-panel-body {
      flex: 1;
      overflow-y: auto;
      padding: 0;
    }
    .feed-loading {
      text-align: center;
      padding: 40px 20px;
      color: var(--gray-400);
      font-size: 13px;
    }
    .feed-empty {
      text-align: center;
      padding: 40px 20px;
      color: var(--gray-400);
    }
    .feed-empty p { margin: 0; font-size: 13px; }
    .feed-empty-hint { font-size: 11.5px; color: var(--gray-400); margin-top: 4px !important; }
    .feed-list {
      display: flex;
      flex-direction: column;
    }
    .feed-item {
      display: flex;
      gap: 12px;
      padding: 12px 16px;
      border-bottom: 1px solid var(--gray-100);
      text-decoration: none;
      color: inherit;
      transition: background 0.15s;
    }
    .feed-item:hover {
      background: var(--gray-50);
    }
    .feed-item-thumb {
      width: 72px;
      height: 54px;
      border-radius: var(--radius-sm);
      background-size: cover;
      background-position: center;
      background-color: var(--gray-100);
      flex-shrink: 0;
    }
    .feed-item-content {
      flex: 1;
      min-width: 0;
    }
    .feed-item-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-800);
      line-height: 1.35;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .feed-item-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 3px;
      font-size: 11px;
      color: var(--gray-400);
    }
    .feed-item-source {
      font-weight: 600;
      color: var(--gray-500);
    }
    .feed-item-desc {
      font-size: 11.5px;
      color: var(--gray-500);
      line-height: 1.4;
      margin-top: 4px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* My Projects Panel */
    .projects-panel {
      position: absolute;
      top: 56px;
      right: 0;
      width: 380px;
      height: calc(100vh - 56px);
      background: white;
      border-left: 1px solid var(--gray-200);
      box-shadow: -4px 0 24px rgba(0,0,0,0.1);
      z-index: 10;
      display: flex;
      flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .projects-panel.open {
      transform: translateX(0);
    }

    .projects-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--gray-200);
      background: linear-gradient(135deg, #f8fafc, #f1f5f9);
      flex-shrink: 0;
    }
    .projects-panel-header h3 {
      font-size: 15px;
      font-weight: 700;
      color: #1b3a5c;
      margin: 0;
    }
    .projects-panel-close {
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
      border-radius: 4px;
      color: var(--gray-400);
      transition: all 0.15s;
    }
    .projects-panel-close:hover {
      background: var(--gray-100);
      color: var(--gray-600);
    }

    .projects-panel-body {
      flex: 1;
      overflow-y: auto;
      padding: 8px 0;
    }

    /* Projects sections */
    .projects-section {
      border-bottom: 1px solid var(--gray-100);
    }
    .projects-section:last-child {
      border-bottom: none;
    }

    .projects-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 20px;
      cursor: pointer;
      transition: background 0.15s;
    }
    .projects-section-header:hover {
      background: var(--gray-50);
    }
    .projects-section-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 600;
      color: #1b3a5c;
    }
    .projects-section-title svg {
      stroke: #1b3a5c;
      flex-shrink: 0;
    }
    .projects-section-count {
      font-size: 11px;
      font-weight: 600;
      color: var(--gray-400);
      background: var(--gray-100);
      padding: 2px 8px;
      border-radius: 10px;
      min-width: 20px;
      text-align: center;
    }

    .projects-section-content {
      padding: 0 20px 12px;
      display: none;
    }
    .projects-section.expanded .projects-section-content {
      display: block;
    }

    .projects-empty {
      text-align: center;
      padding: 16px 8px;
    }
    .projects-empty p {
      font-size: 13px;
      color: var(--gray-500);
      margin: 0;
      font-weight: 500;
    }
    .projects-empty-hint {
      font-size: 12px !important;
      color: var(--gray-400) !important;
      font-weight: 400 !important;
      margin-top: 4px !important;
      line-height: 1.4;
    }

    .projects-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    /* Project item cards */
    .projects-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 12px;
      background: var(--gray-50);
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s;
    }
    .projects-item:hover {
      background: white;
      border-color: #1b3a5c;
      box-shadow: 0 1px 4px rgba(27,58,92,0.08);
    }
    .projects-item-icon {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 14px;
    }
    .projects-item-icon.star { background: rgba(234,179,8,0.12); color: #CA8A04; }
    .projects-item-icon.search { background: rgba(59,130,246,0.1); color: #2563EB; }
    .projects-item-icon.export { background: rgba(16,185,129,0.1); color: #059669; }
    .projects-item-icon.compare { background: rgba(139,92,246,0.1); color: #7C3AED; }
    .projects-item-icon.note { background: rgba(236,72,153,0.1); color: #DB2777; }

    .projects-item-body {
      flex: 1;
      min-width: 0;
    }
    .projects-item-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-800);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .projects-item-meta {
      font-size: 11px;
      color: var(--gray-400);
      margin-top: 2px;
      line-height: 1.3;
    }
    .projects-item-actions {
      display: flex;
      gap: 4px;
      flex-shrink: 0;
      opacity: 0;
      transition: opacity 0.15s;
    }
    .projects-item:hover .projects-item-actions {
      opacity: 1;
    }
    .projects-item-action {
      background: none;
      border: none;
      cursor: pointer;
      padding: 2px;
      border-radius: 3px;
      color: var(--gray-400);
      transition: all 0.15s;
    }
    .projects-item-action:hover {
      background: var(--gray-200);
      color: var(--gray-600);
    }
    .projects-item-action.danger:hover {
      background: #FEE2E2;
      color: #DC2626;
    }

    /* User Menu System */
    .header-spacer {
      flex: 1;
    }

    .user-menu-container {
      position: relative;
    }

    .user-menu-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      border-radius: var(--radius-sm);
      background: transparent;
      color: rgba(255,255,255,0.85);
      font-weight: 500;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.2s;
      border: 1px solid transparent;
    }

    .user-menu-btn:hover {
      background: rgba(255,255,255,0.1);
      border-color: rgba(255,255,255,0.15);
    }

    .user-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 12px;
    }

    .user-menu-name {
      max-width: 120px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .user-menu-chevron {
      display: flex;
      align-items: center;
      color: rgba(255,255,255,0.4);
      transition: transform 0.2s;
    }

    .user-menu-container.open .user-menu-chevron {
      transform: rotate(180deg);
    }

    .user-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      min-width: 220px;
      background: white;
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-lg);
      border: 1px solid var(--gray-200);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: all 0.2s;
      z-index: 100;
    }

    .user-menu-container.open .user-dropdown {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .dropdown-header {
      padding: 16px;
      border-bottom: 1px solid var(--gray-200);
    }

    .dropdown-header-name {
      font-weight: 600;
      color: var(--gray-800);
      font-size: 14px;
    }

    .dropdown-header-email {
      color: var(--gray-500);
      font-size: 12px;
      margin-top: 2px;
    }

    .dropdown-header-plan {
      display: inline-block;
      margin-top: 8px;
      padding: 3px 8px;
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      border-radius: 4px;
    }

    .plan-free {
      background: var(--gray-100);
      color: var(--gray-600);
    }

    .plan-pro {
      background: #FEF3C7;
      color: #92400E;
    }

    .plan-enterprise {
      background: #EDE9FE;
      color: #5B21B6;
    }

    .dropdown-menu {
      padding: 8px 0;
    }

    .dropdown-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 16px;
      color: var(--gray-700);
      font-size: 14px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .dropdown-item:hover {
      background: var(--gray-50);
    }

    .dropdown-item-icon {
      width: 18px;
      height: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .dropdown-item-icon svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }

    .dropdown-divider {
      height: 1px;
      background: var(--gray-200);
      margin: 8px 0;
    }

    .dropdown-item-danger {
      color: var(--danger);
    }

    .dropdown-item-danger:hover {
      background: #FEF2F2;
    }

    /* Account/Settings Modal Styles */
    .settings-modal .modal-content {
      width: 500px;
    }
    .settings-modal .modal-body {
      overflow-y: auto;
    }

    /* Settings Modal — navy header to match platform theme */
    .settings-modal-content {
      width: 520px;
      max-width: 95vw;
      border-radius: var(--radius-lg);
      overflow: hidden;
    }
    .settings-modal-header {
      background: linear-gradient(135deg, #122640 0%, #1f4268 60%, #1a3756 100%);
      padding: 24px 28px;
      position: relative;
    }
    .settings-modal-header h2 {
      font-size: 18px;
      font-weight: 700;
      color: white;
      margin: 0 0 4px;
      letter-spacing: -0.01em;
    }
    .settings-modal-header h2::before { display: none; }
    .settings-modal-header p {
      font-size: 13.5px;
      color: rgba(255,255,255,0.55);
      margin: 0;
    }
    .settings-save-btn {
      background: linear-gradient(135deg, #122640, #1b3a5c) !important;
    }
    .settings-save-btn:hover {
      box-shadow: 0 2px 8px rgba(27,58,92,0.3);
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-700);
      margin-bottom: 6px;
    }

    .form-input {
      width: 100%;
      padding: 10px 14px;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-md);
      font-size: 14px;
      font-family: inherit;
      transition: all 0.2s;
    }

    .form-input:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    .form-input:disabled {
      background: var(--gray-50);
      color: var(--gray-500);
      cursor: not-allowed;
    }

    .form-hint {
      font-size: 12px;
      color: var(--gray-500);
      margin-top: 4px;
    }

    .form-section {
      margin-bottom: 24px;
      padding-bottom: 24px;
      border-bottom: 1px solid var(--gray-200);
    }

    .form-section:last-child {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: none;
    }

    .form-section-title {
      font-size: 13px;
      font-weight: 700;
      color: #1b3a5c;
      margin-bottom: 14px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .btn-save {
      background: #1b3a5c;
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: var(--radius-md);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-save:hover {
      background: #122640;
      box-shadow: 0 2px 8px rgba(27,58,92,0.2);
    }

    .btn-cancel {
      background: white;
      color: var(--gray-700);
      border: 1px solid var(--gray-300);
      padding: 10px 20px;
      border-radius: var(--radius-md);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-cancel:hover {
      background: var(--gray-50);
    }

    .modal-actions {
      display: flex;
      gap: 12px;
      justify-content: flex-end;
      margin-top: 24px;
      padding-top: 16px;
      border-top: 1px solid var(--gray-200);
    }

    /* Plan Modal */
    .settings-modal .plan-modal-content {
      width: 820px;
      max-width: 95vw;
      border-radius: var(--radius-lg);
      overflow: hidden;
    }
    .plan-modal-header {
      background: linear-gradient(135deg, #122640 0%, #1f4268 60%, #1a3756 100%);
      padding: 28px 32px;
      position: relative;
    }
    .plan-modal-header h2 {
      font-size: 20px;
      font-weight: 700;
      color: white;
      margin: 0 0 6px;
      letter-spacing: -0.01em;
    }
    .plan-modal-header h2::before { display: none; }
    .plan-modal-header p {
      font-size: 14.5px;
      color: rgba(255,255,255,0.6);
      margin: 0;
    }

    /* Billing Toggle */
    .billing-toggle-wrapper {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin-bottom: 20px;
    }
    .billing-toggle-label {
      font-size: 13px;
      font-weight: 500;
      color: var(--gray-400);
      cursor: pointer;
      transition: color 0.2s;
      user-select: none;
    }
    .billing-toggle-label.active {
      color: #1b3a5c;
      font-weight: 600;
    }
    .billing-toggle {
      width: 44px;
      height: 24px;
      background: var(--gray-200);
      border-radius: 12px;
      cursor: pointer;
      position: relative;
      transition: background 0.2s;
    }
    .billing-toggle.annual {
      background: #1b3a5c;
    }
    .billing-toggle-knob {
      width: 18px;
      height: 18px;
      background: white;
      border-radius: 50%;
      position: absolute;
      top: 3px;
      left: 3px;
      transition: transform 0.2s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }
    .billing-toggle.annual .billing-toggle-knob {
      transform: translateX(20px);
    }
    .billing-toggle-save {
      font-size: 11px;
      font-weight: 600;
      color: #10B981;
      opacity: 0.5;
      transition: opacity 0.2s;
    }

    .plan-card-billed {
      font-size: 11px;
      color: var(--gray-400);
      font-weight: 400;
      margin-top: 2px;
    }

    /* Plan Selection */
    .plan-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
      align-items: stretch;
    }

    .plan-card {
      border: 1px solid var(--gray-200);
      border-radius: 12px;
      padding: 24px 20px 20px;
      text-align: center;
      transition: all 0.2s;
      cursor: pointer;
      background: var(--gray-50);
      position: relative;
      display: flex;
      flex-direction: column;
    }

    .plan-card:hover {
      border-color: var(--gray-300);
      box-shadow: 0 4px 12px rgba(0,0,0,0.06);
      background: white;
    }

    .plan-card.active {
      border-color: #1b3a5c;
      background: white;
      box-shadow: 0 0 0 1px #1b3a5c, 0 4px 12px rgba(27,58,92,0.1);
    }

    .plan-card.recommended {
      border-color: var(--gray-200);
      background: white;
      box-shadow: 0 4px 16px rgba(27,58,92,0.06);
    }
    .plan-card.recommended.active {
      border-color: #1b3a5c;
      box-shadow: 0 0 0 1px #1b3a5c, 0 4px 12px rgba(27,58,92,0.1);
    }

    .plan-card-badge {
      position: absolute;
      top: -10px;
      left: 50%;
      transform: translateX(-50%);
      background: linear-gradient(135deg, #122640, #1b3a5c);
      color: white;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 3px 14px;
      border-radius: 100px;
      white-space: nowrap;
    }

    .plan-card-name {
      font-size: 13px;
      font-weight: 800;
      color: var(--gray-500);
      text-transform: uppercase;
      letter-spacing: 1.2px;
      margin-bottom: 8px;
    }

    .plan-card-price {
      font-size: 32px;
      font-weight: 700;
      color: #1b3a5c;
      line-height: 1.1;
    }

    .plan-card-price span {
      font-size: 13px;
      font-weight: 400;
      color: var(--gray-400);
    }

    .plan-card-desc {
      font-size: 12px;
      color: var(--gray-500);
      margin-top: 6px;
      margin-bottom: 0;
    }

    .plan-card-features {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--gray-100);
      text-align: left;
      font-size: 12.5px;
      color: var(--gray-600);
      list-style: none;
      padding-left: 0;
      flex: 1;
    }

    .plan-card-features li {
      margin-bottom: 8px;
      display: flex;
      align-items: flex-start;
      gap: 8px;
      line-height: 1.35;
    }

    .plan-card-features li::before {
      content: "✓";
      color: #10B981;
      font-weight: 700;
      font-size: 12px;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .plan-card-cta {
      margin-top: auto;
      padding-top: 16px;
    }

    .plan-card-btn {
      width: 100%;
      padding: 10px 16px;
      border-radius: var(--radius-sm);
      font-size: 13px;
      font-weight: 600;
      text-align: center;
      transition: all 0.15s;
    }

    .plan-btn-primary {
      background: linear-gradient(135deg, #122640, #1b3a5c);
      color: white;
    }
    .plan-btn-primary:hover {
      box-shadow: 0 2px 8px rgba(27,58,92,0.3);
    }

    .plan-btn-secondary {
      background: white;
      color: var(--gray-600);
      border: 1px solid var(--gray-200);
    }
    .plan-btn-secondary:hover {
      border-color: var(--gray-300);
      background: var(--gray-50);
    }

    /* Notification Bell */
    .header-notification-btn {
      position: relative; background: none; border: none; color: rgba(255,255,255,0.6);
      cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm);
      transition: all 0.15s; display: flex; align-items: center;
    }
    .header-notification-btn:hover { color: white; background: rgba(255,255,255,0.08); }
    .notification-count {
      position: absolute; top: 0; right: 2px; min-width: 16px; height: 16px;
      border-radius: 8px; background: linear-gradient(135deg, #10B981, #059669); color: white;
      font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
      padding: 0 4px; pointer-events: none; line-height: 1.4;
    }

    /* Notification Panel */
    .notification-panel {
      position: fixed; top: 52px; right: 160px;
      width: 380px; max-height: 70vh;
      background: white; border-radius: var(--radius-lg);
      box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
      z-index: 2000; display: none; overflow: hidden;
    }
    .notification-panel.open { display: flex; flex-direction: column; }

    .notification-panel-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
    }
    .notification-panel-header h3 {
      font-size: 14px; font-weight: 700; color: var(--gray-800); margin: 0;
    }
    .notification-panel-header h3::before { display: none; }
    .notification-panel-body {
      overflow-y: auto; padding: 8px; flex: 1;
    }

    .notification-item {
      padding: 10px 12px; border-radius: 8px; margin-bottom: 2px;
      cursor: default; transition: background 0.1s;
      border-left: 3px solid transparent;
    }
    .notification-item:hover { background: var(--gray-50); }
    .notification-item.alert { border-left-color: #EF4444; }
    .notification-item.watch { border-left-color: #D97706; }

    .notification-item-title {
      font-size: 13.5px; font-weight: 600; color: var(--gray-800); line-height: 1.4;
    }
    .notification-item-meta {
      display: flex; align-items: center; gap: 2px;
      font-size: 12px; color: var(--gray-500); margin-top: 3px;
    }
    .notification-item-insight {
      font-size: 12px; color: var(--gray-600); margin-top: 4px; line-height: 1.45;
    }

    /* plan-card-current removed — button text is now dynamic */

    /* ============================== */
    /* Activity Tab (Temporal Intel)  */
    /* ============================== */

    .activity-tab-badge {
      display: inline-flex; align-items: center; justify-content: center;
      min-width: 18px; height: 18px; border-radius: 9px;
      font-size: 10px; font-weight: 700; color: white;
      padding: 0 5px; margin-left: 6px;
    }
    .activity-tab-badge.has-alert { background: #EF4444; }
    .activity-tab-badge.has-watch { background: #D97706; }

    .activity-summary-bar {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 0; margin-bottom: 14px;
      border-bottom: 1px solid var(--gray-100);
    }
    .activity-summary-chip {
      font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 12px;
    }
    .activity-summary-chip.alert { background: rgba(239,68,68,0.1); color: #EF4444; }
    .activity-summary-chip.watch { background: rgba(217,119,6,0.1); color: #D97706; }
    .activity-summary-chip.info { background: rgba(100,116,139,0.08); color: #64748B; }

    .activity-timeline {
      position: relative; padding-left: 22px;
    }
    .activity-timeline::before {
      content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
      width: 2px; background: var(--gray-100);
    }

    .activity-event {
      position: relative; padding: 0 0 20px 16px;
    }
    .activity-event:last-child { padding-bottom: 0; }

    .activity-event-dot {
      position: absolute; left: -22px; top: 4px;
      width: 12px; height: 12px; border-radius: 50%;
      border: 2px solid white; box-shadow: 0 0 0 1px var(--gray-200);
    }
    .activity-event.alert .activity-event-dot {
      box-shadow: 0 0 0 2px rgba(239,68,68,0.25), 0 0 0 1px #EF4444;
    }
    .activity-event.watch .activity-event-dot {
      box-shadow: 0 0 0 2px rgba(217,119,6,0.2), 0 0 0 1px #D97706;
    }

    .activity-event-body {
      min-width: 0;
      padding: 10px 14px;
      border-radius: 6px;
      border: 1px solid var(--gray-100);
      background: var(--gray-50);
    }
    .activity-event.alert .activity-event-body {
      background: rgba(239,68,68,0.05);
      border-color: rgba(239,68,68,0.18);
    }
    .activity-event.watch .activity-event-body {
      background: rgba(217,119,6,0.04);
      border-color: rgba(217,119,6,0.15);
    }

    .activity-event-header {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 3px; flex-wrap: wrap;
    }
    .activity-event-date { font-size: 12px; color: var(--gray-500); }
    .activity-event-type { font-size: 12px; font-weight: 600; text-transform: capitalize; }

    .activity-severity {
      font-size: 9.5px; font-weight: 700; padding: 1px 6px;
      border-radius: 3px; letter-spacing: 0.5px;
    }
    .activity-severity.alert { background: rgba(239,68,68,0.12); color: #EF4444; }
    .activity-severity.watch { background: rgba(217,119,6,0.12); color: #D97706; }
    .activity-severity.info { background: rgba(100,116,139,0.08); color: #64748B; }

    .activity-seen-count {
      font-size: 11px; color: var(--gray-500); background: var(--gray-50);
      padding: 1px 5px; border-radius: 3px; border: 1px solid var(--gray-100);
    }

    .activity-event-title {
      font-weight: 600; font-size: 13.5px; color: var(--gray-800);
      line-height: 1.4;
    }
    .activity-event-summary {
      font-size: 12.5px; color: var(--gray-600); line-height: 1.5;
      margin-top: 4px;
    }
    .activity-event-meta {
      font-size: 12px; color: var(--gray-500); margin-top: 6px;
    }
    .activity-source-link {
      font-size: 12px; color: #4338CA; text-decoration: none;
      margin-top: 4px; display: inline-block;
    }
    .activity-source-link:hover { text-decoration: underline; color: #3730A3; }

    .activity-link-indicator {
      font-size: 11px; margin-top: 6px; padding: 2px 8px;
      border-radius: 3px; display: inline-block;
    }
    .activity-link-indicator.direct {
      background: rgba(16,185,129,0.08); color: #10B981;
      border: 1px solid rgba(16,185,129,0.15);
    }

    /* Insight Card (synthesis) */
    .activity-insight-card {
      background: rgba(27,58,92,0.03);
      border: 1px solid rgba(27,58,92,0.1);
      border-radius: 8px; padding: 10px 12px; margin-top: 8px;
    }
    .insight-headline {
      font-weight: 600; font-size: 13px; color: var(--gray-800);
      margin-bottom: 4px; line-height: 1.4;
    }
    .insight-body {
      font-size: 12.5px; color: var(--gray-600); line-height: 1.55;
    }
    .insight-action {
      font-size: 12px; color: #1b3a5c; margin-top: 6px; font-weight: 500;
      padding-left: 18px; position: relative;
    }
    .insight-action::before {
      content: '\2192'; position: absolute; left: 0; font-size: 13px;
    }
    .insight-stat {
      font-size: 11px; color: var(--gray-500); margin-top: 4px;
    }

    /* Settings Toggle */
    .toggle-group {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 0;
    }

    .toggle-label {
      font-size: 14px;
      color: var(--gray-700);
    }

    .toggle-switch {
      position: relative;
      width: 44px;
      height: 24px;
    }

    .toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .toggle-slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--gray-300);
      border-radius: 24px;
      transition: 0.3s;
    }

    .toggle-slider::before {
      position: absolute;
      content: "";
      height: 18px;
      width: 18px;
      left: 3px;
      bottom: 3px;
      background: white;
      border-radius: 50%;
      transition: 0.3s;
    }

    .toggle-switch input:checked + .toggle-slider {
      background: #1b3a5c;
    }

    .toggle-switch input:checked + .toggle-slider::before {
      transform: translateX(20px);
    }

    /* Toast Notifications */
    .toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 1000;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .toast {
      padding: 12px 20px;
      border-radius: var(--radius-md);
      background: var(--gray-800);
      color: white;
      font-size: 14px;
      font-weight: 500;
      box-shadow: var(--shadow-lg);
      animation: toastIn 0.3s ease;
    }

    .toast.success {
      background: var(--success);
    }

    .toast.error {
      background: var(--danger);
    }

    @keyframes toastIn {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Analysis Modal Styles */
    .analysis-modal .modal-content {
      width: 700px;
    }

    .analysis-section {
      margin-bottom: 20px;
      background: white;
      border-radius: var(--radius-md);
      padding: 18px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    }

    .analysis-section-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--gray-100);
    }

    .analysis-section-icon {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
    }

    .analysis-section-icon.power {
      background: #FEF3C7;
    }

    .analysis-section-icon.risk {
      background: #FEE2E2;
    }

    .analysis-section-icon.env {
      background: #DCFCE7;
    }

    .analysis-section-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--gray-800);
      letter-spacing: -0.01em;
    }

    .analysis-section-subtitle {
      font-size: 12px;
      color: var(--gray-400);
      margin-top: 1px;
    }

    .analysis-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }

    .analysis-card {
      background: var(--gray-50);
      border-radius: 8px;
      padding: 14px;
      border: 1px solid var(--gray-100);
    }

    .analysis-card-label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--gray-400);
      margin-bottom: 6px;
    }

    .analysis-card-value {
      font-size: 18px;
      font-weight: 700;
      color: var(--gray-800);
    }

    .analysis-card-value.small {
      font-size: 14px;
      font-weight: 500;
    }

    .analysis-card-detail {
      font-size: 13px;
      color: var(--gray-600);
      margin-top: 4px;
    }

    .complexity-badge {
      display: inline-block;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
    }

    .complexity-badge.low {
      background: #DCFCE7;
      color: #166534;
    }

    .complexity-badge.medium {
      background: #FEF3C7;
      color: #92400E;
    }

    .complexity-badge.high {
      background: #FED7AA;
      color: #C2410C;
    }

    .complexity-badge.very_high {
      background: #FEE2E2;
      color: #991B1B;
    }

    .nearby-list {
      margin-top: 12px;
    }

    .nearby-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid var(--gray-100);
    }

    .nearby-item:last-child {
      border-bottom: none;
    }

    .nearby-item-name {
      font-weight: 500;
      color: var(--gray-800);
    }

    .nearby-item-detail {
      font-size: 12px;
      color: var(--gray-500);
    }

    .nearby-item-distance {
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-600);
    }

    .voltage-tag {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 600;
      margin-right: 6px;
    }

    .voltage-tag.v345 { background: #FEE2E2; color: #991B1B; }
    .voltage-tag.v230 { background: #FEF3C7; color: #92400E; }
    .voltage-tag.v115 { background: #DBEAFE; color: #1E40AF; }
    .voltage-tag.vlow { background: var(--gray-100); color: var(--gray-600); }

    /* Power tab — structured cards */
    .power-dc-summary {
      background: linear-gradient(135deg, #122640, #1f4268) !important;
      border-top: none !important;
      color: white;
    }
    .power-dc-summary h3 {
      color: rgba(255,255,255,0.7) !important;
      border-bottom-color: rgba(255,255,255,0.1) !important;
    }
    .power-dc-grid {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr 1fr;
      gap: 16px;
    }
    .power-dc-stat {
      text-align: center;
    }
    .power-dc-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: rgba(255,255,255,0.5);
      margin-bottom: 6px;
    }
    .power-dc-value {
      font-size: 15px;
      font-weight: 600;
      color: white;
    }
    .power-dc-summary .complexity-badge {
      font-size: 12px;
    }

    .power-complexity-row {
      margin-bottom: 0;
    }
    .power-complexity-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 2px;
    }
    .power-cost-estimate {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      background: var(--gray-50);
      border-left: 3px solid #1b3a5c;
      border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
      margin-top: 10px;
      font-size: 12.5px;
    }
    .power-cost-label {
      font-weight: 500;
      color: var(--gray-500);
      white-space: nowrap;
    }
    .power-cost-value {
      font-weight: 700;
      color: #1b3a5c;
    }
    .power-cost-note {
      color: var(--gray-500);
      font-style: italic;
    }

    .power-infra-grid {
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .power-infra-card {
      padding: 12px 0;
      border-bottom: 1px solid var(--gray-100);
    }
    .power-infra-card:last-child { border-bottom: none; padding-bottom: 0; }
    .power-infra-card:first-child { padding-top: 0; }
    .power-infra-top {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      margin-bottom: 2px;
    }
    .power-infra-left {
      display: flex;
      align-items: baseline;
      gap: 8px;
      min-width: 0;
    }
    .power-infra-type {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--gray-400);
      font-weight: 600;
      flex-shrink: 0;
    }
    .power-infra-name {
      font-size: 12.5px;
      color: var(--gray-500);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .power-infra-dist {
      font-size: 14px;
      font-weight: 700;
      color: #1b3a5c;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .power-infra-detail {
      font-size: 11.5px;
      color: var(--gray-500);
      margin-bottom: 0;
    }

    .power-dist-bar {
      margin-top: 8px;
    }
    .power-dist-segments {
      display: flex;
      gap: 2px;
      align-items: flex-end;
      height: 14px;
    }
    .power-dist-seg {
      flex: 1;
      border-radius: 1px;
      height: 100%;
    }
    .power-dist-scale {
      position: relative;
      display: flex;
      justify-content: space-between;
      font-size: 9.5px;
      color: var(--gray-400);
      margin-top: 3px;
      height: 14px;
    }

    .power-grid-two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
    }
    .power-grid-col {
      padding: 0;
    }
    .power-grid-col:first-child {
      padding-right: 16px;
      border-right: 1px solid var(--gray-100);
    }
    .power-grid-col:last-child {
      padding-left: 16px;
    }
    .power-grid-col-header {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--gray-400);
      margin-bottom: 8px;
    }
    .power-voltage-list {
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .power-voltage-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 5px 0;
      border-bottom: 1px solid var(--gray-50);
      font-size: 12px;
    }
    .power-voltage-row:last-child { border-bottom: none; }
    .power-voltage-info {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }
    .power-voltage-blurb {
      font-size: 11px;
      color: var(--gray-400);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .power-voltage-dist {
      color: var(--gray-600);
      font-weight: 600;
      font-size: 12px;
      min-width: 48px;
      text-align: right;
    }

    .power-subs-list {
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .power-sub-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 5px 0;
      border-bottom: 1px solid var(--gray-50);
      font-size: 12px;
    }
    .power-sub-row:last-child { border-bottom: none; }
    .power-sub-info {
      display: flex;
      align-items: center;
      gap: 5px;
      min-width: 0;
      flex: 1;
    }
    .power-sub-name {
      color: #1b3a5c;
      font-weight: 600;
      font-size: 12px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .power-sub-cap {
      font-size: 10px;
      padding: 1px 5px;
      border-radius: 3px;
      background: #DBEAFE;
      color: #1E40AF;
      font-weight: 600;
      flex-shrink: 0;
    }
    .power-sub-dist {
      color: var(--gray-600);
      font-weight: 600;
      font-size: 12px;
      white-space: nowrap;
      flex-shrink: 0;
      min-width: 48px;
      text-align: right;
    }

    /* Queue congestion */
    .power-queue-section {
      margin-top: 4px;
      position: relative;
    }
    .power-queue-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
      flex-wrap: nowrap;
    }
    .power-queue-header h3 {
      margin: 0 !important;
      padding: 0 !important;
      border: none !important;
      line-height: 1;
      flex-shrink: 0;
    }
    .power-queue-header .congestion-badge {
      flex-shrink: 0;
    }
    .congestion-badge {
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 2px 8px;
      border-radius: 3px;
    }
    .congestion-badge.severe { background: #FEE2E2; color: #991B1B; }
    .congestion-badge.high { background: #FEF3C7; color: #92400E; }
    .congestion-badge.moderate { background: #FEF9C3; color: #854D0E; }
    .congestion-badge.low { background: #DCFCE7; color: #166534; }
    .congestion-badge.none { background: var(--gray-100); color: var(--gray-500); }
    .congestion-badge.no_data { background: var(--gray-100); color: var(--gray-400); font-style: italic; }
    .power-queue-note {
      font-size: 12.5px;
      color: var(--gray-500);
      margin: 0 0 14px 0;
      line-height: 1.5;
    }
    .power-queue-stats {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 10px;
      margin-bottom: 14px;
    }
    .power-queue-stat {
      background: var(--gray-50);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      text-align: center;
    }
    .power-queue-stat-value {
      font-size: 18px;
      font-weight: 700;
      color: #1b3a5c;
    }
    .power-queue-stat-label {
      font-size: 10.5px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--gray-500);
      margin-top: 2px;
    }
    .power-sub-queue {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 3px;
    }
    .power-sub-queue-mw {
      font-size: 11px;
      font-weight: 600;
      padding: 1px 6px;
      border-radius: 3px;
    }
    .power-sub-queue-mw.severe { background: #FEE2E2; color: #991B1B; }
    .power-sub-queue-mw.high { background: #FEF3C7; color: #92400E; }
    .power-sub-queue-mw.moderate { background: #FEF9C3; color: #854D0E; }
    .power-sub-queue-mw.low { background: #DCFCE7; color: #166534; }
    .power-sub-queue-detail {
      font-size: 11px;
      color: var(--gray-400);
    }
    .power-queue-source {
      font-size: 10px;
      color: var(--gray-400);
      text-align: right;
      font-style: italic;
      position: absolute;
      top: 20px;
      right: 18px;
      line-height: 1;
    }

    /* Utility rates */
    .power-rates-header {
      display: flex;
      align-items: baseline;
      gap: 8px;
      margin-bottom: 14px;
    }
    .power-rates-header h3 {
      margin: 0 !important;
      padding: 0 !important;
      border: none !important;
      line-height: 1;
      flex-shrink: 0;
    }
    .power-rates-source {
      margin-left: auto;
      font-size: 10px;
      color: var(--gray-400);
      font-style: italic;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .power-rates-grid {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 10px;
      margin-bottom: 14px;
    }
    .power-rate-card {
      background: var(--gray-50);
      border-radius: var(--radius-sm);
      padding: 12px;
      text-align: center;
    }
    .power-rate-card.highlight {
      background: #EFF6FF;
      border: 1px solid #BFDBFE;
    }
    .power-rate-value {
      font-size: 22px;
      font-weight: 700;
      color: #1b3a5c;
    }
    .power-rate-value .unit {
      font-size: 12px;
      font-weight: 500;
      color: var(--gray-500);
    }
    .power-rate-label {
      font-size: 10.5px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--gray-500);
      margin-top: 2px;
    }
    .power-rate-change {
      font-size: 11px;
      font-weight: 600;
      margin-top: 4px;
    }
    .power-rate-change.up { color: #DC2626; }
    .power-rate-change.down { color: #16A34A; }
    .power-rate-change.flat { color: var(--gray-400); }
    .power-rate-chart {
      display: flex;
      align-items: flex-end;
      gap: 3px;
      height: 48px;
      margin: 12px 0 4px 0;
    }
    .power-rate-bar {
      flex: 1;
      border-radius: 2px 2px 0 0;
      min-width: 0;
      position: relative;
    }
    .power-rate-bar:hover::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 4px);
      left: 50%;
      transform: translateX(-50%);
      background: #1b3a5c;
      color: white;
      font-size: 10px;
      padding: 2px 6px;
      border-radius: 3px;
      white-space: nowrap;
      pointer-events: none;
      z-index: 10;
    }
    .power-rate-chart-labels {
      display: flex;
      justify-content: space-between;
      font-size: 10px;
      color: var(--gray-600);
      font-weight: 500;
    }
    .power-rate-cost-note {
      font-size: 12px;
      color: var(--gray-500);
      margin-top: 10px;
      padding: 8px 10px;
      background: var(--gray-50);
      border-radius: var(--radius-sm);
      line-height: 1.5;
    }
    .power-rate-cost-note strong {
      color: #1b3a5c;
    }

    /* Two-column rates layout */
    .power-rates-columns {
      display: flex;
      gap: 20px;
    }
    .power-rates-col-card {
      flex: 1 1 0;
      min-width: 0;
    }
    .power-rates-col-card .power-rates-header h3 {
      font-size: 13px;
    }
    .power-rates-utility-empty {
      display: flex;
      flex-direction: column;
    }

    /* Tariff table */
    .tariff-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }
    .tariff-table thead th {
      text-align: left;
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--gray-500);
      padding: 4px 8px 6px;
      border-bottom: 1px solid var(--gray-200);
    }
    .tariff-table thead th:nth-child(3),
    .tariff-table thead th:nth-child(4) {
      text-align: right;
    }
    .tariff-table tbody td {
      padding: 6px 8px;
      color: var(--gray-700);
      border-bottom: 1px solid var(--gray-100);
    }
    .tariff-table .tariff-sched {
      font-weight: 600;
      color: #1b3a5c;
      white-space: nowrap;
    }
    .tariff-table .tariff-volt {
      font-size: 11px;
      color: var(--gray-500);
    }
    .tariff-table .tariff-demand,
    .tariff-table .tariff-energy {
      text-align: right;
      font-variant-numeric: tabular-nums;
      font-weight: 500;
    }
    .tariff-row-highlight td {
      background: #EFF6FF;
    }
    .tariff-row-highlight .tariff-sched {
      color: #1e40af;
    }
    .tariff-type-tag {
      display: inline-block;
      font-size: 9px;
      font-weight: 700;
      padding: 1px 4px;
      border-radius: 3px;
      margin-left: 4px;
      background: var(--gray-100);
      color: var(--gray-500);
      vertical-align: middle;
    }
    .tariff-type-tag.ed {
      background: #DBEAFE;
      color: #1e40af;
    }
    .tariff-footer {
      font-size: 10px;
      color: var(--gray-400);
      margin-top: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .tariff-bundled-label {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-weight: 500;
      color: var(--gray-500);
    }
    .tariff-bundled-info {
      position: relative;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      color: var(--gray-400);
    }
    .tariff-bundled-info svg {
      opacity: 0.5;
      transition: opacity 0.15s;
    }
    .tariff-bundled-info:hover svg,
    .tariff-bundled-info:focus svg {
      opacity: 1;
    }
    .tariff-bundled-popout {
      display: none;
      position: absolute;
      bottom: 20px;
      left: -8px;
      background: #0f2338;
      border: 1px solid rgba(99, 179, 237, 0.25);
      border-radius: 8px;
      padding: 10px 12px;
      width: 220px;
      z-index: 100;
      box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    }
    .tariff-bundled-info:hover .tariff-bundled-popout,
    .tariff-bundled-info:focus .tariff-bundled-popout {
      display: block;
    }
    .tariff-bundled-table {
      width: 100%;
      font-size: 11px;
      border-collapse: collapse;
      margin-bottom: 6px;
    }
    .tariff-bundled-table td {
      padding: 3px 0;
      color: var(--gray-300);
    }
    .tariff-bundled-table td:last-child {
      text-align: right;
      font-weight: 500;
      color: var(--gray-200);
    }
    .tariff-bundled-note {
      font-size: 10px;
      color: var(--gray-400);
      line-height: 1.4;
      border-top: 1px solid rgba(255,255,255,0.08);
      padding-top: 6px;
    }
    .tariff-footer-right {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .tariff-hl-note {
      color: var(--gray-400);
      font-style: italic;
    }
    @media (max-width: 768px) {
      .power-rates-columns {
        flex-direction: column;
      }
    }

    /* Risk indicators */
    .risk-indicator {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      background: white;
      border-radius: var(--radius-md);
      margin-bottom: 10px;
      border: 1px solid var(--gray-100);
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }

    .risk-indicator-icon {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
    }

    .risk-indicator-icon.safe {
      background: #DCFCE7;
    }

    .risk-indicator-icon.caution {
      background: #FEF3C7;
    }

    .risk-indicator-icon.warning {
      background: #FEE2E2;
    }

    .risk-indicator-content {
      flex: 1;
    }

    .risk-indicator-label {
      font-weight: 600;
      color: var(--gray-800);
      font-size: 14px;
    }

    .risk-indicator-detail {
      font-size: 13px;
      color: var(--gray-500);
    }

    .risk-indicator-value {
      font-weight: 600;
      font-size: 14px;
    }

    .risk-indicator-value.safe { color: #166534; }
    .risk-indicator-value.caution { color: #92400E; }
    .risk-indicator-value.warning { color: #991B1B; }

    /* Analysis buttons in parcel panel */
    .analysis-buttons {
      display: flex;
      gap: 8px;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--gray-200);
    }

    .btn-analysis {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 10px 12px;
      background: var(--gray-50);
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 500;
      color: var(--gray-700);
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-analysis:hover {
      background: white;
      border-color: var(--primary);
      color: var(--primary);
    }

    .btn-analysis-icon {
      font-size: 16px;
    }

    .analysis-loading {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 40px;
      color: var(--gray-500);
    }

    /* Street View Tab */
    .sv-container {
      display: flex;
      flex-direction: column;
      height: 100%;
      min-height: 480px;
      border-radius: 8px;
      overflow: hidden;
      background: #0a0a0a;
    }
    .sv-panorama {
      flex: 1;
      min-height: 440px;
      background: #111;
    }
    .sv-info-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 14px;
      background: linear-gradient(135deg, #122640, #1a3355);
      color: #cbd5e1;
      font-size: 12px;
    }
    .sv-info-location {
      display: flex;
      align-items: center;
      gap: 6px;
      font-weight: 500;
      color: #e2e8f0;
    }
    .sv-info-coords {
      color: #94a3b8;
      font-size: 11px;
      font-family: 'SF Mono', 'Consolas', monospace;
    }
    .sv-loading {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 80px 20px;
    }
    .sv-no-coverage {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 60px 20px;
      text-align: center;
    }
    .sv-no-coverage-icon {
      margin-bottom: 16px;
      opacity: 0.5;
    }
    .sv-no-coverage-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--gray-600);
      margin-bottom: 6px;
    }
    .sv-no-coverage-text {
      font-size: 13px;
      color: var(--gray-400);
      max-width: 360px;
      line-height: 1.5;
    }
    .sv-no-coverage-coords {
      font-size: 11px;
      color: var(--gray-400);
      font-family: 'SF Mono', 'Consolas', monospace;
      margin-top: 12px;
    }
    .sv-gmaps-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 16px;
      padding: 8px 16px;
      background: linear-gradient(135deg, #122640, #1a3355);
      color: #e2e8f0;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 500;
      text-decoration: none;
      transition: background 0.2s;
    }
    .sv-gmaps-link:hover {
      background: linear-gradient(135deg, #1a3355, #234a72);
    }

    /* Wr1te beta badge in sidebar tab */
    .write-beta-badge {
      font-size: 9px;
      font-weight: 700;
      color: #fff;
      background: #f97316;
      padding: 1px 5px;
      border-radius: 3px;
      letter-spacing: 0.5px;
      margin-left: 4px;
      vertical-align: 1px;
    }

    /* ============================================================
       GR1D WR1TE — Underwriting Module
       ============================================================ */

    .write-modal-overlay {
      position: fixed; inset: 0; z-index: 10000;
      background: rgba(0,0,0,0.6);
      display: flex; align-items: center; justify-content: center;
      backdrop-filter: blur(2px);
    }
    .write-modal {
      width: 95vw; max-width: 1400px; height: 90vh;
      background: var(--gray-50); border-radius: var(--radius-lg);
      display: flex; flex-direction: column;
      overflow: hidden; box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    }

    /* Hero bar */
    .write-hero {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 24px;
      background: linear-gradient(135deg, #122640 0%, #1f4268 60%, #1a3756 100%);
      border-bottom: 1px solid rgba(59,130,246,0.15);
      flex-shrink: 0;
    }
    .write-hero-address { font-size: 14px; font-weight: 600; color: #fff; }
    .write-hero-loc { font-size: 11.5px; color: rgba(255,255,255,0.55); margin-top: 2px; }
    .write-hero-subcat { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 1px; }
    .write-hero-center { text-align: center; }
    .write-hero-title { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 1.5px; }
    .write-hero-deal { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.85); margin-top: 3px; }
    .write-hero-right { display: flex; align-items: center; gap: 8px; }
    .write-modal-close {
      width: 32px; height: 32px; border: 1px solid rgba(255,255,255,0.2);
      border-radius: 6px; background: transparent; color: rgba(255,255,255,0.6);
      font-size: 18px; cursor: pointer; transition: all 0.15s;
    }
    .write-modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

    /* Buttons */
    .write-btn {
      padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 600;
      cursor: pointer; border: none; transition: all 0.15s;
    }
    .write-btn-run {
      background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
    }
    .write-btn-run:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); }
    .write-btn-export {
      background: transparent; color: rgba(255,255,255,0.7);
      border: 1px solid rgba(255,255,255,0.2);
    }
    .write-btn-export:hover { background: rgba(255,255,255,0.08); color: #fff; }

    /* Body layout */
    .write-body { display: flex; flex: 1; overflow: hidden; }
    .write-sidebar {
      width: 180px; flex-shrink: 0; padding: 8px 0;
      border-right: 1px solid var(--gray-200); background: #fff;
      overflow-y: auto;
    }
    .write-sidebar .sidebar-section-label {
      padding: 10px 14px 4px; margin-top: 4px;
    }
    .write-sidebar .sidebar-section-label:first-child { margin-top: 0; padding-top: 8px; }

    .write-tab {
      display: flex; align-items: center; gap: 10px;
      width: 100%; padding: 10px 14px; border: none; background: none;
      font-size: 13px; font-weight: 500; color: var(--gray-500);
      cursor: pointer; text-align: left; transition: all 0.15s;
    }
    .write-tab svg { width: 16px; height: 16px; opacity: 0.55; flex-shrink: 0; }
    .write-tab:hover { background: var(--gray-50); color: var(--gray-700); }
    .write-tab.active { background: var(--gray-100); color: var(--gray-900); font-weight: 600; }
    .write-tab.active svg { opacity: 0.85; }

    .write-content { flex: 1; overflow-y: auto; padding: 20px; }

    /* Sections */
    .write-section {
      background: #fff; border-radius: var(--radius-md); padding: 18px;
      border-top: 3px solid #1b3a5c;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
      margin-bottom: 16px;
    }
    .write-section-title {
      font-size: 11.5px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.8px; color: #1b3a5c;
      border-bottom: 1px solid var(--gray-100); padding-bottom: 10px; margin: 0 0 14px 0;
    }
    .write-section-body { display: contents; }

    /* Form grid — two sections per row */
    .write-form-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    }
    .write-form-grid .write-section-full { grid-column: 1 / -1; }
    .write-section-body {
      display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
    }
    .write-field { display: flex; flex-direction: column; gap: 3px; }
    .write-field-full { grid-column: 1 / -1; }
    .write-label {
      font-size: 11.5px; font-weight: 600; color: var(--gray-500);
    }
    .write-input-wrap { display: flex; align-items: center; gap: 6px; }
    .write-input {
      width: 100%; padding: 6px 10px; border: 1px solid var(--gray-200);
      border-radius: 6px; font-size: 13px; font-weight: 500;
      color: var(--gray-800); background: #fff; transition: border 0.15s;
      font-family: inherit; box-sizing: border-box;
    }
    .write-input:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
    .write-input-sm { width: 70px; flex: none; }
    .write-unit { font-size: 10.5px; color: var(--gray-400); font-weight: 500; white-space: nowrap; }
    .write-select {
      width: 100%; padding: 6px 10px; border: 1px solid var(--gray-200);
      border-radius: 6px; font-size: 13px; font-weight: 500;
      color: var(--gray-800); background: #fff; cursor: pointer;
      font-family: inherit; box-sizing: border-box;
    }
    .write-select:focus { border-color: #2563eb; outline: none; }

    /* Toggle switch */
    .write-toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
    .write-toggle input { opacity: 0; width: 0; height: 0; }
    .write-toggle-slider {
      position: absolute; inset: 0; background: var(--gray-300);
      border-radius: 20px; cursor: pointer; transition: 0.2s;
    }
    .write-toggle-slider::before {
      content: ''; position: absolute; width: 16px; height: 16px;
      left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: 0.2s;
    }
    .write-toggle input:checked + .write-toggle-slider { background: #1b3a5c; }
    .write-toggle input:checked + .write-toggle-slider::before { transform: translateX(16px); }

    /* Promote tiers */
    .write-promote-tiers { display: flex; flex-direction: column; gap: 8px; }
    .write-promote-tier { display: flex; align-items: center; gap: 8px; }
    .write-promote-label { font-size: 12px; font-weight: 600; color: var(--gray-500); width: 50px; }

    /* KPI Grid */
    .write-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
    .write-kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .write-kpi {
      background: #fff; border-radius: var(--radius-md); padding: 16px;
      text-align: center;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      border-left: 3px solid var(--gray-200);
    }
    .write-kpi-positive { border-left-color: #10b981; }
    .write-kpi-neutral { border-left-color: #f59e0b; }
    .write-kpi-negative { border-left-color: #ef4444; }
    .write-kpi-value { font-size: 20px; font-weight: 700; color: var(--gray-900); font-variant-numeric: tabular-nums; }
    .write-kpi-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

    /* Capital stack rows */
    .write-stack-row {
      display: flex; justify-content: space-between; padding: 6px 0;
      font-size: 13px; color: var(--gray-600);
    }
    .write-stack-val { font-weight: 600; color: var(--gray-800); font-variant-numeric: tabular-nums; }
    .write-stack-divider { border-top: 1px solid var(--gray-200); padding-top: 8px; margin-top: 4px; }

    /* Tables */
    .write-table-scroll { overflow-x: auto; }
    .write-table {
      width: 100%; border-collapse: collapse; font-size: 12.5px;
      font-variant-numeric: tabular-nums;
    }
    .write-table th {
      text-align: right; padding: 8px 10px; font-weight: 600;
      color: var(--gray-500); font-size: 11px; text-transform: uppercase;
      letter-spacing: 0.5px; border-bottom: 2px solid var(--gray-200);
      white-space: nowrap;
    }
    .write-table th:first-child { text-align: left; }
    .write-table td {
      text-align: right; padding: 7px 10px; color: var(--gray-700);
      border-bottom: 1px solid var(--gray-100);
    }
    .write-table td:first-child { text-align: left; font-weight: 500; }
    .write-table-compact th, .write-table-compact td { padding: 5px 8px; font-size: 12px; }
    .write-table-total td { font-weight: 700; border-top: 2px solid var(--gray-300); color: var(--gray-900); }
    .write-positive { color: #10b981; }
    .write-negative { color: #ef4444; }
    .write-bold { font-weight: 700; }

    /* Heatmap */
    .write-heatmap td { text-align: center; font-weight: 600; font-size: 12px; padding: 8px 12px; }
    .write-hm-1 { background: #fef2f2; color: #dc2626; }
    .write-hm-2 { background: #fef9c3; color: #a16207; }
    .write-hm-3 { background: #f0fdf4; color: #15803d; }
    .write-hm-4 { background: #dcfce7; color: #166534; }
    .write-hm-5 { background: #bbf7d0; color: #14532d; }
    .write-hm-na { background: var(--gray-50); color: var(--gray-400); }
    .write-hm-legend {
      display: flex; gap: 8px; justify-content: center; margin-top: 10px;
      font-size: 11px; font-weight: 600;
    }
    .write-hm-legend span { padding: 3px 10px; border-radius: 4px; }

    /* Empty state */
    .write-empty {
      text-align: center; padding: 60px 20px; color: var(--gray-400);
      font-size: 14px; font-weight: 500;
    }

    /* Responsive */
    @media (max-width: 1100px) {
      .write-form-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 900px) {
      .write-kpi-grid { grid-template-columns: repeat(2, 1fr); }
      .write-section-body { grid-template-columns: 1fr; }
      .write-sidebar { width: 140px; }
    }

/* ═══════════════════════════════════════════════════════════════
   GUIDED TOUR / ONBOARDING TUTORIAL
   ═══════════════════════════════════════════════════════════════ */

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tour-overlay.active { opacity: 1; }

.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
  /* box-shadow inset trick: fills entire screen with dark overlay EXCEPT the spotlight cutout */
}
.tour-overlay.active .tour-backdrop {
  pointer-events: auto;
}

.tour-tooltip {
  position: fixed;
  z-index: 100002;
  background: #0f2338;
  border: 1px solid rgba(99, 179, 237, 0.35);
  border-radius: 12px;
  padding: 20px 24px 16px;
  max-width: 340px;
  min-width: 260px;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(59, 130, 246, 0.12);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.tour-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tour-tooltip-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #0f2338;
  border: 1px solid rgba(99, 179, 237, 0.35);
  transform: rotate(45deg);
}
.tour-tooltip-arrow.arrow-top    { top: -7px; border-bottom: none; border-right: none; }
.tour-tooltip-arrow.arrow-bottom { bottom: -7px; border-top: none; border-left: none; }
.tour-tooltip-arrow.arrow-left   { left: -7px; border-top: none; border-right: none; }
.tour-tooltip-arrow.arrow-right  { right: -7px; border-bottom: none; border-left: none; }

.tour-step-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #63b3ed;
  margin-bottom: 8px;
}

.tour-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tour-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #a0aec0;
  margin-bottom: 16px;
}

.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tour-dots {
  display: flex;
  gap: 6px;
}
.tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.25s;
}
.tour-dot.active { background: #63b3ed; }
.tour-dot.done   { background: rgba(99, 179, 237, 0.45); }

.tour-btns {
  display: flex;
  gap: 8px;
}

.tour-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s, transform 0.1s;
}
.tour-btn:active { transform: scale(0.96); }

.tour-btn-skip {
  background: transparent;
  color: #718096;
  border: 1px solid rgba(255,255,255,0.1);
}
.tour-btn-skip:hover { color: #a0aec0; background: rgba(255,255,255,0.05); }

.tour-btn-next {
  background: linear-gradient(135deg, #3182ce, #2b6cb0);
  color: #fff;
}
.tour-btn-next:hover { background: linear-gradient(135deg, #4299e1, #3182ce); }

.tour-btn-back {
  background: transparent;
  color: #a0aec0;
  border: 1px solid rgba(255,255,255,0.1);
}
.tour-btn-back:hover { color: #e2e8f0; background: rgba(255,255,255,0.05); }

/* Pulse ring on the spotlight target */
@keyframes tour-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(99, 179, 237, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(99, 179, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 179, 237, 0); }
}
.tour-pulse-ring {
  position: fixed;
  z-index: 100001;
  border-radius: 8px;
  border: 2px solid rgba(99, 179, 237, 0.6);
  animation: tour-pulse 2s ease-in-out infinite;
  pointer-events: none;
  transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}
