/*
 * Filebender styles
 * =================
 *
 * Two layers, both built on the Rabbit Labs brand tokens
 * (packages/brand/rabbit-brand.css, served at /brand/rabbit-brand.css):
 *
 *   The site     the rabbitlabs.app look: dark violet ground, Space Grotesk,
 *                glowing accents (--rb-web-* tokens). Header, hero, the
 *                words around the converter, footer.
 *   The product  a clean light card (--rb-ui-* tokens, system UI font), the
 *                way rabbitlabs.app shows its extensions: the converter,
 *                results, History and Status cards, the settings dialog.
 *
 * No new hues: every colour is a brand token or a tint of one. See DESIGN.md.
 */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --fb-space-1: 4px;
  --fb-space-2: 8px;
  --fb-space-3: 12px;
  --fb-space-4: 16px;
  --fb-space-5: 24px;
  --fb-space-6: 32px;
  --fb-space-7: 48px;
  --fb-space-8: 72px;

  --fb-text-xs: 12px;
  --fb-text-sm: 13px;
  --fb-text-md: 15px;
  --fb-text-lg: 18px;

  --fb-width: 1120px;
  --fb-tool-width: 860px;
  --fb-gutter: 16px;

  --fb-focus: 0 0 0 3px rgb(var(--rb-violet-500-rgb) / 0.45);
  --fb-danger: var(--rb-red-600);
  --fb-danger-soft: rgb(194 52 77 / 0.08);
  --fb-drop-bg: rgb(var(--rb-violet-500-rgb) / 0.05);
  --fb-drop-active: rgb(var(--rb-violet-500-rgb) / 0.14);
}
@media (min-width: 640px) {
  :root {
    --fb-gutter: 24px;
  }
}

/* Base: the site ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--rb-web-bg-deep);
  scroll-padding-top: 88px;
}

body.fb-site {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--rb-web-text);
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--rb-violet-500-rgb) / 0.2), transparent 32%),
    radial-gradient(circle at 88% 4%, rgb(var(--rb-violet-300-rgb) / 0.08), transparent 24%),
    linear-gradient(180deg, var(--rb-web-bg-deep) 0%, var(--rb-web-bg) 42%, var(--rb-ground-800) 100%);
  font-family: var(--rb-font-display);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--rb-web-accent);
  text-underline-offset: 3px;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: var(--rb-tracking-tight);
}

:focus-visible {
  outline: 2px solid var(--rb-violet-300);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgb(var(--rb-violet-500-rgb) / 0.4);
  color: #fff;
}

.fb-skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--rb-radius-pill);
  background: var(--rb-violet-600);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.fb-skip:focus-visible {
  top: 12px;
}

.fb-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

main {
  display: block;
  max-width: var(--fb-width);
  margin: 0 auto;
  padding: 0 var(--fb-gutter) var(--fb-space-8);
  outline: none;
}

/* Site header --------------------------------------------------------------- */
.fb-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rb-web-line);
  background: rgb(var(--rb-ground-950-rgb) / 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.fb-site-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fb-space-3) var(--fb-space-5);
  max-width: var(--fb-width);
  margin: 0 auto;
  padding: 12px var(--fb-gutter);
}

.fb-site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--rb-web-text);
  text-decoration: none;
}
.fb-site-logo {
  flex: none;
  border-radius: 12px;
  box-shadow: 0 0 24px var(--rb-web-glow);
}
.fb-site-name {
  display: flex;
  flex-direction: column;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.fb-site-eyebrow {
  color: var(--rb-web-accent);
  font-family: var(--rb-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.fb-site-nav {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-pill);
  background: var(--rb-web-surface-1);
  font-size: 14px;
  order: 3;
  width: 100%;
  overflow-x: auto;
}
.fb-site-nav a {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--rb-radius-pill);
  color: var(--rb-web-text-muted);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.fb-site-nav a:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.04);
}
.fb-site-nav a[aria-current="page"] {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}
/* Phones: the six tasks in two rows of three, so none is hidden off the edge. */
@media (max-width: 539px) {
  .fb-site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: var(--rb-radius-lg);
    font-size: 13px;
  }
  .fb-site-nav a {
    padding: 6px 4px;
    border-radius: var(--rb-radius-md);
  }
}

