/* Pagerama — “viewfinder editorial”
   Warm paper + ink, Charter serif, monospace dimension labels, and the
   extension's own selection-marquee (dashed borders, corner brackets) as the
   site's recurring motif. Zero external requests: no webfonts, no images —
   the same promise the extension makes. */

:root {
  --paper: #faf7f1;
  --paper-2: #f1ecdf;
  --ink: #16181d;
  --ink-soft: #4c5058;
  --line: #d8d2c2;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #15803d;
  --serif: "Charter", "Bitstream Charter", "Sitka Text", "Iowan Old Style", Cambria, Georgia, serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, ui-monospace, "SF Mono", monospace;
  --max: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background:
    /* faint pixel-grid, like a transparent-PNG checkerboard at 2% */
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(22, 24, 29, 0.035) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(22, 24, 29, 0.035) 23px 24px),
    var(--paper);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.mono, kbd, code, .card-dim, .demo-url, .demo-size, .receipts, .strip { font-family: var(--mono); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 99;
  background: var(--ink); color: var(--paper); padding: 8px 16px;
}
.skip:focus { left: 8px; }

a { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px dashed var(--blue); outline-offset: 3px;
}

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

.nav {
  display: flex; align-items: center; gap: 28px;
  max-width: var(--max); margin: 0 auto; padding: 20px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 20px; text-decoration: none; color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-mark { width: 26px; height: 26px; border-radius: 6px; }
/* Horizontal lockup: mark + wordmark ship as one asset so proportions and
   spacing stay exactly as drawn instead of being re-approximated in CSS. */
.brand-lockup { height: 62px; width: auto; display: block; margin-left: -6px; }
@media (max-width: 520px) { .brand-lockup { height: 46px; } }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 15.5px;
}
.nav-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 720px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }
/* The nav CTA inherits the hero button's size, which overpowers the logo up
   there. Scale it down so the header reads logo-first. */
/* Specificity, not order: .btn-primary is defined below and would otherwise win. */
.nav a.nav-cta { font-size: 15px; padding: 10px 18px; box-shadow: 2px 2px 0 var(--ink); }
.nav a.nav-cta:hover { box-shadow: 4px 4px 0 var(--ink); }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-block; text-decoration: none; font-family: var(--serif);
  font-size: 16.5px; font-weight: 700; padding: 12px 22px;
  border: 1.5px solid var(--ink); border-radius: 3px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary {
  background: var(--blue); border-color: var(--blue-dark); color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); background: var(--blue-dark); }
.btn-primary:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { color: var(--ink); background: transparent; border-style: dashed; }
.btn-ghost:hover { background: var(--paper-2); }
.btn-big { font-size: 19px; padding: 16px 34px; }

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

.hero {
  max-width: var(--max); margin: 0 auto; padding: 56px 24px 40px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px; align-items: center;
}
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; padding-top: 32px; } }

.kicker {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.18); }

.hero h1 {
  font-size: clamp(38px, 5.2vw, 56px); line-height: 1.06;
  letter-spacing: -0.022em; margin-bottom: 20px; font-weight: 800;
}
.hero h1 em { font-style: italic; color: var(--blue-dark); }

.lede { font-size: 18.5px; color: var(--ink-soft); max-width: 54ch; margin-bottom: 26px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }

.receipts {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 13px; color: var(--ink-soft);
}
.receipts b { color: var(--green); font-size: 15px; }

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

.demo { position: relative; }

