/* The atlas of pages (components/sections/portfolio/Atlas.tsx), for the homepage section S9 and /examples/. A static
   stylesheet with the atl- prefix instead of a CSS module: see cls.ts for why. Everything that moves is moved by
   transform, opacity or a dash offset written by the one paint; nothing here animates on its own except hover, the
   controls and the phone deck's steps. */

/* The example pages' Archivo, from the one file the hero already serves (public/hero/archivo-sub.woff2), so the
   homepage downloads it once; no preload: it is fetched when a page's text first renders. The fallback carries the
   metric overrides next/font computed for it. */
@font-face {
  font-family: AtlasArchivo;
  src: url("/hero/archivo-sub.woff2") format("woff2");
  font-weight: 500 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: AtlasArchivoFallback;
  src: local(Arial);
  ascent-override: 85.41%;
  descent-override: 20.43%;
  line-gap-override: 0%;
  size-adjust: 102.8%;
}
.atl-atlas {
  position: relative;
  background: var(--paper);
  --font-archivo: AtlasArchivo, AtlasArchivoFallback;
}
.atl-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 560px;
  overflow: clip;
}
/* The words paint from the HTML at once; the sheet and the rail come up once the layout has placed them. */
.atl-stage .atl-cam,
.atl-stage .atl-rail {
  opacity: 0;
}
.atl-stage[data-ready] .atl-cam,
.atl-stage[data-ready] .atl-rail {
  opacity: 1;
  transition: opacity 0.4s var(--ease-ink);
}
.atl-atlas[data-mode="page"] .atl-stage,
.atl-atlas[data-reduced] .atl-stage {
  position: relative;
}
.atl-atlas[data-mode="page"] .atl-stage {
  height: max(640px, 100svh);
}

/* ---- the camera, the sheet and what stands on it ---- */
.atl-cam {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  perspective-origin: 0 0;
  will-change: transform;
}
.atl-sheet {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.atl-sheet > :first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(35, 32, 27, 0.08), 0 40px 80px -40px rgba(35, 32, 27, 0.45);
}
.atl-over {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: translateZ(0.5px);
  pointer-events: none;
}
.atl-wash {
  fill: var(--w-overlay);
  fill-opacity: 0.32;
  stroke: var(--w-overlay);
  stroke-width: 3;
  opacity: 0;
}
.atl-lot path {
  fill: color-mix(in srgb, var(--red) 9%, transparent);
  stroke: var(--red);
  stroke-width: 3;
  stroke-dasharray: 9 7;
}
.atl-lot text {
  fill: var(--red);
  font-family: var(--font-display), Georgia, serif;
  font-size: 24px;
  letter-spacing: 0.32em;
  text-anchor: middle;
}
.atl-leg {
  fill: none;
  stroke: var(--red);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}

