/* ==========================================================================
   Nutrition Facts Labels Generator — UI
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --ink: #16181d;
  --ink-soft: #4b5058;
  --muted: #7c828c;
  --line: #e4e6ea;
  --line-strong: #d3d7de;
  --bg: #f7f7f5;
  --card: #ffffff;
  --cream: #faf5ea;
  --cream-line: #ece2ce;
  --green: #15803d;
  --green-hover: #166534;
  --blue: #2563eb;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 30, .06);
  --shadow-md: 0 6px 20px -6px rgba(16, 20, 30, .16), 0 2px 6px rgba(16, 20, 30, .06);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------- topbar */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 12px 28px 11px;
}
.brand { display: flex; align-items: center; gap: 14px; max-width: 1560px; margin: 0 auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: #11161d; color: #fff; flex: none;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text .brand-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.brand-text p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------- shell */
.shell { max-width: 1560px; margin: 0 auto; padding: 18px 28px 44px; }

/* ------------------------------------------------------------- tabbar */
.tabbar {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.tab {
  flex: 1 1 0;
  min-width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #6d6656;
  font: inherit;
  font-size: 12.6px;
  font-weight: 600;
  letter-spacing: .1px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.tab svg { width: 19px; height: 19px; opacity: .85; }
.tab:hover { background: rgba(255, 255, 255, .55); color: #423d33; }
.tab[aria-selected="true"] {
  background: #fff;
  border-color: var(--cream-line);
  color: #1e1e1e;
  box-shadow: 0 1px 2px rgba(60, 50, 30, .10), 0 3px 10px -6px rgba(60, 50, 30, .35);
}
.tab[aria-selected="true"] svg { opacity: 1; }

/* ------------------------------------------------------------- workspace */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.92fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}


.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.form-panel { padding: 16px 18px 18px; font-size: var(--fs, 15px); }

/* ------------------------------------------------------------- steps */
.step-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.step-head.compact { margin: 0 0 12px; }
.step-no {
  flex: none; width: 25px; height: 25px; border-radius: 999px;
  display: grid; place-items: center;
  background: #11161d; color: #fff; font-size: .84em; font-weight: 700;
  margin-top: 2px;
}
.step-head h2 { margin: 0; font-size: 1.2em; font-weight: 700; letter-spacing: -.1px; }
.step-head p { margin: 2px 0 0; font-size: .9em; color: var(--muted); }

/* ------------------------------------------------------------- form grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 18px;
}
.form-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid[data-cols="3"] { grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.98fr) minmax(0, 0.98fr); }

.col-title {
  text-align: center;
  font-size: 1.14em;
  font-weight: 400;
  color: #23262b;
  margin: 0 0 3px;
}
.col-rule { border: 0; border-top: 1px solid var(--line); margin: 0 0 2px; }

.field-row { display: flex; align-items: stretch; height: 2.16em; margin-top: .62em; }
.field-row .lab {
  width: var(--labw, 100px);
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 6px 0 8px;
  background: #e9ecef;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  color: #45494f;
  font-size: .95em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field-row .lab.long { font-size: .8em; letter-spacing: -.15px; }
.field-row .lab.solo { border-radius: 6px; border-right: 1px solid var(--line-strong); }


.field-input {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0 6px 6px 0;
  background: #fff;
  color: var(--blue);
  font: inherit;
  font-size: .95em;
  padding: 0 5px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field-input::placeholder { color: #a8b1bd; }
.field-input:focus { border-color: #93b4f8; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); z-index: 1; }
.field-input.mid { border-radius: 0; }

.pct-cell { position: relative; flex: 0 0 calc(3.2em + 8px); min-width: 0; display: flex; }
.pct-cell.fill { flex: 1 1 0; }
.pct-cell > .field-input { flex: 1 1 0; min-width: 0; padding-right: 14px; text-align: right; }
.pct-sign {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .88em;
  line-height: 1;
  color: #808894;
  pointer-events: none;
  z-index: 3;
}
.field-input.last { border-radius: 0 6px 6px 0; border-left: 0; }
.field-input.solo { border-radius: 0 6px 6px 0; }

/* ------------------------------------------------------------- width card */
.width-card {
  margin-top: 10px;
  padding: 10px 10px 12px;
  background: #f2f4f6;
  border: 1px solid #dfe3e8;
  border-radius: 9px;
}
.width-card h3 { margin: 0; font-size: 1.14em; font-weight: 400; text-align: center; color: #23262b; }
.width-card hr { border: 0; border-top: 1px solid #e2e6ea; margin: 6px 0 0; }
.width-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 0 4px; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #d3d9e0;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #2563eb;
  border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #2563eb; border: 0; cursor: pointer;
}
.reset-btn {
  flex: none;
  border: 0;
  border-radius: 8px;
  padding: 6px 16px;
  font: inherit;
  font-size: 1em;
  font-weight: 600;
  color: #fff;
  background: #16a34a;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.reset-btn:hover:not(:disabled) { background: #15803d; }
.reset-btn:disabled { background: #9aa4b2; cursor: default; }

/* ------------------------------------------------------------- options */
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  margin-top: 20px;
}
.opts-title { text-align: center; font-size: 1.14em; font-weight: 400; margin: 0 0 4px; color: #23262b; }
.opts-rule { border: 0; border-top: 1px solid var(--line); margin: 0 0 14px; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .96em;
  color: #30343a;
  cursor: pointer;
  padding: 4px 0;
}
.check input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: #11161d; cursor: pointer; flex: none; }
.check small { display: block; color: var(--muted); font-size: .86em; }

.sub-block { margin-top: 14px; padding-left: 26px; display: none; }
.sub-block.open { display: block; }
.sub-title { font-size: 1.06em; font-weight: 700; margin: 16px 0 6px; color: #23262b; }
.sub-title:first-child { margin-top: 4px; }

textarea.field-input,
input.field-input.full {
  width: 100%;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  padding: 8px 10px;
  height: auto;
  min-height: 64px;
  resize: vertical;
  line-height: 1.4;
  font-size: .94em;
}
input.field-input.full { min-height: 0; height: 36px; border-radius: 7px; }
.field-label { font-size: .94em; color: #4c5158; margin: 10px 0 4px; display: block; }

/* ------------------------------------------------------------- download */
.download-card { margin-top: 18px; background: #fbfbfa; padding: 18px 22px 20px; }
.dl-inner { max-width: 820px; margin: 0 auto; }
.download-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #24282e;
  border-radius: 9px;
  padding: 10px 18px;
  font: inherit;
  font-size: 1.02em;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: #f4f5f6; border-color: #c3c8d0; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
.btn[disabled] { opacity: .6; cursor: progress; }
.download-note { margin: 10px 0 0; font-size: .88em; color: var(--muted); }

/* ------------------------------------------------------------- preview */
.preview-panel {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: calc(100vh - 36px);
  overflow: hidden;
}
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #2b2f36;
  background: #fcfcfb;
}
.preview-badge {
  font-weight: 500;
  color: var(--muted);
  font-size: 12.2px;
  background: #f1f2f3;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}
.preview-stage {
  flex: 1;
  display: flex;
  padding: 24px 20px;
  background: #fcfcfb;
  overflow: auto;
}
.label-wrap { margin: auto; width: 100%; max-width: 470px; }
.label-wrap svg { width: 100%; height: auto; display: block; }
.label-wrap.wide { max-width: none; min-width: 600px; }
.preview-foot {
  border-top: 1px solid var(--line);
  padding: 10px 18px;
  font-size: 12.4px;
  color: var(--muted);
  background: #fcfcfb;
}

/* ------------------------------------------------------------- label typography */
.f-regular { font-family: AppRegular, Arial, sans-serif; }
.f-black { font-family: AppBlack, "Arial Black", Arial, sans-serif; }
.f-italic { font-family: AppRegular, Arial, sans-serif; font-style: italic; }
.font-bold { font-weight: 700; }

.text-\[6pt\] { font-size: 6pt; }
.text-\[8pt\] { font-size: 8pt; }
.text-\[9pt\] { font-size: 9pt; }
.text-\[10pt\] { font-size: 10pt; }
.text-\[12pt\] { font-size: 12pt; }
.text-\[14pt\] { font-size: 14pt; }
.text-\[16pt\] { font-size: 16pt; }
.text-\[20pt\] { font-size: 20pt; }
.text-\[22pt\] { font-size: 22pt; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .preview-panel { position: static; }
  .form-grid { --cols: 2; }
  .form-grid[data-cols="2"] { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .topbar { padding: 14px 16px; }
  .shell { padding: 14px 14px 32px; }
  .form-panel { padding: 16px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .tab { min-width: 118px; font-size: 12px; }
  .brand-text .brand-title { font-size: 17px; }
  .brand-text p { display: none; }
}

/* ==========================================================================
   Print sheet (batch imposition)
   ========================================================================== */
.printview { margin-top: 10px; }
.print-top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 10px;
}
.print-title { font-size: 15px; color: #3c424a; }
.print-title b { color: #16181d; font-weight: 700; }
.print-badge {
  margin-left: auto; font-size: 12.4px; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px;
}

.print-grid {
  display: grid;
  grid-template-columns: 396px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.print-settings { padding: 18px 20px 20px; }
.print-settings h2 { margin: 0 0 2px; font-size: 17px; }
.print-settings .sub { margin: 0 0 14px; font-size: 12.6px; color: var(--muted); }

.pgrp { margin-bottom: 13px; }
.pgrp > label,
.pgrp > div > label { display: block; font-size: 13.4px; color: #5c626b; margin-bottom: 6px; }
.pgrp.p2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg { display: flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; height: 38px; }
.seg button {
  flex: 1; border: 0; background: #fff; font: inherit; font-size: 14.2px; color: #4b5058; cursor: pointer;
}
.seg button.on { background: #11161d; color: #fff; font-weight: 600; }

.ctrl {
  width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; font: inherit; font-size: 14.4px; color: #1f242b; padding: 0 11px;
  box-sizing: border-box;
}
select.ctrl { padding: 0 6px; }

.calc {
  background: #f6f7f8; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 14px 0;
}
.calc .big { font-size: 20.5px; font-weight: 700; letter-spacing: -.3px; }
.calc .big em { font-style: normal; color: var(--green); }
.calc .small { font-size: 12.9px; color: var(--muted); margin-top: 3px; }

.checks { display: grid; gap: 9px; margin-bottom: 15px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #2f343a; cursor: pointer; }
.chk input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: #11161d; flex: none; cursor: pointer; }
.chk small { display: block; color: var(--muted); font-size: 12.4px; line-height: 1.4; }

.acts { display: grid; gap: 9px; }
.btn-primary, .btn-ghost {
  height: 42px; border-radius: 9px; font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: #ff5333; border-color: #ff5333; color: #fff; }
.btn-primary:hover { background: #e8461f; border-color: #e8461f; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: #24282e; }
.btn-ghost:hover { background: #f4f5f6; }
.btn-primary[disabled], .btn-ghost[disabled] { opacity: .6; cursor: progress; }

/* ---------- stage ---------- */
.print-stage { display: flex; flex-direction: column; align-items: center; }
.stagebar { width: 100%; display: flex; align-items: center; justify-content: space-between; font-size: 12.8px; color: #5c626b; margin-bottom: 10px; }
.pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 12.2px; }

.sheetwrap { display: flex; justify-content: center; width: 100%; }
.sheet {
  position: relative; background: #fff; flex: none;
  box-shadow: 0 10px 30px -12px rgba(20, 25, 35, .35), 0 0 0 1px #d8dce1;
  border-radius: 2px;
}
.sheet .mg {
  position: absolute; border: 1px dashed #cfd6de; pointer-events: none;
}
.sheet .cell { position: absolute; }
.sheet .cell svg { width: 100%; height: 100%; display: block; }
.sheet.guides .cell::after {
  content: ''; position: absolute; inset: -1px; border: 1px dashed #c9d2dc;
}
.sheet .tick { position: absolute; background: #111; }
.sheet .tick.v { width: 1px; }
.sheet .tick.h { height: 1px; }
.sheet .ruler { position: absolute; }
.sheet .ruler .bar { position: relative; height: 4px; border-left: 1px solid #111; border-right: 1px solid #111; border-bottom: 1px solid #111; }
.sheet .ruler .bar::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #111; }
.sheet .ruler .cap { font-family: AppRegular, Arial, sans-serif; white-space: nowrap; color: #111; }

.pager { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #3c424a; }
.pager .nav {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: #fff; color: #5c626b; font: inherit; cursor: pointer;
}
.pager .nav[disabled] { opacity: .45; cursor: default; }

.hint {
  margin-top: 12px; width: 100%; box-sizing: border-box;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; font-size: 12.6px; color: #4b5058;
  display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline;
}
.hint .tag { background: #fdf3e0; color: #92500a; border-radius: 6px; padding: 2px 8px; font-size: 11.8px; }
.hint b { color: #b45309; font-weight: 600; }
.hint:empty { display: none; }

@media (max-width: 1180px) {
  .print-grid { grid-template-columns: minmax(0, 1fr); }
}
.paperbox {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  border: 1px solid var(--line); background: #f6f7f8; border-radius: 8px;
  padding: 9px 11px; font-size: 13.2px; color: #2f343a;
}
.paperbox b { font-weight: 700; }
.paperbox span { color: var(--muted); font-size: 12.4px; }

/* ---------- quick batch chips ---------- */
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chips button {
  height:30px; min-width:44px; padding:0 10px; border-radius:7px; cursor:pointer;
  border:1px solid var(--line-strong); background:#fff; color:#2f343a;
  font:inherit; font-size:13px; font-weight:600;
}
.chips button:hover { background:#f4f5f6; }
.chips button.on { background:#11161d; border-color:#11161d; color:#fff; }

/* ---------- Step 3 download block ---------- */
.dl-title { margin: 0 0 10px; font-size: 21px; font-weight: 700; text-align: center; letter-spacing: -.2px; }
.dl-tip { margin: 0 0 5px; font-size: 14.6px; color: #4b5058; line-height: 1.5; padding-left: 14px; text-indent: -14px; }
.dl-tip b { font-weight: 700; }
.download-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.dl-btn {
  height: 52px; border-radius: 5px; border: 1px solid #2b3138;
  background: #33393f; color: #fff; font: inherit; font-size: 17px; font-weight: 700;
  cursor: pointer; letter-spacing: .1px;
}
.dl-btn:hover { background: #3d444b; }
.dl-btn:active { background: #2b3138; }
.dl-btn[disabled] { opacity: .6; cursor: progress; }
.dl-batch {
  margin-top: 12px; width: 100%; height: 56px; border-radius: 8px;
  border: 1px solid #ff5333; background: #ff5333; color: #fff;
  font: inherit; font-size: 18.5px; font-weight: 700; letter-spacing: .1px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.dl-batch svg { width: 22px; height: 22px; }
.dl-batch:hover { background: #e8461f; border-color: #e8461f; }
.dl-batch:active { background: #d13c18; }
/* back button: solid dark so it is clearly visible */
.print-top .btn {
  height: 42px; padding: 0 18px 0 14px; gap: 7px;
  border-radius: 9px; border: 1px solid #2b3138;
  background: #33393f; color: #fff;
  font-size: 14.6px; font-weight: 700; letter-spacing: .1px;
  box-shadow: 0 2px 8px -2px rgba(20,25,35,.35);
  flex: none;
}
.print-top .btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.print-top .btn:hover { background: #3d444b; border-color: #3d444b; }
.print-top .btn:active { background: #2b3138; }

/* ---------- 预览上方的 sheet 概览条 ---------- */
.sheet-head {
  box-sizing: border-box;
  margin: 0 auto 10px; padding: 0 2px 8px;
  border-bottom: 1px solid var(--line);
}
.sh-title { font-size: 16px; font-weight: 700; color: #16181d; letter-spacing: -.1px; }
.sh-sub { margin-top: 2px; font-size: 12.2px; color: #6b7178; line-height: 1.35; }

/* ---------- 旋转 90° 的填充标签 ---------- */
.sheet .cell.rot { overflow: visible; }
.sheet .cell.rot .rot-inner {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}
.sheet .cell.rot .rot-inner svg { width: 100%; height: 100%; display: block; }

.pkgnote { margin: 10px 0 0; font-size: 12.2px; line-height: 1.45; color: #6b7178; }

/* ---------- 预览头：模板全称 ---------- */
.preview-head { gap: 12px; }
.ph-label { flex: none; color: #6b7178; font-weight: 600; font-size: 12.6px; letter-spacing: .2px; }
.ph-title {
  flex: 1 1 auto; min-width: 0; text-align: center;
  font-size: 16.5px; font-weight: 700; color: #1b1f25; letter-spacing: -.2px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Step 4 内嵌在首页里 ---------- */
.printview { margin-top: 18px; }
.print-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.print-top .step-no { width: 25px; height: 25px; font-size: .84em; }
.print-title { font-size: 17px; font-weight: 700; color: #16181d; }
.print-title-sub { flex: 1 1 100%; font-size: 12.8px; color: #6b7178; margin-left: 35px; }
.print-grid { grid-template-columns: 396px minmax(0, 1fr); gap: 18px; }
.print-stage { background: #fbfbfa; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }

/* ---------- 13 个模板：tab 可横向滚动 ---------- */
.tabbar {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.tabbar::-webkit-scrollbar { height: 6px; }
.tabbar::-webkit-scrollbar-thumb { background: #d6dbe2; border-radius: 3px; }
.tabbar .tab { flex: 0 0 auto; min-width: 118px; }

/* ---------- 当前模板条 ---------- */
.tplbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 12px; margin-bottom: 18px;
}
.tpl-btn {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-strong); background: #fff; border-radius: 9px;
  padding: 7px 12px; font: inherit; cursor: pointer; color: #16181d;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tpl-btn:hover { border-color: #b9c2cc; box-shadow: 0 2px 8px -4px rgba(20,25,35,.25); }
.tpl-k { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #8a919b; }
.tpl-btn b { font-size: 14.5px; font-weight: 700; letter-spacing: -.1px; }
.tpl-chev { width: 15px; height: 15px; color: #6b7178; }
.tpl-hint { margin-left: auto; font-size: 12.6px; color: #8a919b; }

/* ---------- 选择页覆盖层 ---------- */
.picker {
  position: fixed; inset: 0; z-index: 60; background: rgba(20, 24, 30, .38);
  backdrop-filter: blur(2px); overflow-y: auto; padding: 28px 20px 60px;
}
.picker[hidden] { display: none; }
.picker-inner {
  max-width: 1300px; margin: 0 auto; background: #f4f5f7;
  border-radius: 16px; padding: 24px 26px 30px;
  box-shadow: 0 30px 70px -30px rgba(10,15,25,.55);
}
.picker-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.picker-head > div { flex: 1 1 auto; min-width: 0; }
.pk-step { font-size: 12.2px; color: #7c828c; letter-spacing: .3px; }
.picker-head .picker-title { margin: 5px 0 6px; font-size: 26px; letter-spacing: -.6px; color: #16181d; }
.picker-head p { margin: 0; font-size: 13.8px; color: #5c626b; max-width: 780px; line-height: 1.5; }
.pk-close {
  flex: none; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; cursor: pointer; display: grid; place-items: center; color: #4b5058;
}
.pk-close svg { width: 17px; height: 17px; }
.pk-close:hover { background: #f3f4f6; }

.pkgrp { margin-bottom: 26px; }
.pkgrp-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pkgrp-head h2 { margin: 0; font-size: 17px; letter-spacing: -.2px; color: #16181d; flex: none; }
.pkgrp-head .cnt { font-size: 11.8px; color: #6b7178; background: #fff; border: 1px solid #e2e5ea; border-radius: 999px; padding: 2px 9px; flex: none; }
.pkgrp-hint { margin-left: auto; font-size: 12.4px; color: #7c828c; }
.pkgrp-rule { border: 0; border-top: 1px solid #e2e5ea; margin: 0 0 13px; }
.pkcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }

.pkcard {
  display: flex; flex-direction: column; gap: 9px; text-align: left;
  background: #fff; border: 1px solid #e2e5ea; border-radius: 12px;
  padding: 10px 10px 12px; cursor: pointer; font: inherit; position: relative;
  transition: box-shadow .16s ease, border-color .16s ease, transform .08s ease;
}
.pkcard:hover { box-shadow: 0 10px 26px -12px rgba(20,25,35,.3); border-color: #cfd6de; }
.pkcard:active { transform: translateY(1px); }
.pkcard.cur { border-color: #15803d; box-shadow: 0 0 0 2px rgba(21,128,61,.13); }
.pkthumb {
  height: 168px; border-radius: 9px; background: #fafbfc; border: 1px solid #eef0f3;
  display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 9px; box-sizing: border-box;
}
.pkthumb svg { display: block; width: 100%; height: 100%; }
.pkthumb .nowire { font-size: 12px; color: #8a919b; }
.pknm { font-size: 14px; font-weight: 700; line-height: 1.3; color: #16181d; letter-spacing: -.1px; }
.pkds { font-size: 12.2px; color: #6b7178; line-height: 1.4; margin-top: 2px; min-height: 33px; }
.pktags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.pktag { font-size: 11px; font-weight: 600; color: #4b5563; background: #f1f3f5; border-radius: 5px; padding: 2px 6px; }
.pktag.green { background: #e8f5ec; color: #15803d; }
.pktag.soon { background: #f3f0e8; color: #8a6d3b; }
.pkcur { position: absolute; top: 8px; right: 8px; font-size: 10.2px; font-weight: 700; background: #15803d; color: #fff; border-radius: 4px; padding: 2px 5px; letter-spacing: .3px; }
body.picking { overflow: hidden; }

/* 新模板用到的字号 */
.text-\[7pt\] { font-size: 7pt; }
.text-\[26pt\] { font-size: 26pt; }

/* ---------- 顶部：5 个主 tab + More formats ---------- */
.tplbar { padding: 8px 10px 8px 8px; gap: 10px; }
.tpl-tabs {
  flex: 1 1 auto; min-width: 0;
  display: flex; gap: 4px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
  padding-bottom: 1px;
}
.tpl-tabs::-webkit-scrollbar { height: 5px; }
.tpl-tabs::-webkit-scrollbar-thumb { background: #d6dbe2; border-radius: 3px; }
.tpl-tabs .tab {
  flex: 1 1 0; min-width: 124px;
  padding: 11px 10px 10px; gap: 7px;
  font-size: 13.6px; letter-spacing: .1px;
}
.tpl-tabs .tab svg { width: 20px; height: 20px; }
.tpl-more {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-strong); background: #fff; border-radius: 9px;
  padding: 8px 11px; font: inherit; font-size: 12.6px; font-weight: 600; color: #1f242b;
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.tpl-more:hover { border-color: #b9c2cc; box-shadow: 0 2px 8px -4px rgba(20,25,35,.25); }
.tpl-more svg { width: 16px; height: 16px; color: #6b7178; }
.tpl-count {
  font-size: 10.6px; font-weight: 700; color: #fff; background: #ff5333;
  border-radius: 999px; padding: 1px 6px; line-height: 1.5;
}

/* ---------- Step 1：选择格式 ---------- */
.step1-card { margin-bottom: 18px; padding: 16px 20px 17px; }
.step1-card .step-head { margin-bottom: 12px; }
.step1-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.step1-cur {
  display: flex; align-items: baseline; gap: 9px;
  background: #fafbfc; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 13px; min-width: 0;
}
.step1-k { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #8a919b; }
.step1-cur b { font-size: 14.6px; font-weight: 700; color: #16181d; letter-spacing: -.1px; }
.step1-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); background: #fff; border-radius: 9px;
  padding: 10px 14px; font: inherit; font-size: 13.2px; font-weight: 600; color: #1f242b;
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.step1-btn:hover { border-color: #b9c2cc; box-shadow: 0 2px 8px -4px rgba(20,25,35,.25); }
.step1-btn svg { width: 15px; height: 15px; color: #6b7178; }

/* ---------- 批量预览放大镜 ---------- */
.sheet-head { position: relative; }
.mag-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); background: #fff; border-radius: 8px;
  padding: 6px 10px; font: inherit; font-size: 12.2px; font-weight: 600; color: #6b7178;
  cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.mag-btn svg { width: 14px; height: 14px; }
.mag-btn.on { color: #15803d; border-color: #b7d9c3; background: #f2faf5; }
.mag-btn:hover { border-color: #b9c2cc; }

.loupe {
  position: fixed; z-index: 70; width: 236px; height: 236px;
  border-radius: 50%; overflow: hidden; pointer-events: none;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(20,25,35,.18), 0 18px 40px -14px rgba(15,20,30,.5);
  background: #fff;
}
.loupe[hidden] { display: none; }
.loupe-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.loupe-inner .sheet { box-shadow: none !important; }
.loupe::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px;
  border: 1px solid rgba(255,83,51,.9); border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.8);
}

/* 放大镜开关放到标题行右侧 */
.mag-btn { position: absolute; right: 2px; top: 0; margin-left: 0; }

/* ---------- 批量预览：按比例缩放 ---------- */
.zoomctl {
  position: absolute; right: 2px; top: 0;
  display: flex; align-items: center; gap: 2px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px;
}
.zoomctl button {
  min-width: 26px; height: 26px; border: 0; background: transparent; border-radius: 6px;
  font: inherit; font-size: 15px; line-height: 1; color: #3c434b; cursor: pointer;
}
.zoomctl button:hover { background: #f1f3f5; }
.zoomctl #zoom-pct {
  min-width: 46px; text-align: center; font-size: 12px; font-weight: 600; color: #4b5058;
  font-variant-numeric: tabular-nums;
}
.zoomctl .zoom-fit { font-size: 11.6px; font-weight: 600; color: #6b7178; padding: 0 7px; }
.sheetwrap { overflow: auto; max-height: 640px; }
.sheetwrap .sheet { margin: 0 auto; flex: none; }
.sheetwrap::-webkit-scrollbar { width: 8px; height: 8px; }
.sheetwrap::-webkit-scrollbar-thumb { background: #cfd6de; border-radius: 4px; }

/* 缩放后需要滚动：改成块级 + margin auto 居中，避免 flex 溢出裁剪 */
.sheetwrap { display: block; padding: 8px 0; box-sizing: border-box; }
.sheetwrap .sheet { margin: 0 auto; }

/* ---------- 实时预览缩放 ---------- */
.pv-zoom { position: static; margin-left: auto; flex: none; padding: 1px; }
.pv-zoom button { height: 24px; min-width: 24px; font-size: 14px; }
.pv-zoom #pv-zoom-pct { min-width: 42px; font-size: 11.6px; }
.preview-stage { align-items: flex-start; }
.label-wrap { flex: none; }

/* ============ 移动端 / 平板端修正 ============ */

/* 1) 顶部 tab：不挤压、不重叠，超宽横向滚动 + 省略号 */
.tpl-tabs .tab { flex: 1 1 0; min-width: 136px; max-width: none; }
.tpl-tabs .tab span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 2) 批量区在窄屏改单列，避免把页面撑宽 */
@media (max-width: 1180px) {
  .print-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .print-settings, .print-stage { min-width: 0; }
  .preview-panel, .form-panel { min-width: 0; }
  .sheet-head { flex-wrap: wrap; row-gap: 8px; }
  .zoomctl { position: static; margin-left: auto; }
  .print-top { row-gap: 4px; }
}

/* 3) 预览头部可换行，缩放控件不顶出屏幕 */
.preview-head { flex-wrap: wrap; row-gap: 6px; }
.preview-head .ph-title { flex: 1 1 180px; }
.pv-zoom { order: 3; }

/* 4) 手机端：点击目标放大到手指好按的尺寸 */
@media (max-width: 780px) {
  .field-input, .ctrl { height: 46px; font-size: 16px; }
  textarea.field-input { height: auto; min-height: 84px; font-size: 16px; }
  .seg { height: 46px; }
  .seg button { font-size: 15px; }
  .step1-btn, .tpl-more, .btn-primary, .btn-ghost, .dl-btn, .dl-batch, .reset-btn { min-height: 48px; }
  .chips button { min-height: 44px; min-width: 46px; font-size: 15px; }
  .chk { font-size: 15px; }
  .chk input { width: 22px; height: 22px; }
  .zoomctl button { min-width: 38px; height: 38px; font-size: 17px; }
  .zoomctl #zoom-pct, .zoomctl #pv-zoom-pct { min-width: 50px; font-size: 13px; }
  .pager .nav { width: 44px; height: 44px; }
  .mag-btn { min-height: 40px; }
}

/* 5) 触屏设备统一放宽点击区（平板） */
@media (pointer: coarse) {
  .tab { padding: 12px 10px 11px; }
  .field-input, .ctrl { min-height: 42px; }
}

/* 6) 窄屏强制单列（覆盖 data-cols 的更高优先级） */
@media (max-width: 900px) {
  .form-grid, .form-grid[data-cols="2"], .form-grid[data-cols="3"], .form-grid[data-cols="4"] {
    grid-template-columns: minmax(0, 1fr) !important;
    --cols: 1;
  }
}

/* 7) 触屏点击目标补强 */
@media (pointer: coarse) {
  input[type="checkbox"] { width: 22px; height: 22px; }
  input[type="range"] { height: 34px; }
  input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; }
  .zoomctl button { min-width: 40px; height: 40px; }
  .tpl-more, .step1-btn { min-height: 44px; }
}

/* 8) 强制收敛宽度：防止任何子元素把整页撑宽 */
.tplbar, .tpl-tabs, .tpl-btn { min-width: 0; }
.tpl-tabs { flex: 1 1 0 !important; }
@media (max-width: 1180px) {
  .print-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .print-stage, .print-settings, .printview, .workspace, .form-panel, .preview-panel {
    min-width: 0 !important; max-width: 100%;
  }
  .sheetwrap { max-width: 100%; overflow: auto !important; }
  .sheet-head { width: auto !important; max-width: 100%; }
}
@media (max-width: 780px) {
  .tpl-tabs .tab { flex: 1 1 auto; min-width: min-content !important; max-width: none; padding-left: 6px; padding-right: 6px; }
  .tpl-tabs .tab span {
    white-space: normal; text-overflow: clip; line-height: 1.2;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
  .shell { padding: 12px 12px 28px; }
}

/* 9) 手机上把 More formats 收窄，给 tab 腾空间 */
@media (max-width: 520px) {
  .tpl-more span:first-of-type { display: none; }
  .tpl-more { padding: 8px 10px; min-height: 44px; }
  .tpl-more svg { width: 18px; height: 18px; }
  .step1-row { gap: 10px; }
  .step1-btn { width: 100%; justify-content: center; }
  .step1-cur { width: 100%; }
}

/* 10) 手机端点击目标最终补强（不依赖触屏检测） */
@media (max-width: 780px) {
  input[type="checkbox"] { width: 22px !important; height: 22px !important; }
  input[type="range"] { height: 34px !important; }
  input[type="range"]::-webkit-slider-thumb { width: 26px !important; height: 26px !important; }
  .field-input.full, .field-input.solo { height: 46px !important; }
  .zoomctl button { min-width: 44px !important; height: 44px !important; }
  .zoomctl { padding: 2px; }
  .check { min-height: 44px; align-items: center; }
}

/* ---------- 选择页：平板 / 手机布局 ---------- */
@media (max-width: 900px) {
  .pkcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker { padding: 16px 14px 40px; }
  .picker-inner { padding: 20px 18px 24px; }
}
@media (max-width: 600px) {
  .picker { padding: 0; background: #f4f5f7; }
  .picker-inner { border-radius: 0; padding: 16px 14px 32px; min-height: 100%; box-shadow: none; }
  .picker-head { gap: 10px; margin-bottom: 16px; }
  .picker-head .picker-title { font-size: 21px; }
  .picker-head p { font-size: 13px; }
  .pk-close { width: 40px; height: 40px; }
  .pkgrp { margin-bottom: 20px; }
  .pkgrp-head h2 { font-size: 15.5px; }
  .pkgrp-hint { display: none; }
  .pkcards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pkcard { flex-direction: row; align-items: center; gap: 12px; padding: 10px; }
  .pkthumb { width: 92px; height: 108px; flex: none; padding: 6px; }
  .pkcard > div:last-child { min-width: 0; flex: 1 1 auto; }
  .pknm { font-size: 13.4px; }
  .pkds { font-size: 11.8px; margin-top: 2px; min-height: 0; }
  .pktags { margin-top: 6px; }
  .pkcur { top: 6px; right: 6px; }
}

/* ==========================================================================
   内容区（工具区之后、页脚之前）
   —— 复刻 latexword.com 的区块顺序：H1+副标题 / 3 步 / 对比 / 功能 / 为什么 / 用例 / FAQ / CTA
   ========================================================================== */
#tool { scroll-margin-top: 12px; }

.content {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 60px 28px 76px;
}
.content-wrap { max-width: 1080px; margin: 0 auto; }

.content-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.14;
  letter-spacing: -.9px;
  font-weight: 700;
}
.lead {
  margin: 0;
  max-width: 770px;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cblock { margin-top: 58px; scroll-margin-top: 16px; }
.cblock > h2 {
  margin: 0 0 6px;
  font-size: clamp(21px, 2.4vw, 26px);
  line-height: 1.2;
  letter-spacing: -.4px;
  font-weight: 700;
}
.cblock-sub {
  margin: 0 0 22px;
  max-width: 790px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
}
.cblock h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; letter-spacing: -.1px; }
.cblock p { margin: 0; }

/* --- 三步流程：编号 + 竖线 --- */
.steps { list-style: none; counter-reset: step; margin: 26px 0 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 58px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center;
  background: #11161d; color: #fff;
  font-size: 14px; font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute; left: 16.5px; top: 40px; bottom: 8px;
  width: 1px; background: var(--line);
}
.steps p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; max-width: 78ch; }

/* --- 并排对比 --- */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
  align-items: stretch;
}
.compare-col {
  display: flex; flex-direction: column;
  background: #fbfbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.compare-col h3 { font-size: 15.5px; line-height: 1.35; }
.compare-col img {
  display: block;
  width: 100%;
  height: 430px;
  object-fit: contain;
  object-position: center;
  margin: 14px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.compare-col ul { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 9px; }
.compare-col li {
  position: relative;
  padding-left: 20px;
  font-size: 14.6px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.compare-col li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--green);
}

/* --- 功能 / 为什么 / 用例：卡片网格 --- */
.feat-grid, .why-grid, .use-grid { display: grid; gap: 16px; margin-top: 22px; }
.feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.why-grid, .use-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feat-grid > div, .why-grid > div, .use-grid > div {
  background: #fbfbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 17px;
}
.feat-grid p, .why-grid p, .use-grid p {
  font-size: 14.6px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* --- FAQ --- */
.faq {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.faq details + details { border-top: 1px solid var(--line); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 16px 54px 16px 18px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  transition: background .14s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 21px; font-weight: 400; color: var(--muted);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: #fbfbfa; }
.faq details[open] summary { background: #fbfbfa; }
.faq details p {
  margin: 0;
  padding: 0 18px 18px;
  max-width: 84ch;
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-soft);
}

/* --- 底部 CTA --- */
.cta-block {
  margin-top: 64px;
  padding: 46px 28px;
  border-radius: 18px;
  background: #11161d;
  text-align: center;
}
.cta-block h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -.5px;
  color: #fff;
}
.cta-block p {
  margin: 0 auto 24px;
  max-width: 560px;
  font-size: 15.5px;
  color: rgba(255, 255, 255, .74);
}
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: 10px;
  background: var(--green); color: #fff;
  font-size: 16px; font-weight: 700; text-decoration: none;
  transition: background .15s ease, transform .06s ease;
}
.cta:hover { background: var(--green-hover); }
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* --- 内容区响应式 --- */
@media (max-width: 900px) {
  .content { padding: 44px 18px 58px; }
  .cblock { margin-top: 46px; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .compare-col img { height: 340px; }
  .feat-grid, .why-grid, .use-grid { grid-template-columns: minmax(0, 1fr); }
  .lead { font-size: 16.5px; }
}
@media (max-width: 520px) {
  .content { padding: 34px 14px 46px; }
  .steps li { padding-left: 48px; }
  .steps li::before { width: 30px; height: 30px; font-size: 13px; }
  .steps li:not(:last-child)::after { left: 14.5px; top: 36px; }
  .compare-col { padding: 14px; }
  .compare-col img { height: 300px; }
  .cta-block { padding: 34px 18px; margin-top: 48px; }
  .cta { width: 100%; }
  .faq summary { padding: 15px 48px 15px 14px; font-size: 15.2px; }
  .faq details p { padding: 0 14px 16px; }
}

/* ---------- site footer (same markup as /about and /pricing) ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 24px 24px 32px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.site-footer p { margin: 0 0 8px; }
.site-footer nav { font-size: 13.5px; }
.site-footer nav a { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.site-footer nav a:hover { text-decoration: underline; }
/* ---------- top bar navigation ---------- */
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; flex: none; }
.site-nav a, .site-nav .nav-cur { font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; line-height: 1; }
.site-nav a:hover { color: var(--green); }
.site-nav .nav-cur { color: var(--ink); }
@media (max-width: 720px) {
  .topbar { padding: 10px 14px; }
  .brand { gap: 10px; flex-wrap: wrap; }
  .brand-text p { display: none; }
  .site-nav { gap: 14px; }
  .site-nav a, .site-nav .nav-cur { font-size: 13px; }
}