.demo-browser {
  border: 1.5px solid var(--ink); border-radius: 8px; background: #fff;
  box-shadow: 6px 6px 0 rgba(22, 24, 29, 0.14); overflow: hidden;
}
.demo-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-bottom: 1.5px solid var(--line); background: var(--paper-2);
}
.demo-chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.demo-chrome i:first-child { background: #e07a5f; }
.demo-url {
  margin-left: 10px; font-size: 11.5px; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 2px 12px;
}

.demo-page { position: relative; padding: 18px 18px 22px; }
.demo-line { height: 10px; border-radius: 3px; background: var(--paper-2); margin: 10px 0; }
.demo-line.w80 { width: 80%; } .demo-line.w60 { width: 60%; } .demo-line.w90 { width: 90%; }
.demo-line.w70 { width: 70%; } .demo-line.w40 { width: 40%; }
.demo-img {
  height: 84px; border-radius: 4px; margin: 12px 0;
  background: linear-gradient(120deg, #dbeafe, #ede9fe 60%, #fce7f3);
}

/* The marquee draws itself over the mock article, then a flash fires. */
.demo-marquee {
  position: absolute; left: 8%; top: 24%; width: 0; height: 0; opacity: 0;
  border: 1.5px dashed var(--blue);
  background: rgba(37, 99, 235, 0.07);
  animation: marquee 7s ease-in-out infinite;
}
.demo-marquee .c {
  position: absolute; width: 10px; height: 10px; border: 2.5px solid var(--blue);
}
.c.tl { left: -3px; top: -3px; border-right: 0; border-bottom: 0; }
.c.tr { right: -3px; top: -3px; border-left: 0; border-bottom: 0; }
.c.bl { left: -3px; bottom: -3px; border-right: 0; border-top: 0; }
.c.br { right: -3px; bottom: -3px; border-left: 0; border-top: 0; }
.demo-size {
  position: absolute; right: -2px; bottom: -26px;
  font-size: 11px; background: var(--ink); color: var(--paper);
  padding: 2px 8px; border-radius: 3px; white-space: nowrap;
}
@keyframes marquee {
  0%, 8%   { width: 0; height: 0; opacity: 0; }
  12%      { opacity: 1; }
  38%      { width: 84%; height: 52%; opacity: 1; }
  62%      { width: 84%; height: 52%; opacity: 1; }
  70%, 100% { width: 84%; height: 52%; opacity: 0; }
}

.demo-flash {
  position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none;
  animation: flash 7s ease-out infinite;
}
@keyframes flash {
  0%, 61% { opacity: 0; }
  63%     { opacity: 0.9; }
  68%, 100% { opacity: 0; }
}

.demo-print {
  position: absolute; right: -10px; bottom: -26px; width: 74%;
  border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper);
  box-shadow: 4px 4px 0 rgba(22, 24, 29, 0.16);
  opacity: 0; transform: translateY(8px) rotate(-1deg);
  animation: print 7s ease-out infinite;
}
.demo-print-bar {
  font-family: var(--mono); font-size: 11.5px; padding: 9px 12px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.demo-print-bar b { color: var(--green); font-weight: 600; }
@keyframes print {
  0%, 64%  { opacity: 0; transform: translateY(8px) rotate(-1deg); }
  72%      { opacity: 1; transform: translateY(0) rotate(-1deg); }
  92%      { opacity: 1; }
  100%     { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-marquee { animation: none; width: 84%; height: 52%; opacity: 1; }
  .demo-flash { animation: none; }
  .demo-print { animation: none; opacity: 1; transform: rotate(-1deg); }
  .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------- strip */

.strip {
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px;
  padding: 12px 24px; font-size: 13.5px; letter-spacing: 0.04em;
  margin-top: 46px;
}
.strip-sep { color: var(--blue); }

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

.section { max-width: var(--max); margin: 0 auto; padding: 72px 24px 20px; }

.section h2 {
  font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -0.018em;
  margin-bottom: 12px; font-weight: 800;
}
.bracket { color: var(--blue); font-weight: 400; }
.section-lede { color: var(--ink-soft); margin-bottom: 36px; max-width: 60ch; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3 { grid-template-columns: 1fr; } }

.card {
  position: relative; border: 1.5px dashed var(--ink); border-radius: 4px;
  padding: 22px 20px 20px; background: rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 4px 6px 0 rgba(22, 24, 29, 0.12); }
.card h3 { font-size: 19px; margin: 8px 0 8px; letter-spacing: -0.01em; }
.card p { font-size: 15px; color: var(--ink-soft); }
.card-dim {
  font-size: 11px; color: var(--blue-dark);
  border: 1px solid var(--line); border-radius: 3px; padding: 2px 8px;
  background: var(--paper);
}
.card kbd {
  font-size: 11.5px; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 6px; background: var(--paper); white-space: nowrap;
}
.card-plain { border-style: solid; border-color: var(--line); }
.features-2 { margin-top: 18px; }

/* -------------------------------------------------------- engine table */

.section-dark {
  max-width: none; background: var(--ink); color: var(--paper);
  padding-bottom: 72px; margin-top: 52px;
}
.section-dark > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-dark h2 { color: var(--paper); }
.section-dark .section-lede { color: #b8bcc4; }

.engine-table {
  width: 100%; border-collapse: collapse; font-size: 15.5px;
  border: 1.5px solid var(--paper);
}
.engine-table th {
  text-align: left; font-family: var(--mono); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
  padding: 12px 16px; border-bottom: 1.5px solid var(--paper); color: #9db4e8;
}
.engine-table td { padding: 13px 16px; border-bottom: 1px dashed rgba(250, 247, 241, 0.25); vertical-align: top; }
.engine-table tr:last-child td { border-bottom: 0; }
.engine-table td:first-child { color: #c9cdd6; width: 46%; }
.engine-table td:last-child { color: var(--paper); }
@media (max-width: 640px) {
  .engine-table, .engine-table thead, .engine-table tbody, .engine-table tr,
  .engine-table th, .engine-table td { display: block; }
  .engine-table thead { display: none; }
  .engine-table tr { border-bottom: 1.5px solid rgba(250, 247, 241, 0.35); padding: 8px 0; }
  .engine-table td { border-bottom: 0; padding: 6px 14px; width: auto; }
  .engine-table td:first-child::before { content: "✕ "; color: #e07a5f; }
  .engine-table td:last-child::before { content: "✓ "; color: #7ac495; }
}

/* ---------------------------------------------------------- manifesto */

.manifesto { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: start; }
@media (max-width: 880px) { .manifesto { grid-template-columns: 1fr; } }

.manifesto-title {
  font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -0.02em;
  font-weight: 800;
  border-left: 5px solid var(--blue); padding-left: 22px;
}
.manifesto-body p { margin-bottom: 18px; }
.manifesto-body code {
  font-size: 14.5px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 3px; padding: 1px 6px;
}
.perms { list-style: none; margin: 0 0 20px; }
.perms li {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15.5px;
}
.perms li:first-child { border-top: 1px dashed var(--line); }
.perms span { color: var(--ink-soft); }
@media (max-width: 520px) { .perms li { grid-template-columns: 1fr; gap: 2px; } }
.manifesto-proof { color: var(--ink-soft); font-size: 15.5px; }
.manifesto-proof .mono { font-size: 13px; color: var(--green); }
.link { font-weight: 700; }

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

.faq { max-width: 760px; }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq details:first-child { border-top: 1.5px solid var(--line); }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 17.5px; padding: 18px 34px 18px 2px;
  list-style: none; position: relative; letter-spacing: -0.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 20px; color: var(--blue);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 2px 20px; color: var(--ink-soft); max-width: 64ch; }

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

.install {
  max-width: var(--max); margin: 40px auto 0; padding: 64px 24px 72px;
  text-align: center;
  border-top: 1.5px dashed var(--line);
}
.install h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.018em; margin-bottom: 6px; }
.install > p { color: var(--ink-soft); margin-bottom: 26px; }
.install-note { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); margin-top: 18px; }

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

.footer {
  border-top: 1.5px solid var(--ink);
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  max-width: var(--max); margin: 0 auto; padding: 26px 24px 40px;
  font-size: 14px; color: var(--ink-soft);
}
.footer-left { display: flex; flex-direction: column; gap: 4px; }
.footer-tag { font-style: italic; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ink-soft); }

/* ------------------------------------------------------ scroll reveal */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------- privacy (subpage) */

.doc { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.doc h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.02em; margin-bottom: 6px; }
.doc .doc-date { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); margin-bottom: 34px; }
.doc h2 { font-size: 22px; margin: 34px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 22px; margin: 10px 0; }
.doc .tldr {
  border: 1.5px dashed var(--blue); border-radius: 4px; background: rgba(37, 99, 235, 0.05);
  padding: 18px 20px; margin-bottom: 10px; color: var(--ink); font-size: 17.5px;
}
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; padding: 9px 12px; border-bottom: 1px dashed var(--line); }
.doc th { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; }
