/* ============================================================
   docflo — modern product design system (v2)
   Friendly, colorful, spacious SaaS: rounded cards, obvious
   buttons, category color-coding, soft tinted shadows.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* --- neutrals --- */
  --ink:        #171923;
  --ink-2:      #4A4F63;
  --ink-3:      #868C9E;
  --line:       #E7E5F3;
  --line-soft:  #F0EEF9;
  --paper:      #FFFFFF;
  --bg:         #FBFAFE;
  --bg-tint:    #F4F3FC;

  /* --- brand --- */
  --brand:      #4F5FEE;
  --brand-ink:  #3B46C4;
  --brand-tint: #EEF0FE;
  --cta:        #FF6A39;
  --cta-ink:    #E5541F;
  --cta-tint:   #FFEDE4;

  /* --- category colors --- */
  --cat-to:      #2F8AFF;
  --cat-to-tint: #EAF3FF;
  --cat-from:      #F0459A;
  --cat-from-tint: #FDEBF4;
  --cat-org:      #F5A623;
  --cat-org-tint: #FFF4E1;
  --cat-sec:      #16B378;
  --cat-sec-tint: #E7F8F1;
  --cat-opt:      #14B8A6;
  --cat-opt-tint: #E5F9F6;

  /* --- state --- */
  --ok:         #16B378;
  --ok-tint:    #E7F8F1;
  --warn:       #E5A100;
  --warn-tint:  #FFF4DE;
  --err:        #E5484D;
  --err-tint:   #FDECEC;

  /* --- type --- */
  --display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* --- metrics --- */
  --gut: 24px;
  --max: 1240px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(23,25,35,.04), 0 2px 8px -2px rgba(23,25,35,.06);
  --shadow: 0 4px 16px -4px rgba(23,25,35,.08), 0 2px 6px -2px rgba(23,25,35,.05);
  --shadow-lift: 0 24px 48px -16px rgba(23,25,35,.18), 0 8px 20px -8px rgba(23,25,35,.1);
  --shadow-brand: 0 16px 32px -12px rgba(79,95,238,.35);
  --shadow-cta: 0 12px 26px -8px rgba(255,106,57,.45);

  --cat: var(--brand);
  --cat-tint: var(--brand-tint);
}

[data-theme="dark"] {
  --ink:        #F3F3F9;
  --ink-2:      #BFC2D6;
  --ink-3:      #83869C;
  --line:       #2C2E42;
  --line-soft:  #24263A;
  --paper:      #1B1D2C;
  --bg:         #121320;
  --bg-tint:    #191B2A;

  --brand:      #8B93FF;
  --brand-ink:  #A6ACFF;
  --brand-tint: #22243F;
  --cta:        #FF8259;
  --cta-ink:    #FF976F;
  --cta-tint:   #34241F;

  --cat-to:      #5CA9FF; --cat-to-tint: #1B2A42;
  --cat-from:    #F672B0; --cat-from-tint: #37202E;
  --cat-org:     #FFC15C; --cat-org-tint: #382A15;
  --cat-sec:     #3FD79C; --cat-sec-tint: #163229;
  --cat-opt:     #3FDBCB; --cat-opt-tint: #123330;

  --ok: #3FD79C; --ok-tint: #163229;
  --warn: #FFC15C; --warn-tint: #382A15;
  --err: #FF7A7E; --err-tint: #3A1D1F;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px -2px rgba(0,0,0,.35);
  --shadow: 0 4px 16px -4px rgba(0,0,0,.45), 0 2px 6px -2px rgba(0,0,0,.3);
  --shadow-lift: 0 24px 48px -16px rgba(0,0,0,.6), 0 8px 20px -8px rgba(0,0,0,.4);
  --shadow-brand: 0 16px 32px -12px rgba(139,147,255,.35);
  --shadow-cta: 0 12px 26px -8px rgba(255,130,89,.4);
}

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1em; color: var(--ink-2); }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }
a.text-link { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

img, canvas { max-width: 100%; display: block; }
svg { max-width: 100%; display: block; width: 1.15em; height: 1.15em; flex: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.narrow { max-width: 760px; }
.mid { max-width: 960px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip:focus { left: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

section.band { padding: 64px 0; }
section.band + section.band { padding-top: 0; }
section.band.tint { background: var(--bg-tint); padding: 64px 0; }
section.band.tint + section.band.tint { padding-top: 64px; }

.sec-head { margin: 0 0 30px; }
.sec-head .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: 13px; font-weight: 700;
  color: var(--cat); background: var(--cat-tint);
  padding: 6px 14px 6px 10px; border-radius: var(--r-pill); margin-bottom: 14px;
}
.sec-head .kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cat); flex: none; }
.sec-head h2 { margin: 0 0 8px; }
.sec-head p { margin: 0; font-size: 16px; max-width: 56ch; }
.sec-head.row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 26px;
}
.sec-head.row > div { flex: 1 1 320px; }

