/* Dots Energy brand book
   ----------------------
   Structural device: the rounded-cap bar, taken from the brand's own graphic
   elements (stacked bars, arcs, trend lines ending in dots). Dividers are bar
   cascades; the nav marker is a bar; colour swatches are bars at scale.

   Fonts come from Adobe Fonts kit vfj8bve, which is domain-locked — add
   brand.dotsenergy.be and *.vercel.app to the kit's allowed domains or the
   whole site falls back to Poppins. The fallback is designed for, not an
   afterthought. */

/* ---------- tokens ---------- */

:root {
  --ink: #0d0d12;
  --page: #fffbff;
  --purple: #9652d5;
  --purple-light: #d4baff;
  --purple-container: #ecdcff;
  --green: #4ef360;
  --green-light: #91faa5;
  --pink: #ec68ba;
  --pink-light: #f3d2e1;
  --rule: #e7e0eb;
  --muted: #79747e;
  --muted-dark: #938f99;

  --head: "noka", Poppins, "Segoe UI", Helvetica, sans-serif;
  --body: "dorival-ui-variable", Poppins, "Segoe UI", Helvetica, sans-serif;

  --nav-w: 236px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --measure: 68ch;
  --radius-pill: 999px;
  --radius-panel: 28px;
}

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

html {
  scroll-behavior: smooth;
  /* the sticky top bar on narrow screens must not cover anchor targets */
  scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.display {
  font-family: var(--head);
  font-weight: 300;
  font-size: clamp(2.75rem, 8.5vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}

.chapter-title {
  font-family: var(--head);
  font-weight: 600;
  font-size: clamp(1.875rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0;
}

.chapter-num {
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--purple);
  margin: 0;
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.6;
  max-width: 60ch;
  margin: 1.25rem 0 0;
  color: #2e2e36;
}

.subhead {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.75rem;
}

.subhead-sm {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1rem;
  margin: 2rem 0 0.5rem;
}

.prose {
  max-width: var(--measure);
}

.prose p {
  margin: 0.85rem 0;
}

.prose a {
  color: var(--purple);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.meta {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9375em;
  font-variant-numeric: tabular-nums;
}

/* ---------- the bar cascade: the book's one ornament ---------- */

.cascade {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0 0 1.5rem;
}

.cascade span {
  display: block;
  height: 9px;
  border-radius: var(--radius-pill);
}

.cascade span:nth-child(1) {
  width: 68px;
  background: var(--purple);
}

.cascade span:nth-child(2) {
  width: 50px;
  margin-left: 14px;
  background: var(--pink);
}

.cascade span:nth-child(3) {
  width: 34px;
  margin-left: 28px;
  background: var(--green);
}

.cascade span:nth-child(4) {
  width: 18px;
  margin-left: 42px;
  background: var(--green-light);
}

/* ---------- cover ---------- */

.cover {
  background: var(--ink);
  color: var(--page);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 4.5rem) var(--gutter) 0;
  position: relative;
  overflow: hidden;
}

.cover-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cover-logo {
  display: block;
  width: clamp(150px, 17vw, 224px);
  height: auto;
}

.cover-issue {
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--purple-light);
}

.cover-main {
  padding: clamp(2.5rem, 8vh, 7rem) 0 clamp(2rem, 6vh, 4rem);
}

.cover-main .display {
  max-width: 20ch;
  color: var(--page);
}

.cover-tagline-en {
  margin: 1.75rem 0 0;
  font-size: 1.0625rem;
  color: var(--muted-dark);
  max-width: 34ch;
}

.cover-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

.cover-scroll {
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--page);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 251, 255, 0.35);
  padding-bottom: 0.2rem;
}

.cover-scroll:hover,
.cover-scroll:focus-visible {
  border-bottom-color: var(--purple-light);
  color: var(--purple-light);
}

/* the palette as a signature row of bars, in the brand's own bar language */
.palette-stripe {
  display: flex;
  gap: 10px;
  align-items: center;
}

.palette-stripe span {
  display: block;
  height: 14px;
  width: 72px;
  border-radius: var(--radius-pill);
}

@media (max-width: 560px) {
  .palette-stripe span {
    width: 44px;
  }
}

/* ---------- the book: index + chapters ---------- */

