/* arpdaily — design system v0 (docs/design_system.md). Paper ground, one ink, blue up, orange down. */

/* Fonts, self-hosted (web/static/fonts/README.md): latin + latin-ext. */
@font-face {
  font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/instrument-serif-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/instrument-serif-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/geist-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/geist-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #F3F0EA;
  --field: #FBFAF7;
  --hairline: #DCD7CE;
  --ink: #171614;
  --ink2: #5C5953;
  --muted: #6B675F;
  --up: #2B6CB0;
  --down: #C2410C;
  --link: #1D5C57;
  --past: #9C978D;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Geist, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }
table { border-collapse: collapse; }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--muted); }
.ink2 { color: var(--ink2); }

/* Header */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--hairline);
}
.brand { font-family: var(--serif); font-size: 24px; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
.nav a {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px;
  color: var(--ink2); border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.nav .badge {
  margin-left: 6px; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); font-size: 12px; line-height: 1;
}
.context { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.account { position: relative; }
.account summary {
  list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink2);
}
.account summary::-webkit-details-marker { display: none; }
.account summary:hover, .account[open] summary { color: var(--ink); }
.account .menu {
  position: absolute; right: 0; top: 100%; z-index: 10; min-width: 200px; padding: 6px 0;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 4px;
}
.account .menu a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: 14px; color: var(--ink); }
.account .menu a:hover { background: var(--field); text-decoration: none; }
.account .menu a.active { font-weight: 500; }
.account .menu-heading { padding: 8px 16px; font-size: 12px; color: var(--muted); }
.account .menu form { margin: 0; }
.account .menu button {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 16px;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  font: inherit; font-size: 14px; color: var(--ink);
}
.account .menu button:hover { background: var(--field); }

