/* TipSense site. Tokens match the app (lib/theme/tipsense_colors.dart).
   Signature: the tablet tip screen in the hero, answered by a TipSense slip. */
:root {
  --mint: #edf5f1;
  --paper: #ffffff;
  --ink: #123b32;
  --faded: #4e6a61;
  --rule: #c2d6cc;
  --mint-shade: #dcebe4;
  --coin: #f2b33d;
  --coral: #ff6b4a;
  --coral-text: #c43e24;
  --on-ink: #b6cec3;
  --on-ink-line: #2c5449;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --gutter: 32px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* Short pages keep the ink footer at the bottom of the window. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--mint);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--coin); outline-offset: 3px; border-radius: 6px; }

.shell { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
main { flex: 1 0 auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.3px;
  text-decoration: none;
}
.site-nav { display: flex; gap: 28px; font-weight: 500; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding-top: 20px; padding-bottom: 16px; }
.hero h1 {
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -1px;
  max-width: 14em;
}
.hero .lede {
  font-size: 18px;
  color: var(--faded);
  max-width: 34em;
  margin: 16px 0 0;
}

.demo {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
  margin-top: 36px;
}

/* The tablet tip screen */
.tablet {
  background: var(--ink);
  color: var(--paper);
  border-radius: 28px;
  padding: 26px 30px 22px;
  box-shadow: 0 0 0 10px #0d2b25, 0 24px 60px rgba(18, 59, 50, 0.28);
  margin: 10px;
}
.tablet-top {
  display: flex;
  justify-content: space-between;
  color: var(--on-ink);
  font-size: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--on-ink-line);
}
.tablet-q { font-size: 26px; margin: 18px 0 14px; }
.tip-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tip-options button {
  font: inherit;
  color: var(--paper);
  background: transparent;
  border: 1.5px solid var(--on-ink-line);
  border-radius: 16px;
  padding: 14px 8px 12px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.tip-options button:hover { border-color: var(--on-ink); }
.tip-options .pct {
  display: block;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.8px;
}
.tip-options .amt { display: block; margin-top: 6px; font-size: 14px; color: var(--on-ink); }
.tip-options button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--coin);
  box-shadow: 0 0 0 2px var(--coin);
}
.tip-options button[aria-pressed="true"] .amt { color: var(--faded); }
.tablet-row { display: flex; gap: 24px; margin-top: 12px; }
.tablet-link {
  font: inherit;
  font-weight: 500;
  color: var(--on-ink);
  background: none;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--on-ink-line);
  text-underline-offset: 4px;
}
.tablet-link[aria-pressed="true"] { color: var(--paper); text-decoration-color: var(--coin); }
.custom { margin-top: 14px; color: var(--on-ink); font-size: 15px; }
.custom input {
  font: inherit;
  font-size: 17px;
  width: 6em;
  margin-left: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--on-ink-line);
  background: #0d2b25;
  color: var(--paper);
}

/* TipSense's answer: a paper slip overlapping the tablet */
.answer {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border-radius: 4px;
  padding: 22px 24px 20px;
  margin: 170px 0 0 -40px;
  box-shadow: 0 10px 34px rgba(18, 59, 50, 0.16);
}
.answer .from { font-size: 13px; color: var(--faded); margin: 0 0 8px; }
.answer .verdict {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.4px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.answer .verdict::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--zone-color, var(--ink));
}
.answer .figures { margin: 10px 0 0; color: var(--faded); font-size: 15px; }
.answer .figures strong { color: var(--ink); font-weight: 600; }
.answer .usual {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 2px dotted var(--rule);
  font-size: 14px;
  color: var(--faded);
}
.answer[data-zone="light"] { --zone-color: var(--faded); }
.answer[data-zone="standard"] { --zone-color: var(--ink); }
.answer[data-zone="generous"] { --zone-color: var(--coin); }
.answer[data-zone="over"] { --zone-color: var(--coral); }
.answer[data-zone="over"] .verdict { color: var(--coral-text); }

