/* ==========================================================================
   SYSUE OFFICE design system
   Flat surfaces, hairline borders, sharp corners. Deep crimson on slate.
   No gradients, no glows, no rounded-pill chrome.
   ========================================================================== */

/* --------------------------------------------------------------- webfaces
The interface family is Adobe Clean and the logo lockup is Helvetica World.
Both are proprietary and cannot be redistributed, so the exact family names
lead each stack (used wherever they are installed) and the self-hosted files
below carry the same skeleton: Source Sans 3 for the interface, Arimo for the
Helvetica lineage. Both are licensed under the SIL Open Font License, served
from this origin, so no third party is contacted at runtime. */
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-italic-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Arimo";
  src: url("/assets/fonts/arimo-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --crimson: #800000;
  --crimson-deep: #5c0000;
  --crimson-bright: #a0121f;
  --crimson-wash: #fbf4f4;
  --crimson-line: #e8d2d2;

  --slate-900: #131417;
  --slate-800: #1c1d21;
  --slate-700: #33353b;
  --slate-600: #4c4f57;
  --slate-500: #6d7178;
  --slate-400: #9a9ea6;
  --slate-300: #c7cacf;
  --slate-200: #e2e4e7;
  --slate-100: #f2f3f5;
  --slate-50: #fafbfc;

  --ok: #0d6b3f;
  --ok-wash: #eef7f2;
  --ok-line: #c9e2d4;
  --err: #a4262c;
  --err-wash: #fdf3f3;
  --err-line: #edd2d3;

  --line: var(--slate-200);
  --line-strong: var(--slate-300);

  --radius: 3px;
  --radius-sm: 2px;
  --maxw: 1200px;

  /* Interface copy: Adobe Clean, then the self-hosted stand-in. */
  --font-sans: "Adobe Clean", "Adobe Clean Variable", "Source Sans 3", ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Logo lockup: Helvetica World Bold, then the Helvetica lineage. */
  --font-logo: "Helvetica World", "Helvetica World Bold", "Helvetica Neue", "Arimo", Helvetica,
    Arial, sans-serif;
  /* The monospace slot is retired: every interface string now sets in the
     interface family, with tabular figures keeping data columns aligned. */
  --font-mono: var(--font-sans);

  --shadow-1: 0 1px 1px rgba(19, 20, 23, 0.04);
  --shadow-2: 0 12px 28px rgba(19, 20, 23, 0.1);
  /* Soft lift for cards: a hairline of contact plus a wide, low ambient blur. */
  --shadow-soft: 0 1px 2px rgba(19, 20, 23, 0.04), 0 18px 36px -22px rgba(19, 20, 23, 0.22);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.58;
  color: var(--slate-800);
  background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
/* Controls inherit the interface family instead of the system UI face. */
button, input, select, textarea, optgroup { font-family: inherit; }
a { color: var(--crimson); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 0.6rem;
  color: var(--slate-900);
  font-weight: 700;
  letter-spacing: -0.021em;
  line-height: 1.16;
}
h1 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.012em; }
h4 { font-size: 0.9rem; }
p { margin: 0 0 1rem; color: var(--slate-600); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.muted { color: var(--slate-500); }
.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;
}

/* micro label used across the system */
.eyebrow, .kicker, .panel h3, .mega-head span, .footer-col h4, .ad-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 26px;
  min-height: 74px;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: block; width: auto; height: 40px; flex: none;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-logo);
  font-size: 1.06rem; font-weight: 700; letter-spacing: 0.13em;
  color: var(--crimson); text-transform: uppercase; line-height: 1.05;
}
.brand-sub {
  font-family: var(--font-sans); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.15em; line-height: 1.35;
  text-transform: uppercase; color: var(--slate-500); margin-top: 4px;
}

.main-nav { display: flex; align-items: stretch; margin-left: auto; }
.nav-account { display: none; }
.nav-item { position: relative; }