.fb-site-cta {
  display: none;
  margin-left: auto;
  padding: 8px 16px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: var(--rb-radius-pill);
  background: linear-gradient(135deg, rgb(var(--rb-violet-600-rgb) / 0.3), rgb(var(--rb-ground-700-rgb) / 0.85));
  color: var(--rb-web-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.fb-site-cta:hover {
  border-color: var(--rb-violet-300);
}

/* The signed-in account: email and Sign out. */
.fb-site-account {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-left: auto;
  color: var(--rb-web-text-muted);
  font-size: 13px;
}
.fb-site-account[hidden] {
  display: none;
}
.fb-site-account-email {
  max-width: 24ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-site-account button {
  padding: 6px 12px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: var(--rb-radius-pill);
  background: none;
  color: var(--rb-web-text);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.fb-site-account button:hover {
  border-color: var(--rb-violet-300);
}
@media (max-width: 560px) {
  .fb-site-account-email {
    display: none;
  }
}
/* Signed out: Sign in, and Create free account. */
.fb-site-signin {
  color: var(--rb-web-text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.fb-site-signin:hover {
  text-decoration: underline;
}
.fb-site-join {
  padding: 6px 12px;
  border: 1px solid var(--rb-violet-300);
  border-radius: var(--rb-radius-pill);
  background: rgb(var(--rb-violet-600-rgb) / 0.3);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.fb-site-join:hover {
  background: rgb(var(--rb-violet-600-rgb) / 0.5);
}
@media (max-width: 400px) {
  .fb-site-signin {
    display: none;
  }
}
/* The smallest phones: the logo alone, so the button fits beside it. */
@media (max-width: 359px) {
  .fb-site-bar:has(.fb-site-join) .fb-site-name {
    display: none;
  }
}

@media (min-width: 820px) {
  /* One row, whatever the account holds: a long name or plan shortens with
     "…" instead of dropping the account to a second row, which would push
     the page down as the account fills in (layout shift). */
  .fb-site-bar {
    flex-wrap: nowrap;
  }
  .fb-site-brand,
  .fb-site-nav {
    flex-shrink: 0;
  }
  .fb-site-account .fb-site-plan {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0.2;
  }
  .fb-site-nav {
    order: 0;
    width: auto;
    margin: 0 auto;
  }
  /* Six items and the way in keep to one row. */
  .fb-site-nav a {
    flex: none;
    padding: 8px 11px;
  }
  .fb-site-cta {
    display: inline-flex;
    margin-left: 0;
  }
  .fb-site-account {
    margin-left: 0;
  }
}
/* Tablets: with the account or the way in showing, the header keeps to one
   row without "More from Rabbit Labs" (the footer links there too). */
@media (min-width: 820px) and (max-width: 1119px) {
  .fb-site-account:not([hidden]) ~ .fb-site-cta {
    display: none;
  }
}
@media (min-width: 820px) and (max-width: 899px) {
  .fb-site-nav a {
    padding: 8px 8px;
  }
}
/* Signed in, the account (plan, name, Sign out) takes the room "More from
   Rabbit Labs" had; the footer links there too. */
@media (min-width: 820px) {
  .fb-site-account:has(button) ~ .fb-site-cta {
    display: none;
  }
}
@media (min-width: 820px) and (max-width: 1119px) {
  .fb-site-account-email {
    display: none;
  }
}
@media (min-width: 820px) and (max-width: 1049px) {
  .fb-site-account .fb-site-plan {
    display: none;
  }
}
/* Narrow tablets: "Create free account" alone (the panel has a Sign in tab). */
@media (min-width: 820px) and (max-width: 979px) {
  .fb-site-signin {
    display: none;
  }
}

/* Breadcrumbs above a page's title. */
.fb-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 var(--fb-space-3);
  padding: 0;
  list-style: none;
  color: var(--rb-web-text-muted);
  font-size: 13px;
}
.fb-crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.6;
}
.fb-crumbs a {
  color: inherit;
}
.fb-crumbs a:hover {
  color: var(--rb-web-text);
}

/* Hero and sections --------------------------------------------------------- */
.fb-hero {
  padding: var(--fb-space-7) 0 var(--fb-space-5);
  text-align: center;
}
.fb-hero--compact {
  padding-bottom: var(--fb-space-4);
  text-align: left;
  max-width: 760px;
}
.fb-hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
  color: #fff;
}
.fb-lead {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--rb-web-text-muted);
  font-size: 18px;
}
.fb-hero--compact .fb-lead {
  margin-left: 0;
}
.fb-hero .fb-btn {
  margin-top: var(--fb-space-5);
}

.fb-kicker {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: var(--rb-radius-pill);
  background: rgb(var(--rb-ground-600-rgb) / 0.6);
  color: var(--rb-web-accent);
  font-family: var(--rb-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fb-section {
  max-width: 900px;
  margin: var(--fb-space-8) auto 0;
}
.fb-section > h2 {
  margin-bottom: var(--fb-space-4);
  color: #fff;
  font-size: clamp(24px, 3.4vw, 32px);
}

.fb-features {
  display: grid;
  gap: var(--fb-space-4);
}
@media (min-width: 760px) {
  .fb-features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.fb-features > div {
  padding: var(--fb-space-5);
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-web-surface-1);
}
.fb-features h2 {
  margin-bottom: 8px;
  color: #fff;
  font-size: 19px;
}
.fb-features p {
  color: var(--rb-web-text-muted);
  font-size: 15px;
}

.fb-howto ol {
  display: grid;
  gap: var(--fb-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 760px) {
  .fb-howto ol {
    grid-template-columns: repeat(3, 1fr);
  }
}
.fb-howto li {
  position: relative;
  padding: var(--fb-space-5) var(--fb-space-5) var(--fb-space-5) 64px;
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-web-surface-1);
  color: var(--rb-web-text-muted);
  font-size: 15px;
  counter-increment: step;
}
.fb-howto li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rb-gradient-mark);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.fb-tool-grid {
  display: grid;
  gap: var(--fb-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) {
  .fb-tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .fb-tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.fb-tool-grid a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-web-surface-1);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.fb-tool-grid a:hover {
  border-color: var(--rb-web-line-strong);
  background: var(--rb-web-surface-2);
}
.fb-tool-grid-name {
  color: #fff;
  font-weight: 600;
}
.fb-tool-grid-lead {
  color: var(--rb-web-text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.fb-faq details {
  border-bottom: 1px solid var(--rb-web-line);
}
.fb-faq summary {
  padding: 18px 32px 18px 0;
  position: relative;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.fb-faq summary::-webkit-details-marker {
  display: none;
}
.fb-faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  color: var(--rb-web-accent);
  font-size: 24px;
  font-weight: 400;
}
.fb-faq details[open] summary::after {
  content: "–";
}
.fb-faq details p {
  padding: 0 0 18px;
  color: var(--rb-web-text-muted);
}

.fb-noscript {
  padding: var(--fb-space-5);
  text-align: center;
}

/* A tool page's own words (server/src/content/) ------------------------------ */
/* The introduction under the lead: the lead's width, a step quieter. */
.fb-intro {
  max-width: 640px;
  margin: 12px auto 0;
  color: var(--rb-web-text-muted);
  font-size: 16px;
}
.fb-intro p + p {
  margin-top: 10px;
}

/* The sections after the how-to: each heading beside its text on a wide
   screen, above it on a phone, with a rule between them like the questions. */
.fb-about-part {
  display: grid;
  gap: var(--fb-space-2) var(--fb-space-6);
  padding: var(--fb-space-5) 0;
  border-top: 1px solid var(--rb-web-line);
}
.fb-about-part:last-child {
  border-bottom: 1px solid var(--rb-web-line);
}
@media (min-width: 760px) {
  .fb-about-part {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}
.fb-about-part h2 {
  color: #fff;
  font-size: 20px;
}
.fb-about-text {
  color: var(--rb-web-text-muted);
  overflow-wrap: break-word;
}
.fb-about-text p + p {
  margin-top: var(--fb-space-3);
}

/* Site footer ----------------------------------------------------------------- */
.fb-site-footer {
  border-top: 1px solid var(--rb-web-line);
  background: rgb(var(--rb-ground-700-rgb) / 0.92);
}
/* The about text, then a column per group of tools (directory.js) and Rabbit
   Labs: two columns on a phone, all six in a row on a wide screen. */
.fb-site-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fb-space-6) var(--fb-space-4);
  max-width: var(--fb-width);
  margin: 0 auto;
  padding: var(--fb-space-7) var(--fb-gutter);
}
.fb-site-footer-about {
  grid-column: 1 / -1;
}
@media (min-width: 640px) {
  .fb-site-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .fb-site-footer-grid {
    grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr));
    gap: var(--fb-space-6) var(--fb-space-5);
  }
  .fb-site-footer-about {
    grid-column: auto;
  }
}
.fb-site-footer-name {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.fb-site-footer-about p + p {
  margin-top: 8px;
}
.fb-site-footer-about p:not(.fb-site-footer-name) {
  max-width: 360px;
  color: var(--rb-web-text-muted);
  font-size: 14px;
}
.fb-site-footer h2 {
  margin-bottom: 14px;
  color: var(--rb-web-accent);
  font-family: var(--rb-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.fb-site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fb-site-footer a {
  color: var(--rb-web-text-muted);
  font-size: 14px;
  text-decoration: none;
}
.fb-site-footer a:hover {
  color: #fff;
}
.fb-site-footer-legal {
  max-width: var(--fb-width);
  margin: 0 auto;
  padding: var(--fb-space-4) var(--fb-gutter) var(--fb-space-6);
  border-top: 1px solid var(--rb-web-line);
  color: var(--rb-web-text-muted);
  font-size: 13px;
}

/* ============================================================================
 * The product: light cards
 * ========================================================================== */
.fb-tool,
.fb-card,
.fb-dialog,
.fb-history-item,
.fb-empty,
.fb-panel-area > .fb-banner {
  color: var(--rb-ui-ink);
  font-family: var(--rb-font-ui);
  font-size: var(--fb-text-md);
  letter-spacing: normal;
  line-height: 1.5;
}

.fb-tool {
  max-width: var(--fb-tool-width);
  margin: 0 auto;
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid rgb(var(--rb-violet-300-rgb) / 0.35);
  border-radius: 28px;
  background: var(--rb-ui-surface);
  box-shadow: 0 30px 80px rgb(var(--rb-ground-950-rgb) / 0.55), 0 0 60px var(--rb-web-glow);
}

.fb-tool a,
.fb-card a,
.fb-dialog a,
.fb-history-item a:not(.fb-btn),
.fb-empty a:not(.fb-btn) {
  color: var(--rb-ui-accent);
}

.fb-tool h2,
.fb-tool h3,
.fb-card h2,
.fb-card h3,
.fb-dialog h2,
.fb-dialog h3 {
  color: var(--rb-ui-accent-strong);
  font-family: var(--rb-font-ui);
}
.fb-card h2 {
  font-size: 20px;
}
.fb-dialog h3 {
  font-size: 16px;
}

.fb-panel-area {
  display: grid;
  gap: var(--fb-space-4);
  max-width: 900px;
}
.fb-panel-area > .fb-muted {
  color: var(--rb-web-text-muted);
}

.fb-card,
.fb-history-item,
.fb-empty {
  padding: var(--fb-space-5);
  border: 1px solid var(--rb-ui-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-ui-surface);
  box-shadow: var(--rb-ui-shadow);
}
.fb-empty {
  display: grid;
  gap: var(--fb-space-4);
  justify-items: start;
}

.fb-panel {
  padding: var(--fb-space-4);
  border: 1px solid var(--rb-ui-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-ui-canvas);
}

/* Utilities */
.fb-stack {
  display: flex;
  flex-direction: column;
  gap: var(--fb-space-3);
}
.fb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fb-space-2) var(--fb-space-3);
}
.fb-row--nowrap {
  flex-wrap: nowrap;
}
.fb-spacer {
  flex: 1;
}
.fb-muted {
  color: var(--rb-ui-muted);
}
.fb-small {
  font-size: var(--fb-text-sm);
}
.fb-mono {
  font-family: var(--rb-font-mono);
  font-size: var(--fb-text-sm);
}
.fb-hint {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-sm);
}
.fb-indent {
  padding-left: var(--fb-space-4);
  border-left: 2px solid var(--rb-ui-line);
}
.fb-icon {
  display: inline-flex;
}
.fb-icon svg {
  display: block;
}

/* Buttons ----------------------------------------------------------------- */
.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--rb-radius-pill);
  background: var(--rb-ui-accent-soft);
  color: var(--rb-ui-accent-strong);
  font: 600 15px/1 var(--rb-font-ui);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.fb-btn:hover {
  background: var(--rb-violet-200);
}
.fb-btn:active {
  transform: translateY(1px);
}
.fb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.fb-btn--primary {
  background: var(--rb-violet-600);
  color: #fff;
  box-shadow: 0 8px 22px rgb(var(--rb-violet-600-rgb) / 0.28);
}
.fb-btn--primary:hover {
  background: var(--rb-violet-700);
}
.fb-site .fb-hero .fb-btn--primary,
a.fb-btn--primary,
.fb-tool a.fb-btn--primary,
.fb-card a.fb-btn--primary,
.fb-history-item a.fb-btn--primary,
.fb-empty a.fb-btn--primary {
  color: #fff;
}
.fb-btn--secondary {
  border-color: var(--rb-ui-line);
  background: var(--rb-ui-surface);
  color: var(--rb-ui-accent-strong);
}
.fb-btn--secondary:hover {
  border-color: var(--rb-violet-300);
  background: var(--rb-violet-50);
}
.fb-btn--ghost {
  background: transparent;
  color: var(--rb-ui-accent);
}
.fb-btn--ghost:hover {
  background: var(--rb-ui-accent-soft);
}
.fb-btn--danger {
  background: transparent;
  border-color: var(--rb-ui-line);
  color: var(--fb-danger);
}
.fb-btn--danger:hover {
  background: var(--fb-danger-soft);
}
.fb-btn--small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
}
.fb-btn--lg {
  min-height: 52px;
  padding: 0 28px;
  font-size: 17px;
}
.fb-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--rb-ui-accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.fb-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--rb-ui-muted);
  cursor: pointer;
}
.fb-icon-btn:hover {
  background: var(--rb-ui-surface-muted);
  color: var(--rb-ui-accent-strong);
}

