/* ==========================================================================
   GEO Toolkit — 生成式引擎优化工具箱
   设计系统 / Design tokens
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f2f4f9;
  --border: #e4e8f0;
  --border-strong: #cfd6e4;
  --text: #0e1726;
  --text-muted: #5b6b82;
  --text-dim: #8b97ab;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-2: #0891b2;
  --accent-soft: #eef0ff;
  --accent-ring: rgba(79, 70, 229, 0.28);
  --ok: #0a9d6b;
  --ok-soft: #e6f7f0;
  --warn: #b97000;
  --warn-soft: #fdf3e2;
  --bad: #cf3b3b;
  --bad-soft: #fdecec;
  --code-bg: #0f1729;
  --code-text: #d7e0f2;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.05), 0 22px 48px rgba(16, 24, 40, 0.1);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1080px;
  --header-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

[data-theme="dark"] {
  --bg: #080c17;
  --bg-soft: #0d1322;
  --surface: #101828;
  --surface-2: #17203a;
  --border: #212c47;
  --border-strong: #33415f;
  --text: #e9eefb;
  --text-muted: #a4b2cc;
  --text-dim: #7b89a4;
  --accent: #8b8bff;
  --accent-hover: #a5a5ff;
  --accent-2: #3dd6f5;
  --accent-soft: #191f3d;
  --accent-ring: rgba(139, 139, 255, 0.35);
  --ok: #4ade9f;
  --ok-soft: #10281f;
  --warn: #f5c04e;
  --warn-soft: #2a2113;
  --bad: #ff8080;
  --bad-soft: #2c1618;
  --code-bg: #060a13;
  --code-text: #cbd6ee;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 22px 48px rgba(0, 0, 0, 0.55);
}

/* ------------------------------ base ------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 { line-height: 1.28; font-weight: 700; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.16rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
::selection { background: var(--accent-ring); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); transition: top 0.2s;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ------------------------------ header ------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(4px)) {
  .site-header { background: var(--bg); }
}

.site-header .wrap {
  height: 100%; display: flex; align-items: center; gap: 18px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 750; color: var(--text); font-size: 1.02rem;
  letter-spacing: -0.02em; text-decoration: none; flex: 0 0 auto;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  box-shadow: 0 3px 10px var(--accent-ring);
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--text-muted); font-size: 0.925rem; font-weight: 550;
  padding: 8px 11px; border-radius: 8px; white-space: nowrap;
  transition: color 0.16s, background-color 0.16s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.nav-toggle {
  display: none; margin-left: auto; background: none; cursor: pointer;
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px;
  color: var(--text); line-height: 1;
}

.theme-toggle {
  background: none; border: 1px solid var(--border); cursor: pointer;
  border-radius: 9px; width: 36px; height: 34px; padding: 0;
  display: grid; place-items: center; color: var(--text-muted);
  transition: color .16s, border-color .16s, background-color .16s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px 22px 18px; margin: 0; display: none;
    box-shadow: var(--shadow);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 11px 12px; font-size: 1rem; }
}

/* ------------------------------ hero ------------------------------ */

.hero { position: relative; overflow: hidden; padding: 76px 0 62px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 620px;
  background:
    radial-gradient(46% 62% at 18% 34%, var(--accent-ring), transparent 68%),
    radial-gradient(40% 58% at 82% 22%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 66%);
  filter: blur(10px); pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-inner { max-width: 800px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
}

.grad-text {
  background: linear-gradient(104deg, var(--accent) 6%, var(--accent-2) 78%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.lead { font-size: clamp(1.02rem, 1.7vw, 1.16rem); color: var(--text-muted); line-height: 1.78; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ------------------------------ buttons ------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 0.94rem; font-weight: 600;
  padding: 11px 20px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: transform .12s, box-shadow .16s, background-color .16s, border-color .16s, color .16s;
  text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 62%, var(--accent-2)));
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 16px var(--accent-ring);
}
.btn-primary:hover { color: #fff; filter: brightness(1.07); box-shadow: 0 7px 22px var(--accent-ring); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: 0.85rem; border-radius: 9px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ------------------------------ cards & grids ------------------------------ */

.section { padding: 62px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 700px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.tool-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .22s ease, border-color .18s ease;
  color: var(--text);
}
.tool-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  text-decoration: none; color: var(--text);
}
.tool-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.15rem;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.tool-card h3 { margin: 4px 0 0; }
.tool-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; flex: 1; }
.tool-card .go { color: var(--accent); font-size: 0.88rem; font-weight: 600; }