.book {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  align-items: start;
}

.index {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: clamp(2rem, 5vw, 3.5rem) 0 2rem var(--gutter);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.index-brand {
  display: block;
  width: 104px;
}

.index-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.index-link {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.4rem 0;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}

.index-link span:first-child {
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted);
}

.index-link:hover,
.index-link:focus-visible {
  color: var(--purple);
}

/* current chapter marked with a bar, not a highlight */
.index-link::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1);
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--purple);
  transition: width 0.18s ease;
}

.index-link.is-current {
  color: var(--purple);
  font-weight: 700;
}

.index-link.is-current::before {
  width: calc(var(--gutter) - 10px);
}

@media (prefers-reduced-motion: reduce) {
  .index-link::before {
    transition: none;
  }
}

.index-foot {
  margin-top: auto;
  padding-right: 1.5rem;
}

/* narrow screens: index becomes a scrolling chip strip */
.index-toggle {
  display: none;
}

@media (max-width: 950px) {
  .book {
    grid-template-columns: minmax(0, 1fr);
  }

  .index {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.625rem var(--gutter);
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    background: rgba(255, 251, 255, 0.94);
    backdrop-filter: blur(10px);
    overflow: hidden;
  }

  .index-brand {
    width: 74px;
    flex: none;
  }

  .index-list {
    flex-direction: row;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    /* a flex item defaults to min-width:auto, so a row of nowrap chips would
       force the whole page wider than the viewport */
    min-width: 0;
    flex: 1 1 auto;
  }

  .index-list::-webkit-scrollbar {
    display: none;
  }

  .index-link {
    grid-template-columns: auto;
    white-space: nowrap;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
  }

  .index-link span:first-child {
    display: none;
  }

  .index-link::before {
    display: none;
  }

  .index-link.is-current {
    background: var(--purple);
    border-color: var(--purple);
    color: var(--page);
  }

  .index-foot {
    display: none;
  }
}

/* ---------- chapters ---------- */

.chapters {
  min-width: 0;
}

.chapter {
  padding: clamp(3.5rem, 9vh, 7rem) var(--gutter) clamp(3rem, 7vh, 5rem);
  border-bottom: 1px solid var(--rule);
  max-width: 1180px;
}

.chapter:last-of-type {
  border-bottom: 0;
}

.chapter-head {
  margin-bottom: clamp(2rem, 5vh, 3.25rem);
}

/* ---------- panels: light and dark specimen grounds ---------- */

.panel {
  border-radius: var(--radius-panel);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--rule);
  background: var(--page);
}

.panel-dark {
  border-radius: var(--radius-panel);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--ink);
  color: var(--page);
  border: 1px solid var(--ink);
}

.panel-dark .meta {
  color: var(--muted-dark);
}

.panel-dark .subhead,
.panel-dark .subhead-sm {
  color: var(--page);
}

.pair {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

/* ---------- logo chapter ---------- */

.logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
}

.logo-stage img {
  width: min(300px, 68%);
  height: auto;
}

.mark-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.mark-row img {
  width: 92px;
  height: auto;
}

/* clear space: dashed offset box at the height of the D */
.clearspace {
  --d: 34px;
  display: inline-block;
  padding: var(--d);
  outline: 1px dashed var(--purple);
  outline-offset: 0;
  position: relative;
  background: var(--page);
}

.clearspace img {
  display: block;
  width: 240px;
  height: auto;
}

.clearspace-label {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--d);
  height: var(--d);
  background: var(--purple-container);
  display: grid;
  place-items: center;
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.6875rem;
  color: #2e004e;
}

