/* ============================================================
   TempMail MMO — Legal pages shared stylesheet
   Used by: privacy.html, terms.html, contact.html
   ============================================================ */

:root { color-scheme: light dark; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #f6f8fc;
  --bg-grad-1: #f6f8fc;
  --bg-grad-2: #eef2ff;
  --bg-pattern: radial-gradient(circle at 1px 1px, rgba(37,99,235,0.06) 1px, transparent 0);
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #f8fafc;
  --text: #0f172a;
  --text-soft: #475569;
  --text-mute: #64748b;
  --border: rgba(15,23,42,0.08);
  --border-strong: rgba(15,23,42,0.14);
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-soft: #dbeafe;
  --brand-grad: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.06), 0 2px 4px -2px rgba(15,23,42,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15,23,42,0.08), 0 8px 10px -6px rgba(15,23,42,0.05);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --maxw: 1100px;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --bg-grad-1: #0b1220;
  --bg-grad-2: #0f172a;
  --bg-pattern: radial-gradient(circle at 1px 1px, rgba(96,165,250,0.08) 1px, transparent 0);
  --surface: #111c30;
  --surface-2: #1e293b;
  --surface-3: #15213a;
  --text: #e2e8f0;
  --text-soft: #94a3b8;
  --text-mute: #64748b;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --brand: #60a5fa;
  --brand-2: #93c5fd;
  --brand-soft: rgba(96,165,250,0.14);
  --brand-grad: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  --success: #4ade80;
  --success-soft: rgba(74,222,128,0.14);
  --warn: #fbbf24;
  --warn-soft: rgba(251,191,36,0.14);
  --danger: #f87171;
  --danger-soft: rgba(248,113,113,0.14);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.5);
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  background-image: var(--bg-pattern);
  background-size: 24px 24px;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.875em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ============= TOPBAR ============= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand-link {
  display: flex; align-items: center; gap: 10px;
  color: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none;
}
.brand-link:hover { text-decoration: none; }
.brand-link img { width: 34px; height: 34px; border-radius: 9px; }
.brand-link .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-link .brand-text small { font-size: 0.7rem; color: var(--text-soft); font-weight: 500; }

.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; color: inherit; cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(0.95); }

/* ============= HERO ============= */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%);
  padding: 56px 24px 40px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--bg-pattern);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
[data-theme="dark"] .hero::after {
  background: radial-gradient(circle, rgba(96,165,250,0.18) 0%, transparent 70%);
}
.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  z-index: 1;
}
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--text-soft);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-soft); }
.breadcrumb i { font-size: 0.7rem; opacity: 0.6; }

.doc-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
}
.doc-eyebrow i { font-size: 0.85em; }

.doc-title {
  font-size: 2.5rem; line-height: 1.1;
  margin: 18px 0 12px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}
.doc-subtitle {
  font-size: 1.1rem;
  color: var(--text-soft);
  margin: 0 0 24px;
  max-width: 640px;
}
.doc-meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin-top: 18px;
  font-size: 0.875rem;
  color: var(--text-soft);
}
.doc-meta-row .meta-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.doc-meta-row .meta-item i { color: var(--brand); font-size: 0.85em; }
.doc-meta-row .meta-item strong { color: var(--text); font-weight: 600; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--success-soft); color: var(--success);
  font-size: 0.75rem; font-weight: 600;
}

/* ============= LAYOUT ============= */
main {
  flex: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 60px;
  width: 100%;
}
.layout {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}

/* ============= TOC (deprecated — kept for legacy, hidden) ============= */
.toc-wrap, .toc, .toc-mobile-toggle { display: none !important; }

/* Legacy rules intentionally removed; layout is single-column now. */
.toc-wrap {
  position: sticky;
  top: 86px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
}
.toc-wrap h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin: 0 0 12px;
  font-weight: 700;
}
.toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 0.875rem;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1.35;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  color: var(--text-mute);
  min-width: 22px;
  font-weight: 600;
}
.toc a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.toc a.is-active {
  color: var(--brand);
  background: var(--brand-soft);
  border-left-color: var(--brand);
  font-weight: 600;
}
.toc a.is-active::before { color: var(--brand); }

