@font-face {
  font-display: swap;
  font-family: 'Family';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/family-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Family';
  font-style: normal;
  font-weight: 800;
  src: url('/fonts/family-heavy.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  src: url('/fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'BrookeShappell8';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/BrookeS8.ttf') format('truetype');
}

:root {
  --rgb-blue: 0, 100, 230;
  --rgb-blue-light: 194, 246, 255;
  --rgb-white: 255, 255, 255;
  --color-blue: rgb(var(--rgb-blue));
  --color-blue-light: rgb(var(--rgb-blue-light));
  --color-white: rgb(var(--rgb-white));
  --font-family-family: 'Family', Georgia, serif;
  --font-family-inter: 'Inter', system-ui, sans-serif;
  --font-size: clamp(1.375rem, 2.225vw, 2rem);
  --letter-spacing: -0.0015em;
  --line-height: 1.3;
  --transition: 0.15s cubic-bezier(0.33, 1, 0.68, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--color-blue);
  color: var(--color-blue-light);
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-family);
  font-feature-settings: 'liga', 'dlig';
  font-size: var(--font-size);
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
}

strong { color: var(--color-white); font-weight: 700; }

.nav {
  display: flex;
  justify-content: center;
  margin-block: 3.55em 0;
}

.nav__mark {
  line-height: 1;
  text-align: center;
}

.nav__mark .mark__word {
  color: var(--color-white);
  font-family: BrookeShappell8, cursive;
  font-size: 2.75em;
  font-weight: 400;
}

.mark__bang-stem,
.mark__bang-dot {
  vector-effect: non-scaling-stroke;
}

.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 1.6em;
  margin: 0 auto 3.55em;
  padding-inline: 1.5em;
  width: min(100%, 34.5em);
}

.links {
  display: grid;
  gap: 1.6em;
  justify-items: center;
  width: 100%;
}

.links__link {
  border-radius: 0.4em;
  box-shadow: 0 0 0 1px rgba(var(--rgb-white), 0.2);
  color: inherit;
  padding: 1.6em;
  text-decoration: none;
  transition: box-shadow var(--transition);
  width: min(100%, 24em);
}

.links__link dl {
  display: grid;
  gap: 0.575em;
  margin-bottom: -0.25em;
  margin-top: -0.3125em;
}

.links__link dl dt,
.links__link dl dd {
  letter-spacing: normal;
}

.links__link dl dt {
  align-items: flex-start;
  display: flex;
  font-size: 180%;
  font-weight: 800;
  line-height: 1;
}

.links__link dl dt strong {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.0425em;
  text-underline-offset: 0.0525em;
}

.links__link dl dt .version {
  display: inline-flex;
  font-family: var(--font-family-inter);
  font-feature-settings: 'case', 'cpsp', 'ss03';
  font-size: var(--font-size);
  letter-spacing: normal;
  line-height: 1;
  margin-left: 0.125em;
  margin-top: 0.175em;
}

