/* ==========================================================================
   Empire Digisec — platform styles
   Brand surfaces: gold + silver + ivory (matches the logo).
   Product surfaces: deep navy/black, electric cyan, green CTAs.
   ========================================================================== */

/* ---------- Tokens: dark (default) ---------- */
:root {
  --bg: #0E1118;
  --bg-2: #161A23;
  --bg-3: #1E2431;
  --line: #2A2F3B;
  --text: #ECEFF5;
  --muted: #A4ABBB;
  --gold: #D4B060;
  --gold-2: #B8923F;
  --silver: #9A9DA6;
  --cyan: #22D3EE;
  --blue: #3B82F6;
  --cta: #22C55E;
  --cta-ink: #04140A;
  --danger: #F87171;
  --ok: #4ADE80;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ---------- Tokens: light (system preference, or user choice) ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #FBFAF6;
    --bg-2: #F3F0E7;
    --bg-3: #FFFFFF;
    --line: #DDD7C6;
    --text: #1C1B18;
    --muted: #5E5A50;
    --gold: #86661A;
    --gold-2: #B8923F;
    --silver: #6B6E76;
    --cyan: #0E7490;
    --blue: #1D4ED8;
    --cta: #15803D;
    --cta-ink: #FFFFFF;
    --danger: #B91C1C;
    --ok: #15803D;
    --shadow: 0 16px 40px rgba(60, 50, 20, 0.12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #FBFAF6;
  --bg-2: #F3F0E7;
  --bg-3: #FFFFFF;
  --line: #DDD7C6;
  --text: #1C1B18;
  --muted: #5E5A50;
  --gold: #86661A;
  --gold-2: #B8923F;
  --silver: #6B6E76;
  --cyan: #0E7490;
  --blue: #1D4ED8;
  --cta: #15803D;
  --cta-ink: #FFFFFF;
  --danger: #B91C1C;
  --ok: #15803D;
  --shadow: 0 16px 40px rgba(60, 50, 20, 0.12);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font: 600 clamp(2rem, 5vw, 3.3rem) / 1.12 var(--font-display); letter-spacing: 0.02em; }
h2 { font: 600 clamp(1.5rem, 3.2vw, 2.1rem) / 1.2 var(--font-display); letter-spacing: 0.03em; }
h3 { font: 600 1.15rem / 1.3 var(--font-body); }
h4 { font: 600 0.85rem / 1.3 var(--font-body); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 92px 0; } }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: 36px; max-width: 760px; }
.eyebrow { font: 600 12px / 1.4 var(--font-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.lede { color: var(--muted); font-size: 1.075rem; max-width: 66ch; }
.muted { color: var(--muted); }
.gold-rule { height: 3px; border: 0; margin: 0; background: linear-gradient(90deg, var(--gold-2), var(--silver) 60%, transparent); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--cta); color: var(--cta-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { left: 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { position: relative; display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 6px 6px;
}
.brand img { width: 50px; height: 50px; }
.brand-word { font: 600 0.95rem / 1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: #86661A; white-space: nowrap; }
.brand-lockup { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: inline-block; }
.brand-lockup img { width: 210px; height: auto; }
@media (max-width: 420px) { .brand-word { display: none; } }
.nav-links { display: none; list-style: none; padding: 0; margin: 0 0 0 auto; gap: 2px; }
.nav-links a {
  display: block; color: var(--text); text-decoration: none; padding: 8px 9px; border-radius: 8px; font-size: 0.95rem; white-space: nowrap;
}
.nav-links a:hover { color: var(--gold); background: var(--bg-3); }
.nav-links a[aria-current="page"] { color: var(--gold); background: var(--bg-3); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
body.nav-open .nav-links {
  display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 12px 16px 16px; margin: 0;
  box-shadow: var(--shadow); z-index: 60;
}
body.nav-open .nav-links a { padding: 12px 8px; }
@media (max-width: 639px) { .nav-actions .btn-cta { display: none; } }
@media (min-width: 1180px) {
  .nav-links { display: flex; margin-left: auto; }
  .nav-actions { margin-left: 16px; }
  .nav .nav-toggle { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.95rem / 1 var(--font-body); text-decoration: none; cursor: pointer; text-align: center; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-cta { background: var(--cta); color: var(--cta-ink); }
.btn-cta:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold-2); color: var(--gold); }
.btn-gold { background: transparent; color: var(--gold); border-color: var(--gold-2); }
.btn-gold:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 72px;
  background:
    radial-gradient(900px 420px at 88% -8%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 62%),
    radial-gradient(800px 380px at -6% 0%, color-mix(in srgb, var(--gold) 13%, transparent), transparent 60%);
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; } }
.hero .lede { margin-top: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }
.facts b { color: var(--text); font-weight: 600; }
.logo-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px;
  box-shadow: var(--shadow); max-width: 440px; width: 100%; margin-inline: auto;
}
.logo-card img { width: 100%; border-radius: 6px; }
.page-hero { padding: 56px 0 44px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.page-hero .lede { margin-top: 16px; }
.page-hero .actions { margin-top: 24px; }

/* ---------- Utilities (no inline styles, so the CSP stays strict) ---------- */
.mt-sm { margin-top: 14px; }
.mt-lg { margin-top: 20px; }
.mt-md { margin-top: 24px; }
.mb-lg { margin-bottom: 26px; }
.items-start { align-items: start; }
.actions.flush { margin-top: 0; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
}
.grid > * { min-width: 0; }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.card.accent { border-top: 3px solid var(--gold-2); }
.card.interactive:hover { border-color: var(--gold-2); }
.card h3 { margin: 0; }
.card p { color: var(--muted); margin: 0; font-size: 0.97rem; }
.card .card-foot { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.card-code { font: 500 0.8rem / 1 var(--font-mono); color: var(--gold); letter-spacing: 0.06em; }
.card-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
ul.check { list-style: none; padding: 0; display: grid; gap: 9px; color: var(--muted); font-size: 0.95rem; }
ul.check li { position: relative; padding-left: 22px; }
ul.check li::before {
  content: ""; position: absolute; left: 3px; top: 0.55em; width: 7px; height: 4px;
  border-left: 2px solid var(--cta); border-bottom: 2px solid var(--cta); transform: rotate(-45deg);
}
.card-link { font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; font-weight: 500; white-space: nowrap;
}
.tag.gold { color: var(--gold); border-color: var(--gold-2); }
.tag.cyan { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 50%, transparent); }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--muted); }
.path span + span::before { content: "\2192"; color: var(--silver); margin-right: 6px; }
.path span { color: var(--text); }

.admin-h { font: 600 1.25rem / 1.3 var(--font-display); letter-spacing: 0.03em; margin: 0; }
.actions select { width: auto; min-height: 40px; }

/* ---------- Long-form text ---------- */
.prose { max-width: 74ch; }
.prose h2 { font: 600 1.25rem / 1.3 var(--font-display); letter-spacing: 0.03em; color: var(--gold); margin-top: 2em; }
.prose p, .prose li { color: var(--muted); }
.prose .notice { color: var(--muted); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--gold-2); color: var(--gold); font: 600 0.85rem / 1 var(--font-mono);
}
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: 0.95rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th {
  background: var(--bg-3); font: 600 0.72rem / 1.3 var(--font-display); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); white-space: nowrap;
}
td.mono { font-family: var(--font-mono); font-size: 0.88rem; }

