/* UnboundPDF hub — Ink & Paper. Loaded only by the homepage; shared components stay in theme.css.
   Tokens come from theme.css :root — this file must not define its own colour system. */
/* Self-hosted Plus Jakarta Sans (variable 400-800). Live theme.css @imports Google Fonts, which
     the production CSP (style-src 'self') blocks — so the brand font never loads for visitors. */
  /* ═══ INK & PAPER ═══
     Brand = ink (typography carries identity). ONE functional colour: green = "runs on your device".
     Warm paper neutrals, not cold SaaS grey. Category red is abandoned — Adobe/iLovePDF/Smallpdf
     are all red; being red = looking like them. Restrained radii. No gradients, no glass. */
  * { box-sizing: border-box; }
  body {
    margin: 0; background: var(--ground); color: var(--ink);
    font-family: var(--sans); font-weight: 500;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  }
  a { color: inherit; text-decoration: none; }
  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

  /* ── header ── */
  /* The header owns a dropdown (Convert), so it must sit ABOVE page content — otherwise the
     absolutely-positioned panel paints behind whatever follows it in the DOM and becomes
     unclickable. The hero's drop zone is `position: relative; z-index: 0`, and a positioned
     element with z-index 0 beats an earlier `z-index: auto` panel in paint order, so the menu
     opened *underneath* the page. Tool pages never showed this because their `.nav` already
     carries z-index 50; the hub header was the one piece of chrome without it.
     50 = the header slot in our ladder (editor sheets 60-71, overlays 90, modals 1000 stay above). */
  .hd { border-bottom: 1px solid var(--line); background: var(--card); position: relative; z-index: 50; }
  .hd-in { max-width: 1080px; margin: 0 auto; padding: 0 24px; height: 58px; display: flex; align-items: center; gap: 26px; }
  .logo { font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
  .logo-m { width: 20px; height: 20px; flex: 0 0 auto; }
  .hd-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 600; color: var(--ink2); }
  .hd-nav a:hover, .hd-nav button:hover { color: var(--ink); }
  .hd-nav button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
  .hd-nav button svg { width: 12px; height: 12px; }
  .hd-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
  .status {
    display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
    color: var(--local); background: var(--local-bg); border: 1px solid var(--local-ln);
    padding: 5px 11px; border-radius: 999px;
  }
  .status i { width: 6px; height: 6px; border-radius: 50%; background: var(--local); display: block; }
  /* Hub uses the same burger as tool pages (.nav-toggle). Hidden on desktop. */
  .hd .nav-toggle { display: none; margin-left: auto; }

  /* ── HERO: drop is the product — full width, nothing beside it ── */
  .hero { padding: clamp(36px, 6vh, 64px) 0 clamp(28px, 4vh, 44px); }
  .hero-k {
    margin: 0 0 14px; text-align: center; font-size: 11.5px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase; color: var(--ink3);
  }
  .h1 {
    margin: 0; text-align: center; font-family: var(--serif); font-weight: 700;
    font-size: clamp(34px, 5.2vw, 62px); line-height: 1.05; letter-spacing: -.015em;
    text-wrap: balance;
  }
  .h1 em { font-style: italic; }
  .sub {
    margin: 12px auto 0; text-align: center; max-width: 60ch;
    font-size: clamp(14.5px, 1.05vw, 16.5px); line-height: 1.55; color: var(--ink2); font-weight: 500;
  }

  /* the drop — the centrepiece */
  .dropwrap { margin-top: clamp(22px, 3.5vh, 36px); max-width: 720px; margin-left: auto; margin-right: auto; }
  .drop {
    position: relative; z-index: 0;
    background: var(--card); border: 1px solid var(--line2); border-radius: 3px;
    box-shadow: var(--shadow);
    padding: clamp(48px, 8vh, 88px) 28px; text-align: center; cursor: pointer; display: block; width: 100%;
    transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
    font-family: var(--sans);
  }
  .drop::before, .drop::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: var(--card); border: 1px solid var(--line); border-radius: 3px;
    box-shadow: var(--shadow-xs); pointer-events: none;
    transition: transform var(--dur-3) var(--ease);
  }
  .drop::before { transform: rotate(-1.3deg) translateY(4px); }
  .drop::after  { transform: rotate(0.9deg) translateY(7px); }
  .drop:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .drop:hover::before { transform: rotate(-2.1deg) translate(-4px, 6px); }
  .drop:hover::after  { transform: rotate(1.7deg) translate(4px, 9px); }
  .drop.over { border-color: var(--local); transform: translateY(-2px); box-shadow: 0 0 0 3px rgba(14, 124, 87, 0.16), var(--shadow-lg); }
  .drop.over::before { transform: rotate(-2.6deg) translate(-6px, 7px); }
  .drop.over::after  { transform: rotate(2.1deg) translate(6px, 10px); }
  .drop:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
  .drop-ic { width: 30px; height: 30px; color: var(--ink3); margin: 0 auto 12px; }
  .drop:hover .drop-ic, .drop.over .drop-ic { color: var(--local); }
  .drop-t { font-size: clamp(17px, 1.5vw, 21px); font-weight: 800; letter-spacing: -.02em; }
  .drop-s { font-size: 13.5px; color: var(--ink2); margin-top: 5px; font-weight: 500; }
  .drop-s u { text-underline-offset: 2px; }
  .local-line {
    margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--ink3); font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .local-line b { color: var(--local); font-weight: 700; }

  .sample-row { text-align: center; margin: 12px 0 0; }
  .sample-btn {
    font: inherit; font-size: 13px; font-weight: 700; color: var(--ink2);
    background: var(--card); border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 16px; cursor: pointer;
  }
  .sample-btn:hover { border-color: var(--ink); color: var(--ink); }
  .sample-btn:disabled { opacity: .6; cursor: wait; }

  /* the drop, after a file — same box becomes the workbench */
  .opened { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
  .frow { display: flex; align-items: center; gap: 13px; }
  .frow canvas { width: 40px; height: auto; border: 1px solid var(--line); border-radius: 3px; background: #fff; flex: 0 0 auto; }
  .fname { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
  .fmeta { font-size: 12.5px; color: var(--ink2); margin-top: 2px; font-weight: 600; }
  .change { margin-left: auto; background: none; border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink2); }
  .change:hover { border-color: var(--ink); color: var(--ink); }
  .ask { font-size: 11.5px; font-weight: 800; color: var(--ink3); text-transform: uppercase; letter-spacing: .09em; margin: 15px 0 9px; }
  .acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 7px; }
  .act {
    display: flex; align-items: center; gap: 8px; padding: 11px 12px; border: 1px solid var(--line);
    border-radius: var(--radius-sm); background: var(--card); font-size: 13.5px; font-weight: 700;
    transition: border-color .13s var(--ease), background .13s var(--ease);
  }
  .act:hover { border-color: var(--ink); background: var(--ground); }
  .act:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  .act svg { width: 16px; height: 16px; flex: 0 0 auto; }

  /* straight-to row */
  .quick { margin-top: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
  .quick-l { font-size: 13px; color: var(--ink3); font-weight: 700; }
  .chip {
    font-size: 13px; font-weight: 700; padding: 7px 13px; border: 1px solid var(--line);
    background: var(--card); border-radius: 999px; color: var(--ink2);
    transition: border-color .13s var(--ease), color .13s var(--ease);
  }
  .chip:hover { border-color: var(--ink); color: var(--ink); }
  button.chip-btn { font: inherit; cursor: pointer; appearance: none; }
  .search {
    position: relative; margin-left: 4px;
  }
  .search input {
    /* 190px clipped the placeholder to "Search 32 tool" — the missing plural read as a typo. */
    font: inherit; font-size: 13px; font-weight: 600; padding: 7px 13px 7px 32px; width: 210px;
    border: 1px solid var(--line2); border-radius: 999px; background: var(--card); color: var(--ink);
  }
  .search input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
  .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; color: var(--ink3); }
  .results {
    position: absolute; top: 38px; left: 0; right: 0; background: var(--card); border: 1px solid var(--line2);
    border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 5px; z-index: 20; display: none; min-width: 220px;
  }
  .results.on { display: block; }
  .results a { display: block; padding: 8px 10px; border-radius: 4px; font-size: 13px; font-weight: 600; text-align: left; }
  .results a:hover, .results a:focus { background: var(--ground); outline: none; }
  .results .none { padding: 8px 10px; font-size: 13px; color: var(--ink3); }

  /* ── sections ── */
  .sec { padding: clamp(34px, 5vh, 54px) 0; border-top: 1px solid var(--line); }
  .sec-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
  .sec-t { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink3); margin: 0; }
  .sec-no { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; margin-right: 10px; color: var(--line2); font-size: 15px; }
  .sec-more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink2); }
  .sec-more:hover { color: var(--ink); }

  /* Grid lines come from each card's own border, not from a 1px gap over a coloured
     background: that trick paints a phantom grey cell wherever a row is incomplete, and
     real category counts (7, 6, 10, 3) are rarely a multiple of the column count. The
     negative margins tuck the outer edges under the container's border. */
  .grid8 { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .t {
    background: var(--card); padding: 15px 14px; display: flex; flex-direction: column; gap: 5px;
    border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
    margin: 0 -1px -1px 0;
    transition: background .13s var(--ease);
  }
  .t:hover { background: var(--ground); }
  .t:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
  .t-top { display: flex; align-items: center; gap: 9px; }
  .t svg { width: 17px; height: 17px; flex: 0 0 auto; }

  /* Tool icons wear the logo's mark: a white glyph on the ink square. A plain outline on white
     left every tool looking like body text; this is the job the red tint used to do, in ink.
     Specificity is .t .t-ic svg so it beats the .t svg rule above regardless of order. */
  .t-ic {
    width: 30px; height: 30px; border-radius: 7px; background: var(--ink);
    display: grid; place-items: center; flex: 0 0 auto;
    transition: background .13s var(--ease);
  }
  .t .t-ic svg, .t:hover .t-ic svg { width: 17px; height: 17px; color: #fff; }
  .t:hover .t-ic { background: #000; }
  .t-ic.sm { width: 22px; height: 22px; border-radius: 5px; }
  .act .t-ic.sm svg { width: 13px; height: 13px; color: #fff; }
  .t-n { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
  .t-d { font-size: 12.5px; color: var(--ink3); font-weight: 500; line-height: 1.4; }

  /* editor proof */
  .ed { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(24px,4vw,52px); align-items: center; }
  .ed-h { font-family: var(--serif); font-size: clamp(24px, 2.5vw, 34px); font-weight: 700; letter-spacing: -.01em; margin: 0 0 12px; line-height: 1.12; }
  .ed-p { font-size: 14.5px; color: var(--ink2); line-height: 1.6; margin: 0 0 16px; font-weight: 500; }
  .ed-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .ed-l li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
  .ed-l svg { width: 14px; height: 14px; color: var(--local); flex: 0 0 auto; margin-top: 2px; }
  .ed-l b { color: var(--ink); font-weight: 700; }
  .ed-shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
  .ed-cap { font-size: 11.5px; color: var(--ink3); padding: 8px 12px; border-top: 1px solid var(--line); font-weight: 600; }
  /* looping editor demo — real page render + the real cover-and-retype mechanism, choreographed */
  .ed-stage { position: relative; background: #fff; line-height: 0; }
  .ed-stage canvas { display: block; width: 100%; height: auto; }
  .ed-sel {
    position: absolute; border: 1.5px solid var(--local); border-radius: 2px; opacity: 0;
    transition: opacity .18s var(--ease); pointer-events: none;
  }
  .ed-sel.on { opacity: 1; }
  .ed-live {
    position: absolute; white-space: pre; line-height: 1; pointer-events: none;
    font-kerning: none; opacity: 0;
  }
  .ed-live.on { opacity: 1; }
  .ed-caret {
    position: absolute; width: 1.5px; background: var(--ink); opacity: 0; pointer-events: none;
    transition: left .5s var(--ease), top .5s var(--ease), opacity .2s var(--ease);
  }
  .ed-caret.on { opacity: 1; animation: blink 1s steps(2) infinite; }
  @keyframes blink { 50% { opacity: 0 } }
  .ed-badge {
    position: absolute; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 700;
    padding: 4px 8px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease); transform: translateY(3px);
    letter-spacing: .01em; line-height: 1.4;
  }
  .ed-badge.on { opacity: 1; transform: none; }
  .ed-badge b { color: #6EE7B7; font-weight: 700; }
  /* the pointer people need to see travel into the sentence */
  .ed-ptr {
    position: absolute; width: 20px; height: 20px; pointer-events: none; z-index: 5;
    opacity: 0; transition: opacity .35s var(--ease); filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
  }
  .ed-ptr.on { opacity: 1; }
  .ed-ripple {
    position: absolute; width: 13px; height: 13px; border-radius: 50%; pointer-events: none; z-index: 4;
    border: 2px solid var(--local); opacity: 0; transform: translate(-50%,-50%) scale(.3);
  }
  .ed-ripple.go { animation: rip .55s var(--ease); }
  @keyframes rip {
    0% { opacity: .9; transform: translate(-50%,-50%) scale(.3) }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(2.6) }
  }

  /* privacy flow */
  .flow { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
  .fstep { flex: 1; padding: 20px 18px; }
  .fstep + .fstep { border-left: 1px solid var(--line); }
  .fstep.mid { background: var(--local-bg); }
  .fstep-k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--ink3); }
  .fstep.mid .fstep-k { color: var(--local); }
  .fstep-v { font-size: 14.5px; font-weight: 700; margin-top: 6px; letter-spacing: -.01em; }
  .fstep-s { font-size: 12.5px; color: var(--ink2); margin-top: 4px; font-weight: 500; line-height: 1.45; }
  .facts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
  .fact { font-size: 13px; font-weight: 600; color: var(--ink2); display: flex; align-items: center; gap: 7px; }
  .fact svg { width: 13px; height: 13px; color: var(--local); }

  /* categories */
  .cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .cat { background: var(--card); padding: 15px; transition: background .13s var(--ease); }
  .cat:hover { background: var(--ground); }
  .cat-n { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
  .cat-c { margin-left: auto; font-size: 12px; color: var(--ink3); font-weight: 700; }
  .cat-e { font-size: 12.5px; color: var(--ink3); margin-top: 5px; font-weight: 500; }

  /* faq */
  details { border-bottom: 1px solid var(--line); }
  summary { padding: 15px 0; font-size: 14.5px; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
  summary::-webkit-details-marker { display: none; }
  summary::after { content: "+"; margin-left: auto; color: var(--ink3); font-weight: 600; font-size: 17px; }
  details[open] summary::after { content: "−"; }
  summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  .faq-a { padding: 0 0 15px; font-size: 13.5px; color: var(--ink2); line-height: 1.6; max-width: 78ch; font-weight: 500; }

  /* footer */
  .ft { border-top: 1px solid var(--line); background: var(--card); padding: 34px 0 26px; margin-top: 10px; }
  .ft-g { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 26px; }
  .ft-t { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--ink3); margin-bottom: 10px; }
  .ft-l { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--ink2); font-weight: 500; }
  .ft-l a:hover { color: var(--ink); }
  .ft-b { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--ink3); font-weight: 500; }
  .ft-b .by { margin-left: auto; }

  /* Desktop-only: the Convert dropdown. Its plain-link twin covers mobile. */
  .cv-link, .nav-priv { display: none; }

  @media (max-width: 900px) {
    /* Same pattern as tool pages: burger opens a full menu. The old scroll-strip clipped
       "Edit PDF / Convert / All Tools" and read as a broken header on first paint. */
    .hd-in { gap: 12px; position: relative; }
    .hd .nav-toggle {
      display: flex; align-items: center; justify-content: center;
      width: 44px; height: 44px; border: 1px solid var(--line2); border-radius: 10px;
      background: var(--card); cursor: pointer; flex: 0 0 auto; padding: 0;
    }
    .hd .nav-toggle svg { width: 20px; height: 20px; color: var(--ink); }
    .hd-nav {
      display: none; position: absolute; top: 100%; left: 0; right: 0;
      flex-direction: column; align-items: stretch; gap: 2px;
      background: var(--card); border-bottom: 1px solid var(--line);
      box-shadow: var(--shadow-lg); padding: 12px 16px 18px; z-index: 60;
      font-size: 15px; font-weight: 600;
    }
    .hd-nav.open { display: flex; }
    .hd-nav > a, .hd-nav > .nav-dd > button, .hd-nav .cv-link, .hd-nav .nav-priv {
      display: flex; align-items: center; min-height: 44px; padding: 10px 12px;
      border-radius: 8px; color: var(--ink2);
    }
    .hd-nav > a:hover, .hd-nav > .nav-dd > button:hover { background: var(--ground); color: var(--ink); }
    .nav-dd { display: none; }
    .cv-link, .nav-priv { display: flex; }
    .hd-right { display: none; }
    .grid8 { grid-template-columns: repeat(2, 1fr); }
    .ed { grid-template-columns: 1fr; }
    .cats { grid-template-columns: 1fr; }
    .flow { flex-direction: column; }
    .fstep + .fstep { border-left: 0; border-top: 1px solid var(--line); }
    .ft-g { grid-template-columns: 1fr 1fr; }
    .search input { width: 150px; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
