:root {
  --ink: #1c1915;
  --muted: #5c564c;
  --paper: #f4efe6;
  --line: rgba(28, 25, 21, 0.16);
  --focus: #1c1915;
  --font-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-body: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --radius: 22px;
  --tap: 48px;
  --sheet: 440px;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: 16px;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

p {
  margin: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 5;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 650;
}

.skip:focus {
  top: 12px;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.sheet {
  width: min(var(--sheet), 100%);
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 20px calc(36px + env(safe-area-inset-bottom));
}

html.lang-fr:not(.i18n-ready) body {
  visibility: hidden;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 52px;
  margin-bottom: 8px;
}

.top:not(.play-top) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand langs sound" "hub hub hub";
  align-items: center;
  column-gap: 8px;
  row-gap: 6px;
}

.top:not(.play-top) > .brand { grid-area: brand; }
.top:not(.play-top) > .lang-switch { grid-area: langs; justify-self: start; }
.top:not(.play-top) > .sound-toggle { grid-area: sound; justify-self: end; }
.top:not(.play-top) > .to-hub { grid-area: hub; justify-self: start; }

@media (max-width: 420px) {
  .top:not(.play-top) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand sound" "langs langs" "hub hub";
  }

  .brand-logo { height: 32px; max-width: 46vw; }

  .top:not(.play-top) > .lang-switch {
    justify-self: start;
    flex-wrap: wrap;
    max-width: 100%;
  }

  .sound-toggle {
    max-width: 42vw;
    padding: 6px 10px;
    font-size: 13px;
  }

  .subs-toggle { margin-left: 0; }
}

.sound-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: #f3efe6;
  color: #1c1915;
  box-shadow: inset 0 0 0 2px rgba(28, 25, 21, 0.14);
  font-family: var(--font-body, "Outfit", system-ui, sans-serif);
  font-weight: 750;
  font-size: 14px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.lang-switch button {
  appearance: none;
  min-height: 44px;
  min-width: 36px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.lang-switch button.is-on {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-switch .lang-bar {
  opacity: 0.55;
}

.subs-toggle {
  appearance: none;
  min-height: 44px;
  margin-left: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 25, 21, 0.08);
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.page-karma .subs-toggle,
.play-top .subs-toggle {
  background: rgba(255, 228, 196, 0.12);
}

.en-only {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  opacity: 0.9;
}

.caption-bar {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #14110e;
  color: #f3efe6;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.caption-bar[hidden] {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: #14110e;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}

.to-hub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  background: rgba(28, 25, 21, 0.06);
}

.page-home .to-hub {
  display: none;
}

h1,
.h-display {
  font-family: var(--font-display);
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
}

.kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.4;
  max-width: 36em;
}

.fine {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.site-foot {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.watch-nav {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.watch-line {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.watch-line a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-weight: 750;
  color: inherit;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  background: rgba(28, 25, 21, 0.06);
}

.foot-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.btn,
.choice,
.text-btn {
  touch-action: manipulation;
}

select,
textarea {
  appearance: none;
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid #1c1915;
  background: #f3efe6;
  color: #1c1915;
  font: inherit;
  font-weight: 650;
}

textarea { min-height: 120px; }

.btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: var(--ink);
  color: #fff;
  font-weight: 680;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.text-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 680;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.silent-hint {
  position: fixed;
  z-index: 40;
  top: calc(56px + env(safe-area-inset-top));
  right: 16px;
  max-width: 220px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 16, 12, 0.9);
  color: #f6f1e8;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  pointer-events: none;
}

.idea-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid rgba(28, 25, 21, 0.12);
}

.idea-box h2 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.idea-box p {
  margin: 0 0 10px;
}

.idea-box label {
  display: block;
  margin-top: 10px;
  font-weight: 650;
}

.idea-box textarea,
.idea-box input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 6px;
}

.idea-box textarea {
  min-height: 96px;
}

.idea-box .btn {
  margin-top: 10px;
}

.idea-box .optional {
  font-weight: 500;
  color: var(--muted);
}

.idea-error {
  margin: 10px 0 0;
  font-weight: 700;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