.links__link dl dt .version sup {
  border: 1px solid var(--color-white);
  border-radius: 1.7em;
  color: var(--color-white);
  font-size: 35%;
  font-weight: 500;
  line-height: 1em;
  padding: 0.4em 0.7em 0.3em;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.links__link dl dd {
  color: var(--color-blue-light);
  font-size: 100%;
  font-weight: 500;
  line-height: 1.2;
}

.links__link dl dd .edition {
  color: var(--color-white);
  display: block;
  font-weight: 700;
  margin-bottom: 0.35em;
}

.links__link dl dd .edition.do-mark {
  font-size: 1.6em;
  font-weight: 400;
  line-height: 1.1;
}

.links__link dl dd .edition__bang {
  font-size: 1.5em;
  margin-left: 3px;
}

.soon {
  margin-top: 0;
  opacity: 0.92;
  pointer-events: none;
  width: min(100%, 24em);
}

@media (hover: hover) {
  .links__link:focus,
  .links__link:hover {
    box-shadow: 0 0 0 1px var(--color-white);
  }

  .links__link:focus dl dt .version sup,
  .links__link:hover dl dt .version sup {
    background: var(--color-white);
    color: var(--color-blue);
  }
}

@media (min-width: 64em) {
  .main { padding-inline: 2em; width: min(100%, 52em); }

  .links {
    grid-template-columns: 1fr 1fr;
    justify-content: center;
  }

  .links__link {
    width: auto;
    max-width: 24em;
  }

  .soon {
    max-width: 24em;
  }
}

/* —— Footer (once.com legal pattern) —— */

.legal {
  display: flex;
  flex-direction: column;
  margin-bottom: 3.55em;
  margin-inline: auto;
  padding-inline: 1.5em;
  text-align: center;
  width: min(100%, 34.5em);
}

.legal p {
  color: var(--color-blue-light);
  font-family: var(--font-family-inter);
  font-feature-settings: 'liga', 'dlig', 'ss03';
  font-size: 50%;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: -0.325em;
  margin-top: 0.1em;
}

.legal p a,
.legal p b,
.legal p strong {
  color: var(--color-white);
  font-weight: 700;
  text-decoration: none;
}

.legal p a:hover,
.legal p a:focus {
  text-decoration: underline;
}

.legal p .icon {
  align-items: center;
  display: inline-flex;
  font-family: var(--font-family-family);
  font-size: 1.15em;
  font-weight: 800;
  margin-right: 0.15em;
  text-decoration: none;
  vertical-align: middle;
}

.legal br {
  display: none;
}

.legal--light {
  margin-bottom: 2.5em;
  margin-top: 3em;
}

.legal--light p {
  color: #5c6478;
  font-size: 0.72rem;
}

.legal--light p a,
.legal--light p b,
.legal--light p strong {
  color: #1a1f2e;
}

.legal--light .do-mark {
  color: #1a1f2e;
}

/* Subpage footers — override .subpage__main p (1rem) so legal reads as a small footer */
.subpage__main .legal {
  margin-bottom: 1.25em;
  margin-top: 3em;
  max-width: none;
  padding-inline: 0;
  width: 100%;
}

.subpage__main .legal p {
  color: #8b939f;
  font-size: 0.625rem;
  line-height: 1.45;
  margin-bottom: 0;
  margin-top: 0;
  max-width: none;
}

.subpage__main .legal--light p a,
.subpage__main .legal--light p b,
.subpage__main .legal--light p strong {
  color: #6b7280;
  font-weight: 600;
}

.subpage__main .legal--light .do-mark {
  color: #6b7280;
  font-size: 1em;
}

@media (min-width: 48em) {
  .legal span.keep {
    display: inline;
  }
}

@media (min-width: 64em) {
  .legal {
    padding-inline: 2em;
  }

  .legal p {
    font-size: 40%;
  }

  .legal br {
    display: inline;
  }
}

@media (hover: hover) {
  .legal a.icon:hover,
  .legal a.icon:focus {
    text-decoration: none;
  }
}

/* —— Internal pages (white body + blue top bar) —— */

body.subpage {
  background: var(--color-white);
  color: #1a1f2e;
  min-height: 100vh;
  min-height: 100dvh;
}

body.subpage strong {
  color: inherit;
}

.topbar {
  background: var(--color-blue);
  flex-shrink: 0;
  width: 100%;
}

.topbar__inner {
  margin: 0 auto;
  max-width: 46em;
  padding: 0.85em 1.5em;
}

.breadcrumb {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-family-inter);
  font-feature-settings: 'case', 'liga', 'dlig', 'ss03';
  font-size: 0.875rem;
  font-weight: 500;
  gap: 0;
  line-height: 1.4;
}

.breadcrumb a {
  color: rgba(var(--rgb-blue-light), 0.85);
  font-weight: 400;
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  color: var(--color-white);
  text-decoration: underline;
}

.breadcrumb .sep {
  color: rgba(var(--rgb-blue-light), 0.35);
  font-weight: 600;
  padding-inline: 0.35em;
  user-select: none;
}

.breadcrumb [aria-current="page"] {
  color: var(--color-white);
  font-weight: 700;
}

.subpage__main {
  flex: 1;
  margin: 0 auto;
  max-width: 46em;
  padding: 2.5em 1.5em 4em;
  width: 100%;
}

.subpage__main h1 {
  color: #1a1f2e;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5em;
}

.subpage__main .lede {
  color: #5c6478;
  font-family: var(--font-family-inter);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.5em;
  text-transform: uppercase;
}

.subpage__main p {
  color: #343f52;
  font-family: var(--font-family-inter);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  max-width: 36em;
}

.subpage__main p + p {
  margin-top: 1em;
}

.subpage__note {
  background: #f4f6f8;
  border: 1px solid #e2e8f0;
  border-radius: 0.4em;
  color: #5c6478;
  font-family: var(--font-family-inter);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 2em;
  max-width: 36em;
  padding: 1.2em 1.4em;
}

.book-hero {
  display: grid;
  gap: 1.75em;
  margin-bottom: 2.5em;
  max-width: 40em;
}

.book-cover {
  margin: 0;
  max-width: 28em;
}

.book-cover__frame {
  background: #f4f6f8;
  border: 1px solid #e2e8f0;
  border-radius: 0.5em;
  box-shadow: 0 10px 28px rgba(26, 31, 46, 0.08);
  overflow: hidden;
  padding: 0.65em;
}

.book-cover__frame img {
  border-radius: 0.35em;
  display: block;
  height: auto;
  width: 100%;
}