.stat { text-align: left; }
.stat .n {
  font-size: 1.75rem; font-weight: 750; letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; display: block;
}
.stat .l { font-size: 0.86rem; color: var(--text-muted); line-height: 1.5; }

/* ------------------------------ pills / badges ------------------------------ */

.badge {
  display: inline-block; font-size: 0.76rem; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; line-height: 1.6;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 26%, transparent); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 26%, transparent); }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 24%, transparent); }

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }

/* ------------------------------ forms ------------------------------ */

.field { margin-bottom: 18px; }
.field > label,
.field-label {
  display: block; font-size: 0.875rem; font-weight: 620;
  margin-bottom: 7px; color: var(--text);
}
.hint { font-size: 0.82rem; color: var(--text-dim); margin: 6px 0 0; line-height: 1.55; }

input[type="text"], input[type="url"], input[type="number"], input[type="email"],
textarea, select {
  width: 100%; font: inherit; font-size: 0.94rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 10px 13px; line-height: 1.55;
  transition: border-color .16s, box-shadow .16s, background-color .16s;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
textarea { resize: vertical; min-height: 130px; font-family: var(--mono); font-size: 0.875rem; }
select { appearance: none; background-image: none; cursor: pointer; padding-right: 34px; }

.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); cursor: pointer;
  transition: border-color .16s, background-color .16s;
}
.check-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.check-row input[type="checkbox"] {
  width: 17px; height: 17px; margin: 3px 0 0; flex: 0 0 auto;
  accent-color: var(--accent); cursor: pointer;
}
.check-row .cr-body { min-width: 0; }
.check-row .cr-title { font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.check-row .cr-desc { font-size: 0.79rem; color: var(--text-dim); line-height: 1.5; margin-top: 2px; }
.check-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .check-grid { grid-template-columns: 1fr; } }

fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend {
  font-size: 0.875rem; font-weight: 620; padding: 0; margin-bottom: 10px;
}

/* ------------------------------ output / code ------------------------------ */

.out-panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm);
}
.out-head {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.out-head .t { font-size: 0.85rem; font-weight: 620; margin-right: auto; }
.code-out {
  margin: 0; padding: 18px; background: var(--code-bg); color: var(--code-text);
  font-family: var(--mono); font-size: 0.815rem; line-height: 1.72;
  overflow: auto; max-height: 560px; white-space: pre; tab-size: 2;
}
.code-out.is-empty { color: var(--text-dim); font-style: italic; }

.copy-flash {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 14px);
  background: var(--text); color: var(--bg); font-size: 0.86rem; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 300;
}
.copy-flash.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------ score meter ------------------------------ */

.score-hero {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 26px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 10%, var(--surface)));
  border: 1px solid var(--border);
}
.dial { position: relative; width: 132px; height: 132px; flex: 0 0 auto; }
.dial svg { transform: rotate(-90deg); display: block; }
.dial .dial-track { stroke: var(--surface-2); }
.dial .dial-val { stroke: var(--accent); transition: stroke-dashoffset .7s cubic-bezier(.3,.9,.25,1), stroke .3s; }
.dial-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 2rem; font-weight: 750; letter-spacing: -0.04em;
}
.dial-num small { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); display: block; text-align: center; }
.score-verdict { flex: 1 1 260px; min-width: 0; }
.score-verdict .v { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }

.meter { margin: 14px 0; }
.meter-head {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 0.875rem; font-weight: 600; margin-bottom: 6px;
}
.meter-head .w { margin-left: auto; color: var(--text-dim); font-weight: 500; font-size: 0.8rem; font-family: var(--mono); }
.meter-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s cubic-bezier(.3,.9,.25,1); }
.meter-fill.lv-ok { background: linear-gradient(90deg, var(--ok), color-mix(in srgb, var(--ok) 60%, var(--accent-2))); }
.meter-fill.lv-warn { background: linear-gradient(90deg, var(--warn), color-mix(in srgb, var(--warn) 60%, var(--accent))); }
.meter-fill.lv-bad { background: linear-gradient(90deg, var(--bad), color-mix(in srgb, var(--bad) 60%, var(--warn))); }
.meter-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 5px; }

.finding {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface); margin-bottom: 10px;
}
.finding .fi { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; margin-top: 2px; }
.finding.ok .fi { background: var(--ok-soft); color: var(--ok); }
.finding.warn .fi { background: var(--warn-soft); color: var(--warn); }
.finding.bad .fi { background: var(--bad-soft); color: var(--bad); }
.finding .ft { font-weight: 620; font-size: 0.92rem; }
.finding .fd { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-top: 2px; }

/* ------------------------------ prose ------------------------------ */

.prose { max-width: 780px; }
.prose h2 { margin-top: 2.2em; padding-top: 0.2em; }
.prose h3 { margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.35em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.42em; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: 1.5em 0; padding: 14px 20px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 10px 10px 0; color: var(--text-muted);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: var(--mono); font-size: 0.87em; background: var(--surface-2);
  border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px;
}
.prose pre {
  background: var(--code-bg); color: var(--code-text); padding: 16px 18px;
  border-radius: 12px; overflow: auto; font-family: var(--mono);
  font-size: 0.83rem; line-height: 1.7;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.9rem; }
.prose th, .prose td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
.prose tbody tr:hover { background: var(--bg-soft); }

.toc {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.toc .toc-t { font-size: 0.78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 0.9rem; }
.toc li { margin-bottom: 5px; }

/* ------------------------------ faq ------------------------------ */

.faq details {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); margin-bottom: 10px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 620; font-size: 0.96rem;
  list-style: none; display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-left: auto; font-size: 1.25rem; font-weight: 500;
  color: var(--text-dim); transition: transform .2s; line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq .faq-body { padding: 0 18px 17px; color: var(--text-muted); font-size: 0.92rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ------------------------------ steps ------------------------------ */

.steps { counter-reset: s; display: grid; gap: 14px; }
.step {
  position: relative; padding: 18px 22px 18px 62px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 18px; top: 17px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 700;
}
.step .st { font-weight: 650; margin-bottom: 3px; }
.step .sd { font-size: 0.9rem; color: var(--text-muted); }

/* ------------------------------ layout for tool pages ------------------------------ */

.page-head { padding: 46px 0 8px; }
.page-head h1 { margin-bottom: 12px; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 26px; align-items: start; padding: 34px 0 70px; }
@media (max-width: 940px) { .tool-layout { grid-template-columns: 1fr; } }
.sticky-out { position: sticky; top: calc(var(--header-h) + 18px); }
@media (max-width: 940px) { .sticky-out { position: static; } }

.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.toolbar .spacer { flex: 1 1 auto; }

/* ------------------------------ footer ------------------------------ */

.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: 44px 0 34px; margin-top: 40px; font-size: 0.9rem; color: var(--text-muted);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(2, 1fr); gap: 30px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-grid h4 { font-size: 0.8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 7px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 0.84rem; color: var(--text-dim);
}
.footer-bottom .spacer { flex: 1 1 auto; }

/* ------------------------------ misc ------------------------------ */

.callout {
  display: flex; gap: 13px; padding: 15px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 0.9rem; color: var(--text-muted); margin-bottom: 18px;
}
.callout .ci { flex: 0 0 auto; font-size: 1rem; line-height: 1.5; }
.callout.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.callout p:last-child { margin-bottom: 0; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 0.92rem; }

.sr-divider { display: flex; align-items: center; gap: 14px; margin: 30px 0; color: var(--text-dim); font-size: 0.8rem; }
.sr-divider::before, .sr-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }

@media print {
  .site-header, .site-footer, .btn, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