/* Touch-only and pointer-only copy. Both are in the markup so the switch is
   pure CSS and works before JavaScript runs. */
.tap-only { display: none; }

body.nav-open { overflow: hidden; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px; height: 100%;
  padding: 12px 15px; border: 0; border-bottom: 2px solid transparent;
  background: none; cursor: pointer; font-family: inherit;
  font-size: 0.9rem; font-weight: 600; letter-spacing: -0.005em; color: var(--slate-700);
}
.nav-link:hover { color: var(--crimson); background: var(--slate-100); text-decoration: none; }
.nav-item.open .nav-link, .nav-item.current .nav-link { color: var(--crimson); border-bottom-color: var(--crimson); }
.nav-link .caret {
  width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.nav-item.open .caret { transform: rotate(-135deg) translateY(-1px); }

.nav-item:last-child .mega { left: auto; right: 0; }

/* On desktop the panel is 760px wide but the trigger sits mid-header, so between
   roughly 901px and 1330px a per-item anchor pushed the panel past the right
   edge. Anchoring to the header container keeps every panel inside the layout. */
@media (min-width: 901px) {
  .header-inner { position: relative; }
  .nav-item { position: static; }
  .main-nav .mega {
    left: auto; right: 24px;
    width: min(760px, calc(100% - 48px));
  }
}
.mega {
  position: absolute; top: calc(100% + 1px); left: 0;
  width: min(760px, calc(100vw - 48px));
  background: #fff; border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
  padding: 0; display: none;
}
.nav-item.open .mega { display: block; }
.mega-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--slate-50);
}
.mega-head span { color: var(--crimson); }
.mega-head a { font-size: 0.78rem; font-weight: 600; }
.mega-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mega-col { padding: 10px 16px 16px; }
.mega-col + .mega-col { border-left: 1px solid var(--line); }
.mega-link {
  display: block; padding: 8px 0; color: var(--slate-800);
  font-size: 0.88rem; font-weight: 600; border-bottom: 1px solid var(--slate-100);
}
.mega-link:last-child { border-bottom: 0; }
.mega-link:hover { color: var(--crimson); text-decoration: none; }
.mega-link small { display: block; font-weight: 400; color: var(--slate-500); font-size: 0.76rem; line-height: 1.4; }
.mega-foot {
  border-top: 1px solid var(--line); background: var(--slate-50);
  padding: 10px 16px; font-size: 0.76rem; color: var(--slate-500);
  display: flex; align-items: center; gap: 8px;
}

.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }

/* buttons: rectangular, hairline, no lift */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius);
  font-family: inherit; font-size: 0.9rem; font-weight: 600; letter-spacing: -0.004em;
  cursor: pointer; text-decoration: none; background: #fff; color: var(--slate-800);
  transition: background 0.12s linear, border-color 0.12s linear, color 0.12s linear;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-deep); border-color: var(--crimson-deep); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--slate-800); }
.btn-ghost:hover { border-color: var(--crimson); color: var(--crimson); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--slate-600); }
.btn-quiet:hover { color: var(--crimson); background: var(--slate-100); }
.btn-lg { padding: 13px 24px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.google-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 15px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--slate-800); font-family: inherit;
  font-size: 0.86rem; font-weight: 600; cursor: pointer;
}
.google-btn:hover { border-color: var(--slate-500); background: var(--slate-50); }
.google-btn .g-mark, .nav-account-btn .g-mark { width: 17px; height: 17px; flex: none; }
.google-btn .label { white-space: nowrap; }

.nav-toggle {
  display: none; width: 40px; height: 38px; cursor: pointer;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--slate-800); margin: 0 auto; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 16px; height: 1.5px; background: var(--slate-800); position: relative;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 3.5px; }

/* ------------------------------------------------------------- ad containers
   Structural slots: 728x90 leaderboard, mid-page banner, 300x600 sidebar,
   responsive download unit. Reserved space, so no layout shift. */
