/* ==========================================================================
   Funstool — design system
   Subject: browser-local PDF workbench. Language: technical drawing,
   vector nodes, hairline rules. Fidelity is the product, so the palette
   encodes it: pine = vector-safe, blue = fixed-DPI raster, amber = text only.
   ========================================================================== */

:root {
  /* colour */
  --ink:        #0B1B16;
  --ink-soft:   #17322B;
  --muted:      #586C65;
  --faint:      #6E817A;
  --paper:      #F3F6F4;
  --card:       #FFFFFF;
  --line:       #DEE7E2;
  --line-2:     #C6D4CD;
  --pine:       #0E5C4A;
  --pine-deep:  #093F32;
  --jade:       #12876B;
  --lime:       #DCF56F;
  --mist:       #ECF3F0;
  --vec:        #0B6B4F;
  --vec-bg:     #E3F4EB;
  --vec-line:   #B9E2CE;
  --ras:        #245A9E;
  --ras-bg:     #E6EFFA;
  --ras-line:   #C0D6F0;
  --txt:        #93540A;
  --txt-bg:     #FBF0DE;
  --txt-line:   #EFD7B2;
  --danger:     #B23B2E;

  /* type */
  --sans: "Inter", "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* form */
  --r-xs: 5px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(11, 27, 22, .05);
  --shadow:    0 1px 2px rgba(11, 27, 22, .04), 0 14px 34px -16px rgba(11, 27, 22, .22);
  --shadow-lg: 0 2px 4px rgba(11, 27, 22, .05), 0 30px 60px -28px rgba(11, 27, 22, .30);

  --head-h: 66px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.028em;
  line-height: 1.08;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--pine); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  transition: top .18s ease;
}
.skip:focus { top: 12px; }

/* ==========================================================================
   Buttons, chips, badges
   ========================================================================== */

.btn {
  --btn-bg: var(--pine);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -.01em;
  border: 1px solid transparent;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--pine-deep); transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(9, 63, 50, .7); }
.btn:active { transform: translateY(0) scale(.995); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { background: #fff; border-color: var(--pine); box-shadow: var(--shadow-sm); }

.btn--white { --btn-bg: #fff; --btn-fg: var(--ink); border-color: var(--line); }
.btn--white:hover { background: #fff; border-color: var(--line-2); }

.btn--lg { padding: 15px 26px; font-size: 16px; border-radius: 10px; }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn svg { width: 17px; height: 17px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: var(--ink-soft);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--line-2); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Fidelity badge — the product's core signal, repeated everywhere. */
.fid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 560;
  letter-spacing: .005em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.fid::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.fid--vector { color: var(--vec); background: var(--vec-bg); border-color: var(--vec-line); }
.fid--raster { color: var(--ras); background: var(--ras-bg); border-color: var(--ras-line); }
.fid--text   { color: var(--txt); background: var(--txt-bg); border-color: var(--txt-line); }

.tag-mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .01em;
  color: var(--muted);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 246, 244, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.035em;
  flex: none;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand small {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.nav-link, .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover, .nav-btn:hover, .nav-group[data-open="true"] .nav-btn { background: #fff; color: var(--ink); }
.nav-btn svg { width: 13px; height: 13px; opacity: .55; transition: transform .18s ease; }
.nav-group[data-open="true"] .nav-btn svg { transform: rotate(180deg); }

.nav-group { position: relative; }
.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -10px;
  width: 460px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-group[data-open="true"] .nav-menu { opacity: 1; visibility: visible; transform: none; }
.nav-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  transition: background .13s ease;
}
.nav-item:hover { background: var(--mist); }
.nav-item svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--pine); }
.nav-item b { display: block; font-size: 14px; font-weight: 550; letter-spacing: -.015em; }
.nav-item span { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.nav-menu-foot {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 10px 10px 4px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}

.head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-soft);
}
.lang-toggle:hover { border-color: var(--pine); color: var(--pine); }

/* Language selector */
.lang-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 550;
  transition: border-color .15s ease, color .15s ease;
}
.lang-select:hover, .lang-select:focus-within { border-color: var(--pine); color: var(--pine); }
.lang-select .globe { width: 14px; height: 14px; color: var(--faint); flex: none; }
.lang-select select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0 16px 0 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
  max-width: 118px;
}
.lang-select select option { color: var(--ink); background: #fff; }
.lang-select .chev {
  position: absolute;
  right: 9px;
  width: 12px;
  height: 12px;
  opacity: .55;
  pointer-events: none;
}

.local-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--vec);
  background: var(--vec-bg);
  border: 1px solid var(--vec-line);
  border-radius: 999px;
  padding: 6px 11px;
  font-weight: 550;
}
.local-pill svg { width: 13px; height: 13px; }

