/* Download Webpage as PDF site: home page, Welcome Page, Uninstall Page, "thank you", privacy policy, 404.
   Colours follow the extension window (extension/src/popup.css: ink #1c1b19, red #c8372d), darkened or lightened
   where text needs AA contrast. System fonts only (they cover Latin and Cyrillic); nothing is loaded from other sites.
   No inline styles anywhere, so the Content-Security-Policy can say style-src 'self'. */
:root {
  color-scheme: light dark;
  --bg: #f7f7f5; --surface: #ffffff; --surface-2: #f0f1f2; --fg: #1c1b19; --muted: #565b62; --placeholder: #6b7078;
  --border: #dfe1e4; --primary: #b3261e; --primary-hover: #93201a; --on-primary: #ffffff; --ring: #b3261e;
  --tint: #fbe9e7; --accent: #1d6b40; --accent-soft: #e2f2e8; --warn-soft: #fff4d6; --warn-line: #e0b443;
  --chrome: #e7e9ec; --chrome-fg: #3b4048; --omni: #ffffff;
  --shadow: 0 1px 2px rgb(28 27 25 / .06), 0 8px 24px rgb(28 27 25 / .08);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;
  --hand: "Segoe Print", "Ink Free", "Bradley Hand", "Noteworthy", "Comic Sans MS", cursive;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416; --surface: #1b1e22; --surface-2: #23272c; --fg: #eceae6; --muted: #a9aeb5; --placeholder: #8e949c;
    --border: #30343a; --primary: #ff8f80; --primary-hover: #ffb3a8; --on-primary: #1c1b19; --ring: #ffb3a8;
    --tint: #3a2321; --accent: #7fd6a4; --accent-soft: #173323; --warn-soft: #33290f; --warn-line: #9c7a23;
    --chrome: #262a30; --chrome-fg: #c9cdd3; --omni: #1b1e22;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
figure, picture { margin: 0; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
a:focus-visible, button:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }
code { font: .9em var(--mono); overflow-wrap: anywhere; }
.ico { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 20px 0; font-weight: 650; font-size: 18px; color: var(--fg); text-decoration: none; }
.brand:hover { color: var(--fg); }
.brand img { width: 32px; height: 32px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 4px 12px 4px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; line-height: 20px; }
h1 { margin: 0 0 16px; font-size: clamp(28px, 5vw, 42px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.lead { margin: 0 0 28px; max-width: 620px; color: var(--muted); font-size: 18px; }
.section-title { margin: 0 0 20px; font-size: 24px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }

.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 650;
  text-decoration: none; background: var(--primary); color: var(--on-primary); }
.btn:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn.ghost { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); }
.btn.ghost:hover { background: var(--surface-2); color: var(--fg); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
[hidden] { display: none !important; }

/* ===== Screenshots of the real extension window (360×400 CSS px, taken at 2×) ===== */
.popup-shot { display: block; width: 300px; max-width: 100%; height: auto; aspect-ratio: 720 / 800; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }

/* ===== Home page ===== */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; padding: 24px 0 48px; }
.features { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.features li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.features h2 { margin: 0 0 6px; font-size: 18px; line-height: 1.35; }
.features p { margin: 0; color: var(--muted); }
.features .ico { width: 28px; height: 28px; margin-bottom: 10px; color: var(--primary); }

/* "Good to know": honest limits, the same list on the home page and the Welcome Page */
.know { margin: 0 0 56px; }
.know ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.know li { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.know li .ico { color: var(--fg); margin-top: 2px; }

/* ===== Welcome Page: pin first (works without JavaScript), then how to use, then what Chrome shows ===== */
.pin { padding: 16px 0 48px; }
.pin h1 { margin-bottom: 12px; }
.usage, .chrome-says { padding: 40px 0 48px; border-top: 1px solid var(--border); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; position: relative; padding-left: 48px; }
.step::before { content: counter(step); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 650; font-size: 16px; }
.step h3 { margin: 0; font-size: 20px; line-height: 32px; font-weight: 650; }
.step p { margin: 6px 0 0; color: var(--muted); }
.pin .steps { display: grid; gap: 20px; margin-top: 28px; }
.usage .step { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px 40px; align-items: start;
  padding-top: 32px; padding-bottom: 32px; border-top: 1px solid var(--border); }
.usage .step:first-child { border-top: 0; padding-top: 0; }
.usage .step::before { top: 32px; }
.usage .step:first-child::before { top: 0; }
.usage .step-shot { justify-self: center; }
.usage .step.text-only { grid-template-columns: minmax(0, 1fr); }

/* what Chrome shows: the install warning and the drawn yellow bar */
.says { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.says li { padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.says p { margin: 0; color: var(--muted); }
.says h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.35; }
.debug-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft);
  border: 1px solid var(--warn-line); color: var(--fg); font-size: 14px; }
.debug-bar .ico { color: var(--fg); }
.debug-bar .bar-text { flex: 1; min-width: 0; height: 8px; border-radius: 4px; background: currentColor; opacity: .25; }
.debug-bar .bar-btn { flex: none; padding: 2px 10px; border-radius: 6px; border: 1px solid var(--warn-line); background: var(--surface); font-weight: 600; }
.note { display: flex; gap: 12px; margin: 24px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--fg); font-size: 15px; }
.note .ico { color: var(--accent); margin-top: 2px; }

/* ===== The drawn Chrome toolbar and extensions menu (not a screenshot: stays sharp, follows the theme and the language) ===== */
.browser { position: relative; max-width: 560px; border: 1px solid var(--border); border-radius: 12px; background: var(--chrome);
  box-shadow: var(--shadow); color: var(--chrome-fg); }
.tb { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.tb-nav { display: flex; gap: 2px; }
.tb-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; }
.tb-omni { flex: 1; min-width: 0; height: 32px; margin: 0 6px; border-radius: 16px; background: var(--omni); display: flex; align-items: center;
  padding: 0 14px; font-size: 14px; color: var(--placeholder); white-space: nowrap; overflow: hidden; }
.tb-avatar { width: 24px; height: 24px; margin: 0 4px; border-radius: 50%; background: var(--placeholder); opacity: .5; }
.menu { position: relative; margin: 0 10px 12px auto; width: min(320px, calc(100% - 20px)); border-radius: 8px; background: var(--surface);
  color: var(--fg); box-shadow: var(--shadow); border: 1px solid var(--border); font-size: 14px; line-height: 20px; }
.menu-title { padding: 12px 16px 8px; font-weight: 650; }
.menu-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; }
.menu-row img { width: 20px; height: 20px; }
.menu-name { flex: 1; min-width: 0; }
.menu-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); }
.menu-foot { padding: 10px 16px 12px; border-top: 1px solid var(--border); color: var(--muted); }
.dots { width: 4px; height: 16px; background: radial-gradient(circle, currentColor 1.6px, transparent 2px) 0 0 / 4px 6px repeat-y; }

