/* ==========================================================================
   Codi landing page
   Implementation of "Codi Landing Block.dc.html" (Claude Design canvas export).
   ========================================================================== */

:root {
  /* Palette */
  --yellow:      #ffdd2d;
  --ink:         #333333;
  --ink-2:       #40434a;
  --ink-3:       #4a4d52;
  --ink-4:       #56595f;
  --muted:       #8a8d93;
  --white:       #ffffff;
  --cream:       #fffbe8;
  --grey:        #eeeff0;
  --frame-cool:  #dcdee1;
  --frame-warm:  #e6e3d6;

  /* Footer */
  --footer-bg:   #333333;
  --footer-fg:   #eeeff0;
  --footer-muted:#86898f;
  --footer-dim:  #9c9fa5;

  /* Rhythm */
  --gutter:      clamp(20px, 5vw, 72px);
  --section-y:   clamp(56px, 9vh, 120px);
  --header-h:    84px;

  /* Texture used behind every image frame while it loads */
  --hatch: repeating-linear-gradient(135deg, rgba(51, 51, 51, 0.055) 0 10px, rgba(51, 51, 51, 0) 10px 20px);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

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

/* The design marks links with the yellow highlight rather than an underline. */
a { color: var(--ink); text-decoration: none; }

/* The browser's own [hidden] rule is a bare attribute selector, so any class
   that sets `display` outranks it — an element toggled with el.hidden would
   stay visible. Every hide/show in forms.js works that way, so make it win. */
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 50;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: top 160ms ease-out;
}
.skip-link:focus-visible { top: 12px; }

/* --------------------------------------------------------------------------
   Yellow marker highlight behind inline words
   -------------------------------------------------------------------------- */

/* Painted as a background on the inline text rather than one absolutely
   positioned box, so a phrase that breaks across lines gets a marker under each
   line instead of a single rectangle covering the whole block. The old version
   broke as soon as a translation ran longer than the English original. */
