/* The atlas plate (home hero): the United States on canvas, with a title block (.at-cart), a dossier
   slip (.at-slip) and printed furniture. Drawn by lib/atlas.js, which reads --at-pad and --at-slip-w.
   Palette from dossier.css. */
.atlas { --at-sea: #e8e3d6; --at-slip-w: 392px; --at-pad: 16px; --at-fb: 38px; position: relative; border-bottom: 1px solid var(--ink); background: var(--at-sea); }
.at-plate { position: relative; height: clamp(720px, calc(100vh - 82px), 920px); }
.at-map { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.at-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.at-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; overflow: visible; }
.at-labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; }

/* the printed frame: a double rule (its degree ticks are drawn by atlas.js) and the imprint below it */
.at-frame { position: absolute; inset: var(--at-pad) var(--at-pad) var(--at-fb); border: 1px solid var(--ink); pointer-events: none; z-index: 2; }
.at-frame::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(20, 20, 20, .5); }
.at-src { position: absolute; z-index: 5; left: var(--at-pad); right: var(--at-pad); bottom: 12px; margin: 0; font: 400 10.5px/1.3 var(--mono); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }

/* the plate's own title, top right */
.at-head { position: absolute; top: calc(var(--at-pad) + 46px); right: calc(var(--at-pad) + 24px); transition: opacity .3s; z-index: 5; display: flex; align-items: baseline; gap: 14px; max-width: calc(100% - 640px); margin: 0;
  font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); pointer-events: none; }
