
/* Simple line clamps (Tailwind line-clamp plugin isn’t guaranteed) */

/* =========================
   JOLLO Brand Theme (Option B)
   ========================= */
:root{
  --brand: #06B6D4;        /* primary */
  --brand-dark: #0891B2;   /* hover */
  --brand-mint: #2DD4BF;   /* gradient mate */
  --brand-tint: #E6FAFF;   /* background wash */
  --ink: #0F172A;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Hero “premium wash” background */
.hero-wash{
  position: relative;
}
.hero-wash::before{
  content:"";
  position:absolute;
  inset:-40px -24px auto -24px;
  height: 380px;
  pointer-events:none;
  background:
    radial-gradient(900px 320px at 20% 0%,
      rgba(6,182,212,0.22) 0%,
      rgba(6,182,212,0.08) 35%,
      rgba(255,255,255,0) 70%
    );
  filter: blur(0px);
}
@media (max-width: 640px){
  .hero-wash::before{ height: 320px; inset:-28px -16px auto -16px; }
}

/* Headline polish */
.hero-h1{
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-accent{
  background: linear-gradient(90deg, var(--brand), var(--brand-mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}



/* Feature pills */
.pill-feature{
  background: rgba(6,182,212,0.10);
  border: 1px solid rgba(6,182,212,0.20);
  color: var(--brand-dark);
}

/* Small helper line under hero trust pills */
.hero-helper-line{
  margin: 0 auto 14px auto;
  text-align: center;
  color: rgb(100 116 139);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
}

@media (max-width: 640px){
  .hero-helper-line{
    font-size: 0.82rem;
    margin-bottom: 12px;
  }
}

/* Hero category preview row */
.hero-signal-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 6px auto 18px auto;
  max-width: 980px;
}

.hero-signal-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 14px;
 background: rgba(255,255,255,0.55);
  border: 1px solid rgba(226,232,240,0.65);
  color: rgb(71 85 105);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px -22px rgba(15,23,42,0.14);
}

@media (max-width: 640px){
  .hero-signal-row{
    gap: 8px;
    margin-bottom: 20px;
  }

  .hero-signal-chip{
    font-size: 0.8rem;
    padding: 8px 12px;
  }
}

/* Top-nav beta badge */
.beta-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(6,182,212,0.10);
  border: 1px solid rgba(6,182,212,0.22);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Example address shortcuts under hero search */
.example-addresses-wrap{
  margin-left: auto;
  margin-right: auto;
  max-width: 54rem;
  text-align: center;
  margin-top: 14px;
}

.example-addresses-label{
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgb(100 116 139);
  margin-bottom: 10px;
}

.example-addresses-list{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.example-address-chip{
  appearance: none;
  border: 1px solid rgba(6,182,212,0.14);
  background: rgba(255,255,255,0.82);
  color: rgb(15 23 42);
  border-radius: 999px;
   font-size: 0.84rem;
  padding: 8px 14px;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 10px 24px -22px rgba(15,23,42,0.16);
  transition: all 0.18s ease;
  cursor: pointer;
}

.example-address-chip:hover{
  border-color: rgba(6,182,212,0.35);
  background: rgba(230,250,255,0.9);
  color: var(--brand-dark);
  transform: translateY(-1px);
}

.example-address-chip:focus-visible{
  outline: none;
  border-color: rgba(6,182,212,0.65);
  box-shadow: 0 0 0 4px rgba(6,182,212,0.14);
}

.example-addresses-helper{
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: rgb(148 163 184);
}


@media (max-width: 640px){
  .example-address-chip{
    width: 100%;
    border-radius: 18px;
    text-align: left;
    padding: 12px 14px;
  }

  .example-addresses-helper{
    font-size: 0.8rem;
  }
}

/* Hero live intelligence ticker */
.hero-live-ticker{
  max-width: 54rem;
  margin: 18px auto 0 auto;
  padding: 14px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(226,232,240,0.85);
  box-shadow: 0 14px 30px -24px rgba(15,23,42,0.14);
  text-align: center;
}

.hero-live-ticker-label{
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(100 116 139);
  margin-bottom: 8px;
}

.hero-live-ticker-text{
  color: rgb(15 23 42);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  min-height: 1.8em;
  transition: opacity 0.28s ease, transform 0.28s ease;
  opacity: 1;
  transform: translateY(0);
}

.hero-live-ticker-text.is-fading{
  opacity: 0;
  transform: translateY(6px);
}

@media (max-width: 640px){
  .hero-live-ticker{
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 20px;
  }

  .hero-live-ticker-label{
    font-size: 0.68rem;
    margin-bottom: 6px;
  }

  .hero-live-ticker-text{
    font-size: 0.92rem;
    min-height: 2.8em;
  }
}

/* Homepage marketing sections */
.marketing-shell{
  background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(248,250,252,0.96) 100%);
  border: 1px solid rgba(226,232,240,0.85);
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 18px 40px -28px rgba(15,23,42,0.18);
}

.marketing-header{
  margin-bottom: 8px;
}

.marketing-eyebrow{
  display: inline-block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.marketing-h2{
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.marketing-sub{
  margin-top: 14px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgb(100 116 139);
  font-weight: 700;
}

.marketing-grid{
  display: grid;
  gap: 16px;
}

.marketing-grid-3{
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.marketing-card{
  position: relative;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 12px 26px -22px rgba(15,23,42,0.18);
}

.marketing-card-title{
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.marketing-card-copy{
  margin-top: 10px;
  color: rgb(100 116 139);
  font-size: 0.98rem;
  line-height: 1.65;
  font-weight: 700;
}

.marketing-step{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(6,182,212,0.10);
  border: 1px solid rgba(6,182,212,0.18);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.marketing-icon{
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 14px;
}

.marketing-card-analysis{
  min-height: 220px;
}

.jollo-footer{
  border-top: 1px solid rgba(226,232,240,0.9);
  padding-top: 26px;
}

.jollo-footer-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.jollo-footer-logo{
  color: var(--brand);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.jollo-footer-copy{
  max-width: 760px;
  margin-top: 14px;
  color: rgb(100 116 139);
  font-size: 0.98rem;
  line-height: 1.7;
  font-weight: 700;
}

@media (min-width: 768px){
  .marketing-grid-3{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketing-shell{
    padding: 40px;
  }

  .marketing-h2{
    font-size: 2.3rem;
  }
}

@media (max-width: 640px){
  .marketing-shell{
    padding: 22px;
    border-radius: 24px;
  }

  .marketing-h2{
    font-size: 1.65rem;
  }

  .marketing-sub{
    font-size: 0.97rem;
    line-height: 1.6;
  }

  .marketing-card{
    border-radius: 22px;
    padding: 20px;
  }

  .marketing-card-analysis{
    min-height: auto;
  }
}

/* Primary button */
.btn-primary{
  background: var(--brand);
  box-shadow: 0 14px 30px -18px rgba(6,182,212,0.65);
}
@media (hover:hover) and (pointer:fine){
  .btn-primary:hover{ background: var(--brand-dark); }
}
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Collapsible sections: nicer tap targets on mobile */
details.crime-accordion > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
details.crime-accordion > summary::-webkit-details-marker { display: none; }
details.crime-accordion > summary .chev {
  transition: transform 0.2s ease;
}
details.crime-accordion[open] > summary .chev {
  transform: rotate(90deg);
}


        /* Force Google Autocomplete suggestions to wrap */
        .pac-container { 
            border-radius: 12px; 
            margin-top: 8px; 
            box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); 
            border: 1px solid #e2e8f0; 
            font-family: inherit;
            z-index: 10000;
            width: auto !important;
            max-width: 90vw;
        }

        .pac-item {
            padding: 12px;
            white-space: normal !important; 
            line-height: 1.4;
            display: flex;
            align-items: flex-start;
        }

        .report-card {
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
        }

        @media (hover: hover) and (pointer: fine) {
  .report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.05);
  }
}


        /* KPI cards: NOT clickable, except Dog card */
.kpi-card {
  cursor: default !important;
}
.kpi-card:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Bullet text safety: prevent "stuck" long tokens from breaking layout */
.jollo-bullet-text{
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

/* Deep dive tiles: clickable */
.tile-card {
  cursor: pointer;
}

/* ---------------------------------------
   Tile color states (Working / Ready / Error)
---------------------------------------- */
.tile-state-working {
  border-color: rgba(6,182,212,0.35) !important;        /* brand cyan */
  background: rgba(230,250,255,0.72) !important;        /* brand tint */
  box-shadow: 0 8px 18px -10px rgba(6,182,212,0.32);

  position: relative;
  overflow: hidden;
}


/* Subtle “beam sweep” while scanning */
.tile-state-working::before {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  top: -60%;
  height: 65%;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: translateY(-120%);
  animation: jollo-scan 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes jollo-scan {
  0%   { transform: translateY(-120%); }
  100% { transform: translateY(260%); }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
  .tile-state-working::before {
    animation: none;
    opacity: 0.25;
  }
}


.tile-state-ready {
  border-color: rgba(16, 185, 129, 0.35) !important;   /* green */
  background: rgba(236, 253, 245, 0.9) !important;     /* green-50-ish */
  box-shadow: 0 8px 18px -10px rgba(16,185,129,0.28);
}

.tile-state-error {
  border-color: rgba(239, 68, 68, 0.35) !important;    /* red */
  background: rgba(254, 242, 242, 0.95) !important;    /* red-50-ish */
  box-shadow: 0 8px 18px -10px rgba(239,68,68,0.25);
}


/* Add a subtle glow when the user is typing / focusing inside the search container */
.search-container:focus-within {
  border-color: rgba(6,182,212,0.65);
  box-shadow: 0 0 0 4px rgba(6,182,212,0.14);
}



        .search-container {
            display: flex;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 32px;
            padding: 8px 16px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.03);
            width: 100%;
            transition: all 0.2s ease;
        }

        #country-selector {
            border: none;
            background: transparent;
            font-weight: 700;
            color: #475569;
            outline: none;
            cursor: pointer;
            font-size: 16px;
        }

        /* Desktop: Horizontal Pill Layout */
        @media (min-width: 641px) {
            .search-container {
                flex-direction: row;
                align-items: center;
                border-radius: 100px;
                padding: 6px 12px;
            }
            #country-selector {
                min-width: 180px;
                padding-left: 10px;
                border-right: 1px solid #e2e8f0;
                margin-right: 8px;
            }
            #address-input {
                height: 56px !important;
            }
        }

        /* Mobile: Stacked Layout & Multi-line Textarea */
        @media (max-width: 640px) {
            .search-container {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
                padding: 16px;
                border-radius: 24px;
            }
            #country-selector {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid #f1f5f9;
                padding-bottom: 8px;
                margin-right: 0;
            }
            #address-input {
                padding-left: 0 !important;
                min-height: 56px;
                line-height: 1.5;
            }
        }

        /* NEW: Config Section Animation */
#config-step {
  transition: all 0.4s ease-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

/* IMPORTANT: raise the cap so mobile doesn't clip the button */
#config-step.active {
  max-height: 1600px;  /* was ~600px -> clips on mobile */
  opacity: 1;
  margin-top: 2rem;
}

/* Keep it snappy on desktop without making it huge */
@media (min-width: 641px) {
  #config-step.active { max-height: 900px; }
}

#server-status-pill {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  right: 16px;
}