.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  place-items: center;
}
.burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative; }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink);
}
.burger span::before { top: -5px; }
.burger span::after { top: 5px; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 58px 0 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(11, 27, 22, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 27, 22, .055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(120% 90% at 18% 0%, #000 25%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 18% 0%, #000 25%, transparent 72%);
  pointer-events: none;
}
.hero-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  box-shadow: var(--shadow-sm);
}
.eyebrow i {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--vec-bg);
  display: grid; place-items: center;
}
.eyebrow i::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jade); }

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 4.6vw, 55px);
  letter-spacing: -.042em;
  line-height: 1.02;
  font-weight: 600;
}
.hero h1 em {
  font-style: normal;
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .05em;
  height: .34em;
  background: var(--lime);
  z-index: -1;
  border-radius: 2px;
}
.hero-lede {
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}
.hero-lede b { color: var(--ink); font-weight: 550; }

.search {
  margin: 26px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 6px 6px 6px 14px;
  max-width: 470px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search:focus-within { border-color: var(--pine); box-shadow: 0 0 0 4px rgba(18, 135, 107, .1); }
.search svg { width: 17px; height: 17px; color: var(--faint); flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 15px;
  padding: 8px 0;
}
.search input::placeholder { color: var(--faint); }
.search kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  padding: 2px 6px;
  margin-right: 4px;
}
.search .btn { padding: 9px 15px; font-size: 14px; }

.hero-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--faint);
}
.hero-quick a {
  color: var(--muted);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
  transition: color .14s ease, border-color .14s ease;
}
.hero-quick a:hover { color: var(--pine); border-color: var(--pine); }

/* Hero workbench mock */
.hero-stage {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  isolation: isolate;
}
.hero-stage::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(220, 245, 111, .35), transparent 42%);
  z-index: -1;
  opacity: .9;
}
.hs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 12px;
}
.hs-bar b { font-size: 13.5px; font-weight: 550; letter-spacing: -.01em; }
.hs-dots { display: flex; gap: 5px; }
.hs-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }

.hs-sheet {
  position: relative;
  aspect-ratio: 1 / .82;
  border-radius: var(--r);
  background:
    repeating-linear-gradient(to bottom, transparent 0 27px, rgba(11, 27, 22, .055) 27px 28px),
    #FCFDFC;
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  grid-template-columns: 30% 1fr;
}
.hs-rail { border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 7px; }
.hs-rail span {
  height: 7px;
  border-radius: 3px;
  background: var(--line);
  display: block;
}
.hs-rail span:nth-child(1) { width: 84%; background: var(--line-2); }
.hs-rail span:nth-child(2) { width: 66%; }
.hs-rail span:nth-child(3) { width: 74%; }
.hs-rail span:nth-child(4) { width: 52%; background: var(--vec-line); }
.hs-body { padding: 18px 16px; display: flex; flex-direction: column; gap: 9px; position: relative; }
.hs-line { height: 8px; border-radius: 4px; background: var(--line); }
.hs-line.w70 { width: 70%; }
.hs-line.w88 { width: 88%; }
.hs-line.w60 { width: 60%; }
.hs-line.head { height: 13px; width: 52%; background: var(--ink-soft); border-radius: 3px; }
.hs-block {
  margin-top: 4px;
  height: 74px;
  border: 1px dashed var(--jade);
  border-radius: var(--r-sm);
  background: rgba(18, 135, 107, .05);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--vec);
  font-weight: 550;
  letter-spacing: .01em;
}
.hs-block span { display: inline-flex; align-items: center; gap: 5px; }
.hs-block span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--jade); }