/* ============================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--display); font-size: 15px; font-weight: 700;
  padding: 13px 24px; border-radius: 13px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-cta { background: var(--cta); color: #fff; box-shadow: var(--shadow-cta); }
.btn-cta:hover { background: var(--cta-ink); color: #fff; box-shadow: 0 16px 32px -10px rgba(255,106,57,.55); }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; box-shadow: 0 18px 36px -10px rgba(79,95,238,.45); }

.btn-cat { background: var(--cat); color: #fff; box-shadow: 0 12px 26px -8px color-mix(in srgb, var(--cat) 55%, transparent); }
.btn-cat:hover { filter: brightness(.92); color: #fff; }

.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-soft { background: var(--brand-tint); color: var(--brand-ink); }
.btn-soft:hover { background: var(--brand); color: #fff; }

.btn-quiet { background: none; color: var(--ink-2); padding: 10px 14px; box-shadow: none; }
.btn-quiet:hover { background: var(--bg-tint); color: var(--ink); transform: none; }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; transform: none; }
.btn-lg { font-size: 16.5px; padding: 16px 30px; border-radius: 15px; }
.btn-xl { font-size: 18px; padding: 18px 36px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { font-size: 13.5px; padding: 9px 16px; border-radius: 10px; }

/* ============================================================ header */
header.site {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 8px; height: 72px; }

.wordmark {
  font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.04em;
  color: var(--ink); text-decoration: none; flex: none;
  display: inline-flex; align-items: center; gap: 9px;
}
.wordmark .reg { width: 32px; height: 32px; flex: none; border-radius: 9px; }
.wordmark .fl { color: var(--brand); }

nav.top { display: flex; align-items: center; gap: 4px; margin-left: 28px; }
nav.top > a, .navbtn {
  font-family: var(--display); font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; padding: 10px 15px; border-radius: 11px;
  background: none; border: 0; cursor: pointer; line-height: 1.3;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .14s, color .14s;
}
nav.top > a:hover, .navbtn:hover { background: var(--bg-tint); color: var(--ink); }
.navbtn[aria-expanded="true"] { background: var(--brand-tint); color: var(--brand-ink); }
.navbtn .chev { transition: transform .18s ease; }
.navbtn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.head-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1.5px solid var(--line); background: var(--paper);
  border-radius: 12px; cursor: pointer; color: var(--ink-2); flex: none;
  transition: border-color .14s, color .14s, background .14s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.icon-btn svg { width: 19px; height: 19px; }
[data-theme="dark"] .sun { display: none; }
:root:not([data-theme="dark"]) .moon { display: none; }