/* "Choose files" with its menu (device, Google Drive, link) */
.fb-choose {
  display: inline-flex;
  position: relative;
}
.fb-choose > .fb-btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.fb-btn--split {
  min-width: 46px;
  padding: 0 12px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 1px solid rgb(255 255 255 / 0.25);
  list-style: none;
}
.fb-btn--secondary.fb-btn--split {
  border-left: 0;
}
.fb-choose--small .fb-btn--split {
  min-height: 42px;
}
.fb-btn--split::-webkit-details-marker {
  display: none;
}
.fb-menu {
  position: relative;
  display: flex;
}
.fb-menu > summary {
  cursor: pointer;
}
.fb-choose .fb-btn--lg + .fb-menu > summary {
  min-height: 52px;
}
.fb-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--rb-ui-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-ui-surface);
  box-shadow: 0 18px 40px rgb(var(--rb-shadow-rgb) / 0.18);
}
.fb-menu-list button {
  padding: 10px 12px;
  border: 0;
  border-radius: var(--rb-radius-sm);
  background: none;
  color: var(--rb-ui-ink);
  font: 500 15px/1.2 var(--rb-font-ui);
  text-align: left;
  cursor: pointer;
}
.fb-menu-list button:hover,
.fb-menu-list button:focus-visible {
  background: var(--rb-ui-accent-soft);
  color: var(--rb-ui-accent-strong);
}

/* The drop box ------------------------------------------------------------- */
.fb-drop {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(28px, 6vw, 56px) 16px;
  border: 2px dashed rgb(var(--rb-violet-500-rgb) / 0.35);
  border-radius: 22px;
  background: var(--fb-drop-bg);
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.fb-drop[data-active="true"],
.fb-queue[data-active="true"] {
  background: var(--fb-drop-active);
  border-color: var(--rb-violet-500);
}
.fb-drop-art {
  color: var(--rb-violet-500);
}
.fb-drop-text {
  color: var(--rb-ui-ink);
}
.fb-drop-note {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-sm);
}
.fb-converter[data-state="files"] .fb-drop {
  padding: 20px 16px;
  margin-bottom: var(--fb-space-4);
}
.fb-converter[data-state="files"] .fb-drop-art {
  display: none;
}

.fb-url {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(100%, 560px);
}
.fb-url .fb-input {
  flex: 1 1 260px;
}

.fb-legal {
  margin-top: var(--fb-space-4);
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-xs);
  text-align: center;
}

/* The queue ----------------------------------------------------------------- */
.fb-queue {
  display: grid;
  gap: var(--fb-space-4);
  border-radius: 18px;
}
.fb-queue-head,
.fb-queue-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fb-space-3);
}
.fb-count {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-sm);
  font-variant-numeric: tabular-nums;
}
.fb-batch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-sm);
}
.fb-estimate {
  color: var(--rb-ui-accent-strong);
  font-size: var(--fb-text-sm);
  font-weight: 600;
}
.fb-convert {
  min-width: 180px;
}
@media (max-width: 560px) {
  .fb-queue-foot > .fb-convert {
    width: 100%;
  }
}
.fb-form-error {
  display: grid;
}

