/* ATLAS Academy -- shop.mapfront.io
 *
 * One family, Atkinson Hyperlegible Next (Braille Institute; OFL), chosen
 * because the catalog is read by people of every age, including a
 * large-print edition for readers over 60. Display sizes are the same
 * family at weight 800 with tight tracking.
 *
 * The one loud element is the contents label on each product page: the
 * facts read from the files, in a heavy ruled panel. Everything else is
 * quiet: cool paper, indigo ink, one ultramarine for actions.
 */
@font-face {
  font-family: "Atkinson Next";
  src: url("fonts/atkinson-next-var.woff") format("woff");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1d2150;
  --ink-soft: #454a78;
  --muted: #5b5f82;
  --paper: #f3f4f9;
  --sheet: #ffffff;
  --rule: #c8cbe4;
  --lilac: #e2e3fa;
  --lilac-deep: #c9cbf5;
  --ultra: #2b35c8;
  --ultra-deep: #1c248f;
  --ultra-ink: #141a6e;
  --focus: #ffb000;
  --off-bg: #e6e7ef;
  --off-ink: #62667f;
  --radius: 10px;
  --radius-sm: 6px;
  --gutter: 16px;
  --max: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ultra); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ultra-deep); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------ header */

.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; min-height: 60px;
}
.mark {
  display: inline-flex; align-items: baseline; gap: 0.35em;
  color: var(--ink); text-decoration: none; font-size: 1.1rem; letter-spacing: -0.01em;
  white-space: nowrap; min-height: 44px; align-items: center;
}
.mark b { font-weight: 800; letter-spacing: 0.02em; }
.mark span { font-weight: 400; color: var(--ink-soft); }
.mark:hover { color: var(--ink); }
.nav { display: flex; gap: 0; margin: 0 -8px 0 0; padding: 0; list-style: none; }
.nav a {
  display: inline-flex; align-items: center; padding: 8px 8px; min-height: 44px;
  white-space: nowrap;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius-sm);
}
.nav a:hover { background: var(--lilac); color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--ultra); border-radius: 0; }

/* ------------------------------------------------------------ type */

h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 800; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.1rem, 7.2vw, 4.1rem); line-height: 1.02; }
h2 { font-size: clamp(1.5rem, 4.2vw, 2.1rem); line-height: 1.1; }
h3 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 44ch; }
.kind { font-weight: 700; color: var(--ultra); margin: 0 0 8px; font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.93rem; }

section { padding: 48px 0; }
section + section { border-top: 1px solid var(--rule); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap; }