.book-hero__label {
  color: #5c6478;
  font-family: var(--font-family-inter);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 0.45em;
  text-transform: uppercase;
}

.book-hero__title {
  color: #1a1f2e;
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 0.35em;
}

.book-hero__edition {
  color: #5c6478;
  font-family: var(--font-family-inter);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0;
}

.source-credit {
  border-top: 1px solid #e8edf3;
  margin-top: 2.25em;
  max-width: 36em;
  padding-top: 1.15em;
}

.source-credit--hero {
  border-top: 0;
  margin-top: 0.85em;
  max-width: none;
  padding-top: 0;
  position: relative;
  z-index: 2;
}

.book-hero__copy {
  position: relative;
}

.book-hero__cta {
  margin-top: 1.35em;
}

.book-hero__download {
  background: var(--color-blue);
  border-radius: 0.4em;
  color: var(--color-white);
  display: inline-block;
  font-family: var(--font-family-inter);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8em 1.2em;
  text-decoration: none;
}

.book-hero__download:hover,
.book-hero__download:focus {
  text-decoration: none;
}

.book-section {
  margin-top: 2.25em;
  max-width: 36em;
}

.book-section h2 {
  color: #1a1f2e;
  font-family: var(--font-family-inter);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-bottom: 0.75em;
  text-transform: uppercase;
}

.book-section p {
  margin-top: 0;
}

.book-section p a {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.book-section p a:hover,
.book-section p a:focus {
  text-decoration: underline;
}

.book-facts {
  display: grid;
  gap: 0.85em;
  list-style: none;
  margin: 1.1em 0 0;
  padding: 0;
}

.book-facts li {
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 0.4em;
  color: #343f52;
  font-family: var(--font-family-inter);
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 0.85em 1em;
}

.book-facts strong {
  color: #1a1f2e;
  font-weight: 700;
}

.source-credit__line {
  color: #5c6478;
  font-family: var(--font-family-inter);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 0.65em;
}

.source-credit__line cite {
  font-style: italic;
}

.source-credit__line a {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.source-credit__line a:hover,
.source-credit__line a:focus {
  text-decoration: underline;
}

.source-credit__trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-family-inter);
  font-size: 0.75rem;
  font-weight: 500;
  gap: 0.35em;
  padding: 0;
  user-select: none;
}

.source-credit__icon {
  align-items: center;
  color: #8b939f;
  display: inline-flex;
  flex-shrink: 0;
}

.source-credit__trigger:hover .source-credit__icon,
.source-credit__trigger[aria-expanded="true"] .source-credit__icon {
  color: var(--color-blue);
}

.source-credit__modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.5rem;
  position: fixed;
  z-index: 200;
}

.source-credit__modal[hidden] {
  display: none;
}

.source-credit__backdrop {
  background: rgba(26, 31, 46, 0.52);
  border: 0;
  cursor: pointer;
  inset: 0;
  margin: 0;
  padding: 0;
  position: absolute;
}

.source-credit__panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.65em;
  box-shadow: 0 18px 48px rgba(26, 31, 46, 0.2);
  color: #5c6478;
  font-size: 0.85rem;
  line-height: 1.55;
  max-width: 26rem;
  padding: 1.35rem 1.4rem 1.2rem;
  position: relative;
  width: 100%;
  z-index: 1;
}

.source-credit__title {
  color: #1a1f2e;
  font-family: var(--font-family-inter);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 1.75rem 0.75rem 0;
}

.source-credit__close {
  background: transparent;
  border: 0;
  color: #8b939f;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  position: absolute;
  right: 0.55rem;
  top: 0.45rem;
}

.source-credit__close:hover,
.source-credit__close:focus {
  color: #1a1f2e;
}

body.source-credit-modal-open {
  overflow: hidden;
}

.source-credit__panel p {
  margin: 0;
}

.source-credit__panel p + p {
  margin-top: 0.65em;
}

.source-credit__panel a {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: none;
}

.source-credit__panel a:hover,
.source-credit__panel a:focus {
  text-decoration: underline;
}

.book-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
  margin-top: 2.5em;
}

.book-cta a {
  background: var(--color-blue);
  border-radius: 0.4em;
  color: var(--color-white);
  font-family: var(--font-family-inter);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75em 1.1em;
  text-decoration: none;
}

.book-cta a.secondary {
  background: transparent;
  border: 1.5px solid var(--color-blue);
  color: var(--color-blue);
}

.do-mark {
  font-family: BrookeShappell8, cursive;
  font-size: 1.15em;
  font-weight: 400;
}

@media (min-width: 48em) {
  .book-hero {
    align-items: start;
    grid-template-columns: minmax(12em, 18em) 1fr;
  }
}

@media (min-width: 64em) {
  .topbar__inner,
  .subpage__main {
    padding-inline: 2em;
  }
}