.hs-tag {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: #fff;
  border: 1px solid var(--vec-line);
  color: var(--vec);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 550;
  box-shadow: var(--shadow-sm);
}

.hs-nodes i {
  position: absolute;
  width: 9px; height: 9px;
  border: 1.5px solid var(--jade);
  background: #fff;
  border-radius: 1px;
}
.hs-nodes i:nth-child(1) { left: 30%; top: 18%; margin-left: -5px; margin-top: -5px; }
.hs-nodes i:nth-child(2) { left: 30%; top: 62%; margin-left: -5px; margin-top: -5px; }
.hs-nodes i:nth-child(3) { left: 84%; top: 18%; margin-left: -5px; margin-top: -5px; }

.hs-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 6px 2px;
  border-top: 1px solid var(--line);
  margin-top: 13px;
  font-size: 12.5px;
  color: var(--muted);
}
.hs-foot .fid { flex: none; }
.hs-meter {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
  max-width: 120px;
}
.hs-meter i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--jade), var(--lime)); }

/* ==========================================================================
   Fidelity strip — three tiers explained, the strategic centre of the page
   ========================================================================== */

.fidstrip {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.fidstrip-in {
  display: grid;
  grid-template-columns: 220px repeat(3, 1fr);
  gap: 0;
  align-items: stretch;
}
.fs-head {
  padding: 26px 24px 26px 0;
  border-right: 1px solid var(--line);
  margin-right: 26px;
}
.fs-head h2 { font-size: 15px; letter-spacing: -.02em; }
.fs-head p { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.fs-item { padding: 26px 22px; border-right: 1px solid var(--line); }
.fs-item:last-child { border-right: 0; padding-right: 0; }
.fs-item .fid { margin-bottom: 10px; }
.fs-item h3 { font-size: 14.5px; font-weight: 550; letter-spacing: -.015em; }
.fs-item p { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 72px 0; }
.section--tight { padding: 52px 0; }
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.sec-head h2 {
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -.035em;
}
.sec-head p { color: var(--muted); font-size: 15px; margin-top: 9px; max-width: 52ch; }
.sec-head .btn { flex: none; }

/* Tool filters */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.toolbar .count { margin-left: auto; font-size: 12.5px; color: var(--faint); font-family: var(--mono); }

/* Tool grid */
.grid-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .16s ease, box-shadow .2s ease, transform .18s ease;
  min-height: 168px;
}
.tcard:hover {
  border-color: var(--pine);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.tcard:focus-visible { outline-offset: 4px; }

/* vector selection handles on hover — the signature detail */
.handles { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .16s ease; }
.tcard:hover .handles, .tcard:focus-visible .handles { opacity: 1; }
.handles i {
  position: absolute;
  width: 7px; height: 7px;
  background: #fff;
  border: 1.5px solid var(--pine);
  border-radius: 1px;
}
.handles i:nth-child(1) { left: -4px; top: -4px; }
.handles i:nth-child(2) { right: -4px; top: -4px; }
.handles i:nth-child(3) { left: -4px; bottom: -4px; }
.handles i:nth-child(4) { right: -4px; bottom: -4px; }

.tcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tcard-ico {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--mist);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--pine);
  transition: background .16s ease, border-color .16s ease;
}
.tcard-ico svg { width: 19px; height: 19px; }
.tcard:hover .tcard-ico { background: var(--vec-bg); border-color: var(--vec-line); }
.tcard h3 { font-size: 15.5px; font-weight: 550; letter-spacing: -.02em; }
.tcard p { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.tcard-desc { margin-top: auto; }
.tcard-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcard-go {
  font-size: 12px;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .16s ease, gap .16s ease;
}
.tcard:hover .tcard-go { color: var(--pine); gap: 7px; }
.tcard-go svg { width: 12px; height: 12px; }

.empty-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  color: var(--muted);
  font-size: 14px;
}

