/* ==== Compact Find (search) control ==== */
:root{
  --find-min-w: 140px;
  --find-max-w: 340px;
  --find-w: 180px;          /* default width */
  --find-input-h: 24px;     /* compact height */
}

.leaflet-control.engine-find{
  background:#fff; border:1px solid #fff; box-shadow:0 2px 14px rgba(2,8,23,.16);
  padding:6px; border-radius:8px; width:var(--find-w);
  min-width:var(--find-min-w); max-width:var(--find-max-w);
  resize:horizontal; overflow:hidden;   /* <-- resizable */
}
.engine-find .find-group{
  display:flex; align-items:center; overflow:hidden;
  border:1px solid #ced4da; border-radius:6px;
}
.engine-find input{
  flex:1 1 auto; height:var(--find-input-h);
  font-size:.82rem; padding:2px 8px; border:0; outline:none;
}
.engine-find .go{
  height:var(--find-input-h); line-height:var(--find-input-h);
  border:0; padding:0 10px; font-size:.78rem; font-weight:600;
  background:#0d6efd; color:#fff; cursor:pointer;
}
.engine-find .go:active{ transform:translateY(0.5px); }
.engine-find .clear{
  display:inline-block; margin-top:4px;
  border:1px solid #dee2e6; background:#f8f9fa; border-radius:4px;
  font-size:.78rem; line-height:1; padding:2px 6px; cursor:pointer;
}

  :root{
    /* sizing for style widget */
    --sw-min-w:210px; --sw-max-w:360px; --sw-pad:8px; --sw-gap:6px; --sw-font:12px;

    /* site header buttons */
    --nav-bg:#1b64a8;
    --nav-active:#0b57d0;

    /* page background (lighter than header bar) */
    --ui-bg:#aec2d7;

    /* TAB COLORS — tuned to match your mock */
    --tab-blue:#1f6f78;          /* base pill color (inactive) */
    --tab-blue-strong:#18575e;   /* border/depth */
    --tab-blue-active:#3a98a1;   /* active/hover lighter */
    --pill-shadow:0 2px 0 rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.15);
  }

  body{
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    background: var(--ui-bg);
  }

  /* Make sure Leaflet containers always have a size when shown */
  .map-panel{ height:650px; min-height:520px; width:100%; display:block; }
  .chart-panel{ height:240px; }
  .notes-panel{ min-height:90px; }
  .page-pane{ padding:16px; }

  /* ======= TOP BAR ======= */
  .sitebar{ background:#195B63; border-radius:8px; }
  .nav-btn{
    display:inline-block; padding:8px 18px; font-weight:600; border-radius:6px;
    text-decoration:none; color:#fff; background:var(--nav-bg); font-size:1.05rem;
  }
  .nav-btn.active{ background:var(--nav-active); }
  .nav-btn:hover{ opacity:.92; }

  /* ======= HERO ======= */
  .engine-hero{ background:#226d75; border-radius:8px; padding:14px; position:relative; }
  .engine-hero img{
    height:56px; width:auto; border-radius:6px; background:#fff; padding:4px;
    position:absolute; left:24px; top:50%; transform:translateY(-50%);
  }

  /* ======= MAIN TABS (top row pills) ======= */
  .nav-tabs{ border-bottom:0; gap:14px; }
  .nav-tabs .nav-link{
    background: linear-gradient(180deg, var(--tab-blue) 0%, #195e66 100%);
    color:#fff; border:1px solid var(--tab-blue-strong); border-radius:14px;
    box-shadow: var(--pill-shadow); font-weight:600; font-size:.92rem;
    padding: 1.0rem 1.6rem; line-height:1.1;
  }
  .nav-tabs .nav-link:hover{
    background: linear-gradient(180deg, var(--tab-blue-active) 0%, #2a848d 100%);
    border-color:#256f76; color:#fff;
  }
  .nav-tabs .nav-link.active{
    background: linear-gradient(180deg, var(--tab-blue-active) 0%, #2a848d 100%);
    border-color:#2a848d; color:#fff;
    box-shadow: var(--pill-shadow), 0 0 0 2px rgba(255,255,255,.06) inset;
  }

  /* ======= SUB-TABS (middle row pills) ======= */
  .nav-pills{ gap:10px; }
  .nav-pills .nav-link{
    background: linear-gradient(180deg, #0f7b8a 0%, #0e4e67 100%);
    border:1px solid #956aa7; color:#fff; border-radius:12px;
    font-size:.88rem; padding:.6rem 1.2rem; box-shadow: var(--pill-shadow);
  }
  .nav-pills .nav-link:hover{
    background: linear-gradient(180deg, #2bb6d1 0%, #1b6f88 100%);
    border-color:#1b6f88; color:#fff;
  }
  .nav-pills .nav-link.active{
    background: linear-gradient(180deg, #2bb6d1 0%, #1b6f88 100%);
    border-color:#1b6f88; color:#fff;
    box-shadow: var(--pill-shadow), 0 0 0 2px rgba(255,255,255,.06) inset;
  }

  /* ======= STYLE WIDGET ======= */
  .style-widget{
    background:#fff; border:1px solid #fff; box-shadow:0 2px 14px rgba(2,8,23,.16);
    border-radius:.5rem; padding:var(--sw-pad); user-select:none; width:var(--sw-min-w);
    resize:both; overflow:hidden; min-width:var(--sw-min-w); max-width:var(--sw-max-w);
    font-size:var(--sw-font); line-height:1.25;
  }
  .style-row{ display:flex; align-items:center; gap:var(--sw-gap); margin:6px 0; }
  .style-row .label{ width:34px; color:#111827; font-weight:600; }
  .style-row .sub{ width:36px; color:#6b7280; }
  .style-row input[type="range"]{ width:130px; }
  .style-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; font-weight:700; }

  /* ======= STORY MAPS ======= */
  .story-card{ display:flex; gap:12px; padding:12px 0; border-bottom:1px solid #5471ac; }
  .story-thumb{ display:block; width:92px; min-width:92px; height:92px; overflow:hidden; border-radius:8px; background:#486db8; }
  .story-thumb img{ width:100%; height:100%; object-fit:cover; }

  .coming-banner{
  background:#fff3cd;                 /* light yellow */
  border-top:1px solid #ffeeba;
  border-bottom:1px solid #ffeeba;
  text-align:center;
  font-size:.85rem;
  padding:.25rem .5rem;
  font-weight:600;
}