.atl-pen {
  fill: var(--red);
  stroke: var(--card);
  stroke-width: 3;
  opacity: 0;
}
.atl-spot {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.atl-shadow {
  position: absolute;
  transform-origin: 50% 100%;
  background: radial-gradient(50% 100% at 50% 100%, rgba(35, 32, 27, 0.42), rgba(35, 32, 27, 0.12) 55%, transparent 80%);
  opacity: 0;
  pointer-events: none;
}
.atl-pin {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
}
.atl-pin i {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px var(--card), 0 3px 8px rgba(35, 32, 27, 0.4);
}
.atl-pin em {
  opacity: clamp(0, 1 - var(--up, 0) * 1.6, 1);
  position: absolute;
  left: 15px;
  top: 4px;
  font-style: normal;
  font-family: var(--font-display), Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--red);
  text-shadow: 0 0 4px var(--paper), 0 0 2px var(--paper);
}
.atl-leaf {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  transform-origin: 50% 100%;
  opacity: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(35, 32, 27, 0.18), 0 10px 24px -10px rgba(35, 32, 27, 0.5);
  backface-visibility: hidden;
  will-change: transform;
  translate: 0 0 0;
  transition: translate 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.atl-leaf:hover {
  translate: 0 0 26px;
  box-shadow: 0 0 0 2px var(--red), 0 24px 40px -14px rgba(35, 32, 27, 0.55);
}
.atl-leafPage {
  position: absolute;
  left: 0;
  top: 0;
  width: 390px;
  height: 844px;
  overflow: hidden;
  transform-origin: 0 0;
  pointer-events: none;
  text-align: left;
}
.atl-blank {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2.5px dashed var(--red);
  border-radius: 3px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  transform-origin: 50% 100%;
  opacity: 0;
  backface-visibility: hidden;
}
.atl-blank span {
  font-family: var(--font-display), Georgia, serif;
  font-style: italic;
  font-size: 26px;
  color: var(--red);
}

/* ---- the page in the hand ---- */
.atl-card {
  position: absolute;
  z-index: 4;
  transform-origin: 0 0;
  visibility: hidden;
  will-change: transform, opacity;
}
.atl-cardIn {
  position: relative;
}
.atl-faces {
  position: relative;
  perspective: 1800px;
}
.atl-cardIn[data-frame="phone"] .atl-faces {
  width: 390px;
}
.atl-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: #fff;
}
.atl-faceBack {
  transform: rotateY(-180deg);
  background: #f4f1ea;
}
.atl-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
/* In the film the page reads itself; it scrolls by hand only once it is taken (a click, the rail, the index). */
.atl-atlas[data-mode="film"]:not([data-focus]) .atl-scroll {
  overflow: hidden;
}
.atl-atlas[data-mode="film"]:not([data-focus]) .atl-card {
  cursor: pointer;
}
.atl-scroll:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}
.atl-cardIn[data-frame="browser"] .atl-scroll {
  scrollbar-width: thin;
}
.atl-proof {
  position: relative;
}
.atl-mark {
  position: absolute;
  border: 2px solid var(--red);
  border-radius: 8px;
  pointer-events: none;
}
.atl-mark b {
  position: absolute;
  left: -13px;
  top: -13px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono), monospace;
  font-size: 14px;
  font-weight: 600;
}
.atl-cardMark {
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.atl-cardMark span {
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
}

/* ---- the margin: the firm, and on the back the findings ---- */
.atl-margin {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  bottom: 120px;
  width: min(34vw, 420px);
  opacity: 0;
  pointer-events: none;
}
.atl-atlas[data-focus] .atl-margin {
  pointer-events: auto;
}
/* On /examples/ the margin is a sheet the height of the stage: the controls first, the rest scrolls. */
.atl-atlas[data-mode="page"] .atl-margin {
  top: 88px;
  bottom: 112px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 12px;
  width: min(28vw, 400px);
}
.atl-atlas[data-mode="page"] .atl-marginScroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius);
  scrollbar-width: thin;
}
.atl-atlas[data-mode="page"] .atl-ctrls {
  margin-top: 0;
}
.atl-atlas[data-mode="page"] .atl-mLists {
  display: block;
}
.atl-atlas[data-mode="page"] .atl-mBack {
  opacity: 1;
  visibility: visible;
}
.atl-atlas[data-mode="page"] .atl-marginIn {
  background: var(--card);
}
.atl-marginIn {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(35, 32, 27, 0.4);
}
.atl-mCount {
  margin: 0 0 8px;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--w-accent-paper);
}
.atl-mFirm {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: var(--text-xl);
  line-height: 1.1;
  color: var(--green);
}
.atl-mH1 {
  margin: 6px 0 0;
  font-size: var(--text-md);
  color: var(--ink);
}
.atl-mUrl {
  margin: 8px 0 0;
  font-size: var(--text-xs);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.atl-mUrl span {
  color: var(--ink-3);
}
/* The page's anatomy on the front, the findings on the back, in one cell: the margin never changes size. */
.atl-mLists {
  display: grid;
}
.atl-mFront,
.atl-mBack {
  grid-area: 1 / 1;
  transition: opacity 0.35s var(--ease-ink), visibility 0.35s;
}
.atl-mBack,
.atl-atlas[data-side="back"] .atl-mFront,
.atl-atlas[data-mode="film"]:not([data-focus]) .atl-stage[data-flip] .atl-mFront {
  opacity: 0;
  visibility: hidden;
}
.atl-atlas[data-side="back"] .atl-mBack,
.atl-atlas[data-mode="film"]:not([data-focus]) .atl-stage[data-flip] .atl-mBack {
  opacity: 1;
  visibility: visible;
}
.atl-anat {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.atl-anat button {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  text-align: left;
  color: var(--ink-2);
  cursor: pointer;
}
.atl-anat b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  font-weight: 500;
}
.atl-anat button:hover,
.atl-marginIn[data-step="0"] [data-i="0"] button,
.atl-marginIn[data-step="1"] [data-i="1"] button,
.atl-marginIn[data-step="2"] [data-i="2"] button,
.atl-marginIn[data-step="3"] [data-i="3"] button,
.atl-marginIn[data-step="4"] [data-i="4"] button {
  color: var(--ink);
}
.atl-marginIn[data-step="0"] [data-i="0"] b,
.atl-marginIn[data-step="1"] [data-i="1"] b,
.atl-marginIn[data-step="2"] [data-i="2"] b,
.atl-marginIn[data-step="3"] [data-i="3"] b,
.atl-marginIn[data-step="4"] [data-i="4"] b {
  border-color: var(--w-accent-paper);
  background: var(--w-accent-paper);
  color: var(--card);
}
.atl-anat button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}
.atl-mHead {
  margin: 18px 0 8px;
  font-family: var(--font-mono), monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}
