@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dmsans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg: light-dark(#fafaf9, #0c0c0b);
  --card: light-dark(#fff, #161615);
  --panel: light-dark(#f1f1ef, #1a1a19);
  --ink: light-dark(#141413, #f4f4f2);
  --muted: light-dark(#6d6d68, #9a9a94);
  --line: light-dark(#e6e6e3, #2a2a28);
  --accent: light-dark(#047857, #34d399);
  --soft: light-dark(rgba(5, 150, 105, 0.1), rgba(52, 211, 153, 0.14));
  --mark: light-dark(#d9f99d, #3f6212);
  --mark-ink: light-dark(#1a2e05, #ecfccb);
  --carbs: light-dark(#c8811b, #d29a3d);
  --proteins: light-dark(#2f6ecb, #5f96e8);
  --fats: light-dark(#b0508a, #d07fb1);
  --shadow:
    0 1px 2px light-dark(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.4)),
    0 16px 40px -18px light-dark(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.7));
}

html {
  color-scheme: light dark;
}
* {
  box-sizing: border-box;
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font:
    400 16px/1.5 "DM Sans",
    system-ui,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
a {
  color: inherit;
}
button,
input {
  color: inherit;
  font: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 40px, 760px);
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, 1000px);
  margin-inline: auto;
  padding-block: 12px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo img {
  display: block;
}
.pill {
  padding: 7px 14px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.hero {
  padding-block: clamp(30px, 7vw, 76px) 26px;
  text-align: center;
}
h1 {
  text-wrap: balance;
  font:
    400 clamp(39px, 10.8vw, 76px)/1.04 "Newsreader",
    Georgia,
    serif;
  letter-spacing: -0.035em;
}
.swap {
  display: block;
  position: relative;
  height: 1.16em;
  overflow: hidden;
}
.swap span {
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2.5px;
  text-underline-offset: 0.11em;
  white-space: nowrap;
}
.swap span.out {
  position: absolute;
  right: 0;
  left: 0;
  animation: out 0.32s ease-in forwards;
}
.swap span.in {
  animation: in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes out {
  to {
    opacity: 0;
    transform: translateY(-70%);
  }
}
@keyframes in {
  from {
    opacity: 0;
    transform: translateY(80%);
  }
}

.lead {
  max-width: 28em;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.join {
  display: grid;
  gap: 8px;
  max-width: 390px;
  margin: 26px auto 0;
}
.join input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.join input::placeholder {
  color: var(--muted);
}
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #059669;
}
.terms {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}
.trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
}
.cta b {
  font-weight: 500;
  transition: transform 0.18s;
}
.cta:hover b {
  transform: translateX(3px);
}
.fine {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 26px auto 14px;
  padding: 4px;
  border-radius: 13px;
  background: var(--panel);
}
.tabs button {
  padding: 7px 13px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tabs button[aria-selected="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stagewrap {
  position: relative;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 8px;
  border-radius: 5px;
  background: var(--mark);
  color: var(--mark-ink) !important;
  font-size: 13px;
  font-weight: 600;
}
.mark svg {
  width: 13px;
  height: 13px;
}

.stage {
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
}
.stage header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.stage header.sub {
  padding-block: 6px;
  border-bottom: 0;
}
.stage header b {
  font-weight: 600;
}
.stage header span {
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 12px 12px 8px;
}
.tiles button {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 7px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: none;
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tiles b {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.tiles span {
  color: var(--muted);
}
.tiles button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--soft);
}
.tiles button[aria-pressed="true"] span {
  color: var(--accent);
}

.rail {
  display: flex;
  gap: 2px;
  height: 5px;
  margin: 6px 14px 4px;
}
.rail i {
  border-radius: 2px;
}
.c {
  background: var(--carbs);
}
.p {
  background: var(--proteins);
}
.f {
  background: var(--fats);
}
.macros {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  padding: 0 14px 8px;
  color: var(--muted);
  font-size: 13px;
}
.macros i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
}

.row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.row time,
.row small,
.row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.row small {
  display: block;
  line-height: 1.3;
}
.row b {
  font-weight: 500;
}
.row.next {
  background: var(--soft);
}
.row.next time {
  color: var(--accent);
}
.row label {
  display: contents;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  cursor: pointer;
}
.check input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #059669;
}
.check span {
  flex: 1;
}
.check em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.check:has(input:checked) span {
  color: var(--muted);
  text-decoration: line-through;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
  padding-block: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}
.stats div + div {
  border-left: 1px solid var(--line);
}
.stats b {
  display: block;
  font:
    400 30px/1.1 "Newsreader",
    Georgia,
    serif;
  letter-spacing: -0.02em;
}
.stats span {
  color: var(--muted);
  font-size: 13px;
}
.statsnote {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.say {
  padding-block: clamp(56px, 11vw, 96px) clamp(30px, 6vw, 56px);
  text-align: center;
}
.say p {
  text-wrap: balance;
  font:
    400 clamp(29px, 6.8vw, 46px)/1.14 "Newsreader",
    Georgia,
    serif;
  letter-spacing: -0.025em;
}
.say u {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
}

.grid {
  display: grid;
  gap: 12px;
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
}
.tile h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.tile > p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 15px;
}
.mini {
  flex: 1;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background: var(--card);
  font-size: 14px;
}
.mini .line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-block: 4px;
  font-variant-numeric: tabular-nums;
}
.mini .line span:last-child {
  flex: none;
  color: var(--muted);
}
.mini .bars {
  display: flex;
  gap: 2px;
  height: 5px;
  margin-top: 6px;
}
.mini .bars i {
  border-radius: 2px;
}
.mini .line.gap {
  margin-top: 6px;
}
.s59 {
  flex: 0.59;
}
.s14 {
  flex: 0.14;
}
.s27 {
  flex: 0.27;
}
.scan {
  position: relative;
  height: 62px;
  margin-bottom: 6px;
  border-radius: 7px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 4px,
    var(--ink) 4px 5px,
    transparent 5px 8px,
    var(--ink) 8px 11px,
    transparent 11px 12px
  );
}
.scan::after {
  position: absolute;
  top: 0;
  right: -6px;
  left: -6px;
  height: 2px;
  background: var(--accent);
  content: "";
  animation: sweep 2.6s ease-in-out infinite alternate;
}
@keyframes sweep {
  to {
    transform: translateY(60px);
  }
}

.versus {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  font:
    400 13px/1.3 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
.versus table {
  width: 100%;
  border-collapse: collapse;
}
.versus th,
.versus td {
  padding: 10px 6px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-weight: 400;
}
.versus thead th {
  border-top: 0;
  color: var(--muted);
}
.versus th:first-child {
  padding-left: 14px;
  text-align: left;
}
.versus .us {
  background: var(--soft);
  color: var(--accent);
  font-weight: 600;
}
.versus .no {
  color: var(--muted);
}

.end {
  padding-block: clamp(56px, 11vw, 96px) 38px;
  text-align: center;
}
.end h2 {
  font:
    400 clamp(32px, 7.8vw, 52px)/1.08 "Newsreader",
    Georgia,
    serif;
  letter-spacing: -0.03em;
}

.foot {
  display: grid;
  gap: 8px;
  padding-block: 18px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.end .lead {
  margin-top: 12px;
}

.nojs {
  padding: 24px 14px;
  color: var(--muted);
  text-align: center;
}

.note {
  min-height: 62vh;
  padding-block: clamp(40px, 9vw, 88px);
}
.note h1 {
  font-size: clamp(34px, 7.6vw, 52px);
}
.note p {
  max-width: 34em;
  margin-top: 16px;
  font-size: 17px;
}
.note p.fine {
  color: var(--muted);
  font-size: 15px;
}
.note form {
  margin-top: 22px;
}
.note a {
  color: var(--accent);
}
.cta:disabled {
  cursor: default;
  opacity: 0.5;
}

.doc {
  padding-block: clamp(32px, 7vw, 64px);
}
.doc h1 {
  font-size: clamp(34px, 7.6vw, 48px);
}
.doc .version {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.doc h2 {
  margin-top: 30px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.doc p,
.doc ul {
  margin-top: 10px;
}
.doc ul {
  padding-left: 20px;
}
.doc li + li {
  margin-top: 6px;
}
.doc a {
  color: var(--accent);
}
.doc .table {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.doc table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.4;
}
.doc th,
.doc td {
  padding: 9px 11px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.doc thead th {
  border-top: 0;
  color: var(--muted);
  font-weight: 500;
}

.cookie {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 10;
  display: grid;
  gap: 12px;
  max-width: 440px;
  margin-left: auto;
  padding: 14px 44px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.4;
}
.cookie a {
  color: var(--accent);
}
.cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cookie-b {
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: none;
  font-weight: 600;
  cursor: pointer;
}
.cookie-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/*
 * On a phone the product comes right after the headline, so the first screen has
 * something to look at. On a wide screen there is room for the form above it.
 */
.hero-join {
  margin-top: 26px;
  scroll-margin-top: 16px;
}
.hero-join .join {
  margin-top: 0;
}

@media (min-width: 720px) {
  .hero {
    display: flex;
    flex-direction: column;
  }
  .hero h1,
  .hero .lead {
    order: 1;
  }
  .hero-join {
    order: 2;
  }
  .hero .tabs {
    order: 3;
  }
  .hero .stagewrap,
  .hero .stats,
  .hero .statsnote {
    order: 4;
  }
  .join {
    grid-template-columns: 1fr auto;
  }
  .consent,
  .terms {
    grid-column: 1 / -1;
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* The smallest phones: the tabs and the comparison must fit without being cut. */
@media (max-width: 360px) {
  .tabs button {
    padding: 7px 10px;
    font-size: 13px;
  }
  .versus {
    font-size: 11px;
  }
  .versus th,
  .versus td {
    padding: 9px 3px;
  }
  .versus th:first-child {
    padding-left: 10px;
  }
}
/* A legal table is read row by row on a phone, with each cell naming its column. */
@media (max-width: 560px) {
  .doc table {
    min-width: 0;
  }
  .doc thead {
    display: none;
  }
  .doc tr,
  .doc td {
    display: block;
  }
  .doc tbody tr + tr {
    border-top: 1px solid var(--line);
  }
  .doc td {
    padding: 3px 12px;
    border-top: 0;
  }
  .doc td:first-child {
    padding-top: 11px;
    font-weight: 600;
  }
  .doc td:last-child {
    padding-bottom: 11px;
  }
  .doc td::before {
    display: block;
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 400;
  }
}
@media (prefers-reduced-motion: reduce) {
  .swap span.out,
  .swap span.in,
  .scan::after {
    animation: none;
  }
  .cta b {
    transition: none;
  }
}