/* Public pages (sign in, set password): brand, three links, one card */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px;
  padding: 22px 40px; border-bottom: 1px solid var(--hairline);
}
.auth-top .brand { font-size: 26px; }
.auth-main {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 72px 40px 64px;
}
.auth-card {
  width: 420px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; margin: 0;
  padding: 32px; background: var(--field); border: 1px solid var(--hairline); border-radius: 6px;
}
.auth-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; letter-spacing: -0.01em; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-field label { font-size: 13px; color: var(--ink2); }
.auth-field input {
  min-height: 48px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 4px;
  background: #FFFFFF; font: inherit; font-size: 14px; color: var(--ink);
}
.auth-field input.invalid { border-color: var(--down); }
.auth-error { font-size: 13px; color: var(--down); }
.auth-caption { font-size: 13px; color: var(--muted); }
.auth-submit {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 4px;
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.auth-line { margin: 0; }
.auth-links { width: 420px; max-width: 100%; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.auth-links { margin: 0; align-items: flex-start; }
.auth-link { padding: 0; min-height: 0; background: transparent; border: 0; font: inherit; color: var(--link); cursor: pointer; }
.auth-link:hover { color: var(--ink); text-decoration: underline; }
.auth-foot {
  display: flex; flex-wrap: wrap; gap: 24px; padding: 20px 40px;
  border-top: 1px solid var(--hairline); font-size: 13px; color: var(--muted);
}
@media (max-width: 720px) {
  .auth-top, .auth-main, .auth-foot { padding-left: 16px; padding-right: 16px; }
  .auth-main { padding-top: 40px; }
  .auth-card { padding: 24px; }
}

/* Page */
.page {
  width: 100%; max-width: 1280px; margin: 0 auto;
  padding: 48px 40px 64px;
  display: flex; flex-direction: column; gap: 40px;
}
.sentence { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.1; letter-spacing: -0.015em; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hero-main { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; color: var(--muted); }
.hero-number { font-family: var(--serif); font-size: 64px; line-height: 1; letter-spacing: -0.02em; }
.kpis { display: flex; flex-wrap: wrap; gap: 40px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi-value { font-size: 22px; }

/* Table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 900px; }
.table th {
  font-size: 12px; color: var(--muted); font-weight: 500; text-align: left;
  padding: 0 16px 10px; border-bottom: 1px solid var(--hairline);
}
.table th:first-child { padding-left: 0; }
.table th:last-child { padding-right: 0; }
.table th.r, .table td.r { text-align: right; }
.table td { padding: 18px 16px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.table td:first-child { padding-left: 0; }
.table td:last-child { padding-right: 0; }
.table td.spark { padding-top: 14px; padding-bottom: 14px; }
.table td.figure { font-size: 17px; }
.row-title { font-size: 17px; color: var(--ink); font-weight: 500; }
.row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.why { max-width: 360px; color: var(--ink); }
.why.quiet { color: var(--ink2); }

/* Actions */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; font-size: 14px; color: var(--ink);
}
.btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--hairline); }
.btn:hover { text-decoration: none; border-color: var(--ink); }
button.btn { background: none; font: inherit; font-size: 14px; cursor: pointer; }
.actions form { margin: 0; }
.btn-primary { min-height: 48px; padding: 0 20px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 500; }
.btn-primary:hover { color: var(--paper); text-decoration: none; }

/* Empty / placeholder page */
.empty { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }

@media (max-width: 720px) {
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .context { margin-left: 0; }
  .hero-number { font-size: 48px; }
  .sentence { font-size: 32px; }
}

/* Why */
.opening { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.opening-action { font-size: 15px; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.chart { margin: 0; flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.keys { flex: 0 1 300px; display: flex; flex-direction: column; padding-top: 30px; }
.key { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hairline); }
.key:last-child { border-bottom: 1px solid var(--hairline); }
.breakdown { display: flex; flex-direction: column; gap: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; color: var(--ink2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
/* Why: one tab row, the breakdown tabs on the left and the Stream select on the right */
.tab-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; border-bottom: 1px solid var(--hairline); }
.tab-row .tabs { border-bottom: 0; }
.tab-row form { margin: 0 0 0 auto; padding: 4px 0; }
.table td.r .share { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.share-bar { display: inline-block; height: 8px; border-radius: 2px; }
.up-bg { background: var(--up); }
.down-bg { background: var(--down); }

/* LTV */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0 0; font-size: 14px; }
.crumbs + .crumbs { padding-top: 6px; }
.crumbs .right { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.crumbs .sep { color: var(--muted); }
.crumbs span[aria-current] { color: var(--ink); font-weight: 500; }
.table .drill { font-size: 15px; font-weight: 500; color: inherit; }
.table th a { color: inherit; }
.table th a:hover { text-decoration: underline; }
.table th.sorted a { color: var(--ink); font-weight: 600; }
a.drill:hover { text-decoration: underline; }
.strip-row { display: flex; align-items: center; gap: 10px; padding: 2px 0; white-space: nowrap; }
.strip { display: inline-flex; gap: 2px; }
.strip i { display: inline-block; width: 8px; height: 12px; border-radius: 1px; border: 1px solid var(--hairline); background: var(--paper); }
.strip i.on { background: var(--ink); border-color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.legend-items { display: flex; gap: 16px; }
.legend-items > span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 2px; display: inline-block; }
.ink-bg { background: var(--ink); }
.past-bg { background: var(--past); }
.heat { width: 100%; border-collapse: separate; border-spacing: 2px; min-width: 760px; text-align: right; }
.heat th { font-size: 12px; color: var(--muted); font-weight: 500; padding: 0 12px 8px; }
.heat th.l, .heat td.l { text-align: left; padding-left: 0; }
.heat tbody th { font-size: 15px; color: var(--ink); font-weight: 400; padding: 12px 0; }
.heat td { padding: 12px; font-size: 15px; }
.heat td.past { color: var(--past); }

/* Home KPIs */
.kpis-wide { gap: 48px; }
.kpis-wide .kpi { gap: 6px; }
.small { font-size: 14px; }
.kpi svg { margin-top: 4px; }

/* Keep figures and their deltas on one line */
.table td.num, .table td.figure { white-space: nowrap; }
.kpis-wide { gap: 36px 40px; }
.kpi-rows { display: flex; flex-direction: column; gap: 36px; }

/* Locked state (design system: dashed hairline box, title Ink 2) */
.locked { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px dashed var(--hairline); border-radius: 6px; max-width: 720px; }
.locked-title { font-weight: 500; color: var(--ink2); }

/* Filter row under every page's sentence: app and platform on the left,
   the page's own controls on the right (design_system.md, Filters) */
.filter-row { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.filter-group form { margin: 0; padding: 4px 0; }
.filter-row .crumbs { padding: 4px 0; }
.filter-right { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.filter-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 12px; }
.filter-row label { display: inline-flex; align-items: center; }
/* One control pattern: label in Ink 2, value in Ink, chevron, inside one 40px
   hairline box. A select covers the whole box, invisible and on top, so a
   click anywhere opens it; the box underneath draws label, value and chevron. */
.control {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 32px 0 10px;
  border: 1px solid var(--hairline); border-radius: 4px; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23171614' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; font-size: 14px; cursor: pointer;
}
.control:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.control-label { color: var(--ink2); white-space: nowrap; pointer-events: none; }
.control-value { color: var(--ink); white-space: nowrap; pointer-events: none; }
.filter-row .control select, .tab-row .control select {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0;
  border: 0; opacity: 0; cursor: pointer; font: inherit; font-size: 14px;
}
.control.control-input { padding-right: 0; background-image: none; cursor: auto; }
.control-input input:focus { outline: none; }
.control input[type="number"] {
  min-height: 38px; width: 72px; padding: 0 10px 0 0; border: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 14px;
}
.filter-row select {
  min-height: 40px; padding: 0 32px 0 10px; border: 1px solid var(--hairline); border-radius: 4px;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23171614' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink); font: inherit; font-size: 14px; -webkit-appearance: none; appearance: none; cursor: pointer;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.activity-table { padding-top: 12px; }
.activity-table td { white-space: nowrap; }
.table th.metric { border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.table th.metric a { color: var(--ink); }
.table tfoot td { border-top: 2px solid var(--hairline); border-bottom: 0; font-weight: 500; color: var(--ink); white-space: nowrap; }
.caption { font-size: 13px; color: var(--ink2); }
/* Country picker: a closed summary; open, a small paper card with in / not in,
   a checkbox list and Apply. Checkbox lists appear only inside a picker. */
.picker { position: relative; padding: 4px 0; }
.picker summary {
  list-style: none; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 10px; white-space: nowrap; border: 1px solid var(--hairline); border-radius: 4px; background: var(--field);
  font-size: 14px; color: var(--ink);
}
.picker summary::-webkit-details-marker { display: none; }
.picker-panel {
  position: absolute; right: 0; top: 100%; z-index: 10; min-width: 200px; margin: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 4px;
}
.picker-panel .check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
.picker-panel .check input { margin: 0; accent-color: var(--ink); }
.picker-panel .btn { align-self: flex-start; min-height: 40px; }
.filter-line > form { margin: 0; padding: 4px 0; }
.tabs + .filter-row { margin-top: -24px; }
/* Period picker: presets as plain links, a hairline, a custom range. */
.presets { display: flex; flex-direction: column; align-items: flex-start; }
.preset { padding: 6px 0; border: 0; background: none; color: var(--link); font: inherit; font-size: 14px; text-align: left; cursor: pointer; white-space: nowrap; }
.preset:hover { text-decoration: underline; }
.preset[aria-current] { color: var(--ink); font-weight: 500; }
.picker-panel hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--hairline); }
.picker-panel .date { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.picker-panel input[type="date"] { min-height: 40px; padding: 0 10px; border: 1px solid var(--hairline); border-radius: 4px; background: var(--field); color: var(--ink); font: inherit; font-size: 14px; }
@media (max-width: 720px) {
  .filter-right { margin-left: 0; align-items: flex-start; }
  .filter-line { justify-content: flex-start; }
  .picker-panel { right: auto; left: 0; }
}

/* Home: cards and figures open Activity without looking like links */
a.kpi, a.cell-link { color: inherit; }
a.kpi:hover, a.cell-link:hover { color: inherit; text-decoration: none; }
a.kpi:hover .label, a.cell-link:hover { text-decoration: underline; }

/* Public site: landing, pricing, privacy, terms (design/mockups/Landing, Pricing, Privacy). */
.pub-body { min-height: 100vh; display: flex; flex-direction: column; }
.pub-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding: 22px 40px; border-bottom: 1px solid var(--hairline);
}
.pub-brand { font-family: var(--serif); font-size: 26px; color: var(--ink); letter-spacing: -0.01em; }
.pub-brand:hover { text-decoration: none; }
.pub-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; }
.pub-nav a {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px;
  color: var(--ink2); border-bottom: 2px solid transparent;
}
.pub-nav a:hover { color: var(--ink); text-decoration: none; }
.pub-nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.pub-nav a.pub-cta {
  padding: 0 16px; margin-left: 8px; background: var(--ink); color: var(--paper);
  border-bottom: 0; border-radius: 4px; font-weight: 500;
}
.pub-nav a.pub-cta:hover { color: var(--paper); }
.pub-main {
  flex: 1 1 auto; width: 100%; max-width: 1180px; margin: 0 auto; padding: 80px 40px;
  display: flex; flex-direction: column; gap: 56px;
}
.pub-foot {
  display: flex; flex-wrap: wrap; gap: 24px; padding: 20px 40px;
  border-top: 1px solid var(--hairline); font-size: 13px; color: var(--muted);
}
.pub-foot a { color: var(--muted); }
.pub-foot a:hover { color: var(--ink); }
.pub-foot-brand { margin-left: auto; }

.pub-h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1.05; letter-spacing: -0.02em; }
.pub-h1-page { font-size: 56px; max-width: 720px; }
.pub-button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  background: var(--ink); color: var(--paper); border-radius: 4px; font-size: 15px; font-weight: 500;
}
.pub-button:hover { color: var(--paper); text-decoration: none; }
.pub-soon { margin-left: 6px; font-size: 12px; color: var(--muted); }

/* Landing */
.pub-main-landing { padding-top: 96px; gap: 96px; }
.pub-hero { display: flex; flex-direction: column; gap: 28px; max-width: 820px; }
.pub-lede { margin: 0; font-size: 19px; color: var(--ink2); max-width: 640px; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pub-aside { font-size: 14px; color: var(--muted); }
.pub-features { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.pub-feature {
  display: flex; flex-wrap: wrap; gap: 24px 48px; padding: 32px 0;
  border-bottom: 1px solid var(--hairline); align-items: baseline;
}
.pub-feature-name { flex: 0 0 240px; font-family: var(--serif); font-size: 32px; letter-spacing: -0.01em; }
.pub-feature-body { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pub-example { font-size: 17px; }
.pub-sources { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.pub-source-group { flex: 1 1 360px; display: flex; flex-direction: column; gap: 14px; }
.pub-label { font-size: 13px; color: var(--muted); }
.pub-label-next { margin-top: 10px; }
.pub-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pub-chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--hairline); border-radius: 999px; font-size: 14px;
}
.pub-chip .pub-soon { margin-left: 0; }
.pub-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 4px; border: 1px solid var(--hairline); background: #FFFFFF; font-size: 10px; font-weight: 600;
}
.pub-closing {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 48px; border-top: 1px solid var(--hairline);
}
.pub-closing-line { font-family: var(--serif); font-size: 36px; letter-spacing: -0.015em; }

/* Pricing */
.pub-pricing-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.pub-billing { display: inline-flex; font-size: 14px; border: 1px solid var(--ink); border-radius: 999px; padding: 2px; }
.pub-billing a {
  min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px;
  color: var(--ink2); border-radius: 999px;
}
.pub-billing a:hover { color: var(--ink); text-decoration: none; }
.pub-billing a.active, .pub-billing a.active:hover { color: var(--paper); background: var(--ink); }
.pub-plans-scroll { overflow-x: auto; }
.pub-plans {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 960px;
  border-top: 1px solid var(--hairline);
}
.pub-plan {
  display: flex; flex-direction: column; gap: 20px; padding: 32px 28px;
  border-bottom: 1px solid var(--hairline); border-left: 1px solid var(--hairline);
}
.pub-plan:first-child { padding-left: 0; border-left: 0; }
.pub-plan:last-child { padding-right: 0; }
.pub-plan.featured { outline: 1px solid var(--ink); outline-offset: -1px; }
.pub-plan-talk { font-family: var(--serif); font-size: 40px; line-height: 56px; letter-spacing: -0.02em; }
.pub-plan-tag { display: inline-block; margin-left: 8px; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 500; letter-spacing: 0.02em; vertical-align: middle; }
.pub-plan-name { font-size: 14px; color: var(--ink2); }
.pub-plan-price { display: flex; align-items: baseline; gap: 8px; }
.pub-plan-price .num { font-family: var(--serif); font-size: 56px; line-height: 1; letter-spacing: -0.02em; }
.pub-plan-per, .pub-plan-note { font-size: 14px; color: var(--muted); }
.pub-plan-note { margin-top: -12px; }
.pub-plan-dau { font-size: 14px; }
.pub-plan-features {
  margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px;
  font-size: 14px; color: var(--ink2);
}
.pub-plan-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  margin-top: auto; border: 1px solid var(--ink); border-radius: 4px; color: var(--ink); font-size: 14px; font-weight: 500;
}
.pub-plan-button:hover { color: var(--ink); text-decoration: none; }
.pub-plan-button.primary, .pub-plan-button.primary:hover { background: var(--ink); color: var(--paper); }
.pub-terms { display: flex; flex-direction: column; max-width: 820px; border-bottom: 1px solid var(--hairline); }
.pub-term { display: flex; gap: 24px; padding: 16px 0; border-top: 1px solid var(--hairline); }
.pub-term-name { flex: 0 0 220px; color: var(--ink2); }

/* Privacy, Terms */
.pub-main-legal { gap: 32px; }
.pub-legal { max-width: 680px; display: flex; flex-direction: column; gap: 32px; }
.pub-legal section { display: flex; flex-direction: column; gap: 10px; }
.pub-legal h2 { margin: 0; font-size: 20px; font-weight: 500; }
.pub-legal p { margin: 0; }
.pub-help-head { display: flex; flex-direction: column; gap: 10px; }
.pub-help section { scroll-margin-top: 24px; }
.pub-help h2 { font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1.2; }
.pub-help p, .pub-help ul { color: var(--ink2); }
.pub-help ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.pub-updated { font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
  .pub-top, .pub-main, .pub-foot { padding-left: 16px; padding-right: 16px; }
  .pub-main, .pub-main-landing { padding-top: 48px; padding-bottom: 48px; gap: 56px; }
  .pub-h1, .pub-h1-page { font-size: 40px; }
  .pub-feature-name { flex-basis: auto; }
  .pub-closing-line { font-size: 28px; }
  .pub-term { flex-direction: column; gap: 4px; }
  .pub-term-name { flex-basis: auto; }
}

/* Connect wizard: one form of stacked fields; the Choose apps list */
.connect-form { width: 520px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; margin: 0; }
.connect-form .caption { margin: 0; }
.field-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; font-size: 13px; }
.auth-field textarea {
  min-height: 120px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 4px;
  background: #FFFFFF; font-size: 12px; color: var(--ink); resize: vertical;
}
.auth-field input.mono, .auth-field textarea { font-family: var(--mono); }
.auth-field textarea.invalid { border-color: var(--down); }
.form-error { margin: 0; color: var(--down); }
button.btn-primary { border: 0; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.choose { max-width: 820px; display: flex; flex-direction: column; gap: 24px; margin: 0; }
.choose-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.choose-row { display: flex; align-items: center; gap: 20px; min-height: 44px; padding: 20px 0; border-bottom: 1px solid var(--hairline); cursor: pointer; }
.choose-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex: none; }
.choose-name { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.choose-title { font-size: 17px; font-weight: 500; }
.choose-sub { font-size: 14px; color: var(--ink2); }
.choose-ids { font-size: 12px; color: var(--muted); text-align: right; }
.choose-row[hidden] { display: none; }
.choose-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: -12px; }
.choose-find {
  width: 280px; max-width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 4px;
  background: var(--field); font: inherit; font-size: 14px; color: var(--ink);
}
.choose-links { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.choose-links .sep { color: var(--muted); }
.link-button { padding: 0; border: 0; background: none; font: inherit; color: var(--link); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.soon { font-size: 12px; color: var(--muted); }
.setup-note { font-size: 14px; color: var(--muted); }

/* --- connections manage + groups --- */
.source-groups { max-width: 820px; gap: 24px; }
.source-group { display: flex; flex-direction: column; gap: 4px; }
.source-group-title { margin: 0; font-size: 13px; font-weight: 500; color: var(--ink2); }
.source-group-line { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--hairline); color: var(--ink2); }
.table.source-group-table { min-width: 0; }
.source-group-table td { padding-top: 14px; padding-bottom: 14px; vertical-align: middle; }
.source-group-table .source-name { width: 200px; font-size: 15px; font-weight: 500; }
.source-group-table .source-add { width: 96px; }
.source-coming { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) {
  .source-group-table td { padding-left: 0; padding-right: 0; }
  .source-group-table tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; border-bottom: 1px solid var(--hairline); padding: 12px 0; }
  .source-group-table td { border-bottom: 0; padding: 0; }
  .source-group-table .source-name { width: auto; }
  .source-group-table td.ink2 { grid-column: 1; grid-row: 2; font-size: 14px; }
  .source-group-table .source-add { grid-column: 2; grid-row: 1 / span 2; width: auto; align-self: center; }
}
.manage { max-width: 820px; }
.manage-note { margin: 0; color: var(--down); }
.manage-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; }
.manage-foot .sep { color: var(--muted); }
a.manage-remove { color: var(--down); }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 4px; background: var(--down); color: var(--paper);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.remove-form { max-width: 820px; }
.wordmark { white-space: nowrap; }
.wordmark-dot { color: var(--up); }

/* --- help --- */
/* Help: a table of contents above the answers on phones, a sticky left column from 900px. */
.help-layout { display: flex; flex-direction: column; gap: 40px; }
.help-toc { font-size: 14px; border-bottom: 1px solid var(--hairline); padding-bottom: 24px; }
.help-toc ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.help-toc > ul { gap: 16px; }
.help-toc > ul > li > a { color: var(--ink); font-weight: 500; }
.help-toc ul ul { margin-top: 8px; padding-left: 12px; border-left: 1px solid var(--hairline); }
.help-toc ul ul a { color: var(--ink2); }
.help-toc a:hover { color: var(--ink); }
.help-body { min-width: 0; overflow-wrap: anywhere; }
.pub-help h3 { margin: 12px 0 0; font-size: 17px; font-weight: 500; line-height: 1.3; color: var(--ink); scroll-margin-top: 24px; }
.pub-help section section { margin-top: 16px; }
.pub-help ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--ink2); }
.pub-help .mono { font-family: var(--mono); font-size: 13px; }
.help-shot { margin: 6px 0; }
.help-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--hairline); background: var(--field); }
@media (min-width: 900px) {
  .help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; }
  .help-toc {
    position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto;
    border-bottom: 0; padding-bottom: 0; font-size: 13px;
  }
}
/* --- end help --- */
