/* Design review lookup (tools/design-review-lookup). Single dark theme, same
   palette as the rest of the site. Leaflet's own CSS is loaded from cdnjs. */
.drl { --ink:#E3E9EE; --muted:#A9B6C2; --line:rgba(255,255,255,.16); --gold:#FFCE45;
  --blue:#6FB0F0; --orange:#F0A04B; --red:#F07272; --purple:#B49BEA; --ok:#6FCF94;
  --panel:#10151B; --field:#0B1015; --map-bg:#0B1015;
  display: grid; grid-template-columns: minmax(300px, 400px) 1fr; color: var(--ink); font: 15px/1.55 Verdana, Tahoma, sans-serif; }
.drl-panel { display: flex; flex-direction: column; gap: 18px; padding: 20px 18px 22px; background: var(--panel); border-right: 1px solid #04060A; min-width: 0; }
.drl-eyebrow { font: 500 12.5px/1.4 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.drl h1 { margin: 6px 0 8px; font: 700 34px/1.04 'Barlow Condensed', sans-serif; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.55); }
.drl-lede { font-size: 14px; color: var(--muted); }
.drl-lede a { color: #8FC5F0; }
.drl-search { position: relative; }
.drl-search label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #fff; }
#q { width: 100%; padding: 11px 12px; font: 16px Verdana, Tahoma, sans-serif; color: var(--ink); background: var(--field); border: 1px solid #04060A; border-radius: 3px; box-shadow: inset 0 2px 4px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.14); }
#q:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
#q:disabled { opacity: .6; }
#sugg { list-style: none; position: absolute; left: 0; right: 0; z-index: 1000; margin-top: 4px; padding: 4px; max-height: 300px; overflow-y: auto; background: #1B232B; border: 1px solid #04060A; border-radius: 3px; box-shadow: 0 12px 26px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.2); }
#sugg li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 3px; font-size: 14px; }
#sugg li[aria-selected="true"], #sugg li:hover { background: linear-gradient(180deg, #4F80AE, #2A527C); color: #fff; }
#sugg .z { font: 500 12px/1.4 'IBM Plex Mono', monospace; color: var(--muted); white-space: nowrap; }
#sugg li[aria-selected="true"] .z, #sugg li:hover .z { color: #D6E7F5; }
.drl-hint { margin-top: 8px; font-size: 13px; color: var(--muted); }
.drl-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.drl-examples button { min-height: 34px; padding: 4px 12px; font: 13px Verdana, Tahoma, sans-serif; color: var(--ink); background: transparent; border: 1px solid rgba(255,255,255,.3); border-radius: 99px; }
.drl-examples button:hover, .drl-examples button:focus-visible { border-color: var(--gold); outline: none; color: #fff; }
.drl-result { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--field); border: 1px solid var(--line); border-radius: 3px; }
.drl-result[data-kind="review"] { background: #14233A; border-color: #4F80AE; }
.drl-result[data-kind="hist"] { background: #2A2113; border-color: #A8742C; }
.drl-result[data-kind="clear"] { background: #14231B; border-color: #3E7A55; }
.drl-result p { font-size: 14px; }
.drl-addr { font: 500 13px/1.4 'IBM Plex Mono', monospace; color: var(--muted); }
.drl-verdict { margin: 0; font: 700 27px/1.05 'Barlow Condensed', sans-serif; color: #fff; text-wrap: balance; }
.drl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.drl .chip { padding: 3px 8px; font: 500 12px/1.4 'IBM Plex Mono', monospace; letter-spacing: .04em; border: 1px solid currentColor; border-radius: 3px; }
.chip.b { color: var(--blue); } .chip.o { color: var(--orange); } .chip.r { color: var(--red); } .chip.p { color: var(--purple); } .chip.g { color: var(--ok); }
.drl-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13.5px; }
.drl-facts dt { color: var(--muted); }
.drl-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.drl-legend { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.drl-legend h2, .drl-about h2 { margin-bottom: 2px; font: 700 20px/1.1 'Barlow Condensed', sans-serif; letter-spacing: .02em; color: #fff; }
.drl-legend label { display: flex; align-items: center; min-height: 28px; }
.drl-legend input { margin: 0 8px 0 0; accent-color: var(--gold); }
.sw { display: inline-block; width: 18px; height: 12px; margin-right: 8px; border: 1.5px solid; border-radius: 2px; }
.sw.b { background: rgba(111,176,240,.25); border-color: var(--blue); }
.sw.w { background: rgba(111,176,240,.35); border-color: var(--blue); border-style: dashed; }
.sw.o { background: rgba(240,160,75,.3); border-color: var(--orange); }
.sw.r { width: 10px; height: 10px; margin: 0 12px 0 4px; border-radius: 50%; background: var(--red); border-color: var(--panel); }
.sw.p { background: transparent; border-color: var(--purple); border-style: dotted; }
.drl-about { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.drl-contact { font: 500 13px/1.4 'IBM Plex Mono', monospace; color: var(--ink); user-select: all; }
.drl-cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 18px; border-top: 1px solid #04060A; background: #0D1218; }
.drl-cta p { max-width: 70ch; font-size: 14px; color: #C3CDD6; }

/* map */
.drl #map { position: relative; z-index: 0; isolation: isolate; min-height: 680px; min-width: 0; background: var(--map-bg); }
.drl .leaflet-container { background: var(--map-bg); font-family: Verdana, Tahoma, sans-serif; cursor: grab; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #1B232B; color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.6); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.45; }
.leaflet-popup-content b { display: block; margin-bottom: 2px; font: 700 18px/1.1 'Barlow Condensed', sans-serif; color: #fff; }
.leaflet-bar a { background: #1B232B; color: var(--ink); border-bottom-color: rgba(255,255,255,.16); }
.leaflet-bar a:hover { background: #2A3640; color: #fff; }
.leaflet-control-attribution { background: rgba(16,21,27,.85) !important; color: var(--muted) !important; font-size: 11px; }
.leaflet-control-attribution a { color: var(--muted); }
.lbl { font: 700 13px/1 'Barlow Condensed', sans-serif; letter-spacing: .03em; color: var(--orange); text-shadow: 0 0 3px #0B1015, 0 0 3px #0B1015, 0 0 3px #0B1015; white-space: nowrap; pointer-events: none; }
.lbl.blue { color: var(--blue); }
.pin { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--gold); border: 2px solid #0B1015; box-shadow: 0 2px 6px rgba(0,0,0,.6); }

@media (max-width: 820px) {
  .drl { grid-template-columns: 1fr; }
  .drl-panel { padding: 16px 14px 18px; border-right: 0; border-bottom: 1px solid #04060A; }
  .drl h1 { font-size: 30px; }
  .drl #map { min-height: 460px; height: 62vh; }
  .drl-cta { padding: 14px; }
}

/* Embedded in an article: one column, panel above the map. Resets undo the
   article body's list, heading and spacing rules inside the tool. */
.drl-embed { grid-template-columns: minmax(0, 1fr); margin-top: 22px; border: 1px solid #04060A; border-radius: 3px; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.08); }
.drl-embed .drl-panel { border-right: 0; border-bottom: 1px solid #04060A; }
.drl-embed #map { min-height: 520px; }
.drl-embed .drl-legend { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; }
.drl-embed .drl-legend h2 { flex: 1 1 100%; }
.art-body .drl h2 { margin-top: 0; font: 700 20px/1.1 'Barlow Condensed', sans-serif; letter-spacing: .02em; color: #fff; }
.art-body .drl h2.drl-verdict { font-size: 27px; line-height: 1.05; letter-spacing: 0; }
.art-body .drl ul#sugg { padding: 4px; }
.art-body .drl li + li { margin-top: 0; }
.art-body .drl a { text-decoration: none; }
.art-body .drl > * + *, .art-body .drl p + p { margin-top: 0; }
.drl-embed-h { font: 700 22px/1.1 'Barlow Condensed', sans-serif; color: #fff; }
.drl-embed-sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.drl-src { margin-top: 8px; font-size: 13.5px; color: #A9B6C2; }
.drl-notes { max-width: 70ch; padding: 24px 18px 28px; font: 16px/1.7 Verdana, Tahoma, sans-serif; color: #D5DDE4; }
.drl-notes h2 { margin-bottom: 12px; font: 700 22px/1.3 Verdana, Tahoma, sans-serif; color: #fff; }
.drl-notes p + p { margin-top: 14px; }
.drl-notes a { text-decoration: underline; text-underline-offset: 2px; }

/* Embedded tool: boxed out as its own window so it reads as an app, not part of the prose */
.drl-embed { margin: 36px 0 12px; border: 3px solid #39424A; border-radius: 5px; box-shadow: 0 0 0 1px #04060A, 0 14px 30px rgba(0,0,0,.35); }
.drl-bar { grid-column: 1 / -1; padding: 7px 14px; background: linear-gradient(180deg, #5E8CB8 0%, #2F5B87 8%, #1E4468 100%); border-bottom: 1px solid #04060A; font: 500 12.5px/1.4 'IBM Plex Mono', monospace; letter-spacing: .18em; text-transform: uppercase; color: #DCE9F5; }
.drl-src { font-family: Verdana, Tahoma, sans-serif; }

/* Inside the site widget window (?embed=1): one fixed view, no scrolling.
   Search and verdict on the left, map on the right. The window supplies the title bar. */
html.drl-win, html.drl-win body { height: 100%; margin: 0; overflow: hidden; }
.drl.drl-in-window { height: 100vh; grid-template-columns: 42.4% minmax(0, 1fr); }
.drl-in-window .drl-panel { gap: 12px; padding: 12px 14px; overflow-y: auto; scrollbar-width: thin; border-right: 1px solid #04060A; border-bottom: 0; }
.drl-in-window .drl-examples, .drl-in-window .drl-eyebrow, .drl-in-window .drl-hint, .drl-in-window .drl-about { display: none; }
.drl-in-window h1 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.drl-in-window .drl-lede { font-size: 13px; line-height: 1.45; color: #E3E9EE; }
.drl-in-window .drl-search label { font-size: 12px; }
.drl-in-window .drl-chips { gap: 4px; }
.drl-in-window .drl .chip, .drl-in-window .chip { padding: 2px 6px; font-size: 11px; }
.drl-in-window .drl-addr { font-size: 12px; }
.drl-in-window .drl-examples { margin-top: 0; gap: 6px; }
.drl-in-window .drl-examples button { min-height: 28px; padding: 2px 10px; font-size: 12px; }
.drl-in-window .drl-result { gap: 6px; padding: 10px 12px; }
.drl-in-window .drl-result p, .drl-in-window .drl-facts { font-size: 12.5px; line-height: 1.45; }
.drl-in-window .drl-verdict { font-size: 23px; }
.drl.drl-in-window #map { min-height: 0; height: 100%; }
.drl-in-window ~ .sticky-cta { display: none !important; }
.drl-in-window .drl-legend { grid-column: 2; grid-row: 1; align-self: end; justify-self: start; z-index: 1000; margin: 0 0 24px 10px; padding: 6px 9px; gap: 0; font-size: 12px; background: rgba(16, 21, 27, .92); border: 1px solid #04060A; border-radius: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.drl-in-window .drl-legend h2 { display: none; }
.drl-in-window .drl-legend label { min-height: 22px; }
.drl-in-window .drl-panel { grid-column: 1; grid-row: 1; }
.drl.drl-in-window #map { grid-column: 2; grid-row: 1; }

/* Reserve the result card's height while the data loads, so the legend below it does not jump when the first result renders. */
.drl:not(.drl-embed) .drl-result:has(.drl-loading) { min-height: 440px; }
@media (max-width: 820px) { .drl:not(.drl-embed) .drl-result:has(.drl-loading) { min-height: 520px; } }
