/* ==========================================================================
   Neo-brutal theme (shared: gallery, gate, admin). Self-hosted fonts.
   ========================================================================== */
@font-face { font-family: "Archivo Black"; src: url("fonts/ArchivoBlack.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/SpaceGrotesk.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }

:root {
  --ink: #000;
  --paper: #fbf9f4;
  --bg: #f3efe6;
  --yellow: #FFD23F;
  --pink: #FF5A8A;
  --purple: #7B61FF;
  --green: #3BC14A;
  --blue: #4FC3F7;
  --muted: #5b5850;
  --bw: 3px;
  --sh: 6px 6px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --sh-lg: 9px 9px 0 var(--ink);
  --head: "Archivo Black", "Arial Black", Impact, sans-serif;
  --body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --pad: clamp(16px, 3.2vw, 44px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh; min-height: 100dvh;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(0,0,0,.13) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
a { color: inherit; }
::selection { background: var(--yellow); }

/* ---------- top bar (full width) ---------- */
.nb-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px var(--pad);
  background: var(--paper);
  border-bottom: var(--bw) solid var(--ink);
}
.nb-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.nb-mark {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  background: var(--yellow); border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm);
}
.nb-mark img { width: 30px; height: auto; filter: brightness(0); }
.nb-brand b { font-family: var(--head); font-weight: 400; font-size: clamp(16px, 2vw, 22px); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-top .grow { flex: 1; }
.nb-top .nb-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- buttons, chips ---------- */
.nb-btn {
  appearance: none; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 var(--body); letter-spacing: .01em; color: var(--ink);
  background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm);
  padding: 11px 16px; border-radius: 0; transition: transform .12s ease, box-shadow .12s ease, background .12s;
  white-space: nowrap;
}
.nb-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.nb-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.nb-btn:focus-visible, .nb-input:focus-visible, .nb-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.nb-btn.yellow { background: var(--yellow); } .nb-btn.pink { background: var(--pink); }
.nb-btn.purple { background: var(--purple); color: #fff; } .nb-btn.green { background: var(--green); }
.nb-btn.big { font-size: 18px; padding: 16px 22px; box-shadow: var(--sh); width: 100%; }
.nb-btn.big:hover { box-shadow: var(--sh-lg); }
.nb-btn.sm { font-size: 13px; padding: 7px 10px; box-shadow: 2px 2px 0 var(--ink); border-width: 2px; }
.nb-btn.sm:hover { box-shadow: 3px 3px 0 var(--ink); }
.nb-btn.danger { background: #ffd9d0; }

.nb-chip {
  width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center;
  border: var(--bw) solid var(--ink); background: var(--yellow); box-shadow: 2px 2px 0 var(--ink);
}
.nb-chip svg { width: 20px; height: 20px; }
.nb-chip.pink { background: var(--pink); } .nb-chip.purple { background: var(--purple); color: #fff; } .nb-chip.green { background: var(--green); } .nb-chip.white { background: #fff; }
.nb-tag {
  display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--body); text-transform: uppercase; letter-spacing: .06em;
  border: 2px solid var(--ink); padding: 5px 8px; background: #fff;
}
.nb-tag.yellow { background: var(--yellow); } .nb-tag.pink { background: var(--pink); } .nb-tag.purple { background: var(--purple); color: #fff; } .nb-tag.green { background: var(--green); } .nb-tag.grey { background: #e5e1d8; } .nb-tag.blue { background: var(--blue); }

/* ---------- inputs ---------- */
.nb-label { display: block; font: 700 13px/1 var(--body); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }
.nb-input {
  width: 100%; font: 500 17px/1.2 var(--body); color: var(--ink); background: #fff;
  border: var(--bw) solid var(--ink); box-shadow: inset 3px 3px 0 rgba(0,0,0,.08); padding: 14px 14px; border-radius: 0; outline: none;
}
.nb-input:focus { background: #fffbe8; }
.nb-input.token { font: 700 20px/1 var(--mono); letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.nb-hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* ---------- boxes / panels ---------- */
.nb-box { background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh); }
.nb-alert { border: var(--bw) solid var(--ink); padding: 12px 14px; font-weight: 600; font-size: 14px; background: #ffd9d0; box-shadow: var(--sh-sm); margin: 0 0 16px; }
.nb-alert.ok { background: #d6f5d9; } .nb-alert.info { background: #fff3c4; }

/* ---------- folder-tab card ---------- */
.nb-card {
  --accent: var(--yellow);
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  margin-top: 30px; /* room for tab */
  transition: transform .14s ease;
}
.nb-card .tab {
  position: absolute; top: -30px; left: 0; height: 33px; max-width: 78%;
  padding: 0 14px; display: flex; align-items: center; gap: 8px;
  background: var(--accent); border: var(--bw) solid var(--ink); border-bottom: 0;
  font: 400 14px/1 var(--head); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  z-index: 2;
}
.nb-card .tab span { overflow: hidden; text-overflow: ellipsis; }
.nb-card .body {
  position: relative; background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh);
  transition: box-shadow .14s ease;
}
.nb-card .body::before { content: ""; display: block; height: 10px; background: var(--accent); border-bottom: var(--bw) solid var(--ink); }
a.nb-card:hover { transform: translate(-3px, -3px); }
a.nb-card:hover .body { box-shadow: var(--sh-lg); }
a.nb-card:active { transform: translate(3px, 3px); }
a.nb-card:active .body { box-shadow: 0 0 0 var(--ink); }

/* ---------- gate layout (full screen split) ---------- */
.gate { flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 0; }
.gate-hero {
  position: relative; overflow: hidden; padding: clamp(28px, 5vw, 72px) var(--pad);
  background: var(--yellow); border-right: var(--bw) solid var(--ink);
  display: flex; flex-direction: column; justify-content: center;
}
.gate-hero h1 { font: 400 clamp(40px, 6.4vw, 92px)/.92 var(--head); text-transform: uppercase; margin: 0 0 22px; letter-spacing: -.01em; }
.gate-hero h1 .hl { background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh); padding: 0 .14em; display: inline-block; transform: rotate(-1.5deg); margin-top: 6px; }
.gate-hero p.lead { font-size: clamp(16px, 1.5vw, 20px); font-weight: 500; max-width: 34ch; margin: 0 0 26px; }
.gate-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 460px; }
.gate-perks li { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm); padding: 8px 12px 8px 8px; }
.gate-perks .nb-chip { width: 34px; height: 34px; flex-basis: 34px; box-shadow: none; }
.gate-deco { position: absolute; pointer-events: none; border: var(--bw) solid var(--ink); }
.gate-deco.d1 { width: 96px; height: 96px; right: 5%; top: 5%; background: var(--pink); border-radius: 50%; box-shadow: var(--sh); }
.gate-deco.d2 { width: 90px; height: 90px; right: 22%; bottom: 10%; background: var(--purple); transform: rotate(12deg); box-shadow: var(--sh); }
.gate-deco.d3 { width: 64px; height: 64px; right: 6%; bottom: 30%; background: var(--green); transform: rotate(-8deg); box-shadow: var(--sh); }
.gate-main { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 72px) var(--pad); }
.gate-form { width: 100%; max-width: 480px; }
.nb-card .inner { padding: 22px 22px 22px; }
.price { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.price b { font: 400 clamp(40px, 4.4vw, 56px)/1 var(--head); }
.price .nb-tag { margin-bottom: 6px; }
.methods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.methods .nb-tag { font-size: 11px; }
.gate-alt { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.gate-alt .nb-btn { flex: 1; }
.form-gap { height: 16px; }
.mail-sample { border: var(--bw) solid var(--ink); background: #fff; padding: 12px 14px; margin: 16px 0 0; font-size: 14px; }
.mail-sample code { display: block; margin-top: 8px; font: 700 18px/1.2 var(--mono); letter-spacing: .1em; text-align: center; background: var(--yellow); border: 2px solid var(--ink); padding: 10px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: 14px; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; }
.steps li::before { content: counter(s); font: 400 13px/22px var(--head); min-width: 26px; height: 26px; text-align: center; border: 2px solid var(--ink); background: var(--yellow); }
.spinner { width: 26px; height: 26px; border: var(--bw) solid var(--ink); border-top-color: var(--pink); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.nb-foot { padding: 14px var(--pad); border-top: var(--bw) solid var(--ink); background: var(--paper); font-size: 13px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.show-sm { display: none; }
@media (max-width: 860px) {
  .show-sm { display: inline; }
  .gate { grid-template-columns: 1fr; }
  .gate-hero { border-right: 0; border-bottom: var(--bw) solid var(--ink); padding-top: 28px; padding-bottom: 30px; }
  .gate-hero h1 { font-size: clamp(36px, 11vw, 56px); }
  .gate-deco.d1 { width: 70px; height: 70px; top: 18px; right: 18px; }
  .gate-deco.d2, .gate-deco.d3 { display: none; }
  .gate-perks li { font-size: 14px; }
  .gate-main { padding-top: 26px; align-items: flex-start; }
  .nb-top .hide-sm, .hide-sm { display: none; }
  .nb-brand b { font-size: 15px; }
}

/* ---------- admin ---------- */
.adm { flex: 1; padding: 26px var(--pad) 40px; }
.adm h1 { font: 400 clamp(28px, 3.4vw, 44px)/1 var(--head); text-transform: uppercase; margin: 0 0 6px; }
.adm .sub { margin: 0 0 22px; font-weight: 500; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat { border: var(--bw) solid var(--ink); box-shadow: var(--sh); padding: 14px 16px; background: var(--paper); }
.stat small { display: block; font: 700 12px/1 var(--body); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.stat b { font: 400 clamp(22px, 2.4vw, 34px)/1 var(--head); }
.stat.y { background: var(--yellow); } .stat.p { background: var(--pink); } .stat.v { background: var(--purple); color: #fff; } .stat.g { background: var(--green); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; margin-bottom: 18px; }
.toolbar .nb-input { max-width: 360px; padding: 10px 12px; font-size: 15px; }
.toolbar select.nb-input { max-width: 200px; }
.tbl-wrap { border: var(--bw) solid var(--ink); box-shadow: var(--sh); background: var(--paper); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 700 12px/1 var(--body); text-transform: uppercase; letter-spacing: .08em; padding: 12px; background: var(--ink); color: #fff; white-space: nowrap; }
.tbl td { padding: 12px; border-top: 2px solid var(--ink); vertical-align: top; }
.tbl tr:nth-child(even) td { background: #f5f1e8; }
.tbl code { font: 700 13px var(--mono); background: #fff; border: 2px solid var(--ink); padding: 2px 6px; white-space: nowrap; }
.tbl .mut { color: var(--muted); font-size: 13px; }
.tbl .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl .acts form { margin: 0; }
.tbl .email-edit { display: flex; gap: 6px; margin-top: 6px; }
.tbl .email-edit input { font-size: 13px; padding: 5px 8px; border-width: 2px; box-shadow: none; max-width: 210px; }
.tbl details summary { cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: underline; }
.empty { padding: 30px; text-align: center; font-weight: 700; }
.qr { background: #fff; border: var(--bw) solid var(--ink); padding: 10px; display: inline-block; box-shadow: var(--sh-sm); }
.qr svg { display: block; width: 200px; height: 200px; }
.secret-code { font: 700 15px/1.4 var(--mono); letter-spacing: .08em; word-break: break-all; background: #fff; border: 2px solid var(--ink); padding: 8px; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { box-shadow: var(--sh-sm); }
  .tbl-wrap { border: 0; box-shadow: none; background: transparent; overflow: visible; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm); margin-bottom: 14px; padding: 8px 0; }
  .tbl tr:nth-child(even) td { background: transparent; }
  .tbl td { border: 0; padding: 4px 12px; }
  .tbl td[data-l]::before { content: attr(data-l); display: block; font: 700 11px/1.4 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
}

/* ---------- admin: nav, Bio, analytics, settings ---------- */
.nb-alert.warn { background: var(--yellow); display: flex; gap: 10px; align-items: flex-start; }
.nb-alert.warn svg { flex: 0 0 auto; margin-top: 1px; }
.nb-alert.warn.small { font-size: 13px; font-weight: 500; padding: 9px 11px; box-shadow: none; border-width: 2px; margin: 0; }
.nb-alert code, .nb-hint code, .sub code { font: 700 12px var(--mono); background: #fff; border: 2px solid var(--ink); padding: 1px 5px; word-break: break-all; }
.adm-nav { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; padding-bottom: 18px; border-bottom: var(--bw) solid var(--ink); }
.adm-nav .nb-btn { font-size: 14px; padding: 9px 14px; }
.adm-nav .is-on { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.adm h2 { font: 400 20px/1.1 var(--head); text-transform: uppercase; margin: 0 0 14px; }
.adm h3 { font: 400 16px/1.1 var(--head); text-transform: uppercase; margin: 0 0 12px; }
.nb-box { padding: 16px; }
.mt { margin-top: 0; }
.create-bio { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.create-bio .cb-field { flex: 1 1 220px; min-width: 0; }
.create-bio .cb-field.sm { flex: 0 1 150px; }
.create-bio .nb-input { padding: 10px 12px; font-size: 15px; }
.slug-in { display: flex; align-items: stretch; }
.slug-in span { display: flex; align-items: center; padding: 0 10px; border: var(--bw) solid var(--ink); border-right: 0; background: var(--ink); color: #fff; font: 700 14px var(--mono); }
.slug-in .nb-input { min-width: 0; }
code.copy { cursor: pointer; display: inline-block; margin: 3px 3px 0 0; font: 700 12px var(--mono); background: #fff; border: 2px solid var(--ink); padding: 2px 6px; }
code.copy:hover { background: var(--yellow); }
code.copy.copied { background: var(--green); }
.ed-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ed-head h1 { margin: 0; }
.ed-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 26px; align-items: start; }
.ed-side { display: grid; gap: 22px; position: sticky; top: 16px; }
.ed-card { display: grid; gap: 8px; }
.ed-card .nb-label { margin-top: 6px; }
.ed-card .nb-input { padding: 10px 12px; font-size: 15px; }
.ed-card textarea.nb-input { resize: vertical; font-family: var(--body); }
.ed-card .nb-btn { margin-top: 8px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; margin: 6px 0 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.danger-zone { background: #ffece7; }
.src-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.src-card { display: flex; flex-direction: column; gap: 10px; }
.src-card .nb-input { padding: 9px 11px; font-size: 14px; }
.src-card > .nb-btn { margin-top: auto; }
.src-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.src-head b { display: block; font: 400 16px/1.1 var(--head); text-transform: uppercase; }
.src-head small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 4px; padding: 26px 12px; border: var(--bw) dashed var(--ink); background: #fff; cursor: pointer; min-height: 130px; }
.drop.hot { background: var(--yellow); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop small { font-size: 11px; color: var(--muted); font-weight: 600; }
.up-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12px; }
.up-list li { border: 2px solid var(--ink); padding: 6px 8px; background: #fff; display: grid; gap: 4px; }
.up-list .up-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-list .up-bar { height: 8px; border: 2px solid var(--ink); background: #eee; }
.up-list .up-bar i { display: block; height: 100%; width: 0; background: var(--purple); transition: width .2s; }
.up-list li.ok { background: #d6f5d9; } .up-list li.ok i { background: var(--green); }
.up-list li.err { background: #ffd9d0; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.it { display: grid; grid-template-columns: 22px 40px minmax(120px, 1fr) auto auto; grid-template-areas: "pos thumb title tags acts" "cap cap cap cap cap"; column-gap: 10px; row-gap: 0; align-items: center; background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 6px 8px; position: relative; }
.it.is-cover { background: #fff7d6; }
.it-edit { display: none; }
.it-pos { grid-area: pos; font: 400 14px/1 var(--head); text-align: center; }
.it-thumb { grid-area: thumb; width: 40px; height: 40px; border: 2px solid var(--ink); background: #e6e1d6; display: grid; place-items: center; overflow: hidden; text-decoration: none; color: var(--ink); }
.it-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-thumb.ico { background: var(--yellow); } .it-thumb.vid { background: var(--pink); }
.it-title.nb-input { grid-area: title; min-width: 0; padding: 6px 8px; font-size: 14px; font-weight: 700; border-width: 2px; box-shadow: none; background: transparent; border-color: transparent; }
.it-title.nb-input:hover { border-color: #0003; } .it-title.nb-input:focus { border-color: var(--ink); background: #fff; }
.it-tags { grid-area: tags; display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.it-tags .nb-tag { font-size: 10px; padding: 3px 6px; gap: 3px; letter-spacing: .03em; }
.it-acts { grid-area: acts; display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.it-acts form { margin: 0; }
.nb-btn.xs { padding: 0; width: 28px; height: 28px; min-height: 0; display: inline-grid; place-items: center; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
.nb-btn.xs:active { transform: translate(2px, 2px); box-shadow: none; }
.nb-btn.xs[disabled] { opacity: .35; box-shadow: none; }
.it-captog.has { background: var(--blue); }
.it-captog[aria-expanded="true"] { background: var(--ink); color: #fff; }
.it-cap { grid-area: cap; padding: 6px 0 2px 72px; }
.it-cap .nb-input { padding: 6px 8px; font-size: 13px; border-width: 2px; box-shadow: none; }
.js .it-save { display: none; } .js .it.dirty .it-save { display: inline-grid; background: var(--green); }
.it-state { position: absolute; top: -9px; right: 10px; font: 800 10px/1 var(--mono, monospace); text-transform: uppercase; }
.it-state:not(:empty) { background: var(--green); border: 2px solid var(--ink); padding: 2px 5px; }
.it-state.err { background: var(--pink); }
.nb-btn.icon { width: 34px; height: 34px; padding: 0; }
.nb-btn[disabled] { opacity: .35; pointer-events: none; }
.an-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.an-head .acts { display: flex; gap: 8px; margin-bottom: 22px; }
.stats.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.an-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; margin-bottom: 22px; }
.an-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart { width: 100%; height: auto; display: block; font-family: var(--body); }
.legend { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; margin: -4px 0 8px; flex-wrap: wrap; }
.lg { width: 14px; height: 14px; border: 2px solid var(--ink); display: inline-block; margin-left: 6px; }
.lg.y { background: var(--yellow); } .lg.p { background: var(--pink); } .lg.g { background: var(--green); } .lg.dot { border-radius: 50%; }
.funnel { display: grid; gap: 12px; }
.fn-step { position: relative; border: var(--bw) solid var(--ink); background: #fff; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; }
.fn-bar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 0; border-right: var(--bw) solid var(--ink); }
.fn-step.y .fn-bar { background: var(--yellow); } .fn-step.p .fn-bar { background: var(--pink); } .fn-step.v .fn-bar { background: var(--purple); } .fn-step.g .fn-bar { background: var(--green); }
.fn-step > *:not(.fn-bar) { position: relative; z-index: 1; }
.fn-l { font-weight: 700; font-size: 14px; }
.fn-step b { font: 400 22px/1 var(--head); }
.fn-step small { grid-column: 1 / -1; font-size: 11px; font-weight: 700; }
.tbl.mini { font-size: 13px; }
.tbl.mini th { padding: 8px 10px; font-size: 11px; }
.tbl.mini td { padding: 7px 10px; }
.tbl.mini td.num { position: relative; text-align: right; white-space: nowrap; }
.tbl.mini .bar { position: absolute; left: 0; top: 4px; bottom: 4px; background: var(--yellow); opacity: .55; }
.tbl.mini td.num b { position: relative; }
.set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: start; }
.set-grid form { display: grid; gap: 8px; }
.set-grid .nb-label { margin-top: 6px; }
.set-grid .nb-btn { margin-top: 10px; }
.set-grid .inline-cancel { margin-top: 8px; }
@media (max-width: 1180px) {
  .src-grid { grid-template-columns: 1fr 1fr; }
  .stats.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .an-grid.three, .set-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .ed-grid, .an-grid, .an-grid.three, .set-grid, .src-grid { grid-template-columns: 1fr; }
  .ed-side { position: static; }
  .stats.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .it { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "thumb title title" "thumb tags acts" "cap cap cap"; row-gap: 4px; column-gap: 8px; }
  .it-pos { display: none; }
  .it-thumb { width: 36px; height: 36px; align-self: start; margin-top: 2px; }
  .it-title.nb-input { padding: 4px 6px; }
  .it-tags { overflow: hidden; }
  .it-tags .t-long { display: none; }
  .nb-btn.xs { width: 26px; height: 26px; }
  .it-acts { gap: 3px; }
  .it-cap { padding-left: 0; }
  .adm-nav { gap: 8px; }
  .adm-nav .nb-btn { flex: 1 1 auto; padding: 9px 8px; font-size: 13px; }
  .tbl.mini thead { display: table-header-group; }
  .tbl.mini { display: table; } .tbl.mini tbody { display: table-row-group; } .tbl.mini tr { display: table-row; border: 0; box-shadow: none; margin: 0; padding: 0; } .tbl.mini td { display: table-cell; width: auto; padding: 7px 10px; border-top: 2px solid var(--ink); }
  .an-head .acts { margin-bottom: 14px; }
}
.stats.six .stat b { font-size: clamp(18px, 1.8vw, 28px); white-space: nowrap; }

/* inline DOKU status badge next to "Cek status DOKU" */
.tbl .acts.chk { align-items: center; }
.chk-badge { display: inline-flex; align-items: stretch; border: 2px solid var(--ink, #111); box-shadow: 2px 2px 0 var(--ink, #111); font-size: 11px; line-height: 1; text-transform: uppercase; white-space: nowrap; animation: chk-pop .25s ease-out; }
.chk-badge small { background: var(--ink, #111); color: #fff; padding: 5px 6px; font-weight: 700; letter-spacing: .04em; font-size: 10px; }
.chk-badge b { padding: 5px 8px; font-weight: 800; letter-spacing: .03em; }
.chk-badge.green b { background: var(--green); } .chk-badge.yellow b { background: var(--yellow); }
.chk-badge.pink b { background: var(--pink); } .chk-badge.grey b { background: #d9d4c8; color: #3a3a3a; }
.tbl tr.checked td { background: #fffbe8; }
@keyframes chk-pop { from { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink, #111); } }
@media (prefers-reduced-motion: reduce) { .chk-badge { animation: none; } }
.tbl tr[id] { scroll-margin-top: 140px; }
