/*
 * FileLens — landing site stylesheet.
 *
 * One file for two pages: the landing page and the privacy policy. They share a
 * header, a footer and a token set, so splitting them would mean keeping two
 * copies of the same header in step by hand.
 *
 * The palette is the extension's own, not a second one invented for the web. The
 * accent is `--accent` from `src/ui/tokens.css` (#0b6e4f light, #43be93 dark), and
 * the deep slate the icon's tile is drawn on (#0e1f31 → #123246) carries the dark
 * theme's surfaces. The store icon, the app and the site are one palette rather
 * than three, and a change to the app's accent is a change here.
 *
 * Theme: `data-fl-theme` on <body> is the resolved theme ('light' or 'dark').
 * `data-fl-theme-choice` records what the user picked, which may be 'auto'.
 * script.js owns both; nothing here reads prefers-color-scheme directly, so the
 * toggle wins in every direction.
 */

:root {
  --fl-surface: #ffffff;
  --fl-sunken: #f4f7f5;
  --fl-text: #2a3138;
  --fl-heading: #10181f;
  --fl-muted: #556069;
  --fl-faint: #6b7680;
  --fl-border: rgba(16, 24, 31, 0.12);
  --fl-border-strong: rgba(16, 24, 31, 0.2);

  --fl-accent: #0b6e4f;
  --fl-accent-hover: #095c42;
  --fl-accent-ink: #ffffff;
  --fl-accent-soft: #e4f1eb;
  --fl-accent-line: #0b6e4f;

  --fl-amber: #8a5a00;

  --fl-json-key: #0b6e4f;
  --fl-json-string: #9a4a00;
  --fl-json-number: #1d4ed8;
  --fl-json-bool: #7c3aed;

  --fl-shadow: 0 24px 70px rgba(12, 32, 26, 0.13);
  --fl-shadow-soft: 0 14px 36px rgba(12, 32, 26, 0.08);

  --fl-radius: 16px;
  --fl-radius-sm: 10px;
  --fl-container: 1140px;

  --fl-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.fl-page {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 2%, rgba(11, 110, 79, 0.09), transparent 26rem),
    radial-gradient(circle at 84% 5%, rgba(18, 50, 70, 0.07), transparent 24rem),
    linear-gradient(180deg, #fbfcfb 0%, #ffffff 36%, #fbfcfb 100%);
  color: var(--fl-text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.fl-page[data-fl-theme='dark'] {
  --fl-surface: #14232b;
  --fl-sunken: #0b161c;
  --fl-text: #d5dee2;
  --fl-heading: #f1f6f4;
  --fl-muted: #9aa8ae;
  --fl-faint: #859399;
  --fl-border: rgba(154, 168, 174, 0.2);
  --fl-border-strong: rgba(154, 168, 174, 0.32);

  --fl-accent: #43be93;
  --fl-accent-hover: #5bd0a6;
  --fl-accent-ink: #06221a;
  --fl-accent-soft: #102a22;
  --fl-accent-line: #43be93;

  --fl-amber: #e0a94f;

  --fl-json-key: #43be93;
  --fl-json-string: #e0a15a;
  --fl-json-number: #7fa9f5;
  --fl-json-bool: #b79bf0;

  --fl-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --fl-shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.34);

  background:
    radial-gradient(circle at 12% 2%, rgba(67, 190, 147, 0.14), transparent 26rem),
    radial-gradient(circle at 84% 5%, rgba(18, 50, 70, 0.5), transparent 24rem),
    linear-gradient(180deg, #0e1a20 0%, #11202a 42%, #0e1a20 100%);
}

/* :where() so this reset carries ZERO specificity. As `.fl-page a` it scored 0-1-1
   and beat `.fl-button-primary` at 0-1-0, which meant every anchor-shaped button
   drew its label in body text instead of --fl-accent-ink: dark slate on a dark
   accent, at about 1.5:1. Specificity, not cascade order — moving the rule would
   not have helped. */
:where(.fl-page a) {
  color: inherit;
  text-decoration: none;
}

.fl-page img,
.fl-page svg {
  display: block;
}

.fl-page :focus-visible {
  outline: 3px solid var(--fl-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.fl-svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fl-container {
  width: min(calc(100% - 48px), var(--fl-container));
  margin-inline: auto;
}

.fl-page code {
  /* A chip like `chrome://extensions` is one unbreakable token and ran off a 320px
     screen. Break inside it rather than clipping the end of the word. */
  overflow-wrap: anywhere;
  font-family: var(--fl-mono);
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: 5px;
  background: var(--fl-sunken);
  border: 1px solid var(--fl-border);
  color: var(--fl-heading);
}

.fl-page kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  border: 1px solid var(--fl-border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--fl-sunken);
  font-family: var(--fl-mono);
  font-size: 0.82em;
  text-align: center;
  color: var(--fl-heading);
}

/* Reachable by keyboard, invisible until it has focus. */
.fl-skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 60;
  padding: 12px 20px;
  border-radius: 10px;
  color: var(--fl-accent-ink);
  background: var(--fl-accent);
  font-weight: 700;
  transition: top 0.2s ease;
}

.fl-skip:focus {
  top: 16px;
}

.fl-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------- header */

.fl-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  min-height: 76px;
  background: rgba(251, 252, 251, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(16, 24, 31, 0.08);
}

.fl-page[data-fl-theme='dark'] .fl-header {
  background: rgba(14, 26, 32, 0.85);
  box-shadow: 0 1px 0 rgba(154, 168, 174, 0.14);
}

.fl-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 22px;
}

.fl-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  flex: 0 0 auto;
}

.fl-brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.fl-brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.fl-brand-name strong {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fl-heading);
}