/* --- mega menu: card grid, not link list --- */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  display: none; padding: 28px 0 32px;
}
.mega[data-open="true"] { display: block; animation: dropIn .16s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.mega-grid { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mega-cat h4 {
  font-family: var(--display); font-size: 13px; font-weight: 700;
  color: var(--ink); margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.mega-cat h4 .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.mega-cat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-cat ul a {
  display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; padding: 7px 9px; border-radius: 8px; line-height: 1.35;
  transition: background .12s, color .12s, padding-left .12s;
}
.mega-cat ul a:hover { background: var(--bg-tint); color: var(--ink); padding-left: 13px; }

.menu-toggle { display: none; }

/* ============================================================ hero */
.hero { padding: 60px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero .eyebrow-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-tint); color: var(--brand-ink);
  font-family: var(--display); font-size: 13.5px; font-weight: 700;
  padding: 8px 16px 8px 12px; border-radius: var(--r-pill); margin-bottom: 20px;
}
.hero .eyebrow-badge svg { width: 15px; height: 15px; }
.hero h1 { max-width: 15ch; margin-bottom: 18px; }
.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2);
  max-width: 50ch; margin: 0 0 30px; line-height: 1.6;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.trustline {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.trustline span { display: inline-flex; align-items: center; gap: 7px; }
.trustline svg { width: 16px; height: 16px; color: var(--ok); flex: none; }

.hero-art { position: relative; }
.hero-blob {
  position: absolute; inset: -10%; z-index: 0;
  background: radial-gradient(closest-side, var(--brand-tint), transparent 72%);
  filter: blur(2px);
}

/* ============================================================ category cards */
.cat-grid { display: grid; gap: 18px; grid-template-columns: repeat(5, 1fr); }
.cat-card {
  position: relative; display: block; text-decoration: none;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 20px 22px; text-align: left; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: transparent; }
.cat-card .tile {
  width: 52px; height: 52px; border-radius: 15px; margin-bottom: 16px;
  display: grid; place-items: center; background: var(--tint); color: var(--c);
}
.cat-card .tile svg { width: 26px; height: 26px; }
.cat-card h3 { margin: 0 0 5px; font-size: 17px; }
.cat-card p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.cat-card .count {
  font-size: 12.5px; font-weight: 700; color: var(--c);
  display: inline-flex; align-items: center; gap: 5px;
}
.cat-card .count svg { width: 13px; height: 13px; transition: transform .16s; }
.cat-card:hover .count svg { transform: translateX(3px); }

/* ============================================================ tool cards */
.grid-tools { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }

.tcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 20px 20px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  text-decoration: none; height: 100%;
}
.tcard:hover {
  border-color: transparent; transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.tcard .tile {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 14px; flex: none;
  display: grid; place-items: center; background: var(--tint); color: var(--c);
}
.tcard .tile svg { width: 24px; height: 24px; }
.tcard .nm { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--ink); margin: 0 0 5px; line-height: 1.3; }
.tcard .ds { font-size: 13.5px; color: var(--ink-3); margin: 0 0 16px; line-height: 1.48; flex: 1; }
.tcard .cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-size: 13.5px; font-weight: 700; color: var(--c);
}
.tcard .cta svg { width: 15px; height: 15px; transition: transform .16s; }
.tcard:hover .cta svg { transform: translateX(3px); }

.tcard.compact { padding: 16px 16px 14px; flex-direction: row; align-items: center; gap: 13px; }
.tcard.compact .tile { margin-bottom: 0; width: 40px; height: 40px; border-radius: 11px; }
.tcard.compact .tile svg { width: 20px; height: 20px; }
.tcard.compact .body { min-width: 0; flex: 1; }
.tcard.compact .nm { font-size: 14.5px; margin-bottom: 2px; }
.tcard.compact .ds { display: none; }
.tcard.compact .cta { display: none; }

/* ============================================================ how it works */
.steps-modern { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 22px; position: relative;
}
.step-card .num {
  width: 40px; height: 40px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-ink);
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 16px;
  margin-bottom: 16px;
}
.step-card h3 { margin: 0 0 6px; font-size: 16.5px; }
.step-card p { margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.55; }

/* ============================================================ trust section */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust-card {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 24px 22px; display: flex; gap: 16px; align-items: flex-start;
}
.trust-card .tile {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--ok-tint); color: var(--ok);
}
.trust-card .tile svg { width: 23px; height: 23px; }
.trust-card h3 { margin: 0 0 5px; font-size: 15.5px; }
.trust-card p { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }

/* ============================================================ recently used */
.recent-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 10px; scrollbar-width: thin; }
.recent-strip .tcard.compact { flex: 0 0 240px; }

/* ============================================================ dropzone */
.tool-shell {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 8px; box-shadow: var(--shadow-sm);
}
.dz {
  position: relative;
  background: var(--bg-tint);
  border: 2.5px dashed var(--line);
  border-radius: calc(var(--r-lg) - 4px);
  padding: 52px 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .12s;
  display: block; width: 100%;
  font-family: inherit; color: inherit;
}
.dz:hover { border-color: var(--cat); background: var(--cat-tint); }
.dz.hot { border-color: var(--cat); border-style: solid; background: var(--cat-tint); transform: scale(1.005); }

.dz-icon-tile {
  width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 18px;
  display: grid; place-items: center; background: var(--paper); color: var(--cat);
  box-shadow: var(--shadow);
}
.dz-icon-tile svg { width: 32px; height: 32px; }
.dz-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem); letter-spacing: -.02em;
  margin: 0 0 7px; color: var(--ink);
}
.dz-sub { color: var(--ink-3); font-size: 14px; margin: 0; }
.dz-sub kbd {
  font-family: var(--body); font-size: 11px; font-weight: 700; background: var(--paper);
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 6px; color: var(--ink-2);
}

