/* SvgCrush — Geometric B/W vector editorial (not a sister recolor) */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #5a5a5a;
  --line: #0a0a0a;
  --rule: 2px;
  --panel: #f7f7f7;
  --checker-a: #ececec;
  --checker-b: #ffffff;
  --accent: #00e5ff;
  --accent-ink: #0a0a0a;
  --danger: #e10600;
  --radius: 0px;
  --radius-sm: 2px;
  --page-max: 72rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Arial Black", "Helvetica Neue Condensed Bold", "Arial Narrow", Impact, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --focus: #00e5ff;
  --preview-min: 280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
html[lang^="zh"] body { line-height: 1.65; }
a { color: var(--ink); }
a:hover { color: var(--ink); background: var(--accent); }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--accent);
  padding: 0.5rem 1rem; border: var(--rule) solid var(--ink);
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.85rem 1.1rem 2.5rem;
  padding-left: max(1.1rem, env(safe-area-inset-left));
  padding-right: max(1.1rem, env(safe-area-inset-right));
}

/* Mast — geometric black rule bar */
.mast {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.65rem 1rem; margin-bottom: 1.25rem;
  padding: 0.55rem 0;
  border-bottom: var(--rule) solid var(--ink);
  position: relative;
}
.brand a {
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
}
.brand a:hover { background: transparent; }
.brand-mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
}
.brand-name {
  font-family: var(--display);
  font-weight: 900; font-size: 1.15rem;
  letter-spacing: -0.03em; text-transform: uppercase;
  white-space: nowrap; line-height: 1.1;
}
.brand small {
  display: block; font-family: var(--mono);
  font-size: var(--text-xs); color: var(--muted); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}

.top-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem;
  justify-content: flex-end; position: relative;
}
.lang-switch {
  display: inline-flex; gap: 0;
  border: var(--rule) solid var(--ink);
}
.lang-btn[aria-pressed="true"] {
  background: var(--ink); color: var(--accent);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; min-height: 44px; padding: 0.45rem 0.9rem;
  font-family: var(--sans); font-size: var(--text-sm); font-weight: 700;
  border: var(--rule) solid var(--ink); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); cursor: pointer;
  text-decoration: none; white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:hover { background: var(--panel); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: var(--accent); }
.btn-primary:hover { background: #222; color: var(--accent); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(0.95); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--panel); }
.btn-sm { min-height: 36px; padding: 0.3rem 0.65rem; font-size: var(--text-xs); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Header XOR — hard */
.nav-toggle,
.btn.nav-toggle { display: none; }
.nav-guides {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.65rem; align-items: center;
}
.nav-guides a {
  font-size: var(--text-sm); font-weight: 600;
  text-decoration: none; color: var(--muted);
  padding: 0.25rem 0.4rem;
  text-transform: none; letter-spacing: 0;
  font-family: var(--sans);
  white-space: nowrap;
}
.nav-guides a:hover { color: var(--ink); background: var(--accent); text-decoration: none; }
@media (min-width: 1100px) {
  .nav-toggle,
  .btn.nav-toggle { display: none !important; }
  .nav-guides { display: flex !important; position: static; }
  .top-converter-full { display: inline; }
  .top-converter-short { display: none; }
}
@media (max-width: 1099px) {
  .nav-toggle,
  .btn.nav-toggle { display: inline-flex !important; }
  .nav-guides {
    display: none; position: absolute; right: 0.5rem; top: 100%;
    z-index: 40; flex-direction: column; align-items: stretch;
    background: var(--bg); border: var(--rule) solid var(--ink);
    padding: 0.5rem; min-width: 12rem;
  }
  .nav-guides.is-open { display: flex; }
  .nav-guides a { white-space: normal; }
  .top-converter-full { display: none; }
  .top-converter-short { display: inline; }
}

/* Hero — quieter H1, fuller width (not left-cluster shout) */
.hero {
  margin: 0 0 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--ink);
}
.kicker {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.35rem;
}
.hero h1,
h1 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.2; text-transform: none;
  margin: 0 0 0.5rem; max-width: none;
}
.lead {
  margin: 0; max-width: 62rem;
  color: var(--ink); font-size: var(--text-base);
  line-height: 1.65;
}
.hero .lead { margin: 0; }