.minsize-row {
  display: flex;
  align-items: flex-end;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.minsize-item img {
  display: block;
  height: auto;
  margin-bottom: 0.6rem;
}

/* don'ts: the real logo, actually violated */
.donts {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  margin-top: 1rem;
}

.dont {
  border: 1px dashed #cfc7d4;
  border-radius: 18px;
  padding: 1.125rem;
  background: var(--page);
}

.dont-stage {
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.dont-stage img {
  width: 132px;
  height: auto;
}

.dont-caption {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink);
  display: flex;
  gap: 0.45rem;
}

.dont-caption::before {
  content: "\00d7";
  color: var(--pink);
  font-weight: 700;
  flex: none;
}

.v-stretch img {
  transform: scaleX(1.55);
}

.v-recolor img {
  filter: hue-rotate(155deg) saturate(1.7);
}

.v-rotate img {
  transform: rotate(-11deg);
}

.v-shadow img {
  filter: drop-shadow(5px 6px 4px rgba(13, 13, 18, 0.5));
}

.v-frame img {
  border: 3px solid var(--ink);
  padding: 7px;
  border-radius: 8px;
}

.v-busy {
  background-image: url("../graphics/dots-graphic-03.png");
  background-size: 150%;
  background-position: center;
}

.v-small img {
  width: 52px;
}

.v-crowd {
  position: relative;
}

.v-crowd img {
  width: 168px;
  margin-left: -40px;
}

/* ---------- colour chapter: swatches as bars at scale ---------- */

.swatch-group {
  margin-bottom: 1.75rem;
}

.swatch-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.swatch-role {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.0625rem;
}

.swatch-use {
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 46ch;
}

.swatch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0 clamp(1.125rem, 3vw, 2rem);
  font-family: var(--body);
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: transform 0.14s ease;
}

.swatch:hover {
  transform: translateX(3px);
}

.swatch:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

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

  .swatch:hover {
    transform: none;
  }
}

.swatch-main {
  height: 88px;
  font-size: 1.0625rem;
}

.swatch-sub {
  height: 52px;
  margin-top: 7px;
}

.swatch-name {
  font-weight: 700;
}

.swatch-values {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  opacity: 0.92;
}

.swatch-rgb {
  font-size: 0.8125rem;
}

@media (max-width: 620px) {
  .swatch-rgb {
    display: none;
  }
}

.gradients {
  display: grid;
  gap: 1.5rem;
}

/* the bar carries the gradient; the label sits beneath it, always legible */
.gradient {
  border-radius: var(--radius-pill);
  height: 64px;
}

.gradient-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.gradient-name {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1rem;
}

.gradient-code {
  font-size: 0.75rem;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  overflow-wrap: anywhere;
}

.gradient-code:hover,
.gradient-code:focus-visible {
  color: var(--purple);
}

.gradient-item .meta {
  margin: 0.15rem 0 0;
}

/* ---------- typography chapter ---------- */

.specimen {
  border-bottom: 1px solid var(--rule);
  padding: 1.75rem 0;
}

.specimen:first-of-type {
  padding-top: 0.5rem;
}

.specimen-name {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0 0 0.15rem;
}

.specimen-glyphs {
  font-family: var(--head);
  font-weight: 300;
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 0;
  word-break: break-word;
}

.specimen-glyphs-body {
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.25;
  margin: 0.75rem 0 0;
  word-break: break-word;
}