/* File rows (queue and results) */
.fb-rows,
.fb-files {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fb-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--rb-ui-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-ui-surface);
}
.fb-file[data-state="failed"] {
  border-color: rgb(194 52 77 / 0.35);
  background: var(--fb-danger-soft);
}
.fb-file-kind {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--rb-ui-accent-soft);
  color: var(--rb-ui-accent-strong);
  font: 700 11px/1 var(--rb-font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fb-file-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.fb-file-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-file-meta {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-sm);
  font-variant-numeric: tabular-nums;
}
.fb-file-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
@media (min-width: 640px) {
  .fb-file {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .fb-file-actions {
    grid-column: auto;
    flex-wrap: nowrap;
  }
}
.fb-to {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-sm);
}
.fb-file-error {
  color: var(--fb-danger);
  font-size: var(--fb-text-sm);
}
.fb-note {
  color: var(--rb-ui-ink);
  font-size: var(--fb-text-sm);
}
.fb-note--quiet {
  color: var(--rb-ui-muted);
}

/* Fields -------------------------------------------------------------------- */
.fb-field {
  display: grid;
  gap: 6px;
}
.fb-field > label,
.fb-label {
  font-size: var(--fb-text-sm);
  font-weight: 600;
}
.fb-field-row {
  display: grid;
  gap: var(--fb-space-3);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.fb-input,
.fb-select {
  min-height: 40px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--rb-ui-line);
  border-radius: 10px;
  background: var(--rb-ui-surface);
  color: var(--rb-ui-ink);
  font: 15px/1.2 var(--rb-font-ui);
}
.fb-select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237448d8' stroke-width='2' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.fb-select--inline {
  width: auto;
  min-width: 128px;
  max-width: 220px;
}
.fb-select--unit {
  width: auto;
}
.fb-input--short {
  width: 110px;
}
.fb-input:hover,
.fb-select:hover {
  border-color: var(--rb-violet-300);
}
.fb-input:focus-visible,
.fb-select:focus-visible,
.fb-btn:focus-visible,
.fb-icon-btn:focus-visible,
.fb-link:focus-visible,
.fb-menu-list button:focus-visible,
.fb-tool summary:focus-visible {
  outline: none;
  box-shadow: var(--fb-focus);
}
.fb-range {
  width: 100%;
  accent-color: var(--rb-violet-600);
}
.fb-color {
  width: 44px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--rb-ui-line);
  border-radius: 8px;
  background: var(--rb-ui-surface);
}

/* Segmented control: a radio group as joined buttons */
.fb-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: var(--rb-radius-md);
  background: var(--rb-ui-surface-muted);
  min-width: 0;
}
.fb-segmented legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.fb-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fb-segmented label {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--rb-ui-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.fb-segmented input:checked + label {
  background: var(--rb-ui-surface);
  color: var(--rb-ui-accent-strong);
  box-shadow: 0 1px 3px rgb(var(--rb-shadow-rgb) / 0.12);
}
.fb-segmented input:focus-visible + label {
  box-shadow: var(--fb-focus);
}
/* A choice that has to wait, like a fourth language to read in */
.fb-segmented input:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toggle: a checkbox as a switch */
.fb-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fb-text-md);
  cursor: pointer;
}
.fb-toggle input {
  appearance: none;
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  margin: 0;
  border-radius: 12px;
  background: var(--rb-ui-line);
  cursor: pointer;
  transition: background 0.15s;
}
.fb-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
  transition: transform 0.15s;
}
.fb-toggle input:checked {
  background: var(--rb-violet-600);
}
.fb-toggle input:checked::after {
  transform: translateX(16px);
}
.fb-toggle input:focus-visible {
  outline: none;
  box-shadow: var(--fb-focus);
}

.fb-check {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

/* The compressor's and resizer's control, up front */
.fb-mode-panel {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 16px;
  border-radius: var(--rb-radius-md);
  background: var(--rb-violet-50);
}

/* Fit preview (contain / cover / stretch) */
.fb-fit-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.fb-fit-option {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--rb-ui-line);
  border-radius: 12px;
  font-size: var(--fb-text-sm);
  cursor: pointer;
}
.fb-fit-option:has(input:checked) {
  border-color: var(--rb-violet-500);
  background: var(--rb-ui-accent-soft);
}
.fb-fit-option input {
  position: absolute;
  opacity: 0;
}
.fb-fit-frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--rb-violet-400);
  border-radius: 4px;
  background: var(--rb-ui-surface-muted);
}
.fb-fit-frame i {
  display: block;
  background: var(--rb-gradient-mark);
}

/* Progress ------------------------------------------------------------------ */
.fb-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--rb-ui-surface-muted);
}
.fb-progress > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--rb-gradient-mark);
  transition: width 0.3s;
}
.fb-progress--busy > span {
  width: 30%;
  animation: fb-busy 1.2s ease-in-out infinite;
}
@keyframes fb-busy {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(330%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fb-progress--busy > span {
    animation: none;
    width: 100%;
    opacity: 0.4;
  }
  .fb-progress > span,
  .fb-btn,
  .fb-toggle input,
  .fb-toggle input::after {
    transition: none;
  }
}

/* Badges, banners, notes ------------------------------------------------------ */
.fb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--rb-radius-pill);
  background: var(--rb-ui-accent-soft);
  color: var(--rb-ui-accent-strong);
  font-size: var(--fb-text-xs);
  font-weight: 700;
  white-space: nowrap;
}
.fb-badge--error {
  background: var(--fb-danger-soft);
  color: var(--fb-danger);
}
.fb-badge--muted {
  background: var(--rb-ui-surface-muted);
  color: var(--rb-ui-muted);
}
/* "Converted on your device. It never leaves it.": a sentence, so it wraps on a phone. */
.fb-badge--device {
  white-space: normal;
  border-radius: var(--rb-radius-sm);
}

.fb-banner {
  padding: 12px 16px;
  border-radius: var(--rb-radius-md);
  background: var(--rb-ui-accent-soft);
  color: var(--rb-ui-ink);
  font-family: var(--rb-font-ui);
  font-size: 14px;
}
.fb-banner strong {
  color: var(--rb-ui-accent-strong);
}
.fb-banner--error {
  background: var(--fb-danger-soft);
  border: 1px solid rgb(194 52 77 / 0.25);
}
.fb-banner--error strong {
  color: var(--fb-danger);
}
.fb-banner ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.fb-health-banner {
  max-width: var(--fb-tool-width);
  margin: 0 auto var(--fb-space-4);
}

.fb-disclosure summary {
  color: var(--rb-ui-accent);
  font-size: var(--fb-text-sm);
  font-weight: 600;
  cursor: pointer;
}
.fb-disclosure[open] summary {
  margin-bottom: 8px;
}
.fb-entries {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fb-text-sm);
}

/* Results --------------------------------------------------------------------- */
.fb-results {
  display: grid;
  gap: var(--fb-space-4);
}
.fb-results:not(:empty) {
  margin-top: var(--fb-space-5);
}
.fb-job {
  display: grid;
  gap: var(--fb-space-3);
  padding: var(--fb-space-4);
  border: 1px solid var(--rb-ui-line);
  border-radius: 18px;
  background: var(--rb-ui-canvas);
}
.fb-job--compact {
  padding: 0;
  border: 0;
  background: none;
}
.fb-job-title {
  color: var(--rb-ui-accent-strong);
  font: 700 17px/1.3 var(--rb-font-ui);
}
.fb-choice {
  padding: 8px 10px;
  border-radius: var(--rb-radius-sm);
  background: var(--rb-violet-50);
}
.fb-output-list {
  margin: 0;
  padding-left: 18px;
  font-size: var(--fb-text-sm);
}
.fb-details {
  font-size: var(--fb-text-sm);
}
.fb-stack-tight {
  display: grid;
  gap: 2px;
}

