/* Tend — "Morning paper". Tokens mirror the app (TendTokens). */
:root {
  --bg: #F4EFE6;
  --surface: #FFFFFF;
  --ink: #1F1B16;
  --muted: #675E54;
  --line: #E6DDCF;
  --accent: #B4532F;
  --accent-text: #9E4526;
  --on-accent: #FFFFFF;
  --sage: #34503E;
  --settle: #776C95;
  --accent-soft: #F6E1D6;
  --serif: "Newsreader", "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Instrument Sans", system-ui, sans-serif;
  --measure: 66ch;
  --gutter: clamp(16px, 5vw, 48px);
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E2B25;
    --surface: rgba(244, 239, 230, 0.06);
    --ink: #F4EFE6;
    --muted: #B9B2A6;
    --line: rgba(244, 239, 230, 0.18);
    --accent: #E0875F;
    --accent-text: #F0B79C;
    --on-accent: #1E2B25;
    --sage: #5E8C6E;
    --settle: #A99FC8;
    --accent-soft: #3A2A22;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }

.wrap { width: min(100% - 2 * var(--gutter), 1120px); margin-inline: auto; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 24px/1 var(--serif); }
.brand svg { width: 34px; height: 12px; }
.masthead nav { display: flex; gap: 4px; flex-wrap: wrap; }
.masthead nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px;
}
.masthead nav a:hover, .masthead nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }

/* The ribbon — the app's signature object */
.ribbon { display: flex; gap: 4px; height: 14px; }
.ribbon span { border-radius: 999px; }
.ribbon .r { background: var(--accent); flex: 5; }
.ribbon .b { background: var(--sage); flex: 3; }
.ribbon .s { background: var(--settle); flex: 2; }
@media (prefers-reduced-motion: no-preference) {
  .ribbon.grow span { animation: grow 1.2s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
  .ribbon.grow .b { animation-delay: .15s; }
  .ribbon.grow .s { animation-delay: .3s; }
  @keyframes grow { from { transform: scaleX(0.2); opacity: .3; } to { transform: none; opacity: 1; } }
}

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }

/* Landing */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); }
.hero .wrap { display: grid; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font: 400 clamp(2.4rem, 6vw, 4.4rem)/1.05 var(--serif); margin: 0 0 20px; letter-spacing: -0.01em; }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40ch; margin: 0 0 28px; }
.hero .ribbon { max-width: 420px; margin: 0 0 8px; }
.ribbon-labels { display: flex; max-width: 420px; font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.ribbon-labels span:nth-child(1) { flex: 5; } .ribbon-labels span:nth-child(2) { flex: 3; } .ribbon-labels span:nth-child(3) { flex: 2; }

.cta { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; font-size: 17px; }
.cta:hover { color: var(--on-accent); filter: brightness(1.05); }
.cta-note { font-size: 14px; color: var(--muted); margin-top: 12px; }

.phone { width: min(300px, 78vw); margin-inline: auto; border-radius: 44px; padding: 9px; background: #15120F;
  box-shadow: 0 30px 60px -24px rgba(31,27,22,.45); }
.phone img { border-radius: 36px; width: 100%; height: auto; }
.phones { display: flex; gap: 20px; justify-content: center; align-items: flex-end; }
.phones .phone:nth-child(2) { width: min(240px, 50vw); transform: translateY(-24px); }
@media (max-width: 560px) { .phones .phone:nth-child(2) { display: none; } }

.notes { border-top: 1px solid var(--line); padding: clamp(40px, 7vw, 80px) 0; }
.notes .wrap { display: grid; gap: 40px; }
@media (min-width: 800px) { .notes .wrap { grid-template-columns: 220px 1fr; } }
.notes h2 { font: 400 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--serif); margin: 0; }
.note { display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.note:first-child { padding-top: 0; }
.note .arrow { color: var(--accent-text); font-weight: 600; }
.note h3 { margin: 0; font-size: 17px; }
.note p { grid-column: 2; margin: 0; color: var(--muted); }

.pricing { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: var(--measure); }
.pricing table { width: 100%; border-collapse: collapse; }
.pricing td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.pricing td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 16px; }
.pricing tr:last-child td { border-bottom: 0; }
.pricing .fine { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

/* Documents (privacy, terms, support) */
.doc { padding: clamp(32px, 6vw, 72px) 0 80px; }
.doc .wrap { max-width: var(--measure); }
.doc h1 { font: 400 clamp(2.1rem, 5vw, 3.2rem)/1.1 var(--serif); margin: 0 0 12px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 32px; }
.doc h2 { font: 400 clamp(1.4rem, 2.4vw, 1.75rem)/1.25 var(--serif); margin: 48px 0 12px; padding-top: 8px; }
.doc h3 { font-size: 17px; margin: 28px 0 8px; }
.doc p, .doc li { max-width: var(--measure); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.summary { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 32px; }
.summary p { margin: 0 0 8px; } .summary p:last-child { margin: 0; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 24px; margin: 0 0 16px; }
.toc summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.toc ol { margin: 8px 0 8px; padding-left: 1.3em; }
.toc a { display: inline-block; padding: 4px 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
table.data th, table.data td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
table.data th { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
code { font-size: .92em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; min-height: 44px; list-style-position: outside; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.contact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 24px 0 8px; }
.contact p { margin: 0 0 8px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
footer a { color: var(--muted); display: inline-flex; min-height: 44px; align-items: center; }