#server-status-pill{
  border-color: rgba(6,182,212,0.20) !important;
}
#server-status-pill #status-light{
  background: rgba(6,182,212,0.55) !important;
}



@keyframes radarPing {
  0%   { transform: scale(0.25); opacity: 0.9; }
  70%  { transform: scale(1.0);  opacity: 0.25; }
  100% { transform: scale(1.25); opacity: 0; }
}
.pingdot{
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* NOTE: removed .tile-state-working .pingdot::after
   because app.js now injects the dot + pulse itself */


/* ==========================================
   Dog pingdot: use accent (running/ready) and red (error)
   NOTE: We DO NOT color the .pingdot wrapper itself (would change size/look).
   We only recolor the injected inner elements (spans/divs) that app.js inserts.
   ========================================== */
#tile-dog { --jollo-ping-color: #d97706; } /* amber (matches Dog header vibe) */

#tile-dog.tile-state-error { --jollo-ping-color: #dc2626; } /* red on error */

/* Recolor whatever elements are injected inside .pingdot */
#tile-dog .pingdot > * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Safety: if nested spans/divs exist */
#tile-dog .pingdot * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* ==========================================
   Planning pingdot + header accent (NEW)
   ========================================== */

#tile-planning{
  --jollo-accent: #65a30d;              /* Planning accent (lime-600) */
  --jollo-ping-color: var(--jollo-accent);
}
#tile-planning.tile-state-error{
  --jollo-ping-color: #dc2626;          /* red on error */
}