.hl {
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat;
  background-size: 100% 0.34em;
  background-position: 0 calc(100% - 0.1em);
  padding-inline: 0.06em;
  margin-inline: -0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl--h3 { background-size: 100% 0.36em; background-position: 0 calc(100% - 0.08em); }
.hl--lg { background-size: 100% 0.42em; background-position: 0 calc(100% - 0.08em); }

.nw { white-space: nowrap; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 16px 28px;
  border-radius: 999px;
  color: var(--ink);
  transition: transform 120ms ease-out, box-shadow 200ms ease-out,
              filter 160ms ease-out, background-color 200ms ease-out;
}
.btn--lg { padding: 17px 30px; }

.btn--primary {
  background: var(--yellow);
  box-shadow: 0 8px 22px -10px rgba(51, 51, 51, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn--primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 30px -12px rgba(51, 51, 51, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn--primary:active {
  transform: scale(0.968);
  box-shadow: 0 4px 12px -8px rgba(51, 51, 51, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--secondary {
  font-weight: 500;
  padding: 16px 26px;
  background: var(--white);
  border: 1px solid rgba(51, 51, 51, 0.1);
  box-shadow: 0 8px 22px -10px rgba(51, 51, 51, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.btn--secondary:hover {
  background: #fafafb;
  box-shadow: 0 14px 30px -12px rgba(51, 51, 51, 0.4), inset 0 1px 0 rgba(255, 255, 255, 1);
}
.btn--secondary:active {
  transform: scale(0.968);
  box-shadow: 0 4px 12px -8px rgba(51, 51, 51, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}
.btn-row--center { justify-content: center; padding-top: 0; margin-top: 8px; }

/* --------------------------------------------------------------------------
   Image frames
   -------------------------------------------------------------------------- */

.frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background-color: var(--frame-cool);
  background-image: var(--hatch);
  box-shadow: 0 18px 40px -28px rgba(51, 51, 51, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame--warm { background-color: var(--frame-warm); }

.frame--4x3 { aspect-ratio: 4 / 3; }
.frame--1x1 { aspect-ratio: 1 / 1; }

/* Illustration, not photograph. The artwork brings its own transparent
   background, so the frame drops the plate, the loading texture and the shadow
   that only make sense behind a photo, and the image is fitted rather than
   cropped — cover would cut a square illustration off at the edges. */
.frame--art {
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}
.frame--art > img { object-fit: contain; }
.frame--5x4 {
  aspect-ratio: 5 / 4;
  border-radius: 26px;
  box-shadow: 0 24px 52px -32px rgba(51, 51, 51, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.frame--hero {
  flex: 1;
  border-radius: 28px;
  box-shadow: 0 30px 60px -34px rgba(51, 51, 51, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.5);

  /* Daytime photo is the default, so a visitor without JavaScript still gets a
     hero. The head script adds .is-night for 18:00-05:59 and preloads whichever
     of the two this resolves to. */
  background-image: url('./images/hero-city.jpg');
  background-size: cover;
  background-position: center;
}
.is-night .frame--hero { background-image: url('./images/hero-city-2.jpg'); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.wordmark {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .dot { color: var(--yellow); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}
.site-nav a {
  color: var(--ink-3);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease-out;
}
.site-nav a:hover { color: var(--muted); }

/* Burger and its dropdown. Both are display:none until the breakpoint below
   swaps them in for .site-nav. */
.burger {
  display: none;
  appearance: none;
  cursor: pointer;
  grid-auto-flow: row;
  place-content: center;
  justify-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  border: none;
  border-radius: 14px;
  background: transparent;
  transition: background 160ms ease-out;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}
.burger:hover,
.burger[aria-expanded="true"] { background: rgba(51, 51, 51, 0.06); }

/* The header is sticky, which makes it the containing block for this. */
.site-menu {
  display: none;
  position: absolute;
  top: calc(100% - 6px);
  right: var(--gutter);
  z-index: 19;
  flex-direction: column;
  min-width: 12.5rem;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 24px 50px -24px rgba(28, 29, 31, 0.5), inset 0 0 0 1px rgba(51, 51, 51, 0.07);
  animation: codi-pop 200ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.site-menu a {
  padding: 13px 14px;
  border-radius: 13px;
  font-size: 16px;
  color: var(--ink);
  transition: background 140ms ease-out;
}
.site-menu a:hover,
.site-menu a:active { background: rgba(51, 51, 51, 0.06); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding: clamp(40px, 7vh, 96px) var(--gutter) clamp(56px, 9vh, 120px);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  max-width: 34rem;
  animation: codi-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__media {
  position: relative;
  align-self: stretch;
  min-height: min(62vh, 520px);
  display: flex;
  animation: codi-rise 0.6s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.badge {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  background: rgba(238, 239, 240, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 221, 45, 0.28);
  animation: codi-pulse 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: transform;
}
.badge__label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.hero__title {
  margin: 0;
  font-size: clamp(2.75rem, 6.4vw, 5.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__lede {
  margin: 0;
  max-width: 30rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero__note {
  margin: 0;
  max-width: 27rem;
  font-size: 14.5px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  color: var(--muted);
}

/* Floating glass pill over the hero image */
.pill {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  margin: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 12px 28px -18px rgba(51, 51, 51, 0.5);
}
.pill__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--yellow);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.pill__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pill__title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #2f3237;
}
.pill__meta {
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: #6f7278;
}

/* --------------------------------------------------------------------------
   Content sections
   -------------------------------------------------------------------------- */

.section {
  scroll-margin-top: var(--header-h);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vh, 72px);
  padding: var(--section-y) var(--gutter) clamp(72px, 11vh, 140px);
}
.section--grey { background: var(--grey); }

.section__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 42rem;
}
.section__intro--narrow { gap: 20px; max-width: 38rem; }

.eyebrow {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--footer { color: var(--footer-muted); }

.section__title {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.section__intro--narrow .section__title { max-width: 22ch; }

.section__lede {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Card grids ---------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.018em;
}
.card__title--lg {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.card__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}

.step {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--yellow);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 6px 16px -10px rgba(51, 51, 51, 0.6);
}

/* --------------------------------------------------------------------------
   Full-width CTA bands
   -------------------------------------------------------------------------- */

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
  padding: clamp(72px, 12vh, 148px) var(--gutter);
  background: var(--grey);
}
.cta--closing {
  gap: 22px;
  padding: clamp(64px, 10vh, 132px) var(--gutter);
}

/* The two full-width bands sit on photographs. The scrim is what makes them
   work: both pictures are bright and busy - sky, grass, stone - and without it
   the dark copy and the yellow marker are lost in them. The grey from .cta stays
   underneath as the colour shown while a photo loads, so a missing file leaves
   the band looking the way it did before rather than broken. */
.cta--photo {
  position: relative;
  isolation: isolate;
  background-image: url('/images/closing-castle.jpg');
  background-size: cover;
  background-position: center;
}

/* The mid-page band, same treatment, different picture. */
.cta--photo-corner { background-image: url('/images/place-on-the-corner.jpg'); }
.cta--photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.74);
}

.cta__title {
  margin: 0;
  max-width: 44rem;
  font-size: clamp(2rem, 4.6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.033em;
  text-wrap: balance;
}
.cta__title--closing {
  max-width: 40rem;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.04;
}

.cta__lede {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Split (image + copy) sections
   -------------------------------------------------------------------------- */

.split {
  scroll-margin-top: var(--header-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(64px, 10vh, 132px) var(--gutter);
  background: var(--white);
}
.split--grey { background: var(--grey); }

.split__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 34rem;
}

.split__title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: pretty;
}

.split__lede {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Checklist under the companies lede. The list carries the copy styling because
   each item is a marker span followed by bare text. */
.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 32rem;
}
.tick {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.tick__mark {
  flex: none;
  margin-top: 2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vh, 64px);
  padding: clamp(48px, 8vh, 88px) var(--gutter) 36px;
  background: var(--footer-bg);
  color: var(--footer-fg);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(28px, 4vw, 56px);
}

.site-footer__brand,
.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/* The brand pushes the three link columns to the right instead of
   justify-content, which would have spread them unevenly once they wrap. */
.site-footer__brand { margin-right: auto; }

/* Sized to the longest link ("Terms for partners") so the columns stay equal
   and keep their width when they wrap onto a second row. */
.site-footer__col {
  flex: 0 0 11rem;
  max-width: 11rem;
}

.wordmark--footer {
  margin: 0;
  font-size: 32px;
  color: var(--footer-fg);
}

.site-footer__tagline {
  margin: 0;
  max-width: 13rem;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--footer-dim);
}

.site-footer__col a {
  color: var(--footer-fg);
  font-size: 15.5px;
  text-decoration: none;
  transition: color 160ms ease-out;
}
.site-footer__col a:hover { color: var(--yellow); }
.site-footer__col :focus-visible { outline-color: var(--yellow); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(238, 239, 240, 0.14);
  font-size: 13.5px;
  color: var(--footer-muted);
}

/* Right-hand end: the credit with the language switcher under it. */
.site-footer__end {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  align-items: center;
  gap: 10px 8px;
  text-align: right;
}
/* Theme and language sit in one row; the credit spans both under them. */
.site-footer__credit { grid-column: 1 / -1; }

/* --------------------------------------------------------------------------
   Language switcher
   -------------------------------------------------------------------------- */

.lang { position: relative; }

.lang__btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--footer-fg);
  background: rgba(238, 239, 240, 0.07);
  border: 1px solid rgba(238, 239, 240, 0.14);
  transition: background 160ms ease-out, border-color 160ms ease-out;
}
.lang__btn:hover {
  background: rgba(238, 239, 240, 0.12);
  border-color: rgba(238, 239, 240, 0.22);
}
.lang__flag { font-size: 14px; line-height: 1; }
.lang__caret {
  opacity: 0.6;
  transition: transform 180ms ease-out;
}
.lang__btn[aria-expanded="true"] .lang__caret { transform: rotate(180deg); }

/* Opens upwards: the switcher sits at the very bottom of the page, so a panel
   below it would hang off the end. */
.lang__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 19;
  display: flex;
  flex-direction: column;
  min-width: 11rem;
  padding: 6px;
  border-radius: 16px;
  text-align: left;
  background: rgba(60, 61, 64, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(238, 239, 240, 0.12);
  animation: codi-pop 200ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lang__menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 14.5px;
  color: var(--footer-fg);
  transition: background 140ms ease-out;
}
.lang__menu a:hover { background: rgba(238, 239, 240, 0.1); }

/* The theme switcher reuses the language switcher's shell. Its entries are
   buttons, not links: a theme is a preference, not a page. */
.lang__menu button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 14.5px;
  text-align: left;
  color: var(--footer-fg);
  background: transparent;
  transition: background 140ms ease-out;
}
.lang__menu button:hover { background: rgba(238, 239, 240, 0.1); }
.lang__menu button[aria-current="true"] {
  font-weight: 600;
  background: rgba(238, 239, 240, 0.07);
}

/* The language you are already reading, marked rather than hidden so the menu
   never changes length. */
.lang__menu a[aria-current="true"] {
  font-weight: 600;
  background: rgba(238, 239, 240, 0.07);
}

/* Left-hand end of the bottom row: copyright with the origin line under it. */
.site-footer__start {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Storyset's free licence requires attribution. It is a licence notice rather
   than part of the page's message, so it is deliberately quiet — dimmer and
   smaller than everything around it, brightening only on hover. */
.site-footer__credit {
  font-size: 10px;
  color: #6b6e74;
}
.site-footer__credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 200ms ease-out;
}
.site-footer__credit a:hover { color: var(--footer-dim); }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes codi-pulse {
  0%, 100% {
    transform: scale(0.94);
    opacity: 0.55;
    box-shadow: 0 0 0 2px rgba(255, 221, 45, 0.18), 0 0 4px 1px rgba(255, 221, 45, 0.3);
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
    box-shadow: 0 0 0 7px rgba(255, 221, 45, 0.22), 0 0 16px 5px rgba(255, 221, 45, 0.95);
  }
}

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* One breakpoint for the whole page, as the design specifies: above it every
   grid keeps its designed column count, below it everything is a single column.
   The previous 520/600/640/900 ladder let the auto-fit grids reflow at widths
   nobody had designed for. */
@media (max-width: 620px) {
  :root { --header-h: 72px; }

  .site-header { gap: 16px; padding-inline: clamp(16px, 4vw, 24px); }
  .wordmark { font-size: 26px; }
  .site-nav { display: none; }

  /* [hidden] still wins over these — the button toggles it. */
  .burger { display: grid; }
  .site-menu { display: flex; right: clamp(16px, 4vw, 24px); }

  .hero,
  .split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .hero__media { min-height: 62vw; }

  /* The companies block puts its image first in the markup, which would break
     the heading-then-image reading order the rest of the page uses. */
  #for-companies .frame { order: 2; }

  .btn { width: 100%; }
  .btn-row { width: 100%; }
}

/* --------------------------------------------------------------------------
   Legal pages and 404 — shared shell
   -------------------------------------------------------------------------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Inline yellow marker used inside legal copy and headings. */
.mark { box-shadow: inset 0 -0.32em 0 var(--yellow); }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 590;
  box-shadow: inset 0 -0.55em 0 rgba(255, 221, 45, 0.55);
}

/* Legal pages keep their nav at every width — it is the only route between the
   three documents — so it wraps instead of being dropped like the landing's. */
.site-nav--legal {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
}

/* Hero band ---------------------------------------------------------------- */

.legal-hero {
  background: var(--grey);
  padding: clamp(44px, 7vh, 92px) var(--gutter) clamp(40px, 6vh, 76px);
}
.legal-hero__inner {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  animation: codi-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.legal-badge {
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b6e74;
}
.legal-title {
  margin: 0;
  font-size: clamp(34px, 5.2vw, 58px);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1.04;
  max-width: 20ch;
  text-wrap: balance;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-meta li {
  padding: 7px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  color: #55585e;
}

/* Document body ------------------------------------------------------------ */

.legal-body {
  padding: clamp(36px, 6vh, 72px) var(--gutter) clamp(56px, 9vh, 104px);
}
.legal-main {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(30px, 4vh, 44px);
}
.legal-section {
  scroll-margin-top: 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.legal-h2 {
  margin: 0;
  font-size: clamp(21px, 2.3vw, 25px);
  font-weight: 680;
  letter-spacing: -0.022em;
  line-height: 1.28;
  text-wrap: pretty;
}
.legal-num {
  font-variant-numeric: tabular-nums;
  color: #b3b6bb;
}
.legal-block {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.legal-h3 {
  margin: 8px 0 -2px;
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.014em;
}
.legal-p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--ink-3);
  text-wrap: pretty;
}
.legal-p strong,
.legal-list strong {
  font-weight: 620;
  color: var(--ink);
}
.legal-list {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-list li {
  position: relative;
  padding-left: 22px;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-3);
  text-wrap: pretty;
}
.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--yellow);
}
.legal-list--nested {
  margin-top: 10px;
  padding-left: 0;
}
.legal-list--nested li::before {
  border-radius: 50%;
  background: #c9cbcf;
}

.legal-body a {
  color: var(--ink);
  box-shadow: inset 0 -0.32em 0 var(--yellow);
}

/* Third-party table (privacy policy, section 7) ---------------------------- */

.legal-table {
  margin-top: 4px;
  border: 1px solid #e2e4e6;
  border-radius: 16px;
  overflow: hidden;
}
.legal-table__scroll { overflow-x: auto; }
.legal-table__head,
.legal-table__row {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1.6fr;
  min-width: 32rem;
}
.legal-table__head {
  background: var(--grey);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b6e74;
}
.legal-table__head span { padding: 13px 16px; }
.legal-table__row {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-3);
  border-top: 1px solid #edeef0;
}
.legal-table__row span { padding: 14px 16px; }
/* The head shares the div type, so it occupies position 1 — odd here means the
   2nd, 4th … data row, which is the banding the design specifies. */
.legal-table__row:nth-of-type(odd) { background: #fafafb; }
.legal-table__row span:first-child {
  font-weight: 590;
  color: var(--ink);
}

/* 404 ---------------------------------------------------------------------- */

.nf {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(20px, 3.2vw, 34px);
  padding: clamp(40px, 7vh, 88px) var(--gutter) clamp(56px, 9vh, 104px);
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  animation: codi-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.nf__title {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  max-width: 20ch;
  text-wrap: balance;
}
.nf__img {
  width: 100%;
  max-width: 40rem;
  height: auto;
}
.nf__text {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.6;
  color: #55585e;
  max-width: 34rem;
  text-wrap: pretty;
}
/* The landing drops its nav below 620px; the legal pages must not — it is the
   only route between the three documents. Must stay in step with the landing's
   breakpoint above, or the nav disappears here too. */
@media (max-width: 620px) {
  .site-header--legal { flex-wrap: wrap; gap: 10px; }
  .site-nav--legal { display: flex; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Modal forms — waitlist, partner, contact.
   Markup is injected by forms.js so the three dialogs live in one place
   instead of being copy-pasted into every page's footer.
   -------------------------------------------------------------------------- */

.codi-dialog {
  padding: 0;
  border: none;
  /* The UA stylesheet gives <dialog> its own colour (black), which the title
     and anything else without an explicit colour would inherit - invisible on
     the dark theme's card. Pull it back to the page ink so both themes work. */
  color: var(--ink);
  background: transparent;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.codi-dialog::backdrop {
  background: rgba(38, 39, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.codi-dialog__wrap {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(20px, 5vw, 64px);
}

.md {
  position: relative;
  margin: auto;
  width: min(100%, 30rem);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(28, 29, 31, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  animation: codi-pop 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.md--wide {
  width: min(100%, 54rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.md__close {
  appearance: none;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 18px -10px rgba(51, 51, 51, 0.5);
  transition: transform 120ms ease-out, background 180ms ease-out;
}
.md__close:hover { background: var(--white); }
.md__close:active { transform: scale(0.93); }

.md__photo {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--frame-warm);
  background-image: var(--hatch);
}
.md__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Illustration variant: the artwork is square with its subject centred, so it
   is letterboxed rather than cropped like a photograph. */
.md__photo--art {
  aspect-ratio: 16 / 10;
  background-color: var(--cream);
  background-image: none;
}
/* Stays absolutely positioned like the photo variant — an in-flow child sized
   to 100% height would feed its own 1:1 ratio back and override aspect-ratio.
   Padding shrinks the content box, which is what object-fit: contain measures. */
.md__photo--art img {
  object-fit: contain;
  padding: 16px;
}

/* Storyset's free licence requires attribution. */
.md__credit {
  margin: -6px 0 0;
  font-size: 11px;
  color: #a5a8ae;
}
.md__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.md__credit a:hover { color: #6f7278; }

.md__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 4vw, 32px);
}
.md__head { display: flex; flex-direction: column; gap: 10px; padding-right: 44px; }
.md__title {
  margin: 0;
  font-size: clamp(1.625rem, 3.4vw, 2.125rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.md__lede { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--ink-3); text-wrap: pretty; }
.md__fields { display: flex; flex-direction: column; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: #6f7278; }
.field__req { color: #d9a800; }
.field__input {
  appearance: none;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #f5f6f7;
  border: 1px solid rgba(51, 51, 51, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 160ms ease-out, background 160ms ease-out;
}
.field__input:focus { background: var(--white); border-color: var(--yellow); }
.field__input::placeholder { color: #a5a8ae; }
textarea.field__input { line-height: 1.5; resize: vertical; }
.field__error { font-size: 13.5px; line-height: 1.45; color: #b4483c; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-3);
  background: #f5f6f7;
  border: 1px solid rgba(51, 51, 51, 0.08);
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 160ms ease-out, transform 120ms ease-out;
}
.chip:hover { background: var(--grey); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] {
  font-weight: 600;
  color: var(--ink);
  background: var(--yellow);
  border-color: rgba(51, 51, 51, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.chip[aria-pressed="true"]:hover { background: var(--yellow); }

/* Turnstile renders its own iframe at a fixed size; this just gives it room. */
.turnstile:not(:empty) { margin-top: 2px; }

/* Submit failed. The design has no error screen, so this sits inline above the
   button and the form stays filled in so the person can retry. */
.md__formerror {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdf1ef;
  border: 1px solid rgba(180, 72, 60, 0.18);
}

.btn:disabled {
  cursor: default;
  opacity: 0.62;
  filter: none;
  transform: none;
}

.md__fine { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.md__fine a { color: #6f7278; text-decoration: underline; text-underline-offset: 2px; }

.md__success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(28px, 4vw, 36px);
}
/* Focused programmatically so screen readers announce the result. It is not
   interactive, so it gets no focus ring. */
.md__success .md__title:focus { outline: none; }

.md__successmark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--yellow);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.md__back {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(51, 51, 51, 0.1);
  padding: 13px 24px;
  border-radius: 999px;
  margin-top: 4px;
  transition: background 180ms ease-out, transform 120ms ease-out;
}
.md__back:hover { background: #f7f7f8; }
.md__back:active { transform: scale(0.97); }

/* Contact modal's left-hand panel */
.md__aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(28px, 4vw, 40px);
  background: var(--grey);
}
.md__asidefig {
  position: relative;
  flex: 1;
  min-height: 180px;
  border-radius: 20px;
  overflow: hidden;
  background-color: var(--frame-cool);
  background-image: var(--hatch);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.md__asidefig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Illustration variant — letterboxed, not cropped. Same reasoning as
   .md__photo--art: the image stays absolutely positioned, and padding shrinks
   the content box that object-fit: contain measures. */
.md__asidefig--art {
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}
.md__asidefig--art img {
  object-fit: contain;
  padding: 12px;
}
.md__pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 40px);
}
.md__pane .md__form { padding: 0; gap: 14px; }
.md__pane .md__success { padding: 0; }

@keyframes codi-pop {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* --------------------------------------------------------------------------
   Dark theme

   The head script resolves "auto" and always writes light or dark onto <html>,
   so everything below is one attribute deep and there is no media query to keep
   in sync. Only colours change here: no size, spacing, weight or copy differs
   between the themes.

   Two rules worth knowing:

   - Yellow never inverts. It is the brand, it clears 11:1 on these grounds, and
     anything sitting ON it keeps dark ink — hence the group of overrides that
     pin colour back to near-black on yellow plates.
   - The yellow marker under headings is the one place yellow is not solid: a
     full-strength bar behind light text is unreadable, so in the dark theme it
     drops to a translucent wash of the same colour. Same for the pulsing dot.
   -------------------------------------------------------------------------- */

:root[data-theme="dark"] {
  /* Page and section grounds. Each is a shade apart so the alternating rhythm
     of the light theme survives: plain sections sit darkest, grey sections read
     a touch greyer, warm surfaces keep their yellow cast. */
  --white:       #121317;
  --grey:        #1a1c20;
  --cream:       #1f1c14;
  --frame-cool:  #23262b;
  --frame-warm:  #26231a;

  /* Text, four steps down from near-white, mirroring the light ramp. */
  --ink:         #eeeff0;
  --ink-2:       #b9bcc2;
  --ink-3:       #aeb1b8;
  --ink-4:       #9da0a7;
  --muted:       #83868d;

  /* The footer has to stay darker than the page it closes. */
  --footer-bg:   #08090b;

  --hatch: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 10px, rgba(255, 255, 255, 0) 10px 20px);
}

/* Anything sitting on a yellow plate keeps dark ink. Every rule with
   `background: var(--yellow)` is listed here; adding another means adding it. */
[data-theme="dark"] .btn--primary,
[data-theme="dark"] .tick__mark,
[data-theme="dark"] .step,
[data-theme="dark"] .pill__mark,
[data-theme="dark"] .skip-link,
[data-theme="dark"] .chip[aria-pressed="true"],
[data-theme="dark"] .md__successmark { color: #17181b; }

/* The marker, translucent so the words stay readable through it. */
[data-theme="dark"] .hl {
  background-image: linear-gradient(rgba(255, 221, 45, 0.3), rgba(255, 221, 45, 0.3));
}
[data-theme="dark"] .mark,
[data-theme="dark"] .legal-body a { box-shadow: inset 0 -0.32em 0 rgba(255, 221, 45, 0.3); }
/* The shared pulse peaks at a 95% glow. On a light ground that is a soft
   flicker; on a dark one it is a flare. Same rhythm, the light turned right
   down. The static shadow below only shows under prefers-reduced-motion, where
   the animation is stopped. */
@keyframes codi-pulse-dark {
  0%, 100% {
    transform: scale(0.94);
    opacity: 0.45;
    box-shadow: 0 0 0 2px rgba(255, 221, 45, 0.05), 0 0 4px 1px rgba(255, 221, 45, 0.07);
  }
  50% {
    transform: scale(1.35);
    opacity: 0.8;
    box-shadow: 0 0 0 6px rgba(255, 221, 45, 0.07), 0 0 12px 3px rgba(255, 221, 45, 0.16);
  }
}
[data-theme="dark"] .badge__dot {
  background: rgba(255, 221, 45, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 221, 45, 0.1);
  animation-name: codi-pulse-dark;
}

/* Glass. The light theme frosts white over the page; dark frosts the page over
   itself, with a hairline doing the work the shadow used to. */
[data-theme="dark"] .site-header { background: rgba(18, 19, 23, 0.72); }
[data-theme="dark"] .menu__panel {
  background: rgba(26, 28, 33, 0.94);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}
[data-theme="dark"] .badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .hero__card {
  background: rgba(16, 17, 21, 0.74);
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .cta--photo::before { background: rgba(10, 11, 14, 0.7); }

/* The How-it-works illustrations are drawn on white. Left alone they are the
   brightest thing on the page; this seats them into the dark ground without
   touching the photographs, which stay as shot. */
[data-theme="dark"] .frame--art img { filter: brightness(0.92) saturate(0.96); }

/* Frames and cards: shadows barely register on a dark ground, so the inset
   hairline carries the edge and the shadow only adds depth. */
[data-theme="dark"] .frame,
[data-theme="dark"] .frame--5x4,
[data-theme="dark"] .hero__photo,
[data-theme="dark"] .md__asidefig {
  box-shadow: 0 24px 52px -32px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Secondary buttons are a white plate in the light theme; here they are a
   surface one step above the page. */
[data-theme="dark"] .btn--secondary {
  background: #1e2126;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .btn--secondary:hover { background: #24272d; }

/* Modals */
[data-theme="dark"] .md {
  background: #16181c;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .md__close {
  background: rgba(30, 32, 37, 0.82);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .md__close:hover { background: #24272d; }
[data-theme="dark"] .field__input {
  background: #1c1e23;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}
[data-theme="dark"] .field__input:focus { background: #24272d; border-color: var(--yellow); }
[data-theme="dark"] .field__input::placeholder { color: #7b7e85; }
[data-theme="dark"] .chip {
  background: #1c1e23;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink-2);
}
[data-theme="dark"] .chip:hover { background: #24272d; }
/* A picked chip is yellow with dark ink in both themes. Stated here, after the
   dark .chip rule above, because that rule shares its specificity with the
   light theme's picked-chip rule and was winning the background by source
   order - leaving dark ink on a dark plate. */
[data-theme="dark"] .chip[aria-pressed="true"],
[data-theme="dark"] .chip[aria-pressed="true"]:hover {
  background: var(--yellow);
  border-color: rgba(0, 0, 0, 0.15);
  color: #17181b;
}
[data-theme="dark"] .field__label,
[data-theme="dark"] .md__fine a { color: var(--ink-4); }
[data-theme="dark"] .field__error { color: #ff8377; }
[data-theme="dark"] .md__formerror {
  background: rgba(255, 131, 119, 0.1);
  border-color: rgba(255, 131, 119, 0.28);
}
[data-theme="dark"] .md__back:hover { background: #24272d; }
[data-theme="dark"] .burger:hover,
[data-theme="dark"] .burger[aria-expanded="true"],
[data-theme="dark"] .site-menu a:hover,
[data-theme="dark"] .site-menu a:active { background: rgba(255, 255, 255, 0.08); }

/* Legal pages */
[data-theme="dark"] .legal-badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink-4);
}
[data-theme="dark"] .legal-meta li {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-3);
}
[data-theme="dark"] .legal-table { border-color: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .legal-table__head { color: var(--ink-4); }
[data-theme="dark"] .legal-table__row { border-top-color: rgba(255, 255, 255, 0.09); }
[data-theme="dark"] .legal-table__row:nth-of-type(odd) { background: rgba(255, 255, 255, 0.035); }

/* The current document in the legal nav is marked with the same yellow bar as
   the headings, so it thins out the same way. */
[data-theme="dark"] .site-nav a[aria-current="page"] {
  box-shadow: inset 0 -0.55em 0 rgba(255, 221, 45, 0.3);
}