.fb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fb-stat {
  padding: 10px 12px;
  border-radius: var(--rb-radius-sm);
  background: var(--rb-ui-surface);
  text-align: center;
}
.fb-stat-value {
  color: var(--rb-ui-accent-strong);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fb-stat-label {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-xs);
}

/* History ------------------------------------------------------------------------ */
.fb-history-item {
  display: grid;
  gap: var(--fb-space-3);
}
.fb-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 16px;
}
.fb-history-when {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-sm);
}
.fb-history-what {
  font-weight: 600;
}
/* Converted on the device: formats, sizes and times, and nothing to download. */
.fb-device-files {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  font-size: var(--fb-text-sm);
}

/* Trimming audio and video (web/trim/timeline.js) ------------------------------------- */
.fb-trim {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  /* Out under the file's badge (46 px and the gap after it), for the width. */
  margin-left: -60px;
  padding: 12px;
  border-radius: var(--rb-radius-md);
  background: var(--rb-violet-50);
}
/* With its timeline open, a row keeps its buttons underneath, as on a phone. */
.fb-file:has(> .fb-file-body > .fb-trim:not([hidden])) {
  align-items: start;
}
@media (min-width: 640px) {
  .fb-file:has(> .fb-file-body > .fb-trim:not([hidden])) {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .fb-file:has(> .fb-file-body > .fb-trim:not([hidden])) > .fb-file-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
}
.fb-trim-controls {
  display: grid;
  gap: 10px;
}
.fb-trim-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  border-radius: var(--rb-radius-sm);
  background: #000;
}
/* The strip: frames, a waveform, or a plain bar with a tick every tenth. */
.fb-trim-track {
  position: relative;
  height: 56px;
  margin: 6px 12px;
  border: 1px solid var(--rb-ui-line);
  border-radius: var(--rb-radius-sm);
  background: var(--rb-ui-surface);
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
}
.fb-trim-track[data-strip="plain"] {
  background: repeating-linear-gradient(90deg, var(--rb-ui-surface) 0 calc(10% - 1px), var(--rb-ui-line) calc(10% - 1px) 10%);
}
.fb-trim-strip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: var(--rb-violet-500);
}
/* What's cut is dimmed; what's kept is outlined. */
.fb-trim-shade {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: rgb(var(--rb-ground-950-rgb) / 0.55);
  pointer-events: none;
}
.fb-trim-shade--before {
  border-radius: var(--rb-radius-sm) 0 0 var(--rb-radius-sm);
}
.fb-trim-shade--after {
  border-radius: 0 var(--rb-radius-sm) var(--rb-radius-sm) 0;
}
.fb-trim-range {
  position: absolute;
  top: -3px;
  bottom: -3px;
  border-top: 3px solid var(--rb-violet-600);
  border-bottom: 3px solid var(--rb-violet-600);
  pointer-events: none;
}
.fb-trim-playhead {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(var(--rb-ground-950-rgb) / 0.6);
  pointer-events: none;
}
/* 24 px wide to grab (WCAG 2.2 target size), with a narrower grip drawn inside. */
.fb-trim-handle {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 24px;
  margin-left: -12px;
  cursor: ew-resize;
  touch-action: none;
}
.fb-trim-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 12px;
  border-radius: 6px;
  background: var(--rb-violet-600);
  box-shadow: 0 1px 4px rgb(var(--rb-ground-950-rgb) / 0.35);
}
.fb-trim-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 11px;
  width: 2px;
  height: 18px;
  margin-top: -9px;
  border-radius: 1px;
  background: #fff;
}
.fb-trim-handle:focus-visible {
  outline: none;
}
.fb-trim-handle:focus-visible::before {
  box-shadow: var(--fb-focus);
}
.fb-trim-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.fb-trim-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fb-text-sm);
  font-weight: 600;
}
.fb-input--time {
  width: 96px;
  min-height: 36px;
  font-variant-numeric: tabular-nums;
}
.fb-trim-length {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-sm);
  font-variant-numeric: tabular-nums;
}

/* Send to phone (web/handoff/qr.js) ------------------------------------------------------ */
.fb-handoff {
  width: min(440px, calc(100vw - 24px));
}
.fb-handoff-body {
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.fb-handoff-name {
  max-width: 100%;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Black on white whatever the page's colours: that's what cameras read. */
.fb-handoff-code {
  width: min(260px, 70vw);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--rb-ui-line);
}
.fb-handoff-code[data-expired="true"] {
  background: var(--rb-ui-surface-muted);
}
.fb-handoff-code svg {
  display: block;
  width: 100%;
  height: 100%;
}
.fb-handoff-copy {
  display: flex;
  gap: 8px;
  width: 100%;
}
.fb-handoff-link {
  flex: 1;
  min-width: 0;
  font-size: var(--fb-text-sm);
}

/* Add from phone: the computer's dialog (web/phone/link.js) and the phone's pages (/p) ---- */
.fb-phone-status {
  font-weight: 600;
}
.fb-phone-typed {
  display: grid;
  gap: 4px;
}
.fb-phone-code {
  color: var(--rb-ui-ink);
  font-family: var(--rb-font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.fb-phone-files {
  display: grid;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.fb-phone-files li,
.fb-phone-list li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--rb-ui-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-ui-surface);
}
.fb-phone-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-phone-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fb-space-2) var(--fb-space-3);
  margin-bottom: var(--fb-space-4);
}
.fb-phone-bar > p {
  flex: 1 1 240px;
}
/* White, so Disconnect reads as clearly on the banner as anywhere else. */
.fb-phone-bar .fb-btn--danger {
  background: var(--rb-ui-surface);
}
.fb-phone-bar .fb-btn--danger:hover {
  background: linear-gradient(var(--fb-danger-soft), var(--fb-danger-soft)), var(--rb-ui-surface);
}
/* The phone's own pages: one column, big targets. */
.fb-phone main {
  max-width: 560px;
}
.fb-phone .fb-hero {
  padding-top: var(--fb-space-5);
}
.fb-phone .fb-hero h1 {
  font-size: clamp(28px, 8vw, 40px);
}
.fb-phone-account {
  color: #fff;
  overflow-wrap: anywhere;
}
.fb-phone-card {
  display: grid;
  gap: var(--fb-space-4);
}
.fb-phone-wide {
  width: 100%;
  min-height: 56px;
  white-space: normal;
}
.fb-phone-code-input {
  min-height: 56px;
  font-family: var(--rb-font-mono);
  font-size: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fb-phone-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fb-phone-foot {
  padding: var(--fb-space-5) var(--fb-gutter) var(--fb-space-7);
  color: var(--rb-web-text-muted);
  font-size: 14px;
  text-align: center;
}
.fb-phone-foot a {
  color: var(--rb-web-text-muted);
}

/* Tables and facts (Status) ----------------------------------------------------------- */
.fb-table-wrap {
  overflow-x: auto;
}
.fb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.fb-table th,
.fb-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rb-ui-line);
  text-align: left;
  vertical-align: top;
}
.fb-table th {
  color: var(--rb-ui-muted);
  font-size: var(--fb-text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fb-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--rb-ui-success);
  vertical-align: 1px;
}
.fb-status-dot[data-state="degraded"] {
  background: var(--rb-violet-400);
}
.fb-status-dot[data-state="down"] {
  background: var(--fb-danger);
}
.fb-facts {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  gap: 8px 20px;
  margin: 0;
}
.fb-facts dt {
  color: var(--rb-ui-muted);
}
.fb-facts dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
  .fb-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .fb-facts dd {
    margin-bottom: 10px;
  }
}

