/* ==========================================================================
   formatting-visual-builder · styles.css?v=1
   Vanilla CSS, mobile-first, dark-theme 1000HW.
   ========================================================================== */

:root {
  --bg: #050505;
  --bg-soft: #0d0d0f;
  --bg-card: #111114;
  --bg-card-2: #18181c;
  --bg-card-hover: #1f1f25;
  --border: #1f1f25;
  --border-strong: #2a2a33;
  --text: #f3f3f5;
  --text-soft: #b7b7bf;
  --text-dim: #7d7d85;
  --acid: #c8ff00;
  --acid-dim: #a8d800;
  --acid-soft: #2a3305;
  --priv: #7be495;
  --priv-soft: rgba(123, 228, 149, 0.10);
  --warn: #ffb454;
  --warn-soft: #2a1d05;
  --err: #ff7066;
  --err-soft: #2a0d0d;
  --ok: #65d185;
  --info: #6ec1ff;
  --cf-fill: rgba(200, 255, 0, 0.18);
  --cf-bar: #638EC6;
  --cf-bar-bg: rgba(99, 142, 198, 0.10);
  --cf-icon-good: #65d185;
  --cf-icon-mid: #ffb454;
  --cf-icon-bad: #ff7066;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.30);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --tr: 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ----------------------------------------------------------------------
   Skip link (WCAG)
   ---------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -1000px;
  top: 0;
  background: var(--acid);
  color: #000;
  padding: 12px 20px;
  z-index: 1000;
  font-weight: 700;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ----------------------------------------------------------------------
   Layout
   ---------------------------------------------------------------------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------------------
   NAV
   ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 5, 5, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 18px;
}
.nav-back {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: var(--tr);
}
.nav-back:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-card); }
.nav-back:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.nav-controls { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--tr);
}
.nav-btn:hover { background: var(--bg-card-hover); }
.nav-btn:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.nav-sep { color: var(--text-dim); font-size: 12px; }
.nav-pub { color: var(--text-dim); font-size: 13px; font-weight: 600; }

/* ----------------------------------------------------------------------
   HERO
   ---------------------------------------------------------------------- */
.hero {
  padding: 70px 0 36px;
  background: radial-gradient(900px 460px at 80% 0%, rgba(200, 255, 0, 0.10), transparent 70%),
              radial-gradient(700px 380px at 0% 60%, rgba(110, 193, 255, 0.06), transparent 70%);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 720px) { .hero { padding: 46px 0 26px; } }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-soft);
}
.tag-acid {
  background: var(--acid-soft);
  color: var(--acid);
  border-color: rgba(200, 255, 0, 0.30);
}
.tag-priv {
  background: var(--priv-soft);
  color: var(--priv);
  border-color: rgba(123, 228, 149, 0.30);
}

.hero h1 {
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--text);
  max-width: 920px;
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--acid), var(--priv));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  font-size: clamp(15px, 1.6vw, 17.5px);
  color: var(--text-soft);
  max-width: 820px;
  margin: 0 0 22px;
  line-height: 1.65;
}
.hero-lede strong { color: var(--text); font-weight: 600; }
.hero-disclaimer {
  font-size: 14px;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  max-width: 920px;
  margin: 0 0 24px;
  line-height: 1.6;
}
.hero-disclaimer strong { color: var(--warn); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ----------------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--text-dim);
}
.btn:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--acid);
  border-color: var(--acid);
  color: #050505;
  font-weight: 700;
}
.btn-primary:hover:not(:disabled) {
  background: var(--acid-dim);
  border-color: var(--acid-dim);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-soft);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-xl { padding: 16px 28px; font-size: 16px; }

/* ----------------------------------------------------------------------
   SECTIONS
   ---------------------------------------------------------------------- */
section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

.section-h {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.section-hint {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 22px;
}

/* ----------------------------------------------------------------------
   DROPZONE
   ---------------------------------------------------------------------- */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
  background: var(--bg-card);
  transition: var(--tr);
  cursor: pointer;
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--acid);
  background: var(--bg-card-2);
  outline: none;
}
.dropzone.is-dragover {
  border-color: var(--acid);
  background: var(--acid-soft);
  transform: scale(1.005);
}
.dropzone-icon { font-size: 44px; margin-bottom: 12px; }
.dropzone-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.dropzone-hint {
  font-size: 13px;
  color: var(--text-dim);
}

