/*
 * Tokos one-pager. Colors and font stacks come from tokens.css, generated from the app's theme/tokens.js:
 * use rgb(var(--token)) or rgb(var(--token) / alpha) — never a literal color (shadows and masks use black, as the
 * app's shadows do).
 * Type mirrors the app's <Text> variants; cards, pills, icon tiles, and the hero mirror its components.
 */

/* ---------- foundation ---------- */

:root {
  --gutter: 20px;
  --content: 1160px;
  --radius-card: 24px; /* the app's rounded-3xl */
  --radius-panel: 32px; /* rounded-4xl */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 600px) {
  :root {
    --gutter: 32px;
  }
}

@media (min-width: 960px) {
  :root {
    --gutter: 40px;
  }
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Print and "Save as PDF" keep the backgrounds; otherwise the hero's cream text lands on blank paper. */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  margin: 0;
  overflow-x: clip;
  background: rgb(var(--background));
  color: rgb(var(--foreground));
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a,
button,
input {
  color: inherit;
}

button,
input {
  font: inherit;
}

strong {
  font-weight: 700;
}

svg {
  flex: none;
}

::selection {
  background: rgb(var(--primary-soft));
  color: rgb(var(--foreground));
}

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

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgb(var(--foreground));
  color: rgb(var(--background));
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- type: the app's <Text> variants, plus the page's display sizes ---------- */

.title3 {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.headline {
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

.footnote {
  font-size: 13px;
  line-height: 19px;
  font-weight: 500;
}

.caption {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.overline {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.tone-muted {
  color: rgb(var(--muted-foreground));
}

.section-title {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 2.4vw + 25px, 54px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-lede {
  max-width: 60ch;
  margin-top: 16px;
  color: rgb(var(--muted-foreground));
  font-size: clamp(16px, 0.25vw + 15px, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---------- header + brand ---------- */

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  text-decoration: none;
}

.mark {
  display: block;
  width: 30px;
  height: 30px;
}

.mark-dot,
.wordmark-dot {
  fill: rgb(var(--gold));
  color: rgb(var(--gold));
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: none;
}

@media (min-width: 760px) {
  .site-header-inner {
    min-height: 84px;
  }

  .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    color: rgb(var(--muted-foreground));
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
  }

  .nav-link:hover {
    background: rgb(var(--muted));
    color: rgb(var(--foreground));
  }

  .site-nav .button {
    margin-left: 8px;
  }
}

/* ---------- buttons (the app's <Button> variants) ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease-out), background-color 0.2s, opacity 0.2s;
}

.button-sm {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.button-lg {
  min-height: 56px;
  padding: 0 26px;
  font-size: 17px;
  line-height: 22px;
}

.button .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: transform 0.2s var(--ease-out);
}

.button-primary {
  background: rgb(var(--primary));
  color: rgb(var(--primary-foreground));
}

.button-primary:hover {
  background: rgb(var(--primary) / 0.88);
}

/* Cream on forest, for hero surfaces. */
.button-inverse {
  background: rgb(var(--hero-foreground));
  color: rgb(var(--hero));
}

.button-inverse:hover {
  background: rgb(var(--hero-foreground) / 0.9);
}

.button-quiet {
  background: rgb(var(--hero-foreground) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--hero-foreground) / 0.22);
  color: rgb(var(--hero-foreground));
}

.button-quiet:hover {
  background: rgb(var(--hero-foreground) / 0.14);
}

.button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}

/* Forced colors (Windows contrast themes) drop button backgrounds, so draw an outline in the system's color. */
@media (forced-colors: active) {
  .button {
    border: 1px solid;
  }
}

/* ---------- hero ---------- */

.hero-section {
  padding-top: 4px;
}

/* Forest with warm gold light from the top right and a soft lift top left — the app's welcome backdrop. */
.hero,
.not-found-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-panel);
  background-color: rgb(var(--hero));
  background-image:
    radial-gradient(90% 65% at 100% 0%, rgb(var(--hero-accent) / 0.16), transparent 70%),
    radial-gradient(70% 55% at 0% 0%, rgb(var(--hero-foreground) / 0.07), transparent 70%);
  color: rgb(var(--hero-foreground));
}

.hero {
  display: grid;
  gap: 44px;
  padding: 40px 24px 0;
}

.hero :focus-visible,
.not-found-card :focus-visible {
  outline-color: rgb(var(--hero-accent));
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgb(var(--hero-foreground) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--hero-foreground) / 0.14);
  color: rgb(var(--hero-accent));
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.hero-title {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(44px, 4.4vw + 28px, 84px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-title em {
  color: rgb(var(--hero-accent));
  white-space: nowrap;
}

.hero-lede {
  max-width: 36ch;
  margin-top: 20px;
  color: rgb(var(--hero-foreground) / 0.75);
  font-size: clamp(17px, 0.4vw + 15.5px, 20px);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

@media (max-width: 479px) {
  .hero-actions .button {
    flex: 1 1 100%;
  }
}

/* The phone rises from the card's bottom edge; --device-visible is how much of it shows before the edge. */
.hero-visual {
  --device-visible: 440px;
  position: relative;
  display: flex;
  justify-content: center;
  height: var(--device-visible);
}

.hero-caption {
  margin-top: 12px;
  text-align: center;
}

@media (max-width: 599px) {
  /* Let the forest card breathe almost edge to edge on phones. */
  .hero {
    margin-inline: calc(10px - var(--gutter));
    border-radius: 28px;
    padding-inline: 22px;
  }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    column-gap: 40px;
    min-height: 620px;
    padding: 64px 56px 0 64px;
  }

  .hero-copy {
    padding-bottom: 64px;
  }

  .hero-visual {
    --device-visible: 556px;
    align-self: end;
  }

  .hero-caption {
    padding-right: 56px;
    text-align: right;
  }
}

/* The phone: a stylized Today screen, drawn with the app's own tokens (no screenshots). */
.device {
  width: min(300px, 100%);
  height: max-content;
  padding: 9px;
  border-radius: 50px;
  background: rgb(var(--hero-foreground) / 0.1);
  box-shadow: inset 0 0 0 1px rgb(var(--hero-foreground) / 0.18);
  /* Fade into the forest where the card cuts the phone off, instead of slicing through a line of text. */
  -webkit-mask-image: linear-gradient(to bottom, black calc(var(--device-visible) - 120px), transparent var(--device-visible));
  mask-image: linear-gradient(to bottom, black calc(var(--device-visible) - 120px), transparent var(--device-visible));
}

.device-screen {
  display: grid;
  gap: 14px;
  padding: 10px 14px 18px;
  overflow: hidden;
  border-radius: 41px;
  background: rgb(var(--background));
  color: rgb(var(--foreground));
}

.status-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 28px;
  padding-inline: 14px 8px;
}

.status-time {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.island {
  width: 84px;
  height: 24px;
  border-radius: 999px;
  background: rgb(var(--background));
}

.status-icons {
  justify-self: end;
  width: 56px;
  height: 11px;
  fill: currentColor;
}

.status-icons .battery-case {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.4;
}

.status-icons .battery-cap {
  opacity: 0.4;
}

.app-greeting {
  display: grid;
  gap: 3px;
  padding: 4px 4px 0;
}

.app-overline {
  color: rgb(var(--muted-foreground));
  font-size: 9.5px;
  line-height: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.app-title {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 30px;
}

.app-text {
  color: rgb(var(--muted-foreground));
  font-size: 12px;
  line-height: 17px;
}

.app-text strong {
  color: rgb(var(--foreground));
  font-weight: 600;
}

.app-revenue {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background-color: rgb(var(--hero));
  background-image: radial-gradient(80% 60% at 100% 0%, rgb(var(--hero-accent) / 0.16), transparent 70%);
  color: rgb(var(--hero-foreground));
}

.app-revenue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.revenue-label {
  color: rgb(var(--hero-accent));
}

.revenue-total {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -0.5px;
}

.revenue-delta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgb(var(--hero-foreground) / 0.6);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
}

.delta-up {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: rgb(var(--success));
}

.delta-up .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.8;
}

.revenue-go {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgb(var(--hero-foreground) / 0.1);
}

.revenue-go .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.revenue-bars {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
}

.c1 {
  fill: rgb(var(--chart-1));
}

.c2 {
  fill: rgb(var(--chart-2));
}

.c3 {
  fill: rgb(var(--chart-3));
}

.c4 {
  fill: rgb(var(--chart-4));
}

/* Six columns spaced like the bars (30-wide bars, 8-wide gaps in a 220 viewBox). */
.revenue-months {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 3.64%;
  margin-top: -4px;
  color: rgb(var(--hero-foreground) / 0.55);
  font-size: 9.5px;
  line-height: 12px;
  font-weight: 600;
  text-align: center;
}

.revenue-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 10px;
  padding-top: 2px;
}

.revenue-legend li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.revenue-legend .dot {
  margin-top: 3px;
}

.revenue-legend li > span:last-child {
  display: grid;
  color: rgb(var(--hero-foreground) / 0.6);
  font-size: 10px;
  line-height: 13px;
  font-weight: 600;
}

.revenue-legend strong {
  color: rgb(var(--hero-foreground));
  font-size: 13px;
  line-height: 17px;
  font-variant-numeric: tabular-nums;
}

.app-family {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgb(var(--border));
  border-radius: 20px;
  background: rgb(var(--card));
}

.ring {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
}

.ring svg {
  position: absolute;
  inset: 0;
}

.ring circle {
  fill: none;
  stroke-width: 5;
}

.ring-track {
  stroke: rgb(var(--success) / 0.16);
}

.ring-value {
  stroke: rgb(var(--success));
  stroke-linecap: round;
}

.ring-label {
  display: grid;
  justify-items: center;
  color: rgb(var(--muted-foreground));
  font-size: 7.5px;
  line-height: 8px;
  font-weight: 600;
}

/* 700, not the app's 800: one tiny number isn't worth downloading the ExtraBold face. */
.ring-label strong {
  color: rgb(var(--foreground));
  font-size: 12px;
  line-height: 13px;
  font-weight: 700;
}

.app-family-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app-family-name {
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
}

.app-family-meta {
  overflow: hidden;
  color: rgb(var(--muted-foreground));
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-family-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 6px;
  border-radius: 999px;
  background: rgb(var(--muted));
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
}

.mini-pill .dot {
  width: 6px;
  height: 6px;
}

/* A toast like the app's, landing beside the phone on wide screens. */
.float-toast {
  display: none;
}

@media (min-width: 960px) {
  .float-toast {
    position: absolute;
    top: 83%;
    left: -64px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 10px;
    border-radius: 18px;
    background: rgb(var(--elevated));
    box-shadow:
      0 0 0 1px rgb(var(--border)),
      0 18px 40px -14px rgb(0 0 0 / 0.4);
    color: rgb(var(--foreground));
  }
}

.float-toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgb(var(--success-soft));
  color: rgb(var(--success));
}

.float-toast-icon .icon {
  stroke-width: 2.4;
}

.float-toast-text {
  display: grid;
  color: rgb(var(--muted-foreground));
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.float-toast-text strong {
  color: rgb(var(--foreground));
  font-size: 14px;
  line-height: 18px;
}

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

.section {
  padding-top: 88px;
}

@media (min-width: 960px) {
  .section {
    padding-top: 136px;
  }
}

.section-header {
  max-width: 760px;
}

/* ---------- shared pieces: icon tiles, pills, dots ---------- */

.icon-tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgb(var(--primary-soft));
  color: rgb(var(--primary));
}

.icon-tile .icon {
  width: 21px;
  height: 21px;
}

/* Pills carry their tone in a dot, so the label stays foreground on muted and passes AA in both schemes. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: rgb(var(--muted));
  color: rgb(var(--foreground));
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.pill .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
  color: rgb(var(--success));
}

.dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--muted-foreground));
}

.dot-primary {
  background: rgb(var(--primary));
}

.dot-info {
  background: rgb(var(--info));
}

.dot-gold {
  background: rgb(var(--gold));
}

.dot-accent {
  background: rgb(var(--accent));
}

.dot-success {
  background: rgb(var(--success));
}

/* Payer colors match the revenue chart, as in the app (PAYER_CHART_TOKEN). */
.dot-chart-1 {
  background: rgb(var(--chart-1));
}

.dot-chart-2 {
  background: rgb(var(--chart-2));
}

.dot-chart-3 {
  background: rgb(var(--chart-3));
}

.dot-chart-4 {
  background: rgb(var(--chart-4));
}

/* ---------- features ---------- */

.bento {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

/* Three columns: pipeline (2) + record / chart + payers + revenue / on-call + messages (2). Two columns keep the
   wide cards wide and give on-call a full row, so no row is left with a hole. */
@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-wide,
  .feature-oncall {
    grid-column: span 2;
  }
}

@media (min-width: 1000px) {
  .bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 56px;
  }

  .feature-oncall {
    grid-column: auto;
  }
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius-card);
  background: rgb(var(--card));
}