/* The settings dialog ----------------------------------------------------------------- */
.fb-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: min(88vh, 860px);
  padding: 0;
  border: 1px solid var(--rb-ui-line);
  border-radius: 22px;
  background: var(--rb-ui-surface);
  box-shadow: 0 40px 100px rgb(var(--rb-ground-950-rgb) / 0.6);
}
.fb-dialog::backdrop {
  background: rgb(var(--rb-ground-950-rgb) / 0.66);
  backdrop-filter: blur(4px);
}
.fb-settings {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}
.fb-dialog-head,
.fb-dialog-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
}
.fb-dialog-head {
  border-bottom: 1px solid var(--rb-ui-line);
}
.fb-dialog-head h2 {
  flex: 1;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-dialog-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--rb-ui-line);
}
.fb-dialog-body {
  display: grid;
  gap: 22px;
  padding: 20px;
  overflow-y: auto;
}
.fb-set {
  padding-top: 18px;
  border-top: 1px solid var(--rb-ui-line);
}

/* Signing in ---------------------------------------------------------------
 * Google sign-in, or an email account. These are the door to the product,
 * so they use the site's dark look rather than the light card, and the
 * converter's card steps back while they show (.fb-tool--gate). */
.fb-tool.fb-tool--gate {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

/* Room for what the script puts in the tool area, kept only until it's
 * there, so the words below don't jump when it arrives (layout shift). The
 * server draws the section as the sign-in panel (.fb-tool--gate) when that's
 * what the visitor will see. Each height is a little under the empty tool's
 * or the panel's, so nothing is left blank; test/browser/cls.test.js checks
 * the shift stays small. */
.fb-tool-mount:not(:has(> :not(noscript))) {
  min-height: 328px;
}
.fb-tool-mount[data-mount="pdf"]:not(:has(> :not(noscript))) {
  min-height: 408px;
}
.fb-tool--gate > .fb-tool-mount:not(:has(> :not(noscript))) {
  min-height: 728px;
}
@media (min-width: 900px) {
  .fb-tool--gate > .fb-tool-mount:not(:has(> :not(noscript))) {
    min-height: 800px;
  }
}
.fb-gate {
  display: grid;
  gap: var(--fb-space-4);
  justify-items: start;
  max-width: 36rem;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--rb-web-line-strong);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--rb-violet-500-rgb) / 0.2), transparent 60%),
    linear-gradient(160deg, var(--rb-ground-600), var(--rb-ground-800));
  box-shadow: 0 30px 80px rgb(var(--rb-ground-950-rgb) / 0.55), 0 0 60px var(--rb-web-glow);
  color: var(--rb-web-text-muted);
  font-family: var(--rb-font-ui);
  font-size: var(--fb-text-md);
  line-height: 1.55;
}
.fb-tool .fb-gate {
  margin: 0 auto;
}
.fb-gate h2 {
  margin: 0;
  color: #fff;
  font-family: var(--rb-font-display);
  font-size: clamp(24px, 3.4vw, 30px);
  letter-spacing: var(--rb-tracking-tight);
  line-height: 1.15;
}
.fb-gate p {
  margin: 0;
}
.fb-gate strong {
  color: var(--rb-web-text);
}
.fb-gate a:not(.fb-google-btn),
.fb-gate .fb-link {
  color: var(--rb-web-accent);
}
.fb-gate .fb-hint {
  color: var(--rb-web-text-muted);
  font-size: var(--fb-text-sm);
}
.fb-gate .fb-field,
.fb-gate form {
  width: 100%;
}
.fb-gate .fb-field > label {
  color: var(--rb-web-text);
}
.fb-gate .fb-input {
  border-color: var(--rb-web-line-strong);
  background: rgb(var(--rb-ground-950-rgb) / 0.55);
  color: var(--rb-web-text);
}
.fb-gate .fb-input:hover {
  border-color: var(--rb-violet-400);
}
.fb-gate .fb-banner {
  width: 100%;
  color: var(--rb-web-text);
}
.fb-gate .fb-banner--error {
  border-color: rgb(243 163 179 / 0.35);
  background: rgb(194 52 77 / 0.16);
}
.fb-gate .fb-banner--error strong {
  color: var(--rb-red-300);
}

/* Google's own button in its dark theme, as its branding guidelines set it:
 * #131314 fill, a 1px #8e918f outline, #e3e3e3 text, and the standard G
 * unchanged, with 10px between the G and the words. */
.fb-gate .fb-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 14px;
  border: 1px solid #8e918f;
  border-radius: var(--rb-radius-pill);
  background: #131314;
  color: #e3e3e3;
  font: 500 14px/20px "Google Sans", Roboto, Arial, sans-serif;
  letter-spacing: 0.25px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.fb-gate .fb-google-btn:hover {
  background: #2b2b2c;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 0 24px var(--rb-web-glow);
}
.fb-gate .fb-google-btn:active {
  background: #37373a;
}
.fb-gate .fb-google-btn:focus-visible {
  border-radius: var(--rb-radius-pill);
}
.fb-google-btn img {
  display: block;
  width: 20px;
  height: 20px;
}

/* Pricing ------------------------------------------------------------------ */
/* The plans on the site's dark ground. The recommended pass is lifted, lit
 * and labelled; the others stay quiet so it reads as the obvious choice. */