.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; text-align: center;
  background: var(--slate-50);
  border: 1px solid var(--line);
  color: var(--slate-400);
  overflow: hidden;
}
.ad-slot .ad-label { color: var(--slate-400); }
.ad-slot .ad-size { font-family: var(--font-mono); font-size: 0.68rem; color: var(--slate-400); }
.ad-slot .ad-size-tight { display: none; }
#ad-container-leaderboard { width: 728px; max-width: 100%; min-height: 90px; margin: 20px auto; }
#ad-container-midpage { width: 970px; max-width: 100%; min-height: 250px; margin: 34px auto; }
#ad-container-download { width: 100%; min-height: 90px; margin: 20px 0 0; }
#ad-container-sidebar { width: 300px; max-width: 100%; min-height: 600px; }
.workspace-side .ad-slot { width: 300px; }

/* --------------------------------------------------------------------- hero */
.hero { background: #fff; border-bottom: 1px solid var(--line); padding: clamp(52px, 6vw, 92px) 0 clamp(46px, 5.5vw, 80px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(34px, 5vw, 76px); align-items: center;
}
.hero-stage { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--crimson); border: 1px solid var(--crimson-line); background: var(--crimson-wash);
  padding: 5px 10px; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--crimson); }
.hero h1 { max-width: 21ch; }
.hero-lead { font-size: 1.08rem; line-height: 1.62; max-width: 46ch; color: var(--slate-600); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; }
.hero-note { font-size: 0.84rem; color: var(--slate-500); margin: 18px 0 0; max-width: 44ch; }
.spec-rows { margin: 0; border-top: 1px solid var(--line); }
.spec-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.spec-k { font-size: 0.86rem; font-weight: 600; color: var(--slate-800); }
.spec-v { font-family: var(--font-mono); font-size: 0.76rem; color: var(--slate-500); text-align: right; }

/* Figures stay column aligned without a monospace face. */
.spec-v, .stat-v, .engine-row span, .file-size, .result-item .size, .progress-label,
.file-row .file-state { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ home dropzone */
.drop-card { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow-soft); }
.drop-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--slate-50);
}
.drop-head-kicker { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate-500); }
.drop-head-state {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ok);
}
.drop-head-state::before { content: ""; width: 6px; height: 6px; background: var(--ok); }
.drop-zone {
  position: relative; margin: 20px; padding: clamp(28px, 3.4vw, 44px) 22px;
  text-align: center; cursor: pointer;
  border: 1px dashed var(--line-strong); background: var(--slate-50);
  transition: border-color 0.12s linear, background 0.12s linear;
}
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-over {
  border-color: var(--crimson); border-style: solid; background: var(--crimson-wash); outline: none;
}
.drop-zone .drop-ico { color: var(--crimson); margin-bottom: 14px; }
.drop-title { font-size: 1.08rem; font-weight: 600; color: var(--slate-900); margin: 0 0 7px; letter-spacing: -0.008em; }
.drop-sub { font-size: 0.86rem; color: var(--slate-500); margin: 0 auto 20px; max-width: 34ch; }
.drop-cta { pointer-events: none; }
.drop-input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.drop-detect { padding: 20px; }
.drop-file {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); background: var(--slate-50);
}
.drop-file-meta { min-width: 0; }
.drop-prompt {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--slate-500); margin: 20px 0 10px;
}
.drop-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.drop-group { display: contents; }
.drop-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 13px; background: #fff; color: var(--slate-800);
  font-size: 0.87rem; font-weight: 600; transition: background 0.12s linear, color 0.12s linear;
}
.drop-option:hover { background: var(--crimson-wash); color: var(--crimson); text-decoration: none; }
.drop-option-out { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-400); }
.drop-option:hover .drop-option-out { color: var(--crimson); }
.drop-error { margin: 14px 0 0; font-size: 0.84rem; color: var(--err); line-height: 1.5; }
.drop-reset { margin-top: 16px; padding-left: 0; font-size: 0.82rem; }