@media (min-width: 960px) {
  .feature {
    padding: 28px;
  }
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature .icon-tile {
  margin-bottom: 8px;
}

.feature-body {
  max-width: 62ch;
  color: rgb(var(--muted-foreground));
  font-size: 15px;
  line-height: 23px;
  text-wrap: pretty;
}

.feature-visual {
  margin-top: auto;
  padding-top: 16px;
}

/* Text on the left (icon tile level with its neighbors'), the visual centered beside it. */
@media (min-width: 760px) {
  .feature-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    column-gap: 40px;
  }

  .feature-split .feature-visual {
    align-self: center;
    margin: 0;
    padding: 0;
  }
}

/* Pipeline stages: wrapped pills with chevrons on phones, a stepper (dots on one line) where they fit in a row. */
.stages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.stages .pill {
  position: relative;
}

.stages .pill:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -14px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-top: 1.5px solid rgb(var(--muted-foreground) / 0.7);
  border-right: 1.5px solid rgb(var(--muted-foreground) / 0.7);
  transform: rotate(45deg);
}

@media (min-width: 640px) {
  .stages {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
  }

  .stages .pill {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 12px;
    padding: 0 10px 0 0;
    background: none;
    white-space: normal;
  }

  .stages .dot {
    width: 10px;
    height: 10px;
  }

  .stages .pill:not(:last-child)::after {
    top: 4.5px;
    right: 8px;
    left: 18px;
    width: auto;
    height: 1px;
    margin: 0;
    border: 0;
    background: rgb(var(--border));
    transform: none;
  }
}

