/**
 * resources/css/marketing.css
 * ApplyRole — the pages somebody reads before they have an account.
 *
 * Pricing, terms, privacy, help. They share one stylesheet because they share one
 * job: long-form text a stranger has to be able to read, on a page with no
 * application chrome in it.
 *
 * SEPARATE FROM app.css BECAUSE THE MEASURE IS DIFFERENT. Application pages are
 * dense and wide — a tracker board wants every pixel. A privacy notice read at that
 * width is unreadable: past about 75 characters the eye loses the line return, and
 * the one thing a legal document must do is get read. So the prose here is capped at
 * a measure and centred, and nothing else on the site uses that rule.
 *
 * NO HEX VALUES. Every colour is a token from tokens.css. See the rule in that file.
 *
 * AND SPACING IS --sp-N, NOT --sN. `--s1` to `--s6` are the CATEGORICAL CHART
 * PALETTE — `--s3` is an aqua. An earlier draft of this file wrote
 * `padding: var(--s3, 2rem) ...`, which resolves to a colour, which makes the whole
 * padding declaration invalid, which drops it silently: the page rendered with its
 * title tucked under the navigation and no browser said a word. A fallback in a
 * var() makes that worse, not better — it only fires when the token is UNDEFINED,
 * never when it is defined and wrong.
 */

/* ── Shell ──────────────────────────────────────────────────────────────────── */

.mkt {
  max-width: 68rem;
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-4) var(--sp-8);
}

.mkt__head { margin-bottom: 2rem; }

.mkt__title {
  margin: 0 0 .5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--ink);
}

.mkt__lede {
  margin: 0;
  max-width: 46rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.mkt__h2 {
  margin: 2.5rem 0 .75rem;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--ink);
}

.mkt__h3 {
  margin: 1.75rem 0 .5rem;
  font-size: 1rem;
  color: var(--ink);
}

.mkt__foot {
  margin: 3rem 0 0;
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ── Audience tabs ──────────────────────────────────────────────────────────
   Links, not buttons — each state is a URL, so it survives a back button, a
   bookmark and scripting being off. */

.mkt__tabs {
  display: flex;
  gap: .375rem;
  margin: 0 0 1.5rem;
  padding: .3125rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.mkt__tab {
  padding: .5rem 1.125rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.mkt__tab:hover { color: var(--ink); }

.mkt__tab.is-on {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--sh-1);
}

/* ── Banners ────────────────────────────────────────────────────────────────
   Announcements about the state of the business, not about the reader's input —
   so they are not flash messages and do not borrow the flash styling. */

.mkt__banner {
  margin: 0 0 1.5rem;
  padding: .875rem 1.125rem;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-3);
  font-size: .875rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.mkt__banner--quiet {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--muted);
}

/* ── Plan cards ─────────────────────────────────────────────────────────────
   .plangrid, .plan and .plan__* come from account.css, which this page loads
   first. Only the additions live here — duplicating the card would give the
   pricing page and the billing page two definitions of one component, which is
   exactly the drift config/plans.php exists to prevent. */

.plan__was {
  display: block;
  font-size: .9375rem;
  color: var(--faint);
}

/* A price expressed as words rather than a figure. Set smaller than .plan__amount,
   which is sized for "$499" — the same size on a four-word phrase wraps to two lines
   and shouts louder than the plan name above it. */
.plan__amount--words {
  font-size: 1.125rem;
  line-height: 1.35;
}

.plan__cta {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  text-align: center;
}

.plan__cta--none {
  margin: 1.25rem 0 0;
  padding: .625rem 0;
  font-size: .875rem;
  color: var(--muted);
  text-align: center;
}

/* ── Feature comparison ────────────────────────────────────────────────────
   The absent rows are rendered, not omitted. A list of what a plan has makes the
   reader open a second tab to find the difference, and the difference is the
   decision they came to make. */

.planfeat {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.planfeat__row {
  display: flex;
  gap: .625rem;
  align-items: flex-start;
  padding: .375rem 0;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.planfeat__mark {
  flex: none;
  width: 1rem;
  text-align: center;
  color: var(--ok);
  font-weight: 700;
}

/* Not colour alone: the absent rows are also dimmed and marked up for a screen
   reader, because a tick and a dot are indistinguishable to a colourblind reader
   and invisible to a non-visual one. */
.planfeat__row--no { color: var(--faint); }
.planfeat__row--no .planfeat__mark { color: var(--faint); font-weight: 400; }

/* Visible only to assistive technology. Clip rather than display:none, which
   removes it from the accessibility tree entirely. */
.planfeat__sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Long-form legal and help prose ────────────────────────────────────────
   The measure is the whole point. See the file docblock. */

.doc {
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-4) var(--sp-8);
}

.doc__title {
  margin: 0 0 .375rem;
  font-size: clamp(1.625rem, 3.5vw, 2.125rem);
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--ink);
}

.doc__meta {
  margin: 0 0 2rem;
  font-size: .8125rem;
  color: var(--muted);
}

/* The one-paragraph version, above the document rather than instead of it. A
   summary that replaces the terms is not a summary, it is a second set of terms. */
.doc__summary {
  margin: 0 0 2.5rem;
  padding: 1.125rem 1.25rem;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-left-width: 3px;
  border-radius: var(--r-3);
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.doc h2 {
  margin: 2.5rem 0 .625rem;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h, 4rem) + 1rem);
}