/* ---------- Notices ---------- */
.notice {
  background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--gold-2);
  border-radius: var(--radius-sm); padding: 14px 18px; color: var(--muted); font-size: 0.95rem; max-width: 80ch;
}
.notice strong { color: var(--text); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: 0.92rem; }
.hint { font-size: 0.82rem; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px; min-height: 46px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
select { appearance: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; margin-top: 3px; accent-color: var(--cta); flex: 0 0 auto; }
.check-item { display: flex; gap: 8px; align-items: center; font-size: 0.93rem; cursor: pointer; }
.check-item input { width: 17px; height: 17px; min-height: 0; accent-color: var(--cta); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; font-size: 0.92rem; }
.checks-grid { display: grid; gap: 10px 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.form-status { min-height: 1.6em; font-weight: 600; margin: 0; font-size: 0.95rem; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
@media (min-width: 640px) { .form-panel { padding: 36px; } }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer; font: 500 0.9rem var(--font-body);
}
.seg button:hover { color: var(--text); border-color: var(--gold-2); }
.seg button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1A1405; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: var(--bg-3); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress > span {
  display: block; height: 100%; width: var(--p, 0%);
  background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--cyan)); transition: width 0.3s ease;
}

/* ---------- Dialogs ---------- */
dialog {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 18px;
  padding: 0; width: min(680px, calc(100% - 32px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(5, 7, 12, 0.66); }
.dialog-body { padding: 26px; display: grid; gap: 18px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dialog-head h2 { font-size: 1.35rem; margin: 0; }
.dialog-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ---------- Product & cart ---------- */
.toolbar { display: grid; gap: 14px; margin-bottom: 26px; }
@media (min-width: 900px) { .toolbar { grid-template-columns: 1.6fr 1fr 0.9fr 0.9fr; align-items: end; } }
.toolbar .field input, .toolbar .field select { min-height: 44px; }
.result-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.result-line { color: var(--muted); font-size: 0.92rem; margin: 0; }
.product { display: flex; flex-direction: column; gap: 10px; }
.product h3 { margin: 0; font-size: 1.05rem; }
.product p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.product .seller { font-size: 0.82rem; color: var(--muted); }
.product .buy { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.price { font: 700 1.2rem / 1 var(--font-body); color: var(--gold); }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line h4 { margin: 0; font-size: 0.98rem; color: var(--text); text-transform: none; letter-spacing: 0; font-family: var(--font-body); }
.cart-line .muted { font-size: 0.85rem; }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); cursor: pointer; font: 600 1rem / 1 var(--font-body);
}
.qty output { min-width: 24px; text-align: center; font-weight: 600; }
.remove-btn { background: none; border: 0; color: var(--danger); cursor: pointer; font: 500 0.85rem var(--font-body); padding: 6px 0; text-decoration: underline; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; padding-top: 4px; }
.confirm {
  border: 1px solid color-mix(in srgb, var(--ok) 55%, transparent); border-radius: var(--radius-sm);
  padding: 16px 18px; background: color-mix(in srgb, var(--ok) 8%, transparent);
}

/* ---------- Learn ---------- */
.course-card .progress { margin-top: 4px; }
.course-card .status { font-size: 0.85rem; color: var(--muted); }
.module-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.module-list li { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.module-list label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.module-list input { width: 18px; height: 18px; min-height: 0; accent-color: var(--cta); }
.module-list .done { text-decoration: line-through; color: var(--muted); }
.quiz fieldset { display: grid; gap: 10px; }
.quiz .q-text { font-weight: 600; margin-bottom: 4px; }
.quiz .opts { display: grid; gap: 6px; }
.quiz .opts label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.quiz .opts label:hover { background: var(--bg-3); }
.quiz .opts input { accent-color: var(--cta); width: 16px; height: 16px; min-height: 0; }
.quiz-result { font-weight: 600; margin: 0; }
.quiz-result.ok { color: var(--ok); }
.quiz-result.err { color: var(--danger); }
.certificate {
  background: #FBFAF6; color: #1C1B18; border: 2px solid #B8923F; border-radius: 8px;
  padding: 44px 32px; text-align: center; max-width: 820px; margin: 0 auto; position: relative;
}
.certificate::before { content: ""; position: absolute; inset: 9px; border: 1px solid #D4B060; border-radius: 4px; pointer-events: none; }
.certificate .c-brand { width: 120px; height: auto; margin: 0 auto 12px; }
.certificate .c-kicker { font: 600 12px var(--font-display); letter-spacing: 0.28em; text-transform: uppercase; color: #86661A; }
.certificate .c-name { font: 600 clamp(1.5rem, 4vw, 2.3rem) var(--font-display); letter-spacing: 0.04em; margin: 14px 0 8px; color: #1C1B18; }
.certificate .c-course { font-size: 1.05rem; color: #3A372F; margin: 0; }
.certificate .c-meta { margin-top: 26px; font: 500 12px var(--font-mono); color: #5E5A50; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }

/* ---------- Chat assistant ---------- */
.chat-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; box-shadow: var(--shadow); }
.chat-panel {
  position: fixed; right: 16px; bottom: 74px; z-index: 60; width: min(370px, calc(100% - 32px));
  height: min(500px, 70vh); display: none; flex-direction: column; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.chat-panel.open { display: flex; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-head strong { font-family: var(--font-display); letter-spacing: 0.06em; color: var(--gold); font-size: 0.95rem; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: 0.92rem; line-height: 1.5; background: var(--bg-3); }
.msg.bot { align-self: flex-start; }
.msg.me { align-self: flex-end; background: color-mix(in srgb, var(--cyan) 20%, var(--bg-3)); }
.msg-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chat-quick button {
  min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer; font: 500 0.8rem var(--font-body);
}
.chat-quick button:hover { color: var(--gold); border-color: var(--gold-2); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { min-height: 42px; }
.chat-form .btn { min-height: 42px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 28px; margin-top: 0; }
.footer-grid { display: grid; gap: 34px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-grid h4 { font: 600 11px / 1.3 var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-grid p { color: var(--muted); font-size: 0.93rem; max-width: 40ch; margin-top: 16px; }
.fine { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Certificate printing ---------- */
@media print {
  body * { visibility: hidden; }
  #certificate, #certificate * { visibility: visible; }
  #certificate { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; }
  .site-header, .site-footer, .chat-fab, .chat-panel, .skip-link { display: none !important; }
}
