/* 1-Click Filters for Gmail, the room. Pillar-box red, envelope white, the extension's label yellow (#ffcc70).
   Funnel Display and Funnel Sans, because the product is a funnel. The yellow tag is the only ornament. */

@font-face {
  font-family: 'Funnel Display';
  src: url('/assets/worlds/fonts/funnel-display-latin-wght.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'Funnel Sans';
  src: url('/assets/worlds/fonts/funnel-sans-latin-wght.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --red: #d2361e;
  --red-dark: #a92712;
  --slot: #2a0b06;
  --paper: #fffdfb;
  --ink: #2a0b06;
  --ink-2: #77463b;
  --yellow: #ffcc70;
  --yellow-soft: #fff1d2;
  --orange: #ff8f20;
  --blush: #fbeae4;
  --line: #f1dfd8;
  --gutter: clamp(20px, 5vw, 80px);
  --wide: 1320px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --display: 'Funnel Display', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text: 'Funnel Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--red);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.cf-hero :focus-visible, .cf-last :focus-visible, .cf-top :focus-visible, .world-colophon :focus-visible { outline-color: #fff; }
.cf-tray :focus-visible { outline-color: var(--red); }

h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.03em; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 2.7vw, 2.4rem); line-height: 1.08; max-width: 15em; }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); line-height: 1.2; letter-spacing: -0.015em; }
p { max-width: 64ch; text-wrap: pretty; }
.cf-wrap { max-width: var(--wide); margin: 0 auto; }
.cf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Top ---------- */
.cf-top {
  position: absolute; z-index: 5; inset: 0 0 auto 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 12px var(--gutter);
  color: #fff; font-size: 16px; font-weight: 560;
}
.cf-top .world-exit { justify-self: start; }
.cf-top .world-lang { justify-self: end; display: inline-flex; align-items: center; justify-content: flex-end; min-width: 44px; min-height: 44px; font-weight: 600; letter-spacing: 0.02em; }
.cf-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 650; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }
.cf-brand__for { opacity: 0.78; font-weight: 500; }
.cf-mark { width: 26px; height: 26px; flex: none; }
.cf-mark path:first-child { fill: #fff; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.cf-mark circle { fill: var(--yellow); }
.cf-mark path:last-child { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; }

/* ---------- The call to action: a label ---------- */
.cf-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; }
.cf-tag {
  display: inline-flex; text-decoration: none; color: var(--ink); border-radius: 14px;
  transform-origin: 24px 50%;
  transition: transform 320ms var(--ease-out);
}
.cf-tag__body {
  display: inline-flex; align-items: center; min-height: 62px; padding: 0 30px 0 50px;
  background: var(--yellow);
  font-family: var(--display); font-weight: 650; font-size: 20px; letter-spacing: -0.015em; white-space: nowrap;
  border-radius: 0 14px 14px 0;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 50%);
  -webkit-mask: radial-gradient(circle at 26px 50%, transparent 6px, #000 6.6px);
  mask: radial-gradient(circle at 26px 50%, transparent 6px, #000 6.6px);
}
.cf-tag:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .cf-tag:hover { transform: rotate(-4deg); }
}
.cf-source {
  display: inline-flex; align-items: center; min-height: 48px; font-weight: 560; font-size: 18px;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: rgb(255 255 255 / 0.5);
  transition: text-decoration-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .cf-source:hover { text-decoration-color: currentColor; } }