.fb-pricing {
  max-width: var(--fb-width);
  margin: 0 auto;
}
.fb-pricing-notice:not(:empty) {
  max-width: 760px;
  margin: 0 auto var(--fb-space-5);
}
.fb-pricing-notice .fb-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.fb-pricing-notice .fb-btn {
  margin-left: auto;
}
.fb-pricing-gate {
  margin-top: var(--fb-space-6);
}
/* The last step before SumUp: the pass, that it's final, and the box to tick. */
.fb-pricing-gate .fb-buy {
  margin: 0 auto;
}
.fb-buy h2:focus {
  outline: none;
}
.fb-buy-final {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgb(var(--rb-violet-500-rgb) / 0.45);
  border-radius: var(--rb-radius-md);
  background: rgb(var(--rb-violet-500-rgb) / 0.14);
  color: var(--rb-web-text);
}
.fb-buy-agree {
  align-items: flex-start;
  gap: 12px;
  color: var(--rb-web-text);
  cursor: pointer;
}
.fb-buy-agree input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--rb-violet-400);
  cursor: pointer;
}
.fb-buy-agree input:focus-visible {
  outline: none;
  box-shadow: var(--fb-focus);
}
.fb-buy-agree input[aria-invalid="true"] {
  outline: 2px solid var(--rb-red-300);
  outline-offset: 2px;
}
.fb-buy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fb-space-3);
}
.fb-plans {
  display: grid;
  gap: var(--fb-space-4);
  align-items: stretch;
}
@media (min-width: 700px) {
  .fb-plans {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1080px) {
  .fb-plans {
    grid-template-columns: repeat(4, 1fr);
  }
}
.fb-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--fb-space-5);
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-web-surface-1);
  color: var(--rb-web-text-muted);
  font-size: 15px;
}
.fb-plan h2 {
  color: #fff;
  font-size: 22px;
}
.fb-plan--best {
  border-color: var(--rb-violet-400);
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--rb-violet-500-rgb) / 0.32), transparent 55%),
    linear-gradient(165deg, var(--rb-ground-500), var(--rb-ground-700));
  box-shadow: 0 24px 70px rgb(var(--rb-ground-950-rgb) / 0.6), 0 0 0 1px rgb(var(--rb-violet-400-rgb) / 0.35), 0 0 60px var(--rb-web-glow);
}
@media (min-width: 1080px) {
  .fb-plan--best {
    transform: translateY(-10px);
  }
}
.fb-plan-badge {
  align-self: flex-start;
  white-space: nowrap;
  margin: 0 0 2px;
  padding: 4px 12px;
  border-radius: var(--rb-radius-pill);
  background: linear-gradient(135deg, var(--rb-violet-500), var(--rb-violet-700));
  color: #fff;
  font-family: var(--rb-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fb-plan--current::after {
  content: "Your plan";
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 3px 10px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: var(--rb-radius-pill);
  color: var(--rb-web-accent);
  font-size: 12px;
}
.fb-plan-for {
  margin-top: -6px;
  color: var(--rb-web-text-faint);
  font-size: 14px;
}
.fb-plan-price {
  margin-top: 6px;
  color: #fff;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.fb-plan-price span {
  display: block;
  margin-top: 8px;
  color: var(--rb-web-text-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}
.fb-plan-unit {
  color: var(--rb-web-accent);
  font-size: 13px;
  font-weight: 600;
}
.fb-plan ul {
  display: grid;
  gap: 10px;
  flex: 1;
  margin: 10px 0 14px;
  padding: 14px 0 0;
  border-top: 1px solid var(--rb-web-line);
  list-style: none;
}
.fb-plan li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.4;
}
.fb-plan li svg {
  flex: none;
  margin-top: 1px;
  color: var(--rb-violet-300);
}
.fb-plan li strong {
  color: #fff;
  font-weight: 600;
}
.fb-plan li span span {
  display: block;
  color: var(--rb-web-text-faint);
  font-size: 13px;
}
.fb-plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: var(--rb-radius-pill);
  background: rgb(var(--rb-ground-950-rgb) / 0.35);
  color: #fff;
  font: 600 15px/1 var(--rb-font-ui);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.fb-plan-cta:hover {
  border-color: var(--rb-violet-300);
  background: rgb(var(--rb-violet-600-rgb) / 0.2);
}
.fb-plan-cta:active {
  transform: translateY(1px);
}
.fb-plan-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.fb-plan--best .fb-plan-cta {
  border-color: transparent;
  background: var(--rb-violet-600);
  box-shadow: 0 10px 28px rgb(var(--rb-violet-600-rgb) / 0.45);
}
.fb-plan--best .fb-plan-cta:hover {
  background: var(--rb-violet-500);
}
.fb-plans-note {
  margin-top: var(--fb-space-5);
  color: var(--rb-web-text-muted);
  font-size: 14px;
  text-align: center;
}

.fb-section-lead {
  max-width: 680px;
  margin-bottom: var(--fb-space-5);
  color: var(--rb-web-text-muted);
}
.fb-sizes {
  display: grid;
  gap: var(--fb-space-4);
}
@media (min-width: 760px) {
  .fb-sizes {
    grid-template-columns: 1fr 1fr;
  }
}
.fb-size {
  padding: var(--fb-space-5);
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-web-surface-1);
  color: var(--rb-web-text-muted);
}
.fb-size--pass {
  border-color: var(--rb-web-line-strong);
}
.fb-size-label {
  color: var(--rb-web-accent);
  font-family: var(--rb-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.fb-size-value {
  margin: 6px 0 12px;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.fb-size-value span {
  color: var(--rb-web-text-muted);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}
.fb-size-bar {
  height: 10px;
  margin-bottom: 16px;
  border-radius: var(--rb-radius-pill);
  background: rgb(var(--rb-ground-950-rgb) / 0.6);
  overflow: hidden;
}
.fb-size-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rb-violet-600), var(--rb-violet-300));
}
.fb-size ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.fb-compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-web-surface-1);
}
.fb-compare {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  color: var(--rb-web-text-muted);
  font-size: 15px;
}
.fb-compare th,
.fb-compare td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rb-web-line);
  text-align: left;
}
.fb-compare tbody tr:last-child th,
.fb-compare tbody tr:last-child td {
  border-bottom: 0;
}
.fb-compare thead th {
  color: #fff;
  font-size: 16px;
}
.fb-compare thead small {
  display: block;
  color: var(--rb-web-accent);
  font-size: 12px;
  font-weight: 600;
}
.fb-compare tbody th {
  color: var(--rb-web-text);
  font-weight: 500;
}
.fb-compare .fb-compare-best {
  background: rgb(var(--rb-violet-600-rgb) / 0.14);
  color: #fff;
}

/* The home page: shortcuts under the lead, then "Popular tools" and "Why
 * Filebender" under the plans. The shortcuts wrap onto two short rows on a
 * phone, so the plans still start near the top of the screen. */