/* Trust strip — one coherent full-width row */
.trust-line {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  align-items: center; justify-content: space-between;
  width: 100%;
  border: var(--rule) solid var(--ink);
  padding: 0.4rem 0.75rem;
  margin: 0 0 0.65rem;
  background: var(--bg);
}
.chip {
  display: inline-flex; align-items: center;
  border: var(--rule) solid var(--ink);
  background: var(--accent); color: var(--ink);
  font-family: var(--mono); font-size: var(--text-xs);
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.3rem 0.5rem;
}
.session-chip {
  font-family: var(--mono); font-size: var(--text-xs);
  color: var(--muted); letter-spacing: 0.03em;
  margin-left: auto;
}
.honest-note {
  border: var(--rule) solid var(--ink);
  border-left-width: 4px;
  padding: 0.35rem 0.65rem;
  margin: 0 0 0.85rem;
  background: var(--panel);
  font-size: var(--text-sm);
  max-width: none;
  line-height: 1.5;
}

/* Dropzone — proper SaaS upload control (HeicLocal-class height) */
.drop-strip {
  border: 2px dashed var(--ink);
  background: var(--panel);
  padding: 1.75rem 1.5rem;
  min-height: 160px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.85rem;
  text-align: center;
  margin-bottom: 1.1rem;
  cursor: pointer;
  box-sizing: border-box;
}
.drop-strip.is-drag {
  border-style: solid;
  background: var(--accent);
}
.drop-badge {
  flex: 0 0 auto;
  width: 72px; height: 72px;
  border: var(--rule) solid var(--ink);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 900; font-size: 1rem;
  letter-spacing: -0.02em;
}
.drop-body {
  flex: 0 1 auto; min-width: 0; width: 100%;
  display: flex; flex-direction: column; gap: 0.35rem;
  align-items: center;
}
.drop-title { font-weight: 800; font-size: 1.15rem; margin: 0; }
.drop-hint { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.drop-hint kbd {
  font-family: var(--mono); border: 1px solid var(--ink);
  padding: 0.05rem 0.3rem; background: var(--bg); font-size: var(--text-xs);
}
.drop-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center; margin-top: 0.5rem;
}
.drop-ghost {
  background: none; border: none; color: var(--muted);
  text-decoration: underline; cursor: pointer; font-size: var(--text-sm);
  min-height: 44px; padding: 0.25rem 0.5rem;
}
.drop-ghost:hover { color: var(--ink); background: var(--accent); }
@media (max-width: 560px) {
  .drop-strip {
    min-height: 148px;
    padding: 1.35rem 1rem;
  }
  .drop-badge { width: 64px; height: 64px; font-size: 0.9rem; }
  .session-chip { margin-left: 0; }
}