/* Recolor injected pingdot inner elements */
#tile-planning .pingdot > *{
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}
#tile-planning .pingdot *{
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Top-left header label matches pingdot/accent */
#tile-planning .tile-toplabel{
  color: var(--jollo-accent) !important;
}

/* Headline sizing — match the other tiles */
#tile-planning.tile-state-working #planning-headline{
  font-size: 1.875rem !important; /* ~text-3xl */
  line-height: 1.1;
  font-weight: 800;
  color: rgba(15,23,42,0.96);
}
#tile-planning.tile-state-ready #planning-headline{
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: rgba(15,23,42,0.92);
}
@media (max-width: 640px){
  #tile-planning.tile-state-ready #planning-headline{ font-size: 1.05rem; }
}

/* Modal title accent for Planning */
#tile-modal[data-tile="planning"]{
  --modal-accent: #65a30d;
}

/* ==========================================
   Signals pingdot: use accent (running/ready) and red (error)
   ========================================== */

#tile-signals {
  --jollo-accent: var(--brand);       /* Signals accent */
  --jollo-ping-color: var(--jollo-accent);
}

#tile-signals.tile-state-error { --jollo-ping-color: #dc2626; } /* red on error */

/* Recolor whatever elements are injected inside .pingdot */
#tile-signals .pingdot > * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Safety: if nested spans/divs exist */
#tile-signals .pingdot * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Signals: top-left header label matches the same accent as the pingdot */
#tile-signals .tile-toplabel {
  color: var(--jollo-accent) !important;
}