.files-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------------
   FILE INFO / ENCODING
   ---------------------------------------------------------------------- */
.file-info {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.file-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.file-info-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.file-info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ----------------------------------------------------------------------
   CALLOUTS (warnings/errors)
   ---------------------------------------------------------------------- */
.callout {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid;
}
.callout-warn {
  background: var(--warn-soft);
  border-color: rgba(255, 180, 84, 0.40);
  color: var(--warn);
}
.callout-err {
  background: var(--err-soft);
  border-color: rgba(255, 112, 102, 0.40);
  color: var(--err);
}
.callout-ok {
  background: var(--priv-soft);
  border-color: rgba(123, 228, 149, 0.40);
  color: var(--priv);
}

/* ----------------------------------------------------------------------
   RULES PANEL
   ---------------------------------------------------------------------- */
.rules-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
}
.rule-card.is-disabled { opacity: 0.5; }
.rule-card.is-dragging { box-shadow: var(--shadow); }
.rule-card.sortable-ghost { background: var(--acid-soft); border-color: var(--acid); }

.rule-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rule-handle {
  cursor: grab;
  color: var(--text-dim);
  padding: 4px 6px;
  font-size: 16px;
  user-select: none;
  background: none;
  border: none;
  border-radius: 4px;
}
.rule-handle:hover { color: var(--text); background: var(--bg-card-hover); }
.rule-handle:active { cursor: grabbing; }
.rule-handle:focus-visible { outline: 2px solid var(--acid); outline-offset: 1px; }

.rule-priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.rule-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  min-width: 200px;
}

.rule-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.rule-icon-btn {
  background: var(--bg-card-2);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
}
.rule-icon-btn:hover { background: var(--bg-card-hover); color: var(--text); }
.rule-icon-btn:focus-visible { outline: 2px solid var(--acid); outline-offset: 1px; }
.rule-icon-btn.is-danger:hover { background: var(--err-soft); color: var(--err); border-color: var(--err); }

.rule-body {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.rule-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rule-field label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.rule-field input[type="text"],
.rule-field input[type="number"],
.rule-field select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: var(--tr);
}
.rule-field input[type="text"]:focus,
.rule-field input[type="number"]:focus,
.rule-field select:focus {
  outline: none;
  border-color: var(--acid);
  box-shadow: 0 0 0 2px var(--acid-soft);
}
.rule-field input[type="color"] {
  width: 100%;
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  padding: 4px;
  cursor: pointer;
}

.rule-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}
.toggle-switch input { width: 16px; height: 16px; cursor: pointer; }

.rule-stats {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.rule-stats-pill {
  background: var(--bg-card-2);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

/* ----------------------------------------------------------------------
   PRESET CHIPS
   ---------------------------------------------------------------------- */
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.preset-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--tr);
}
.preset-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--text-dim);
}
.preset-chip:focus-visible { outline: 2px solid var(--acid); outline-offset: 1px; }

/* ----------------------------------------------------------------------
   PREVIEW TABLE
   ---------------------------------------------------------------------- */
.preview-wrap {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.preview-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
}
.preview-table {
  overflow-x: auto;
  max-height: 70vh;
  overflow-y: auto;
}
.preview-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--font-mono);
}
.preview-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card-2);
}
.preview-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-strong);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.preview-table th.col-num { color: var(--text-dim); font-weight: 500; min-width: 50px; }
.preview-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: relative;
  transition: background 200ms;
}
.preview-table td.col-num {
  color: var(--text-dim);
  font-size: 12px;
  background: var(--bg-soft);
}
.preview-table tr:hover td { background: var(--bg-card-hover); }
.preview-table tr:hover td.col-num { background: var(--bg-card-2); }