/* Split canvas workbench */
.bench {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  border: var(--rule) solid var(--ink);
  margin-bottom: 1.1rem;
  align-items: stretch;
}
.preview-pane {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--bg);
}
.preview-pane + .preview-pane { border-left: var(--rule) solid var(--ink); }
.preview-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.5rem; padding: 0.45rem 0.65rem;
  border-bottom: var(--rule) solid var(--ink);
  background: var(--ink); color: var(--accent);
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
}
.preview-head .bytes { color: #fff; font-weight: 600; }
.preview-stage {
  flex: 1 1 auto;
  min-height: var(--preview-min);
  background-color: var(--checker-b);
  background-image:
    linear-gradient(45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-a) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  position: relative;
}
.preview-stage .empty-label {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); pointer-events: none;
}
.preview-stage img,
.preview-stage svg,
.preview-stage .svg-host {
  max-width: 100%; max-height: 320px;
  display: block;
}
.preview-stage .svg-host { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.preview-stage .svg-host svg { max-width: 100%; max-height: 320px; width: auto; height: auto; }

.delta-rail {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.35rem; padding: 0.75rem 0.85rem;
  background: var(--accent); border-left: var(--rule) solid var(--ink);
  border-right: var(--rule) solid var(--ink);
  min-width: 5.5rem;
}
.delta-rail .pct {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 900; letter-spacing: -0.05em;
  line-height: 0.95; color: var(--ink);
}
.delta-rail .pct-label {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
}
.delta-rail .delta-bytes {
  font-family: var(--mono); font-size: var(--text-xs); color: var(--muted);
  text-align: center;
}

@media (max-width: 800px) {
  .bench { grid-template-columns: 1fr; }
  .preview-pane + .preview-pane { border-left: none; border-top: var(--rule) solid var(--ink); }
  .delta-rail {
    flex-direction: row; justify-content: space-between;
    border-left: none; border-right: none;
    border-top: var(--rule) solid var(--ink);
    border-bottom: var(--rule) solid var(--ink);
    min-width: 0; order: 0;
  }
  .bench .preview-pane:first-child { order: -1; }
  .bench .delta-rail { order: 0; }
  .bench .preview-pane:last-child { order: 1; }
}

/* Plugin tiles + controls */
.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0;
  border: var(--rule) solid var(--ink);
  margin-bottom: 1.1rem;
}
.controls-col { padding: 0.85rem; min-width: 0; }
.controls-col + .controls-col { border-left: var(--rule) solid var(--ink); }
.controls-col h2 {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin: 0 0 0.65rem; font-weight: 700;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.4rem;
}
.tile {
  display: flex; align-items: flex-start; gap: 0.4rem;
  border: var(--rule) solid var(--ink);
  padding: 0.45rem 0.5rem;
  background: var(--bg); cursor: pointer;
  min-height: 44px; font-size: var(--text-xs); font-weight: 600;
  user-select: none;
}
.tile:hover { background: var(--panel); }
.tile.is-on { background: var(--accent); }
.tile input { margin-top: 0.15rem; accent-color: var(--ink); flex-shrink: 0; }
.tile span { line-height: 1.35; }

.field {
  display: flex; flex-direction: column; gap: 0.25rem;
  margin-bottom: 0.65rem; flex: 0 0 auto;
}
.field label {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
}
.field input[type="number"],
.field select {
  min-height: 44px; padding: 0.35rem 0.55rem;
  border: var(--rule) solid var(--ink); border-radius: var(--radius);
  font-family: var(--mono); font-size: var(--text-sm); background: var(--bg);
}
.field-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: flex-end;
}
.field-row .field { margin-bottom: 0; }
.action-row {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem;
}
.check-row {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: var(--text-sm); margin: 0.5rem 0; min-height: 36px;
}

@media (max-width: 800px) {
  .controls { grid-template-columns: 1fr; }
  .controls-col + .controls-col { border-left: none; border-top: var(--rule) solid var(--ink); }
}

/* File list */
.file-list {
  border: var(--rule) solid var(--ink);
  margin-bottom: 1.1rem;
}
.file-list-head {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.5rem; padding: 0.45rem 0.65rem;
  background: var(--ink); color: var(--accent);
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.file-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.5rem; align-items: center;
  padding: 0.55rem 0.65rem;
  border-top: 1px solid var(--ink);
  font-size: var(--text-sm);
}
.file-row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .mono { font-family: var(--mono); font-size: var(--text-xs); }
.file-row .saved { font-family: var(--mono); font-weight: 700; }
.file-row.is-active { background: var(--accent); }
.file-list.hidden { display: none; }

.progress-bar {
  height: 4px; background: var(--panel); border: var(--rule) solid var(--ink);
  margin-bottom: 1rem; overflow: hidden;
}
.progress-bar > span {
  display: block; height: 100%; background: var(--accent); width: 0%;
  transition: width 0.15s linear;
}
.progress-bar.hidden { display: none; }

