/* Laurenceo · AI Regulation Map (/ai-regulation-map)
   Built on site.css tokens. Flat colour only: no gradients, no nested boxes.
   The globe is drawn on a canvas by assets/js/atlas.js, which reads the --atlas-* tokens below,
   so the light theme only has to change these values. */
/* The more law a place has, the more it lights up: dark slate where nothing was found, then
   indigo (guidance only), blue (law in progress), teal (framework law), green (binding in parts)
   and bright yellow-green (binding AI law). No colour stands for good or bad: red and green as
   verdicts would say either that rules are a danger or that having none is safe. Set on the page
   root so the panel, legend, table and canvas agree. */
:root {
  --atlas-ocean: #101215;
  --atlas-land: #1E2227;
  --atlas-border: #101215;
  --atlas-grat: rgba(255, 255, 255, .045);
  --atlas-rim: rgba(255, 255, 255, .1);
  --atlas-ink: #F4F6F8;
  --atlas-link: #9FBCD8;
  --atlas-rest: .62;
  --atlas-r-none: #313843;
  --atlas-r-guidance: #5B5FC4;
  --atlas-r-framework: #2FA8AC;
  --atlas-r-partial: #58C987;
  --atlas-r-binding: #DDE65C;
  --atlas-r-progress: #3F84CE;
}
html[data-theme="light"] {
  --atlas-ocean: #EAEEF3;
  --atlas-land: #D9DFE6;
  --atlas-border: #EAEEF3;
  --atlas-grat: rgba(16, 22, 29, .05);
  --atlas-rim: rgba(16, 22, 29, .12);
  --atlas-ink: #12161B;
  --atlas-link: #213547;
  --atlas-rest: .55;
  --atlas-r-none: #C5CCD5;
  --atlas-r-guidance: #6E6BCB;
  --atlas-r-framework: #1F8E94;
  --atlas-r-partial: #2F9F60;
  --atlas-r-binding: #A9B80F;
  --atlas-r-progress: #3B76C4;
}

.atlas-hero { padding-block: calc(var(--nav-clear) + var(--hero-gap)) 0; }
.atlas-hero__inner { max-width: 880px; }
.atlas-hero h1 { margin-top: 20px; font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem); font-weight: 650; line-height: 1; letter-spacing: -.046em; }
.atlas-hero .standfirst a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.atlas-hero .standfirst a:hover { color: var(--accent-hover); }
.atlas-hero .standfirst { margin-top: 16px; max-width: 40em; font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); }
.atlas-hero__meta { margin-top: 12px; font-size: var(--fs-small); font-weight: 500; color: var(--text-3); }

/* ---------- Stage: globe beside the reading panel ---------- */
.atlas-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
  margin-top: clamp(32px, 4vw, 56px);
}
.atlas-globe { min-width: 0; }
.atlas-globe__frame {
  position: relative;
  width: 100%;
  max-width: min(660px, 74vh);
  margin-inline: auto;
  aspect-ratio: 1;
}
.atlas-globe canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  border-radius: 50%;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.atlas-globe canvas.is-dragging { cursor: grabbing; }
.atlas-globe canvas.is-over { cursor: pointer; }
.atlas-tip {
  position: absolute; left: 0; top: 0; z-index: 2;
  max-width: 240px;
  padding: 7px 12px 8px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-caption); font-weight: 600; line-height: 1.3;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s var(--ease);
  white-space: nowrap;
}
.atlas-tip.is-on { opacity: 1; }
.atlas-tip span { display: block; font-weight: 500; color: var(--text-2); }
/* Place names on the globe: quiet glass pills, no outline */
.atlas-label {
  position: absolute; left: 0; top: 0; z-index: 1;
  padding: 5px 11px 6px;
  border-radius: var(--r-pill);
  background: rgba(20, 22, 25, .72);
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  color: var(--text);
  font-size: .8125rem; font-weight: 600; line-height: 1.2; letter-spacing: -.005em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
  will-change: transform;
}
.atlas-label.is-on { opacity: 1; }
html[data-theme="light"] .atlas-label { background: rgba(255, 255, 255, .78); }
.atlas-hint { transition: color .2s var(--ease); margin-top: 14px; text-align: center; font-size: var(--fs-caption); font-weight: 500; color: var(--text-3); }

/* Legend doubles as the filter */
.atlas-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.atlas-legend button {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 0 14px;
  border: 0; border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-2);
  font: inherit; font-size: var(--fs-caption); font-weight: 600;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.atlas-legend button:hover { background: var(--surface-2); color: var(--text); }