.at-head [data-at="plate"] { flex: none; font: italic 500 16px/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.at-head [data-at="title"] { text-align: right; }

/* the title block, laid on the sea */
.at-cart { position: absolute; z-index: 6; left: calc(var(--at-pad) + 40px); top: calc(var(--at-pad) + 46px); bottom: calc(var(--at-fb) + 26px); width: 468px; display: flex; flex-direction: column; }
.at-cart .kick { color: var(--body); }
.at-cart h1 { font-size: 68px; margin: 22px 0 22px; }
.at-cart .lede { font-size: 17px; margin: 0 0 30px; max-width: 25em; }
.at-find { position: relative; margin: auto 0 0; padding: 18px 0 0; border-top: 1.5px solid var(--ink); }
.at-find label { display: block; margin-bottom: 10px; font: 500 10.5px/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.at-row { display: flex; gap: 8px; }
.at-in { position: relative; flex: 1; min-width: 0; }
.at-in svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; fill: none; stroke: var(--mute); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.at-find input { width: 100%; font: 400 16px/1.3 var(--sans); color: var(--ink); padding: 13px 14px 13px 40px; border: 1px solid var(--ink); border-radius: 3px; background: #fff; -webkit-appearance: none; appearance: none; }
.at-find input::placeholder { color: #8f8a80; }
.at-find input:focus { outline: none; box-shadow: 0 0 0 3px rgba(20, 20, 20, .1); }
.at-loc { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 3px; background: transparent; color: var(--ink); font: 600 14px/1 var(--sans); cursor: pointer; }
.at-loc:hover { background: #fff; }
.at-loc svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.at-sug { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0 0 8px; padding: 6px 0; list-style: none; background: #fff; border: 1px solid var(--ink); border-radius: 3px; box-shadow: var(--shadow-sm); z-index: 9; max-height: 320px; overflow: auto; }
.at-sug[hidden] { display: none; }
.at-sug li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 14px; cursor: pointer; font-size: 15px; }
.at-sug li span { flex: none; font: 500 11px/1.3 var(--mono); letter-spacing: .04em; color: var(--mute); }
.at-sug li[aria-selected="true"] { background: var(--hl-soft); }
.at-sug li.none { color: var(--mute); cursor: default; }
.at-msg { min-height: 1.4em; margin: 6px 0 0; font-size: 13px; color: var(--mute); }

/* legend, scale and the buttons, along the foot of the plate */
.at-foot { position: absolute; z-index: 5; right: calc(var(--at-pad) + 24px); bottom: calc(var(--at-fb) + 18px); display: flex; align-items: flex-end; gap: 30px; pointer-events: none; }
.at-foot > * { pointer-events: auto; }
/* close in, the legend gets its own ground: the map's circles would show through it */
.at-foot::before { content: ""; position: absolute; inset: -12px -12px -12px -20px; z-index: -1; border-radius: 3px; background: rgba(240, 236, 226, .92); opacity: 0; transition: opacity .4s; }
.at-near .at-foot::before { opacity: 1; }
.at-lgs { display: grid; align-items: end; justify-items: end; }
.at-lgs > * { grid-area: 1 / 1; }
.at-legend { display: flex; align-items: flex-end; gap: 18px; transition: opacity .4s; }
.at-legend.dim { opacity: 0; pointer-events: none; }
.at-lg-c { display: flex; align-items: flex-end; gap: 14px; }
.at-lg-c span { display: flex; flex-direction: column; align-items: center; gap: 5px; font: 500 10.5px/1 var(--mono); color: var(--body); }
.at-lg-c i { display: block; border-radius: 50%; background: rgba(20, 20, 20, .78); box-shadow: 0 0 0 .9px rgba(250, 249, 245, .95); }
.at-lg-k { display: flex; flex-direction: column; gap: 7px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--body); }
.at-lg-k span { display: flex; align-items: center; gap: 8px; }
.at-lg-k span:first-child { color: var(--ink); }
.at-scale { display: flex; flex-direction: column; gap: 5px; font: 500 10.5px/1 var(--mono); color: var(--body); }
.at-scale i { display: block; height: 6px; border: 1px solid var(--ink); border-top: 0; background: linear-gradient(90deg, var(--ink) 0 50%, transparent 50%) bottom / 100% 2px no-repeat; }
.at-ctrl { display: flex; border: 1px solid var(--ink); border-radius: 3px; background: var(--paper); overflow: hidden; }
.at-ctrl button { width: 38px; height: 36px; border: 0; background: transparent; color: var(--ink); font: 500 19px/1 var(--sans); cursor: pointer; }
.at-ctrl button + button { border-left: 1px solid var(--ink); }
.at-ctrl button:hover { background: #fff; }
.at-ctrl [data-at-home] { width: auto; padding: 0 13px; font: 600 13px/1 var(--sans); }

/* labels on the map */
.at-ct { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 11.5px/1 var(--sans); color: var(--ink); will-change: transform; translate: 0 -50%;
  text-shadow: 0 0 3px #f7f5ef, 0 0 3px #f7f5ef, 0 0 2px #f7f5ef, 0 0 1px #f7f5ef; }
.at-cl { position: absolute; left: 0; top: 0; translate: -50% calc(-100% - 10px); padding: 4px 8px; background: var(--paper); border: 1px solid var(--ink); border-radius: 2px; font: 600 12.5px/1.2 var(--sans); white-space: nowrap; will-change: transform; }

/* the hover note */
.at-tip { position: absolute; left: 0; top: 0; z-index: 8; display: flex; flex-direction: column; gap: 2px; max-width: 290px; padding: 9px 12px 10px; background: var(--ink); color: #fff; border-radius: 3px; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.at-tip[hidden] { display: none; }
.at-tip b { font: 600 14px/1.25 var(--sans); }
.at-tip span { font-size: 12.5px; line-height: 1.4; color: #dcd8cf; }
.at-tip em { margin-top: 3px; font: normal 500 9.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--hl-soft); }
.at-tip .ksep { opacity: .4; }

/* the dossier slip */
.at-slip { position: absolute; z-index: 7; right: calc(var(--at-pad) + 22px); top: calc(var(--at-pad) + 28px); width: var(--at-slip-w); max-height: calc(100% - var(--at-pad) - 28px - var(--at-fb) - 74px); overflow: auto;
  padding: 18px 24px 16px; background: var(--sheet); border-radius: 3px; box-shadow: var(--shadow); scrollbar-width: thin; }
.at-slip[hidden] { display: none; }
.at-slip.in { animation: at-in .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes at-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.at-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--mute); font: 400 22px/1 var(--sans); cursor: pointer; }
.at-x:hover { background: var(--paper); color: var(--ink); }
.at-sl-k { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 34px 6px 0; min-height: 24px; font: 500 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.at-stamp { flex: none; transform: rotate(-5deg); border: 3px double var(--stamp); color: var(--stamp); border-radius: 4px; padding: .3em .6em .22em; font: 700 10px/1.1 var(--sans); letter-spacing: .14em; text-transform: uppercase; mix-blend-mode: multiply; }
.at-sl-name { margin: 0 0 10px; padding-bottom: 9px; border-bottom: 1.5px solid var(--ink); font: 500 31px/1.05 var(--serif); letter-spacing: -.02em; }
@media (min-width: 1101px) { .atlas.at-open .at-head { opacity: 0; } }
.at-ly { list-style: none; margin: 0; padding: 0; }
.at-ly > li:first-child { padding-top: 0; }
.at-ly > li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; padding: 7px 0 8px; border-bottom: 1px solid var(--line); }
.at-ly-no { font: italic 500 16px/1.25 var(--serif); color: var(--ink); }
.at-ly-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 1px; }
.at-ly-h b { font-weight: 600; font-size: 14.5px; }
.at-ly-st { flex: none; font: 500 9.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.at-ly-file .at-ly-st { color: var(--ink); }
.at-ly-file .at-ly-st::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--stamp); vertical-align: 1px; }
.at-ly-t { margin: 0; font-size: 12.8px; line-height: 1.45; color: var(--body); }
.at-pv { margin-top: 6px; }
.at-pv-list > div { display: grid; grid-template-columns: 20px auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 4px 0; border-top: 1px dashed var(--line); font-size: 12px; }
.at-pos { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--ink); border-radius: 50%; font: 600 10.5px/1 var(--sans); }
.at-rd { display: inline-block; height: .95em; background: var(--k-redact); border-radius: 1px; vertical-align: -1px; }
.at-pv-list em { font-style: normal; color: var(--body); }
.at-pv-list b { font: 500 10.5px/1 var(--mono); letter-spacing: .02em; background: var(--hl); padding: 3px 4px; }
.at-pv-list small { display: block; margin-top: 3px; font: 400 10.5px/1.4 var(--mono); color: var(--mute); }
.at-pv-own { display: inline-flex; gap: 6px; margin-left: 4px; }
.at-pv-wall .at-wb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 4px; height: 34px; border-bottom: 1px solid var(--ink); }
.at-pv-wall .at-wb i { display: block; background: var(--ink); }
.at-pv-wall .at-wl { display: flex; justify-content: space-between; margin-top: 4px; font: 500 9.5px/1.2 var(--mono); color: var(--mute); }
.at-pv-wall .at-wl span:nth-child(2) { text-transform: uppercase; letter-spacing: .08em; }
.at-sl-cta { position: sticky; bottom: -16px; z-index: 2; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 -24px -16px; padding: 12px 24px 16px; background: linear-gradient(rgba(255, 255, 255, 0), #fff 14px); }
.at-sl-cta .btn { padding: 11px 15px; font-size: 14px; }

/* short windows (most laptops): the headline sets in three lines, so the search box stays inside the frame */
@media (min-width: 1101px) and (max-height: 880px) { .at-cart h1 { font-size: 62px; } }
@media (min-width: 1101px) and (max-width: 1300px) { .at-src { bottom: 6px; white-space: normal; } }

/* narrow windows and phones: the title block, then the map, then the slip */
@media (max-width: 1100px) {
  .atlas { --at-pad: 10px; --at-fb: 10px; }
  .at-plate { height: auto; display: flex; flex-direction: column; }
  .at-cart { position: relative; left: auto; top: auto; bottom: auto; width: auto; order: 1; padding: 48px 40px 30px; background: var(--paper); border-bottom: 1px solid var(--ink); }
  .at-cart .cta { margin-bottom: 30px; }
  .at-find { margin-top: 0; }
  .at-sug { top: 100%; bottom: auto; margin: 6px 0 0; }
  .at-map { position: relative; inset: auto; order: 2; height: min(70vw, 640px); }
  .at-head { top: calc(var(--at-pad) + 14px); left: calc(var(--at-pad) + 16px); right: calc(var(--at-pad) + 16px); max-width: none; justify-content: space-between; }
  .at-head > span { margin: -4px -7px; padding: 4px 7px; transition: background .4s; }
  .at-zoomed .at-head > span { background: rgba(240, 236, 226, .92); }      /* coastlines and borders can run under it here */
  .at-head [data-at="title"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .at-foot { left: calc(var(--at-pad) + 16px); right: calc(var(--at-pad) + 16px); bottom: calc(var(--at-fb) + 14px); justify-content: space-between; gap: 14px; }
  .at-slip { position: relative; right: auto; top: auto; order: 3; width: auto; max-height: none; border-radius: 0; box-shadow: none; border-top: 1px solid var(--ink); padding: 24px 40px 26px; }
  .at-src { position: relative; left: auto; right: auto; bottom: auto; order: 4; padding: 12px 40px 16px; white-space: normal; background: var(--paper); border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .at-cart { padding: 36px 20px 26px; }
  .at-cart h1 { font-size: 48px; }
  .at-cart .lede { font-size: 16px; }
  .at-map { height: 108vw; max-height: 560px; }
  .at-head [data-at="title"] { display: none; }
  .at-legend .at-lg-k { display: none; }
  .at-ct { font-size: 10px; }
  .at-scale { display: none; }
  .at-src, .at-slip { padding-left: 20px; padding-right: 20px; }
  .at-loc b { display: none; }
  .at-loc { padding: 0 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .at-slip.in { animation: none; }
}