.journey {
  position: relative;
  display: grid;
  gap: 12px;
}

.journey::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 3.5px;
  width: 1px;
  background: rgb(var(--border));
}

.journey li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.journey .dot {
  box-shadow: 0 0 0 4px rgb(var(--card));
}

.claim-flow,
.pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.claim-flow-arrow {
  width: 16px;
  height: 16px;
  color: rgb(var(--muted-foreground));
}

.mix {
  display: grid;
  gap: 10px;
}

/* This month's payer mix (39 / 28 / 22 / 11%) — the same split as the phone's September legend. */
.mix-bar {
  display: flex;
  gap: 3px;
  height: 12px;
}

.mix-bar span {
  border-radius: 4px;
}

.mix-1 {
  flex: 39.3;
  background: rgb(var(--chart-1));
}

.mix-2 {
  flex: 28.1;
  background: rgb(var(--chart-2));
}

.mix-3 {
  flex: 21.5;
  background: rgb(var(--chart-3));
}

.mix-4 {
  flex: 11.1;
  background: rgb(var(--chart-4));
}

.thread {
  display: grid;
  gap: 8px;
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 20px;
}

.bubble-family {
  justify-self: start;
  border-bottom-left-radius: 6px;
  background: rgb(var(--muted));
}

.bubble-draft {
  display: grid;
  justify-self: end;
  gap: 3px;
  border: 1px dashed rgb(var(--primary) / 0.5);
  border-bottom-right-radius: 6px;
  background: rgb(var(--primary-soft));
}