.fl-brand-name small {
  font-size: 0.78rem;
  color: var(--fl-muted);
  letter-spacing: 0.01em;
}

.fl-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.fl-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fl-muted);
  transition:
    color 0.16s ease,
    background 0.16s ease;
}

.fl-nav a:hover,
.fl-nav a.is-active {
  color: var(--fl-heading);
  background: var(--fl-accent-soft);
}

.fl-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.fl-icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--fl-border);
  border-radius: 10px;
  background: var(--fl-surface);
  color: var(--fl-muted);
  cursor: pointer;
  transition:
    color 0.16s ease,
    border-color 0.16s ease;
}

.fl-icon-button svg {
  width: 19px;
  height: 19px;
}

.fl-icon-button:hover {
  color: var(--fl-heading);
  border-color: var(--fl-border-strong);
}

.fl-menu-toggle {
  display: none;
}

.fl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.fl-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.fl-button-primary {
  background: var(--fl-accent);
  color: var(--fl-accent-ink);
  box-shadow: 0 10px 24px rgba(11, 110, 79, 0.26);
}

.fl-button-primary:hover {
  background: var(--fl-accent-hover);
  transform: translateY(-1px);
}

.fl-button-secondary {
  background: var(--fl-surface);
  border-color: var(--fl-border-strong);
  color: var(--fl-heading);
}

.fl-button-secondary:hover {
  border-color: var(--fl-accent);
  color: var(--fl-accent);
  transform: translateY(-1px);
}

.fl-header-cta {
  padding: 10px 17px;
  font-size: 0.9rem;
}

/* -------------------------------------------------------------- mobile nav */

.fl-mobile-nav {
  border-top: 1px solid var(--fl-border);
  background: var(--fl-surface);
  padding: 14px 0 20px;
}

.fl-mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.fl-mobile-nav a:not(.fl-button) {
  display: block;
  padding: 12px 10px;
  border-radius: 9px;
  font-weight: 600;
  color: var(--fl-text);
}

.fl-mobile-nav a:not(.fl-button):hover {
  background: var(--fl-accent-soft);
}

.fl-mobile-nav .fl-button {
  width: 100%;
  margin-top: 8px;
}

/* --------------------------------------------------------------------- hero */

.fl-hero {
  position: relative;
  padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 6vw, 76px);
  overflow: hidden;
}

