:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-subtle: #f5f6f8;
  --fg: #1b1d21;
  --fg-muted: #5b616b;
  --border: #e3e6ea;
  --accent: #2f6feb;
  --accent-fg: #ffffff;
  --ready: #1da462;
  --max: 640px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-subtle: #1d2025;
    --fg: #e8eaed;
    --fg-muted: #9aa0a6;
    --border: #2f333a;
    --accent: #7aa5ff;
    --accent-fg: #10131a;
    --ready: #3ddc8a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 40px 20px 72px;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: inherit;
}

/*
 * The wordmark carries the product name itself, so the brand link holds only
 * the image. Explicit width and height on the <img> in the markup reserve the
 * space before it loads; this keeps it from overflowing a narrow viewport.
 */
.brand img {
  width: auto;
  height: 32px;
  max-width: 100%;
}

h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin: 32px 0 8px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

h3 {
  margin: 22px 0 6px;
  font-size: 15px;
}

p,
li {
  color: var(--fg);
}

.lede {
  margin: 0 0 8px;
  color: var(--fg-muted);
  font-size: 17px;
}

.meta {
  margin: 0 0 28px;
  color: var(--fg-muted);
  font-size: 13px;
}

ul {
  padding-left: 20px;
}

li {
  margin: 4px 0;
}

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

.card {
  margin: 24px 0;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-subtle);
}

.card h2 {
  margin-top: 0;
}

.callout {
  border-left: 3px solid var(--ready);
}

label.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

label.check input {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.field {
  margin: 18px 0;
}

.field label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 600;
}

input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button,
.button {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.button.secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--fg);
}

.status {
  min-height: 24px;
  margin-top: 16px;
  font-size: 14px;
}

table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--fg-muted);
  font-weight: 600;
}

footer {
  max-width: var(--max);
  margin: 56px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 13px;
}

footer a {
  color: var(--fg-muted);
}

.code-block {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  user-select: all;
}

/* Explanatory text under the consent checkbox. Kept visually secondary so the
   two operative statements above it read as the commitment, but not hidden -
   small print that has to be hunted for is its own kind of problem. */
.consent-note {
  display: block;
  margin-top: 6px;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* --- Free/Pro comparison table -------------------------------------------
 *
 * The table itself is generated into upgrade.html from
 * src/common/feature-matrix.js - see build/generate-feature-table.mjs. Only the
 * styling lives here.
 *
 * Row labels are <th scope="row">, so the base `th` rule above would grey them
 * out along with the column headers. They are the substance of the table, so
 * they are restored to full contrast here.
 */

.table-scroll {
  overflow-x: auto;
}

.compare {
  min-width: 420px;
}

.compare th[scope='row'] {
  color: var(--fg);
  font-weight: 500;
}

.compare thead th {
  white-space: nowrap;
}

.compare td {
  width: 26%;
}

.compare td.is-pro {
  color: var(--ready);
  font-weight: 600;
}

.compare .perm {
  color: var(--fg-muted);
  font-weight: 400;
}

/* Visible to screen readers, not on screen - the table's caption. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Landing page: trust badge and calls to action ------------------------
 *
 * There are no reviews yet, so there is no social proof to show. The honest
 * substitute near the top is a claim a reader can verify for themselves
 * against the permission list on the store page.
 */

.badge-row {
  margin: 0 0 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.35;
}

.badge svg {
  flex: none;
  color: var(--ready);
}

/*
 * One action per page, rendered twice from the same component - once above the
 * fold and once after the copy. Nothing else on the landing page is a button.
 */

.cta {
  margin: 28px 0 36px;
}

/* .cta-soon is gone with the pre-launch state it styled - see /cta.js. The
   extension is live on two stores, so there is no branch left that renders a
   statement instead of a button. */

.cta-button {
  flex: none;
}

.cta-note {
  margin: 10px 0 0;
  color: var(--fg-muted);
  font-size: 13px;
  /* Holds its line so the two CTA slots reserve the same height in either
     state, and swapping LISTING_URL does not reflow the page around them. */
  min-height: 19px;
}

@media (max-width: 460px) {
  .cta-button {
    width: 100%;
  }
}

/* --- Callout ---------------------------------------------------------------
 *
 * For the one or two things on a page that must not be read past. Currently the
 * trader name on the checkout page: an unrecognised line on a bank statement is
 * a leading cause of chargebacks, and on a one-time sale at this product's price
 * a chargeback costs more than the sale earned. (The number is not repeated in
 * this comment on purpose - it sat here stale once, in a file extension no check
 * in this project could read.)
 *
 * A left rule and a tinted ground rather than a colour alone, so it still reads
 * as set apart without relying on colour vision.
 */

.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--bg-subtle);
  font-size: 14px;
  line-height: 1.5;
}

.notice strong {
  display: block;
  margin-bottom: 2px;
}