.atl-notes {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.atl-notes li {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 10px;
  opacity: clamp(0, calc(var(--notes, 6) - var(--i)), 1);
}
.atl-notes b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono), monospace;
  font-size: 12px;
}
.atl-nLabel {
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}
.atl-nText {
  font-size: var(--text-sm);
  line-height: 1.35;
  color: var(--ink);
}
.atl-svc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}
.atl-svc li {
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
}
.atl-mBody {
  margin: 0 0 10px;
  font-size: var(--text-sm);
  color: var(--ink-2);
}

/* ---- controls ---- */
.atl-ctrls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.atl-ctrls[hidden] {
  display: none;
}
.atl-btn,
.atl-btnLine,
.atl-btnIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 99px;
  font: 600 var(--text-sm) / 1 var(--font-body), system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.atl-btn {
  border: 0;
  background: var(--green);
  color: var(--card);
}
.atl-btn:hover {
  background: var(--green-2);
}
.atl-btnLine {
  border: 1.5px solid var(--green);
  background: var(--card);
  color: var(--green);
}
.atl-btnLine:hover {
  background: var(--paper-2);
}
.atl-btnIcon {
  width: 44px;
  padding: 0;
  border: 1.5px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
}
.atl-btnIcon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.atl-btn:focus-visible,
.atl-btnLine:focus-visible,
.atl-btnIcon:focus-visible,
.atl-token:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* ---- the hand-over card ---- */
.atl-cta {
  position: absolute;
  z-index: 3;
  padding: 22px 24px;
  border: 2px dashed var(--red);
  border-radius: var(--radius);
  background: var(--card);
  opacity: 0;
  visibility: hidden;
}
.atl-ctaH {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: var(--text-xl);
  line-height: 1.1;
  color: var(--green);
}
.atl-ctaH em {
  color: var(--red);
}
.atl-ctaBody {
  margin: 10px 0 16px;
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.atl-ctaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

/* ---- the rail of the 12 ---- */
.atl-rail {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 14px;
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(35, 32, 27, 0.5);
  transform: translateX(-50%);
}
.atl-token {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 56px;
  padding: 6px 4px 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  --logo-ink: var(--ink);
  --logo-accent: var(--ink-2);
  --logo-accent-2: var(--ink-3);
  --logo-knock: var(--card);
}
.atl-token:hover,
.atl-token[aria-current] {
  background: var(--paper-2);
}
.atl-tokenMark svg {
  display: block;
  width: 28px;
  height: 28px;
}
.atl-tokenName {
  font-family: var(--font-mono), monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.atl-token[aria-current] {
  box-shadow: inset 0 -3px 0 var(--red);
}
.atl-token[aria-current] .atl-tokenName {
  color: var(--ink);
}

/* ---- the index: the text twin ---- */
.atl-index {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
}
.atl-indexH {
  margin: 0 0 14px;
  font-family: var(--font-display), Georgia, serif;
  font-weight: 400;
  font-size: var(--text-sm);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
}
.atl-indexList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-2);
}
.atl-indexList a {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  grid-template-areas: "no trade town" "no firm firm" "no page page";
  column-gap: 10px;
  min-height: 44px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.atl-indexList a:hover .atl-iFirm {
  color: var(--red);
}
.atl-indexList a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}
.atl-iNo {
  grid-area: no;
  font-size: var(--text-xs);
  color: var(--red);
}
.atl-iTrade {
  grid-area: trade;
  font-family: var(--font-mono), monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.atl-iTown {
  grid-area: town;
  font-size: var(--text-xs);
  color: var(--ink-2);
}
.atl-iFirm {
  grid-area: firm;
  font-family: var(--font-display), Georgia, serif;
  font-size: var(--text-md);
  color: var(--green);
}
.atl-iPage {
  grid-area: page;
  font-size: var(--text-sm);
  color: var(--ink-2);
}

/* ---- the section's own words ---- */
.atl-section {
  position: relative;
  background: var(--paper);
  padding-bottom: 72px;
}
.atl-head {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  top: clamp(28px, 7vh, 72px);
  width: min(40vw, 560px);
}
.atl-h2 {
  margin: 14px 0 0;
  font-family: var(--font-display), Georgia, serif;
  font-weight: 400;
  font-size: var(--text-2xl);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--green);
}
.atl-h2 em {
  color: var(--w-accent-paper);
}
.atl-lede {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--ink-2);
}
.atl-count {
  margin: 18px 0 0;
  font-size: var(--text-sm);
  color: var(--red);
  opacity: 0;
}
.atl-countCap {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  top: clamp(28px, 7vh, 72px);
  max-width: min(44vw, 520px);
  margin: 0;
}
.atl-fine {
  max-width: var(--max);
  margin: 28px auto 0;
  padding: 0 var(--gutter);
  font-size: var(--text-xs);
  color: var(--ink-3);
}

