/* swap.geneticker.com — overlay on the shared Geneticker theme (styles.css, imported
   verbatim from Cipher). This sheet only (1) sets Swap's own accent so it reads as a
   sibling of Vault (green) / Lab (blue) / Cipher (teal) / Decipher (indigo) — Swap is
   VIOLET — and (2) adds the components unique to the anonymiser: parameter groups, the
   re-identification risk gauge, the before/after diff, and the security-stats board.
   Every value is a token so light + dark both work with no per-selector edits. */

/* ---------------------------------------------------------------- accent */
:root {
  --swap:   #7c3aed;   /* violet-600 — Swap accent */
  --swap-h: #6d28d9;   /* violet-700 */
  --swap-soft: rgba(124,58,237,.10);
  --swap-line: rgba(124,58,237,.42);
  --teal:   #7c3aed;   /* remap the family accent token so brand/eyebrow/.btn-teal inherit Swap violet */
  --teal-h: #6d28d9;
}
:root[data-theme="dark"] {
  --swap:   #a78bfa; --swap-h: #b9a3fb;
  --swap-soft: rgba(167,139,250,.16); --swap-line: rgba(167,139,250,.5);
  --teal:   #a78bfa; --teal-h: #b9a3fb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --swap: #a78bfa; --swap-h: #b9a3fb;
    --swap-soft: rgba(167,139,250,.16); --swap-line: rgba(167,139,250,.5);
    --teal: #a78bfa; --teal-h: #b9a3fb;
  }
}
.brand .logo { background: linear-gradient(135deg, var(--swap), #a855f7); }
.eyebrow { color: var(--swap); }
.btn-swap { background: var(--swap); color: #fff; }
.btn-swap:hover:not(:disabled) { background: var(--swap-h); }
.step-dot.done { background: var(--swap); }
a.link-swap { color: var(--swap); text-decoration: none; font-weight: 600; }
a.link-swap:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- hero */
.hero { text-align: center; padding: 18px 0 4px; }
.hero .kicker { justify-content: center; display: flex; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -1px; line-height: 1.08; margin-top: 14px; color: var(--ink); }
.hero h1 .g { background: linear-gradient(120deg, var(--swap), #c084fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.sub { max-width: 640px; margin: 14px auto 0; font-size: 16px; color: var(--ink2); line-height: 1.6; }
.hero .cta-row { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.trust-strip { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.trust-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; color: var(--ink2); box-shadow: var(--shadow); }
.trust-chip .material-icons-outlined { font-size: 16px; color: var(--swap); }
.trust-chip b { color: var(--ink); font-weight: 600; }

/* on-device assurance ribbon */
.netguard { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; border: 1px solid rgba(13,144,79,.35); background: rgba(13,144,79,.07); margin-top: 20px; font-size: 13px; color: var(--ink); }
.netguard .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 4px rgba(13,144,79,.18); animation: pulse-dot 2.4s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 3px rgba(13,144,79,.12); } 50% { box-shadow: 0 0 0 7px rgba(13,144,79,.04); } }
.netguard b { font-weight: 700; }
.netguard .ng-meta { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink3); white-space: nowrap; }

/* ---------------------------------------------------------------- parameter groups */
.pgroup { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); margin-top: 16px; overflow: hidden; }
.pgroup-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.pgroup-head .gh-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--swap-soft); color: var(--swap); flex: none; }
.pgroup-head .gh-ic .material-icons-outlined { font-size: 19px; }
.pgroup-head .gh-name { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); }
.pgroup-head .gh-sub { font-size: 12px; color: var(--ink2); margin-top: 1px; }
.pgroup-head .gh-toggle { margin-left: auto; }
.gh-toggle-btn { font-family: var(--display); font-size: 11.5px; font-weight: 600; color: var(--swap); background: none; border: 1px solid var(--swap-line); padding: 5px 11px; border-radius: 999px; }
.gh-toggle-btn:hover { background: var(--swap-soft); }
.pgroup-body { padding: 6px 12px 12px; }