/* Optional polish for the Insights ticker */
#insight-display-area {
  will-change: transform, opacity;
}

/* =========================
   FIX: Insight box height must NOT jump
   ========================= */
#insight-display-area,
#warmup-insight-display-area{
  height: 132px;         /* fixed, stable */
  max-height: 132px;
  overflow: hidden;
}

@media (max-width: 768px){
  #insight-display-area,
  #warmup-insight-display-area{
    height: 160px;       /* fixed for mobile (CTA stacks) */
    max-height: 160px;
  }
}

/* =========================
   Option A: Intelligence Stage
   ========================= */

   #analysis-progress-text{
  letter-spacing: 0.02em;
}
#analysis-progress-label{
  letter-spacing: 0.18em;
}

#analysis-progress-bar { transition: width 1.2s cubic-bezier(0.1, 0.5, 0.5, 1.0); }


/* Premium quote typography inside both insight areas */
#insight-display-area .insight-quote,
#warmup-insight-display-area .insight-quote{
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  line-height: 1.15;
  color: rgba(15,23,42,0.95);
  font-size: 2rem;
}

@media (max-width: 768px){
  #insight-display-area .insight-quote,
  #warmup-insight-display-area .insight-quote{
    font-size: 1.55rem;
  }
}

#insight-display-area .insight-credit,
#warmup-insight-display-area .insight-credit{
  margin-top: 14px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148,163,184,1);
}

/* Indeterminate sweep for warmup progress bar */
.bar-pulse{
  position: absolute !important;
  top: 0;
  left: -35%;
  width: 35% !important;
  height: 100%;
  max-height: 100%;
  display: block;
background: linear-gradient(90deg,
  rgba(6,182,212,1),
  rgba(45,212,191,1),
  rgba(6,182,212,1)
) !important;
  animation: indeterminate-sweep 2s infinite linear;
  border-radius: 999px;
}


@keyframes indeterminate-sweep{
  from { left: -35%; }
  to   { left: 100%; }
}

/* iPhone/Safari pinch-zoom: keep modal header/close button visible */
@media (max-width: 640px) {

    /* iOS: remove the “floating gap” above the panel by top-aligning it */
  #tile-modal,
  #schools-modal{
    align-items: flex-start !important;  /* stop vertical centering */
    padding-top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
  }

  /* Ensure the panel itself doesn’t add its own vertical offset */
  #tile-modal > div,
  #schools-modal-panel{
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }


  /* Make the modal panels never exceed the visible viewport height */
#tile-modal > div,
#schools-modal-panel {
  /* reserve both top + bottom safe areas so header never disappears */
  max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}


  /* Header stays at top of the panel */
  #tile-modal .modal-header,
  #schools-modal .modal-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding-top: 16px;
  }

  /* Body becomes the only scroll area (prevents header being pushed offscreen) */
  #tile-modal-body,
  #schools-modal-body {
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    max-height: none !important; /* override Tailwind max-h on mobile */
  }

  /* Optional: reduce “scroll bleed” to the page behind */
  #tile-modal,
  #schools-modal {
    overscroll-behavior: contain;
  }
}


