/* purrpdf.com — builds on the extension's tokens in /app/styles/base.css */

:root {
  --ink: #1d1b18;
  --hero-glow: #ffd9c9;
  --band-from: #ef6a3f;
  --band-to: #d9431c;
  --footer-bg: #1f1d1a;
  --footer-text: #cfc9bf;
  --max: 1160px;
  --narrow: 780px;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f1eee8; --hero-glow: #4a2414; --footer-bg: #100f0e; }
}

html { scroll-behavior: smooth; }
body {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; }
h1 { font-size: clamp(36px, 5.2vw, 60px); font-weight: 850; line-height: 1.05; margin: 0 0 18px; }
h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; line-height: 1.15; margin: 0 0 14px; }
h3 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
p { margin: 0 0 14px; }
a { color: var(--accent); }
code { font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.section { padding: 56px 24px; }
.section.tight { padding-top: 16px; padding-bottom: 16px; }
.section-head { max-width: 680px; margin: 0 auto 32px; }
/* Drawn icons that replace emoji inside text (src/ui-icons.js → iconize). */
.ei { display: inline-block; vertical-align: -0.12em; }
.ei-check-circle { color: var(--success); }
.ei-x-no { color: var(--danger); }
.ei-alert { color: #c47a00; }
.ei-heart, .ei-paw, .ei-bolt { color: var(--accent); }
.big-emoji .ei { color: var(--accent); }
.big-emoji .ico { width: 76px; height: 76px; stroke-width: 1.4; }
.hero-trust .ei { color: var(--accent); margin-inline-end: 2px; }
.site-footer .ei { color: inherit; }
.eyebrow .ico { margin-inline-end: 4px; vertical-align: -0.2em; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 14px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.big-emoji { font-size: 72px; margin: 0; }

/* Visually hidden until focused. clip-path (not a negative offset) so RTL pages don't get a scrollbar. */
.skip { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 100; padding: 8px 12px; border-radius: 8px; background: var(--surface); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip:focus { clip-path: none; width: auto; height: auto; overflow: visible; }

/* --- Buttons ---------------------------------------------------------------- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgb(228 87 46 / 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-cta:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 12px 28px rgb(228 87 46 / 0.4); }
.btn-cta .cta-chrome { width: 22px; height: 22px; flex: none; }
.btn-cta.small { padding: 9px 14px; font-size: 14px; border-radius: 10px; box-shadow: none; }
.btn-cta.small .cta-chrome { width: 18px; height: 18px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.btn-ghost:hover { background: var(--surface-2); }

/* --- Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 20px; font-weight: 850; letter-spacing: -0.02em; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a:not(.btn-cta), .nav-tools-btn {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.site-nav > a:not(.btn-cta):hover, .nav-tools-btn:hover, .site-nav > a[aria-current="page"] { background: var(--surface-2); }
.site-nav .btn-cta { margin-inline-start: 8px; }
.nav-tools { position: relative; }
.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  display: none;
  min-width: 240px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.12);
}
.nav-menu::before { content: ''; position: absolute; inset: -10px 0 auto; height: 10px; } /* bridges the gap so hover isn't lost on the way down */
.nm-ico { display: inline-block; margin-inline-end: 8px; color: var(--accent); }
.nav-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.nav-menu a:hover { background: var(--accent-soft); color: var(--accent); }
/* Desktop dropdown only; the mobile menu always shows the tools as a grid. */
@media (min-width: 921px) { .nav-tools:hover .nav-menu, .nav-tools.open .nav-menu, .nav-tools:focus-within .nav-menu { display: block; } }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; position: relative; width: 22px; height: 2px; margin: 0 auto; background: var(--ink); border-radius: 2px; content: '';
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { transition: transform 0.2s, top 0.2s, background 0.2s; }
.nav-toggle span::before { position: absolute; top: -7px; inset-inline-start: 0; }
.nav-toggle span::after { position: absolute; top: 7px; inset-inline-start: 0; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* --- Hero --------------------------------------------------------------------- */
.hero {
  padding: 64px 0 40px;
  background: radial-gradient(800px 420px at 85% 10%, var(--hero-glow), transparent 70%);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 28px 0 22px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; font-weight: 600; }
.hero-visual { position: relative; }
.hero-visual .app-shot { transform: rotate(1.2deg); }
.hero-badge {
  position: absolute;
  inset-inline-start: -18px;
  bottom: -14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--success);
  font-weight: 800;
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.16);
}
.hero-badge span { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }

/* Screenshot cropped to the app window (store images have a headline on top). */
.app-shot {
  direction: ltr; /* the crop below uses physical offsets */
  margin: 0;
  aspect-ratio: 1184 / 610;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgb(80 40 20 / 0.22), 0 0 0 1px rgb(0 0 0 / 0.06);
}
.app-shot img {
  display: block;
  width: calc(100% * 1280 / 1184);
  max-width: none;
  margin-left: calc(-100% * 48 / 1184);
  margin-top: calc(-100% * 160 / 1184);
}

/* --- Trust strip ------------------------------------------------------------- */
.trust-strip { border-block: 1px solid var(--border); background: var(--surface); }
.trust-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; padding-top: 18px; padding-bottom: 18px; font-weight: 700; color: var(--ink); }

/* --- Tool cards ------------------------------------------------------------------ */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tool-card-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.tool-card-link strong { color: var(--ink); font-size: 19px; }
.tool-card-link:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 30px rgb(228 87 46 / 0.12); }
.tc-icon { font-size: 22px; margin-bottom: 4px; }
.tc-go { margin-top: auto; padding-top: 8px; color: var(--accent); font-weight: 700; }

/* --- Feature rows ------------------------------------------------------------- */
.feature-rows { display: flex; flex-direction: column; gap: 72px; }
.feature-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.feature-row.reverse > :first-child { order: 2; }

.checklist { margin: 0 0 18px; padding: 0; list-style: none; }
.checklist li { padding: 5px 0; font-weight: 500; }
.checklist li.ck { display: flex; gap: 10px; align-items: flex-start; }
.ck-mark { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.ck-mark .ico { width: 14px; height: 14px; stroke-width: 2.6; vertical-align: 0; }

/* --- Comparison --------------------------------------------------------------- */
.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; }
.compare th, .compare td { padding: 16px 20px; border-bottom: 1px solid var(--border); text-align: start; }
.compare tr:last-child td { border-bottom: 0; }
.compare th { font-size: 15px; color: var(--muted); }
.compare th.us { color: var(--accent); font-size: 17px; }
.compare td.us { background: var(--success-soft); color: var(--success); font-weight: 700; }
.compare td:first-child { font-weight: 600; }

/* --- Steps ------------------------------------------------------------------------ */
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.steps p { margin: 0; color: var(--muted); }
.step-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

/* Home: every tool, in four groups (headings shared with the extension popup). */
.tool-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.tool-group h3 { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.tool-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 -10px;
  padding: 10px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s;
}
.tool-row strong { display: block; color: var(--ink); font-size: 16px; }
.tool-row .tile { font-size: 18px; }
.tool-row:hover, .tool-row:focus-visible { background: var(--surface); box-shadow: var(--shadow); }
.tool-row:hover strong { color: var(--accent); }
.tool-more { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; font-size: 13px; }
.tool-more span { flex-basis: 100%; color: var(--muted); font-weight: 700; }
.tool-more a { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
.tool-more a:hover { border-color: var(--accent); color: var(--accent); }

/* Hero quick links */
.hero-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -8px 0 22px; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-popular a { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
.hero-popular a:hover { border-color: var(--accent); color: var(--accent); }

/* "Buy us a coffee": uses the shared .shine look (see /app/styles/base.css). */
.btn-coffee {
  display: inline-flex;
  padding: 12px 20px;
  font-size: 16px;
  white-space: nowrap;
}
.nav-label { display: none; }
.support-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 24px 28px; border: 1px dashed var(--border); border-radius: 18px; }
.support-card > div { flex: 1 1 260px; min-width: 0; }
.support-card .btn-coffee { flex: none; white-space: nowrap; }
.support-card h2 { margin: 0 0 4px; font-size: 21px; }
.support-card p { margin: 0; color: var(--muted); }
.support-ico { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 26px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* --- Privacy panel / callouts --------------------------------------------------- */
.privacy-panel {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 44px;
  border-radius: 24px;
  background: var(--success-soft);
}
.privacy-panel .eyebrow { color: var(--success); }
.privacy-panel .checklist { padding: 22px 24px; border-radius: 16px; background: var(--surface); margin: 0; }
.callout { padding: 24px 28px; border: 1px solid var(--border); border-inline-start: 5px solid var(--accent); border-radius: 14px; background: var(--surface); }
.callout.ok { border-inline-start-color: var(--success); }
.callout h2 { font-size: 22px; }
.callout .checklist { margin: 0; }
.format-links { display: flex; flex-wrap: wrap; gap: 8px; }
.format-links a { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.format-links a:hover { border-color: var(--accent); color: var(--accent); }

/* --- FAQ ---------------------------------------------------------------------------- */
.faq { display: grid; gap: 10px; margin-bottom: 20px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.faq summary { position: relative; padding-block: 16px; padding-inline: 20px 48px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; inset-inline-end: 20px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 22px; font-weight: 600; }
.faq details[open] summary::after { content: '−'; }
.faq-a { padding: 0 20px 18px; color: var(--muted); }

/* --- CTA band ------------------------------------------------------------------- */
.cta-band { margin: 40px 0; padding: 48px 0; background: linear-gradient(135deg, var(--band-from), var(--band-to)); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; color: rgb(255 255 255 / 0.85); font-size: 18px; }
.cta-band .btn-cta { background: #fff; color: var(--band-to); box-shadow: 0 10px 30px rgb(80 20 0 / 0.3); }

/* --- Page hero & tool frame ---------------------------------------------------- */
.page-hero { padding: 56px 0 28px; background: radial-gradient(700px 300px at 50% 0%, var(--hero-glow), transparent 70%); }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 50px); }
.tool-section { padding-bottom: 24px; }
.tool-frame { border: 1px solid var(--border); border-radius: 18px; background: var(--bg); box-shadow: 0 20px 50px rgb(80 40 20 / 0.12); overflow: hidden; }
.tool-frame-bar { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--success); font-size: 14px; font-weight: 700; }
.dot-ok { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.tool-mount { padding: 24px; min-height: 220px; }
.tool-loading { margin: 60px 0; text-align: center; color: var(--muted); }

/* --- Prose (privacy, terms, about) --------------------------------------------- */
.prose h2 { margin-top: 36px; font-size: 24px; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.prose .callout h2 { margin-top: 0; }

/* --- Footer ---------------------------------------------------------------------- */
.site-footer { margin-top: 40px; padding: 56px 0 28px; background: var(--footer-bg); color: var(--footer-text); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .logo { color: #fff; }
.site-footer h3 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.site-footer a:not(.logo) { display: block; padding: 4px 0; color: var(--footer-text); text-decoration: none; }
.site-footer a:not(.logo):hover { color: #fff; }
.footer-brand p { margin: 12px 0 0; max-width: 320px; }
.badge-ok { color: #8fe0b0; font-weight: 700; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.1); font-size: 13px; }

/* --- Responsive ---------------------------------------------------------------------- */
@media (max-width: 920px) {
  .hero-grid, .feature-row, .privacy-panel { grid-template-columns: 1fr; gap: 32px; }
  .tool-groups { grid-template-columns: 1fr 1fr; }
  .feature-row.reverse > :first-child { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 480px; }
  .nav-toggle { display: block; }
  html.menu-open { overflow: hidden; }
  /* backdrop-filter would make the header the containing block of the fixed menu. */
  .site-header { backdrop-filter: none; background: var(--bg); }
  /* Full-screen menu under the header: big tap targets, tools as a grid, actions at the bottom. */
  .site-nav {
    position: fixed;
    inset: 68px 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 16px max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.18s, transform 0.18s, visibility 0s 0.18s;
  }
  .site-nav.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-label { display: block; margin: 4px 4px 8px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
  .nav-tools-btn { display: none; }
  .nav-menu { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; padding: 0; border: 0; box-shadow: none; background: none; }
  .nav-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font-size: 14px;
    line-height: 1.25;
  }
  .nm-ico { flex: none; margin: 0; font-size: 20px; }
  .site-nav > a:not(.btn-cta) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 6px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 17px;
  }
  .site-nav > a:not(.btn-cta)::after { content: '›'; color: var(--muted); font-size: 22px; }
  [dir="rtl"] .site-nav > a:not(.btn-cta)::after { content: '‹'; }
  .nav-tools { margin-bottom: 8px; }
  .lang-switch { margin-top: 8px; }
  .lang-switch summary { min-height: 52px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 16px; }
  .lang-switch summary::after { margin-inline-start: auto; }
  .lang-switch[open] summary { background: var(--surface); }
  .site-nav .btn-cta { margin: 8px 0 0; min-height: 52px; justify-content: center; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .tool-groups { grid-template-columns: 1fr; }
  .support-card { flex-direction: column; align-items: flex-start; padding: 22px; }
  .section { padding: 40px 16px; }
  .privacy-panel { padding: 24px; }
  .site-footer { padding-top: 40px; }
  .footer-grid { gap: 28px 20px; }
  .site-footer a:not(.logo) { overflow-wrap: anywhere; }
  .footer-bottom { flex-direction: column; margin-top: 28px; }
  .tool-mount { padding: 14px; }
  .hero-badge { inset-inline-start: 8px; }
  .btn-cta { width: 100%; justify-content: center; }
}

/* --- Feedback forms ------------------------------------------------------------- */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgb(80 40 20 / 0.08);
}
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; border: 0; }
.choices legend, .field > span { margin-bottom: 8px; padding: 0; font-weight: 700; color: var(--ink); }
.choices.stacked { flex-direction: column; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.choices.stacked .choice > span { display: flex; border-radius: 12px; }
.choice .ei { margin-inline-end: 7px; }
.choice > span:hover { border-color: var(--accent); }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: flex; flex-direction: column; }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field textarea, .field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.field textarea:focus, .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.form-note { margin: 0; font-size: 14px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; }
.form-actions .btn-cta { border: 0; cursor: pointer; font-family: inherit; }
.form-actions .btn-cta:disabled { opacity: 0.6; cursor: default; }
.form-status { margin: 0; min-height: 1.5em; color: var(--danger); font-weight: 600; }
.form-done { padding: 40px 28px; border-radius: 18px; background: var(--success-soft); text-align: center; }
.form-done h2 { color: var(--success); }
.muted-note { margin-top: 20px; color: var(--muted); font-size: 14px; }
/* Honeypot: hidden from people, visible to naive bots. */
.hp { position: absolute !important; width: 1px; height: 1px; opacity: 0; clip-path: inset(50%); overflow: hidden; pointer-events: none; }

/* --- Language switcher ------------------------------------------------------------ */
.lang-switch { position: relative; }
.lang-switch summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-inline-start: 4px;
  border-inline-end: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
  opacity: 0.6;
}
.lang-switch[open] summary::after { transform: translateY(1px) rotate(225deg); }
.lang-switch summary:hover, .lang-switch[open] summary { background: var(--surface-2); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 60;
  display: grid;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.12);
}
.lang-menu a { padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; text-decoration: none; }
.lang-menu a:hover { background: var(--accent-soft); color: var(--accent); }
.lang-menu a[aria-current] { font-weight: 800; color: var(--accent); }
@media (max-width: 920px) {
  .lang-menu { position: static; grid-template-columns: 1fr 1fr; gap: 4px; min-width: 0; box-shadow: none; border: 0; padding: 8px 0 0; background: none; }
  .lang-menu a { display: flex; align-items: center; gap: 6px; min-height: 44px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; }
}

/* Right-to-left (Arabic) */
[dir="rtl"] .hero-visual .app-shot { transform: rotate(-1.2deg); }
[dir="rtl"] .tc-go, [dir="rtl"] .text-link { unicode-bidi: plaintext; }

/* Header donate pill, next to the logo. */
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.head-donate { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; background: linear-gradient(135deg, #ff9a5a, var(--accent)); box-shadow: 0 4px 12px rgb(228 87 46 / 0.3); transition: transform 0.15s; }
.head-donate:hover { transform: translateY(-1px) scale(1.04); }
.hd-emoji { display: inline-block; transform-origin: 70% 80%; animation: hd-wiggle 3.5s ease-in-out infinite; }
@keyframes hd-wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-14deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .hd-emoji { animation: none; } }
.footer-brand .head-donate { display: inline-flex; width: fit-content; margin-top: 14px; padding: 8px 16px !important; color: #fff !important; }

/* Home: tool picker + live tool */
.home-app { padding-top: 28px; padding-bottom: 40px; }
.home-h1 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 36px); line-height: 1.2; text-align: center; }
.home-sub { margin: 0 0 18px; color: var(--success); font-size: 15px; font-weight: 700; text-align: center; }
.home-text p { color: var(--muted); font-size: 17px; }
.picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: center; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.pick:hover { border-color: var(--accent); }
.pick.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.pick strong { font-size: 14px; line-height: 1.2; }
.pick-count { min-height: 1.2em; color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 920px) { .picker { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .picker { grid-template-columns: repeat(3, 1fr); gap: 8px; } .pick { padding: 10px 4px 8px; } .pick strong { font-size: 12px; } }
.home-tasks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.task { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.task:hover { border-color: var(--accent); }
.task h2 { margin: 8px 0 0; font-size: 17px; }
.task p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
@media (max-width: 920px) { .home-tasks { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .home-tasks { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* Tool animations: 3-second loops */
.anim { width: 100%; height: auto; border-radius: 10px; background: var(--accent-soft); }
.anim .d { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.anim .l { stroke: var(--border); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.anim .ac { fill: var(--accent); }
.anim .acs, .anim .sig, .anim .sh, .anim .ar, .anim .cut { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.anim .cut { stroke-width: 1.5; stroke-dasharray: 3 3; opacity: 0; }
.anim .bars rect { fill: var(--text); }
.anim .num, .anim .wm { fill: var(--accent); font: 800 11px/1 system-ui, sans-serif; text-anchor: middle; }
.anim .wm { font-size: 13px; opacity: 0; }
.anim g, .anim .sh, .anim .bars rect { transform-box: fill-box; transform-origin: center; }
.anim *, .anim { animation-duration: 3s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.a-compress .m { animation-name: k-shrink; }
.a-compress .ar { animation-name: k-pulse; }
.a-merge .m1 { animation-name: k-in-l; } .a-merge .m2 { animation-name: k-in-r; }
.a-organize .m1 { animation-name: k-out-l; } .a-organize .m2 { animation-name: k-out-r; } .a-organize .cut { animation-name: k-show; }
.a-rotate .m { animation-name: k-rot; }
.a-sign .sig { stroke-dasharray: 60; animation-name: k-draw; }
.a-page-numbers .num { opacity: 0; animation-name: k-show; } .a-page-numbers .n2 { animation-delay: .8s; } .a-page-numbers .n3 { animation-delay: 1.6s; }
.a-page-numbers .n1 { animation-name: k-n1; } .a-page-numbers .n2 { animation-name: k-n2; animation-delay: 0s; } .a-page-numbers .n3 { animation-name: k-n3; animation-delay: 0s; }
.a-watermark .wm { animation-name: k-show; }
.a-unlock .sh { animation-name: k-open; } .a-protect .sh { animation-name: k-close; }
.a-unlock .fade, .a-protect .fade { opacity: .55; animation: none; }
.a-redact .bars rect { transform-origin: left center; animation-name: k-bar; } .a-redact .bars rect:nth-child(2) { animation-delay: .25s; } .a-redact .bars rect:nth-child(3) { animation-delay: .5s; }
.a-images-to-pdf .m { animation-name: k-into; } .a-pdf-to-images .m { animation-name: k-out; }
@keyframes k-shrink { 0%, 15% { transform: scale(1); } 50%, 85% { transform: scale(.55); } 100% { transform: scale(1); } }
@keyframes k-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes k-in-l { 0%, 15% { transform: none; } 50%, 85% { transform: translateX(20px); } 100% { transform: none; } }
@keyframes k-in-r { 0%, 15% { transform: none; } 50%, 85% { transform: translateX(-20px) translateY(4px); } 100% { transform: none; } }
@keyframes k-out-l { 0%, 15% { transform: none; } 50%, 85% { transform: translateX(-14px); } 100% { transform: none; } }
@keyframes k-out-r { 0%, 15% { transform: none; } 50%, 85% { transform: translateX(14px); } 100% { transform: none; } }
@keyframes k-show { 0%, 15% { opacity: 0; } 40%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes k-rot { 0%, 20% { transform: rotate(0); } 55%, 85% { transform: rotate(90deg); } 100% { transform: rotate(0); } }
@keyframes k-draw { 0%, 10% { stroke-dashoffset: 60; } 55%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 60; } }
@keyframes k-n1 { 0%, 28% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes k-n2 { 0%, 33% { opacity: 0; } 38%, 62% { opacity: 1; } 67%, 100% { opacity: 0; } }
@keyframes k-n3 { 0%, 66% { opacity: 0; } 72%, 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes k-open { 0%, 15% { transform: none; } 45%, 85% { transform: translateY(-6px) rotate(-18deg); } 100% { transform: none; } }
@keyframes k-close { 0%, 15% { transform: translateY(-6px) rotate(-18deg); } 45%, 85% { transform: none; } 100% { transform: translateY(-6px) rotate(-18deg); } }
@keyframes k-bar { 0%, 10% { transform: scaleX(0); } 40%, 85% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes k-into { 0%, 10% { transform: none; opacity: 1; } 55% { transform: translate(52px, 6px) scale(.5); opacity: 0; } 100% { transform: none; opacity: 0; } }
@keyframes k-out { 0%, 10% { transform: translateX(-30px) scale(.5); opacity: 0; } 55%, 85% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .anim *, .anim { animation: none !important; } .anim .num.n1, .anim .wm, .anim .cut { opacity: 1; } }
