/* The public site's one stylesheet. The colours are the web app's (web/src/styles.css),
   so the step from this page into the app is not a change of place. No font is loaded:
   the policy allows none from elsewhere, and the system's is already there. */

:root {
  --bg: #0e1116;
  --panel: #151a21;
  --line: #262d38;
  --text: #e6eaf0;
  --muted: #8b95a5;
  --accent: #5b8cff;
  --warn-bg: #3a2f12;
  --warn-line: #8a6d1f;
  --radius: 12px;
  --measure: 68ch;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --line: #dfe3ea;
    --text: #131820;
    --muted: #5b6577;
    --accent: #2f5fe0;
    --warn-bg: #fff6dd;
    --warn-line: #d9b44a;
  }
}

* { box-sizing: border-box; }

/* The frame of Google Tag Manager's <noscript> snippet. Google writes these two rules as
   a style attribute; the policy allows no inline style, so they are here. */
.gtm-noscript { display: none; visibility: hidden; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.top, main, .bottom {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 1.1rem;
  text-decoration: none;
}
.brand img { border-radius: 7px; }

.button {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.big { padding: 13px 24px; font-size: 1.1rem; }

main { padding-top: 24px; padding-bottom: 56px; }

.hero { padding: 48px 0 40px; max-width: 46rem; }
.hero.narrow { max-width: 38rem; }
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5.2vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lede { margin: 0 0 26px; font-size: 1.2rem; color: var(--text); }
.actions { margin: 0 0 14px; }

.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 16px 0 48px;
}
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.card h2 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }

.plain { max-width: var(--measure); }
.plain h2 { font-size: 1.4rem; margin: 0 0 12px; }
.plain ul { padding-left: 1.2em; margin: 0 0 18px; }
.plain li { margin-bottom: 6px; }

/* The privacy policy and the terms: text to be read, one column. */
.legal { max-width: var(--measure); }
.legal h1 { font-size: clamp(1.8rem, 4.4vw, 2.5rem); line-height: 1.15; margin: 24px 0 8px; }
.legal h2 { font-size: 1.3rem; margin: 40px 0 10px; }
.legal h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.legal p, .legal li { overflow-wrap: break-word; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal address { font-style: normal; margin: 0 0 16px; }
.legal .effective { color: var(--muted); margin: 0 0 24px; }

.scroll { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
th { background: var(--panel); font-weight: 650; }

.draft {
  margin: 0 0 8px;
  padding: 12px 16px;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  background: var(--warn-bg);
}

.bottom {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.bottom p { margin: 0; line-height: 2; }

@media (max-width: 480px) {
  .top .button { padding: 8px 12px; }
  .hero { padding-top: 28px; }
}

/* The extension's download page (/extension). */
.guide .lede { color: var(--muted); }
.download {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 8px 0 8px;
}
.download .actions { margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.checksum { overflow-wrap: anywhere; word-break: break-all; }
.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 14px; }
.guide pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  overflow-x: auto;
}
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
}

/* The extension's call to action: the header link and the front page's flow section. */
.top-links { display: flex; align-items: center; gap: 16px; }
.top-link { color: var(--text); text-decoration: none; font-weight: 600; }
.top-link:hover { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.flow { padding: 8px 0 40px; max-width: 46rem; }
.flow h2 { font-size: 1.6rem; margin: 0 0 10px; }
.flow .lede { color: var(--muted); font-size: 1.1rem; margin: 0 0 20px; }
.flow-steps { padding-left: 1.4em; margin: 0 0 24px; }
.flow-steps li { margin-bottom: 14px; }
.flow-steps strong { display: block; }
@media (max-width: 520px) {
  .wide-only { display: none; }
  .top-links { gap: 12px; }
  .actions .button.big { width: 100%; text-align: center; }
}