/* ---- /examples/ ---- */
.atl-pageMain {
  background: var(--paper);
  padding-bottom: 72px;
}
.atl-pageHead {
  top: 92px;
  width: min(28vw, 400px);
}
.atl-h1 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-weight: 400;
  font-size: var(--text-2xl);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--green);
}
.atl-h1 em {
  color: var(--red);
}
.atl-close {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--gutter) 0;
}

/* ---- phones: the strip and the deck (Deck.tsx) ---- */
@media (max-width: 699px) {
  .atl-head,
  .atl-pageHead {
    position: static;
    width: auto;
    padding: 0 var(--gutter);
  }
  .atl-atlas[data-mode="film"] .atl-head {
    padding-top: 64px;
  }
  .atl-atlas[data-mode="page"] .atl-head {
    padding-top: 88px;
  }
  .atl-countCap {
    position: static;
    max-width: none;
    margin: 14px var(--gutter) 0;
    opacity: 1;
  }
  .atl-atlas[data-mode="page"] .atl-count {
    opacity: 1;
  }
  .atl-lede {
    font-size: var(--text-md);
  }
}
.atl-phone {
  padding: 18px 0 0;
}
.atl-strip {
  position: relative;
  margin: 0 var(--gutter);
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 30px -24px rgba(35, 32, 27, 0.5);
}
.atl-stripSheet {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  transition: transform 0.9s var(--ease-ink);
}
.atl-stripSheet > :first-child {
  width: 100%;
}
.atl-stripLot {
  fill: color-mix(in srgb, var(--red) 9%, transparent);
  stroke: var(--red);
  stroke-width: 4;
  stroke-dasharray: 10 8;
}
.atl-stripLeg {
  fill: none;
  stroke: var(--red);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}