/* mobile collapsed toc */
.toc-mobile-toggle { display: none; }
@media (max-width: 859px) {
  .toc-wrap { position: static; }
  .toc-wrap h2 { display: none; }
  .toc-wrap-collapsed .toc { display: none; }
}

/* ============= SECTIONS / DOC CARDS ============= */
.doc-body { min-width: 0; }
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  scroll-margin-top: 80px;
}
.section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.section-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.section-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--brand-grad);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 28%, transparent);
}
.section h2 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.section h3 {
  font-size: 1rem;
  margin: 18px 0 8px;
  font-weight: 700;
  color: var(--text);
}
.section p { margin: 10px 0; color: var(--text); }
.section ul, .section ol { padding-left: 22px; margin: 10px 0; }
.section li { margin: 6px 0; color: var(--text); }
.section li::marker { color: var(--brand); }
.section strong { color: var(--text); font-weight: 600; }
.section hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

/* highlight inline key term */
.kbd-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ============= CALLOUT BOXES ============= */
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0;
  border: 1px solid;
}
.callout-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.callout-body { flex: 1; min-width: 0; }
.callout-body p { margin: 0; }
.callout-body p + p { margin-top: 8px; }
.callout-title {
  font-weight: 700;
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.callout-info {
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 22%, transparent);
  color: var(--text);
}
.callout-info .callout-icon { background: var(--brand); color: #fff; }
.callout-info .callout-title { color: var(--brand); }

.callout-warn {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 24%, transparent);
  color: var(--text);
}
.callout-warn .callout-icon { background: var(--warn); color: #fff; }
.callout-warn .callout-title { color: var(--warn); }

.callout-danger {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 24%, transparent);
  color: var(--text);
}
.callout-danger .callout-icon { background: var(--danger); color: #fff; }
.callout-danger .callout-title { color: var(--danger); }

.callout-success {
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 24%, transparent);
  color: var(--text);
}
.callout-success .callout-icon { background: var(--success); color: #fff; }
.callout-success .callout-title { color: var(--success); }

/* ============= CONTACT PAGE SPECIFIC ============= */
.lead-text {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin: 0 0 28px;
  max-width: 640px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 36px;
}
@media (min-width: 600px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity .2s;
  z-index: 0;
}
.contact-card > * { position: relative; z-index: 1; }
.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.contact-card:hover .contact-arrow { transform: translateX(4px); color: var(--brand); }

.contact-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  flex-shrink: 0;
}
.contact-icon.email { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.contact-icon.telegram { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.contact-icon.facebook { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.contact-icon.feedback { background: linear-gradient(135deg, #f59e0b, #ea580c); }

.contact-body { flex: 1; min-width: 0; }
.contact-title { font-weight: 700; margin: 0 0 2px; font-size: 1rem; }
.contact-sub { color: var(--text-soft); font-size: 0.85rem; margin: 0; word-break: break-word; }
.contact-arrow { color: var(--text-mute); font-size: 0.85rem; transition: transform .2s, color .2s; }

.sla-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0 0;
}
@media (min-width: 600px) { .sla-grid { grid-template-columns: 1fr 1fr; } }

.sla-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sla-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1rem;
  flex-shrink: 0;
}
.sla-label { font-size: 0.78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.sla-value { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-top: 2px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 32px 0 0;
}
@media (min-width: 600px) { .info-grid { grid-template-columns: 1fr 1fr; } }

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: border-color .2s, transform .2s;
}
.info-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.info-card h2 {
  font-size: 1.05rem; margin: 0 0 12px;
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
}
.info-card h2 i {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.9rem;
}
.info-card ul { margin: 0; padding-left: 20px; }
.info-card li { margin: 6px 0; color: var(--text-soft); font-size: 0.92rem; }
.info-card li strong { color: var(--text); }

/* ============= DEFINITION TABLE (for terms) ============= */
.def-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  background: var(--surface-3);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.def-table th, .def-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.def-table th {
  background: var(--surface-2);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.def-table tr:last-child td { border-bottom: 0; }
.def-table td:first-child { font-weight: 600; color: var(--text); width: 32%; }

/* ============= END-OF-DOC CTA ============= */
.doc-end {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 28px 24px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 24px;
}
.doc-end h3 { margin: 0 0 6px; font-size: 1.05rem; }
.doc-end p { margin: 0 0 16px; color: var(--text-soft); font-size: 0.92rem; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 26%, transparent);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 32%, transparent); text-decoration: none; }
.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.btn-outline:hover { background: var(--surface-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ============= FOOTER ============= */
.site-footer {
  margin-top: 56px;
  position: relative;
  background:
    radial-gradient(900px 320px at 12% -10%, var(--brand-soft) 0%, transparent 60%),
    radial-gradient(700px 280px at 100% 110%, var(--brand-soft) 0%, transparent 65%),
    var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .5;
}
.site-footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 760px) {
  .site-footer-inner { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px; align-items: start; }
}

/* Brand block (col 1) */
.footer-brand-block {
  position: relative;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.footer-brand:hover { text-decoration: none; }
.footer-brand img {
  width: 40px; height: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 14px -2px rgba(37,99,235,.35);
}
.footer-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.footer-brand-name { font-weight: 800; font-size: 1.02rem; color: var(--text); letter-spacing: -0.01em; }
.footer-brand-tag { font-size: 0.74rem; color: var(--text-mute); font-weight: 500; margin-top: 2px; }
.footer-tagline { color: var(--text-soft); font-size: 0.88rem; margin: 0; line-height: 1.6; }
.footer-tagline strong { color: var(--text); font-weight: 600; }

.footer-socials { display: flex; gap: 8px; margin-top: 2px; }
.footer-socials a {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform .15s, color .15s, border-color .15s, box-shadow .15s;
}
.footer-socials a:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px -4px rgba(37,99,235,.3);
  text-decoration: none;
}

/* Cols (Sản phẩm / Pháp lý / Hỗ trợ) */
.footer-col { min-width: 0; }
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 0 0 14px;
  font-weight: 700;
  position: relative;
  padding-bottom: 8px;
}
.footer-col h4::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 24px; height: 2px;
  background: var(--brand-grad);
  border-radius: 2px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 8px 0; }
.footer-col a {
  color: var(--text-soft);
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 0;
  transition: color .15s, transform .15s;
}
.footer-col a i { color: var(--text-mute); font-size: 0.7rem; transition: color .15s, transform .15s; }
.footer-col a:hover { color: var(--brand); text-decoration: none; transform: translateX(2px); }
.footer-col a:hover i { color: var(--brand); transform: translateX(2px); }

/* Bottom */
.footer-bottom {
  max-width: var(--maxw);
  margin: 36px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; align-items: center;
  font-size: 0.8rem;
  color: var(--text-mute);
  text-align: center;
}
.footer-bottom .legal-links { display: none; }

/* ============= BACK TO TOP ============= */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-grad);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 40;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover { transform: translateY(-3px); }

/* ============= RESPONSIVE ============= */
@media (max-width: 640px) {
  .hero { padding: 36px 18px 28px; }
  main { padding: 24px 16px 40px; }
  .doc-title { font-size: 1.85rem; }
  .doc-subtitle { font-size: 1rem; }
  .section { padding: 22px 20px 20px; }
  .section-head { gap: 10px; margin-bottom: 14px; }
  .section-num { width: 36px; height: 36px; font-size: 0.85rem; }
  .section h2 { font-size: 1.1rem; }
  .topbar-inner { padding: 12px 16px; }
  .brand-link .brand-text small { display: none; }
  .def-table { font-size: 0.85rem; }
  .def-table th, .def-table td { padding: 10px 12px; }
  .def-table td:first-child { width: auto; }
  .back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}