.fl-hero-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  background: radial-gradient(ellipse at 32% 0%, rgba(11, 110, 79, 0.13), transparent 62%);
  pointer-events: none;
}

.fl-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}

/* Grid children default to min-width:auto, which lets a long word widen the
   column instead of wrapping. */
.fl-hero-copy {
  min-width: 0;
}

.fl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 14px;
  border: 1px solid var(--fl-border);
  border-radius: 999px;
  background: var(--fl-surface);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fl-muted);
}

.fl-eyebrow svg {
  width: 15px;
  height: 15px;
  color: var(--fl-accent);
}

.fl-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--fl-heading);
}

.fl-hero h1 span {
  display: block;
  color: var(--fl-accent);
}

.fl-hero-text {
  margin: 0 0 28px;
  max-width: 54ch;
  font-size: clamp(1rem, 1.2vw, 1.09rem);
  color: var(--fl-muted);
}

.fl-hero-text strong {
  color: var(--fl-heading);
}

.fl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.fl-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fl-trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--fl-muted);
}

.fl-trust-list svg {
  width: 16px;
  height: 16px;
  color: var(--fl-accent);
}

/* ------------------------------------------------------ the before / after */

.fl-compare {
  display: grid;
  gap: 14px;
  margin: 0;
}

.fl-compare-pane {
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
  overflow: hidden;
}

.fl-compare-before {
  opacity: 0.92;
}

.fl-compare-after {
  border-color: var(--fl-accent-line);
  box-shadow: var(--fl-shadow);
}

.fl-pane-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--fl-border);
  background: var(--fl-sunken);
}

.fl-pane-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--fl-accent);
  color: var(--fl-accent-ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fl-pane-tag-plain {
  background: var(--fl-border-strong);
  color: var(--fl-heading);
}

.fl-pane-url {
  font-family: var(--fl-mono);
  font-size: 0.75rem;
  color: var(--fl-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fl-raw {
  margin: 0;
  padding: 14px 16px;
  max-height: 168px;
  overflow: hidden;
  font-family: var(--fl-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--fl-faint);
  white-space: pre-wrap;
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}

.fl-doc-mock {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
}

.fl-mock-rail {
  padding: 14px 12px;
  border-right: 1px solid var(--fl-border);
  background: var(--fl-sunken);
}

.fl-mock-rail-head {
  margin: 0 0 10px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fl-faint);
}

.fl-mock-rail-item {
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--fl-muted);
}

.fl-mock-rail-item.is-active {
  background: var(--fl-accent-soft);
  color: var(--fl-accent);
  font-weight: 700;
}

.fl-mock-body {
  padding: 18px 20px 20px;
}

.fl-mock-body h3 {
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fl-border);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fl-heading);
}

.fl-mock-body p {
  margin: 0 0 14px;
  font-size: 0.83rem;
  color: var(--fl-text);
}

.fl-mock-body p b {
  color: var(--fl-heading);
}

.fl-mock-table {
  width: 100%;
  margin-bottom: 14px;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.fl-mock-table th,
.fl-mock-table td {
  padding: 6px 9px;
  text-align: left;
  border: 1px solid var(--fl-border);
  color: var(--fl-text);
}

.fl-mock-table th {
  background: var(--fl-sunken);
  font-weight: 700;
  color: var(--fl-heading);
}

.fl-mock-code {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--fl-border);
  border-radius: 8px;
  background: var(--fl-sunken);
  font-family: var(--fl-mono);
  font-size: 0.72rem;
  color: var(--fl-heading);
  overflow-x: auto;
}

.fl-compare figcaption {
  font-size: 0.79rem;
  color: var(--fl-faint);
}

/* ----------------------------------------------------------------- sections */

.fl-section {
  padding: clamp(52px, 7vw, 96px) 0;
}

.fl-section-tight {
  padding: clamp(32px, 4vw, 56px) 0;
}

.fl-section-alt {
  background: var(--fl-sunken);
  border-block: 1px solid var(--fl-border);
}

.fl-section-heading {
  max-width: 64ch;
  margin-bottom: clamp(30px, 4vw, 52px);
}

.fl-section-kicker {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fl-accent);
}