/* Generic accordion styling (used by Dog modal v2.0) */
details.jollo-accordion > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
details.jollo-accordion > summary::-webkit-details-marker { display: none; }
details.jollo-accordion > summary .chev {
  transition: transform 0.2s ease;
}
details.jollo-accordion[open] > summary .chev {
  transform: rotate(90deg);
}

/* Dog KPI headline: make the result headline bigger when Ready */
#tile-dog.tile-state-ready #dog-kpi-sub {
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
}

@media (max-width: 640px) {
  #tile-dog.tile-state-ready #dog-kpi-sub {
    font-size: 1.05rem;
  }
}
/* Signals: match Dog final headline sizing on Ready */
#tile-signals.tile-state-ready #signals-headline {
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
}
@media (max-width: 640px) {
  #tile-signals.tile-state-ready #signals-headline {
    font-size: 1.05rem;
  }
}

/* Signals: force big headline while Working (prevents intermittent smaller headline) */
#tile-signals.tile-state-working #signals-headline {
font-size: 1.875rem !important;
  line-height: 1.1;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.96);
}
@media (max-width: 640px) {
  #tile-signals.tile-state-working #signals-headline {
    font-size: 1.875rem !important; /* match big running headline */
    line-height: 1.1;
    font-weight: 800;
  }
}

/* ==========================================
   Neighbourhood Vibe pingdot + header accent (NEW)
   ========================================== */

#tile-vibe{
  --jollo-accent: #e11d48;              /* Vibe accent (rose-600) */
  --jollo-ping-color: var(--jollo-accent);
}
#tile-vibe.tile-state-error{
  --jollo-ping-color: #dc2626;          /* red on error */
}

/* Recolor injected pingdot inner elements */
#tile-vibe .pingdot > *{
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}
#tile-vibe .pingdot *{
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Top-left header label matches pingdot/accent */
#tile-vibe .tile-toplabel{
  color: var(--jollo-accent) !important;
}

/* Headline sizing — match Commute/Noise behavior */
#tile-vibe.tile-state-working #vibe-headline{
  font-size: 1.875rem !important; /* ~text-3xl */
  line-height: 1.1;
  font-weight: 800;
  color: rgba(15,23,42,0.96);
}
#tile-vibe.tile-state-ready #vibe-headline{
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: rgba(15,23,42,0.92);
}
@media (max-width: 640px){
  #tile-vibe.tile-state-ready #vibe-headline{ font-size: 1.05rem; }
}

/* Modal title accent for Vibe */
#tile-modal[data-tile="vibe"]{
  --modal-accent: #e11d48;
}

/* ==========================================
   Commute pingdot + header accent (NEW)
   ========================================== */

#tile-commute{
  --jollo-accent: #4f46e5;              /* Commute accent (indigo-600) */
  --jollo-ping-color: var(--jollo-accent);
}
#tile-commute.tile-state-error{
  --jollo-ping-color: #dc2626;          /* red on error */
}

/* Recolor injected pingdot inner elements */
#tile-commute .pingdot > *{
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}
#tile-commute .pingdot *{
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Top-left header label matches pingdot/accent */
#tile-commute .tile-toplabel{
  color: var(--jollo-accent) !important;
}

/* Headline sizing — match Signals/Noise behavior */
#tile-commute.tile-state-working #commute-headline{
  font-size: 1.875rem !important; /* ~text-3xl */
  line-height: 1.1;
  font-weight: 800;
  color: rgba(15,23,42,0.96);
}
#tile-commute.tile-state-ready #commute-headline{
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: rgba(15,23,42,0.92);
}
@media (max-width: 640px){
  #tile-commute.tile-state-ready #commute-headline{ font-size: 1.05rem; }
}

/* Modal title accent for Commute (top-left title + dot) */
#tile-modal[data-tile="commute"]{
  --modal-accent: #4f46e5;
}

/* ==========================================
   Noise pingdot + header accent (match Signals system)
   ========================================== */

#tile-noise {
  --jollo-accent: #7c3aed;              /* Noise accent (violet) */
  --jollo-ping-color: var(--jollo-accent);
}
#tile-noise.tile-state-error { --jollo-ping-color: #dc2626; } /* red on error */