.meter { position: relative; height: 36px; margin-top: 12px; }
.meter .track { position: absolute; left: 0; right: 0; top: 9px; height: 1.5px; background: var(--rule); }
.meter .band { position: absolute; top: 8px; height: 3.5px; background: var(--mint-shade); left: 42.857%; width: 14.286%; }
.meter .tick { position: absolute; top: 5px; width: 1.5px; height: 10px; background: var(--faded); }
.meter .tick span { position: absolute; top: 14px; left: -15px; width: 32px; text-align: center; font-size: 12px; color: var(--faded); }
.meter .marker {
  position: absolute;
  top: 3px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--zone-color, var(--ink));
  border: 2.5px solid var(--paper);
  box-shadow: 0 0 3px rgba(18, 59, 50, 0.3);
  transition: left 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 24px;
  color: var(--faded);
  font-size: 14px;
}
.hero-foot strong { color: var(--ink); font-weight: 600; }

/* ---------- How it works ---------- */
.how { padding-top: 88px; }
.section-title { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.1; letter-spacing: -0.5px; max-width: 18em; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; }
.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid var(--rule);
}
.step:nth-child(even) .step-text { order: 2; }
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--faded);
  margin-bottom: 8px;
}
.step h3 { font-size: clamp(24px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -0.3px; }
.step p { color: var(--faded); margin: 12px 0 0; max-width: 30em; }
.step-media { display: flex; justify-content: center; }
.phone {
  width: min(240px, 100%);
  border-radius: 28px;
  box-shadow: 0 0 0 8px var(--ink), 0 22px 50px rgba(18, 59, 50, 0.22);
}
.sheet {
  width: min(340px, 100%);
  border-radius: 20px 20px 4px 4px;
  box-shadow: 0 18px 44px rgba(18, 59, 50, 0.16);
}
.card {
  width: min(380px, 100%);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(18, 59, 50, 0.14);
}
.verdict-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.verdict-list li { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.verdict-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.verdict-list b { font-weight: 600; }
.verdict-list span { color: var(--faded); }

/* ---------- Community ---------- */
.community { padding-top: 72px; }
.community-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.community blockquote {
  margin: 22px 0 0;
  padding-left: 18px;
  border-left: 2px solid var(--coin);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.35;
}
.community .caption { color: var(--faded); font-size: 15px; margin: 12px 0 0 24px; }
.community p.body { color: var(--faded); margin: 14px 0 0; max-width: 30em; }

/* ---------- Privacy band and footer ---------- */
.ink-band { background: var(--ink); color: var(--paper); margin-top: 88px; }
.privacy-band { padding-top: 64px; padding-bottom: 56px; }
.privacy-band .section-title { color: var(--paper); }
.promises {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.promises li { border-top: 1px solid var(--on-ink-line); padding-top: 22px; }
.promises h3 { font-size: 19px; line-height: 1.25; }
.promises p { color: var(--on-ink); margin: 10px 0 0; }
.privacy-band .more { margin: 32px 0 0; color: var(--on-ink); }
.privacy-band .more a { color: var(--paper); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 40px;
  color: var(--on-ink);
  font-size: 15px;
  border-top: 1px solid var(--on-ink-line);
}
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--on-ink); }

/* Footer on support and privacy pages (no privacy band above it) */
.ink-band.plain { margin-top: 80px; }
.ink-band.plain .site-footer { border-top: 0; }

/* ---------- Support and privacy pages ---------- */
.doc-head { padding-top: 16px; padding-bottom: 4px; }
.doc-head h1 { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.8px; }
.doc-head .lede { font-size: 17px; color: var(--faded); max-width: 36em; margin: 14px 0 0; }
.doc-head .updated { color: var(--faded); font-size: 14px; margin: 10px 0 0; }

.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  margin-top: 36px;
}
.toc { position: sticky; top: 32px; align-self: start; font-size: 15px; }
.toc p { margin: 0 0 10px; color: var(--faded); }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 5px 0 5px 14px; text-decoration: none; color: var(--faded); }
.toc a:hover { color: var(--ink); }