.proof {
  border: var(--rule) solid var(--ink); padding: 0.75rem 1rem;
  margin-bottom: 1.5rem; background: var(--panel);
}
.proof summary {
  cursor: pointer; font-weight: 800; font-family: var(--mono);
  font-size: var(--text-sm); letter-spacing: 0.04em; text-transform: uppercase;
}
.proof ol { margin: 0.65rem 0 0; padding-left: 1.25rem; }
.proof p { margin: 0.5rem 0 0; font-size: var(--text-sm); color: var(--muted); }

.seo-block { margin: 1.5rem 0; }
.seo-copy p, .seo-copy li, .faq p { font-size: var(--text-base); }
.seo-block h2 {
  font-family: var(--display); font-size: 1.2rem;
  letter-spacing: -0.02em; text-transform: none; margin: 0 0 0.65rem;
  font-weight: 800;
}
.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem; margin: 1rem 0;
}
.guide-card {
  border: var(--rule) solid var(--ink); padding: 0.75rem;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 0.25rem;
  min-height: 72px;
}
.guide-card:hover { background: var(--accent); text-decoration: none; }
.guide-card strong {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.guide-card span { font-size: var(--text-sm); color: var(--muted); }
.faq details {
  border-bottom: 1px solid var(--ink); padding: 0.55rem 0;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 0.35rem 0 0.5rem; }

/* Footer 3-col hard */
.site-footer {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: var(--rule) solid var(--ink);
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: none; background: var(--accent); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}
.footer-col { min-width: 0; }
.footer-col h4 {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 0.55rem; color: var(--muted); font-weight: 700;
}
.footer-col ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.35rem;
}
.footer-col li a { display: inline-flex; min-height: 36px; align-items: center; padding: 0 0.15rem; }
.footer-copy { margin: 0 0 0.4rem; font-size: var(--text-sm); color: var(--muted); }
.footer-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  margin-top: 1.1rem; padding-top: 0.75rem; border-top: 1px solid var(--ink);
  font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.02em;
  font-family: var(--mono);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.legal-page { max-width: 42rem; }
.legal-page h1 {
  margin-top: 0.5rem; font-size: clamp(1.5rem, 3vw, 2rem);
  max-width: none;
}
.legal-page h2 { font-size: 1.15rem; margin: 1.35rem 0 0.45rem; text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.article-page { max-width: 42rem; }
.article-page h1 { max-width: none; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.hidden { display: none !important; }

/* UX-OPT-2026-10-20 */
.limit-note {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--muted, #64748b);
  max-width: 36rem;
}
.limit-note strong { color: var(--ink, #0f172a); font-weight: 600; }
.ux-banner {
  display: none;
  margin: 0.75rem 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
  border: 1px solid transparent;
}
.ux-banner.is-on { display: block; }
.ux-banner.is-ok {
  background: color-mix(in srgb, #10b981 12%, transparent);
  border-color: color-mix(in srgb, #10b981 35%, transparent);
  color: var(--ink, #065f46);
}
.ux-banner.is-err {
  background: color-mix(in srgb, #ef4444 10%, transparent);
  border-color: color-mix(in srgb, #ef4444 30%, transparent);
  color: var(--ink, #991b1b);
}
.ux-banner .ux-banner-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.45rem; }
.drop-sample-prominent,
.dropzone .drop-sample,
.drop-actions .drop-ghost,
.dropzone .sample-link,
.drop-strip .drop-ghost {
  font-weight: 600 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
@media (max-width: 480px) {
  body { padding-bottom: max(var(--sc-fb-pad, 72px), env(safe-area-inset-bottom)); }
  .batch-bar, #batchBar, .action-bar {
    padding-right: 4.25rem; /* leave room for feedback FAB */
  }
  .tool-stage, .paste-stage, .desk, .crt-bench, .studio, main {
    overflow-x: clip;
  }
}