.atlas-legend button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--tone); }
.atlas-legend b { font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.atlas-legend .diamond { width: 8px; height: 8px; }

/* ---------- Panel: one surface, sections split by hairlines ---------- */
.atlas-panel {
  min-width: 0;
  padding: clamp(24px, 2.6vw, 34px);
  border-radius: var(--r-card);
  background: var(--surface);
}
.atlas-panel:focus { outline: none; }
.atlas-search { position: relative; }
.atlas-search svg { position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; color: var(--text-3); pointer-events: none; }
.atlas-search input {
  width: 100%; height: 50px;
  padding: 0 18px 1px 46px;
  border: 0; border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text);
  font: inherit; font-size: var(--fs-body); font-weight: 550; letter-spacing: -.01em;
  appearance: none; -webkit-appearance: none;
  transition: box-shadow .2s var(--ease);
}
.atlas-search input::placeholder { color: var(--text-3); font-weight: 500; }
.atlas-search input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
.atlas-search ul {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 5;
  margin: 0; padding: 6px; list-style: none;
  border-radius: 20px;
  background: var(--surface-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .34);
}
.atlas-search li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 14px; border-radius: 14px;
  font-size: var(--fs-small); font-weight: 600; color: var(--text);
  cursor: pointer;
}
.atlas-search li span { flex: none; font-size: var(--fs-caption); font-weight: 500; color: var(--text-3); }
.atlas-search li[aria-selected="true"], .atlas-search li:hover { background: var(--surface); }
.atlas-search li.is-empty { color: var(--text-3); font-weight: 500; cursor: default; background: none; }
html[data-theme="light"] .atlas-search ul { box-shadow: 0 18px 40px rgba(16, 22, 29, .14); }
.atlas-view { margin-top: 26px; }
.atlas-view[hidden] { display: none; }
.atlas-regime { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-small); font-weight: 600; color: var(--tone, var(--text-2)); }
.atlas-view h2 { margin-top: 12px; font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); font-weight: 650; line-height: 1.05; letter-spacing: -.035em; overflow-wrap: anywhere; }
.atlas-lead { margin-top: 14px; font-size: var(--fs-lead); font-weight: 550; line-height: 1.4; color: var(--text); }
.atlas-body { margin-top: 12px; font-size: var(--fs-small); line-height: 1.6; color: var(--text-2); }
.atlas-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.atlas-block h3 { font-size: var(--fs-caption); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }

.atlas-vs { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: var(--fs-small); line-height: 1.4; table-layout: fixed; }
.atlas-vs th, .atlas-vs td { padding: 9px 0; text-align: left; vertical-align: top; font-weight: 500; overflow-wrap: anywhere; }
.atlas-vs thead th { padding-top: 0; font-size: var(--fs-caption); font-weight: 600; color: var(--text-3); }
.atlas-vs tbody th { width: 34%; padding-right: 12px; color: var(--text-3); }
.atlas-vs tbody td { padding-right: 12px; color: var(--text); font-weight: 600; }
.atlas-vs tbody td:last-child { padding-right: 0; color: var(--text-2); font-weight: 500; }
.atlas-vs tbody tr + tr > * { border-top: 1px solid var(--line); }

.atlas-list { margin-top: 12px; padding: 0; list-style: none; }
.atlas-list li { padding: 10px 0; font-size: var(--fs-small); line-height: 1.45; }
.atlas-list li + li { border-top: 1px solid var(--line); }
.atlas-list strong { display: block; font-weight: 600; color: var(--text); }
.atlas-list span, .atlas-list time { color: var(--text-2); }
.atlas-list a { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.atlas-list a:hover { color: var(--accent-hover); }
.atlas-reach { margin-top: 10px; font-size: var(--fs-small); line-height: 1.55; color: var(--text); }
.atlas-source { margin-top: 22px; font-size: var(--fs-caption); line-height: 1.5; color: var(--text-3); }
.atlas-source a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.atlas-back {
  margin-top: 22px; padding: 0; border: 0; background: none;
  color: var(--accent); font: inherit; font-size: var(--fs-small); font-weight: 600; cursor: pointer;
}
.atlas-back:hover { color: var(--accent-hover); }

/* World view numbers */
.atlas-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.atlas-stats dt { font-size: var(--fs-caption); font-weight: 500; line-height: 1.35; color: var(--text-3); }
.atlas-stats dd { margin: 0 0 6px; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); font-weight: 650; line-height: 1; letter-spacing: -.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.atlas-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }

/* ---------- Deadlines ---------- */
.atlas-dates { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.atlas-dates li {
  display: grid;
  grid-template-columns: minmax(150px, .5fr) minmax(0, 1.5fr) auto;
  gap: 8px 32px; align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.atlas-dates time { font-size: var(--fs-card); font-weight: 650; letter-spacing: -.025em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.atlas-dates p { margin: 0; font-size: var(--fs-small); line-height: 1.55; color: var(--text-2); }
.atlas-dates p button { display: block; margin-bottom: 4px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-body); font-weight: 600; cursor: pointer; text-align: left; }
.atlas-dates p button:hover { color: var(--accent-hover); }
.atlas-dates .atlas-in { font-size: var(--fs-small); font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ---------- Table of every jurisdiction ---------- */
.atlas-table button { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.atlas-table button:hover { color: var(--accent-hover); }
.atlas-table .atlas-regime { font-size: inherit; white-space: nowrap; }
.atlas-method { max-width: var(--measure); }
.atlas-method p { font-size: var(--fs-body); line-height: 1.65; color: var(--text-2); }
.atlas-method p + p { margin-top: 16px; }
.atlas-method a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

:is(.atlas-legend button, .atlas-back, .atlas-dates button, .atlas-table button):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* The globe shows keyboard focus on its hint line, not as a ring around the sphere */
.atlas:has(canvas:focus-visible) .atlas-hint { color: var(--text); }

@media (max-width: 980px) {
  .atlas-stage { grid-template-columns: minmax(0, 1fr); }
  .atlas-globe__frame { max-width: 520px; }
}
@media (max-width: 640px) {
  .atlas-dates li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
  .atlas-dates li p { grid-column: 1 / -1; grid-row: 2; }
  .atlas-stats { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-tip { transition: none; }
}

/* The record is long: it scrolls inside its own frame under a fixed heading row */
.atlas-record { max-height: min(640px, 78vh); overflow: auto; }
.atlas-record thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }

/* ---------- Liquid glass ----------
   The same pane as the menu bar in site.css: a clear, lightly tinted sheet that blurs and enriches
   what is behind it, with light caught on the rim and a soft inner glow. The reading panel floats
   over the edge of the globe, so the map shows through it. */
.atlas-glass {
  position: relative;
  isolation: isolate;
  background: rgba(18, 23, 30, .42);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  backdrop-filter: blur(22px) saturate(185%);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, .035);
}
.atlas-glass::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; padding: 1px;
  pointer-events: none;
  background: var(--rim, rgba(255, 255, 255, .1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
html[data-theme="light"] .atlas-glass { background: rgba(255, 255, 255, .58); box-shadow: inset 0 0 22px rgba(255, 255, 255, .5); }
html[data-theme="light"] .atlas-glass::before { background: linear-gradient(135deg, rgba(16, 22, 29, .2) 0%, rgba(16, 22, 29, .07) 26%, rgba(16, 22, 29, .07) 74%, rgba(16, 22, 29, .2) 100%); }
.atlas-tip.atlas-glass { position: absolute; background: rgba(18, 23, 30, .5); -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%); box-shadow: inset 0 0 10px rgba(255, 255, 255, .04); }
html[data-theme="light"] .atlas-tip.atlas-glass { background: rgba(255, 255, 255, .66); }
.atlas-legend button.atlas-glass { background: rgba(18, 23, 30, .3); -webkit-backdrop-filter: blur(8px) saturate(180%); backdrop-filter: blur(8px) saturate(180%); }
.atlas-legend button.atlas-glass:hover { background: rgba(255, 255, 255, .06); }
.atlas-legend button.atlas-glass[aria-pressed="true"] { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px var(--tone); }
html[data-theme="light"] .atlas-legend button.atlas-glass { background: rgba(255, 255, 255, .5); }
/* Inside the glass panel the search field is a quiet tint, not a second pane */
.atlas-panel.glass .atlas-search input { background: rgba(255, 255, 255, .055); box-shadow: inset 0 0 14px rgba(255, 255, 255, .035); }
.atlas-panel.glass .atlas-search input:focus { box-shadow: inset 0 0 0 1.5px var(--accent), inset 0 0 14px rgba(255, 255, 255, .035); }
html[data-theme="light"] .atlas-panel.glass .atlas-search input { background: rgba(16, 22, 29, .05); }
.atlas-search ul.atlas-glass { position: absolute; background: rgba(22, 26, 32, .86); -webkit-backdrop-filter: blur(24px) saturate(185%); backdrop-filter: blur(24px) saturate(185%); box-shadow: 0 18px 40px rgba(0, 0, 0, .34), inset 0 0 22px rgba(255, 255, 255, .035); }
html[data-theme="light"] .atlas-search ul.atlas-glass { background: rgba(255, 255, 255, .9); box-shadow: 0 18px 40px rgba(16, 22, 29, .14); }
.atlas-search li[aria-selected="true"], .atlas-search li:hover { background: rgba(255, 255, 255, .07); }
html[data-theme="light"] .atlas-search li[aria-selected="true"], html[data-theme="light"] .atlas-search li:hover { background: rgba(16, 22, 29, .06); }
.atlas-search li.is-empty, .atlas-search li.is-empty:hover { background: none; }

/* Wide screens: the globe and the pane form one centred group. The globe keeps its own space
   and the pane rests on its right edge, so nothing is pushed to one side. */
@media (min-width: 981px) {
  .atlas-stage { --size: clamp(420px, calc(100vh - 236px), 720px); --overlap: 64px; display: flex; justify-content: center; align-items: center; gap: 0; }
  .atlas-globe { flex: 0 0 var(--size); width: var(--size); }
  .atlas-globe__frame { max-width: none; width: var(--size); margin: 0; }
  .atlas-panel { flex: 0 1 500px; min-width: 380px; margin-left: calc(var(--overlap) * -1); }
}
@media (prefers-reduced-transparency: reduce) {
  .atlas-glass, .atlas-panel.glass, .atlas-label.glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}

/* ---------- The real pane ----------
   The reading panel and the two place labels are the site's own .glass with data-lens, so in
   Chromium site.js gives each an edge lens cut to its exact size. The lens is rebuilt whenever a
   pane changes size, so these panes are kept from changing size while they are on show:
   the panel has a fixed height on wide screens and scrolls inside, and a label is only shown once
   the lens for its current text is in place (see place() in atlas.js). No outer shadows: in
   Chromium an outer shadow shifts an SVG backdrop filter. */
.atlas-panel.glass {
  --glass-fx: blur(6px) saturate(115%);
  z-index: 2;
  border-radius: var(--r-card);
  background: rgba(8, 11, 16, .9);
}
html[data-theme="light"] .atlas-panel.glass { background: rgba(255, 255, 255, .9); }
.atlas-label.glass {
  --glass-fx: blur(5px) saturate(185%);
  position: absolute;
  background: rgba(18, 23, 30, .3);
  transition: opacity .25s var(--ease);
}
html[data-theme="light"] .atlas-label.glass { background: rgba(255, 255, 255, .5); }
@media (min-width: 981px) {
  .atlas-panel.glass { display: flex; flex-direction: column; height: clamp(420px, calc(100vh - 276px), 660px); }
  /* The view scrolls inside the pane with no scrollbar; its last lines fade out at the pane's foot */
  .atlas-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; margin-top: 10px; margin-bottom: -8px; -webkit-mask-image: linear-gradient(#000 calc(100% - 44px), transparent); mask-image: linear-gradient(#000 calc(100% - 44px), transparent); }
  .atlas-scroll::-webkit-scrollbar { display: none; }
  .atlas-scroll:focus-visible { outline: none; }
  .atlas-scroll .atlas-view { margin-top: 16px; padding-bottom: 40px; }
}
/* Narrow screens: the panel sits below the globe with nothing behind it and grows with its
   content, so it keeps the plain pane (blur only) and never waits on a lens. */
@media (max-width: 980px) {
  .atlas-panel.glass { -webkit-backdrop-filter: blur(6px) saturate(115%) !important; backdrop-filter: blur(6px) saturate(115%) !important; }
}

/* Kind-of-rule markers: the swatch carries the map colour, the words stay neutral */
.atlas-regime { color: var(--text); }
.atlas-table .atlas-regime { color: var(--text-2); font-weight: 500; }
[data-regime] > .diamond { width: 10px; height: 10px; border-radius: 50%; transform: none; background: var(--swatch, var(--atlas-land)); box-shadow: none; }
[data-regime="binding"] { --swatch: var(--atlas-r-binding); }
[data-regime="partial"] { --swatch: var(--atlas-r-partial); }
[data-regime="framework"] { --swatch: var(--atlas-r-framework); }
[data-regime="guidance"] { --swatch: var(--atlas-r-guidance); }
[data-regime="progress"] { --swatch: var(--atlas-r-progress); }
[data-regime="none"] { --swatch: var(--atlas-r-none); }
.atlas-legend button[data-regime][aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); }

/* The key sits above the globe, so the globe and the pane fit between the menu and the Ask bar */
.atlas-keys { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-top: clamp(20px, 2.4vw, 30px); }
.atlas-keys .atlas-legend { justify-content: flex-start; margin-top: 0; }
.atlas-keys .atlas-hint { margin-top: 0; text-align: left; }
.atlas-stage { margin-top: 18px; scroll-margin-top: calc(var(--nav-clear) + 14px); }

/* Touch: any swipe on the globe turns the globe (touch-action: none on the canvas). The page
   scrolls from everywhere else, and the hint says so. */
.atlas-hint__touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .atlas-hint__mouse { display: none; }
  .atlas-hint__touch { display: inline; }
}