/* ==========================================================================
   How it works / trust
   ========================================================================== */

.how {
  background: var(--ink);
  color: #EEF4F0;
  border-radius: 0;
}
.how .wrap { padding-block: 68px; }
.how h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.how-lede { color: #A9BDB4; margin-top: 10px; max-width: 56ch; font-size: 15px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 40px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.step { background: var(--ink); padding: 26px 24px 30px; }
.step-n {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--lime);
  letter-spacing: .06em;
}
.step h3 { font-size: 17px; margin-top: 10px; letter-spacing: -.02em; font-weight: 550; }
.step p { font-size: 13.5px; color: #A9BDB4; margin-top: 8px; line-height: 1.55; }

.trust-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: start;
}
.trust-grid h2 { font-size: clamp(25px, 3vw, 33px); letter-spacing: -.035em; }
.trust-copy p { color: var(--muted); font-size: 15px; margin-top: 14px; max-width: 56ch; line-height: 1.65; }
.trust-list { margin-top: 24px; display: grid; gap: 2px; }
.trust-row {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  align-items: flex-start;
}
.trust-row svg { width: 18px; height: 18px; color: var(--vec); flex: none; margin-top: 3px; }
.trust-row b { display: block; font-size: 14.5px; font-weight: 550; letter-spacing: -.01em; }
.trust-row span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