#tile-schools {
  --jollo-accent: #60a5fa;              /* Schools accent (sky blue) */
  --jollo-ping-color: var(--jollo-accent);
}
#tile-schools.tile-state-error { --jollo-ping-color: #dc2626; } /* red on error */

/* Recolor whatever elements are injected inside .pingdot */
#tile-schools .pingdot > * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* If pingdot injects nested spans/divs, recolor them too (match Noise) */
#tile-schools .pingdot * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Top-left header label uses the same accent as the pingdot */
#tile-schools .tile-toplabel {
  color: var(--jollo-accent) !important;
}


/* Recolor whatever elements are injected inside .pingdot */
#tile-noise .pingdot > * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}
#tile-noise .pingdot * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Top-left header label uses the same accent as the pingdot */
#tile-noise .tile-toplabel {
  color: var(--jollo-accent) !important;
}
/* Noise: match Dog/Signals final headline sizing on Ready */
#tile-noise.tile-state-ready #noise-headline {
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
}
@media (max-width: 640px) {
  #tile-noise.tile-state-ready #noise-headline {
    font-size: 1.05rem;
  }
}

/* Noise: force big headline while Working (prevents intermittent smaller headline) */
#tile-noise.tile-state-working #noise-headline {
font-size: 1.875rem !important;
  line-height: 1.1;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.96);
}
@media (max-width: 640px) {
  #tile-noise.tile-state-working #noise-headline {
    font-size: 1.875rem !important; /* match big running headline */
    line-height: 1.1;
    font-weight: 800;
  }
}


/* ==========================================
   Crime pingdot + header accent (match Signals/Noise/Schools system)
   ========================================== */

#tile-crime,
#kpi-crime {
  --jollo-accent: #0d9488;              /* Crime accent (teal) */
  --jollo-ping-color: var(--jollo-accent);
}

#tile-crime.tile-state-error,
#kpi-crime.tile-state-error {
  --jollo-ping-color: #dc2626;          /* red on error */
}

/* Recolor whatever elements are injected inside .pingdot */
#tile-crime .pingdot > *,
#kpi-crime .pingdot > * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Safety: if nested spans/divs exist */
#tile-crime .pingdot *,
#kpi-crime .pingdot * {
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Top-left header label uses the same accent as the pingdot */
#tile-crime .tile-toplabel,
#kpi-crime .tile-toplabel {
  color: var(--jollo-accent) !important;
}


/* Verdict Bar: slightly tighter padding on small screens */
@media (max-width: 640px){
  #jollo-verdict-bar > div{
    padding: 16px;
  }
  #jollo-verdict-bar #insight-display-area{
    padding: 16px;
    min-height: 80px;
  }
}

/* Schools: match Dog/Signals/Noise final headline sizing on Ready */
#tile-schools.tile-state-ready #schools-title {
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
}

/* Schools: force big headline while Working (prevents intermittent smaller headline) */
#tile-schools.tile-state-working #schools-title{
  font-size: 1.875rem !important; /* ~text-3xl */
  line-height: 1.1;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.96);
}

/* Valuation: force big headline while Working (match other tiles) */
#tile-valuation.tile-state-working #valuation-title{
  font-size: 1.875rem !important; /* ~text-3xl */
  line-height: 1.1;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.96);
}
@media (max-width: 640px){
  #tile-valuation.tile-state-working #valuation-title{
    font-size: 1.875rem !important;
    line-height: 1.1;
    font-weight: 800;
  }
}


@media (max-width: 640px){
  #tile-schools.tile-state-working #schools-title{
    font-size: 1.875rem !important;
    line-height: 1.1;
    font-weight: 800;
  }
}



@media (max-width: 640px) {
  #tile-schools.tile-state-ready #schools-title {
    font-size: 1.05rem;
  }
}

/* Crime headline sizing — match Signals/Noise exactly:
   - Working: big headline
   - Ready:   smaller headline
   - No extra clamp/overflow hacks (keep HTML clamp-3 behavior)
*/
#tile-crime #crime-kpi-sub{
  width: 100%;
  min-width: 0;
}

/* Working: big headline */
#tile-crime.tile-state-working #crime-kpi-sub{
  font-size: 1.875rem !important; /* ~text-3xl */
  line-height: 1.1;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.96);
}

/* Ready: smaller final headline */
#tile-crime.tile-state-ready #crime-kpi-sub{
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
}

