/* ---------- Design tokens ---------- */
:root {
  --ink: #1A1B2E;
  --ink-soft: #6B7089;
  --paper: #F7F7FC;

  --blue-1: var(--c-primary, #4F6BFF);
  --blue-2: #7B5CFA;
  --blue-ink: #3346C7;

  --red-1: var(--c-accent, #FF5A5F);
  --red-2: #FF8A5C;
  --red-ink: #D33E43;

  --nav-1: #4F46E5;
  --nav-2: #7C3AED;
  --nav-3: var(--c-primary, #4F6BFF);

  --line: #E7E7F3;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius-lg: 24px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }

/* ---------- Decorative blobs ---------- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.blob--a { width: 420px; height: 420px; background: radial-gradient(circle, #7B5CFA, transparent 70%); top: -120px; right: -100px; }
.blob--b { width: 380px; height: 380px; background: radial-gradient(circle, #FF8A5C, transparent 70%); bottom: -140px; left: -100px; }
.blob--c { width: 300px; height: 300px; background: radial-gradient(circle, #4F6BFF, transparent 70%); top: 40%; right: 30%; opacity: 0.2; }

/* ---------- Top bar ---------- */
.topbar {
  background: linear-gradient(120deg, var(--nav-1), var(--nav-2) 55%, var(--nav-3));
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 4px 24px rgba(79,70,229,0.25);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}
.brand:hover { opacity: 0.9; }
.brand__mark {
  display: inline-flex;
}
.brand__mark--img { padding: 0; align-items: center; justify-content: center; }
.brand__mark--img img { display: block; object-fit: contain; }
.topbar__nav { display: flex; gap: 30px; font-size: 0.92rem; font-weight: 600; }
.topbar__nav a { text-decoration: none; color: rgba(255,255,255,0.88); transition: color .15s; }
.topbar__nav a:hover { color: #fff; }

/* Mobile hamburger toggle — hidden on desktop, shown under 860px */
.menu-toggle {
  display: none;
  background: rgba(255,255,255,0.14);
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 9px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle svg { display: block; pointer-events: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 24px 28px 16px;
  text-align: center;
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--blue-2);
  font-weight: 500;
  margin: 0 0 10px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 5.2vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  animation: heroRise 0.9s cubic-bezier(.2,.8,.2,1) both;
}
.hero__title--grad {
  background: linear-gradient(100deg, var(--ink) 0%, var(--blue-1) 22%, var(--blue-2) 40%, var(--red-1) 58%, var(--blue-2) 76%, var(--ink) 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 6s ease-in-out infinite;
}
@keyframes heroRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title, .hero__title--grad { animation: none; }
}
.hero__sub {
  max-width: 500px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Bench layout ---------- */
.bench {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
  padding-bottom: 10px;
}

.station {
  --grad-1: var(--blue-1);
  --grad-2: var(--blue-2);
  --grad-3: #A78BFA;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, var(--grad-1), var(--grad-2), var(--grad-3), var(--grad-1)) border-box;
  background-size: 100% 100%, 300% 300%;
  border: 2.5px solid transparent;
  border-radius: var(--radius-lg);
  padding: 18px 26px 20px;
  box-shadow: 0 20px 45px -18px rgba(45,50,130,0.18);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: borderFlow 7s ease infinite;
}
.station--red {
  --grad-1: var(--red-1);
  --grad-2: var(--red-2);
  --grad-3: #FFC168;
}
@keyframes borderFlow {
  0% { background-position: 0% 0%, 0% 50%; }
  50% { background-position: 0% 0%, 100% 50%; }
  100% { background-position: 0% 0%, 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .station { animation: none; }
}

.station__badge {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 10px 20px -8px rgba(0,0,0,0.28);
}
.station__badge svg { width: 21px; height: 21px; }
.station--blue .station__badge { background: linear-gradient(135deg, var(--blue-1), var(--blue-2)); }
.station--red .station__badge { background: linear-gradient(135deg, var(--red-1), var(--red-2)); }

.station__title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  margin: 0 0 5px;
  letter-spacing: -0.01em;
}
.station--blue .station__title { color: var(--blue-ink); }
.station--red .station__title { color: var(--red-ink); }

.station__desc { margin: 0 0 12px; color: var(--ink-soft); font-size: 0.88rem; max-width: 420px; line-height: 1.4; }
.station__note {
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin: 10px 2px 0;
  line-height: 1.4;
}

/* ---------- Dropzone ---------- */
.dropzone {
  width: 100%;
  border: 2px dashed #C9CCF0;
  background: linear-gradient(180deg, #F6F7FF, #FFFFFF);
  border-radius: var(--radius-md);
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  position: relative;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--blue-1); transform: translateY(-2px); }
.dropzone--pdf { background: linear-gradient(180deg, #FFF5F0, #FFFFFF); border-color: #F4C6C1; }
.dropzone--pdf:hover, .dropzone--pdf:focus-visible { border-color: var(--red-1); }
.dropzone.is-dragover { border-color: var(--blue-1); background: #EEF1FF; }
.dropzone--pdf.is-dragover { border-color: var(--red-1); background: #FFEFEA; }

[hidden] { display: none !important; }

.dropzone__idle, .dropzone__busy, .dropzone__result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: center;
}
.dropzone__icon { color: var(--blue-2); width: 26px; height: 26px; }
.dropzone--pdf .dropzone__icon { color: var(--red-1); }
.dropzone__hint { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.btn { padding: 12px 26px; font-size: 0.9rem; }
.dropzone__status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  margin: 4px 0 0;
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary {
  background: linear-gradient(120deg, var(--blue-1), var(--blue-2));
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(79,107,255,0.55);
}
.btn--primary.btn--pdf {
  background: linear-gradient(120deg, var(--red-1), var(--red-2));
  box-shadow: 0 10px 22px -8px rgba(255,90,95,0.5);
}
.btn--ghost {
  background: #fff;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { color: var(--ink); border-color: #C9CCF0; }

/* ---------- Progress / scanline ---------- */
.progress {
  width: 100%;
  max-width: 240px;
  height: 6px;
  background: #E7E7F3;
  border-radius: 6px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
  transition: width .2s ease;
  border-radius: 6px;
}
.progress__bar--pdf { background: linear-gradient(90deg, var(--red-1), var(--red-2)); }

.scanline {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 4px solid #E7E7F3;
  border-top-color: var(--blue-1);
  animation: spin 0.85s linear infinite;
}
.scanline--pdf { border-top-color: var(--red-1); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Results ---------- */
.checker {
  width: 100%;
  max-width: 300px;
  border-radius: 14px;
  overflow: hidden;
  background-image:
    linear-gradient(45deg, #EDEEF7 25%, transparent 25%),
    linear-gradient(-45deg, #EDEEF7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #EDEEF7 75%),
    linear-gradient(-45deg, transparent 75%, #EDEEF7 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px -14px rgba(45,50,130,0.35);
}
.checker img { display: block; width: 100%; height: auto; }

.docpreview {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 12px 30px -14px rgba(45,50,130,0.25);
  max-height: 520px;
  overflow-y: auto;
}
.docpreview canvas { display: block; }

.pdf-open-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 46px 20px;
  text-decoration: none;
  border-radius: 10px;
  background: linear-gradient(160deg, #FFF3EC, #FFE4D6);
  border: 1.5px dashed var(--red-1);
}
.pdf-open-mobile__icon { font-size: 2.4rem; line-height: 1; }
.pdf-open-mobile__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--red-ink);
}

.result__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- Footer ---------- */
.footnote {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 20px 34px;
}
.pill-free {
  display: inline-block;
  background: linear-gradient(120deg, var(--blue-1), var(--blue-2));
  color: #fff;
  padding: 3px 14px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(79,107,255,0.6);
}

/* ---------- Editor ---------- */
.editor {
  width: 100%;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  text-align: left;
}
.editor__stage { flex: 1 1 260px; min-width: 0; }
.editor__canvas-wrap { max-width: none; }
.editor__canvas-wrap #bgCanvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: default;
  touch-action: none;
}
.editor__panel {
  flex: 1 1 260px;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 12px 30px -18px rgba(45,50,130,0.25);
}

.etabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.etab {
  appearance: none;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.76rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.etab:hover { border-color: var(--blue-1); color: var(--blue-ink); }
.etab.is-active {
  background: linear-gradient(120deg, var(--blue-1), var(--blue-2));
  border-color: transparent;
  color: #fff;
}

.epanel { display: none; flex-direction: column; gap: 12px; }
.epanel.is-active { display: flex; }

.epanel__label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.epanel__badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--blue-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
}
.epanel__hint { margin: 0; font-size: 0.76rem; color: var(--ink-soft); line-height: 1.4; }

.efield { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--ink); }
.efield__label { font-weight: 600; display: flex; justify-content: space-between; }
.efield input[type="range"] { width: 100%; accent-color: var(--blue-1); }
.efield input[type="text"] { width: 100%; }

.echeck {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.echeck input { accent-color: var(--blue-1); width: 16px; height: 16px; }

.eselect, .esearch__input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink);
  background: #fff;
}
.eselect:focus, .esearch__input:focus { outline: none; border-color: var(--blue-1); }

.ecolorfield {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}
.ecolorfield input[type="color"] {
  width: 36px; height: 28px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  background: none;
}

.eswatches { display: flex; flex-wrap: wrap; gap: 8px; }
.eswatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  cursor: pointer;
  padding: 0;
  transition: transform .12s, border-color .12s;
}
.eswatch:hover { transform: scale(1.08); }
.eswatch.is-active { border-color: var(--blue-1); box-shadow: 0 0 0 2px rgba(79,107,255,0.25); }
.eswatch--transparent {
  background-image:
    linear-gradient(45deg, #EDEEF7 25%, transparent 25%),
    linear-gradient(-45deg, #EDEEF7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #EDEEF7 75%),
    linear-gradient(-45deg, transparent 75%, #EDEEF7 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
  background-color: #fff;
}

.edivider { height: 1px; background: var(--line); margin: 2px 0; }

.esearch { display: flex; gap: 8px; }
.esearch__input { flex: 1; }

.ebg-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ebg-result-thumb {
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  aspect-ratio: 1;
}
.ebg-result-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ebg-result-thumb:hover { border-color: var(--blue-2); }
.ebg-result-thumb.is-active { border-color: var(--blue-1); box-shadow: 0 0 0 2px rgba(79,107,255,0.25); }

.ebrush-modes { display: flex; gap: 6px; }
.ebrush-btn {
  appearance: none;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.76rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.ebrush-btn:hover { border-color: var(--blue-1); color: var(--blue-ink); }
.ebrush-btn.is-active {
  background: linear-gradient(120deg, var(--blue-1), var(--blue-2));
  border-color: transparent;
  color: #fff;
}

.editor__quick-download {
  margin-top: 10px;
  width: 100%;
}
.ebrush-history-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ebrush-history-row .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.edespill-row { display: flex; align-items: center; gap: 10px; }
.edespill-swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
}

.btn--small { padding: 9px 18px; font-size: 0.8rem; }

@media (max-width: 640px) {
  .editor { flex-direction: column; }
}

/* ---------- Focus mode (one tool full-screen while in use) ---------- */
.station__back {
  display: none;
  appearance: none;
  border: none;
  background: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  margin: 0 0 10px;
  flex-shrink: 0;
}
.station__back:hover { color: var(--ink); }

body.focus-bg,
body.focus-pdf {
  overflow: hidden;
  height: 100vh;
  height: 100dvh; /* accounts for mobile browser toolbars showing/hiding, unlike plain vh */
}
body.focus-bg .hero,
body.focus-pdf .hero,
body.focus-bg .topbar,
body.focus-pdf .topbar,
body.focus-bg .footnote,
body.focus-pdf .footnote,
body.focus-bg .site-footer,
body.focus-pdf .site-footer,
body.focus-bg .blob,
body.focus-pdf .blob {
  display: none;
}
body.focus-bg .station--red,
body.focus-pdf .station--blue {
  display: none;
}
body.focus-bg main,
body.focus-pdf main { padding: 0; }
body.focus-bg .bench,
body.focus-pdf .bench {
  max-width: none;
  padding: 0;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: block;
}

/* The active station becomes a fixed, full-viewport panel with its own
   internal layout: a slim header row, then content that fills the rest
   of the screen — so nothing needs page-level scrolling. */
body.focus-bg #bg-tool,
body.focus-pdf #pdf-tool {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-sizing: border-box;
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.focus-bg #bg-tool .station__badge,
body.focus-bg #bg-tool .station__title,
body.focus-bg #bg-tool .station__desc,
body.focus-bg #bg-tool .station__note,
body.focus-pdf #pdf-tool .station__badge,
body.focus-pdf #pdf-tool .station__title,
body.focus-pdf #pdf-tool .station__desc,
body.focus-pdf #pdf-tool .station__note {
  display: none;
}

body.focus-bg #bg-tool .dropzone,
body.focus-pdf #pdf-tool .dropzone {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  cursor: default;
}
body.focus-bg #bg-tool .dropzone:hover,
body.focus-pdf #pdf-tool .dropzone:hover {
  transform: none;
}
body.focus-bg #bg-tool .dropzone__idle,
body.focus-bg #bg-tool .dropzone__busy,
body.focus-pdf #pdf-tool .dropzone__idle,
body.focus-pdf #pdf-tool .dropzone__busy {
  flex: 1;
  min-height: 0;
  justify-content: center;
}
body.focus-bg #bg-tool .dropzone__result,
body.focus-pdf #pdf-tool .dropzone__result {
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

/* Background-cut editor: canvas scales to fit the available height instead
   of the available width, and only the controls panel scrolls if it's
   taller than the screen. */
body.focus-bg .editor {
  flex: 1;
  min-height: 0;
  width: 100%;
  align-items: stretch;
}
body.focus-bg .editor__stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
body.focus-bg .editor__canvas-wrap {
  flex: 1;
  min-height: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
body.focus-bg .editor__canvas-wrap #bgCanvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}
body.focus-bg .editor__quick-download { flex-shrink: 0; }
body.focus-bg .editor__panel {
  max-height: 100%;
  overflow-y: auto;
}

/* Word-to-PDF: the PDF preview grows to fill the height instead of a fixed 520px */
body.focus-pdf #pdf-tool .dropzone__result {
  display: flex;
  flex-direction: column;
}
body.focus-pdf #pdf-tool .docpreview {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}
body.focus-pdf #pdf-tool .result__actions { flex-shrink: 0; }

body.focus-bg #bgBackBtn,
body.focus-pdf #pdfBackBtn {
  display: inline-block;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .bench { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .topbar__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(160deg, var(--nav-1), var(--nav-2) 60%, var(--nav-3));
    padding: 6px 24px 14px;
    box-shadow: 0 16px 30px -8px rgba(0,0,0,0.35);
  }
  .topbar__nav.is-open { display: flex; }
  .topbar__nav a { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.16); }
  .topbar__nav a:last-child { border-bottom: none; }
}
@media (max-width: 640px) {
  body.focus-bg .editor { flex-direction: column; overflow-y: auto; }
  body.focus-bg .editor__stage { flex: 0 0 auto; height: 46vh; }
  body.focus-bg .editor__panel { flex: 1; max-height: none; }
}

/* ---------- Site footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  background: linear-gradient(120deg, var(--nav-1), var(--nav-2) 55%, var(--nav-3));
  color: rgba(255,255,255,0.9);
  padding: 34px 0 20px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.footer__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 10px; }
.footer__tagline { font-size: 0.85rem; color: rgba(255,255,255,0.75); line-height: 1.5; max-width: 280px; margin: 0; }
.footer__col h4 { font-family: var(--font-display); font-size: 0.88rem; margin: 0 0 12px; color: #fff; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer__col a { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 0.85rem; transition: color .15s; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}
.footer__bottom b { color: #fff; font-weight: 600; }
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ---------- Static content pages (legal, contact) ---------- */
.content-page {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}
.content-page__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--blue-2);
  font-weight: 500;
  margin: 0 0 8px;
}
.content-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
}
.content-page__updated { color: var(--ink-soft); font-size: 0.85rem; margin: 0 0 28px; }
.content-page h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--blue-ink);
  margin: 28px 0 8px;
}
.content-page p, .content-page li { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.7; }
.content-page ul, .content-page ol { padding-left: 22px; margin: 8px 0 16px; }
.content-page a.inline-link { color: var(--blue-1); font-weight: 600; text-decoration: underline; }
.content-page strong { color: var(--ink); }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.contact-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  transition: border-color .15s, transform .15s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.contact-card:hover { border-color: var(--blue-1); transform: translateY(-3px); }
.contact-card__icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  color: #fff;
  margin-bottom: 4px;
}
.contact-card__label { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.contact-card__value { font-family: var(--font-mono); font-size: 0.88rem; color: var(--ink-soft); }
.contact-card--whatsapp .contact-card__icon { background: linear-gradient(135deg, #25D366, #128C7E); }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- User guide hub + articles ---------- */
.guide-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}
.guide-card {
  background: #fff;
  border: 2.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, var(--blue-1), var(--blue-2), #A78BFA, var(--blue-1)) border-box;
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 20px 45px -18px rgba(45,50,130,0.18);
  transition: transform .15s;
}
.guide-card:hover { transform: translateY(-4px); }
.guide-card--red {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, var(--red-1), var(--red-2), #FFC168, var(--red-1)) border-box;
}
.guide-card__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  color: #fff;
  margin-bottom: 4px;
}
.guide-card--red .guide-card__icon { background: linear-gradient(135deg, var(--red-1), var(--red-2)); }
.guide-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.guide-card__desc { color: var(--ink-soft); font-size: 0.86rem; line-height: 1.5; }
@media (max-width: 640px) { .guide-cards { grid-template-columns: 1fr; } }

.guide-article__hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.guide-article__hero .station__badge { margin-bottom: 0; flex-shrink: 0; }
.guide-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 14px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.guide-step__num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.station--red ~ * .guide-step__num,
.guide-step--red .guide-step__num { background: linear-gradient(135deg, var(--red-1), var(--red-2)); }
.guide-step__body h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.guide-step__body p { margin: 0; }
.guide-step__shot {
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  width: 100%;
  display: block;
}
.guide-faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 20px; margin: 10px 0; }
.guide-faq h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 0.98rem; color: var(--blue-ink); }
.guide-faq p { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--blue-1); text-decoration: none; margin-bottom: 18px; }
.back-link:hover { text-decoration: underline; }

