/* ──────────────────────────────────────────────────────────────────────────
 *  StreetLeaky — the case-file landing.
 *
 *  The site wears the extension's own design: a stack of paper sheets on a
 *  desk, the binder clip holding the pile, sticky-note tabs out the left
 *  edge, red double-border stamps. Tokens mirror extension/src/content/
 *  folder-css.ts so the page and the product read as one object.
 * ────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("fonts/plex-sans-var.d28498895ed7.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-mono-400.814fe1615d4d.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/plex-mono-700.0d11e07b5aaa.woff2") format("woff2");
}

:root {
  /* White surfaces, neutral-gray structure. Only the ink stays warm and
     the stamp stays red — the paper itself is plain white. */
  --paper:      #ffffff;
  --paper-2:    #f4f4f3;
  --paper-3:    #ededec;
  --paper-edge: #e4e3e0;
  --kraft-light:#f7f7f6;
  --kraft-edge: #cfcdc8;
  --ink:        #28251f;
  --ink-2:      #55524a;
  --muted:      #8a877e;
  --rule:       #e9e8e5;
  --stamp:      #b3261e;
  --warn:       #8a5117;
  --accent:     #1d4ed8;

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ── Stacks ──────────────────────────────────────────────────────────────
   Each section is its own pile: one live sheet, two turned sheets under it,
   a clip on top, clear white space between piles. */

.stack {
  position: relative;
  max-width: 680px;
  margin: 88px auto;
  padding: 0 16px;
  scroll-margin-top: 40px;
}
.stack:first-of-type { margin-top: 96px; }

/* Alternate the whole pile's lean so neighboring stacks read as separate
   objects dropped on the desk, not one broken column. */
.stack:nth-of-type(even) .sheet { transform: rotate(-0.5deg); }
.stack:nth-of-type(odd)  .sheet { transform: rotate(0.4deg); }

.under {
  position: absolute;
  inset: 0 16px;
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}
.under.u1 { transform: rotate(1.1deg) translate(7px, 5px); }
.under.u2 { transform: rotate(-1.6deg) translate(-6px, 10px); background: var(--paper-3); }
.stack:nth-of-type(even) .under.u1 { transform: rotate(-1.2deg) translate(-7px, 6px); }
.stack:nth-of-type(even) .under.u2 { transform: rotate(1.5deg) translate(6px, 10px); }

.sheet {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
  padding: 52px 60px 48px;
}

.sheet-cover { padding-top: 76px; }

.clip {
  position: absolute;
  top: -38px;
  right: 46px;
  width: 92px;
  height: auto;
  transform: rotate(3deg);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.28));
  pointer-events: none;
}
.sheet-cover .clip { width: 104px; top: -44px; }
/* Small per-stack variety without ever hanging a clip over the copy. */
.stack:nth-of-type(even) .clip { right: 110px; transform: rotate(-3deg); }

/* ── Type ────────────────────────────────────────────────────────────────── */

.title {
  margin: 0;
  font: 600 64px/1.02 var(--sans);
  letter-spacing: -0.015em;
  color: var(--ink);
}
.tagline {
  margin: 10px 0 0;
  font: 400 21px/1.4 var(--sans);
  color: var(--ink-2);
  max-width: 30ch;
}
.lede {
  margin: 26px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 54ch;
}

.sheet-head {
  margin: 0;
  font: 600 30px/1.15 var(--sans);
  color: var(--ink);
}
.sheet-sub {
  margin: 6px 0 26px;
  font: 400 15px/1.5 var(--sans);
  color: var(--muted);
}

/* ── Stamps ──────────────────────────────────────────────────────────────── */

.stamp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 30px 0 0;
}
.stamp {
  display: inline-block;
  padding: 7px 16px 6px;
  border: 3px double var(--stamp);
  border-radius: 3px;
  color: var(--stamp);
  font: 700 17px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(var(--tilt, -6deg));
  opacity: 0.88;
  mix-blend-mode: multiply;
  text-shadow: 0 0 1px rgba(179, 38, 30, 0.4);
}
.stamp .stamp-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-top: 2px;
}
.stamp.is-warn { color: var(--warn); border-color: var(--warn); text-shadow: none; }

