/* Krovbar: the future as the 80s imagined it. Neon sunset over a glowing grid,
   chrome letters, glitches, and player IDs with hologram photos.
   Dark by default; "day" is a bright Miami-pastel version. */
:root {
  --bg: #fdf0f6;
  --glow: rgba(255, 43, 214, 0.16);
  --grid-line: rgba(196, 18, 154, 0.22);
  --scan: rgba(29, 20, 51, 0.025);
  --panel: #ffffff;
  --panel-2: #fbeaf4;
  --ink: #1d1433;
  --ink-soft: #6a5a85;
  --line: #ecd3e4;
  --magenta: #c4129a;
  --cyan: #007c99;
  --orange: #e35d00;
  --yellow: #ffd23f;
  --link: #b0108a;
  --good: #0a8a5a;
  --mixed: #a45f00;
  --bad: #c8123f;
  --sunset: linear-gradient(90deg, #ff2bd6, #ff7a1a 55%, #ffd23f);
  --neon: 0 0 0 1px rgba(196, 18, 154, 0.18), 0 12px 32px -18px rgba(196, 18, 154, 0.45);
  --display: "Chakra Petch", "Bahnschrift", "Arial Narrow", sans-serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0721;
    --glow: rgba(255, 43, 214, 0.22);
    --grid-line: rgba(255, 43, 214, 0.35);
    --scan: rgba(255, 255, 255, 0.025);
    --panel: #160e33;
    --panel-2: #110a28;
    --ink: #f4eefe;
    --ink-soft: #a99cc9;
    --line: #2e2457;
    --magenta: #ff2bd6;
    --cyan: #2de2ff;
    --orange: #ff7a1a;
    --link: #2de2ff;
    --good: #3dffb5;
    --mixed: #ffb43f;
    --bad: #ff3d6e;
    --neon: 0 0 0 1px rgba(45, 226, 255, 0.12), 0 0 36px -16px rgba(255, 43, 214, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0721;
  --glow: rgba(255, 43, 214, 0.22);
  --grid-line: rgba(255, 43, 214, 0.35);
  --scan: rgba(255, 255, 255, 0.025);
  --panel: #160e33;
  --panel-2: #110a28;
  --ink: #f4eefe;
  --ink-soft: #a99cc9;
  --line: #2e2457;
  --magenta: #ff2bd6;
  --cyan: #2de2ff;
  --orange: #ff7a1a;
  --link: #2de2ff;
  --good: #3dffb5;
  --mixed: #ffb43f;
  --bad: #ff3d6e;
  --neon: 0 0 0 1px rgba(45, 226, 255, 0.12), 0 0 36px -16px rgba(255, 43, 214, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 15px/1.55 var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, var(--scan) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 80% 45% at 50% -5%, var(--glow), transparent 70%);
  background-attachment: fixed;
}
/* The glowing grid floor running to the horizon. */
body::before {
  content: ""; position: fixed; left: -50%; right: -50%; bottom: 0; height: 42vh; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--grid-line) 2px, transparent 2px) 0 0 / 100% 48px,
    linear-gradient(90deg, var(--grid-line) 2px, transparent 2px) 0 0 / 64px 100%;
  transform: perspective(320px) rotateX(62deg);
  transform-origin: bottom;
  -webkit-mask: linear-gradient(transparent, #000 70%);
  mask: linear-gradient(transparent, #000 70%);
  opacity: .55;
}
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3, legend, .brand, .topbar nav, button, .button { font-family: var(--display); }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.1; margin: 0 0 .75rem; text-transform: uppercase; letter-spacing: .03em; }
h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .75rem; text-transform: uppercase; letter-spacing: .08em; }
h3 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--magenta); margin: 0 0 .5rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.grow { flex: 1; min-width: 0; }
/* Chrome lettering, the way 80s movie posters did it. */
.chrome {
  background: linear-gradient(180deg, #ffffff 0%, #c9d4ff 42%, #4b3a8c 50%, #ff9ee8 54%, #ffe3f7 75%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  padding: .7rem max(16px, calc((100% - 1080px) / 2));
  background: rgba(13, 7, 33, 0.88); color: #f4eefe;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid; border-image: linear-gradient(90deg, #ff2bd6, #ff7a1a, #ffd23f, #2de2ff) 1;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.35rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; font-style: italic; }
.brand span { display: inline-block; transform: skewX(-10deg); }
.brand img { border-radius: 8px; }
.topbar nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.topbar nav a { white-space: nowrap; color: #c9bfe6; text-decoration: none; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; padding: .3rem .7rem; border-radius: 4px; }
.topbar nav a:hover { color: #fff; text-shadow: 0 0 8px #ff2bd6; }
.topbar nav a[aria-current="page"] { color: #fff; background: rgba(255, 43, 214, 0.18); box-shadow: inset 0 -2px 0 #ff2bd6; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar .ghost { color: #f4eefe; border-color: #3a2f6b; }
.count { display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: .2em; border-radius: 8px; background: #ff3d6e; color: #fff; font: 700 .75rem/1.4 var(--mono); text-align: center; }
.theme-toggle .to-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .to-dark { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .to-light { display: inline; }
}
:root[data-theme="dark"] .theme-toggle .to-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .to-light { display: inline; }

main { width: 100%; max-width: 1080px; margin: 0 auto; padding: 2rem 16px 3rem; flex: 1; display: grid; gap: 1.5rem; align-content: start; }
.footer { text-align: center; color: var(--ink-soft); font-size: .8rem; padding: 1.5rem 16px; }

/* ---------- buttons and forms ---------- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: .6rem 1.2rem; cursor: pointer; text-decoration: none; border-radius: 4px;
  background: var(--sunset); color: #1a0b2e; border: 0;
  box-shadow: 0 0 0 1px rgba(255, 122, 26, .4), 0 6px 22px -8px rgba(255, 43, 214, .7);
  transition: box-shadow .15s, transform .15s, filter .15s;
}
button:hover, .button:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 0 0 1px #ffd23f, 0 0 26px -4px rgba(255, 43, 214, .9); }
.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.ghost:hover { box-shadow: inset 0 0 0 1px var(--cyan), 0 0 18px -6px var(--cyan); filter: none; }
.danger { background: var(--bad); color: #fff; box-shadow: none; }
.ghost.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 50%, transparent); }
.button.big { font-size: 1.05rem; padding: .9rem 1.7rem; }
[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
[aria-disabled="true"]:hover { transform: none; }
.button.login { width: 100%; justify-content: flex-start; padding: .9rem 1.2rem; color: #fff; box-shadow: none; }
.button.login.steam { background: linear-gradient(90deg, #171a21, #2a475e); }
.button.login.xbox { background: linear-gradient(90deg, #0e5a0e, #107c10); }
.button.login.psn { background: linear-gradient(90deg, #00439c, #0070d1); }
input, textarea, select {
  font: inherit; width: 100%; padding: .6rem .7rem; color: var(--ink); border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--line);
}
input:focus, textarea:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 25%, transparent); }
label { display: grid; gap: .3rem; font-weight: 500; }
label.check { display: flex; gap: .6rem; align-items: flex-start; }
label.check input { width: auto; margin-top: .3rem; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: .75rem 1rem 1rem; margin: 0; }
legend { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .18em; color: var(--magenta); padding: 0 .4rem; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.row input { flex: 1; min-width: 10rem; width: auto; }
.foot { margin-top: 1rem; }
.error { border-left: 4px solid var(--bad); border-radius: 4px; background: color-mix(in srgb, var(--bad) 12%, transparent); padding: .6rem .8rem; margin: 0 0 1rem; }
.note { border-left: 4px solid var(--cyan); border-radius: 4px; background: color-mix(in srgb, var(--cyan) 12%, transparent); padding: .6rem .8rem; margin: 0; }

/* Radio buttons and checkboxes shown as pressable chips. */
.choice { display: inline-flex; flex-direction: row; align-items: center; gap: .4rem; cursor: pointer; font-weight: 500; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-2); min-width: 2.4rem; text-align: center; font-family: var(--display); font-weight: 500; }
.choice span:hover { border-color: var(--magenta); }
.choice input:checked + span, .choice input:checked + .avatar + span { background: var(--sunset); border-color: transparent; color: #1a0b2e; font-weight: 700; }
.choice input:focus-visible + span { outline: 2px solid var(--cyan); }
.big-question legend { font-size: 1.2rem; letter-spacing: .04em; color: var(--ink); }
.big-question .choice span { padding: .75rem 1.3rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
/* Review questions: always the question on top, then its answers side by side (they wrap on small screens). */
.question { padding: .7rem 0; border-top: 1px solid var(--line); }
.question:first-of-type { border-top: 0; }
.q-title { margin: 0 0 .45rem; font-family: var(--display); font-weight: 700; }
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .4rem; }
.answers .choice { display: flex; }
.answers .choice span { flex: 1; display: grid; place-items: center; padding: .55rem .6rem; }

/* ---------- panels ---------- */
.panel { position: relative; background: var(--panel); border-radius: 8px; padding: 1.5rem; box-shadow: var(--neon); }
.panel::before { content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: 0; height: 2px; background: var(--sunset); border-radius: 2px; }
.narrow { width: 100%; max-width: 640px; margin: 0 auto; }
.tag { display: inline-block; font: 700 .72rem/1.5 var(--display); text-transform: uppercase; letter-spacing: .08em; padding: .05rem .5rem; border: 1px solid var(--line); border-radius: 3px; color: var(--ink-soft); }
.tag.bad { color: var(--bad); border-color: var(--bad); }
.sample { font: 700 .62rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 3px; padding: 0 .3rem; margin-left: .3rem; }
.pill { font: 700 .78rem var(--display); text-transform: uppercase; letter-spacing: .08em; padding: .2rem .6rem; border-radius: 3px; }
.pill.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.pill.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.platform { display: inline-block; font: 700 .68rem/1.6 var(--display); text-transform: uppercase; letter-spacing: .1em; padding: 0 .45rem; border-radius: 3px; color: #fff; }
.platform.steam { background: #2a475e; }
.platform.xbox { background: #107c10; }
.platform.psn { background: #0070d1; }
.list { display: grid; }
.list-row { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.list-row.wrap { flex-wrap: wrap; }
.list-row .row input { min-width: 7rem; }

/* ---------- avatars ---------- */
.avatar { width: 48px; height: 48px; object-fit: cover; flex: none; display: inline-grid; place-items: center; border-radius: 6px; background: #1a1040; color: #2de2ff; font: 700 1.2rem var(--display); }
.avatar.small { width: 32px; height: 32px; font-size: .9rem; border-radius: 4px; }
.avatar.large { width: 150px; height: 150px; font-size: 3.6rem; border-radius: 6px; }

/* ---------- landing ---------- */
.hero { position: relative; isolation: isolate; padding: 3.5rem 0 1.5rem; overflow: hidden; }
/* Striped neon sun on the horizon. */
.hero::before {
  content: ""; position: absolute; right: -40px; top: 20px; width: 340px; height: 340px; border-radius: 50%; z-index: -1;
  background:
    repeating-linear-gradient(180deg, transparent 0 24px, var(--bg) 24px 32px) 0 170px / 100% 100% no-repeat,
    linear-gradient(180deg, #ffd23f, #ff7a1a 50%, #ff2bd6);
  box-shadow: 0 0 80px -10px rgba(255, 43, 214, .6);
  -webkit-mask: linear-gradient(180deg, #000 55%, transparent 100%);
  mask: linear-gradient(180deg, #000 55%, transparent 100%);
}
.hero h1 { position: relative; font-size: clamp(2.3rem, 7vw, 4.4rem); max-width: 14ch; font-style: italic; }
.hero p { font-size: 1.1rem; color: var(--ink-soft); max-width: 52ch; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.card { position: relative; background: var(--panel); border-radius: 8px; padding: 1.1rem; box-shadow: var(--neon); }
.card h2 { font-size: 1rem; color: var(--cyan); }
.card p { margin: 0; color: var(--ink-soft); }

/* Glitch: two coloured copies of a heading, flashing slightly offset now and then. */
.glitch, .hero h1, .id-fields h1 { position: relative; }
.hero h1::before, .hero h1::after, .id-fields h1::before, .id-fields h1::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none; clip-path: inset(100% 0 0 0);
}
.hero h1::before, .id-fields h1::before { color: #2de2ff; transform: translate(-3px, 0); }
.hero h1::after, .id-fields h1::after { color: #ff2bd6; transform: translate(3px, 0); }
@media (prefers-reduced-motion: no-preference) {
  .hero h1::before, .id-fields h1::before { animation: glitch 3.4s infinite steps(1); }
  .hero h1::after, .id-fields h1::after { animation: glitch 2.9s infinite reverse steps(1); }
}
@keyframes glitch {
  0%, 86%, 100% { clip-path: inset(100% 0 0 0); }
  88% { clip-path: inset(12% 0 62% 0); }
  92% { clip-path: inset(58% 0 12% 0); }
  96% { clip-path: inset(34% 0 40% 0); }
}

/* ---------- search and player badges ---------- */
.search { display: flex; gap: .5rem; margin-bottom: 1rem; }
.search input { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.badge {
  display: flex; align-items: center; gap: .75rem; padding: .8rem; color: var(--ink); text-decoration: none; border-radius: 8px;
  background: var(--panel); box-shadow: var(--neon); transition: transform .15s, box-shadow .15s;
}
.badge:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--magenta), 0 0 30px -10px var(--magenta); }
.badge .who { flex: 1; min-width: 0; display: grid; }
.badge strong { font-family: var(--display); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platforms { display: flex; gap: .25rem; margin-top: .15rem; }
.id-no { font: 500 .72rem var(--display); letter-spacing: .16em; color: var(--magenta); }
.verdict { font: 500 .8rem var(--display); color: var(--ink-soft); white-space: nowrap; }
.verdict strong { font-size: 1.1rem; }
.verdict.good strong { color: var(--good); }
.verdict.mixed strong { color: var(--mixed); }
.verdict.bad strong { color: var(--bad); }

/* ---------- the player ID card (profile) ---------- */
.id-card {
  position: relative; overflow: hidden; border-radius: 12px; color: #f4eefe;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 43, 214, .28), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(45, 226, 255, .18), transparent 45%),
    linear-gradient(rgba(45, 226, 255, .06) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(45, 226, 255, .06) 1px, transparent 1px) 0 0 / 24px 24px,
    #120a2c;
  box-shadow: 0 0 0 1px rgba(45, 226, 255, .45), 0 0 50px -14px rgba(255, 43, 214, .7);
}
.id-card a:not(.button) { color: #2de2ff; }
.id-card .tag { color: #c9bfe6; border-color: #3a2f6b; }
.id-card .muted { color: #a99cc9; }
.id-card.void { filter: grayscale(.85); }
.id-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .65rem 1.5rem;
  font: 700 .8rem var(--display); text-transform: uppercase; letter-spacing: .26em; color: #1a0b2e;
  background: var(--sunset);
}
.id-top .id-no { color: #1a0b2e; font-size: .85rem; }
.id-fields > .tag { justify-self: start; margin: 0; }
.id-body { display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; padding: 1.6rem 1.5rem; align-items: start; }
.id-photo { position: relative; display: grid; gap: .9rem; justify-items: center; }

/* Hologram photo: blue, see-through, scanlines, flicker and the odd jump. */
.holo { position: relative; display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(45, 226, 255, .55), 0 0 30px -6px rgba(45, 226, 255, .8); }
.holo .avatar { display: grid; filter: grayscale(1) sepia(1) hue-rotate(155deg) saturate(3.2) brightness(1.15) contrast(1.1); opacity: .86; background: #0b2a3d; }
.holo span.avatar { color: #7ff3ff; text-shadow: 0 0 14px #2de2ff; filter: none; }
.holo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(45, 226, 255, .22) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, rgba(45, 226, 255, .18), transparent 40%, rgba(45, 226, 255, .14));
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: no-preference) {
  .holo .avatar { animation: holo-flicker 4s infinite steps(1), holo-jump 7s infinite steps(1); }
  .holo::after { animation: holo-scroll 6s linear infinite; }
}
@keyframes holo-flicker {
  0%, 100% { opacity: .86; } 41% { opacity: .55; } 42% { opacity: .9; } 77% { opacity: .65; } 78% { opacity: .88; }
}
@keyframes holo-jump {
  0%, 100% { transform: none; clip-path: none; }
  62% { transform: translateX(6px); clip-path: inset(30% 0 45% 0); }
  63% { transform: translateX(-4px); clip-path: inset(55% 0 20% 0); }
  64% { transform: none; clip-path: none; }
}
@keyframes holo-scroll { from { background-position: 0 0, 0 0; } to { background-position: 0 40px, 0 0; } }

.mini-badges { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; max-width: 150px; }
.mini { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #3dffb5; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px currentColor, 0 0 12px -2px currentColor; }
.mini.style { color: #2de2ff; }
.mini.warn { color: #ff3d6e; }
.id-fields { display: grid; gap: .75rem; min-width: 0; }
.id-fields h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.6rem); font-style: italic; overflow-wrap: anywhere; color: #fff; text-shadow: 0 0 18px rgba(255, 43, 214, .6); }
.field { display: grid; gap: .15rem; }
.field-label { font: 700 .68rem var(--display); text-transform: uppercase; letter-spacing: .22em; color: #ff8be6; }
.field-value { overflow-wrap: anywhere; }
.accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.accounts li { display: flex; align-items: center; gap: .5rem; }
.games { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.games li { display: flex; justify-content: space-between; gap: 1rem; max-width: 22rem; }
.id-side { display: grid; gap: 1rem; justify-items: stretch; min-width: 200px; }
.verdict.big { display: grid; text-align: center; padding: 1rem; border-radius: 8px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px #3a2f6b; white-space: normal; }
.verdict.big strong { font: 700 3rem/1 var(--display); }
.verdict.big span { font: .85rem var(--sans); color: #f4eefe; margin-top: .4rem; }
.verdict.big small { margin-top: .25rem; color: #a99cc9; }
.id-card .verdict.good strong { color: #3dffb5; text-shadow: 0 0 18px rgba(61, 255, 181, .5); }
.id-card .verdict.mixed strong { color: #ffb43f; }
.id-card .verdict.bad strong { color: #ff3d6e; }
.verdict.none { text-align: center; padding: 1rem; border-radius: 8px; border: 1px dashed #3a2f6b; color: #a99cc9; }
.id-card .ghost { color: #f4eefe; box-shadow: inset 0 0 0 1px #3a2f6b; }
.mrz { padding: .6rem 1.5rem; background: rgba(0, 0, 0, .55); color: #2de2ff; font: .85rem var(--mono); letter-spacing: .28em; white-space: nowrap; overflow: hidden; text-shadow: 0 0 8px rgba(45, 226, 255, .6); }

/* ---------- badges ---------- */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.badge-card { --c: var(--good); display: flex; gap: .8rem; align-items: center; padding: .8rem; border-radius: 8px; background: var(--panel-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); }
.badge-card.style { --c: var(--cyan); }
.badge-card.warn { --c: var(--bad); }
.badge-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--c); box-shadow: inset 0 0 0 2px var(--c), 0 0 18px -4px var(--c); }
.badge-text { display: grid; min-width: 0; }
.badge-text strong { font-family: var(--display); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; }
.badge-text small { color: var(--ink-soft); }

/* ---------- traits ---------- */
.traits { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.trait { display: grid; grid-template-columns: 8.5rem 1fr; grid-template-areas: "name level" "bar bar"; gap: .3rem .6rem; align-items: center; padding: .45rem 0; }
.trait-name { grid-area: name; font-family: var(--display); font-weight: 500; }
.trait-level { grid-area: level; text-align: right; font: 700 .85rem var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--ink); }
.trait-level.muted { color: var(--ink-soft); font-weight: 500; text-transform: none; letter-spacing: 0; }
/* 5 blocks with a 2px gap, one colour; each block fills by quarters. */
.segs { grid-area: bar; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.seg { height: .55rem; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.seg:first-child { border-radius: 4px 0 0 4px; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.seg-fill { display: block; height: 100%; width: 0; background: var(--cyan); box-shadow: 0 0 10px -2px var(--cyan); }
.seg-fill[data-w="1"] { width: 25%; }
.seg-fill[data-w="2"] { width: 50%; }
.seg-fill[data-w="3"] { width: 75%; }
.seg-fill[data-w="4"] { width: 100%; }

/* ---------- reviews ---------- */
.review { border-top: 1px solid var(--line); padding: 1rem 0; }
.review header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.review .who { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-family: var(--display); }
.review p { margin: .6rem 0 0; overflow-wrap: anywhere; }
.review footer { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.hidden-review { opacity: .5; }
.report summary { cursor: pointer; color: var(--ink-soft); }
.report form { margin-top: .5rem; }

/* ---------- PSN code ---------- */
.code { font: 700 2.2rem var(--display); letter-spacing: .2em; text-align: center; padding: 1rem; margin: 1rem 0; border-radius: 8px; background: #120a2c; color: #2de2ff; box-shadow: 0 0 0 1px #2de2ff, 0 0 30px -8px #2de2ff; text-shadow: 0 0 10px #2de2ff; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .4rem; }

/* ---------- confirm dialog ---------- */
.confirm-dialog { background: var(--panel); color: var(--ink); border: 0; border-radius: 8px; box-shadow: var(--neon); padding: 1.25rem; max-width: 380px; }
.confirm-dialog::backdrop { background: rgba(13, 7, 33, .7); }
.confirm-dialog .row { justify-content: flex-end; margin-top: 1rem; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .topbar { gap: .6rem; }
  .brand { font-size: 1.05rem; letter-spacing: .14em; }
  .topbar-right button, .topbar-right .button { padding: .45rem .8rem; font-size: .8rem; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .hero::before { width: 220px; height: 220px; right: -70px; top: 0; }
  .id-body { grid-template-columns: 1fr; padding: 1.1rem; }
  .id-photo { justify-items: start; grid-template-columns: auto auto; align-items: end; }
  .mini-badges { justify-content: flex-start; }
  .id-side { min-width: 0; }
  .id-top { padding: .6rem 1rem; }
  .mrz { padding: .6rem 1rem; }
  .panel { padding: 1.1rem; }
  .panel::before { left: 1.1rem; right: 1.1rem; }
  .search { flex-wrap: wrap; }
}