.cell-affected {
  position: relative;
}
.cell-affected .cell-rule-list {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--text);
  white-space: nowrap;
  z-index: 10;
  display: none;
  margin-bottom: 4px;
  box-shadow: var(--shadow-sm);
}
.cell-affected:hover .cell-rule-list { display: block; }

.cell-bar {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 14px;
  background: var(--cf-bar-bg);
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}
.cell-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: var(--cf-bar);
  transition: width 200ms;
}
.cell-icon {
  display: inline-block;
  margin-right: 6px;
  font-weight: 700;
  font-size: 14px;
}
.cell-icon-good { color: var(--cf-icon-good); }
.cell-icon-mid { color: var(--cf-icon-mid); }
.cell-icon-bad { color: var(--cf-icon-bad); }

.preview-range-info {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ----------------------------------------------------------------------
   STATS / RESULT
   ---------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.stat-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--acid);
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* ----------------------------------------------------------------------
   PROGRESS
   ---------------------------------------------------------------------- */
.progress {
  margin-top: 18px;
  position: relative;
  height: 26px;
  background: var(--bg-card);
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--acid), var(--priv));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 250ms;
}
.progress-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
}

/* ----------------------------------------------------------------------
   CONTENT SECTIONS (FAQ, HOW, etc)
   ---------------------------------------------------------------------- */
.content-section p, .content-section li {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.7;
  max-width: 820px;
}
.content-section strong { color: var(--text); font-weight: 600; }
.content-section code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

.how-steps {
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}
.how-steps li {
  counter-increment: step;
  padding: 14px 14px 14px 56px;
  position: relative;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.how-steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--acid);
  color: #050505;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.cases-list, .licenses-list, .limits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.cases-list li, .licenses-list li, .limits-list li {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  color: var(--text);
  font-size: 15px;
}
.faq-item summary:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.faq-item p { margin: 8px 0 4px; font-size: 14px; }

/* ----------------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------------- */
.site-footer {
  padding: 32px 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
}
.footer-row a {
  color: var(--text-soft);
  text-decoration: none;
}
.footer-row a:hover { color: var(--text); }
.footer-row a:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.footer-pill {
  background: var(--priv-soft);
  color: var(--priv);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(123, 228, 149, 0.30);
}
.footer-disclaimer {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 820px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-links a {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: var(--tr);
}
.footer-links a:hover { color: var(--text-soft); border-bottom-color: var(--text-dim); }

/* ----------------------------------------------------------------------
   OFFLINE BANNER
   ---------------------------------------------------------------------- */
.banner-offline {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--priv-soft);
  border-bottom: 1px solid rgba(123, 228, 149, 0.40);
  color: var(--priv);
  font-size: 13px;
  font-weight: 500;
}
.banner-icon { font-size: 16px; }
.banner-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--priv);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
}
.banner-close:hover { background: rgba(123, 228, 149, 0.10); }
.banner-close:focus-visible { outline: 2px solid var(--priv); outline-offset: 2px; }

/* ----------------------------------------------------------------------
   MODAL (privacy)
   ---------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px 26px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow);
}
.modal-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}
.modal-desc {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ----------------------------------------------------------------------
   TOAST (donation)
   ---------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  max-width: 360px;
  font-size: 13px;
}
.toast-body { display: flex; flex-direction: column; gap: 2px; }
.toast-body strong { font-size: 14px; }
.toast-body span { color: var(--text-dim); font-size: 12px; }
.donation-toast-btn {
  background: var(--acid);
  color: #050505;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
}
.donation-toast-btn:hover { background: var(--acid-dim); }
.donation-toast-btn:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.toast-close:hover { color: var(--text); }
.toast-close:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }

@media (max-width: 720px) {
  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

/* ----------------------------------------------------------------------
   RESPONSIVE TWEAKS
   ---------------------------------------------------------------------- */
@media (max-width: 720px) {
  .hero h1 { font-size: 28px; }
  .hero-lede { font-size: 15px; }
  .dropzone { padding: 30px 18px; }
  .section-h { font-size: 20px; }
  .rule-body { grid-template-columns: 1fr; }
  .rule-head { gap: 6px; }
  .rule-title { min-width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}