.fl-section-heading h2,
.fl-split h2 {
  margin: 0 0 16px;
  font-size: clamp(1.6rem, 2.9vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.024em;
  font-weight: 800;
  color: var(--fl-heading);
}

.fl-section-lede {
  margin: 0;
  font-size: 1.02rem;
  color: var(--fl-muted);
}

.fl-section-lede b {
  color: var(--fl-heading);
}

.fl-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

.fl-muted-note {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--fl-faint);
}

.fl-muted-note b {
  color: var(--fl-text);
}

/* -------------------------------------------------------------- the weight */

.fl-weigh {
  padding: 26px 26px 22px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
  box-shadow: var(--fl-shadow-soft);
}

.fl-weigh-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.fl-weigh-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fl-heading);
}

.fl-weigh-bar {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: var(--fl-sunken);
  border: 1px solid var(--fl-border);
  overflow: hidden;
}

.fl-weigh-bar i {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: 999px;
  background: var(--fl-accent);
}

.fl-weigh-row.is-them .fl-weigh-bar i {
  background: var(--fl-border-strong);
}

.fl-weigh-value {
  font-family: var(--fl-mono);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  color: var(--fl-heading);
}

.fl-weigh-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--fl-border);
  font-size: 0.89rem;
  color: var(--fl-muted);
}

.fl-weigh-note b {
  color: var(--fl-heading);
}

.fl-inline-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 26px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--fl-border);
  border-left: 3px solid var(--fl-accent-line);
  border-radius: var(--fl-radius-sm);
  background: var(--fl-surface);
  font-size: 0.94rem;
  color: var(--fl-muted);
}

.fl-inline-note svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--fl-accent);
}

.fl-inline-note b {
  color: var(--fl-heading);
}

/* ------------------------------------------------------------------ formats */

.fl-formats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 22px;
}

.fl-format {
  padding: 28px 26px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
  box-shadow: var(--fl-shadow-soft);
}

.fl-format h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--fl-heading);
}

.fl-format-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--fl-accent-soft);
  color: var(--fl-accent);
}

.fl-format-icon svg {
  width: 21px;
  height: 21px;
}

.fl-format-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.fl-format-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  color: var(--fl-text);
}

.fl-format-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fl-accent-line);
}

.fl-json-mock {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius-sm);
  background: var(--fl-sunken);
  font-family: var(--fl-mono);
  font-size: 0.78rem;
  line-height: 1.75;
  overflow-x: auto;
}

.fl-json-line {
  white-space: nowrap;
}

.fl-json-in {
  padding-left: 20px;
}

.fl-j-p {
  color: var(--fl-faint);
}

.fl-j-k {
  color: var(--fl-json-key);
}

.fl-j-s {
  color: var(--fl-json-string);
}

.fl-j-num {
  color: var(--fl-json-number);
}

.fl-j-bool {
  color: var(--fl-json-bool);
}

.fl-j-b {
  color: var(--fl-heading);
}

.fl-j-n {
  color: var(--fl-faint);
  font-style: italic;
}

/* ----------------------------------------------------------------- features */

.fl-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}

.fl-feature {
  padding: 24px 22px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
}

.fl-feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  border-radius: 11px;
  background: var(--fl-accent-soft);
  color: var(--fl-accent);
}

.fl-feature-icon svg {
  width: 21px;
  height: 21px;
}

.fl-feature h3 {
  margin: 0 0 9px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.012em;
  color: var(--fl-heading);
}

.fl-feature p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--fl-muted);
}

/* -------------------------------------------------------------------- setup */

.fl-setup-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fl-setup-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius-sm);
  background: var(--fl-surface);
}

.fl-setup-steps b {
  font-family: var(--fl-mono);
  font-size: 0.85rem;
  color: var(--fl-accent);
}

.fl-setup-steps h3 {
  margin: 0 0 5px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--fl-heading);
}

.fl-setup-steps p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--fl-muted);
}

/* ------------------------------------------------------------------ privacy */