/* trust badges under the workspace */
.trust-badges {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.trust-badge { background: #fff; padding: 15px 15px 16px; }
.trust-mark {
  display: block; width: 18px; height: 18px; margin-bottom: 10px; position: relative;
  border: 1px solid var(--ok-line); background: var(--ok-wash);
}
.trust-mark::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
  border-right: 1.5px solid var(--ok); border-bottom: 1.5px solid var(--ok);
  transform: rotate(40deg);
}
.trust-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--slate-900); letter-spacing: -0.005em; }
.trust-sub { display: block; font-size: 0.72rem; color: var(--slate-500); margin-top: 3px; line-height: 1.4; }

/* ------------------------------------------------------- architecture detail */
.arch { border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-soft); }
.arch-item { border-bottom: 1px solid var(--line); }
.arch-item:last-child { border-bottom: 0; }
.arch-item summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px;
  padding: 19px 22px; cursor: pointer; list-style: none;
  transition: background 0.12s linear;
}
.arch-item summary::-webkit-details-marker { display: none; }
.arch-item summary:hover { background: var(--slate-50); }
.arch-index { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; color: var(--slate-400); font-variant-numeric: tabular-nums; }
.arch-main { min-width: 0; }
.arch-title { display: block; font-size: 1rem; font-weight: 600; color: var(--slate-900); letter-spacing: -0.012em; }
.arch-hint { display: block; font-size: 0.82rem; color: var(--slate-500); margin-top: 3px; }
.arch-toggle { position: relative; width: 26px; height: 26px; border: 1px solid var(--line-strong); flex: none; }
.arch-toggle::before, .arch-toggle::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--slate-700); transition: opacity 0.12s linear, background 0.12s linear;
}
.arch-toggle::before { width: 11px; height: 1.5px; }
.arch-toggle::after { width: 1.5px; height: 11px; }
.arch-item[open] .arch-toggle { border-color: var(--crimson); }
.arch-item[open] .arch-toggle::before, .arch-item[open] .arch-toggle::after { background: var(--crimson); }
.arch-item[open] .arch-toggle::after { opacity: 0; }
.arch-body { padding: 2px 22px 24px; }
.arch-body p { font-size: 0.92rem; line-height: 1.65; max-width: 78ch; }
.arch-body .engine-table { border: 1px solid var(--line); }
.engine-table { display: flex; flex-direction: column; }
.engine-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 11px 16px; border-bottom: 1px solid var(--slate-100);
}
.engine-row:last-child { border-bottom: 0; }
.engine-row b { font-size: 0.85rem; font-weight: 600; }
.engine-row span { font-family: var(--font-mono); font-size: 0.74rem; color: var(--slate-500); }
.engine-row.accent { background: var(--crimson-wash); }
.engine-row.accent b, .engine-row.accent span { color: var(--crimson); }

.stat-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #fff; }
.stat { padding: 18px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-v { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600; color: var(--crimson); letter-spacing: -0.02em; }
.stat-k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate-500); margin-top: 4px; }
.stat-bar { box-shadow: var(--shadow-soft); }

/* ------------------------------------------------------------------ sections */
.section { padding: clamp(46px, 5.5vw, 80px) 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 30px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-kicker { display: block; color: var(--crimson); margin-bottom: 10px; }
.section-head p { font-size: 1rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  display: block; background: #fff; padding: 28px 26px; color: inherit;
  transition: background 0.12s linear;
}
.card:hover { background: var(--crimson-wash); text-decoration: none; }
.card .ico {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 26px; padding: 0 8px; margin-bottom: 14px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em;
  background: var(--slate-900); color: #fff;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.88rem; margin: 0; color: var(--slate-600); }
.card .go { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--crimson); }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.hub-card { background: #fff; border: 1px solid var(--line-strong); border-top: 3px solid var(--crimson); padding: 26px 24px; box-shadow: var(--shadow-soft); }
.hub-card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.hub-card li { padding: 7px 0; font-size: 0.88rem; border-bottom: 1px solid var(--slate-100); }
.hub-card li:last-child { border-bottom: 0; }
.hub-card .hub-meta { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-500); }

.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }

.format-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.format-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px;
  border: 1px solid var(--line-strong); background: #fff;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--slate-600);
}
.format-chip b { color: var(--crimson); }

/* ------------------------------------------------------------- tool page body */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.tool-main { min-width: 0; }
.tool-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 100px; }
.panel { background: #fff; border: 1px solid var(--line); padding: 20px; }
.panel h3 { color: var(--crimson); margin-bottom: 12px; }
.panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.panel li a { font-size: 0.87rem; color: var(--slate-700); }
.panel li a:hover { color: var(--crimson); }
.panel li a[aria-current] { color: var(--crimson); font-weight: 700; }

/* padding-block only: the shorthand zeroed the container gutter and left the
   breadcrumb hanging outside the content column. */
.crumb-bar { padding-block: 24px 16px; }
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  line-height: 1.2; color: var(--slate-400); margin: 0;
}
.breadcrumb .crumb { color: var(--slate-500); flex: none; }
.breadcrumb .crumb:hover { color: var(--crimson); text-decoration: none; }
.breadcrumb .crumb-sep { color: var(--slate-300); flex: none; }
.breadcrumb .crumb-current { color: var(--slate-700); min-width: 0; }

.tool-head { margin-bottom: 24px; }
.tool-head h1 { max-width: 30ch; }
.tool-head p { max-width: 70ch; }
.tool-tags {
  display: flex; flex-wrap: wrap; align-items: center;
  row-gap: 8px; column-gap: 8px; margin-top: 14px; max-width: 100%;
}
/* Pills shrink only to their own text, never past the container edge. */
.tool-tags .tag { flex: 0 1 auto; max-width: 100%; }
/* One pill component for every feature badge. Identical radius, padding,
   cap height and tracking, so the row reads as a set rather than ad hoc chips. */
.tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-sans); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase; line-height: 1;
  padding: 6px 11px; border-radius: 999px;
  background: var(--slate-100); color: var(--slate-600); border: 1px solid var(--line);
}
.tag.local { background: var(--ok-wash); color: var(--ok); border-color: var(--ok-line); }

/* ---------------------------------------------------------------- workspace */
.workspace { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow-soft); }
.workspace-body { display: grid; grid-template-columns: minmax(0, 1fr) 344px; }
.workspace-main { padding: 22px; min-width: 0; }
.workspace-side {
  border-left: 1px solid var(--line); background: var(--slate-50);
  padding: 22px; display: flex; flex-direction: column; gap: 18px;
}
.workspace-side .panel { background: #fff; }

.dropzone {
  position: relative; border: 1px dashed var(--line-strong); background: var(--slate-50);
  padding: clamp(28px, 4vw, 46px) 24px; text-align: center; cursor: pointer;
  transition: border-color 0.12s linear, background 0.12s linear;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--crimson); background: var(--crimson-wash); outline: none; }
.dropzone.dragover { border-color: var(--crimson); border-style: solid; background: var(--crimson-wash); }
.dropzone .dz-ico { color: var(--crimson); margin-bottom: 12px; }
.dropzone h3 { margin-bottom: 6px; }
.dropzone p { margin: 0; font-size: 0.88rem; }
.dropzone .formats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.workspace-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
[data-params] { display: flex; flex-direction: column; gap: 14px; }

.dropzone .formats span {
  font-family: var(--font-sans); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase; line-height: 1;
  border: 1px solid var(--line-strong); background: #fff;
  padding: 6px 11px; border-radius: 999px; color: var(--slate-500);
}