.prose { max-width: 720px; }
.prose h2 { font-size: 24px; line-height: 1.2; margin: 44px 0 10px; scroll-margin-top: 24px; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; margin: 20px 0 4px; }
.prose p, .prose li { color: #2d4c43; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose .summary {
  background: var(--paper);
  border-radius: 4px;
  padding: 20px 22px;
  margin: 0 0 8px;
  font-size: 16px;
}
.prose .summary p { margin: 0; color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 18px 0; border-radius: 4px; }
.prose table { border-collapse: collapse; width: 100%; background: var(--paper); font-size: 14.5px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; color: var(--ink); }
.prose td { color: #2d4c43; }

/* Support contact cards */
.contacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 32px; }
.contact {
  display: block;
  background: var(--paper);
  border-radius: 4px;
  padding: 20px 22px 18px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: border-color 0.15s;
}
.contact:hover { border-color: var(--rule); }
.contact h2 { font-size: 21px; line-height: 1.2; }
.contact p { color: var(--faded); margin: 6px 0 12px; font-size: 15px; }
.contact .go { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

.faq { max-width: 760px; margin-top: 64px; }
.faq > h2 { font-size: clamp(26px, 2.8vw, 32px); margin-bottom: 14px; }
.faq details { border-top: 1px solid var(--rule); padding: 14px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--faded); }
.faq details[open] summary::after { content: "–"; }
.faq details p, .faq details ol { color: #2d4c43; margin: 12px 0 0; max-width: 40em; }

/* ---------- Small screens ---------- */
/* ---------- Breakpoints ----------
   Desktop styles above. Standard widths: 1440+ large desktop, <1200 small
   laptop / tablet landscape, <1024 tablet portrait, <768 phone, <480 small
   phone. */

@media (min-width: 1440px) {
  :root { --max: 1200px; }
}

/* Small laptops and tablets in landscape */
@media (max-width: 1199px) {
  :root { --gutter: 28px; }
  .demo { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  .answer { margin: 160px 0 0 -48px; }
  .step, .community-inner { gap: 40px; }
  .doc { grid-template-columns: 190px minmax(0, 1fr); gap: 40px; }
}

/* Tablets in portrait */
@media (max-width: 1023px) {
  :root { --gutter: 24px; }
  .demo {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin-top: 32px;
  }
  /* The slip tucks under the tablet like a receipt printing from it. */
  .answer { margin: -28px 28px 0 auto; max-width: 440px; }
  .hero-foot { max-width: 640px; }
  .how { padding-top: 72px; }
  .promises { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
  .doc { grid-template-columns: 1fr; gap: 0; margin-top: 28px; }
  .toc { display: none; }
}

/* Phones */
@media (max-width: 767px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .site-header { padding-top: 18px; padding-bottom: 18px; }
  .hero .lede { font-size: 17px; }
  .tablet { padding: 22px 20px 18px; border-radius: 24px; margin: 8px; }
  .tablet-q { font-size: 24px; }
  .tip-options { gap: 10px; }
  .tip-options button { padding: 14px 4px 12px; border-radius: 14px; }
  .answer { margin: -24px 16px 0; max-width: none; padding: 20px 20px 18px; }
  .answer .verdict { font-size: 28px; }
  .hero-foot { flex-direction: column; gap: 4px; }
  .step { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .step:nth-child(even) .step-text { order: 0; }
  .community { padding-top: 56px; }
  .community-inner { grid-template-columns: 1fr; gap: 36px; }
  .ink-band { margin-top: 72px; }
  .privacy-band { padding-top: 52px; padding-bottom: 44px; }
  .promises { grid-template-columns: 1fr; gap: 24px; }
  .contacts { grid-template-columns: 1fr; }
  .faq { margin-top: 48px; }
  .prose h2 { margin-top: 36px; }
}

/* Small phones */
@media (max-width: 479px) {
  :root { --gutter: 16px; }
  .wordmark { font-size: 22px; }
  .site-nav { gap: 16px; font-size: 15px; }
  .tablet { padding: 18px 16px 16px; border-radius: 22px; box-shadow: 0 0 0 7px #0d2b25, 0 18px 40px rgba(18, 59, 50, 0.24); }
  .tablet-top { font-size: 13px; }
  .tablet-q { font-size: 22px; margin: 14px 0 12px; }
  .tip-options { gap: 8px; }
  .tip-options .pct { font-size: 26px; letter-spacing: -0.4px; }
  .tip-options .amt { font-size: 13px; }
  .tablet-row { gap: 18px; }
  .answer { margin: -20px 8px 0; padding: 18px 16px 16px; }
  .answer .verdict { font-size: 26px; }
  .verdict-list { grid-template-columns: 1fr; }
  .prose table { font-size: 13.5px; }
  .prose th, .prose td { padding: 9px 10px; }
  .site-footer { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