.note-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.note-card h3 { font-size: 15px; letter-spacing: -.02em; }
.note-card p { font-size: 13.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.note-card ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.note-card li {
  display: flex; gap: 9px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5;
}
.note-card li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--jade); flex: none; margin-top: 8px;
}
.note-card .tag-mono { display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* FAQ */
.faq { max-width: 860px; }
.faq details {
  border-top: 1px solid var(--line);
  padding: 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 36px 18px 0;
  position: relative;
  font-size: 15.5px;
  font-weight: 550;
  letter-spacing: -.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 26px;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq p { padding: 0 40px 20px 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.faq p + p { margin-top: -10px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-foot {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 54px 0 34px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.foot-brand p { font-size: 13px; color: var(--muted); margin-top: 12px; max-width: 30ch; line-height: 1.6; }
.foot-col h4 {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.foot-col a { display: block; font-size: 13.5px; color: var(--ink-soft); padding: 4px 0; transition: color .14s ease; }
.foot-col a:hover { color: var(--pine); }
.foot-base {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--faint);
}
.foot-base span + span { margin-left: 16px; }

/* ==========================================================================
   Tool page
   ========================================================================== */

.page-head {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--faint);
  margin-bottom: 18px;
}
.crumbs a:hover { color: var(--pine); }
.crumbs svg { width: 11px; height: 11px; }
.page-head h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -.04em;
  max-width: 20ch;
}
.page-lede {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}
.page-meta { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.page-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

/* Fidelity banner — mandatory on every tool page */
.fidbanner {
  margin-top: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 15px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #fff;
}
.fidbanner--vector { background: var(--vec-bg); border-color: var(--vec-line); }
.fidbanner--raster { background: var(--ras-bg); border-color: var(--ras-line); }
.fidbanner--text   { background: var(--txt-bg); border-color: var(--txt-line); }
.fidbanner-ico {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid rgba(11, 27, 22, .07);
  flex: none;
}
.fidbanner-ico svg { width: 16px; height: 16px; }
.fidbanner--vector .fidbanner-ico { color: var(--vec); }
.fidbanner--raster .fidbanner-ico { color: var(--ras); }
.fidbanner--text .fidbanner-ico { color: var(--txt); }
.fidbanner b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.012em; }
.fidbanner p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; max-width: 78ch; }
.fidbanner--text p, .fidbanner--raster p { color: var(--ink-soft); opacity: .82; }
.fidbanner-more {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--pine);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  white-space: nowrap;
  align-self: center;
}

/* Workbench */
.wb-section { padding: 26px 0 60px; }
.wb {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 560px;
}
.wb-rail {
  border-right: 1px solid var(--line);
  background: #FCFDFC;
  padding: 6px 0 20px;
  display: flex;
  flex-direction: column;
}
.rail-head {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rail-head b { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.rail-head .tag-mono { font-size: 11px; }
.rail-tools { padding: 0 8px; }
.rail-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.rail-link svg { width: 15px; height: 15px; color: var(--faint); flex: none; }
.rail-link:hover { background: var(--mist); }
.rail-link[aria-current="page"] {
  background: #fff;
  border-left-color: var(--jade);
  color: var(--pine);
  font-weight: 550;
  box-shadow: inset 0 0 0 1px var(--line);
}
.rail-link[aria-current="page"] svg { color: var(--pine); }
.rail-sep {
  height: 1px;
  background: var(--line);
  margin: 12px 18px;
}
.rail-note {
  margin: auto 14px 0;
  padding: 12px 13px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  background: #fff;
}
.rail-note b { color: var(--ink-soft); font-weight: 600; }

.wb-main { display: flex; flex-direction: column; min-width: 0; }

.wb-stage {
  flex: 1;
  padding: 22px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Drop zone */
.drop {
  flex: 1;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(18, 135, 107, .045), transparent 60%),
    #FCFDFC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 6px;
  transition: border-color .16s ease, background .16s ease;
  cursor: pointer;
  position: relative;
}
.drop:hover, .drop.is-over { border-color: var(--jade); background: #F7FBF9; }
.drop.is-over { border-style: solid; }
.drop-art { position: relative; z-index: 0; width: 104px; height: 84px; margin-bottom: 14px; }
.drop-art .sheet {
  position: absolute;
  inset: 0;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 10px 24px -14px rgba(11, 27, 22, .35);
  transform: rotate(-4deg);
}
.drop-art .sheet::before {
  content: "";
  position: absolute; inset: 18px 14px auto;
  height: 6px; border-radius: 3px; background: var(--line);
  box-shadow: 0 12px 0 var(--line), 0 24px 0 var(--line);
}
.drop-art .sheet-back {
  position: absolute;
  inset: 6px -6px -6px 6px;
  background: #F1F6F3;
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: -1;
  transform: rotate(3deg);
}
.drop-art .plus {
  position: absolute;
  right: -10px; bottom: -10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  display: grid; place-items: center;
  border: 3px solid #fff;
}
.drop-art .plus svg { width: 13px; height: 13px; }
.drop h3 { font-size: 17px; letter-spacing: -.025em; }
.drop p { font-size: 13px; color: var(--muted); max-width: 40ch; line-height: 1.5; }
.drop .btn { margin-top: 16px; }
.drop-foot {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--faint);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.drop-foot span { display: inline-flex; align-items: center; gap: 5px; }
.drop-foot svg { width: 12px; height: 12px; color: var(--vec); }

/* Loaded state */
.files { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
}
.file-ico {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--mist);
  display: grid; place-items: center;
  color: var(--pine);
  flex: none;
}
.file-ico svg { width: 16px; height: 16px; }
.file-meta { min-width: 0; flex: 1; }
.file-meta b {
  display: block;
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta span { display: block; font-size: 11.5px; color: var(--faint); font-family: var(--mono); margin-top: 1px; }
.file-x {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--faint);
}
.file-x:hover { background: var(--mist); color: var(--danger); }
.file-x svg { width: 14px; height: 14px; }

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stage-head b { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--faint); }
.stage-head .tag-mono { font-size: 11.5px; }

/* Page map preview */
.pagemap {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #FCFDFC;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
  min-height: 190px;
  max-height: 300px;
  overflow: auto;
}
.pg {
  position: relative;
  width: 74px;
  height: 100px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, opacity .16s ease, border-color .16s ease;
}
.pg.has-thumb { border-color: var(--line); }
.pg::before {
  content: "";
  position: absolute;
  inset: 10px 8px auto;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  box-shadow: 0 8px 0 var(--line), 0 16px 0 var(--line), 0 24px 0 var(--line);
  opacity: .9;
}
.pg.has-thumb::before { opacity: 0; }
.pg em {
  position: absolute;
  bottom: 4px; right: 5px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-soft);
  font-style: normal;
  background: rgba(255, 255, 255, .88);
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.5;
}
.pg--removed { opacity: .62; border-style: dashed; border-color: rgba(179, 38, 30, .55); background-color: #FFF7F6; }
.pg--removed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3261e' stroke-width='2.6' stroke-linecap='round'><path d='M6 6l12 12M18 6L6 18'/></svg>") center / 28px 28px no-repeat;
}
.pg--kept {
  border-color: var(--jade);
  outline: 2px solid var(--jade);
  outline-offset: 1px;
  box-shadow: 0 0 0 5px rgba(18, 135, 107, .18), var(--shadow-sm);
}
.pg--new {
  border-color: var(--jade);
  outline: 2px dashed rgba(18, 135, 107, .75);
  outline-offset: 1px;
  box-shadow: 0 0 0 5px rgba(18, 135, 107, .10), var(--shadow-sm);
}
.pg--swap {
  border-color: #B8791D;
  outline: 2px solid rgba(184, 121, 29, .7);
  outline-offset: 1px;
  box-shadow: 0 0 0 5px rgba(184, 121, 29, .12), var(--shadow-sm);
}
.pg--moved { border-color: var(--pine); box-shadow: 0 0 0 2px rgba(14, 92, 74, .18); }
.pg .pg-rot { position: absolute; inset: 0; display: grid; place-items: center; color: var(--pine); opacity: .8; }
.pg .pg-rot svg { width: 15px; height: 15px; }
.pg.is-rot90 { transform: rotate(90deg); }
.pg.is-rot180 { transform: rotate(180deg); }
.pg.is-rot270 { transform: rotate(270deg); }

.map-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 2px;
}
.thumb-note {
  flex-basis: 100%;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  padding-top: 4px;
}
.map-legend i {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: 1px;
  border: 1px solid var(--line-2);
  background: #fff;
}
.map-legend .k-kept { border: 2px solid var(--jade); background: var(--vec-bg); }
.map-legend .k-new { border: 2px dashed var(--jade); background: var(--vec-bg); }
.map-legend .k-swap { border: 2px solid #B8791D; background: #FDF6E9; }
.map-legend .k-removed { border-style: dashed; border-color: rgba(179, 38, 30, .55); background: #FFF7F6; }

/* Options rail inside workbench (mobile-first column on small screens) */
.wb-opts {
  border-top: 1px solid var(--line);
  padding: 18px 22px;
  background: #FCFDFC;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 20px;
}
.wb-opts[hidden] { display: none; }
.opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.opt label { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.opt input[type="text"], .opt input[type="number"], .opt select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 13.5px;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.opt input:focus, .opt select:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(18, 135, 107, .12); }
.opt .hint { font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.opt--wide { grid-column: 1 / -1; }
.opt-row { display: flex; align-items: center; gap: 8px; }
.opt-row input[type="range"] { flex: 1; accent-color: var(--jade); }
.opt-row .val { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); min-width: 38px; text-align: right; }
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  gap: 2px;
}
.seg button {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 5px;
  color: var(--muted);
  font-weight: 500;
  transition: background .14s ease, color .14s ease;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 550; }

/* Stepped range: the − and + ends are clickable, the bar still drags */
.opt-row.opt-step { display: flex; align-items: center; gap: 6px; min-width: 0; }
.opt-row.opt-step input[type="range"] { flex: 1 1 auto; min-width: 40px; }
.opt-row.opt-step .val { flex: 0 0 auto; min-width: 34px; text-align: right; white-space: nowrap; }
.step-btn {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  transition: border-color .14s ease, background .14s ease;
}
.step-btn:hover { border-color: var(--jade); background: var(--vec-bg); }
.step-btn:active { transform: translateY(1px); }

.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--jade); flex: none; }
.check span { line-height: 1.45; }
.check small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 2px; }