@media (max-width: 640px){
  #tile-crime.tile-state-ready #crime-kpi-sub{
    font-size: 1.05rem;
  }
}

/* ==========================================
   JOLLO: Global Modal Surface + Backdrop (no tile edits)
   Applies to: #tile-modal (all tiles) + #schools-modal (schools)
   Brand: uses --brand + --brand-mint from :root
   ========================================== */
/* 1) Backdrop / overlay */
#tile-modal,
#schools-modal{
  /* richer than flat black/gray, but still subtle + premium */
  background:
    radial-gradient(1200px 800px at 18% 0%,
      rgba(6,182,212,0.22) 0%,
      rgba(6,182,212,0.08) 35%,
      rgba(255,255,255,0) 70%
    ),
    radial-gradient(900px 700px at 85% 10%,
      rgba(45,212,191,0.14) 0%,
      rgba(45,212,191,0.06) 35%,
      rgba(255,255,255,0) 70%
    ),
    rgba(15,23,42,0.58);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

/* IMPORTANT: only force flex layout when modal is visible (not .hidden) */
#tile-modal:not(.hidden),
#schools-modal:not(.hidden){
  display: flex;
  justify-content: center;
  align-items: center;
}


/* 2) Modal panel / container surface */
#tile-modal > div,
#schools-modal-panel{
  position: relative;
  overflow: hidden;

  /* “not pure white” — subtle wash so content cards pop */
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 34px 90px rgba(2,6,23,0.30);
  border-radius: 26px; /* matches your rounded-3xl vibe */
}

/* 3) Brand hairline accent (ties to new cyan/teal identity) */
#tile-modal > div::before,
#schools-modal-panel::before{
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-mint));
  opacity: 0.95;
}
/* 4) Very subtle texture inside the modal (breaks up “white sheet”) */
#tile-modal > div::after,
#schools-modal-panel::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index: 0;              /* ✅ NEW: keep texture behind all content */
  border-radius: inherit;  /* ✅ NEW: ensures it follows rounded corners */
  background:
    radial-gradient(900px 420px at 12% 0%,
      rgba(6,182,212,0.10),
      rgba(255,255,255,0) 60%
    ),
    radial-gradient(900px 520px at 92% 10%,
      rgba(45,212,191,0.08),
      rgba(255,255,255,0) 65%
    );
  opacity: 1;
}


/* 5) Header gets a “glass” treatment + divider so it feels designed */
#tile-modal .modal-header,
#schools-modal .modal-header{
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}

/* 6) Body surface: slight tint so sections don’t feel endless white */
#tile-modal-body,
#schools-modal-body{
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.92) 100%);
}

/* 7) Optional: links inside modals pick up the brand color (subtle) */
#tile-modal a,
#schools-modal a{
  color: var(--brand-dark);
}
#tile-modal a:hover,
#schools-modal a:hover{
  color: var(--brand);
}

/* ==========================================
   JOLLO: Standard modal header (all tile modals)
   - Left: emoji + title + colored dot (pingdot color)
   - Right: Close × aligned consistently
   ========================================== */

/* Default accent = brand teal */
#tile-modal { --modal-accent: var(--brand); }

/* Dog pingdot accent (orange) */
#tile-modal[data-tile="dog"] { --modal-accent: #f97316; }

/* Schools pingdot accent (match tile-schools: #60a5fa) */
#tile-modal[data-tile="schools"] { --modal-accent: #60a5fa; }

/* Crime accent (teal, matches tile accent) */
#tile-modal[data-tile="crime"]{
  --modal-accent: #0d9488;
}


/* Header row layout */
#tile-modal .modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 16px 18px;
}

/* Title styling (consistent across modals) */
#tile-modal-title{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--modal-accent);
  line-height: 1.1;
}


/* The colored dot next to the title (pingdot color) */
#tile-modal-title::after{
  content:"";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--modal-accent);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.70);
}

/* Close button alignment + tap target */
#tile-modal-close{
  font-weight: 800;
  color: rgba(15,23,42,0.55);
  padding: 8px 10px;
  border-radius: 12px;
}
#tile-modal-close:hover{
  color: rgba(15,23,42,0.80);
  background: rgba(15,23,42,0.05);
}

/* Signals / Local News accent (matches modal pingdot + title) */
#tile-modal[data-tile="signals"]{
  --modal-accent: var(--brand-dark);
}