.fb-shortcuts ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 720px;
  margin: var(--fb-space-5) auto 0;
  padding: 0;
  list-style: none;
}
.fb-shortcuts a {
  display: block;
  padding: 7px 14px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: var(--rb-radius-pill);
  background: var(--rb-web-surface-1);
  color: var(--rb-web-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.fb-shortcuts a:hover {
  border-color: var(--rb-violet-300);
  background: var(--rb-web-surface-2);
}
@media (max-width: 480px) {
  .fb-hero:has(.fb-shortcuts) {
    padding-top: var(--fb-space-6);
  }
  .fb-shortcuts ul {
    gap: 6px;
    margin-top: var(--fb-space-4);
  }
  .fb-shortcuts a {
    padding: 6px 11px;
    font-size: 13px;
  }
}

.fb-directory-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fb-space-5) var(--fb-space-4);
}
@media (min-width: 900px) {
  .fb-directory-groups {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.fb-directory-group h3 {
  margin-bottom: 10px;
  color: var(--rb-web-accent);
  font-family: var(--rb-font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.fb-directory-group p {
  margin: -4px 0 10px;
  color: var(--rb-web-text-muted);
  font-size: 13px;
}
.fb-directory-group ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fb-directory-group a {
  display: block;
  padding: 5px 0;
  color: var(--rb-web-text);
  font-size: 15px;
  text-decoration: none;
}
.fb-directory-group a:hover {
  color: var(--rb-web-accent);
  text-decoration: underline;
}
.fb-directory-all {
  margin-top: var(--fb-space-5);
}
.fb-directory-all a {
  color: var(--rb-web-accent);
  font-weight: 600;
}

.fb-strengths ul {
  display: grid;
  gap: var(--fb-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .fb-strengths ul {
    grid-template-columns: repeat(2, 1fr);
  }
}
.fb-strengths li {
  padding: var(--fb-space-4) var(--fb-space-5);
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-web-surface-1);
}
.fb-strengths h3 {
  margin-bottom: 6px;
  color: #fff;
  font-size: 17px;
}
.fb-strengths p {
  color: var(--rb-web-text-muted);
  font-size: 15px;
}

/* A pointer under a tool's lead to the tool that does the job better. */
.fb-see-also {
  max-width: 640px;
  margin: 10px auto 0;
  color: var(--rb-web-text-muted);
  font-size: 15px;
}
.fb-see-also a {
  color: var(--rb-web-accent);
  font-weight: 600;
}

/* The plan in the header, and "See passes" on a refusal. */
.fb-site-plan {
  padding: 6px 12px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: var(--rb-radius-pill);
  background: rgb(var(--rb-violet-600-rgb) / 0.16);
  color: var(--rb-web-accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.fb-site-plan:hover {
  border-color: var(--rb-violet-300);
}
@media (max-width: 720px) {
  .fb-site-plan {
    display: none;
  }
}
.fb-upgrade {
  font-weight: 600;
  white-space: nowrap;
}
.fb-drop-note a {
  color: var(--rb-ui-accent);
  font-weight: 600;
}

/* Email accounts inside the sign-in panel. */
.fb-gate-or {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: var(--rb-web-text-faint);
  font-size: 13px;
}
.fb-gate-or::before,
.fb-gate-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rb-web-line);
}
.fb-gate-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-pill);
  background: rgb(var(--rb-ground-950-rgb) / 0.4);
}
.fb-gate-tabs button {
  padding: 8px 16px;
  border: 0;
  border-radius: var(--rb-radius-pill);
  background: none;
  color: var(--rb-web-text-muted);
  font: 600 14px/1 var(--rb-font-ui);
  cursor: pointer;
}
.fb-gate-tabs button.is-on {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}
.fb-gate-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.fb-gate-label-row label {
  color: var(--rb-web-text);
  font-size: var(--fb-text-sm);
  font-weight: 600;
}
.fb-gate .fb-gate-show {
  font-size: 13px;
}
.fb-gate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
}
.fb-gate-error:empty {
  display: none;
}
.fb-gate > .fb-stack {
  width: 100%;
}
.fb-gate .fb-toggle {
  color: var(--rb-web-text);
}

/* Help and the policies: the list of sections beside the text ---------------- */
.fb-doc-updated {
  margin-top: 12px;
  color: var(--rb-web-text-muted);
  font-size: 14px;
}
.fb-doc {
  display: grid;
  gap: var(--fb-space-6);
  margin-top: var(--fb-space-4);
}
.fb-doc-toc {
  padding: var(--fb-space-4);
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-web-surface-1);
}
.fb-doc-toc-title {
  margin-bottom: 10px;
  color: var(--rb-web-text-muted);
  font-family: var(--rb-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.fb-doc-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 200px;
  column-gap: var(--fb-space-4);
}
.fb-doc-toc li {
  break-inside: avoid;
}
.fb-doc-toc a {
  display: block;
  padding: 5px 8px;
  border-radius: var(--rb-radius-sm);
  color: var(--rb-web-text-muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.fb-doc-toc a:hover,
.fb-doc-toc a:focus-visible {
  background: rgb(255 255 255 / 0.06);
  color: #fff;
}
@media (min-width: 1000px) {
  .fb-doc {
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
  }
  /* Beside the text, it stays in view while you read. */
  .fb-doc-toc {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .fb-doc-toc ol {
    columns: auto;
  }
}
.fb-doc-body {
  min-width: 0;
  max-width: 780px;
}
.fb-doc-section {
  scroll-margin-top: 96px;
}
.fb-doc-section + .fb-doc-section {
  margin-top: var(--fb-space-6);
  padding-top: var(--fb-space-6);
  border-top: 1px solid var(--rb-web-line);
}
.fb-doc-section h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: clamp(22px, 3vw, 28px);
}
.fb-doc-section p,
.fb-doc-section li,
.fb-doc-contact p {
  color: var(--rb-web-text-muted);
  font-size: 16px;
  line-height: 1.65;
}
.fb-doc-section p + p,
.fb-doc-section p + ul,
.fb-doc-section p + ol,
.fb-doc-section ul + p,
.fb-doc-section ol + p,
.fb-doc-section table + p {
  margin-top: 12px;
}
.fb-doc-section ul,
.fb-doc-section ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
}
.fb-doc-section strong {
  color: var(--rb-web-text);
}
.fb-doc-section a,
.fb-doc-contact a {
  color: var(--rb-web-accent);
}
.fb-doc-section table {
  display: block;
  width: 100%;
  margin: 16px 0 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 14px;
}
.fb-doc-section th,
.fb-doc-section td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rb-web-line);
  color: var(--rb-web-text-muted);
  text-align: left;
  vertical-align: top;
}
.fb-doc-section th {
  color: #fff;
  font-weight: 600;
}
.fb-shot {
  margin: var(--fb-space-5) 0 0;
}
.fb-shot img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-web-surface-1);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.35);
}
.fb-shot figcaption {
  margin-top: 10px;
  color: var(--rb-web-text-muted);
  font-size: 14px;
}
.fb-doc-body > .fb-section {
  max-width: none;
  margin-top: var(--fb-space-7);
}
.fb-doc-contact p {
  max-width: 640px;
}
.fb-doc-intro p + p {
  margin-top: 10px;
}

/* Third-party notices: each licence folded away until it's opened. */
.fb-doc-section h3 {
  margin-top: var(--fb-space-5);
  color: #fff;
  font-size: 18px;
}
.fb-licence {
  margin-top: 12px;
}
.fb-licence summary {
  width: fit-content;
  color: var(--rb-web-accent);
  font-size: 15px;
  cursor: pointer;
}
.fb-licence pre {
  max-height: 24rem;
  margin: 10px 0 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-web-surface-1);
  color: var(--rb-web-text-muted);
  font: 12.5px/1.55 var(--rb-font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.fb-doc-section .fb-licence-parts {
  gap: 14px;
  padding-left: 0;
  list-style: none;
}
.fb-licence-parts li {
  padding: 12px 14px;
  border: 1px solid var(--rb-web-line);
  border-radius: var(--rb-radius-md);
}
.fb-licence-parts li p + p {
  margin-top: 4px;
}

/* Cookie consent (web/analytics.js) ------------------------------------------
 * Asks before Google Analytics loads. Fixed in the bottom corner, in the
 * site's dark look, with Reject and Accept given equal weight. */
.fb-consent {
  position: fixed;
  z-index: 60;
  inset: auto var(--fb-gutter) 16px;
  display: grid;
  gap: var(--fb-space-3);
  max-width: 26rem;
  padding: 20px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: 20px;
  background: linear-gradient(160deg, var(--rb-ground-600), var(--rb-ground-800));
  box-shadow: 0 24px 60px rgb(var(--rb-ground-950-rgb) / 0.6), 0 0 40px var(--rb-web-glow);
  color: var(--rb-web-text-muted);
  font-family: var(--rb-font-ui);
  font-size: var(--fb-text-sm);
  line-height: 1.55;
}
@media (min-width: 640px) {
  .fb-consent {
    inset: auto auto 24px 24px;
  }
}
.fb-consent h2 {
  margin: 0;
  color: #fff;
  font-family: var(--rb-font-display);
  font-size: 17px;
}
.fb-consent p {
  margin: 0;
}
.fb-consent a {
  color: var(--rb-web-accent);
}
.fb-consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fb-consent-button {
  padding: 10px 16px;
  border: 1px solid var(--rb-web-line-strong);
  border-radius: 999px;
  background: rgb(var(--rb-violet-600-rgb) / 0.22);
  color: var(--rb-web-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.fb-consent-button:hover {
  background: rgb(var(--rb-violet-600-rgb) / 0.36);
}
.fb-consent-button:focus-visible,
.fb-site-footer-cookies:focus-visible {
  outline: 2px solid var(--rb-web-accent);
  outline-offset: 2px;
}
.fb-site-footer-cookies {
  margin-left: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.fb-site-footer-cookies:hover {
  color: var(--rb-web-text);
}
.fb-site-footer-cookies[hidden] {
  display: none;
}