.fl-perm-wrap {
  min-width: 0;
  max-width: 100%;
  margin-bottom: 26px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
  box-shadow: var(--fl-shadow-soft);
  overflow-x: auto;
}

.fl-perm {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.fl-perm th,
.fl-perm td {
  padding: 14px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--fl-border);
  color: var(--fl-text);
}

.fl-perm th {
  background: var(--fl-sunken);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fl-muted);
}

.fl-perm tr:last-child td {
  border-bottom: 0;
}

.fl-perm td:first-child {
  font-weight: 600;
  color: var(--fl-heading);
  white-space: nowrap;
}

.fl-yes {
  color: var(--fl-accent);
}

/* Four cards of substantial prose: two columns, so they pair instead of leaving
   one orphaned on a third row. */
.fl-privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr));
  gap: 20px;
  align-items: start;
}

.fl-privacy-card {
  padding: 24px 22px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
}

.fl-privacy-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  border-radius: 11px;
  background: var(--fl-accent-soft);
  color: var(--fl-accent);
}

.fl-privacy-icon svg {
  width: 21px;
  height: 21px;
}

.fl-privacy-card h3 {
  margin: 0 0 9px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.012em;
  color: var(--fl-heading);
}

.fl-privacy-card p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--fl-muted);
}

.fl-privacy-card p b {
  color: var(--fl-heading);
}

/* -------------------------------------------------------------------- scope */

.fl-scope-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-border);
  overflow: hidden;
}

.fl-scope-list li {
  padding: 24px 22px;
  background: var(--fl-surface);
}

/* Block flow, not flex: these headings contain inline <code> chips, and as flex
   items each chip would become its own line instead of wrapping as text. */
.fl-scope-list h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.012em;
  color: var(--fl-heading);
}

.fl-scope-list h3::before {
  content: '—';
  margin-right: 8px;
  color: var(--fl-amber);
  font-weight: 700;
}

.fl-scope-list p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fl-muted);
}

/* ---------------------------------------------------------------------- faq */

.fl-faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 14px;
  align-items: start;
}

.fl-faq-item {
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius-sm);
  background: var(--fl-surface);
  overflow: hidden;
}

.fl-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--fl-heading);
  cursor: pointer;
  list-style: none;
}

.fl-faq-item summary::-webkit-details-marker {
  display: none;
}

.fl-faq-item summary::after {
  content: '';
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--fl-muted);
  border-bottom: 2px solid var(--fl-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.fl-faq-item[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.fl-faq-item[open] summary {
  border-bottom: 1px solid var(--fl-border);
}

.fl-faq-item > div {
  padding: 16px 20px 19px;
}

.fl-faq-item p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--fl-muted);
}

.fl-faq-item p:last-child {
  margin-bottom: 0;
}

.fl-faq-item a {
  color: var(--fl-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ install */

/* One centred panel rather than a grid of routes: the Chrome Web Store is the only
   way to install this, so offering it as a "choice" would invent an alternative
   that does not exist. */
.fl-install-panel {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(30px, 4vw, 48px) clamp(22px, 4vw, 44px) clamp(26px, 3vw, 38px);
  border: 1px solid var(--fl-accent-line);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
  box-shadow: var(--fl-shadow);
  text-align: center;
}

.fl-install-mark {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 17px;
  background: var(--fl-accent-soft);
  color: var(--fl-accent);
}

.fl-install-mark svg {
  width: 30px;
  height: 30px;
}

.fl-install-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.024em;
  font-weight: 800;
  color: var(--fl-heading);
}

.fl-install-lede {
  max-width: 46ch;
  margin: 0 auto 26px;
  font-size: 1rem;
  color: var(--fl-muted);
}

.fl-install-cta {
  width: min(100%, 340px);
  padding-block: 15px;
  font-size: 1rem;
}

.fl-install-facts {
  display: grid;
  gap: 10px;
  width: fit-content;
  margin: 28px auto 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--fl-border);
  list-style: none;
  text-align: left;
}

.fl-install-facts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--fl-text);
}

.fl-install-facts svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--fl-accent);
}