/* ------------------------------------------------------------ buttons
 * Every state is drawn: rest, hover, pressed, keyboard focus, disabled.
 * A disabled Buy is a <button disabled>, never a dead link.
 */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px;
  font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.2;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color 120ms ease, border-color 120ms ease, transform 60ms ease;
}
.btn-buy { background: var(--ultra); color: #fff; border-color: var(--ultra); }
.btn-buy:hover { background: var(--ultra-deep); border-color: var(--ultra-deep); color: #fff;
  text-decoration: none; }
.btn-buy:active { background: var(--ultra-ink); border-color: var(--ultra-ink);
  transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: #fff; text-decoration: none; }
.btn-quiet:active { background: var(--ultra-ink); border-color: var(--ultra-ink); color: #fff;
  transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--off-bg); color: var(--off-ink); border: 2px dashed #a9adc6;
  cursor: not-allowed; transform: none;
}
.btn-block { width: 100%; }
.on-ink .btn-buy { background: #fff; color: var(--ink); border-color: #fff; }
.on-ink .btn-buy:hover { background: var(--lilac); border-color: var(--lilac); color: var(--ink); }
.on-ink .btn-buy:active { background: var(--lilac-deep); border-color: var(--lilac-deep); }
.on-ink .btn[disabled] { background: transparent; color: #d7d9f3; border-color: #7f84b8; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* ------------------------------------------------------------ covers */

.frame {
  background: var(--lilac); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1;
}
.frame img { max-height: 100%; width: auto; border-radius: 3px;
  box-shadow: 0 1px 0 rgba(29, 33, 80, 0.25), 0 10px 24px -12px rgba(29, 33, 80, 0.45); }

/* ------------------------------------------------------------ home */

.hero { padding: 40px 0 36px; }
.hero h1 { max-width: 13ch; }
.hero .lede { margin-top: 18px; }
.shelf {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-top: 32px; align-items: end;
}
.shelf a { display: block; border-radius: 4px; }
.shelf img { width: 100%; border-radius: 3px;
  box-shadow: 0 10px 22px -14px rgba(29, 33, 80, 0.6); }
.shelf a:nth-child(odd) img { transform: translateY(-8px); }

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.entry {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 16px; display: grid; gap: 4px 16px; grid-template-columns: 96px 1fr;
  grid-template-areas: "cover head" "body body"; align-items: center;
}
.entry > .cover { grid-area: cover; }
.entry > .head { grid-area: head; }
.entry > .body { grid-area: body; }
.entry .frame { padding: 8px; }
.entry .kind { margin: 0 0 2px; }
.entry h3 a { color: var(--ink); text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.entry p { margin: 6px 0 10px; }
.entry dl { margin: 0 0 12px; font-size: 0.95rem; }
.entry dl div { padding: 6px 0; border-top: 1px solid var(--rule); }
.entry dt { font-weight: 700; }
.entry dd { margin: 0; color: var(--ink-soft); }
.price-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; }
.price-unset { font-weight: 700; color: var(--muted); }

.band { background: var(--ink); color: #eceefe; border-radius: 0; }
.band h2, .band h3 { color: #fff; }
.band p { color: #d7d9f3; }
.band .covers { display: flex; gap: 8px; margin: 20px 0; }
.band .covers img { width: 64px; border-radius: 3px; }
.band a:not(.btn) { color: #fff; }
.band .price-unset { color: #c9cbf5; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 12px;
  align-items: start; }
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink);
  font-weight: 800; font-size: 1.1rem;
}
.steps h3 { margin: 8px 0 4px; }
.steps p { margin: 0; }

/* ------------------------------------------------------------ product */

.crumbs { font-size: 0.95rem; padding-top: 20px; }
.crumbs a { color: var(--ink-soft); }
.intro { display: grid; gap: 24px; grid-template-columns: 1fr; padding-top: 16px; }
.intro h1 { font-size: clamp(2rem, 6.6vw, 3.4rem); }
.intro > .frame { max-width: 280px; padding: 14px; }
.intro .lede { margin: 14px 0 0; }
.buy { margin-top: 24px; display: grid; gap: 12px; }
.buy .price { font-size: 2rem; }
.notice {
  border-left: 4px solid var(--ink); background: var(--sheet); padding: 12px 14px;
  font-weight: 700; margin: 0; max-width: none;
}
.fineprint { font-size: 0.93rem; color: var(--muted); margin: 0; }

.offers { display: grid; gap: 14px; margin-top: 24px; }
.offer {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 14px; display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: start;
}
.offer.wide { grid-template-columns: 1fr; }
.offer img { width: 76px; border-radius: 3px; }
.offer h3 { font-size: 1.1rem; }
.offer p { margin: 4px 0 10px; font-size: 0.97rem; }
.offer .btn { width: 100%; }
.offer:target { outline: 3px solid var(--ultra); outline-offset: 2px; }

/* The contents label: the facts, ruled like a packaging label. */
.label {
  background: var(--sheet); border: 3px solid var(--ink); border-radius: 4px;
  padding: 14px 16px 10px; max-width: 560px;
}
.label h2 { font-size: 2rem; letter-spacing: -0.03em; border-bottom: 10px solid var(--ink);
  padding-bottom: 6px; margin-bottom: 4px; }
.label dl { margin: 0; }
.label .row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 9px 0;
  border-bottom: 1px solid var(--ink); }
.label .row:last-child { border-bottom: 0; }
.label dt { font-weight: 800; }
.label dd { margin: 0; }
.label .checked { border-top: 5px solid var(--ink); margin: 6px 0 0; padding-top: 8px;
  font-size: 0.9rem; color: var(--ink-soft); max-width: none; }

.spec { display: grid; gap: 40px; grid-template-columns: 1fr; }
.spec h2 + p { margin-top: 12px; }
.benefits { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.benefits li { padding-left: 30px; position: relative; max-width: 64ch; }
.benefits li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 16px;
  height: 10px; border-left: 3px solid var(--ultra); border-bottom: 3px solid var(--ultra);
  transform: rotate(-45deg); }

details { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
details + details { margin-top: 8px; }
summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; gap: 12px; min-height: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 800; font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
summary:hover { background: var(--lilac); }
details > div, details > ul, details > p { padding: 0 16px 14px; margin: 0; }
details ul { margin: 0; padding: 0 16px 14px 36px; }
details li { margin: 3px 0; }

.two { display: grid; gap: 24px; grid-template-columns: 1fr; }
.two ul { padding-left: 1.2em; margin: 10px 0 0; }
.two li { margin: 6px 0; }

.pair {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center;
  background: var(--lilac); border-radius: var(--radius); padding: 16px;
}
.pair .frame { background: var(--sheet); padding: 8px; }
.pair h3 { margin-bottom: 4px; }
.pair p { margin: 0 0 8px; }

.terms { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 16px; }
.terms h3 { margin: 0 0 6px; }
.terms p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ prose pages */

.prose { max-width: 70ch; padding-top: 24px; }
.prose h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 16px; }
.prose h2 { font-size: 1.4rem; margin: 32px 0 8px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }

/* ------------------------------------------------------------ footer */

.foot { border-top: 1px solid var(--rule); padding: 28px 0 40px; margin-top: 24px;
  font-size: 0.95rem; color: var(--ink-soft); }
.foot ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap;
  gap: 4px 16px; }
.foot a { color: var(--ink); display: inline-block; padding: 8px 0; }

/* ------------------------------------------------------------ wider screens */

@media (min-width: 700px) {
  :root { --gutter: 28px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .entry { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .entry > .body { flex: 1; display: flex; flex-direction: column; }
  .entry > .body .price-line { margin-top: auto; }
  .entry .frame { padding: 18px; }
  .two { grid-template-columns: 1fr 1fr; }
  .label .row { grid-template-columns: 11rem 1fr; gap: 12px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .shelf { gap: 18px; max-width: 760px; }
  .band .covers img { width: 96px; }
}

@media (min-width: 1000px) {
  .hero { padding: 64px 0 56px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px;
    align-items: center; }
  .hero .shelf { margin-top: 0; max-width: none; gap: 20px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .intro { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
  .intro > .frame { position: sticky; top: 24px; max-width: none; padding: 28px; }
  .spec { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px;
    align-items: start; }
  .band .inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
}
