/* Tokens from the app's design v1 (docs/design/v1/README.md in the mobile repository). Light only.
   The accent is a fill, never text; accent-text is the accent as text. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --band: #fff7ed;
  --band-line: #fed7aa;
  --surface: #f3f4f6;
  --dock: #f9fafb;
  --dock-line: #d1d5db;
  --line: #e5e7eb;
  --text: #111827;
  --text-muted: #4b5563;
  --accent: #c2410c;
  --accent-text: #9a3412;
  --accent-tint: #ffedd5;
  --on-accent: #ffffff;
  --ok: #047857;
  --ok-tint: #d1fae5;
  --ok-text: #065f46;
  --warn: #a16207;
  --warn-tint: #fef9c3;
  --warn-text: #713f12;
  --bad: #b91c1c;
  --bad-tint: #fee2e2;
  --bad-text: #991b1b;
  --radius-card: 12px;
  --radius-badge: 6px;
  --radius-chip: 999px;
  --container: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: -apple-system, system-ui, Roboto, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-text);
}

a:hover,
a:focus-visible {
  color: #7c2d12;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

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

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

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

/* Zone 1: the band. Header and hero sit on it, closed by the band line. */
.band {
  background: var(--band);
  border-bottom: 1px solid var(--band-line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--text);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-card);
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--band-line);
  border-radius: var(--radius-chip);
  background: var(--bg);
}

.lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-chip);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.lang-switcher a:hover,
.lang-switcher a:focus-visible {
  color: var(--accent-text);
}

.lang-switcher a[aria-current="page"] {
  background: var(--accent-tint);
  color: var(--accent-text);
}

.hero {
  padding: 40px 0 44px;
}

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-description {
  max-width: 34rem;
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px 8px 12px;
  border-radius: var(--radius-card);
  text-decoration: none;
  border: 1px solid var(--dock-line);
  background: var(--bg);
  color: var(--text);
}

.store-button:hover,
.store-button:focus-visible {
  color: var(--text);
  background: var(--surface);
}

.store-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.store-button.primary:hover,
.store-button.primary:focus-visible {
  color: var(--on-accent);
  background: var(--accent);
}

.store-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-badge);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface);
  color: var(--text-muted);
}

.store-button.primary .store-icon {
  background: rgba(255, 255, 255, 0.18);
  color: var(--on-accent);
}

.store-label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.store-label span {
  font-size: 11px;
  opacity: 0.85;
}

.store-label strong {
  font-size: 15px;
}

/* The phone: the Today tab drawn from the design canvas, not a screenshot. */
.phone {
  width: min(100%, 340px);
  margin: 0 auto;
  border: 1px solid var(--dock-line);
  border-radius: 28px;
  background: var(--bg);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
}

.phone-band {
  padding: 22px 16px 14px;
  background: var(--band);
  border-bottom: 1px solid var(--band-line);
}

.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.phone-title {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.phone-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--band-line);
  background: var(--bg);
}

.phone-bell::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  width: 12px;
  height: 14px;
  border: 2px solid var(--text-muted);
  border-bottom-width: 3px;
  border-radius: 7px 7px 2px 2px;
}

.phone-bell::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  border: 2px solid var(--bg);
}

.phone-card {
  background: var(--bg);
  border: 1px solid var(--band-line);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}

.phone-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 14px;
}

.phone-counts strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.phone-counts strong.bad {
  color: var(--bad-text);
}

.phone-counts span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-protection {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.ok {
  background: var(--ok);
}

.dot.warn {
  background: var(--warn);
}

.dot.bad {
  background: var(--bad);
}

.phone-protection b {
  color: var(--warn-text);
}

.phone-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 16px;
  padding: 14px 0 6px;
  border-bottom: 2px solid var(--text);
}

.phone-section strong {
  font-size: 15px;
}

.phone-section span {
  font-size: 12px;
  color: var(--text-muted);
}

.phone-rows {
  margin: 0 16px;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  border-bottom: 1px solid var(--line);
}

