/*
 * The Chrome extension landing page.
 *
 * Deliberately self-contained rather than built on css/pilos.css: the Agents
 * site is dark and purple, this is warm paper and orange, and tangling the two
 * would mean every change to one risks the other. /agents keeps pilos.css.
 *
 * Tokens are lifted from design/Pilos Landing.dc.html in the pilos repo.
 */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --sunk: #efece5;
  --ink: #121a2b;
  --muted: #5b6376;
  --line: rgb(18 26 43 / 0.1);
  --off: #d3d6dd;
  --accent: #ff6b4a;
  --accent-soft: #ffe7e0;
  --mint: #3fd9a4;
  --mint-soft: #ddf7ec;
  --mint-ink: #0f6b4c;
  --band: #121a2b;
  --band-ink: #f7f5f0;
  --band-muted: #a9b0c0;
  --band-card: rgb(247 245 240 / 0.06);
  --shadow: 0 1px 2px rgb(18 26 43 / 0.06), 0 10px 30px rgb(18 26 43 / 0.07);
  --display: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --sans: 'Figtree', ui-sans-serif, system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.eyebrow {
  font-size: 14px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase; margin: 0;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; margin: 0; }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; text-wrap: balance; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg);
  padding: 12px 20px; border-radius: 0 0 12px 0; z-index: 100;
}
.skip:focus { left: 0; }

