    :root { --border:#e5e7eb; --muted:#6b7280; --bg:#f9fafb; }
    html { scroll-behavior: smooth; }
    body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: var(--bg); color:#111827; }
    .wrap { max-width: 920px; margin: 32px auto; padding: 0 16px; }
    .card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
    h1 { font-size: 20px; margin: 0 0 10px; }
    label { font-size: 12px; color: var(--muted); display:block; margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
    .city-select-wrapper {
      position: relative;
      display: inline-block;
      width: 100%;
      max-width: 400px;
    }
    .city-select-wrapper::after {
      content: '';
      position: absolute;
      top: 50%;
      right: 14px;
      transform: translateY(-50%);
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid var(--muted);
      pointer-events: none;
      transition: transform 0.2s ease, border-top-color 0.2s ease;
    }
    .city-select-wrapper:focus-within::after {
      border-top-color: #111827;
      transform: translateY(-50%) rotate(180deg);
    }
    select {
      appearance: none;
      border: 1.5px solid var(--border);
      border-radius: 12px;
      padding: 12px 40px 12px 14px;
      font-size: 15px;
      background: white;
      cursor: pointer;
      width: 100%;
      font-weight: 500;
      color: #111827;
      transition: all 0.2s ease;
      box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }
    select:hover {
      border-color: #9ca3af;
      box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    }
    select:focus {
      outline: none;
      border-color: #111827;
      box-shadow: 0 0 0 3px rgba(17,24,39,0.1), 0 2px 4px rgba(0,0,0,0.06);
    }
    select:disabled {
      opacity: 0.7;
      cursor: not-allowed;
      background: #f9fafb;
    }
    select.loading {
      background: linear-gradient(90deg, #ffffff 0%, #f9fafb 50%, #ffffff 100%);
      background-size: 200% 100%;
      animation: loading-shimmer 1.5s ease-in-out infinite;
    }
    @keyframes loading-shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    select option {
      padding: 10px;
      font-weight: 400;
    }
    textarea { width: 95%; min-height: 92px; resize: vertical; border:1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
    button {
      appearance: none; border: 1px solid #111827; background:#111827; color:white; border-radius: 10px;
      padding: 16px 25px; font-size: 14px; cursor: pointer; text-transform: uppercase; font-weight: 900;
    }
    button:disabled { opacity:.6; cursor:not-allowed; }
    .muted { color: var(--muted); font-size: 13px; }
    .out { white-space: pre-wrap; font-size: 14px; line-height: 1.45; }
    .hr { height: 1px; background: var(--border); margin: 40px 0; }
    .pill { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--border); border-radius:999px; padding:6px 10px; font-size:12px; background:#fff; }
    .kpi { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
    .error { color:#b91c1c; font-size: 13px; margin-top: 20px; }
    details { border:1px solid var(--border); border-radius:12px; padding:10px 12px; background:#fff; }
    summary { cursor:pointer; font-weight:600; }
    .cite { display:grid; gap:10px; margin-top:10px; }
    .cite-item { border:1px solid var(--border); border-radius:12px; padding:10px 12px; }
    .cite-title { font-weight:600; }
    .cite-meta { font-size:12px; color:var(--muted); }
    .footer { 
      margin-top: 40px;
      padding-top: 20px;
      border-top: 1px solid var(--border);
      font-size: 11px;
      color: var(--muted);
      text-align: center;
    }
    
    .footer a {
      color: var(--muted);
      text-decoration: none;
    }
    
    .footer a:hover {
      text-decoration: underline;
    }
    
    .disclaimer {
      gap: 10px;
      padding: 12px 16px;
      margin: 40px 0 60px 0;
      background: #fffbeb;
      border: 1px solid #fef3c7;
      border-radius: 10px;
      font-size: 13px;
      color: #92400e;
      line-height: 1.25;
      text-align: center;
    }
    
    .disclaimer-icon {
      flex-shrink: 0;
      font-size: 12px;
      margin-top: 2px;
    }
    
    div#answer h2 { font-size: 26px; margin: 0 0 -12px 0; }
    div#answer h3 { font-size: 20px; margin: 0 0 -8px 0; }
    div#answer p { margin:0 0 10px; }
    div#answer ul { margin:0 0 10px; padding-left:20px; line-height: 1.25; }
    div#answer li { margin:0 0 0px; }
    
    /* Details citation disclosure pattern */
    .details-source-toggle {
      display: inline-block;
      margin-left: 8px;
      line-height: 1.6;
    }
    
    .details-source-toggle-button {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 8px;
      margin: 2px 0;
      background: #f3f4f6;
      border: 1px solid #d1d5db;
      border-radius: 12px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 500;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.2s ease;
      vertical-align: middle;
    }
    
    .details-source-toggle-button:hover {
      background: #e5e7eb;
      border-color: #9ca3af;
      color: #111827;
    }
    
    .details-source-toggle-button:focus {
      outline: 2px solid #1e40af;
      outline-offset: 2px;
    }
    
    .details-source-toggle-button:active {
      background: #d1d5db;
    }
    
    .details-source-toggle-button .chevron {
      display: inline-block;
      transition: transform 0.2s ease;
      font-size: 9px;
    }
    
    .details-source-toggle-button[aria-expanded="true"] .chevron {
      transform: rotate(90deg);
    }
    
    .details-source-block {
      display: block;
      margin-top: 10px;
      padding: 12px 14px;
      background: #fafafa;
      border-radius: 8px;
      font-size: 13px;
      line-height: 1.6;
    }
    
    .details-source-entry {
      display: block;
      margin-bottom: 12px;
      padding-bottom: 12px;
      border-bottom: 1px solid #f0f0f0;
    }
    
    .details-source-entry:last-child {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: none;
    }
    
    .details-source-doc-name {
      font-weight: 600;
      color: #111827;
      margin-bottom: 4px;
    }
    
    .details-source-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 6px;
      font-size: 12px;
      color: var(--muted);
      flex-wrap: wrap;
    }
    
    .details-source-page-range {
      color: var(--muted);
    }
    
    .details-source-view-link {
      color: #1e40af;
      text-decoration: none;
      font-weight: 500;
    }
    
    .details-source-view-link:hover {
      text-decoration: underline;
    }
    
    .details-source-view-link:focus {
      outline: 2px solid #1e40af;
      outline-offset: 2px;
      border-radius: 2px;
    }
    
    .details-source-snippet {
      margin-top: 8px;
      padding-left: 12px;
      border-left: 2px solid #e5e7eb;
      color: #374151;
      font-size: 12px;
      line-height: 1.5;
      font-style: italic;
    }
    
    .details-source-snippet:not(:last-child) {
      margin-bottom: 8px;
    }
    
    .details-source-snippet-more {
      margin-top: 6px;
      color: #1e40af;
      font-size: 11px;
      cursor: pointer;
      text-decoration: none;
    }
    
    .details-source-snippet-more:hover {
      text-decoration: underline;
    }
    
    /* Hide old citation pills */
    .details-citation {
      display: none;
    }
    div#answer strong { font-weight:600; }
    div#answer em { font-style:italic; }
    div#answer code { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:13px; background:#f9fafb; padding:2px 4px; border-radius:4px; }
    div#answer blockquote { margin:0 0 10px; padding-left:20px; border-left:4px solid var(--border); }
    
    .referenced-sections-group {
      margin-top: 20px;
    }
    
    .referenced-sections-group-title {
      font-weight: 600;
      font-size: 15px;
      color: #111827;
      margin-bottom: 8px;
      margin-top: 16px;
    }
    
    .referenced-sections-group-title:first-child {
      margin-top: 0;
    }
    
    .referenced-sections-list {
      list-style: none;
      padding-left: 0;
      margin: 0 0 0 8px;
    }
    
    .referenced-sections-list li {
      margin: 6px 0;
      padding-left: 0;
      scroll-margin-top: 80px;
      padding: 4px 8px;
      border-radius: 6px;
      transition: all 0.3s ease;
      border: 2px solid transparent;
      background: transparent;
    }
    
    .referenced-sections-list li.highlighted {
      background: #fef3c7;
      box-shadow: 0 1px 4px rgba(245, 158, 11, 0.15);
      animation: highlightPulse 0.6s ease-out;
    }
    
    @keyframes highlightPulse {
      0% {
        background: #fef3c7;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3);
      }
      50% {
        background: #fde68a;
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0);
      }
      100% {
        background: #fef3c7;
        box-shadow: 0 1px 4px rgba(245, 158, 11, 0.15);
      }
    }
    
    .referenced-sections-list a {
      color: #1e40af;
      text-decoration: none;
      display: inline;
      font-size: 14px;
      line-height: 1.5;
    }
    
    .referenced-sections-list a:hover {
      text-decoration: underline;
    }
    
    .referenced-sections-list a::before {
      content: "→ ";
      color: var(--muted);
      font-size: 12px;
      margin-right: 4px;
    }
    
    .referenced-sections-section-title {
      color: #111827;
    }
    
    .referenced-sections-page-info {
      color: var(--muted);
      font-size: 13px;
    }

    .logo {
      max-width: 350px;
    }
    
    @media (max-width: 400px) {
      .logo {
        max-width: 100%;
      }
    }
    .followup {
      list-style: none;
      padding-left: 0;
      margin-top: 8px;
    }

    .followup li {
      display: inline-flex;
      align-items: center;
      gap: 8px;

      cursor: pointer;
      user-select: none;

      padding: 8px 12px;
      margin: 6px 6px 6px 0 !important;

      border-radius: 999px;
      border: 1px solid #dbeafe;
      background: #eff6ff;

      font-size: 13px;
      font-weight: 500;
      color: #1e40af;

      transition: all 0.15s ease;
    }

    .followup li::before {
      content: "↪";
      font-size: 12px;
      opacity: 0.7;
    }

    .followup li:hover {
      background: #dbeafe;
      border-color: #93c5fd;
    }

    .followup li:active {
      transform: translateY(1px);
      background: #bfdbfe;
    }

    .followup li:focus {
      outline: 2px solid #60a5fa;
      outline-offset: 2px;
    }

/* HTML: <div class="loader"></div> */
.loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--muted);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 6px;
  vertical-align: middle;
}

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