.draft-label {
  color: rgb(var(--primary));
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* On-call window: today's progress through it, and the due date. */
.oncall {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: rgb(var(--muted) / 0.7);
}

/* At 320px the two labels don't fit on one line: the due date drops below instead of both breaking mid-phrase. */
.oncall-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.oncall-track {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgb(var(--accent) / 0.18);
}

.oncall-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 24%;
  border-radius: inherit;
  background: rgb(var(--accent));
}

.oncall-due {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 67%;
  width: 2px;
  border-radius: 2px;
  background: rgb(var(--foreground));
}

.oncall-team {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.avatar-primary {
  background: rgb(var(--primary-soft));
  color: rgb(var(--primary));
}

.avatar-info {
  background: rgb(var(--info-soft));
  color: rgb(var(--info));
}

.person-text {
  display: grid;
  color: rgb(var(--muted-foreground));
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.person-text strong {
  color: rgb(var(--foreground));
  font-size: 14px;
  line-height: 18px;
}

/* ---------- who it's for ---------- */

.audience {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 760px) {
  .audience {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 56px;
  }
}

.audience-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius-card);
  background: rgb(var(--card));
}

@media (min-width: 960px) {
  .audience-card {
    padding: 36px;
  }
}

.audience-title {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 36px;
  font-weight: 400;
}