.file-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); padding: 11px 14px;
}
.file-row.processing { border-color: var(--crimson); }
.file-row.done { border-color: var(--ok-line); background: var(--ok-wash); }
.file-row.failed { border-color: var(--err-line); background: var(--err-wash); }
.file-badge {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 6px 8px; border: 1px solid var(--crimson-line); background: var(--crimson-wash); color: var(--crimson);
  min-width: 48px; text-align: center;
}
.file-meta { min-width: 0; }
.file-name { font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate-500); margin-top: 2px; }
.file-progress { margin-top: 8px; height: 2px; background: var(--slate-200); overflow: hidden; }
.file-progress span { display: block; height: 100%; width: 0; background: var(--crimson); transition: width 0.2s linear; }
.file-row.done .file-progress span { background: var(--ok); }
.file-state {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--slate-400); white-space: nowrap;
}
.file-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer;
  background: #fff; border: 1px solid var(--line-strong); color: var(--slate-500);
  font-size: 12px; line-height: 1; border-radius: var(--radius-sm);
}
.icon-btn:hover { border-color: var(--crimson); color: var(--crimson); }

.param-group { display: flex; flex-direction: column; gap: 8px; }
.param-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-500); font-weight: 600; }
.field, select.field {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; font-family: inherit; font-size: 0.88rem; color: var(--slate-800);
}
.field:focus { outline: none; border-color: var(--crimson); box-shadow: 0 0 0 2px rgba(128, 0, 0, 0.12); }
.hint { font-size: 0.78rem; color: var(--slate-500); line-height: 1.45; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 0.86rem; color: var(--slate-700); }
.check input { margin-top: 3px; accent-color: var(--crimson); }

.privacy-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--ok-wash); border: 1px solid var(--ok-line); color: #0b5533;
  padding: 12px 13px; font-size: 0.82rem; line-height: 1.5;
}
.privacy-note b { color: #0b5533; }
.privacy-note .mark { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* progress + results */
.progress-wrap { margin-top: 18px; }
.progress-track { height: 4px; background: var(--slate-200); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--crimson); transition: width 0.2s linear; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate-500); }