.prow { display: flex; align-items: flex-start; gap: 13px; padding: 13px 8px; border-bottom: 1px solid var(--line2); }
.prow:last-child { border-bottom: none; }
.prow .cb { width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; cursor: pointer; transition: .12s; }
.prow.on .cb { background: var(--swap); border-color: var(--swap); color: #fff; }
.prow .cb .material-icons-outlined { font-size: 15px; }
.prow .p-main { flex: 1; min-width: 0; cursor: pointer; }
.prow .p-name { font-weight: 600; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prow .p-what { color: var(--ink2); font-size: 12.5px; margin-top: 3px; }
.prow .p-why { color: var(--ink3); font-size: 11.5px; margin-top: 4px; display: flex; align-items: flex-start; gap: 5px; }
.prow .p-why .material-icons-outlined { font-size: 13px; margin-top: 1px; flex: none; }
.prow .p-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.prow .p-count { font-family: var(--mono); font-size: 12px; color: var(--ink2); white-space: nowrap; }
.prow .p-count b { color: var(--swap); }
.prow.dimmed { opacity: .55; }

/* sub-controls inside a prow (MAF slider, strategy) */
.psub { margin: 6px 8px 2px; padding: 12px 14px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line2); }
.psub .ps-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink2); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.psub .ps-label b { font-family: var(--mono); color: var(--swap); font-size: 13px; }
.psub input[type=range] { width: 100%; margin-top: 10px; accent-color: var(--swap); }
.psub .ps-hint { font-size: 11.5px; color: var(--ink3); margin-top: 8px; line-height: 1.5; }

/* segmented mode/strategy control */
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); gap: 3px; }
.seg button { border: none; background: transparent; padding: 8px 15px; border-radius: 8px; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink2); display: inline-flex; align-items: center; gap: 7px; transition: .13s; }
.seg button .material-icons-outlined { font-size: 17px; }
.seg button.active { background: var(--panel); color: var(--swap); box-shadow: var(--shadow); }
.seg.block { display: flex; }
.seg.block button { flex: 1; justify-content: center; }

.mode-card { display: flex; gap: 16px; align-items: flex-start; margin-top: 8px; }
.mode-explain { flex: 1; font-size: 12.5px; color: var(--ink2); line-height: 1.6; padding: 12px 14px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line2); }
.mode-explain b { color: var(--ink); }

/* selection summary sticky bar */
.sumbar { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 14px 18px; margin-top: 22px; border-radius: 14px 14px 0 0; background: var(--panel); border: 1px solid var(--line); border-bottom: none; box-shadow: 0 -6px 24px -12px rgba(60,64,67,.35); flex-wrap: wrap; }
.sumbar .sb-left { font-size: 13px; color: var(--ink2); }
.sumbar .sb-left b { font-family: var(--display); font-size: 16px; color: var(--ink); }

/* ---------------------------------------------------------------- risk gauge */
.riskboard { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; margin-top: 20px; }
@media (max-width: 720px) { .riskboard { grid-template-columns: 1fr; } }
.gauge-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.gauge-title { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.gauge-wrap { display: flex; align-items: center; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.gauge { position: relative; width: 150px; height: 150px; flex: none; }
.gauge svg { transform: rotate(-90deg); display: block; }
.gauge .g-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge .g-num { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; color: var(--ink); }
.gauge .g-lab { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink3); margin-top: 4px; }
.gauge-legend { flex: 1; min-width: 160px; }
.beforeafter { display: flex; flex-direction: column; gap: 10px; }
.ba-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ba-row .ba-k { width: 62px; color: var(--ink3); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.ba-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.ba-bar > span { display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.7,.3,1); }
.ba-bar > span.before { background: var(--red); }
.ba-bar > span.after { background: var(--green); }
.ba-row .ba-v { width: 40px; text-align: right; font-family: var(--mono); font-weight: 700; font-size: 12.5px; color: var(--ink); }
.drop-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(13,144,79,.1); color: var(--green); font-size: 12.5px; font-weight: 700; }
.drop-badge .material-icons-outlined { font-size: 16px; }

.risk-tag { font-family: var(--display); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 10px; border-radius: 999px; }
.risk-tag.hi { color: var(--red); background: rgba(217,48,37,.12); }
.risk-tag.md { color: var(--amber); background: rgba(227,116,0,.12); }
.risk-tag.lo { color: var(--green); background: rgba(13,144,79,.12); }

