
      button, [role="button"], select, summary, input:not([type="checkbox"], [type="radio"]) { min-height: 2.5rem; }
      * { box-sizing: border-box; }
      [hidden] { display: none !important; }
      /* ---------- Design tokens — Direction C "Friendly Utility" (design-system/pdfree/MASTER.md) ----------
         Supersedes the teal/Swiss system at the owner's direction 2026-11-12 (visual mockup pick).
         Bright white app · ink #1F2430 · brand coral #E23A2E · amber #F5A623 (decorative only).
         CONTRAST (WCAG AA, measured): brand coral #E23A2E on white is 4.30:1 — it carries
         large text, icons, borders and fills only, never small text. Every text-bearing red
         surface uses the deeper action red #C1271B (white on it 5.88:1; it on white 5.88:1;
         hover #A61E16, white on it 7.45:1). Secondary text #5B6472 on white is 5.98:1.
         Category tints pair a soft surface with a dark ink, each ≥4.65:1 (see MASTER.md table).
         Amber is never text on white (2.03:1) — highlights, stars and graphics only. */
      :root {
        --color-primary: #E23A2E; --color-secondary: #F5A623; --color-accent: #C1271B;
        --color-foreground: #1F2430; --color-muted-foreground: #5B6472; --color-card: #FFFFFF;
        --color-destructive: #B42318; --color-ring: #E23A2E;
        --bg: #FFFFFF;
        --bg-2: #F6F7F9;
        --hero-wash: #FFFFFF;
        --stage: #ECEEF2;
        --surface: #FFFFFF;
        --surface-2: #F1F2F5;
        --ink: #1F2430;
        --ink-soft: #3D4454;
        --ink-faint: #5B6472;
        --line: #C9CEDA;
        --line-soft: #E3E6EC;
        --brand: #E23A2E;
        --accent: #E23A2E;
        --accent-hover: #C1271B;
        --accent-text: #C1271B;
        --accent-soft: #FFE3E0;
        --accent-ink: #FFFFFF;
        --cta: #C1271B;
        --cta-hover: #A61E16;
        --cta-ink: #FFFFFF;
        --amber: #F5A623;
        --ring: rgba(226,58,46,.42);
        --good: #177245;
        --good-soft: #DDF3E4;
        --red: #DC2626;
        --red-text: #B42318;
        --red-soft: #FDECEC;
        --warn-soft: #FFF3D6;
        --drop-bg: #FFF7F6;
        --strip: #1F2430;
        --tint-1: #FFE3E0; --tint-ink-1: #B71C1C;
        --tint-2: #FFF0C9; --tint-ink-2: #8A5A00;
        --tint-3: #DDF3E4; --tint-ink-3: #14632F;
        --tint-4: #DCEBFF; --tint-ink-4: #174EA6;
        --tint-5: #F0DFFF; --tint-ink-5: #5B21B6;
        --tint-6: #FFE7F3; --tint-ink-6: #9D174D;
        --shadow: 0 1px 2px rgba(31,36,48,.05);
        --shadow-float: 0 10px 30px rgba(31,36,48,.10);
        --shadow-lg: 0 16px 44px rgba(31,36,48,.14);
        --radius: 16px;
        --radius-s: 12px;
      }
      /* Dark variant of C — same discipline, measured pairs in MASTER.md:
         ink #F4F5F8 on bg 15.9:1 · soft #C9CEDA 10.6:1 · faint #A8B0C2 7.7:1 ·
         accent text #FF8A80 on bg 7.3:1 / on surface 6.8:1 · white on CTA #D92D20 4.83:1 ·
         every dark tint pair ≥7.9:1. */
      @media (prefers-color-scheme: dark) {
        :root:not([data-theme="light"]) {
          --bg: #151922; --bg-2: #1B202B; --hero-wash: #151922; --stage: #0F1219;
          --surface: #1F2430; --surface-2: #262C3A;
          --ink: #F4F5F8; --ink-soft: #C9CEDA; --ink-faint: #A8B0C2;
          --line: #3A4152; --line-soft: #2B3140;
          --brand: #FF7A6E;
          --accent: #FF7A6E; --accent-hover: #FF8A80; --accent-text: #FF8A80; --accent-soft: #3D2422;
          --cta: #D92D20; --cta-hover: #C1271B;
          --amber: #FFB020;
          --ring: rgba(255,122,110,.5);
          --good: #4ADE80; --good-soft: #1E3325; --red: #FF8A80; --red-text: #FFB4AB; --red-soft: #3A2226; --warn-soft: #38300F;
          --drop-bg: #2A1E1C; --strip: #262C3A;
          --tint-1: #3D2422; --tint-ink-1: #FFB4AB;
          --tint-2: #3A2F16; --tint-ink-2: #FFD98A;
          --tint-3: #1E3325; --tint-ink-3: #A7E8BD;
          --tint-4: #1E2E4A; --tint-ink-4: #A8C7FA;
          --tint-5: #2E2145; --tint-ink-5: #D3BBFF;
          --tint-6: #3A1F2E; --tint-ink-6: #FFB1C8;
          --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-float: 0 10px 30px rgba(0,0,0,.5); --shadow-lg: 0 16px 44px rgba(0,0,0,.55);
        }
      }
      :root[data-theme="dark"] {
        --bg: #151922; --bg-2: #1B202B; --hero-wash: #151922; --stage: #0F1219;
        --surface: #1F2430; --surface-2: #262C3A;
        --ink: #F4F5F8; --ink-soft: #C9CEDA; --ink-faint: #A8B0C2;
        --line: #3A4152; --line-soft: #2B3140;
        --brand: #FF7A6E;
        --accent: #FF7A6E; --accent-hover: #FF8A80; --accent-text: #FF8A80; --accent-soft: #3D2422;
        --cta: #D92D20; --cta-hover: #C1271B;
        --amber: #FFB020;
        --ring: rgba(255,122,110,.5);
        --good: #4ADE80; --good-soft: #1E3325; --red: #FF8A80; --red-text: #FFB4AB; --red-soft: #3A2226; --warn-soft: #38300F;
        --drop-bg: #2A1E1C; --strip: #262C3A;
        --tint-1: #3D2422; --tint-ink-1: #FFB4AB;
        --tint-2: #3A2F16; --tint-ink-2: #FFD98A;
        --tint-3: #1E3325; --tint-ink-3: #A7E8BD;
        --tint-4: #1E2E4A; --tint-ink-4: #A8C7FA;
        --tint-5: #2E2145; --tint-ink-5: #D3BBFF;
        --tint-6: #3A1F2E; --tint-ink-6: #FFB1C8;
        --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-float: 0 10px 30px rgba(0,0,0,.5); --shadow-lg: 0 16px 44px rgba(0,0,0,.55);
      }
      /* ---------- Design tokens ----------
         One scale for the whole product. Breakpoints used across the app:
         ≤359 micro phone · ≤480 small phone · ≤700 large phone · ≤900 tablet portrait ·
         ≤1200 tablet / small laptop · ≥1201 full desktop workspace. */
      :root {
        --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
        --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-pill: 980px;
        --fs-caption: 13px; --fs-small: 14.5px; --fs-body: 16px; --fs-lead: 17.5px; --fs-h3: 20px;
        --fs-h2: clamp(26px, 4vw, 36px); --fs-h1: clamp(32px, 5.2vw, 48px);
        --fs-display: clamp(36px, 5.6vw, 54px);
        --nav-h: 58px; --tap: 44px;
      }
      html { scroll-behavior: smooth; }
      body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
      /* Visible keyboard focus everywhere (WCAG 2.2 AA) — ring in brand coral */
      :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
      input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--ring); outline-offset: 0; }
      /* Tabular figures wherever numbers must not jitter: sizes, counts, stats */
      .fi-meta, .fi-badge, .r-sub, .viewer-sub, .et-num, .pc-num, .h-when, .fs-status, .sl-meta, .ed-pageinfo-num { font-variant-numeric: tabular-nums; }
      .skip-link { position: fixed; left: 14px; top: -70px; z-index: 200; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; text-decoration: none; transition: top .15s ease; }
      .skip-link:focus-visible { top: 10px; outline-color: var(--bg); }
      .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
      .wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
      a { color: var(--accent-text); }

      /* ---------- Top nav ---------- */
      .topnav { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 6px solid var(--brand); border-bottom: 1px solid var(--line-soft); }
      .topnav-in { max-width: 1080px; margin: 0 auto; padding: 0 22px; height: 58px; display: flex; align-items: center; gap: 18px; }
      .logo { font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; flex: none; }
      .logo .logo-mark { width: 31px; height: 31px; border-radius: 10px; background: var(--tint-1); color: var(--tint-ink-1); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; letter-spacing: -.02em; }
      .logo em { font-style: normal; color: var(--brand); }
      .nav-links { display: flex; gap: 4px; margin: 0 auto; align-items: center; }
      .nav-links > button { border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 13.5px; font-weight: 500; padding: 8px 12px; border-radius: 980px; cursor: pointer; min-height: 36px; }
      .nav-links > button:hover { color: var(--ink); background: var(--surface-2); }
      .navdrop { position: relative; }
      .navdrop-btn { border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 13.5px; font-weight: 500; padding: 8px 12px; border-radius: 980px; cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; gap: 5px; }
      .navdrop-btn:hover, .navdrop.open .navdrop-btn { color: var(--ink); background: var(--surface-2); }
      .navdrop-menu { display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); min-width: 264px; max-width: min(320px, 92vw); max-height: 68vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); box-shadow: var(--shadow-float); padding: 8px; z-index: 70; }
      .navdrop:last-of-type .navdrop-menu { left: auto; right: 0; transform: none; }
      .navdrop.open .navdrop-menu { display: block; }
      .nav-links > button, .navdrop-btn { white-space: nowrap; }
      #nav-menu { display: none; }
      @media (hover: hover) and (min-width: 1181px) { .navdrop:hover .navdrop-menu { display: block; } }
      @media (max-width: 1340px) and (min-width: 1181px) { .topnav-in { gap: 10px; padding: 0 16px; } .nav-links { gap: 0; } .nav-links > button, .navdrop-btn { padding: 8px 8px; font-size: 13px; } }
      .navdrop-menu .nd-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 10px 4px; }
      .navdrop-menu button.nd-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; padding: 8px 10px; border-radius: 9px; cursor: pointer; min-height: 38px; }
      .navdrop-menu button.nd-item:hover { background: var(--surface-2); }
      .navdrop-menu button.nd-item svg { color: var(--accent); flex: none; }
      .navdrop-menu button.nd-all { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line-soft); background: transparent; color: var(--accent-text); font: inherit; font-size: 13.5px; font-weight: 600; padding: 10px; margin-top: 4px; cursor: pointer; min-height: 38px; }

      .nav-actions { display: flex; gap: 6px; flex: none; margin-left: auto; }
      .nav-links + .nav-actions { margin-left: 0; }
      .iconbtn-nav { width: 38px; height: 38px; min-height: 38px; border: 0; background: transparent; color: var(--ink-soft); border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
      .iconbtn-nav:hover { background: var(--surface-2); color: var(--ink); }
      /* Compact navigation (tablet and below): hamburger + full-width menu panel */
      @media (max-width: 1180px) { #nav-menu { display: inline-flex; } .nav-links { display: none; } .nav-links.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line-soft); padding: 10px 22px 16px; gap: 2px; max-height: calc(100dvh - 64px); overflow: auto; box-shadow: var(--shadow-lg); } .nav-links.open > button { text-align: left; font-size: 16px; padding: 12px; min-height: 48px; } .nav-links.open .navdrop-btn { font-size: 16px; padding: 12px; width: 100%; justify-content: space-between; min-height: 48px; } .navdrop-menu { position: static; transform: none; box-shadow: none; border: 0; border-radius: 0; max-height: none; min-width: 0; padding: 0 0 6px 12px; } .navdrop-menu button.nd-item { min-height: 44px; font-size: 15px; } }

      /* ---------- Hero (C: headline, then the drop zone IS the hero) ---------- */
      .hero { text-align: center; padding: 34px 6px 10px; margin-top: 0; background: transparent; border: 0; }
      .hero h1 { font-size: var(--fs-display); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin: 0 auto; max-width: 780px; }
      .hero h1 .free { color: var(--brand); }
      .hero .sub { font-size: clamp(16.5px, 2.4vw, 19px); color: var(--ink-faint); line-height: 1.55; margin: 14px auto 0; max-width: 640px; font-weight: 400; }
      .trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; margin: 24px auto 0; max-width: 820px; background: var(--strip); border-radius: 999px; padding: 13px 22px; }
      .trust span { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: #FFFFFF; }
      .trust svg { color: var(--amber); flex: none; }
      .searchbox { max-width: 620px; margin: 22px auto 0; position: relative; }
      .hero .searchbox { max-width: 820px; margin-top: 14px; }
      .searchbox svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
      .searchbox input { width: 100%; font: inherit; font-size: 16.5px; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 980px; padding: 15px 22px 15px 50px; min-height: 56px; }
      .searchbox input:focus { outline: 3px solid var(--ring); border-color: var(--accent); }
      .local-pill { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--tint-ink-3); background: var(--good-soft); border-radius: 980px; padding: 7px 15px; }
      .local-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }

      /* ---------- Sections & cards ---------- */
      section.block { padding: 32px 0 4px; }
      .block-alt { background: var(--bg-2); margin-top: 48px; padding-bottom: 52px; }
      .block h2.sec-title { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.022em; margin: 0 0 8px; }
      .block .sec-sub { color: var(--ink-faint); font-size: 16.5px; margin: 0 0 24px; line-height: 1.5; }
      .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
      @media (max-width: 1023px) { .cards { grid-template-columns: repeat(2, 1fr); } }
      /* Phones: the full catalog goes two-column compact so 58 tools stay scannable;
         the six popular cards stay large, one per row. */
      @media (max-width: 640px) {
        .cards.popular { grid-template-columns: 1fr; }
        .cards:not(.popular) { gap: 10px; }
        .cards:not(.popular) .toolcard { padding: 14px; border-radius: var(--r-md); gap: 4px; }
        .cards:not(.popular) .toolcard .tc-icon { width: 40px; height: 40px; border-radius: 50%; margin-bottom: 2px; }
        .cards:not(.popular) .toolcard .tc-icon svg { width: 20px; height: 20px; }
        .cards:not(.popular) .toolcard .tc-name { font-size: 15.5px; }
        .cards:not(.popular) .toolcard .tc-desc { font-size: 12.5px; line-height: 1.45; }
        .cards:not(.popular) .toolcard .tc-go { font-size: 13px; padding-top: 4px; }
        .wrap { padding: 0 16px; }
        .topnav-in { padding: 0 16px; }
      }
      @media (max-width: 359px) { .cards { grid-template-columns: 1fr; } }
      @media (max-width: 480px) { .hero { padding-top: 28px; } .hero-drop { padding: 22px 16px 18px; margin-top: 20px; } .trust { gap: 6px 16px; } .trust span { font-size: 14px; } section.block { padding-top: 26px; } }
      .cards.popular { grid-template-columns: repeat(4, 1fr); gap: 14px; }
      @media (max-width: 1023px) { .cards.popular { grid-template-columns: repeat(2, 1fr); } }
      @media (max-width: 640px) { .cards.popular { grid-template-columns: 1fr; } }
      .cards.popular .toolcard { padding: 20px; }
      .toolcard { text-align: left; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; display: flex; flex-direction: column; gap: 6px; width: 100%; }
      .toolcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-float); border-color: var(--line); }
      .toolcard:active { transform: translateY(0); }
      .toolcard .tc-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--tint-1); color: var(--tint-ink-1); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
      .cards.popular .tc-icon { width: 60px; height: 60px; }
      /* C chip tints: every tool's glyph sits in its category's soft tint (dark ink on
         the tint, ≥4.65:1 light / ≥7.9:1 dark — see MASTER.md). data-cat is set by
         toolCard()/openTool() purely as a presentation hook; behavior is unchanged. */
      .toolcard[data-cat="organize"] .tc-icon, .tc-icon[data-cat="organize"] { background: var(--tint-1); color: var(--tint-ink-1); }
      .toolcard[data-cat="more"] .tc-icon, .tc-icon[data-cat="more"] { background: var(--tint-2); color: var(--tint-ink-2); }
      .toolcard[data-cat="security"] .tc-icon, .tc-icon[data-cat="security"] { background: var(--tint-3); color: var(--tint-ink-3); }
      .toolcard[data-cat="to-pdf"] .tc-icon, .tc-icon[data-cat="to-pdf"] { background: var(--tint-4); color: var(--tint-ink-4); }
      .toolcard[data-cat="from-pdf"] .tc-icon, .tc-icon[data-cat="from-pdf"] { background: var(--tint-5); color: var(--tint-ink-5); }
      .toolcard[data-cat="edit"] .tc-icon, .tc-icon[data-cat="edit"] { background: var(--tint-6); color: var(--tint-ink-6); }
      .toolcard .tc-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
      .cards.popular .tc-name { font-size: 18px; }
      .toolcard .tc-desc { font-size: 14px; color: var(--ink-faint); line-height: 1.5; }
      .toolcard .tc-go { margin-top: auto; padding-top: 8px; font-size: 14.5px; font-weight: 700; color: var(--accent-text); display: inline-flex; gap: 4px; align-items: center; }
      .cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
      .chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 14.5px; font-weight: 600; padding: 10px 18px; border-radius: 980px; cursor: pointer; min-height: 44px; }
      .chip:hover { border-color: var(--ink-faint); color: var(--ink); }
      .chip[aria-pressed="true"] { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); }
      .cat-head { font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin: 30px 0 12px; }
      .cat-head:first-of-type { margin-top: 6px; }
      .noresults { color: var(--ink-faint); font-size: 16px; padding: 22px 0; }
      .unavail { border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; margin-top: 14px; background: var(--surface); }
      .unavail h4 { margin: 0 0 5px; font-size: 15.5px; font-weight: 700; }
      .unavail p { margin: 0; color: var(--ink-faint); font-size: 14px; line-height: 1.55; }

      /* ---------- Workspace ---------- */
      .ws-head { padding: 30px 0 4px; }
      .backlink { border: 0; background: transparent; color: var(--accent-text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; padding: 8px 0; display: inline-flex; align-items: center; gap: 5px; min-height: 40px; }
      .ws-title { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
      .ws-title .tc-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--tint-1); color: var(--tint-ink-1); display: flex; align-items: center; justify-content: center; flex: none; }
      .ws-title h1, .ws-title h2 { font-size: clamp(26px, 4.4vw, 34px); font-weight: 800; letter-spacing: -.022em; margin: 0; }
      .ws-title p { color: var(--ink-faint); font-size: 16px; margin: 4px 0 0; line-height: 1.5; }
      .panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 30px; margin-top: 20px; box-shadow: var(--shadow-float); }
      @media (max-width: 640px) { .panel { padding: 20px 16px; } }
      .dropzone { border: 2.5px dashed var(--brand); border-radius: var(--r-lg); padding: 40px 20px; text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease; background: var(--drop-bg); }
      .dropzone:hover, .dropzone:focus-visible { border-color: var(--accent-hover); outline: none; }
      .dropzone.drag { border-color: var(--accent-hover); background: var(--accent-soft); animation: dz-pulse 1.1s ease-in-out infinite; }
      .dropzone .dz-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--tint-1); color: var(--tint-ink-1); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
      .dropzone .dz-title { font-weight: 800; font-size: 19px; }
      .dropzone .dz-sub { color: var(--ink-faint); font-size: 14px; margin-top: 5px; line-height: 1.5; }
      .dropzone input { display: none; }
      .privacy-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; color: var(--ink-faint); line-height: 1.5; }
      .privacy-note svg { color: var(--good); flex: none; margin-top: 1px; }
      .filelist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
      .fileitem { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-soft); border-radius: 14px; padding: 13px 12px 13px 16px; background: var(--bg-2); }
      .fileitem .fi-badge { flex: none; font-family: ui-monospace, Menlo, monospace; font-size: 11px; font-weight: 700; background: var(--tint-1); color: var(--tint-ink-1); border-radius: 8px; padding: 6px 9px; letter-spacing: .04em; }
      .fileitem .fi-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .fileitem .fi-meta { color: var(--ink-faint); font-size: 13px; font-family: ui-monospace, Menlo, monospace; white-space: nowrap; }
      .fileitem .fi-main { flex: 1 1 auto; min-width: 0; }
      .iconbtn { flex: none; width: 40px; height: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-soft); background: var(--surface); color: var(--ink-soft); border-radius: 12px; cursor: pointer; font: inherit; }
      .iconbtn:hover { background: var(--surface-2); color: var(--ink); }
      .iconbtn.danger:hover { background: var(--red-soft); color: var(--red); border-color: var(--red); }
      .iconbtn:disabled { opacity: .35; cursor: default; }
      .options { display: flex; flex-wrap: wrap; gap: 16px 26px; align-items: end; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
      .options .field { flex: 1 1 170px; min-width: 0; }
      .options .field input:not([type="color"]), .options .field select { width: 100%; }
      .field { display: grid; gap: 7px; }
      .field label, .field .flabel { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
      .field input[type="text"], .field input[type="number"], .field input[type="password"], .field select, .field textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 42px; }
      .field textarea { line-height: 1.55; resize: vertical; width: 100%; }
      .field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--ring); border-color: var(--accent); }
      .field input[type="color"] { width: 52px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 3px; cursor: pointer; }
      .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
      .seg button { border: 0; background: var(--surface); color: var(--ink-soft); font: inherit; font-weight: 600; font-size: 14px; padding: 9px 14px; cursor: pointer; min-height: 42px; }
      .seg button + button { border-left: 1px solid var(--line-soft); }
      .seg button[aria-pressed="true"] { background: var(--cta); color: var(--cta-ink); }
      .hint { font-size: 13.5px; color: var(--ink-faint); line-height: 1.55; }
      .hint code { font-family: ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: var(--ink-soft); }
      .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
      /* Primary action = action red (one per screen, BIG); secondary = ink fill or red outline.
         The class name .btn-teal is legacy from the previous skin — it is now the ink button. */
      .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--cta); color: var(--cta-ink); border: 0; border-radius: 14px; font: inherit; font-weight: 800; font-size: 17px; padding: 15px 30px; cursor: pointer; min-height: 56px; box-shadow: 0 6px 18px rgba(193,39,27,.22); transition: background .18s ease, transform .12s ease; }
      .btn-primary:hover { background: var(--cta-hover); }
      .btn-primary:active { transform: translateY(1px); }
      .btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
      .btn-teal { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--bg); border: 0; border-radius: var(--radius-s); font: inherit; font-weight: 700; font-size: 15px; padding: 11px 20px; cursor: pointer; min-height: 46px; transition: background .18s ease, transform .12s ease; }
      .btn-teal:hover { background: var(--ink-soft); }
      .btn-teal:active { transform: translateY(1px); }
      .btn-ghost { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--accent-text); border: 2px solid var(--cta); border-radius: var(--radius-s); font: inherit; font-weight: 700; font-size: 15px; padding: 10px 18px; cursor: pointer; min-height: 46px; transition: background .18s ease, transform .12s ease; }
      .btn-ghost:hover { background: var(--accent-soft); }
      .btn-ghost:active { transform: translateY(1px); }
      .btn-plain { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); color: var(--ink); border: 0; border-radius: var(--radius-s); font: inherit; font-weight: 600; font-size: 14.5px; padding: 10px 18px; cursor: pointer; min-height: 44px; transition: background .18s ease, transform .12s ease; }
      .btn-plain:active { transform: translateY(1px); }
      .result { display: none; margin-top: 22px; background: var(--good-soft); border: 1px solid var(--good); border-radius: var(--radius); padding: 16px 18px; align-items: center; gap: 14px; flex-wrap: wrap; }
      .result.show { display: flex; animation: rise-in .22s ease; }
      @keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
      .result .r-check { color: var(--good); flex: none; }
      .result .r-text { flex: 1 1 200px; }
      .result .r-title { font-weight: 700; font-size: 16px; }
      .result .r-sub { color: var(--ink-soft); font-size: 13.5px; font-family: ui-monospace, Menlo, monospace; }
      .result .r-note { flex: 1 1 100%; font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin: 0; }
      .btn-download { display: inline-flex; align-items: center; gap: 8px; background: var(--cta); color: var(--cta-ink); text-decoration: none; font-weight: 800; font-size: 16px; border-radius: 14px; padding: 14px 26px; min-height: 54px; box-shadow: 0 6px 18px rgba(193,39,27,.22); transition: background .18s ease, transform .12s ease; }
      .btn-download:hover { background: var(--cta-hover); }
      .btn-download:active { transform: translateY(1px); }
      button.btn-download { font: inherit; border: 0; cursor: pointer; }
      .error { display: none; margin-top: 16px; background: var(--red-soft); border: 1px solid var(--red); color: var(--ink); border-radius: var(--radius-s); padding: 12px 16px; font-size: 14.5px; font-weight: 500; line-height: 1.5; }
      .error.show { display: block; animation: rise-in .22s ease; }
      .notice { margin-top: 16px; background: var(--warn-soft); border-radius: var(--radius-s); padding: 12px 16px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
      .busy { display: none; align-items: center; gap: 10px; color: var(--ink-soft); font-weight: 600; font-size: 14.5px; }
      .busy.show { display: inline-flex; }
      .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; flex: none; }
      @keyframes spin { to { transform: rotate(360deg); } }
      .progress { height: 8px; background: var(--surface-2); border-radius: 980px; overflow: hidden; margin-top: 14px; display: none; }
      .progress.show { display: block; }
      .progress i { display: block; height: 100%; width: 0%; background: var(--accent); border-radius: 980px; transition: width .25s ease; }

      /* page grids, viewer, misc */
      .pagegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin-top: 18px; }
      .pagecard { border: 1px solid var(--line-soft); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
      .pagecard.deleted, .pagecard.off { opacity: .38; }
      .pagecard.selected { outline: 3px solid var(--accent); outline-offset: -1px; }
      .pagecard .thumbbox { background: var(--surface-2); display: flex; align-items: center; justify-content: center; height: 168px; overflow: hidden; }
      .pagecard canvas { max-width: 100%; max-height: 100%; box-shadow: 0 1px 4px rgba(0,0,0,.25); background: #fff; }
      .pagecard .pc-bar { display: flex; align-items: center; gap: 2px; padding: 6px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
      .pagecard .pc-num { font-family: ui-monospace, Menlo, monospace; font-size: 12px; font-weight: 600; color: var(--ink-faint); padding: 0 4px; margin-right: auto; }
      .pagecard .iconbtn { width: 34px; height: 34px; min-height: 34px; border: 0; }
      .imgthumb { width: 100%; height: 100%; object-fit: contain; }
      .sigpad { display: block; width: 100%; height: 190px; background: #ffffff; border: 1.5px dashed var(--line); border-radius: var(--radius); touch-action: none; cursor: crosshair; }
      .infolist { margin-top: 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-s); overflow: hidden; }
      .infolist .irow { display: flex; gap: 14px; padding: 9px 14px; font-size: 14px; align-items: baseline; }
      .infolist .irow:nth-child(odd) { background: var(--surface-2); }
      .infolist .ikey { flex: 0 0 132px; font-weight: 700; color: var(--ink-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
      .infolist .ival { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
      .textout { width: 100%; min-height: 160px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.6; }
      .viewer-frame { width: 100%; height: 62dvh; border: 1px solid var(--line-soft); border-radius: var(--radius-s); background: #fff; margin-top: 16px; }
      .draw-stage { position: relative; margin-top: 18px; background: var(--stage); border-radius: var(--radius-s); display: flex; align-items: flex-start; justify-content: center; overflow: auto; max-height: 70dvh; }
      .draw-stage canvas { background: #fff; box-shadow: var(--shadow-float); max-width: 100%; height: auto; touch-action: none; }

      /* ---------- visual PDF editor ---------- */
      .ed-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 8px; }
      .ed-tool { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: 980px; cursor: pointer; min-height: 40px; }
      .ed-tool:hover { color: var(--ink); border-color: var(--ink-faint); }
      .ed-tool[aria-pressed="true"] { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
      .ed-tbtn { min-height: 40px; padding: 8px 14px; font-size: 13.5px; }
      .ed-tbtn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
      .ed-sep { width: 1px; align-self: stretch; background: var(--line-soft); margin: 2px 2px; }
      .ed-stage { margin-top: 12px; background: var(--stage); border: 1px solid var(--line-soft); border-radius: var(--radius-s); overflow: auto; max-height: 78dvh; display: flex; justify-content: center; justify-content: safe center; padding: 18px; }
      .ed-page { position: relative; flex: none; background: #fff; box-shadow: var(--shadow-float); line-height: 0; touch-action: none; }
      .ed-page canvas.ed-base { position: relative; display: block; width: 100%; height: 100%; }
      .ed-page canvas.ed-patch { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
      .ed-elements { position: absolute; inset: 0; }
      .ed-el { position: absolute; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; line-height: 1.28; }
      .ed-el:hover { outline: 1.5px dashed var(--accent); outline-offset: 1px; }
      .ed-el.selected { outline: 2px solid var(--accent); outline-offset: 1px; cursor: grabbing; }
      .ed-el img { width: 100%; height: 100%; display: block; pointer-events: none; }
      .ed-text { font-family: Helvetica, Arial, sans-serif; white-space: nowrap; }
      .ed-text.multi { white-space: pre-wrap; }
      .ed-handle { position: absolute; right: -10px; bottom: -10px; width: 19px; height: 19px; border-radius: 50%; background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.35); cursor: nwse-resize; touch-action: none; z-index: 3; }
      .ed-draft { position: absolute; border: 1.5px dashed var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); pointer-events: none; z-index: 4; }
      .ed-props { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: end; margin-top: 16px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-s); background: var(--surface); }
      .ed-props::before { content: "Properties"; flex: 1 1 100%; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
      /* Persistent Export pill — the editor's one primary action, always in reach */
      .ed-export-pill { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; background: var(--cta); color: var(--cta-ink); border: 0; border-radius: var(--r-pill); font: inherit; font-weight: 800; font-size: 16px; padding: 16px 28px; min-height: 56px; cursor: pointer; box-shadow: 0 8px 22px rgba(193,39,27,.3); transition: background .18s ease, transform .12s ease; }
      .ed-export-pill:hover { background: var(--cta-hover); }
      .ed-export-pill:active { transform: translateY(1px); }
      .ed-props .ed-prop-text { flex: 1 1 240px; }
      .ed-props .hint { flex: 1 1 100%; margin: 0; }
      .compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
      @media (max-width: 700px) { .compare-grid { grid-template-columns: 1fr; } }
      .compare-grid .thumbbox { background: var(--surface-2); border-radius: var(--radius-s); min-height: 200px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
      .compare-grid canvas { max-width: 100%; max-height: 420px; background: #fff; box-shadow: var(--shadow); }
      .diffline { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; padding: 5px 10px; border-radius: 6px; margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
      .diffline.del { background: var(--red-soft); }
      .diffline.add { background: var(--good-soft); }
      .histlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
      .histlist li { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 10px 14px; background: var(--surface); }
      .histlist .h-when { color: var(--ink-faint); font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: nowrap; }

      /* save sheet */
      .viewer { position: fixed; inset: 0; z-index: 120; background: rgba(10,10,12,.55); display: flex; align-items: center; justify-content: center; padding: 14px; }
      .viewer[hidden] { display: none; }
      .viewer-card { background: var(--surface); color: var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow-float); width: min(880px, 100%); max-height: 92dvh; display: flex; flex-direction: column; overflow: hidden; }
      .viewer-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
      .viewer-title { flex: 1 1 auto; min-width: 0; }
      .viewer-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .viewer-sub { color: var(--ink-faint); font-size: 12.5px; font-family: ui-monospace, Menlo, monospace; }
      .viewer-body { flex: 1 1 auto; min-height: 220px; background: var(--surface-2); display: flex; }
      .viewer-body iframe { flex: 1 1 auto; width: 100%; min-height: 46dvh; border: 0; background: #fff; }
      .viewer-body img { max-width: 100%; max-height: 56dvh; margin: auto; object-fit: contain; }
      .viewer-zip { margin: auto; padding: 28px 22px; text-align: center; color: var(--ink-soft); font-size: 15px; line-height: 1.6; max-width: 440px; }
      .viewer-text { flex: 1 1 auto; margin: 0; padding: 18px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); background: var(--surface); }
      .viewer-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line-soft); }
      .viewer-actions .hint { flex: 1 1 100%; margin: 0; }

      /* text pages / footer */
      .prose { max-width: 720px; }
      .prose h3 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; margin: 28px 0 8px; }
      .prose p, .prose li { color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
      .prose ul { padding-left: 20px; }
      details.faq { border-bottom: 1px solid var(--line-soft); padding: 6px 0; }
      details.faq summary { font-weight: 600; font-size: 16.5px; cursor: pointer; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
      details.faq summary::-webkit-details-marker { display: none; }
      details.faq p { color: var(--ink-soft); line-height: 1.65; margin: 0 0 14px; font-size: 15.5px; }
      .why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
      @media (max-width: 760px) { .why-grid { grid-template-columns: 1fr; } }
      .why-item h3 { font-size: 17px; font-weight: 700; margin: 0 0 7px; display: flex; gap: 9px; align-items: center; }
      .why-item h3 svg { color: var(--accent); flex: none; }
      .why-item p { color: var(--ink-faint); font-size: 15px; line-height: 1.65; margin: 0; }
      /* ---------- Stage 1: routes, directory, categories, footer ---------- */
      .route-head { padding: 36px 0 4px; }
      .route-head h2 { font-size: 34px; letter-spacing: -.02em; margin: 0 0 8px; }
      .cat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
      @media (max-width: 820px) { .cat-tiles { grid-template-columns: repeat(2, 1fr); } }
      @media (max-width: 480px) { .cat-tiles { grid-template-columns: 1fr; } }
      .cat-tile { text-align: left; background: var(--surface); border: 1px solid rgba(31,36,48,.05); border-radius: var(--radius); padding: 20px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 5px; box-shadow: var(--shadow); transition: box-shadow .18s ease, transform .12s ease; }
      .cat-tile:hover { box-shadow: var(--shadow-float); transform: translateY(-2px); }
      /* C category tiles: each of the six wears its own soft tint (mockup order) */
      .cat-tile:nth-child(6n+1) { background: var(--tint-1); }
      .cat-tile:nth-child(6n+2) { background: var(--tint-2); }
      .cat-tile:nth-child(6n+3) { background: var(--tint-4); }
      .cat-tile:nth-child(6n+4) { background: var(--tint-3); }
      .cat-tile:nth-child(6n+5) { background: var(--tint-5); }
      .cat-tile:nth-child(6n+6) { background: var(--tint-6); }
      .cat-tile .ct-name { font-weight: 800; font-size: 18px; }
      .cat-tile .ct-count { color: var(--ink-soft); font-weight: 700; font-size: 13.5px; }
      .cat-tile .ct-blurb { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
      .jobs-line { margin-top: 24px; color: var(--ink-faint); font-size: 15px; line-height: 1.6; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
      .ws-tools-row { display: flex; justify-content: flex-end; margin: 4px 0 10px; }
      /* ---------- Stage 2: tool pages (slim head, content below workspace) ---------- */
      .crumbs { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; font-size: 13.5px; color: var(--ink-faint); padding: 24px 0 0; }
      .crumbs a { color: var(--accent-text); text-decoration: none; font-weight: 600; }
      .crumbs a:hover { text-decoration: underline; }
      .crumbs .sep { opacity: .55; }
      .crumbs .here { color: var(--ink); font-weight: 600; }
      .tp-head h1 { font-size: 36px; letter-spacing: -.02em; line-height: 1.12; margin: 10px 0 8px; }
      .tp-lede { color: var(--ink-soft); font-size: 17px; line-height: 1.55; margin: 0; max-width: 720px; }
      .tp-body { padding-bottom: 30px; }
      .tp-sec { margin-top: 32px; max-width: 780px; }
      .tp-sec h2 { font-size: 22px; letter-spacing: -.01em; margin: 0 0 10px; }
      .tp-sec p { color: var(--ink-soft); line-height: 1.65; font-size: 15.5px; margin: 0; }
      .tp-sec ol { margin: 0; padding-left: 22px; }
      .tp-sec li { color: var(--ink-soft); line-height: 1.65; font-size: 15.5px; margin: 5px 0; }
      .tp-rel { display: flex; flex-wrap: wrap; gap: 10px; }
      .tp-rel a { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); color: var(--accent-text); border: 1.5px solid var(--line); border-radius: 980px; font-weight: 700; font-size: 14.5px; padding: 10px 18px; min-height: 44px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .18s ease, transform .12s ease; }
      .tp-rel a:hover { border-color: var(--cta); transform: translateY(-2px); }
      /* App-mode chrome (/pdf-editor/): marketing header/footer collapse */
      body.app-mode .topnav, body.app-mode footer { display: none; }
      body.app-mode .tp-head .crumbs { padding-top: 14px; }
      @media (max-width: 640px) { .tp-head h1 { font-size: 29px; } .tp-lede { font-size: 16px; } }
      footer .f-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 22px 30px; }
      footer .f-col h3 { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin: 2px 0 8px; }
      footer .f-col button { display: block; border: 0; background: transparent; color: var(--ink-faint); font: inherit; font-size: 14px; cursor: pointer; padding: 5px 0; min-height: 32px; text-align: left; }
      footer .f-col button:hover { color: var(--ink); }
      footer .f-promise { max-width: 300px; margin-top: 8px; }
      @media (max-width: 760px) { footer .f-cols { grid-template-columns: 1fr 1fr; } footer .f-brandcol { grid-column: 1 / -1; } }
      footer { border-top: 1px solid var(--line-soft); margin-top: 20px; padding: 28px 0 40px; }
      footer .f-top { display: flex; flex-wrap: wrap; gap: 18px 34px; justify-content: space-between; align-items: flex-start; }
      footer .f-brand { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
      footer .f-brand em { font-style: normal; color: var(--accent-text); }
      footer .f-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
      footer .f-links button { border: 0; background: transparent; color: var(--ink-faint); font: inherit; font-size: 14px; cursor: pointer; padding: 6px 0; min-height: 34px; }
      footer .f-links button:hover { color: var(--ink); }
      footer .f-philo { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 20px 0 6px; }
      footer p { color: var(--ink-faint); font-size: 13.5px; margin: 0; line-height: 1.6; }
      body.simple .hero, body.simple .block-alt, body.simple .why-hide { display: none; }
      .rep-list { display: grid; gap: 8px; margin: 14px 0 6px; }
      .rep-row { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 10px 14px; background: var(--surface); font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
      .rep-row strong { color: var(--ink); }
      .rep-status { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .05em; border-radius: 980px; padding: 3px 10px; margin-top: 1px; }
      .rep-status.pass { background: var(--good-soft); color: var(--good); }
      .rep-status.partial { background: var(--warn-soft); color: var(--ink-soft); }
      .rep-status.blocked { background: var(--red-soft); color: var(--red-text, var(--red)); }
      .rep-status.failed { background: var(--red); color: var(--bg); }
      .sec-pack { background: var(--surface-2, #f4f4f6); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.55; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
      .toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 90px); background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14.5px; padding: 12px 20px; border-radius: var(--radius); box-shadow: var(--shadow-float); transition: transform .25s ease; z-index: 130; max-width: calc(100vw - 40px); text-align: center; }
      .toast.show { transform: translate(-50%, 0); }
      /* ---------- hero dropzone + task assistant + flow ---------- */
      .hero-drop { max-width: 820px; margin: 28px auto 0; border: 2.5px dashed var(--brand); border-radius: 24px; background: var(--drop-bg); padding: 38px 24px 30px; text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
      .hero-drop:hover, .hero-drop:focus-visible { border-color: var(--accent-hover); outline: none; }
      .hero-drop.drag { border-color: var(--accent-hover); background: var(--accent-soft); animation: dz-pulse 1.1s ease-in-out infinite; }
      @keyframes dz-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--ring); } 50% { box-shadow: 0 0 0 9px transparent; } }
      .hero-drop .dz-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--tint-1); color: var(--tint-ink-1); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
      .hero-drop .dz-title { font-size: 23px; font-weight: 800; letter-spacing: -.015em; }
      .hero-drop .dz-sub { color: var(--ink-faint); font-size: 14.5px; margin: 7px auto 0; max-width: 560px; line-height: 1.55; }
      .hero-drop .btn-primary { margin-top: 18px; pointer-events: none; border-radius: 980px; padding: 15px 32px; }
      .hero-drop input { display: none; }
      .nlbar { max-width: 820px; margin: 26px auto 0; text-align: left; }
      .nlbar label { display: block; font-size: 16px; font-weight: 700; margin-bottom: 9px; }
      .nlbar .nl-row { display: flex; gap: 8px; }
      .nlbar input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 980px; padding: 12px 18px; min-height: 48px; }
      .nlbar input:focus { outline: 3px solid var(--ring); border-color: var(--accent); }
      .nlbar .nl-examples { color: var(--ink-faint); font-size: 13px; margin-top: 8px; line-height: 1.5; }
      .flow-steps { display: grid; gap: 10px; margin-top: 18px; }
      .flow-step { border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 12px 14px; background: var(--surface); }
      .flow-step .fs-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
      .flow-step .fs-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--tint-1); color: var(--tint-ink-1); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; transition: background .18s ease, color .18s ease; }
      /* Flow step states: completed fills the number with the action red; failed tints the card edge */
      .flow-step:has(.fs-status.done) { border-color: var(--cta); }
      .flow-step:has(.fs-status.done) .fs-num { background: var(--cta); color: var(--cta-ink); }
      .flow-step:has(.fs-status.failed) { border-color: var(--red); }
      .flow-step .fs-name { font-weight: 700; font-size: 15px; }
      .flow-step .fs-status { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ink-faint); font-family: ui-monospace, Menlo, monospace; }
      .flow-step .fs-status.done { color: var(--good); }
      .flow-step .fs-status.failed { color: var(--red); }
      .flow-step .fs-cfg { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 12px; }
      .flow-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
      .flow-summary { margin-top: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 12px 16px; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); background: var(--surface-2); }
      .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
      @media (max-width: 760px) { .steps-grid { grid-template-columns: 1fr; } }
      .step-item .step-n { width: 38px; height: 38px; border-radius: 50%; background: var(--cta); color: var(--cta-ink); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
      .step-item h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
      .step-item p { color: var(--ink-faint); font-size: 15px; line-height: 1.6; margin: 0; }
      /* ---------- editor three-area layout ----------
         Desktop (≥1201): thumbnail rail | canvas | right properties panel.
         Tablet (701–1200): collapsible rail | canvas, properties below.
         Phone (≤900): properties become a slide-up sheet; ≤700 the rail
         becomes a bottom thumbnail strip under the canvas. */
      .ed-layout { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "rail stage" "rail props"; gap: 12px; align-items: start; margin-top: 12px; }
      .ed-layout .ed-stage { grid-area: stage; margin-top: 0; min-width: 0; }
      .ed-rail { grid-area: rail; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 78dvh; padding: 4px; }
      .ed-rail:empty { display: none; }
      .ed-layout .ed-props { grid-area: props; margin-top: 0; align-items: start; }
      .ed-props.is-empty .field { display: none; }
      .ed-props .ed-props-done { display: none; }
      #ed-rail-toggle { display: none; }
      @media (min-width: 1201px) {
        .ed-layout { grid-template-columns: 112px minmax(0, 1fr) auto; grid-template-areas: "rail stage props"; }
        .ed-layout .ed-props { width: 296px; position: sticky; top: 64px; max-height: calc(100dvh - 84px); overflow-y: auto; flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
        .ed-layout .ed-props .field { width: 100%; }
      }
      @media (max-width: 1200px) {
        #ed-rail-toggle { display: inline-flex; }
        .ed-layout.no-rail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "props"; }
        .ed-layout.no-rail .ed-rail { display: none; }
      }
      @media (max-width: 900px) {
        .ed-layout .ed-props { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 95; margin: 0; max-height: 56dvh; overflow-y: auto; background: var(--surface); box-shadow: var(--shadow-float); border-radius: var(--r-lg); }
        .ed-props .ed-props-done { display: inline-flex; }
      }
      .ed-thumb { border: 2px solid var(--line-soft); border-radius: 10px; background: var(--surface); padding: 5px; cursor: pointer; font: inherit; display: grid; gap: 4px; justify-items: center; min-height: 0; }
      .ed-thumb canvas { max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
      .ed-thumb .et-num { font-size: 11.5px; font-weight: 600; color: var(--ink-faint); font-family: ui-monospace, Menlo, monospace; }
      .ed-thumb[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
      .ed-thumb[aria-current="true"] .et-num { color: var(--accent-text); font-weight: 700; }
      @media (max-width: 700px) {
        .ed-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "rail"; }
        .ed-layout.no-rail { grid-template-areas: "stage"; }
        .ed-rail { flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 6px 4px; }
        .ed-thumb { flex: 0 0 76px; }
        .ed-stage { max-height: 62dvh; }
      }
      /* Touch devices: every control gets a full-size target */
      @media (pointer: coarse) {
        .iconbtn-nav { width: 44px; height: 44px; min-height: 44px; }
        .iconbtn { width: 44px; height: 44px; min-height: 44px; }
        .pagecard .iconbtn { width: 40px; height: 40px; min-height: 40px; }
        .ed-tool, .ed-tbtn { min-height: 44px; }
        .chip { min-height: 44px; }
        .seg button { min-height: 44px; }
      }
      /* ---------- Phase 1 — local saves (this device only) ---------- */
      :root { --star: #b45309; }
      @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --star: #ffb020; } }
      :root[data-theme="dark"] { --star: #ffb020; }
      .toolcard { position: relative; }
      .fav-star { position: absolute; top: 8px; right: 10px; font-size: 20px; line-height: 1; padding: 6px; color: var(--ink-faint); cursor: pointer; border-radius: 8px; }
      .fav-star:hover { color: var(--star); }
      .fav-star.on { color: var(--star); }
      .rec-chips { display: flex; flex-wrap: wrap; gap: 8px; }
      .local-box { margin-top: 20px; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 16px; background: var(--surface); }
      .local-box h3 { margin: 0 0 6px; font-size: 16px; }
      .save-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
      .save-row .field { flex: 1 1 200px; margin: 0; }
      .saved-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
      .saved-list li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 10px 14px; background: var(--surface); font-size: 14.5px; }
      .saved-list .sl-main { flex: 1 1 180px; min-width: 0; }
      .saved-list .sl-name { font-weight: 600; overflow-wrap: anywhere; }
      .saved-list .sl-meta { color: var(--ink-faint); font-size: 13px; }
      .mini-btn { display: inline-flex; align-items: center; background: var(--surface-2); color: var(--ink); border: 0; border-radius: 980px; font: inherit; font-weight: 600; font-size: 13.5px; padding: 7px 14px; cursor: pointer; min-height: 36px; }
      .mini-btn:hover { background: var(--line-soft); }
      .mini-btn.danger { color: var(--red); }
      .data-list { margin: 10px 0 18px; padding-left: 20px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.65; }
      /* Scroll reveal (homepage only) — .reveal is added by JS, so no-JS and
         reduced-motion always render the final state immediately */
      .reveal { opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease; }
      .reveal.in { opacity: 1; transform: none; }
      @media (prefers-reduced-motion: reduce) { .spinner, .hero-drop.drag, .dropzone.drag, .result.show, .error.show { animation: none; } html { scroll-behavior: auto; } .toolcard, .skip-link, .toast, .progress i, .btn-primary, .btn-teal, .btn-ghost, .btn-plain, .btn-download, .reveal { transition: none; } .reveal { opacity: 1; transform: none; } }
    