.result-card { margin-top: 20px; border: 1px solid var(--ok-line); border-left: 3px solid var(--ok); background: var(--ok-wash); padding: 16px; }
.result-head { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ok); font-weight: 700; }
.result-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.result-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--ok-line); padding: 10px 12px; }
.result-item .name { font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-item .size { font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate-500); }
.btn-download { background: var(--crimson); border-color: var(--crimson); color: #fff; padding: 8px 14px; font-size: 0.82rem; }
.btn-download:hover { background: var(--crimson-deep); border-color: var(--crimson-deep); color: #fff; }

.error-card { margin-top: 16px; border: 1px solid var(--err-line); border-left: 3px solid var(--err); background: var(--err-wash); color: #7c1a1f; padding: 14px 16px; font-size: 0.88rem; }
.error-card b { display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* --------------------------------------------------------------------- FAQ */
.faq { display: flex; flex-direction: column; border: 1px solid var(--line); background: #fff; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; list-style: none; position: relative; padding: 15px 44px 15px 18px;
  font-weight: 600; font-size: 0.94rem; color: var(--slate-800);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); color: var(--crimson); font-size: 1rem;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 18px 16px; font-size: 0.9rem; }

.related { display: flex; flex-wrap: wrap; gap: 8px; }
.related a {
  font-size: 0.84rem; font-weight: 600; padding: 7px 13px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--slate-700);
}
.related a:hover { border-color: var(--crimson); color: var(--crimson); text-decoration: none; }

/* -------------------------------------------------------------- legal pages */
.legal-doc { max-width: 74ch; }
.legal-doc h2 { margin-top: 34px; font-size: 1.2rem; }
.legal-doc h3 { margin-top: 22px; }
.legal-doc ul { padding-left: 20px; color: var(--slate-600); }
.legal-doc li { margin-bottom: 7px; }
.legal-meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-500); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 26px; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--slate-900); color: var(--slate-400); margin-top: 64px; padding: 52px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-col h4 { color: #fff; margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--slate-400); font-size: 0.86rem; }
.footer-col a:hover { color: #fff; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: var(--slate-500); }
.footer-brand .brand-mark { filter: brightness(0) invert(1); }
.footer-brand p { color: var(--slate-400); font-size: 0.86rem; max-width: 40ch; margin: 16px 0 0; }
.entity-statement {
  margin-top: 36px; padding: 18px 20px; border: 1px solid var(--slate-700);
  font-size: 0.84rem; line-height: 1.6; color: var(--slate-400);
}
.entity-statement strong { color: #fff; }
.footer-legal {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--slate-700);
  display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--slate-500);
}
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal a { color: var(--slate-400); }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-aside { position: static; }
  .workspace-body { grid-template-columns: 1fr; }
  .workspace-side { border-left: 0; border-top: 1px solid var(--line); min-width: 0; }
  #ad-container-sidebar { min-height: 250px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .stat-bar { grid-template-columns: 1fr 1fr; }
  .stat { border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-stage { order: -1; }
  .nav-toggle { display: block; }
  /* padding-block, not the shorthand: the shorthand zeroed the container
     gutter and left the brand flush against the screen edge. */
  .header-inner { flex-wrap: wrap; min-height: 66px; padding-block: 10px; gap: 14px; }
  .google-btn { padding: 9px 11px; }
  .main-nav {
    order: 4; width: 100%; flex-direction: column; align-items: stretch;
    display: none; margin: 4px 0 10px;
    border: 1px solid var(--line-strong); background: #fff; box-shadow: var(--shadow-2);
    max-height: calc(100vh - 150px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .main-nav.open { display: flex; }
  .nav-account {
    display: flex; flex-direction: column; gap: 12px;
    padding: 22px 18px 24px; border-top: 0; background: var(--slate-50);
  }
  .nav-account-btn { padding: 13px 16px; font-size: 0.9rem; }
  .nav-account-label { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate-500); }
  .nav-account-btn { justify-content: center; width: 100%; background: #fff; }
  .nav-account-note { margin: 0; font-size: 0.72rem; line-height: 1.45; color: var(--slate-500); }
  .drop-only { display: none; }
  .tap-only { display: revert; }
  .dropzone { padding: 30px 18px; }
  .dropzone .formats { margin-top: 12px; }
  .drop-zone { margin: 14px; padding: 30px 16px; }
  .nav-link {
    width: 100%; height: auto; min-height: 48px; padding: 0 18px;
    justify-content: space-between; border-bottom: 0;
    font-size: 0.95rem; font-weight: 600;
  }
  .mega { position: static; width: 100%; box-shadow: none; border: 0; background: var(--slate-50); }
  /* Rows separate by rhythm, not by hairlines, inside the drawer. */
  .mega .mega-link { border-bottom: 0; padding: 9px 0; }
  .mega-foot { background: transparent; }
  .mega-body { grid-template-columns: 1fr; }
  .mega-col + .mega-col { border-left: 0; }
  .header-actions { margin-left: auto; }
  .google-btn .label { display: none; }
}

/* Tablet drawer: a full width drawer leaves category rows around 700px wide
   once the header has room, and in flow it can ride up onto the header row.
   Capping it, taking it out of flow and anchoring it to the content edge turns
   it into a popover under the header action cluster. */
@media (min-width: 621px) and (max-width: 900px) {
  .header-inner { position: relative; }
  .main-nav {
    position: absolute;
    top: calc(100% - 1px);
    right: 24px;
    width: min(420px, calc(100% - 48px));
    margin: 0;
    max-height: calc(100vh - 110px);
  }
}

/* The workspace side panel needs a usable main column beside it, so it stacks
   well before the two column tool layout collapses at 1040px. */
@media (max-width: 1180px) {
  .workspace-body { grid-template-columns: 1fr; }
  .workspace-side { border-left: 0; border-top: 1px solid var(--line); min-width: 0; }
  #ad-container-sidebar { min-height: 250px; }
}

/* Banner units swap to the narrow creative before the layout has to shrink.
   The fractional ceiling avoids a miss when the layout viewport is 767.4px. */
@media (max-width: 767.98px) {
  .ad-slot .ad-size-wide { display: none; }
  .ad-slot .ad-size-tight { display: inline; }
  #ad-container-leaderboard { width: 300px; max-width: 100%; min-height: 250px; margin: 14px auto 20px; }
  #ad-container-midpage { width: 100%; min-height: 250px; margin: 26px auto; }
}

@media (max-width: 620px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .drop-options { grid-template-columns: 1fr; }
  .trust-badges { grid-template-columns: 1fr; }
  .arch-item summary { gap: 14px; padding: 16px 16px; }
  .arch-body { padding: 0 16px 20px; }
  .stat-bar { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .card-grid, .tool-cards, .hub-grid, .drop-options, .trust-badges, .stat-bar { grid-template-columns: 1fr; }
  /* The 300px sidebar unit shrinks to the column so nothing overflows. */
  #ad-container-sidebar, .workspace-side .ad-slot { width: 100%; }
  .file-row, .result-item { grid-template-columns: auto minmax(0, 1fr); row-gap: 10px; }
  .file-row .file-state, .file-row .file-actions,
  .result-item .size, .result-item .btn-download { grid-column: 1 / -1; }
  .file-row .file-actions { justify-content: flex-end; }
  .result-item .btn-download { width: 100%; }
  .file-state { display: block; }
  .arch-item summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.3rem); }

  /* Tool pages: compress the head so the dropzone clears the fold. */
  .tool-head { margin-bottom: 16px; }
  .tool-head h1 { font-size: clamp(1.32rem, 6.4vw, 1.8rem); line-height: 1.16; letter-spacing: -0.015em; }
  .tool-head p {
    font-size: 0.94rem; line-height: 1.55; margin-bottom: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .tool-tags { margin-top: 12px; gap: 7px; }
  .tag { font-size: 0.62rem; padding: 5px 9px; }
  .crumb-bar { padding-block: 18px 14px; }
  .breadcrumb { flex-wrap: nowrap; font-size: 0.62rem; letter-spacing: 0.08em; gap: 6px; }
  .breadcrumb .crumb-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Narrow phones: the standard header wraps between roughly 361px and 372px,
   so the brand block tightens a step before the ultra-narrow pass below. */
@media (max-width: 400px) {
  .header-inner { gap: 10px; min-height: 62px; padding-block: 9px; }
  .brand { gap: 10px; }
  .brand-mark { height: 37px; }
  .brand-name { font-size: 1rem; letter-spacing: 0.11em; }
  .brand-sub { font-size: 0.58rem; letter-spacing: 0.13em; }
  .header-actions { gap: 8px; }
  .google-btn { padding: 8px 10px; }
  .nav-toggle { width: 38px; height: 36px; }
}

/* Ultra-narrow phones: the brand block keeps one row and the controls keep a
   full 48px tap target. */
@media (max-width: 360px) {
  .header-inner { gap: 8px; min-height: 60px; padding-block: 8px; }
  .brand { gap: 9px; }
  .brand-mark { height: 34px; }
  .brand-name { font-size: 0.92rem; letter-spacing: 0.1em; }
  .brand-sub { font-size: 0.56rem; letter-spacing: 0.12em; margin-top: 3px; }
  .header-actions { gap: 8px; }
  .google-btn { padding: 8px 10px; }
  .nav-toggle { width: 40px; height: 38px; }
}

/* Pointer-free devices get the tap wording regardless of width. */
@media (hover: none) {
  .drop-only { display: none; }
  .tap-only { display: revert; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