/* ---------------------------------------------------------------- before/after diff */
.diff { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.diff-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--panel2); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink2); }
.diff-body { max-height: 320px; overflow: auto; background: var(--panel); }
.diff-line { display: grid; grid-template-columns: 26px 1fr; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; border-bottom: 1px solid var(--line2); }
.diff-line .dl-mark { text-align: center; user-select: none; color: var(--ink3); background: var(--panel2); }
.diff-line.old .dl-mark { color: var(--red); } .diff-line.old .dl-txt { background: rgba(217,48,37,.06); color: var(--red); }
.diff-line.new .dl-mark { color: var(--green); } .diff-line.new .dl-txt { background: rgba(13,144,79,.06); color: var(--green); }
.diff-line.ctx .dl-txt { color: var(--ink2); }
.diff-line .dl-txt { padding: 1px 12px; white-space: pre; overflow-x: auto; }
.diff-line .dl-txt mark { background: rgba(124,58,237,.22); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------------------------------------------------------------- audit log */
.auditlog { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.audit-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 15px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.audit-item:last-child { border-bottom: none; }
.audit-item .ai-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--swap-soft); color: var(--swap); }
.audit-item .ai-ic.skip { background: var(--panel2); color: var(--ink3); }
.audit-item .ai-ic .material-icons-outlined { font-size: 16px; }
.audit-item .ai-main { flex: 1; min-width: 0; }
.audit-item .ai-t { font-weight: 600; color: var(--ink); }
.audit-item .ai-d { color: var(--ink2); font-size: 12px; margin-top: 1px; }
.audit-item .ai-n { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--swap); white-space: nowrap; }
.audit-item .ai-n.zero { color: var(--ink3); }

/* ---------------------------------------------------------------- info cards */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px,1fr)); gap: 14px; margin-top: 16px; }
.info-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.info-card .ic-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--swap-soft); color: var(--swap); margin-bottom: 12px; }
.info-card .ic-ic .material-icons-outlined { font-size: 21px; }
.info-card h3 { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); }
.info-card p { color: var(--ink2); font-size: 13px; line-height: 1.6; margin-top: 6px; }
.info-card cite { display: block; margin-top: 8px; font-size: 11px; color: var(--ink3); font-style: normal; }

/* ---------------------------------------------------------------- processing overlay */
.proc { text-align: center; padding: 20px 0; }
.proc .p-ring { width: 60px; height: 60px; margin: 0 auto 16px; border: 4px solid var(--swap-soft); border-top-color: var(--swap); border-radius: 50%; animation: spin .8s linear infinite; }
.proc .p-stat { font-family: var(--mono); font-size: 12.5px; color: var(--ink2); margin-top: 8px; min-height: 18px; }
.proc .p-bar { height: 8px; border-radius: 999px; background: var(--panel2); overflow: hidden; max-width: 420px; margin: 14px auto 0; }
.proc .p-bar > span { display: block; height: 100%; background: var(--swap); width: 0; transition: width .2s; }

/* pill list of removed identifiers */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.id-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-family: var(--mono); border: 1px solid var(--line); }
.id-pill.removed { border-color: rgba(217,48,37,.35); background: rgba(217,48,37,.06); color: var(--red); text-decoration: line-through; }
.id-pill.kept { border-color: var(--line); background: var(--panel2); color: var(--ink2); }
.id-pill .material-icons-outlined { font-size: 14px; text-decoration: none; }

/* result headline banner */
.done-banner { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 16px; background: linear-gradient(120deg, var(--swap-soft), transparent); border: 1px solid var(--swap-line); margin-top: 6px; }
.done-banner .db-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--swap); color: #fff; flex: none; box-shadow: var(--shadow); }
.done-banner .db-ic .material-icons-outlined { font-size: 30px; }
.done-banner .db-title { font-family: var(--display); font-weight: 700; font-size: 21px; color: var(--ink); }
.done-banner .db-sub { color: var(--ink2); font-size: 13.5px; margin-top: 3px; }

.dl-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* small helpers */
.subtle-hr { height: 1px; background: var(--line); border: none; margin: 34px 0 0; }
.chip-count { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--swap-soft); color: var(--swap); font-weight: 700; }
.filemeta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.filemeta .fm-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--swap-soft); color: var(--swap); flex: none; }
.filemeta .fm-name { font-weight: 600; font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filemeta .fm-meta { font-size: 12px; color: var(--ink3); font-family: var(--mono); margin-top: 2px; }
.filemeta .fm-x { margin-left: auto; }