#veil {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  backdrop-filter: blur(3px);
  place-items: center; pointer-events: none;
}
#veil[data-on="true"] { display: grid; }
#veil .veil-card {
  background: var(--paper); border: 2.5px solid var(--brand);
  border-radius: var(--r-lg); padding: 30px 46px; box-shadow: var(--shadow-lift);
  font-family: var(--display); font-weight: 800; font-size: 1.35rem;
  letter-spacing: -.02em; text-align: center; color: var(--brand);
}

/* ============================================================ panel / settings */
.panel {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-lg); padding: 24px;
}
.panel + .panel { margin-top: 14px; }

.field { display: block; margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > .lbl {
  display: block; font-family: var(--display); font-size: 13.5px; font-weight: 700; color: var(--ink);
  margin-bottom: 8px; letter-spacing: -.005em;
}
.field .hint { font-size: 12.5px; color: var(--ink-3); margin: 7px 0 0; line-height: 1.5; }

input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; font-family: var(--body); font-size: 15px; color: var(--ink);
  background: var(--bg-tint); border: 1.5px solid var(--line);
  border-radius: 11px; padding: 12px 14px; line-height: 1.4;
  transition: border-color .15s, background .15s;
}
input:focus, select:focus, textarea:focus { background: var(--paper); border-color: var(--cat); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2.5px solid var(--cat); outline-offset: 1px; }
textarea { resize: vertical; min-height: 90px; font-family: var(--body); font-size: 14px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23868C9E' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; min-width: 0; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg label {
  font-size: 14px; font-weight: 600; padding: 10px 16px;
  border: 2px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink-2); cursor: pointer;
  transition: all .14s; user-select: none; line-height: 1.3;
}
.seg label:hover { border-color: var(--cat); }
.seg input:checked + label {
  background: var(--cat-tint); border-color: var(--cat);
  color: var(--cat); font-weight: 700;
}
.seg input:focus-visible + label { outline: 2.5px solid var(--cat); outline-offset: 2px; }
.seg label .sub { display: block; font-size: 11.5px; font-weight: 500; opacity: .78; margin-top: 1px; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.check input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--cat); flex: none; cursor: pointer; }

/* ============================================================ file list */
.flist { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.fitem {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg-tint); border: 1.5px solid var(--line);
  border-radius: 13px; padding: 11px 13px;
  transition: border-color .14s, background .14s;
}
.fitem.drag-over { border-color: var(--cat); background: var(--cat-tint); }
.fitem.dragging { opacity: .4; }
.fitem .thumb {
  width: 38px; height: 48px; flex: none; border-radius: 6px;
  background: var(--paper); border: 1px solid var(--line);
  object-fit: cover; display: grid; place-items: center;
  color: var(--ink-3); overflow: hidden;
}
.fitem .meta { min-width: 0; flex: 1; }
.fitem .fn {
  font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fitem .fs { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.fitem .acts { display: flex; gap: 2px; flex: none; }
.fitem .acts button {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; background: none; border-radius: 9px; cursor: pointer; color: var(--ink-3);
  transition: background .12s, color .12s;
}
.fitem .acts button:hover { background: var(--paper); color: var(--err); }
.fitem .acts button svg { width: 16px; height: 16px; }
.fitem .grip { display: flex; cursor: grab; color: var(--ink-3); flex: none; touch-action: none; }
.fitem .grip svg { width: 16px; height: 16px; }
.fitem .grip:active { cursor: grabbing; }

/* ============================================================ page picker */
.pgrid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  max-height: 480px; overflow-y: auto; padding: 4px;
}
.pgrid .pg {
  position: relative; border: 2.5px solid var(--line); border-radius: 12px;
  background: var(--paper); cursor: pointer; padding: 0; overflow: hidden;
  transition: border-color .14s, transform .14s;
}
.pgrid .pg canvas { width: 100%; height: auto; display: block; }
.pgrid .pg .n {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-family: var(--display); font-size: 10.5px; font-weight: 700;
  background: color-mix(in srgb, var(--ink) 78%, transparent); color: #fff;
  padding: 3px 0; text-align: center;
}
.pgrid .pg[aria-pressed="true"] { border-color: var(--cat); transform: scale(.96); }
.pgrid .pg[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: 5px; right: 5px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--cat); color: #fff; font-size: 12px;
  display: grid; place-items: center; font-weight: 700;
}