.fl-install-after {
  max-width: 48ch;
  margin: 22px auto 0;
  font-size: 0.88rem;
  color: var(--fl-faint);
}

.fl-install-after b {
  color: var(--fl-text);
}

/* ------------------------------------------------------------------ callout */

.fl-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
  box-shadow: var(--fl-shadow-soft);
}

.fl-callout-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: var(--fl-accent-soft);
  color: var(--fl-accent);
}

.fl-callout-icon svg {
  width: 24px;
  height: 24px;
}

.fl-callout h2 {
  margin: 0 0 7px;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--fl-heading);
}

.fl-callout p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--fl-muted);
}

/* ------------------------------------------------------------------- footer */

.fl-footer {
  position: relative;
  padding: clamp(44px, 5vw, 68px) 0 34px;
  border-top: 1px solid var(--fl-border);
  background: var(--fl-sunken);
}

.fl-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.8fr)) minmax(0, 1fr);
  gap: 34px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--fl-border);
}

.fl-footer-brand p {
  margin: 16px 0 0;
  max-width: 40ch;
  font-size: 0.89rem;
  color: var(--fl-muted);
}

.fl-footer-links h2,
.fl-footer-install h2 {
  margin: 0 0 14px;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fl-faint);
}

.fl-footer-links a {
  display: block;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--fl-muted);
}

.fl-footer-links a:hover {
  color: var(--fl-accent);
}

.fl-footer-install a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--fl-border-strong);
  border-radius: var(--fl-radius-sm);
  background: var(--fl-surface);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--fl-text);
}

.fl-footer-install a:hover {
  border-color: var(--fl-accent);
  color: var(--fl-accent);
}

.fl-footer-install svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--fl-accent);
}

.fl-footer-limit {
  max-width: 92ch;
  margin: 26px auto 0;
  padding-inline: 24px;
  font-size: 0.81rem;
  color: var(--fl-faint);
}

.fl-copyright {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(calc(100% - 48px), var(--fl-container));
  margin: 22px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--fl-border);
  font-size: 0.82rem;
  color: var(--fl-faint);
}

.fl-copyright a {
  color: var(--fl-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fl-scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--fl-border-strong);
  border-radius: 12px;
  background: var(--fl-surface);
  color: var(--fl-muted);
  box-shadow: var(--fl-shadow-soft);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
}

.fl-scroll-top svg {
  width: 19px;
  height: 19px;
}

.fl-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.fl-scroll-top:hover {
  color: var(--fl-accent);
  border-color: var(--fl-accent);
}

/* ------------------------------------------------------- the document pages */

.fl-doc-main {
  padding: clamp(38px, 5vw, 64px) 0 clamp(48px, 6vw, 80px);
}

.fl-doc-hero {
  max-width: 68ch;
  margin-bottom: clamp(30px, 4vw, 48px);
}

.fl-doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fl-accent);
}

.fl-doc-eyebrow svg {
  width: 15px;
  height: 15px;
}

.fl-doc-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 800;
  color: var(--fl-heading);
}

.fl-doc-hero p {
  margin: 0 0 12px;
  font-size: 1.02rem;
  color: var(--fl-muted);
}

.fl-doc-hero strong {
  color: var(--fl-heading);
}

.fl-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  font-size: 0.83rem;
  color: var(--fl-faint);
}

.fl-doc-meta b {
  color: var(--fl-text);
}

.fl-doc-grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(26px, 4vw, 54px);
  align-items: start;
}

.fl-doc-aside {
  position: sticky;
  top: 96px;
  padding: 20px 18px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
}

.fl-doc-aside h2 {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fl-faint);
}

.fl-doc-toc {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.fl-doc-toc a {
  display: block;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.87rem;
  color: var(--fl-muted);
}

.fl-doc-toc a:hover,
.fl-doc-toc a.is-active {
  background: var(--fl-accent-soft);
  color: var(--fl-accent);
}

/* A grid item's min-width is auto, so a wide table inside .fl-prose would widen
   this column and the page with it, instead of scrolling in its own wrapper. */
.fl-doc-stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.fl-doc-stack > * {
  min-width: 0;
}

.fl-prose {
  padding: 28px 28px 24px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background: var(--fl-surface);
}

.fl-prose-accent {
  border-color: var(--fl-accent-line);
  background: var(--fl-accent-soft);
}

.fl-prose h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fl-heading);
}