/* highlighted target: a ring with a breathing wave */
.hl { background: var(--tint); color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.hl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--primary); opacity: 0;
  animation: wave 2.4s ease-out infinite; pointer-events: none; }
.mark { position: absolute; top: -10px; right: -10px; z-index: 1; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 50%; background: var(--primary); color: var(--on-primary); font: 650 13px/1 var(--font); box-shadow: 0 0 0 2px var(--surface); }
@keyframes wave { 0% { opacity: .6; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.6); } }

/* ===== A pencil note "Click here" with an arrow up to the real Chrome toolbar (top right of the window) ===== */
.to-toolbar { position: absolute; top: 6px; right: 150px; width: 180px; height: 110px; color: var(--primary); pointer-events: none; }
.to-toolbar svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round;
  stroke-linejoin: round; filter: url(#pencil); animation: nudge 1.8s ease-in-out 1.6s infinite; }
.to-toolbar path { stroke-dasharray: 1 2; stroke-dashoffset: 1; animation: draw .6s ease-in-out .5s forwards; }
.to-toolbar .head { animation-duration: .25s; animation-delay: 1.1s; }
.to-toolbar span { position: absolute; top: 24px; right: calc(100% - 58px); font: 600 24px/1 var(--hand); white-space: nowrap;
  transform: rotate(-5deg); clip-path: inset(-30% 100% -30% -10%); animation: write .5s ease-out forwards; }
@keyframes write { to { clip-path: inset(-30% -10% -30% -10%); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes nudge { 50% { transform: translate(4px, -4px); } }
.defs { position: absolute; }

/* ===== Uninstall Page and "thank you" (built by scripts/build-pages.mjs; works without JavaScript) ===== */
.uninstall { padding: 16px 0 56px; max-width: 720px; }
.card-form { margin: 0 0 24px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.reasons { margin: 0 0 20px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.reasons legend { padding: 0; margin: 0 0 14px; }
.reasons legend h2 { margin: 0; font-size: 20px; line-height: 1.35; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chip { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: 8px 16px; border-radius: 22px; cursor: pointer;
  background: var(--surface-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); font-weight: 550; line-height: 1.35; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--primary); }
.sr:checked + .chip { background: var(--tint); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.sr:focus-visible + .chip { outline: 3px solid var(--ring); outline-offset: 3px; }
/* the hint of a chosen reason: inputs come first in the fieldset, so "~" reaches the hints after them */
.hint { display: none; flex-basis: 100%; margin: 6px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--fg); font-size: 15px; }
#r-layout:checked ~ .hint-layout, #r-missing-content:checked ~ .hint-missing-content, #r-debugger-warning:checked ~ .hint-debugger-warning,
#r-page-failed:checked ~ .hint-page-failed, #r-feature-missing:checked ~ .hint-feature-missing { display: block; }
.field { display: block; margin: 0 0 20px; }
.field span { display: block; margin: 0 0 6px; font-weight: 600; }
.field textarea { display: block; width: 100%; min-height: 104px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font: inherit; resize: vertical; }
.field textarea:focus-visible { outline: 3px solid var(--ring); outline-offset: 1px; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.card-form .btn { border: 0; cursor: pointer; font: inherit; font-weight: 650; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* messages the form handler sends the visitor back to: #form-error (no reason chosen), #form-unavailable (not saved) */
.form-msg { display: none; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--primary); color: var(--fg); font-weight: 600; }
.form-msg:target { display: block; }
/* the form switched off (FEEDBACK_CONFIGURED = false in scripts/build-pages.mjs): a visible notice, greyed controls */
.form-off { display: flex; gap: 12px; margin: 0 0 20px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft);
  border: 1px solid var(--warn-line); color: var(--fg); font-weight: 600; }
.form-off .ico { margin-top: 2px; }
.is-off .reasons, .is-off .field, .is-off .btn { opacity: .55; }
.is-off .chip, .is-off .btn { cursor: not-allowed; }
.is-off .chip:hover { box-shadow: inset 0 0 0 1px var(--border); }
.thanks .back-q { margin: 32px 0 12px; font-weight: 600; }
.pick { list-style: none; margin: 0 0 40px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pick a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border); color: var(--fg); text-decoration: none; font-weight: 600; }
.pick a:hover { box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary); }

/* ===== Privacy policy (English only) ===== */
.policy { max-width: 720px; padding: 16px 0 56px; }
.policy .updated { margin: 0 0 28px; color: var(--muted); }
.policy .summary { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin: 0 0 8px; }
.policy .summary h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 18px; }
.policy .summary ul { margin: 0; }
.policy h2 { margin: 40px 0 12px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 22px; line-height: 1.3; font-weight: 650; }
.policy p, .policy ul { margin: 0 0 14px; }
.policy ul { padding-left: 22px; }
.policy li { margin: 0 0 6px; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.policy table { width: 100%; border-collapse: collapse; font-size: 15px; }
.policy th, .policy td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.policy th { color: var(--muted); font-weight: 600; }

/* ===== 404 ===== */
.notfound { padding: 48px 0 80px; }

/* ===== Footer and language switch ===== */
footer { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 14px; line-height: 1.6; }
footer p { margin: 0 0 10px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--primary); }
.langs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; padding: 0; list-style: none; }
.langs a[aria-current="true"] { color: var(--fg); font-weight: 650; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .to-toolbar path { stroke-dasharray: none; }
  .to-toolbar span { clip-path: none; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero .popup-shot { margin: 0 auto; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .usage .step { grid-template-columns: minmax(0, 1fr); }
  .usage .step-shot { justify-self: start; }
  .tb-nav { display: none; }
  .to-toolbar { display: none; }
}
@media (max-width: 420px) {
  .step { padding-left: 44px; }
  .menu { width: calc(100% - 20px); }
  .card-form { padding: 18px; }
}