.audience-body {
  color: rgb(var(--muted-foreground));
  font-size: 16px;
  line-height: 25px;
  text-wrap: pretty;
}

.checks {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgb(var(--border));
}

.audience-body + .checks {
  margin-top: 12px;
}

.checks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
}

.checks .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  stroke-width: 2.4;
  color: rgb(var(--primary));
}

/* ---------- early access ---------- */

.signup {
  display: grid;
  gap: 28px;
  padding: 36px 20px 20px;
  border-radius: var(--radius-panel);
  background: rgb(var(--primary-soft));
}

@media (max-width: 599px) {
  .signup {
    margin-inline: calc(10px - var(--gutter));
    border-radius: 28px;
    padding-inline: 14px;
  }

  .signup-intro {
    padding-inline: 8px;
  }
}

@media (min-width: 600px) {
  .signup {
    padding: 48px;
  }
}

@media (min-width: 960px) {
  .signup {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    align-items: center;
    gap: 64px;
    padding: 72px;
  }
}

.signup-card {
  padding: 24px 20px;
  border-radius: var(--radius-card);
  background: rgb(var(--elevated));
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.05),
    0 24px 48px -28px rgb(0 0 0 / 0.3);
}

@media (min-width: 600px) {
  .signup-card {
    padding: 32px;
  }
}

.signup-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}

/*
 * The outline needs 3:1 against the card (WCAG 1.4.11), which the softer `input` token doesn't reach.
 * 17px text keeps iOS Safari from zooming into the field on focus.
 */
.field input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid rgb(var(--muted-foreground) / 0.72);
  border-radius: 14px;
  background: rgb(var(--elevated));
  color: rgb(var(--foreground));
  font-size: 17px;
  line-height: 24px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s;
}

.field input:hover {
  border-color: rgb(var(--muted-foreground));
}

.field input:focus-visible {
  border-color: rgb(var(--primary));
  outline: 2px solid rgb(var(--primary));
  outline-offset: 2px;
}

.field input[aria-invalid="true"] {
  border-color: rgb(var(--destructive));
}

.field input[aria-invalid="true"]:focus-visible {
  outline-color: rgb(var(--destructive));
}

.field input:-webkit-autofill {
  -webkit-text-fill-color: rgb(var(--foreground));
  box-shadow: inset 0 0 0 100px rgb(var(--elevated));
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: rgb(var(--destructive));
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.field-error .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  stroke-width: 2;
}

/* The honeypot: off-screen for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Without JavaScript the form can't send (each request carries a hash of its body), so show only the <noscript> note. */
@media (scripting: none) {
  .signup-form > :not(noscript) {
    display: none;
  }
}

.signup-submit {
  width: 100%;
  margin-top: 6px;
}

.form-note {
  color: rgb(var(--muted-foreground));
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  text-align: center;
  text-wrap: balance;
}

.form-status {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-align: center;
}

.form-status:not(:empty) {
  margin-top: 16px;
}

.form-status[data-tone="error"] {
  color: rgb(var(--destructive));
}

.signup-success {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 20px 4px;
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgb(var(--success-soft));
  color: rgb(var(--success));
}

.success-mark .icon {
  width: 26px;
  height: 26px;
  stroke-width: 2.4;
}

.success-title {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 40px;
  font-weight: 400;
}

/* Focus lands here so screen readers announce the result; it isn't a control, so no ring. */
.success-title:focus {
  outline: none;
}

.success-body {
  max-width: 34ch;
  color: rgb(var(--muted-foreground));
  font-size: 16px;
  line-height: 24px;
  text-wrap: balance;
}

.success-body strong {
  color: rgb(var(--foreground));
  overflow-wrap: anywhere;
}

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

.site-footer {
  margin-top: 96px;
  padding: 44px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid rgb(var(--border));
}

@media (min-width: 960px) {
  .site-footer {
    margin-top: 136px;
    padding-top: 56px;
  }
}

.footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 860px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    column-gap: 64px;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

.footer-brand {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.footer-brand .mark {
  width: 26px;
  height: 26px;
}

.footer-brand .wordmark {
  font-size: 26px;
}

.footer-privacy {
  display: grid;
  gap: 8px;
}

.footer-legal {
  padding-top: 24px;
  border-top: 1px solid rgb(var(--border));
}

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

.not-found {
  padding-top: 4px;
}

.not-found-card {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: 56px 24px;
}

@media (max-width: 599px) {
  .not-found-card {
    margin-inline: calc(10px - var(--gutter));
    border-radius: 28px;
  }
}

@media (min-width: 960px) {
  .not-found-card {
    align-content: center;
    min-height: 480px;
    padding: 88px 72px;
  }
}

.not-found-code {
  color: rgb(var(--hero-accent));
}

.not-found-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 3.6vw + 26px, 72px);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.not-found-body {
  max-width: 40ch;
  color: rgb(var(--hero-foreground) / 0.75);
  font-size: 18px;
  line-height: 1.5;
}

.not-found-card .button {
  margin-top: 12px;
}

/* ---------- motion: subtle, and only for people who haven't asked for less ---------- */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pen-down {
  from {
    opacity: 0;
  }
}

@keyframes pop {
  from {
    transform: scale(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .button:active {
    transform: scale(0.97);
  }

  .button:hover .icon {
    transform: translateX(2px);
  }

  /* The hero settles in after the mark starts drawing, like the app's welcome. */
  .enter {
    animation: fade-up 0.9s var(--ease-out) both;
  }

  .enter-1 {
    animation-delay: 0.15s;
  }

  .enter-2 {
    animation-delay: 0.25s;
  }

  .enter-3 {
    animation-delay: 0.4s;
  }

  .enter-4 {
    animation-delay: 0.5s;
  }

  .enter-5 {
    animation-delay: 0.6s;
    animation-duration: 1.1s;
  }

  .float-toast {
    animation: toast-in 0.6s var(--ease-out) 1.6s both;
  }

  /*
   * The mark draws on as in the app's TokosMark: the bar, then the stem, then the cradle in one sweep, and the gold
   * dot lands last. Dash lengths are each stroke's arc length plus a little slack; pen-down hides the round cap
   * until its stroke starts.
   */
  .mark-draw path {
    animation:
      draw var(--draw-for) cubic-bezier(0.65, 0, 0.35, 1) var(--draw-at) both,
      pen-down 1ms linear var(--draw-at) backwards;
  }

  .mark-draw path:nth-of-type(1) {
    --draw-at: 0.2s;
    --draw-for: 0.48s;
    stroke-dasharray: 24.5;
    stroke-dashoffset: 24.5;
  }

  .mark-draw path:nth-of-type(2) {
    --draw-at: 0.46s;
    --draw-for: 0.46s;
    stroke-dasharray: 22.5;
    stroke-dashoffset: 22.5;
  }

  .mark-draw path:nth-of-type(3) {
    --draw-at: 0.68s;
    --draw-for: 0.72s;
    stroke-dasharray: 38.6;
    stroke-dashoffset: 38.6;
  }

  .mark-draw .mark-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: pop 0.5s var(--spring) 1.34s both;
  }

  .signup-success {
    animation: fade-up 0.6s var(--ease-out) both;
  }

  .success-mark {
    animation: pop 0.5s var(--spring) 0.1s both;
  }
}

/*
 * Scroll reveal, on screens only: printing or saving a PDF lays the page out again without scrolling, so blocks still
 * waiting for .is-revealed would come out blank. main.js adds .reveal-ready (only when IntersectionObserver exists and
 * motion is welcome), then .is-revealed as each block scrolls in.
 */
@media screen and (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    transition:
      opacity 0.8s var(--ease-out),
      transform 0.8s var(--ease-out);
  }

  .reveal-ready [data-reveal]:not(.is-revealed) {
    opacity: 0;
    transform: translateY(18px);
  }

  .bento > [data-reveal]:nth-child(3n + 2),
  .audience > [data-reveal]:nth-child(2),
  .signup > [data-reveal]:nth-child(2) {
    transition-delay: 0.08s;
  }

  .bento > [data-reveal]:nth-child(3n) {
    transition-delay: 0.16s;
  }
}