.doc h3 {
  margin: 1.75rem 0 .375rem;
  font-size: .9375rem;
  color: var(--ink);
}

.doc p,
.doc li {
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.doc p { margin: 0 0 1rem; }

.doc ul, .doc ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.doc li { margin-bottom: .5rem; }

/* UNDERLINED, NOT JUST COLOURED. A link inside a paragraph that differs from the
   surrounding text only by hue is invisible to a colourblind reader — WCAG 1.4.1,
   and the rule the tracker's status badges already follow ("not colour alone").
   Nav links and buttons are exempt because position and shape carry them; a link in
   the middle of a sentence has neither. The privacy notice is the last page where a
   reader should have to hunt for the link to their supervisory authority. */
.doc a,
.faq__a a,
.helpcard a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: .15em;
  text-decoration-thickness: .07em;
}

.doc a:hover, .faq__a a:hover, .helpcard a:hover { text-decoration-thickness: .12em; }

.doc code {
  padding: .0625rem .3125rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: .25rem;
  font-family: var(--font-mono);
  font-size: .8125rem;
}

/* Contents, for a document long enough that somebody is looking for one clause
   rather than reading it through. */
.doc__toc {
  margin: 0 0 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

.doc__toc h2 {
  margin: 0 0 .5rem;
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc__toc ol { margin: 0; padding-left: 1.125rem; }
.doc__toc li { margin-bottom: .25rem; font-size: .875rem; }

/* A statement of fact about how the system behaves, rather than a promise about
   how we intend to behave. Used where the two are easy to confuse. */
.doc__fact {
  margin: 1.25rem 0;
  padding: .875rem 1.125rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-3);
  font-size: .875rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ── FAQ ────────────────────────────────────────────────────────────────────── */

.mkt__faq { margin-top: 3.5rem; }

.faq { max-width: 44rem; }

.faq__q {
  margin: 1.75rem 0 .375rem;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink);
}

.faq__a {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ── Help index ─────────────────────────────────────────────────────────────── */

.helpgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
}

.helpcard {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: var(--sh-1);
}

.helpcard h2 {
  margin: 0 0 .5rem;
  font-size: 1rem;
  color: var(--ink);
}

.helpcard ul { margin: 0; padding-left: 1.125rem; }

.helpcard li {
  margin-bottom: .375rem;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--ink-2);
}

@media (max-width: 40rem) {
  .mkt, .doc { padding-top: var(--sp-5); }
  .mkt__tabs { width: 100%; }
  .mkt__tab { flex: 1; text-align: center; }
}

/* ── Mailing-list capture ──────────────────────────────────────────────────
   Deliberately quiet. A capture block that competes with the page it sits on
   is one people learn to scroll past, and the small print under the field is
   doing real work — it is the consent wording, not decoration.               */

.capture {
  max-width: var(--wrap);
  margin: 3rem auto;
  padding: 2rem 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
}

.capture__title { margin: 0 0 .4rem; font-size: 1.25rem; }
.capture__blurb { margin: 0 auto 1.25rem; color: var(--muted); max-width: 34rem; }

.capture__form {
  display: flex; gap: .5rem; flex-wrap: wrap;
  justify-content: center;
  max-width: 30rem; margin: 0 auto;
}

.capture__input {
  flex: 1 1 16rem;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font: inherit; font-size: .9375rem;
  color: var(--ink);
}
.capture__input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }

.capture__small {
  margin: .9rem auto 0;
  font-size: .75rem; color: var(--muted);
  max-width: 32rem;
}