/* ============================================================ status / progress */
.status {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500; color: var(--ink-2); min-height: 26px;
}
.status svg { width: 20px; height: 20px; flex: none; }
.status[data-tone="err"] {
  color: var(--err); background: var(--err-tint);
  border: 1.5px solid color-mix(in srgb, var(--err) 30%, transparent);
  border-radius: 12px; padding: 12px 15px; align-items: flex-start; font-weight: 500;
}
.status[data-tone="ok"] { color: var(--ok); font-weight: 700; }

.reg-spin { animation: reg 1s linear infinite; }
@keyframes reg { to { transform: rotate(360deg); } }

.bar-track { height: 7px; background: var(--bg-tint); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar-fill { height: 100%; background: var(--cat); border-radius: 99px; width: 0%; transition: width .2s ease; }

/* ============================================================ result */
.result {
  border: 2px solid var(--ok); border-radius: var(--r-lg);
  background: var(--ok-tint); padding: 22px; display: grid; gap: 16px;
}
.result .rhead { display: flex; align-items: center; gap: 13px; }
.result .rhead .tile {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--paper); color: var(--ok);
}
.result .rhead .tile svg { width: 22px; height: 22px; }
.result .rtitle { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.result .rmeta { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.chain { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chain .lbl {
  font-family: var(--display); font-size: 12px; font-weight: 700;
  color: var(--ink-3); margin-right: 3px;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  padding: 9px 16px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-2);
  cursor: pointer; font-family: var(--body); line-height: 1.3;
  transition: border-color .14s, color .14s, background .14s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.chip svg { width: 14px; height: 14px; }

/* ============================================================ smart-match */
.match { display: grid; gap: 14px; }
.match-head {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 1.5px solid var(--line);
}
.match-head .fname {
  font-family: var(--display); font-weight: 700; font-size: 17px;
  letter-spacing: -.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.match-head .badge {
  font-family: var(--display); font-size: 11.5px; font-weight: 700;
  background: var(--brand-tint); color: var(--brand-ink);
  padding: 5px 12px; border-radius: var(--r-pill); flex: none;
}
.match-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.match-act {
  display: flex; align-items: center; gap: 13px; text-align: left;
  background: var(--bg-tint); border: 2px solid var(--line); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; text-decoration: none; color: var(--ink);
  font-family: var(--body); transition: all .14s; width: 100%;
}
.match-act .tile {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--paper); color: var(--brand);
}
.match-act .tile svg { width: 19px; height: 19px; }
.match-act:hover { border-color: var(--brand); background: var(--brand-tint); }
.match-act .t { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; font-family: var(--display); }
.match-act .d { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.match-act[data-primary="1"] { border-color: var(--brand); background: var(--brand-tint); }
.match-act[data-primary="1"] .tile { background: var(--brand); color: #fff; }

/* ============================================================ tool page structure */
.tool-hero { padding: 40px 0 30px; }
.tool-hero .tile-lg {
  width: 60px; height: 60px; border-radius: 18px; margin-bottom: 20px;
  display: grid; place-items: center; background: var(--cat-tint); color: var(--cat);
}
.tool-hero .tile-lg svg { width: 30px; height: 30px; }
.tool-hero h1 { max-width: 22ch; margin-bottom: 12px; }
.tool-hero .lede { font-size: 17px; max-width: 62ch; margin: 0; }

.explain-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.explain-grid .points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.explain-grid .points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.explain-grid .points svg { width: 20px; height: 20px; color: var(--ok); flex: none; margin-top: 1px; }
.explain-card {
  background: var(--cat-tint); border-radius: var(--r-lg); padding: 24px;
  border: 1.5px solid color-mix(in srgb, var(--cat) 25%, transparent);
}
.explain-card h3 { font-size: 15px; margin-bottom: 10px; color: var(--ink); }
.explain-card p { font-size: 13.5px; margin: 0; color: var(--ink-2); }

/* ============================================================ faq */
.faq { border-top: 1.5px solid var(--line); }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 19px 36px 19px 0; position: relative;
  font-family: var(--display); font-weight: 700; font-size: 15.5px; list-style: none; color: var(--ink);
  transition: color .14s;
}
.faq summary:hover { color: var(--brand); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 11px; height: 11px; margin-top: -7px;
  border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details[open] summary { color: var(--brand); }
.faq .ans { padding: 0 30px 20px 0; color: var(--ink-2); font-size: 14.5px; }
.faq .ans p:last-child { margin-bottom: 0; }

/* ============================================================ compare table */
.vs { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.vs th, .vs td { padding: 14px 16px; text-align: left; border-bottom: 1.5px solid var(--line); }
.vs thead th { font-family: var(--display); font-size: 12px; color: var(--ink-3); font-weight: 700; }
.vs tbody th { font-weight: 700; color: var(--ink); font-size: 14px; }
.vs .yes { color: var(--ok); font-weight: 700; }
.vs .no  { color: var(--ink-3); }
.vs td.us { background: var(--brand-tint); }
.vs thead th.us { color: var(--brand-ink); }

/* ============================================================ notes */
.note {
  border: 1.5px solid color-mix(in srgb, var(--cat) 30%, transparent);
  background: var(--cat-tint); color: var(--ink-2);
  padding: 15px 18px; border-radius: 14px; font-size: 13.5px; line-height: 1.55;
  display: flex; gap: 12px; align-items: flex-start;
}
.note svg { width: 19px; height: 19px; color: var(--cat); flex: none; margin-top: 1px; }
.note strong { color: var(--ink); }
.note p:last-child { margin-bottom: 0; }
.note p { margin: 0; }

/* ============================================================ footer */
footer.site { border-top: 1.5px solid var(--line); background: var(--paper); padding: 52px 0 32px; margin-top: 70px; }
.fgrid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
footer.site h4 { font-family: var(--display); font-size: 12.5px; color: var(--ink); margin: 0 0 14px; font-weight: 700; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer.site ul a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
footer.site ul a:hover { color: var(--brand); }
.fbot {
  margin-top: 38px; padding-top: 22px; border-top: 1.5px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-size: 13px; color: var(--ink-3);
}
.fbot nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.fbot a { color: var(--ink-3); text-decoration: none; }
.fbot a:hover { color: var(--ink); }

.crumb {
  font-size: 13px; font-weight: 500; color: var(--ink-3); padding: 20px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--brand); }

#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%);
  background: var(--ink); color: var(--paper); padding: 14px 22px;
  border-radius: var(--r-pill); font-size: 14px; font-weight: 600; z-index: 400;
  transition: transform .3s cubic-bezier(.2,.9,.3,1); box-shadow: var(--shadow-lift);
  max-width: calc(100vw - 32px); text-align: center;
}
#toast[data-on="true"] { transform: translate(-50%, 0); }

/* ============================================================ responsive */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .mega-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-art { max-width: 380px; margin: 0 auto; }
  .fgrid { grid-template-columns: 1fr 1fr 1fr; }
  .explain-grid { grid-template-columns: 1fr; }
  .steps-modern, .trust-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --gut: 18px; }
  .bar { height: 62px; gap: 8px; }
  nav.top { display: none; }
  nav.top[data-open="true"] {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1.5px solid var(--line);
    padding: 10px var(--gut) 20px; gap: 3px; box-shadow: var(--shadow-lift);
    max-height: calc(100vh - 62px); overflow-y: auto; margin-left: 0;
  }
  nav.top[data-open="true"] > a, nav.top[data-open="true"] .navbtn { text-align: left; padding: 13px 12px; }
  .menu-toggle { display: grid; }
  .mega { position: static; box-shadow: none; border: 0; padding: 8px 0 0; }
  .mega .wrap { padding: 0; }
  .mega-grid { grid-template-columns: 1fr; gap: 20px; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .steps-modern, .trust-grid { grid-template-columns: 1fr; gap: 14px; }
  .fgrid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .dz { padding: 38px 18px; }
  .dz-icon-tile { width: 56px; height: 56px; border-radius: 16px; }
  .dz-icon-tile svg { width: 26px; height: 26px; }
  section.band, section.band.tint { padding: 42px 0; }
  .hero { padding: 34px 0 20px; }
  .grid-tools { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
  .tcard { padding: 16px 14px; }
  .tcard .tile { width: 40px; height: 40px; border-radius: 11px; margin-bottom: 11px; }
  .tcard .tile svg { width: 20px; height: 20px; }
  .tcard .nm { font-size: 14.5px; }
  .tcard .ds { display: none; }
  .tcard .cta { font-size: 12.5px; }
  .vs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .vs { min-width: 520px; }
  .panel { padding: 17px; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
  .btn-lg, .btn-xl { width: 100%; }
  .fitem .grip { display: none; }
  .hero-ctas .btn { width: 100%; }
  .hero-ctas { flex-direction: column; }
}
@media (max-width: 420px) {
  .grid-tools { grid-template-columns: 1fr 1fr; }
  .fgrid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  header.site, footer.site, .tool-shell, #veil, #toast { display: none !important; }
  body { background: #fff; }
}