.weights {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.weight-item {
  font-family: var(--head);
  font-size: 1.5rem;
  line-height: 1.2;
}

.weight-item .meta {
  font-family: var(--body);
  display: block;
  font-size: 0.75rem;
}

/* type scale rendered at real size */
.scale-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.scale-row:last-child {
  border-bottom: 0;
}

.scale-spec {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.scale-spec strong {
  display: block;
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
}

.scale-sample {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

@media (max-width: 720px) {
  .scale-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }
}

/* ---------- elements gallery ---------- */

.gallery {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.gallery-item {
  border: 1px solid var(--rule);
  border-radius: 20px;
  overflow: hidden;
  background: var(--page);
  display: flex;
  flex-direction: column;
}

/* a fixed stage height so every tile in the gallery lines up, whatever the
   intrinsic ratio of the graphic inside it */
.gallery-stage {
  height: 190px;
  display: grid;
  place-items: center;
  padding: 1.125rem;
  background: #faf6fa;
  overflow: hidden;
}

/* object-fit on an explicit box: SVGs with a viewBox but no intrinsic size
   ignore max-height inside a grid and overflow the tile otherwise */
.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-foot {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.9rem;
  border-top: 1px solid var(--rule);
}

.gallery-name {
  font-size: 0.8125rem;
  font-weight: 700;
}

.gallery-links {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.gallery-links a {
  color: var(--purple);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.gallery-links a:hover,
.gallery-links a:focus-visible {
  border-bottom-color: var(--purple);
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 480px;
}

.table caption {
  text-align: left;
  font-size: 0.8125rem;
  color: var(--muted);
  padding-bottom: 0.5rem;
}

.table th {
  text-align: left;
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.55rem 1rem 0.55rem 0;
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
}

.table td {
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table-quote {
  font-style: normal;
  color: var(--ink);
}

/* ---------- notes and callouts ---------- */

.note {
  border-left: 3px solid var(--purple);
  padding: 0.15rem 0 0.15rem 1.125rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}

.note-title {
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0 0 0.2rem;
}

.note p {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
}

.tagline-box {
  background: var(--ink);
  color: var(--page);
  border-radius: var(--radius-panel);
  padding: clamp(1.75rem, 4vw, 3rem);
}

.tagline-nl {
  font-family: var(--head);
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.tagline-en {
  margin: 1rem 0 0;
  color: var(--muted-dark);
  font-size: 0.9375rem;
}

.do-dont {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin-top: 1rem;
}

.list-clean {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.list-clean li {
  padding: 0.4rem 0 0.4rem 1.35rem;
  position: relative;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--rule);
}

.list-clean li:last-child {
  border-bottom: 0;
}

.list-clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 13px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--purple);
}

.list-clean.is-dont li::before {
  background: var(--pink);
}

/* ---------- buttons and download rows ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--purple);
  color: #fff;
  border: 1px solid var(--purple);
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.4rem;
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: #7f3fc0;
  border-color: #7f3fc0;
}

.btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.4rem;
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-quiet:hover,
.btn-quiet:focus-visible {
  background: var(--ink);
  color: var(--page);
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ---------- download index ---------- */

.dl-group {
  margin: 2.5rem 0;
}

.dl-group-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 0.5rem;
}

.dl-group-name {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0;
}

.dl-group-desc {
  font-size: 0.8125rem;
  color: var(--muted);
}

.dl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem 6rem 4.5rem 6rem;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.dl-name {
  min-width: 0;
}

.dl-name a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.dl-name a:hover,
.dl-name a:focus-visible {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dl-note {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}

.dl-cell {
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dl-get {
  justify-self: end;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
  white-space: nowrap;
}

.dl-get:hover,
.dl-get:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .dl-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.25rem;
  }

  .dl-cell {
    grid-column: 1;
  }

  .dl-get {
    grid-row: 1;
    grid-column: 2;
  }
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  transform: translate(-50%, 130%);
  background: var(--ink);
  color: var(--page);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  z-index: 60;
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
  pointer-events: none;
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

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

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

.foot {
  background: var(--ink);
  color: var(--muted-dark);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
}

.foot-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  max-width: 1180px;
}

.foot h2 {
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--page);
  margin: 0 0 0.6rem;
}

.foot p {
  margin: 0 0 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.foot a {
  color: var(--purple-light);
}

.foot-legal {
  max-width: 1180px;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2a2a33;
  font-size: 0.75rem;
  line-height: 1.6;
}

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--page);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 12px 0;
}

.skip:focus {
  left: 0;
}

/* ---------- one orchestrated moment: the cover on load ---------- */

@media (prefers-reduced-motion: no-preference) {
  .cover-logo,
  .cover-main .display,
  .cover-tagline-en,
  .palette-stripe span {
    animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }

  .cover-main .display {
    animation-delay: 0.08s;
  }

  .cover-tagline-en {
    animation-delay: 0.18s;
  }

  .palette-stripe span {
    animation: grow 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }

  .palette-stripe span:nth-child(1) {
    animation-delay: 0.26s;
  }

  .palette-stripe span:nth-child(2) {
    animation-delay: 0.32s;
  }

  .palette-stripe span:nth-child(3) {
    animation-delay: 0.38s;
  }

  .palette-stripe span:nth-child(4) {
    animation-delay: 0.44s;
  }

  .palette-stripe span:nth-child(5) {
    animation-delay: 0.5s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes grow {
    from {
      transform: scaleX(0);
    }

    to {
      transform: scaleX(1);
    }
  }

  .palette-stripe span {
    transform-origin: left center;
  }
}

/* ---------- focus visibility floor ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.cover a:focus-visible {
  outline-color: var(--purple-light);
}