.fl-prose h3 {
  margin: 22px 0 10px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--fl-heading);
}

.fl-prose p {
  margin: 0 0 14px;
  font-size: 0.96rem;
  color: var(--fl-text);
  max-width: 76ch;
}

.fl-prose p:last-child {
  margin-bottom: 0;
}

.fl-prose ul,
.fl-prose ol {
  margin: 0 0 14px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--fl-text);
  max-width: 76ch;
}

.fl-prose a {
  color: var(--fl-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fl-prose strong {
  color: var(--fl-heading);
}

.fl-table-wrap {
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 14px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius-sm);
}

.fl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.fl-table th,
.fl-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--fl-border);
}

.fl-table th {
  background: var(--fl-sunken);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fl-muted);
  white-space: nowrap;
}

.fl-table tr:last-child td {
  border-bottom: 0;
}

.fl-table td b {
  color: var(--fl-heading);
}

/* ------------------------------------------------------------------ reveals */

[data-fl-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

[data-fl-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-fl-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------- breakpoints */

@media (max-width: 1080px) {
  .fl-nav {
    display: none;
  }

  .fl-menu-toggle {
    display: grid;
  }

  .fl-doc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fl-doc-aside {
    position: static;
  }
}

@media (max-width: 900px) {
  .fl-hero-grid,
  .fl-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .fl-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fl-callout {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .fl-callout .fl-button {
    grid-column: 1 / -1;
  }

  .fl-weigh-row {
    grid-template-columns: 140px minmax(0, 1fr) 76px;
    gap: 12px;
  }

  /* Below this width the hero is a single column, so the comparison is full-bleed
     rather than a side panel. It stops being a thumbnail, and its type has to come
     back up to a size someone can actually read. */
  .fl-raw {
    font-size: 0.75rem;
    max-height: 200px;
  }

  .fl-mock-rail-head {
    font-size: 0.75rem;
  }

  .fl-mock-rail-item {
    font-size: 0.8rem;
  }

  .fl-mock-table {
    font-size: 0.78rem;
  }

  .fl-mock-body p,
  .fl-mock-code {
    font-size: 0.85rem;
  }

  .fl-mock-body h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 620px) {
  .fl-container,
  .fl-copyright {
    width: calc(100% - 32px);
  }


  .fl-brand-name small {
    display: none;
  }

  .fl-header-cta span {
    display: none;
  }

  .fl-header-cta {
    padding: 10px 12px;
  }

  /* Content-width buttons stack ragged on a phone. Full width reads as deliberate
     and gives each one the whole thumb. */
  .fl-actions {
    display: grid;
    gap: 10px;
  }

  .fl-actions .fl-button {
    width: 100%;
    padding-block: 14px;
  }

  .fl-callout .fl-button {
    width: 100%;
  }

  .fl-footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .fl-faq {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The comparison is a miniature of a real window on desktop. On a phone it is
     the full width of the screen, so it stops being a thumbnail and its type has
     to come back up to a size someone can actually read. */
  .fl-doc-mock {
    grid-template-columns: minmax(0, 1fr);
  }

  .fl-mock-rail {
    display: none;
  }

  .fl-weigh-row {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px 12px;
  }

  .fl-weigh-bar {
    grid-column: 1 / -1;
    order: 3;
  }

  .fl-pane-url {
    display: none;
  }

  /* The nowrap label column is what pushes this table past a phone. Wrapping it
     there beats a table nobody notices they can scroll. */
  .fl-perm td:first-child {
    white-space: normal;
  }

  .fl-perm th,
  .fl-perm td {
    padding: 12px 14px;
  }

  .fl-table th {
    white-space: normal;
  }

  .fl-prose,
  .fl-format,
  .fl-install-panel,
  .fl-weigh {
    padding-inline: 18px;
  }
}