/* ── Brand mark ─────────────────────────────────────────────────────────── */
.mark {
  position: relative; display: inline-block; flex: none;
  width: 28px; height: 28px; border-radius: 10px 10px 10px 3px; background: var(--accent);
}
.mark::after {
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 4px; background: var(--bg);
}
.mark--sm { width: 22px; height: 22px; border-radius: 8px 8px 8px 2px; }
.mark--sm::after { top: 5px; right: 5px; width: 6px; height: 6px; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; padding-block: 14px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 24px; font-size: 15px; font-weight: 500; color: var(--muted); }
.nav__spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap;
}
.btn--primary { height: 54px; padding-inline: 26px; border-radius: 27px; background: var(--accent); color: #121a2b; font-weight: 700; box-shadow: 0 8px 24px rgb(255 107 74 / 0.28); }
.btn--primary:hover { color: #121a2b; }
.btn--ghost { height: 54px; padding-inline: 24px; border-radius: 27px; border: 1px solid var(--line); background: var(--surface); }
.btn--sm { height: 40px; padding-inline: 18px; border-radius: 20px; background: var(--ink); color: var(--bg); font-size: 15px; }
.btn--sm:hover { color: var(--bg); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-block: clamp(48px, 8vw, 96px); }
.hero__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--mint); flex: none; }
.hero h1 { font-size: clamp(40px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__sub { margin: 0; font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 470px; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin: 0; font-size: 14px; color: var(--muted); }
.hero__demo { flex: 1.25 1 520px; min-width: 0; }

/* ── Before / after ─────────────────────────────────────────────────────── */
.compare { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.chrome { height: 40px; display: flex; align-items: center; gap: 12px; padding-inline: 14px; border-bottom: 1px solid var(--line); }
.chrome__dots { display: flex; gap: 6px; }
.chrome__dots i { width: 10px; height: 10px; border-radius: 5px; background: var(--sunk); }
.chrome__url { flex: 1; max-width: 560px; height: 24px; border-radius: 12px; background: var(--sunk); font-size: 12px; color: var(--muted); display: flex; align-items: center; padding-inline: 12px; }

.compare__stage { position: relative; aspect-ratio: 900 / 560; }
.compare__pane { position: absolute; inset: 0; }
.compare__pane--after { clip-path: inset(0 0 0 var(--split, 50%)); }
.compare__tag {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 10px;
  font-size: 12px; font-weight: 700; z-index: 3;
}
.compare__tag--before { left: 12px; background: rgb(18 26 43 / 0.82); color: #f7f5f0; font-weight: 600; }
.compare__tag--after { right: 12px; background: var(--accent); color: #121a2b; }
.compare__handle {
  position: absolute; inset-block: 0; left: var(--split, 50%);
  width: 2px; margin-left: -1px; background: var(--accent); z-index: 4; pointer-events: none;
}
.compare__handle::after {
  content: '‹ ›'; position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 20px;
  background: #fff; box-shadow: 0 4px 14px rgb(18 26 43 / 0.25);
  display: flex; align-items: center; justify-content: center;
  color: #121a2b; font-size: 13px; font-weight: 700;
}
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize; z-index: 5;
}
.compare__range:focus-visible + .compare__handle::after { outline: 3px solid var(--ink); outline-offset: 2px; }

/* A CSS-drawn feed, cluttered on one side and tidy on the other. */
.feed { position: absolute; inset: 0; background: #eef0f4; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.feed__bar { height: 8px; width: 40%; border-radius: 3px; background: #5b4fe0; flex: none; }
/* overflow:hidden so the cluttered column reads as a feed cut off mid-scroll
   rather than as a short list that happens to end. */
.feed__body { flex: 1; display: flex; gap: 6px; min-height: 0; overflow: hidden; }
.feed__rail { width: 16%; display: flex; flex-direction: column; gap: 5px; }
.feed__rail i { height: 5px; border-radius: 2px; background: #cdd2dd; }
.feed__rail i:nth-child(2n) { width: 70%; }
.feed__main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feed__ad { height: 14px; border-radius: 3px; background: #ffe58a; flex: none; }
.feed__post { background: #fff; border-radius: 3px; padding: 5px; flex: none; display: flex; flex-direction: column; gap: 4px; }
.feed__photo { height: 44px; border-radius: 2px; background: #f2c6b4; flex: none; }
.feed__line { height: 4px; border-radius: 2px; background: #dfe3ea; flex: none; }
.feed__line--short { width: 55%; }
.feed__side { width: 24%; display: flex; flex-direction: column; gap: 6px; }
.feed__side i { height: 30px; border-radius: 3px; background: #fff; }
/* The tidy half: equal cards on a two-column grid, filling the frame. */
.feed--clean .feed__body { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 6px; }
.feed--clean .feed__photo { flex: 1; height: auto; }

.chat {
  position: relative; margin: -36px 0 0 clamp(12px, 4vw, 40px); max-width: 360px;
  border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.chat__said { align-self: flex-end; max-width: 92%; margin: 0; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 14px 14px 4px 14px; font-size: 15px; line-height: 1.4; }
.chat__done { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.pill { padding: 2px 8px; border-radius: 8px; background: var(--mint-soft); color: var(--mint-ink); font-size: 12px; font-weight: 700; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.card__art { height: 120px; border-radius: 12px; background: var(--sunk); display: flex; align-items: center; justify-content: center; padding-inline: 18px; }
.card h3 { font-size: 22px; letter-spacing: -0.02em; }
.card__step { font-family: var(--display); font-size: 14px; color: var(--muted); font-weight: 500; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.mock { width: 100%; border-radius: 20px; background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 0 8px 0 16px; height: 40px; box-shadow: var(--shadow); font-size: 13px; color: var(--muted); }
.mock__send { width: 28px; height: 28px; border-radius: 10px 10px 10px 3px; background: var(--accent); flex: none; }
.mock--chat { height: auto; padding: 10px 8px 10px 16px; border-radius: 14px; color: var(--ink); font-size: 14px; }
.mock--chat .mock__send { width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: #121a2b; font-weight: 700; }
.caret { display: inline-block; width: 2px; height: 16px; background: var(--accent); margin-left: 2px; vertical-align: -3px; }
.applied { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.applied__chip { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; }
.applied__tick { width: 16px; height: 16px; border-radius: 8px; background: var(--mint); color: #121a2b; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.applied small { font-size: 12px; color: var(--muted); }

/* ── Examples ───────────────────────────────────────────────────────────── */
.examples { background: var(--sunk); }
.example { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.example__art { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 190px; gap: 2px; background: var(--accent); }
.example__half { background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 5px; overflow: hidden; }
.example__tag { position: absolute; bottom: 8px; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.example__tag--before { left: 8px; background: rgb(18 26 43 / 0.82); color: #f7f5f0; font-weight: 600; }
.example__tag--after { right: 8px; background: var(--accent); color: #121a2b; }
.example__copy { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.example__kind { font-size: 13px; color: var(--muted); font-weight: 600; }
.example blockquote { margin: 0; font-size: 16px; font-weight: 500; }
.bar { border-radius: 2px; flex: none; }

/* ── Privacy band ───────────────────────────────────────────────────────── */
.band { background: var(--band); color: var(--band-ink); }
.band .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-block: clamp(64px, 9vw, 120px); }
.band__copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.band .eyebrow { color: var(--accent); }
.claims { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.claims li { display: flex; gap: 14px; }
.tick { width: 22px; height: 22px; flex: none; margin-top: 2px; border-radius: 11px; background: var(--mint); color: #121a2b; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.claims b { display: block; font-weight: 600; }
.claims span { color: var(--band-muted); font-size: 16px; }
.band__cards { flex: 1 1 420px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.band__card { border-radius: 14px; background: var(--band-card); border: 1px solid rgb(247 245 240 / 0.1); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.band__card h3 { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--band-muted); letter-spacing: 0; }
.band__card code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; line-height: 1.9; display: block; }
.band__card code em { font-style: normal; color: #ff8a6e; }
.band__card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.band__card li { display: flex; align-items: center; gap: 10px; }
.band__card li::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: var(--mint); flex: none; }

/* ── Pricing ────────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; max-width: 880px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.plan--pro { border: 2px solid var(--accent); padding: 31px; box-shadow: 0 18px 50px rgb(255 107 74 / 0.16); }
.plan__flag { position: absolute; top: -13px; left: 30px; padding: 3px 12px; border-radius: 12px; background: var(--accent); color: #121a2b; font-size: 13px; font-weight: 700; }
.plan h3 { font-size: 20px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; }
.plan__price b { font-family: var(--display); font-size: 44px; font-weight: 600; letter-spacing: -0.03em; }
.plan__price span { color: var(--muted); }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 16px; flex: 1; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: '✓'; color: var(--mint-ink); font-weight: 700; }
.plan .btn { height: 50px; border-radius: 25px; }
.plan .btn--ghost { border: 1px solid var(--line); background: transparent; }

.studio { max-width: 880px; margin-top: 24px; border-radius: 14px; border: 1px dashed var(--line); background: var(--sunk); padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.studio__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); display: flex; align-items: center; justify-content: center; }
.studio__icon i { width: 14px; height: 22px; border-radius: 4px; border: 2px solid var(--bg); }
.studio__copy { flex: 1 1 260px; }
.studio__copy b { display: block; font-weight: 600; }
.studio__copy span { font-size: 15px; color: var(--muted); }
.studio a { font-size: 15px; font-weight: 600; color: var(--accent); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--line); }
.faq .wrap { display: flex; flex-wrap: wrap; gap: 48px; }
.faq__intro { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.faq__list { flex: 2 1 480px; min-width: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; gap: 16px; padding-block: 22px; cursor: pointer;
  font-family: var(--display); font-size: 19px; font-weight: 500; letter-spacing: -0.01em;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; flex: none; width: 32px; height: 32px; border-radius: 16px;
  background: var(--sunk); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.faq details[open] summary::after { content: '–'; }
.faq summary > span { flex: 1; }
.faq p { margin: 0; padding: 0 48px 24px 0; color: var(--muted); text-wrap: pretty; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding-block: 32px; }
.foot__brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; }
.foot__brand span { font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 15px; }
.foot__links { display: flex; gap: 24px; font-size: 15px; color: var(--muted); }
.foot__copy { font-size: 14px; color: var(--muted); }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav .wrap > .btn--sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Legal prose ────────────────────────────────────────────────────────────
   The privacy and terms pages. A reading column, not a landing page: the
   global h2 size is built for marketing sections and is far too loud for a
   document someone is expected to read end to end.
   ------------------------------------------------------------------------- */
.legal {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 24px 80px;
}
.legal h1 { font-size: clamp(32px, 4vw, 42px); line-height: 1.1; }
.legal__updated { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.legal__lead {
  margin: 28px 0 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--sunk);
  border: 1px solid var(--line);
  font-size: 16px;
  color: var(--muted);
}
.legal__lead a, .legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal__lead a:hover, .legal a:hover { text-decoration: none; }

.legal h2 {
  font-size: clamp(23px, 2.4vw, 28px);
  line-height: 1.2;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.legal h3 { font-size: 19px; line-height: 1.3; margin-top: 36px; }
.legal p { margin: 16px 0 0; text-wrap: pretty; }
.legal ul, .legal ol { margin: 16px 0 0; padding-left: 24px; }
.legal li { margin-top: 10px; }
.legal li::marker { color: var(--muted); }
.legal code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

/* Every word in this one is a DOM property Pilos refuses to read, so it reads
   as a list rather than a sentence. */
.legal__mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
}

/* Scrolls rather than squeezes: the field tables have a wide third column and
   wrapping it to four words per line makes it unreadable on a phone. */
.legal__table {
  margin-top: 20px;
  overflow-x: auto;
  /* A shadow on whichever edge still has table behind it. On a phone the third
     column is off-screen, and without this there is nothing to say so. The
     cover gradients scroll with the content; the shadows stay pinned to the
     box, so each one only shows while that side is clipped. */
  background:
    linear-gradient(to right, var(--bg) 30%, rgb(247 245 240 / 0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--bg) 30%, rgb(247 245 240 / 0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(18 26 43 / 0.14), rgb(18 26 43 / 0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(18 26 43 / 0.14), rgb(18 26 43 / 0)) right center / 14px 100% no-repeat scroll;
}
.legal__table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.legal__table th, .legal__table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.legal__table th {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: var(--ink);
}
.legal__table tbody tr:last-child td { border-bottom: none; }
.legal__table td:first-child { white-space: nowrap; font-weight: 500; }

/* The claims in the privacy band are a summary; this is the way to the detail. */
.band__more { margin: 28px 0 0; font-size: 16px; }
.band__more a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.band__more a:hover { text-decoration: none; }
/* The middle column holds short noun phrases with inline code in them; left to
   auto it collapses and breaks them across three lines. */
.legal__table col.legal__c1 { width: 15%; }
.legal__table col.legal__c2 { width: 30%; }