.phone-row time {
  width: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.phone-row .what {
  flex-grow: 1;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-row .what span {
  color: var(--text-muted);
}

.phone-row .who {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.badge.ok {
  background: var(--ok-tint);
  color: var(--ok-text);
}

.badge.warn {
  background: var(--warn-tint);
  color: var(--warn-text);
}

.badge.bad {
  background: var(--bad-tint);
  color: var(--bad-text);
}

.badge.accent {
  background: var(--accent-tint);
  color: var(--accent-text);
}

.badge.muted {
  background: var(--surface);
  color: var(--text-muted);
}

.phone-dock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--dock);
  border-top: 1px solid var(--dock-line);
  box-shadow: 0 -4px 8px rgba(17, 24, 39, 0.06);
}

.phone-dock span {
  display: grid;
  place-items: center;
  height: 52px;
  border-radius: var(--radius-card);
  border: 1px solid var(--dock-line);
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
}

.phone-dock span.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.phone-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px 12px 12px;
  border-top: 1px solid var(--line);
}

.phone-tabs span {
  justify-self: center;
  padding: 5px 16px;
  border-radius: var(--radius-chip);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.phone-tabs span.active {
  background: var(--accent-tint);
  color: var(--accent-text);
}

/* Zone 2: content. A section title with a 2 px rule, then rows or cards. */
.section {
  padding: 40px 0 8px;
}

.section-heading {
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--text);
}

.section-heading h2 {
  font-size: clamp(1.5rem, 3.4vw, 1.9rem);
  line-height: 1.2;
}

.section-heading p {
  max-width: 44rem;
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-muted);
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
}

.card h3 {
  font-size: 17px;
}

.card h3 .badge {
  vertical-align: 2px;
  margin-left: 6px;
}

.card p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rows > div {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rows > div:last-child {
  border-bottom: 0;
}

.rows dt {
  font-weight: 600;
}

.rows dd {
  margin: 0;
  color: var(--text-muted);
}

.rows .badge {
  margin-left: 6px;
  vertical-align: 1px;
}

.two-columns {
  display: grid;
  gap: 24px;
  align-items: start;
}

.two-columns > div > p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

.two-columns > div > p + p {
  margin-top: 10px;
}

.counts-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.counts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.counts-head .chips {
  display: flex;
  gap: 4px;
}

.chip {
  padding: 3px 10px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.counts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
  padding: 12px 14px;
}

.counts-grid strong {
  display: block;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.counts-grid strong.bad {
  color: var(--bad-text);
}

.counts-grid span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.counts-share {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre-wrap;
}

.download {
  padding: 40px 0 48px;
}

.download-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--band-line);
  border-radius: var(--radius-card);
  background: var(--band);
}

.download-panel h2 {
  font-size: 20px;
}

.download-panel p {
  margin-top: 6px;
  color: var(--text-muted);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
}

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

.footer-copy p {
  margin-top: 10px;
  max-width: 40rem;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* The invite and confirmation pages share the band and the card. */
.invite-page {
  min-height: 100vh;
}

.invite-main {
  display: grid;
  place-items: center;
  padding: 40px 0 56px;
}

.invite-shell {
  width: min(calc(100% - 32px), 640px);
  margin: 0 auto;
}

.invite-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
}

.invite-content {
  text-align: center;
}

.invite-title {
  margin-top: 8px;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  line-height: 1.15;
}

.invite-description {
  max-width: 32rem;
  margin: 14px auto 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
}

.invite-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.invite-button {
  min-width: 220px;
  justify-content: center;
}

.invite-button[hidden],
.invite-fallback[hidden] {
  display: none;
}

.invite-fallback {
  max-width: 30rem;
  margin: 16px auto 0;
  font-size: 14px;
  color: var(--text-muted);
}

.invite-note {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.invite-error .eyebrow {
  color: var(--bad-text);
}

@media (min-width: 720px) {
  .hero {
    padding: 56px 0 60px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-columns {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 32px;
  }

  .download-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .footer-meta {
    align-items: flex-end;
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
  }

  .cards.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .brand-tagline {
    display: none;
  }

  .rows > div {
    grid-template-columns: 1fr;
  }

  .invite-button {
    width: 100%;
  }
}

/* The privacy page: one column of text under the band. */
.legal-page {
  min-height: 100vh;
}

.legal-main {
  padding: 32px 0 56px;
}

.legal-shell {
  width: min(calc(100% - 32px), 720px);
  margin: 0 auto;
}

.legal h1 {
  font-size: clamp(1.7rem, 4.6vw, 2.4rem);
  line-height: 1.15;
}

.legal-updated {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.legal h2 {
  margin: 28px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem;
  line-height: 1.3;
}

.legal p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
}

.legal ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.legal li {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.footer-link {
  font-size: 13px;
}