/* ── CTAs ────────────────────────────────────────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.cta {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  font: 600 14px/1 var(--sans);
  letter-spacing: 0;
  color: var(--ink-2);
  background: var(--kraft-light);
  border: 1px solid var(--kraft-edge);
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.cta:hover { filter: brightness(1.04); }
.cta:active { transform: translateY(1px); }
.cta.is-quiet { background: none; box-shadow: none; color: var(--muted); }
.cta.is-quiet:hover { color: var(--ink-2); }

/* ── Records list (the "inside" sheet) ───────────────────────────────────── */

.records {
  list-style: none;
  margin: 0;
  padding: 0;
}
.records li {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}
.records li:last-child { border-bottom: 0; }
.records b {
  display: block;
  font: 600 16px/1.35 var(--sans);
  color: var(--ink);
}
.records span {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-top: 1px;
}

.note {
  margin: 22px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ── Plans ───────────────────────────────────────────────────────────────── */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.plan {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 18px 20px 14px;
}
.plan.is-pro { border-color: var(--kraft-edge); background: var(--kraft-light); }
.plan-name {
  margin: 0;
  font: 700 13px/1 var(--mono);
  color: var(--muted);
}
.plan-price {
  margin: 8px 0 4px;
  font: 700 26px/1 var(--sans);
  color: var(--ink);
}
.plan ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.plan li {
  position: relative;
  padding: 5px 0 5px 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}
.plan li::before {
  content: "·";
  position: absolute;
  left: 4px;
  font-weight: 700;
  color: var(--muted);
}

/* ── The left tabs (section nav) ─────────────────────────────────────────── */

/* The Pro card's site list. */
.plan-sites {
  list-style: none;
  margin: 12px 0 4px;
  padding: 10px 0 8px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.plan-sites li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  font: 600 14px/1.4 var(--sans);
  color: var(--ink);
}
.plan-sites img { width: 16px; height: 16px; border-radius: 3px; }

/* ── Standard page chrome (header, hero, footer) ─────────────────────────
   Only the folder section is paper; the rest of the page is a normal
   white-background website. */

.page-top {
  max-width: 720px;
  margin: 34px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero {
  max-width: 720px;
  margin: 72px auto 84px;
  padding: 0 20px;
}

.page-foot {
  max-width: 720px;
  margin: 84px auto 72px;
  padding: 0 20px;
}
.page-foot .legal {
  margin-top: 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.sheet-divider {
  height: 1px;
  background: var(--rule);
  margin: 38px 0 34px;
}

.account-links {
  display: flex;
  gap: 18px;
}
.account-links a {
  font: 700 13px/1 var(--mono);
  color: var(--muted);
  text-decoration: none;
}
.account-links a:hover { color: var(--ink); text-decoration: underline; }

/* ── Install / legal ─────────────────────────────────────────────────────── */

.sheet-install .cta-row { margin-top: 6px; }

.legal {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font: 400 13px/1 var(--sans);
  color: var(--muted);
}
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover { color: var(--ink); text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .stack { margin-top: 56px; }
  .sheet { padding: 44px 26px 40px; }
  .sheet-cover { padding-top: 64px; }
  .clip { width: 108px; top: -42px; right: 20px; }
  .title { font-size: 42px; }
  .tagline { font-size: 18px; }
  .plans { grid-template-columns: 1fr; }
  .stamp { font-size: 14px; }
}

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

/* ── Legal pages (terms / privacy) ───────────────────────────────────────── */
/* Same paper, one sheet. The markup in terms.html / privacy.html is a .doc
   block; wrap it in the sheet treatment so those pages match the file. */

.doc {
  max-width: 720px;
  margin: 64px auto 96px;
  padding: 56px 60px 64px;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
}
.doc .back {
  font: 700 13px/1 var(--mono);
  color: var(--muted);
  text-decoration: none;
}
.doc .back:hover { color: var(--ink); }
.doc h1 {
  font: 600 44px/1.05 var(--sans);
  letter-spacing: -0.015em;
  margin: 24px 0 8px;
  color: var(--ink);
}
.doc .updated {
  color: var(--muted);
  margin: 0 0 32px;
  font: 400 13px/1.4 var(--mono);
}
.doc h2 {
  font: 600 20px/1.25 var(--sans);
  margin: 32px 0 8px;
  color: var(--ink);
}
.doc p, .doc li {
  font: 400 15.5px/1.65 var(--sans);
  color: var(--ink-2);
}
.doc ul { padding-left: 22px; }
.doc a { color: var(--accent); }
.doc a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .doc { margin: 24px 12px 48px; padding: 36px 22px 44px; }
  .doc h1 { font-size: 32px; }
}

/* ── Account pages (Django: login / signup / dashboard / best-of) ─────────
   Served from server/static/site/styles.css — same file as the landing.
   One sheet per page, same paper. */

.nav {
  max-width: 680px;
  margin: 40px auto 0;
  padding: 0 16px;
}
.brand {
  font: 700 14px/1 var(--mono);
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink-2); }

.auth,
.page {
  position: relative;
  max-width: 480px;
  margin: 40px auto 96px;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
  padding: 44px 48px 40px;
  transform: rotate(0.35deg);
}
.page { max-width: 680px; }

.auth h1,
.page h1 {
  margin: 0 0 4px;
  font: 600 30px/1.15 var(--sans);
  color: var(--ink);
}
.auth .sub,
.page .sub {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.auth label,
.page label {
  display: block;
  margin: 16px 0 5px;
  font: 700 13px/1 var(--mono);
  color: var(--muted);
}
.auth input[type="text"],
.auth input[type="password"],
.auth input[type="email"],
.page input[type="text"],
.page input[type="password"],
.page input[type="email"],
.page textarea {
  width: 100%;
  padding: 10px 12px;
  font: 400 15px/1.4 var(--sans);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--kraft-edge);
  border-radius: 3px;
}
.auth input:focus,
.page input:focus,
.page textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  display: inline-block;
  margin-top: 22px;
  padding: 11px 18px;
  font: 600 14px/1 var(--sans);
  letter-spacing: 0;
  color: var(--ink-2);
  background: var(--kraft-light);
  border: 1px solid var(--kraft-edge);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.auth .alt {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.auth .alt a { color: var(--accent); }

.errorlist {
  margin: 6px 0 0;
  padding: 0 0 0 2px;
  list-style: none;
  font: 400 13px/1.4 var(--sans);
  color: var(--stamp);
}
.helptext {
  margin: 5px 0 0;
  padding: 0 0 0 2px;
  list-style: none;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.plan-per { font: 400 15px/1 var(--sans); color: var(--muted); }
.plan-deal {
  margin: 2px 0 0;
  font: 700 13px/1.3 var(--mono);
  color: var(--stamp);
}


/* Social sign-in buttons on login/signup. Quiet outline style so the email
   form stays the visually primary path. */
.oauth-row { display: grid; gap: 8px; margin: 14px 0 0; }
.oauth-row form { margin: 0; }
.oauth-btn {
  width: 100%;
  background: #fff;
  color: var(--ink, #1a1a1a);
  border: 1px solid var(--rule, #d9d4c8);
}
.oauth-btn:hover { background: #f6f5f1; }
.oauth-or {
  margin: 14px 0 2px;
  font-size: 12px;
  color: var(--muted, #8b8371);
  text-align: center;
}

/* Logo placements: beside the landing title, centered above the auth forms. */
.title { display: flex; align-items: center; gap: 18px; }
.title-logo { width: 108px; height: 108px; flex-shrink: 0; }
.auth-logo { display: block; margin: 0 auto 14px; width: 88px; height: 88px; }
@media (max-width: 560px) {
  .title { gap: 12px; }
  .title-logo { width: 64px; height: 64px; }
}


/* The pricing cards are the bins: chips fall in via plan-bins.js. */
.plans.is-bins { position: relative; }
.plans.is-bins .plan { position: relative; }
.plans.is-bins .plan .btn { display: inline-block; margin-top: 12px; }
.chip-well { height: 128px; }
.chip-layer {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.chip {
  position: absolute;
  top: 0; left: 0;
  width: 60px; height: 60px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--rule, #d9d4c8);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: transform;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.chip.is-dragging { cursor: grabbing; box-shadow: 0 6px 14px rgba(0,0,0,.22); }
.chip img { width: 40px; height: 40px; object-fit: contain; pointer-events: none; }
.chip-name {
  position: absolute;
  top: 0; left: 0;
  padding: 3px 9px;
  border-radius: 5px;
  background: #1a1a1a;
  color: #fff;
  font: 600 12px/1.3 var(--mono);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 80ms ease;
  margin-left: -30px;
}
.dives-blurb { margin: 18px 0 0; font: 400 14px/1.6 var(--sans); color: var(--muted); max-width: 60ch; }


/* Hero stamps: slam down one after another, then hold. The end frame lands
   exactly on the resting transform so nothing shifts after planting. */
.hero-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 16px 0 4px;
  max-width: 560px;
}
@keyframes stamp-slam {
  0%   { opacity: 0; transform: rotate(var(--tilt, -4deg)) scale(2.1); }
  55%  { opacity: 1; transform: rotate(var(--tilt, -4deg)) scale(.94); }
  100% { opacity: .88; transform: rotate(var(--tilt, -4deg)) scale(1); }
}
.stamp.slam {
  opacity: 0;
  animation: stamp-slam .34s cubic-bezier(.2, .9, .3, 1.35) both;
  animation-delay: var(--slam, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .stamp.slam { animation: none; opacity: .88; }
}


/* Fades out toward the left so the folder reads as the foreground. */
  -webkit-mask-image: linear-gradient(to left, black 55%, transparent 100%);
  mask-image: linear-gradient(to left, black 55%, transparent 100%);
}
#demo-folder {
  position: relative;
  z-index: 2;
  width: min(620px, 92%);
  /* The listing page's own header and photo stay readable above the
     folder - the backdrop is the joke's setup, not wallpaper. */
  padding-top: 150px;
}
.df-shell {
  position: relative;
  display: flex;
  background: #fefdfa;
  border: 1px solid #eae4d5;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.df-clip {
  position: absolute;
  top: -30px; right: 26px;
  width: 84px;
  z-index: 3;
  pointer-events: none;
}
.df-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 0 22px 0;
  margin-left: -12px;
}
.df-tab {
  border: 0;
  padding: 8px 10px 8px 16px;
  width: 118px;
  text-align: left;
  font: 700 10.5px/1.2 var(--mono);
  color: rgba(30,26,18,.82);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
  transform: rotate(-1.6deg);
}
.df-tab:nth-child(2n) { transform: rotate(1.4deg); }
.df-tab.is-active { transform: rotate(0deg) translateX(-5px); font-weight: 800; }
.df-sheet {
  flex: 1;
  min-height: 500px;
  padding: 26px 26px 22px;
  overflow: hidden;
}
.df-head { margin: 0 0 4px; font: 600 21px/1.25 var(--sans); color: #28251f; }
.df-sub-head { margin: 0 0 12px; font: 400 12.5px/1.4 var(--sans); color: #8b8371; border-bottom: 1px solid #e8e1d0; padding-bottom: 8px; }
.df-stamps { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 12px 0 4px; }
.df-stamp {
  display: inline-block;
  padding: 6px 12px 5px;
  border: 3px double #b3261e;
  border-radius: 3px;
  color: #b3261e;
  font: 700 13px/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  opacity: .9;
}
.df-stamp:nth-child(2n) { transform: rotate(2deg); }
.df-stamp.is-past { border-color: #8b8371; color: #8b8371; }
.df-stamp-sub { display: block; font-size: 9px; letter-spacing: .06em; margin-top: 2px; }
.df-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-top: 16px; }
.df-field { border-bottom: 1px solid #e8e1d0; padding: 6px 0; }
.df-k { display: block; font: 400 10.5px/1.3 var(--mono); color: #8b8371; }
.df-v { display: block; font: 600 16px/1.3 var(--sans); color: #28251f; }
.df-sub { display: block; font: 400 10.5px/1.3 var(--mono); color: #8b8371; font-style: normal; }
.df-records { list-style: none; margin: 0; padding: 0; }
.df-record { padding: 7px 0; border-bottom: 1px solid #e8e1d0; }
.df-record-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.df-record-title { font: 500 13px/1.35 var(--sans); color: #28251f; }
.df-record-date { font: 400 10.5px/1.3 var(--mono); color: #8b8371; flex-shrink: 0; }
.df-record-detail { margin: 2px 0 0; font: 400 11.5px/1.4 var(--sans); color: #8b8371; }
.df-note { margin: 10px 0 0 6px; font: 400 12px/1.4 var(--mono); color: #8b8371; }
@media (max-width: 900px) {
  .hero-demo { min-height: 0; }
  .hero-demo-bg { display: none; }
  #demo-folder { width: 100%; }
}


/* ── the hero: full-bleed, the real extension over the listing page ────── */
.hero-full {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 56px clamp(16px, 4vw, 72px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(340px, 500px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
}
.hero-copy { max-width: 520px; }
.hero-demo-note { margin: 22px 0 0; font: 400 13px/1.5 var(--mono); color: var(--muted); max-width: 42ch; }
.hero-demo {
  position: relative;
  align-self: stretch;
  height: 100%;
  min-height: 720px;
}
.hero-demo-bg {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  height: 86%;
  max-width: 100%;
  object-fit: cover;
  object-position: right top;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  /* Right-anchored, dissolving toward the page's center. */
  -webkit-mask-image: linear-gradient(to left, black 55%, transparent 100%);
  mask-image: linear-gradient(to left, black 55%, transparent 100%);
}
.hero-demo-frame {
  position: absolute;
  right: 0; top: 0;
  width: min(860px, 100%);
  height: 100%;
  border: 0;
  background: transparent;
  z-index: 2;
}
@media (max-width: 1020px) {
  .hero-full { grid-template-columns: 1fr; min-height: 0; }
  .hero-demo-bg { display: none; }
  .hero-demo { min-height: 720px; height: 760px; }
  .hero-demo-frame { width: 100%; right: 0; }
}

/* ── the install dialog ──────────────────────────────────────────────── */
.install-dialog {
  border: 1px solid var(--rule, #d9d4c8);
  border-radius: 0;
  padding: 20px 22px;
  max-width: 420px;
  width: calc(100% - 40px);
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.install-dialog::backdrop { background: rgba(20, 18, 12, .45); }
.install-dialog h2 { margin: 0 32px 12px 0; font: 600 17px/1.3 var(--sans); }
.install-close {
  position: absolute;
  top: 12px; right: 14px;
  border: 0; background: none;
  font: 400 26px/1 var(--sans);
  color: var(--muted, #8b8371);
  cursor: pointer;
}
.install-guide svg { width: 100%; height: auto; display: block; }
.install-copy { font: 400 12.5px/1.55 var(--sans); color: #444; margin: 12px 0 14px; }
.install-go { display: inline-block; border-radius: 0; }
@keyframes marker-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-2.4deg); }
  40% { transform: rotate(2deg); }
  60% { transform: rotate(-1.4deg); }
  80% { transform: rotate(1deg); }
}
.install-marker {
  transform-origin: 37px 415px;
  transform-box: view-box;
  animation: marker-wiggle 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .install-marker { animation: none; } }

/* ── sticky full-width header ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px clamp(16px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule, #e8e1d0);
}
.nav .brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; }
.nav .brand img { display: block; border-radius: 7px; }
.nav .links { display: flex; align-items: center; gap: 18px; }
.nav .plain {
  font: 600 14px/1 var(--sans);
  color: var(--ink-2, #56513f);
  text-decoration: none;
}
.nav .plain:hover { color: var(--ink, #28251f); }
.nav .plain-btn { border: 0; background: none; cursor: pointer; padding: 0; }
.nav .btn { margin: 0; padding: 8px 16px; }

/* ── the deep-dive term: dotted underline, instant hover tooltip ─────── */
.term {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: help;
  position: relative;
}
.term::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: 340px;
  max-width: 80vw;
  padding: 10px 12px;
  border-radius: 7px;
  background: #1e1a12;
  color: #fff;
  font: 400 12.5px/1.5 var(--sans);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 60;
}
.term:hover::after, .term:focus::after { opacity: 1; visibility: visible; }