/* Noise accent (violet, matches tile accent) */
#tile-modal[data-tile="noise"]{
  --modal-accent: #7c3aed;
}

/* Valuation accent (keep explicit so modal doesn't depend on tile-scoped vars) */
#tile-modal[data-tile="valuation"]{
  --modal-accent: #db2777;
}

/* Valuation tile (PropertyFacts gate inside tile): amber confirm state */
#tile-valuation.valuation-needs-confirm {
  border-color: #fcd34d;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35);
  background: rgba(255, 251, 235, 0.9);
}

/* Valuation pingdot + header accent (distinct from Schools blue)
   ========================================== */

#tile-valuation{
  --jollo-accent: #db2777;              /* Valuation accent (fuchsia-600) */
  --jollo-ping-color: var(--jollo-accent);
}

#tile-valuation.tile-state-error{
  --jollo-ping-color: #dc2626;          /* red on error */
}

/* Recolor injected pingdot inner elements */
#tile-valuation .pingdot > *{
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}
#tile-valuation .pingdot *{
  background-color: var(--jollo-ping-color) !important;
  border-color: var(--jollo-ping-color) !important;
}

/* Top-left header label matches the pingdot color (working/ready/error) */
#tile-valuation .tile-toplabel{
  color: var(--jollo-ping-color) !important;
}

/* ==========================================
   JOLLO: Confirm Facts Modal (Valuation gate)
   Big fields, but not edge-to-edge (desktop)
   Matches front-page input styling
   ========================================== */

.jollo-confirm-wrap{
  width: 100%;
  max-width: 720px;          /* desktop “card width” like reference */
  margin: 0 auto;
  padding: 0 8px;            /* prevents edge-to-edge in modal body */
}

@media (max-width: 640px){
  .jollo-confirm-wrap{
    max-width: 100%;
    padding: 0 2px;          /* mobile: near full width but still safe */
  }
}

.jollo-confirm-title{
  font-size: 2rem;
  font-weight: 900;
  color: rgba(15,23,42,1);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

@media (max-width: 640px){
  .jollo-confirm-title{ font-size: 1.75rem; }
}

.jollo-confirm-subline{
  margin-top: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(100,116,139,1); /* slate-500 */
}

.jollo-confirm-card{
  border: 1px solid rgba(226,232,240,1); /* slate-200 */
  border-radius: 24px;
  padding: 16px;
  background: rgba(248,250,252,0.55);    /* subtle wash */
}

@media (max-width: 640px){
  .jollo-confirm-card{ padding: 14px; }
}

.jollo-confirm-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jollo-confirm-label{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(100,116,139,1); /* slate-500 */
}

.jollo-pill-suggested{
  border-radius: 999px;
  background: rgba(16,185,129,0.12); /* emerald */
  border: 1px solid rgba(16,185,129,0.18);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  color: rgba(6,95,70,1);
  white-space: nowrap;
}

.jollo-field{
  width: 100%;
  padding: 16px 16px;                      /* big fields */
  border-radius: 18px;
  border: 1px solid rgba(226,232,240,1);   /* slate-200 */
  background: rgba(248,250,252,1);         /* slate-50 */
  color: rgba(51,65,85,1);                 /* slate-700 */
  font-weight: 800;
  font-size: 1.05rem;
  outline: none;
}

.jollo-field:focus{
  border-color: rgba(6,182,212,0.75);      /* brand */
  box-shadow: 0 0 0 4px rgba(6,182,212,0.14);
}

.jollo-unit{
  border-radius: 12px;
  border: 1px solid rgba(226,232,240,1);
  background: rgba(248,250,252,1);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(71,85,105,1);
  outline: none;
}

.jollo-unit:focus{
  border-color: rgba(6,182,212,0.75);
  box-shadow: 0 0 0 4px rgba(6,182,212,0.14);
}

.jollo-confirm-btn{
  width: 100%;
  border-radius: 24px;
  padding: 18px 18px;        /* big CTA */
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 30px -18px rgba(6,182,212,0.65);
  transition: background 0.15s ease, transform 0.05s ease;
}

@media (hover:hover) and (pointer:fine){
  .jollo-confirm-btn:hover{ background: var(--brand-dark); }
}
.jollo-confirm-btn:active{ transform: scale(0.99); }

.jollo-confirm-helper{
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 700;
  color: rgba(100,116,139,1);
}


