/* TidyTable — hub site.
 *
 * No web fonts. The privacy page claims the extension makes no network
 * requests and the site should be able to stand next to that claim: open
 * DevTools on any page here and the only requests are this stylesheet, the
 * icon, and — on one page — one script. Nothing third-party, nothing
 * remote, no analytics.
 *
 * Mobile-first: the base rules are the phone layout and the media queries
 * only ever add. The one thing that must survive a narrow screen is the
 * comparison table, which scrolls inside its own box rather than making the
 * page scroll sideways.
 *
 * The look is meant to come from the product rather than from a template:
 * the same blue as the icon, the same tabular figures as the preview panel,
 * and tables that are styled properly instead of being an afterthought —
 * which for a table extension is the whole point.
 */

:root {
  --ink: #14161b;
  --ink-soft: #4d5561;
  --ink-faint: #7b8494;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --line: #e3e6ec;
  --line-strong: #cbd1db;
  --accent: #1e56c7;
  --accent-soft: #eaf0fd;
  --accent-ink: #ffffff;
  --yes: #17694a;
  --yes-bg: #e6f4ee;
  --no: #8a5a12;
  --no-bg: #fdf3e3;

  /* Prose column. 34rem held the classic 65-75 character measure, which is the
     right default for an article and too tight for these pages: they are short,
     dense and read in one pass, and at 34rem they were a narrow ribbon with most
     of the window empty either side. 46rem runs to roughly 90 characters — above
     the textbook ideal, deliberately. If body copy ever starts feeling hard to
     track back to the next line, 40rem is the middle setting. */
  --measure: 46rem;          /* prose column */
  --wide: 72rem;             /* tables and the header */
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9ecf1;
    --ink-soft: #a9b2c0;
    --ink-faint: #7d8695;
    --bg: #12141a;
    --bg-soft: #1a1d24;
    --line: #2a2f39;
    --line-strong: #3b414d;
    --accent: #7aa7ff;
    --accent-soft: #1b2740;
    --accent-ink: #0d1117;
    --yes: #6fd3a8;
    --yes-bg: #16302a;
    --no: #e2b169;
    --no-bg: #33290f;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

/* Keyboard users get to skip the nav; everyone else never sees this. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 10;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ------------------------------------------------------------------- shell */

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 680;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { display: block; border-radius: 5px; }

header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin-left: -8px;
}
header.site nav a {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
}
header.site nav a:hover { background: var(--bg-soft); color: var(--ink); }
header.site nav a[aria-current="page"] { color: var(--accent); font-weight: 620; }

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

footer.site {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 24px 20px 48px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 14.5px;
}
footer.site p { margin: 0 0 6px; }
footer.site a { color: var(--ink-soft); }

/* -------------------------------------------------------------- typography */

h1 {
  font-size: clamp(1.85rem, 6.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 20px;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.2rem, 3.6vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 660;
  margin: 44px 0 14px;
  text-wrap: balance;
}

/* The store copy's ALL-CAPS section headings, kept as written. Tracking them
   out is what stops capitals reading as shouting. */
h2 { font-variant-ligatures: none; }

h3 {
  font-size: 1.05rem;
  font-weight: 640;
  line-height: 1.35;
  margin: 28px 0 8px;
  text-wrap: balance;
}

p { margin: 0 0 16px; }

/* The first paragraph after the h1 is the answer somebody searched for. */
h1 + p {
  font-size: 1.11rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 650; }

ul, ol { margin: 0 0 18px; padding-left: 1.15em; }
li { margin: 0 0 7px; }
li::marker { color: var(--ink-faint); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

blockquote {
  margin: 0 0 18px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--line-strong);
  color: var(--ink-soft);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ------------------------------------------------------------------ tables */

/* Wide content scrolls inside its own box. The page itself must never scroll
   sideways — and on a site about tables, tables have to be the best-looking
   thing on it. */
.scroller {
  max-width: var(--wide);
  margin: 0 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  font-weight: 640;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  border-bottom: 2px solid var(--line-strong);
  white-space: nowrap;
}
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th[scope="row"] { font-weight: 600; white-space: nowrap; }

/* The column that is ours, marked without shouting about it. */
.compare thead th.mine { color: var(--accent); background: var(--accent-soft); }
.compare tbody td:first-of-type { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }

td.yes { color: var(--yes); font-weight: 600; }
td.no { color: var(--no); }
td.maybe { color: var(--ink-faint); }

/* --------------------------------------------------------------- the form */

.card {
  max-width: var(--measure);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 20px;
  margin: 8px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label { font-weight: 620; font-size: 15px; }

input[type="email"] {
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}

button.primary {
  font: inherit;
  font-weight: 640;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  align-self: flex-start;
}
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.primary:disabled { opacity: 0.6; cursor: progress; }

.note { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.note:empty { display: none; }

/* ------------------------------------------------------------------ consent

   The tick box on /upgrade is legally operative: it is the Article 16(1)(m)
   consent, and the sentence beside it has to be readable rather than a line of
   small grey text people scroll past. So it gets the body size and colour, and
   the qualifying note under it is what goes quiet — the opposite of the usual
   arrangement for a checkbox and its help text.

   The box itself is enlarged and given its own hit area. A consent that is
   fiddly to tick is a consent someone ticks without reading. */
.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-weight: 400;
  font-size: inherit;
  line-height: 1.5;
  cursor: pointer;
}
.check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.check small {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* The licence code on /upgrade/success.

   `overflow-wrap: anywhere` is not cosmetic: a Checkout Session id is around
   seventy unbroken characters, and without it the panel scrolls sideways on a
   phone — on the one page where the buyer has to read the whole string.
   Monospace so a lowercase l and a digit 1 are distinguishable, since people do
   retype this. `user-select: all` makes one click select the lot for anyone the
   copy button fails. */
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0;
}

/* The single call to action on the product and pricing pages. */
.cta { margin: 28px 0 8px; }
.cta .primary {
  display: inline-block;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 620;
  font-size: 16px;
  padding: 13px 22px;
}
.cta .primary:hover { filter: brightness(1.08); }

/* --------------------------------------------------------------- wider up */

@media (min-width: 46rem) {
  main { padding-top: 44px; }

  /* Only the tables break out of the prose column — the text stays at a
     readable measure however wide the window gets. */
  main > .scroller { width: var(--wide); max-width: calc(100vw - 40px); margin-inline: 0; }
}

@media (min-width: 72rem) {
  main > .scroller {
    margin-left: calc((var(--measure) - var(--wide)) / 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  header.site nav, .skip, .card { display: none; }
  body { font-size: 12pt; }
  .scroller { border: 0; overflow: visible; }
}