.atl-stripLeg[data-on] {
  animation: atl-draw 1.1s var(--ease-ink) 0.15s both;
}
@keyframes atl-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
.atl-stripPin {
  fill: var(--red);
  stroke: var(--card);
  stroke-width: 4;
  transition: r 0.4s var(--ease-out);
}
.atl-stripName {
  position: absolute;
  left: 8px;
  bottom: 8px;
  margin: 0;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--card);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.atl-deck {
  display: flex;
  gap: 14px;
  padding: 16px calc((100% - min(84vw, 400px)) / 2) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.atl-deck::-webkit-scrollbar {
  display: none;
}
.atl-dCard {
  position: relative;
  flex: none;
  width: min(84vw, 400px);
  height: clamp(380px, calc(100svh - 340px), 600px);
  border-radius: 14px;
  scroll-snap-align: center;
  perspective: 1400px;
}
.atl-dFace {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(35, 32, 27, 0.16), 0 22px 40px -24px rgba(35, 32, 27, 0.55);
  cursor: pointer;
  transition: transform 0.7s var(--ease-out), visibility 0s linear 0.35s;
}
.atl-dBack {
  transform: rotateY(-180deg);
  visibility: hidden;
  background: #f4f1ea;
  cursor: default;
}
.atl-dCard[data-flip] .atl-dFront {
  transform: rotateY(180deg);
  visibility: hidden;
}
.atl-dCard[data-flip] .atl-dBack {
  transform: none;
  visibility: visible;
}
.atl-dOpen {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
}
.atl-dOpen:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.atl-dPage {
  position: absolute;
  left: 0;
  top: 0;
  width: 390px;
  height: 1688px;
  transform-origin: 0 0;
  transform: scale(var(--sc));
  transition: transform 0.5s var(--ease-out);
  pointer-events: none;
  text-align: left;
}
.atl-dCard[data-reading] .atl-dPage {
  transform: translateY(var(--to)) scale(var(--sc));
  transition: transform 4.3s cubic-bezier(0.45, 0, 0.35, 1) 0.3s;
}
.atl-deckBack {
  position: absolute;
  inset: 0;
}
.atl-deckProof {
  position: absolute;
  left: 0;
  top: 0;
  width: 390px;
  transform-origin: 0 0;
}
.atl-deckNotes {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 62%;
  overflow-y: auto;
  padding: 2px 16px 14px;
  border-top: 2px solid var(--red);
  background: color-mix(in srgb, var(--card) 97%, transparent);
  text-align: left;
}
.atl-deckNotes .atl-notes {
  gap: 6px;
}
.atl-dCtrls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px var(--gutter) 0;
}
.atl-dCtrls [hidden] {
  display: none;
}
.atl-dCount {
  min-width: 48px;
  font-size: var(--text-xs);
  color: var(--ink-2);
  text-align: right;
}
.atl-sheetDlg {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  --font-archivo: AtlasArchivo, AtlasArchivoFallback;
}
.atl-sheetDlg::backdrop {
  background: rgba(35, 32, 27, 0.5);
}
.atl-dlgBar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.atl-dlgTag {
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.atl-dlgUrl {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atl-dlgBody {
  position: relative;
  height: calc(100dvh - 64px);
}
.atl-bare {
  position: absolute;
  inset: 0;
}
.atl-dlgBody [data-face] {
  transition: transform 0.7s var(--ease-out), visibility 0s linear 0.35s;
}
.atl-dlgBody [data-face="back"] {
  visibility: hidden;
}
.atl-dlgBody[data-flip] [data-face="front"] {
  transform: rotateY(180deg);
  visibility: hidden;
}
.atl-dlgBody[data-flip] [data-face="back"] {
  transform: none;
  visibility: visible;
}

/* ---- reduced motion: the homepage section is a still, the heading in its column, the hand-over card under it ---- */
.atl-atlas[data-reduced] .atl-head {
  width: min(28vw, 400px);
}
.atl-atlas[data-mode="film"][data-reduced] .atl-cta {
  top: auto !important;
  left: var(--gutter) !important;
  bottom: 120px;
  width: min(28vw, 400px) !important;
}
@media (prefers-reduced-motion: reduce) {
  .atl-leaf,
  .atl-dFace,
  .atl-dPage,
  .atl-stripSheet,
  .atl-dlgBody [data-face],
  .atl-mFront,
  .atl-mBack {
    transition: none;
  }
  .atl-stripLeg[data-on] {
    animation: none;
    stroke-dashoffset: 0;
  }
  .atl-leaf:hover {
    translate: none;
  }
}

/* ---- scale with intent: the 2D parts of the stage grow with a big screen (--ui from the layout, 1 to 1.7) ---- */
.atl-stage .atl-head,
.atl-stage .atl-countCap,
.atl-margin,
.atl-cta,
.atl-rail,
.atl-cardMark {
  zoom: var(--ui, 1);
}
/* A short screen: the rail keeps its marks, the margin tightens. */
.atl-stage[data-short] .atl-tokenName {
  display: none;
}
.atl-stage[data-short] .atl-token {
  min-width: 48px;
  padding: 8px 6px;
}
.atl-stage[data-short] .atl-marginIn {
  padding: 14px 18px;
}
.atl-stage[data-short] .atl-mFirm {
  font-size: 1.45rem;
}
.atl-stage[data-short] .atl-mH1,
.atl-stage[data-short] .atl-mUrl {
  display: none;
}
.atl-stage[data-short] .atl-mHead {
  margin-top: 10px;
}
.atl-stage[data-short] .atl-notes {
  gap: 4px;
}
.atl-stage[data-short] .atl-margin {
  bottom: 88px;
}

/* A narrower stage: the rail keeps only its marks, so all 12 fit. */
@media (max-width: 1179px) {
  .atl-tokenName {
    display: none;
  }
  .atl-token {
    min-width: 46px;
    padding: 8px 5px;
  }
}
/* A tall stage: the margin hangs from the top, so the town stays in sight below it. */
@media (max-aspect-ratio: 1/1) {
  .atl-margin {
    top: 28px;
    bottom: auto;
  }
  .atl-atlas[data-mode="page"] .atl-pageHead {
    width: auto;
    right: var(--gutter);
  }
  .atl-atlas[data-mode="page"] .atl-margin {
    top: 88px;
  }
}
.atl-btn,
.atl-btnLine {
  white-space: nowrap;
}
@media (max-width: 380px) {
  .atl-dCtrls .atl-btnLine {
    padding: 0 14px;
  }
}