/* ---------- Hero ---------- */
.cf-hero {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center;
  gap: clamp(36px, 5vw, 96px);
  max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto;
  min-height: min(100svh, 860px);
  padding: clamp(96px, 12vh, 128px) var(--gutter) clamp(48px, 7vh, 80px);
  color: #fff;
}
.cf-hero h1 { font-size: clamp(2.5rem, 4.4vw, 4.1rem); line-height: 1; letter-spacing: -0.04em; font-weight: 700; max-width: 9.5em; }
html[lang='fr'] .cf-hero h1 { max-width: 10.6em; }
.cf-lead { margin-top: clamp(22px, 3.2vh, 36px); font-size: clamp(1.1rem, 1.35vw, 1.3rem); line-height: 1.5; max-width: 34em; color: #fff7f3; }
.cf-hero .cf-cta { margin-top: clamp(26px, 4vh, 40px); }
.cf-note { margin-top: 16px; font-size: 15.5px; line-height: 1.45; color: rgb(255 255 255 / 0.82); max-width: 46ch; }

/* ---------- The desk: the inbox, the slot and the label (the signature) ---------- */
.cf-desk { position: relative; width: 100%; max-width: 560px; justify-self: end; }
.cf-tray {
  position: relative; z-index: 1;
  background: var(--paper); color: var(--ink); border-radius: 22px; overflow: hidden;
  box-shadow: 0 2px 4px rgb(70 10 0 / 0.16), 0 42px 80px -34px rgb(60 6 0 / 0.62);
}
.cf-tray__bar { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 10px 14px 10px 22px; }
.cf-tray__name { display: flex; align-items: baseline; gap: 10px; margin-right: auto; font-family: var(--display); font-weight: 650; font-size: 21px; letter-spacing: -0.02em; }
.cf-tray__name b { font-family: var(--text); font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; padding: 2px 9px; border-radius: 99px; background: var(--blush); color: var(--red-dark); letter-spacing: 0; }
.cf-tray__hint { position: relative; font-size: 14px; font-weight: 560; color: var(--red-dark); white-space: nowrap; padding-right: 10px; }
.cf-tray__hint::after { content: ''; position: absolute; right: 0; top: 50%; width: 0; height: 0; margin-top: -5px; border: 5px solid transparent; border-left-color: currentColor; border-right-width: 0; }
.cf-tray__hint[hidden] { display: none; }
.cf-funnel {
  position: relative; overflow: hidden; flex: none;
  display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 14px; padding: 0;
  background: var(--yellow); color: var(--ink); cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.cf-funnel[hidden] { display: none; }
.cf-funnel__icon { position: relative; z-index: 1; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.cf-funnel:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .cf-funnel:hover { background: #fcbf4e; } }
/* The extension's own entrance: a one-second shimmer when the button appears. */
.cf-funnel::after {
  content: ''; position: absolute; inset: 0; width: 200%;
  background: linear-gradient(100deg, transparent 30%, rgb(255 143 32 / 0.95) 50%, transparent 70%);
  transform: translateX(-100%); pointer-events: none;
}
.cf-funnel.is-shimmer::after { animation: cf-shimmer 1000ms cubic-bezier(0.45, 0, 0.55, 1) both; }
@keyframes cf-shimmer { from { transform: translateX(-100%); } to { transform: translateX(50%); } }

.cf-tray__stage { position: relative; }
.cf-row { border-top: 1px solid var(--line); }
.cf-row[hidden] { display: none; }
.cf-row label {
  position: relative; display: grid; grid-template-columns: 22px minmax(0, 9.2em) minmax(0, 1fr); align-items: center; gap: 14px;
  min-height: 56px; padding: 10px 22px; cursor: pointer; font-size: 15.5px; line-height: 1.3;
  transition: background-color 160ms ease;
}
.cf-row input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; left: 22px; top: 50%; transform: translateY(-50%); cursor: pointer; }
.cf-row:has(input:checked) label { background: var(--yellow-soft); }
.cf-row__box {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ink);
  transition: background-color 140ms ease;
}
.cf-row__box svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.6); transition: opacity 140ms ease, transform 200ms var(--ease-out); }
.cf-row input:checked + .cf-row__box, .is-on > .cf-row__box { background: var(--ink); }
.cf-row input:checked + .cf-row__box svg, .is-on > .cf-row__box svg { opacity: 1; transform: none; }
.cf-row input:focus-visible + .cf-row__box { outline: 3px solid var(--red); outline-offset: 2px; }
.cf-row__from { font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-row__subj { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { .cf-row label:hover { background: #fff8ea; } .cf-row:has(input:checked) label:hover { background: var(--yellow-soft); } }

/* The extension's progress window, then Gmail's filter form, both drawn over the list. */
.cf-run, .cf-rule {
  position: absolute; inset: 0; z-index: 2; background: var(--paper); border-top: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 220ms ease, transform 320ms var(--ease-out), visibility 0s linear 320ms;
}
.cf-run { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 24px 34px; }
.cf-run__title { font-family: var(--display); font-weight: 650; font-size: 20px; letter-spacing: -0.02em; }
.cf-run__bar { display: block; height: 5px; border-radius: 3px; background: var(--blush); overflow: hidden; }
.cf-run__bar i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); transition: transform 300ms ease; }
.cf-run__status { font-size: 15px; color: var(--ink-2); }
.cf-rule { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 20px; font-size: 15px; line-height: 1.3; overflow: hidden; }
.cf-rule__from { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); max-width: none; }
.cf-rule__from span { font-size: 13px; font-weight: 640; color: var(--ink-2); }
.cf-rule__from output { min-height: 2.6em; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; color: var(--ink); }
.cf-rule__boxes { display: grid; gap: 9px; }
.cf-rule__boxes li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 11px; }
.cf-choose {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 8px; border: 1.5px solid var(--line); color: var(--ink-2);
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}
.cf-choose.is-ask { border-color: var(--red); color: var(--red-dark); box-shadow: 0 0 0 3px rgb(210 54 30 / 0.14); }
.cf-choose.is-set { border-color: var(--ink); color: var(--ink); background: var(--yellow); box-shadow: none; }
.cf-rule__pick { font-size: 14px; font-weight: 560; color: var(--red-dark); opacity: 0; transition: opacity 240ms ease; }
.cf-rule.is-asking .cf-rule__pick { opacity: 1; }
.cf-rule__act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.cf-labels { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px 0 26px; border: 0; cursor: pointer;
  background: var(--blush); color: var(--ink); font-size: 14.5px; font-weight: 600;
  border-radius: 0 9px 9px 0;
  clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%);
  -webkit-mask: radial-gradient(circle at 15px 50%, transparent 3.5px, #000 4px);
  mask: radial-gradient(circle at 15px 50%, transparent 3.5px, #000 4px);
  transition: background-color 160ms ease, transform 200ms var(--ease-out);
}
.cf-chip[aria-pressed='true'] { background: var(--yellow); }
.cf-chip:focus-visible { outline: none; background: var(--yellow); box-shadow: inset 0 -3px 0 var(--ink); }
@media (hover: hover) and (pointer: fine) { .cf-chip:hover { background: #ffe2a6; } }
.cf-create {
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 640; font-size: 15px;
  transition: opacity 200ms ease, transform 160ms var(--ease-out);
}
.cf-create:disabled { opacity: 0.28; cursor: default; }
.cf-create:not(:disabled):active { transform: scale(0.97); }
.cf-create:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.cf-desk[data-state='run'] .cf-run,
.cf-desk[data-state='rule'] .cf-rule {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 220ms ease, transform 320ms var(--ease-out), visibility 0s;
}
.cf-desk:not([data-state='idle']):not([data-state='done']) .cf-list { pointer-events: none; }

/* The slot. Its lip is the page's own red, so a letter that reaches it slips behind and is gone. */
/* A cast plate with a dark mouth; the plate's lower half is a lip drawn over the letters, so they slip in and are gone. */
.cf-slot {
  position: relative; width: 76%; height: 50px; margin: 34px auto 0; border-radius: 18px;
  background: var(--red-dark);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16), inset 0 -2px 0 rgb(0 0 0 / 0.12), 0 14px 30px -18px rgb(60 6 0 / 0.6);
}
.cf-slot__mouth { position: absolute; left: 18px; right: 18px; top: 14px; height: 22px; z-index: 1; border-radius: 9px; background: var(--slot); box-shadow: inset 0 6px 8px rgb(0 0 0 / 0.6); }
.cf-slot__lip {
  position: absolute; left: 0; right: 0; top: 25px; bottom: 0; z-index: 3;
  background: var(--red-dark); border-radius: 0 0 18px 18px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2), inset 0 -2px 0 rgb(0 0 0 / 0.12);
}
.cf-fly {
  position: absolute; z-index: 2; margin: 0; pointer-events: none;
  display: grid; grid-template-columns: 22px minmax(0, 9.2em) minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 10px 22px; border-radius: 12px; background: var(--yellow-soft); color: var(--ink); font-size: 15.5px; line-height: 1.3;
  box-shadow: 0 16px 30px -14px rgb(60 6 0 / 0.55);
  transform-origin: 50% 100%;
}
.cf-fly .cf-row__box { background: var(--ink); }
.cf-fly .cf-row__box svg { opacity: 1; transform: none; }

.cf-filed { position: relative; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; min-height: 48px; margin-top: 4px; max-width: none; }
.cf-filed__tag {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px 0 30px;
  background: var(--yellow); color: var(--ink); font-weight: 640; font-size: 15px;
  border-radius: 0 10px 10px 0;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  -webkit-mask: radial-gradient(circle at 17px 50%, transparent 4px, #000 4.5px);
  mask: radial-gradient(circle at 17px 50%, transparent 4px, #000 4.5px);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 260ms ease, transform 420ms var(--ease-out);
}
.cf-filed__tag b { font-variant-numeric: tabular-nums; font-weight: 700; }
.cf-desk[data-state='filing'] .cf-filed__tag, .cf-desk[data-state='done'] .cf-filed__tag { opacity: 1; transform: none; }
.cf-again {
  min-height: 44px; padding: 0 4px; border: 0; background: none; color: #fff; cursor: pointer; font-weight: 600; font-size: 15px;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: rgb(255 255 255 / 0.5);
}
.cf-again[hidden] { display: none; }
.cf-desk__cap { margin-top: 10px; font-size: 14.5px; line-height: 1.45; color: rgb(255 255 255 / 0.82); max-width: 48ch; }

/* ---------- FAQ ---------- */
.cf-faq { background: var(--paper); padding: clamp(56px, 6vw, 88px) var(--gutter); }
.cf-faq__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(28px, 4vw, 64px); margin-top: clamp(24px, 3vw, 36px); }
.cf-qa { padding-top: 20px; border-top: 1.5px solid var(--line); }
.cf-qa h3 { font-size: 1.2rem; }
.cf-qa p { margin-top: 8px; color: var(--ink-2); font-size: 16.5px; }

/* ---------- Last ---------- */
.cf-last { padding: clamp(56px, 6vw, 88px) var(--gutter); color: #fff; }
.cf-last__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.cf-last h2 { max-width: 14em; }

/* ---------- Colophon ---------- */
.world-colophon { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 30px var(--gutter) 44px; color: rgb(255 255 255 / 0.84); border-top: 1.5px solid rgb(255 255 255 / 0.2); font-size: 15px; }
.world-colophon a { text-underline-offset: 3px; }
.world-colophon nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1080px) {
  .cf-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .cf-desk { justify-self: start; max-width: 600px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .cf-brand__for { display: none; }
  .cf-faq__list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 560px) {
  .cf-row label { grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 14px; min-height: 62px; padding: 10px 16px; }
  .cf-row input { left: 16px; }
  .cf-row__box { grid-row: 1 / span 2; }
  .cf-fly { grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 14px; padding: 10px 16px; }
  .cf-fly .cf-row__box { grid-row: 1 / span 2; }
  .cf-tray__bar { flex-wrap: wrap; row-gap: 2px; padding: 10px 10px 8px 16px; }
  .cf-tray__name { font-size: 19px; white-space: nowrap; }
  /* the hint drops under the bar and points up at the funnel; it keeps its room when it goes, so nothing jumps */
  .cf-tray__hint { order: 3; flex-basis: 100%; text-align: right; font-size: 13.5px; padding: 0 16px 2px 0; }
  .cf-tray__hint[hidden] { display: block; visibility: hidden; }
  .cf-tray__hint::after { top: auto; bottom: 100%; right: 18px; margin: 0 0 1px; border: 5px solid transparent; border-bottom-color: currentColor; border-top-width: 0; }
  .cf-rule { padding: 14px 16px 16px; gap: 11px; font-size: 14px; }
  .cf-tag__body { min-height: 58px; font-size: 19px; }
  .cf-slot { width: 82%; }
}

@media (prefers-reduced-motion: reduce) {
  .cf-tag, .cf-run, .cf-rule, .cf-filed__tag, .cf-row__box svg, .cf-run__bar i { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .cf-tag:hover { transform: none; }
  .cf-funnel.is-shimmer::after { animation: none; }
  .cf-run, .cf-rule, .cf-filed__tag { transform: none !important; }
}