/* Export bar */
.wb-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
  flex-wrap: wrap;
}
.wb-foot .status { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.wb-foot .status i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--vec); flex: none;
}
.wb-foot .status.is-warn i { background: var(--txt); }
.wb-foot .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* Text sample preview (Word / PPT / Excel / TXT) */
.sample-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 6px;
}
.sample-head b { font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); }
.text-sample {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #FCFDFC;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 176px;
  overflow: auto;
}
.sample-block {
  padding: 12px 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  background: #FCFDFC;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.sample-block.is-warn {
  background: var(--txt-bg);
  border-color: var(--txt-line);
  color: var(--ink-soft);
}

/* Live watermark preview */
.wm-preview {
  position: relative;
  height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    repeating-linear-gradient(to bottom, transparent 0 25px, rgba(11, 27, 22, .05) 25px 26px),
    #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.wm-preview .wm-lines { position: absolute; inset: 26px 30px auto; display: grid; gap: 10px; }
.wm-preview .wm-lines span { height: 7px; border-radius: 3px; background: var(--line); }
.wm-preview .wm-lines span:nth-child(2) { width: 82%; }
.wm-preview .wm-lines span:nth-child(3) { width: 64%; }
.wm-preview .wm-lines span:nth-child(4) { width: 74%; }
.wm-text {
  position: relative;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.wm-text.tiled {
  position: absolute;
  inset: -40%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px 12px;
  place-items: center;
  transform: rotate(-24deg);
  white-space: nowrap;
}
.wm-badge {
  position: absolute;
  right: 10px; bottom: 10px;
  font-size: 11px;
  color: var(--faint);
  font-family: var(--mono);
  background: rgba(255, 255, 255, .9);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* Mask editor: the real PDF page with the mask and the replacement drawn on top */
.edit-scroll { overflow: auto; padding-bottom: 2px; }
.edit-stage {
  position: relative;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.edit-stage img { display: block; width: 100%; height: auto; }
.edit-stage.is-busy {
  display: grid;
  place-items: center;
  width: auto !important;
  min-height: 220px;
  color: var(--muted);
  font-size: 12.5px;
}
.edit-mask { position: absolute; display: block; }
.edit-new {
  position: absolute;
  display: block;
  white-space: pre;
  font-family: "Microsoft YaHei", "PingFang SC", "SimHei", sans-serif;
  pointer-events: none;
}

/* Content below workbench */
.doc {
  padding: 54px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}
.doc h2 {
  font-size: 24px;
  letter-spacing: -.03em;
  margin-top: 34px;
}
.doc h2:first-child { margin-top: 0; }
.doc p { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin-top: 10px; max-width: 68ch; }
.doc ol, .doc ul { margin: 14px 0 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.doc ol li {
  counter-increment: s;
  position: relative;
  padding-left: 40px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.doc ol li::before {
  content: "0" counter(s);
  position: absolute;
  left: 0; top: 1px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--pine);
  background: var(--vec-bg);
  border: 1px solid var(--vec-line);
  border-radius: 5px;
  padding: 2px 6px;
}
.doc ol li b { color: var(--ink); font-weight: 550; display: block; margin-bottom: 2px; }
.doc ul li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.doc ul li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--jade);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13.5px;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th {
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  background: #FCFDFC;
  border-top: 1px solid var(--line);
}
.spec-table td:first-child { font-weight: 550; color: var(--ink-soft); white-space: nowrap; }
.spec-table td { color: var(--muted); }

.doc-side { position: sticky; top: calc(var(--head-h) + 22px); display: grid; gap: 14px; }
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
}
.side-card h3 { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.side-card a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.side-card a:last-child { border-bottom: 0; padding-bottom: 0; }
.side-card a:hover { color: var(--pine); }
.side-card a svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.side-card p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* Non-English tool pages: the English long-form article is replaced by a
   short localized guide, so a page never mixes two languages. */
body.lang-lite .doc { display: none; }
body.lang-lite .page-meta .tag-mono,
body.lang-lite .page-meta .dot { display: none; }
.guide { display: none; padding: 40px 0 64px; border-top: 1px solid var(--line); }
body.lang-lite .guide { display: block; }
.guide h2 { font-size: 23px; letter-spacing: -.03em; }
.guide ol { counter-reset: g; list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 16px; max-width: 760px; }
.guide li {
  counter-increment: g;
  position: relative;
  padding-left: 42px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.guide li::before {
  content: "0" counter(g);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--pine);
  background: var(--vec-bg);
  border: 1px solid var(--vec-line);
  border-radius: 5px;
  padding: 2px 6px;
}
.guide li b { display: block; color: var(--ink); font-weight: 550; margin-bottom: 3px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 300;
  max-width: 90vw;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Modal (fidelity explainer) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 27, 22, .42);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s;
}
.modal.is-on { opacity: 1; visibility: visible; }
.modal-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 86vh;
  overflow: auto;
}
.modal-card h3 { font-size: 20px; letter-spacing: -.03em; }
.modal-card p { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.65; }
.modal-card .btn { margin-top: 20px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .grid-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-in { gap: 36px; }
  .fidstrip-in { grid-template-columns: 1fr 1fr 1fr; }
  .fs-head { display: none; }
  .fs-item:first-of-type { padding-left: 0; }
  .doc { grid-template-columns: 1fr; gap: 36px; }
  .doc-side { position: static; grid-template-columns: 1fr 1fr; display: grid; }
}

@media (max-width: 900px) {
  .nav, .local-pill { display: none; }
  .burger { display: grid; }
  .head-in { gap: 12px; }
  .hero { padding-top: 40px; }
  .hero-in { grid-template-columns: 1fr; gap: 34px; }
  .hero-lede { max-width: none; }
  .hero-stage { max-width: 520px; }
  .grid-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; gap: 30px; }
  .wb { grid-template-columns: 1fr; }
  .wb-rail { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .fidstrip-in { grid-template-columns: 1fr; }
  .fs-item { border-right: 0; border-top: 1px solid var(--line); padding-left: 0; padding-right: 0; }
  .fs-item:last-child { padding-right: 0; }
  .doc-side { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap { padding-inline: 18px; }
  .hero h1 { font-size: 32px; }
  .section { padding: 48px 0; }
  .grid-tools { grid-template-columns: 1fr; }
  .tcard { min-height: 0; }
  .fidbanner { grid-template-columns: auto 1fr; }
  .fidbanner-more { grid-column: 2; justify-self: start; }
  .wb-stage { padding: 14px; }
  .wb-opts { padding: 16px; }
  .wb-foot { padding: 12px 16px; }
  .wb-foot .actions { margin-left: 0; width: 100%; }
  .wb-foot .actions .btn { flex: 1; }
  .page-head h1 { font-size: 27px; }
  .toolbar .count { margin-left: 0; }
}

/* Mobile nav panel */
.mobile-nav {  position: fixed;
  inset: var(--head-h) 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px 22px;
  z-index: 99;
  display: none;
  max-height: calc(100vh - var(--head-h));
  overflow: auto;
}
.mobile-nav.is-on { display: block; }
.mobile-nav h4 {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 16px 0 6px;
}
.mobile-nav a { display: block; padding: 9px 0; font-size: 14.5px; border-bottom: 1px solid var(--line); }

/* RTL (Arabic) — mirror the anchored pieces the layout assumes */
[dir="rtl"] .nav-menu { left: auto; right: -10px; }
[dir="rtl"] .pg em { right: auto; left: 5px; }
[dir="rtl"] .lang-select select { padding: 0 0 0 16px; }
[dir="rtl"] .lang-select .chev { right: auto; left: 9px; }
[dir="rtl"] .toast { direction: rtl; }

@media (max-width: 620px) {
  .head-right .btn--sm { display: none; }
  .lang-select select { max-width: 92px; }
}
