/* MockRows — Pastel spreadsheet (not a sister recolor) */
:root {
  --bg: #f4f0fb;
  --sheet: #ffffff;
  --ink: #2a2540;
  --muted: #6b6580;
  --line: #e2dcf0;
  --pastel-mint: #b8f0d8;
  --pastel-pink: #ffd0e0;
  --pastel-sky: #c8e4ff;
  --pastel-lemon: #fff0a8;
  --pastel-lilac: #e0d4ff;
  --accent: #6b5cff;
  --accent-ink: #ffffff;
  --warn: #c47a00;
  --warn-bg: #fff6e0;
  --radius: 10px;
  --page-max: 72rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --focus: #6b5cff;
}

*, *::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:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(200, 228, 255, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(255, 208, 224, 0.35), transparent 50%),
    var(--bg);
  min-height: 100vh;
}
html[lang^="zh"] body { line-height: 1.65; }
a { color: var(--accent); }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.5rem 1rem; border-radius: var(--radius);
}
.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));
}

/* Masthead */
.mast {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.65rem 1rem; margin-bottom: 1.1rem;
  padding: 0.55rem 0.75rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 1px 0 rgba(42, 37, 64, 0.04);
  position: relative;
}
.brand a {
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
}
.brand-mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 8px;
}
.brand-name { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand small { display: block; font-size: var(--text-xs); color: var(--muted); font-weight: 500; }

.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.15rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.lang-btn[aria-pressed="true"] {
  background: var(--accent); color: var(--accent-ink); border-radius: calc(var(--radius) - 2px);
}

.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: 600;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--sheet); color: var(--ink); cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn-primary:hover { background: #5a4ae8; color: var(--accent-ink); }
.btn-secondary { background: var(--pastel-lilac); border-color: #d0c4f0; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { border-color: var(--line); background: var(--bg); }
.btn-sm { min-height: 36px; padding: 0.3rem 0.65rem; font-size: var(--text-xs); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-icon {
  width: 36px; min-height: 36px; padding: 0;
  border-radius: 8px; font-size: 1rem; line-height: 1;
}

/* 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.35rem;
}
.nav-guides a:hover { color: var(--accent); text-decoration: underline; }
@media (min-width: 900px) {
  .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: 899px) {
  .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(--sheet); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 0.5rem; min-width: 12rem;
    box-shadow: 0 8px 24px rgba(42, 37, 64, 0.12);
  }
  .nav-guides.is-open { display: flex; }
  .nav-guides a { padding: 0.45rem 0.5rem; min-height: 44px; display: flex; align-items: center; }
  .top-converter-full { display: none; }
  .top-converter-short { display: inline; }
}
.top-converter-short { display: none; }

.kicker {
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.35rem;
}
h1 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.2; margin: 0 0 0.5rem; font-weight: 800;
  letter-spacing: -0.02em;
}
.lead { margin: 0 0 0.85rem; max-width: 44rem; color: var(--muted); }
.trust-line {
  display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center;
  margin: 0 0 1.15rem;
}
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: var(--pastel-mint); color: var(--ink);
  font-size: var(--text-sm); font-weight: 600;
  border: 1px solid #9ee0c4;
}
.session-chip {
  font-size: var(--text-xs); color: var(--muted);
  font-family: var(--mono); padding: 0.3rem 0.55rem;
  background: var(--sheet); border: 1px dashed var(--line); border-radius: 8px;
}

/* Spreadsheet workbench */
.sheet-bench {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch; /* equal height empty + filled */
  margin-bottom: 1.25rem;
}
.sheet-bench > .type-rail,
.sheet-bench > .sheet-panel {
  height: 100%;
  min-height: 22rem;
}
.type-rail {
  display: flex;
  flex-direction: column;
}
.sheet-panel {
  display: flex;
  flex-direction: column;
  min-height: 22rem;
}
.sheet-scroll { flex: 1 1 auto; }
@media (max-width: 820px) {
  .sheet-bench { grid-template-columns: 1fr; }
}

.type-rail {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 0.75rem;
  /* stretch with sheet-panel; no sticky so bottoms align */
}
.type-rail h2 {
  font-size: var(--text-sm); margin: 0 0 0.55rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.type-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.35rem;
}
.type-chip {
  display: flex; align-items: center; gap: 0.4rem;
  width: 100%; min-height: 40px; padding: 0.35rem 0.55rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; text-align: left;
}
.type-chip:hover { border-color: var(--accent); background: var(--pastel-lilac); }
.type-chip .dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%; flex-shrink: 0;
}

.sheet-panel {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(42, 37, 64, 0.03);
  /* height stretch from .sheet-bench */
}
.sheet-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 0.55rem 0.75rem;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(180deg, #faf8ff, var(--sheet));
  border-bottom: 1px solid var(--line);
}
.field {
  display: flex; flex-direction: column; gap: 0.25rem;
  flex: 0 0 auto;
}
.field label {
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}
.field input[type="number"],
.field input[type="text"],
.field select {
  min-height: 40px; padding: 0.35rem 0.55rem;
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--sans); font-size: var(--text-base);
  background: var(--sheet); color: var(--ink); width: 7.5rem;
}
.field input[type="text"] { width: 9rem; }
.field-grow { flex: 1 1 10rem; }
.field-grow input { width: 100%; max-width: 14rem; }
.field-phone select { width: 12.5rem; font-size: var(--text-sm); }
.field-check {
  justify-content: flex-end; padding-bottom: 0.35rem;
}
.field-check .check-label {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: var(--text-sm); font-weight: 600; text-transform: none;
  letter-spacing: 0; color: var(--ink); cursor: pointer;
  min-height: 40px;
}
.field-check input[type="checkbox"] {
  width: 1.1rem; height: 1.1rem; accent-color: var(--accent, #7ad9b0);
}
.phone-hint {
  margin: 0; padding: 0.35rem 0.85rem 0.55rem;
  font-size: var(--text-xs); color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #faf8ff;
}
.toolbar-actions {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-left: auto; align-items: center;
}
.warn-banner {
  display: none; margin: 0; padding: 0.55rem 0.85rem;
  background: var(--warn-bg); color: #6a4200;
  border-bottom: 1px solid #f0d89a; font-size: var(--text-sm);
}
.warn-banner.is-on { display: block; }

.sheet-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-height: min(58vh, 520px);
}
.sheet-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  min-width: 36rem;
}
.sheet-table th,
.sheet-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0.35rem 0.45rem;
  vertical-align: top;
  text-align: left;
}
.sheet-table th:last-child,
.sheet-table td:last-child { border-right: none; }
.sheet-table thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 0.45rem;
}
.col-head {
  display: flex; flex-direction: column; gap: 0.3rem;
  border-radius: var(--radius); padding: 0.4rem;
  min-width: 8.5rem;
}
.col-head[data-pastel="0"] { background: var(--pastel-mint); }
.col-head[data-pastel="1"] { background: var(--pastel-pink); }
.col-head[data-pastel="2"] { background: var(--pastel-sky); }
.col-head[data-pastel="3"] { background: var(--pastel-lemon); }
.col-head[data-pastel="4"] { background: var(--pastel-lilac); }
.col-head-row {
  display: flex; gap: 0.25rem; align-items: center;
}
.col-name {
  flex: 1; min-width: 0; min-height: 36px;
  border: 1px solid transparent; border-radius: 8px;
  background: rgba(255,255,255,0.65);
  padding: 0.3rem 0.45rem;
  font-family: var(--sans); font-size: var(--text-sm); font-weight: 700;
  color: var(--ink);
}
.col-name:focus {
  outline: 2px solid var(--focus); background: #fff;
}
.col-type {
  min-height: 36px; border-radius: 8px;
  border: 1px solid rgba(42,37,64,0.12);
  background: rgba(255,255,255,0.75);
  font-family: var(--sans); font-size: var(--text-xs); font-weight: 600;
  padding: 0.2rem 0.35rem; color: var(--ink); width: 100%;
}
.col-enum {
  width: 100%; min-height: 32px; margin-top: 0.15rem;
  border-radius: 8px; border: 1px dashed rgba(42,37,64,0.2);
  background: rgba(255,255,255,0.55);
  font-family: var(--mono); font-size: var(--text-xs);
  padding: 0.25rem 0.4rem;
}
.row-idx {
  width: 2.5rem; text-align: center !important;
  font-family: var(--mono); font-size: var(--text-xs); color: var(--muted);
  background: #faf8ff; position: sticky; left: 0; z-index: 1;
}
.sheet-table tbody td {
  font-family: var(--mono); font-size: var(--text-sm);
  line-height: 1.4; max-width: 14rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sheet-table tbody tr:nth-child(even) td { background: #faf8ff; }
.sheet-empty {
  padding: 2rem 1rem; text-align: center; color: var(--muted);
}
.sheet-foot {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--line);
  background: #faf8ff;
}
.sheet-stat {
  font-family: var(--mono); font-size: var(--text-xs); color: var(--muted);
}

.sample-row {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem;
}
.sample-row .btn { background: var(--pastel-sky); border-color: #a8d0f0; }

.proof {
  margin: 1.25rem 0; padding: 0.75rem 1rem;
  background: var(--sheet); border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.proof summary {
  cursor: pointer; font-weight: 700; min-height: 44px;
  display: flex; align-items: center;
}
.proof ol { margin: 0.5rem 0; padding-left: 1.25rem; }
.proof p { margin: 0.35rem 0 0; color: var(--muted); }

.seo-block { margin-top: 1.75rem; }
.seo-block h2 {
  font-size: 1.25rem; margin: 0 0 0.55rem; letter-spacing: -0.01em;
}
.seo-copy p, .seo-copy li { font-size: var(--text-base); }
.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.65rem; margin: 0.85rem 0 0;
}
.guide-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.75rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--sheet);
  text-decoration: none; color: var(--ink);
}
.guide-card:nth-child(5n+1) { background: var(--pastel-mint); }
.guide-card:nth-child(5n+2) { background: var(--pastel-pink); }
.guide-card:nth-child(5n+3) { background: var(--pastel-sky); }
.guide-card:nth-child(5n+4) { background: var(--pastel-lemon); }
.guide-card:nth-child(5n+5) { background: var(--pastel-lilac); }
.guide-card:hover { text-decoration: none; box-shadow: 0 4px 12px rgba(42,37,64,0.08); }
.guide-card strong { font-size: var(--text-sm); }
.guide-card span { font-size: var(--text-xs); color: var(--muted); }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--sheet); padding: 0.55rem 0.85rem; margin: 0.45rem 0;
}
.faq summary {
  cursor: pointer; font-weight: 700; min-height: 44px;
  display: flex; align-items: center;
}
.faq p { margin: 0.35rem 0 0.5rem; }

/* Footer 3-col hard */
.site-footer {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 2px solid var(--line);
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: 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-size: var(--text-sm); letter-spacing: 0.04em;
  text-transform: uppercase; margin: 0 0 0.55rem; color: var(--muted);
}
.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; }
.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(--line);
  font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.02em;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.legal-page { max-width: 42rem; }
.legal-page h1 { margin-top: 0.5rem; }
.legal-page h2 { font-size: 1.15rem; margin: 1.35rem 0 0.45rem; }
.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;
  }
}
