@font-face {
  font-family: "Fraunces";
  src: url("./assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("./assets/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0d0b0c;
  --surface: #151314;
  --surface-2: #1b1719;
  --line: #302b2d;
  --line-strong: #4a343b;
  --text: #f5f3f4;
  --muted: #b2adb0;
  --dim: #8a8387;
  --accent: #ff6679;
  --red: #a60920;
  --red-hot: #c10e2a;
  --oxblood: #66101f;
  --steel: #d6d1d4;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    url("./assets/grain.png"),
    radial-gradient(ellipse 60% 50% at 85% -5%, #3a0a1466, transparent 70%),
    radial-gradient(ellipse 40% 35% at 0% 40%, #2a07101f, transparent 70%);
  background-repeat: repeat, no-repeat, no-repeat;
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: #ffb2be; }
[hidden] { display: none !important; }
::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #0d0b0cb8;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid #ffffff0d;
}

.nav-inner {
  max-width: 1220px;
  min-height: 70px;
  margin: auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 10px #a6092066); }
.brand span { font-size: 16px; font-weight: 800; letter-spacing: .18em; }

nav { display: flex; gap: 4px; }

nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
nav a:hover { color: var(--text); background: #ffffff0a; }

main {
  max-width: 1220px;
  margin: auto;
  padding: 0 24px;
}

.hero {
  min-height: min(760px, calc(100vh - 70px));
  padding: 64px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

h1 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(60px, 8.6vw, 124px);
  font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  line-height: .9;
  letter-spacing: -.035em;
}

h1 .line {
  display: block;
  padding-bottom: .04em;
  background: linear-gradient(180deg, #ffffff 0%, var(--steel) 55%, #8f878b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro {
  max-width: 30em;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-emblem {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 500px;
  width: 100%;
  justify-self: center;
}

.ember {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 54%, #ff4a60 0%, #e0142f 20%, #c10e2acc 36%, #a6092066 54%, transparent 72%);
  filter: blur(44px);
  mix-blend-mode: screen;
  animation: ember-breathe 7s ease-in-out infinite;
}

.ring {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1px solid #d6d1d41f;
  box-shadow: 0 0 0 18px #d6d1d405;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  border: 1px dashed #d6d1d414;
  animation: ring-turn 90s linear infinite;
}

.emblem {
  position: relative;
  width: 68%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  perspective: 1100px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: logo-float 6s ease-in-out infinite;
}

.emblem-spin,
.face {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.emblem-spin { will-change: transform; }

.face.front { transform: translateZ(9px); }
.face.back { transform: rotateY(180deg) translateZ(9px); }

.face img,
.face .glare { backface-visibility: hidden; -webkit-backface-visibility: hidden; }

.face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.face .hero-logo {
  transform: translateZ(0);
  filter: drop-shadow(0 0 22px #ff3a5240);
}

.face .glare {
  position: absolute;
  inset: 0;
  transform: translateZ(.6px);
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 25%), #ffffff3d 0%, #ffffff12 22%, transparent 48%);
  -webkit-mask: var(--shape) center / contain no-repeat;
  mask: var(--shape) center / contain no-repeat;
  pointer-events: none;
}
.face.front .glare { --shape: url("./assets/justice-panel.png"); }
.face.back .glare { --shape: url("./assets/dragonborn-mark.png"); }

.emblem:focus-visible { outline-offset: 8px; border-radius: 50%; }

@keyframes ember-breathe {
  0%, 100% { opacity: .7; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes ring-turn { to { transform: rotate(360deg); } }
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes emerge {
  from { opacity: 0; transform: translateY(40px) scale(.92); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes ignite {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: .7; transform: scale(.92); }
}

h1 .line { animation: rise .9s var(--ease-out) both; }
h1 .line:nth-child(2) { animation-delay: .08s; }
h1 .line:nth-child(3) { animation-delay: .16s; }
.intro { animation: rise .9s var(--ease-out) .28s both; }
.hero-actions { animation: rise .9s var(--ease-out) .38s both; }
.hero-emblem { animation: emerge 1.3s var(--ease-out) .15s both; }
.ember { animation: ignite 1.6s var(--ease-out) .2s both, ember-breathe 7s ease-in-out 1.8s infinite; }
.stats { animation: rise .9s var(--ease-out) .5s both; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 140px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats > div {
  padding: 28px 24px 26px;
  border-left: 1px solid var(--line);
}
.stats > div:first-child { border-left: 0; padding-left: 0; }

.stats strong {
  display: block;
  min-height: 1.1em;
  font-family: var(--display);
  font-size: clamp(38px, 4.2vw, 56px);
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.stats > div:last-child strong { color: var(--accent); }

.stats strong:empty,
.tabs [data-count]:empty {
  width: 1.8em;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

@keyframes shimmer { to { background-position: -200% 0; } }

h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  line-height: 1.02;
  letter-spacing: -.025em;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 32px;
}

.section-heading > p {
  max-width: 28em;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  text-align: right;
}

.framework { margin-bottom: 150px; }

.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.tier {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 42%);
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.tier-num {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  font-variation-settings: "opsz" 72;
  color: var(--dim);
  text-align: center;
}

.tier h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.tier p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.tier-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.tier-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--oxblood), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease-out);
}

.tier-1 { --fill: 8.33%; }
.tier-2 { --fill: 25%; }
.tier-3 { --fill: 50%; }
.tier-4 { --fill: 75%; }
.tier-5 { --fill: 100%; }
.tier-blacklist { --fill: 100%; }

.tier-2 .tier-bar span { transition-delay: .08s; }
.tier-3 .tier-bar span { transition-delay: .16s; }
.tier-4 .tier-bar span { transition-delay: .24s; }
.tier-5 .tier-bar span { transition-delay: .32s; }
.tier-blacklist .tier-bar span { transition-delay: .44s; }

.ladder.in-view .tier-bar span,
.no-js .tier-bar span { transform: scaleX(1); }

.tier-blacklist .tier-num { color: var(--accent); font-size: 36px; }
.tier-blacklist h3 { color: var(--accent); }
.tier-blacklist .tier-bar { overflow: visible; background: transparent; box-shadow: none; }
.tier-blacklist .tier-bar span {
  right: -24px;
  width: auto;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-hot) 55%, #ff4a60 88%, #ff4a6000 100%);
  box-shadow: 0 0 18px #e0142f99, 0 0 42px #c10e2a55;
}

.database { margin-bottom: 140px; }

#search-form { margin-bottom: 18px; }

.search-row { display: flex; gap: 10px; }

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--dim);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

input[type="search"] {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
input[type="search"]::placeholder { color: var(--dim); }
input[type="search"]:hover { border-color: var(--line-strong); }
input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px #ff667926;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--red);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--red-hot), var(--red));
  box-shadow: 0 1px 0 #ffffff26 inset, 0 10px 30px -12px #c10e2a;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s var(--ease-out), box-shadow .2s, filter .2s;
}
.button:hover { color: #fff; filter: brightness(1.1); box-shadow: 0 1px 0 #ffffff26 inset, 0 14px 34px -10px #c10e2a; }
.button:active { transform: translateY(1px) scale(.98); }

.button.secondary {
  border-color: var(--line-strong);
  background: #ffffff05;
  box-shadow: none;
  color: var(--text);
}
.button.secondary:hover { background: #ffffff0f; border-color: #6b525a; color: var(--text); filter: none; }

.tabs {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.tab-indicator {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  width: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #7a1426, var(--oxblood));
  box-shadow: 0 0 0 1px #b73b5166 inset, 0 6px 20px -8px #a60920;
  transition: transform .35s var(--ease-out), width .35s var(--ease-out),
    background .25s ease;
  pointer-events: none;
}

.tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: color .2s;
}
.tabs button:hover { color: var(--text); }

.tabs button[data-tab="groupblacklist"] { color: #ff8a9b; }
.tabs button[data-tab="groupblacklist"]:hover { color: #ffb2be; }
.tabs button[data-tab="groupbanlist"] { color: #b3273d; }
.tabs button[data-tab="groupbanlist"]:hover { color: #d3425a; }

.tabs button[aria-selected="true"] { color: #fff; }

.tabs [data-count] {
  display: inline-block;
  min-width: 1.6em;
  min-height: 1.3em;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ffffff12;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.new-badge {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #2a0a10;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  vertical-align: middle;
}

.records {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.record-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 650;
  font-variation-settings: "opsz" 48;
}

.record-controls { display: flex; align-items: center; gap: 14px; }
.record-controls p { margin: 0; color: var(--muted); font-size: 14px; }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background-color .2s, border-color .2s;
}
.text-button:hover { background: #ffffff0a; border-color: var(--line-strong); }
.text-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#refresh:disabled svg { animation: ring-turn .9s linear infinite; }

.table-wrap { position: relative; overflow-x: auto; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.pager p { margin: 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.pager-group { display: flex; align-items: center; gap: 8px; }
.pager-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
#pager-input {
  width: 4.5em;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  text-align: center;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
#pager-input:hover { border-color: var(--line-strong); }
#pager-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #ff667926;
}
#pager-input::-webkit-outer-spin-button,
#pager-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#pager-input[type="number"] { -moz-appearance: textfield; }
.pager button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pager button:disabled { opacity: .35; cursor: not-allowed; }
.pager button:disabled:hover { background: transparent; border-color: var(--line); }
.pager button.icon-only { padding: 0 10px; }
.pager button.icon-only svg { width: 17px; height: 17px; margin: 0 -3px; }

table { width: 100%; border-collapse: collapse; text-align: left; }

th {
  padding: 13px 18px;
  background: var(--oxblood);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

th[aria-sort] {
  cursor: pointer;
  user-select: none;
}
th[aria-sort]:hover { background: #7a1426; }
th .sort-arrow {
  display: inline-block;
  margin-left: 5px;
  opacity: .55;
  font-size: 11px;
}
th[aria-sort="ascending"] .sort-arrow,
th[aria-sort="descending"] .sort-arrow { opacity: 1; }

td {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  min-width: 120px;
  max-width: 420px;
  overflow-wrap: anywhere;
  vertical-align: middle;
  transition: background-color .15s;
}

tbody tr:hover td { background: var(--surface-2); }
td a { text-decoration: none; font-weight: 600; }
td a:hover { text-decoration: underline; }

td img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  margin-right: 10px;
  vertical-align: middle;
}

.status-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: #1f3b2a;
  color: #8ee3ad;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.status-active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.state {
  padding: 64px 20px;
  text-align: center;
  color: var(--muted);
}
.state.error { color: #ffa6b5; }

.state.loading {
  position: relative;
  padding: 24px 20px 30px;
  color: transparent;
}
.state.loading::before {
  content: "";
  display: block;
  height: 176px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0%, #ffffff0a 50%, transparent 100%) 0 0 / 200% 100%,
    repeating-linear-gradient(180deg, var(--surface-2) 0 28px, transparent 28px 44px);
  animation: shimmer 1.4s linear infinite;
}

.updated { margin-top: 14px; color: var(--dim); font-size: 13px; }

.appeals { margin-bottom: 110px; }

.appeal-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 48px;
  border: 1px solid #503137;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 120% at 100% 0%, #a6092033, transparent 60%),
    #1c1315;
  overflow: hidden;
}

.appeal-card h2 { font-size: clamp(30px, 3.4vw, 42px); }

.appeal-card p {
  max-width: 34em;
  margin: 12px 0 0;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px max(24px, calc((100vw - 1172px) / 2));
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
}
footer span:first-child { color: var(--muted); font-weight: 600; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 30;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg);
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 48px; }
  .hero-emblem { order: -1; max-width: 300px; }
  .hero-copy { text-align: left; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 120px; }
  .nav-inner { flex-wrap: wrap; padding: 10px 16px; gap: 6px; min-height: 0; }
  nav { width: 100%; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 0; }
  nav a { padding: 6px 10px; font-size: 13px; }
  main { padding: 0 18px; }
  .hero { padding: 28px 0 24px; gap: 8px; }
  .hero-emblem { max-width: 220px; }
  h1 { font-size: clamp(52px, 15vw, 76px); }
  .intro { font-size: 17px; }
  .hero-actions .button { flex: 1; }
  .stats { margin-bottom: 90px; }
  .stats > div { padding: 20px 16px; }
  .framework, .database { margin-bottom: 96px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-heading > p { text-align: left; }
  .tier { grid-template-columns: 40px minmax(0, 1fr); row-gap: 12px; padding: 18px 0; }
  .tier-bar { grid-column: 2; }
  .tier-blacklist .tier-bar span { right: -18px; }
  .search-row { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .search-row .button { flex: 1; }
  .tabs { display: flex; flex-wrap: wrap; }
  .tab-indicator { display: none; }
  .tabs button {
    flex: 1 1 auto;
    justify-content: center;
    padding: 9px 8px;
    font-size: 14px;
  }
  .tabs button[aria-selected="true"] {
    background: linear-gradient(180deg, #7a1426, var(--oxblood));
    box-shadow: 0 0 0 1px #b73b5166 inset;
  }
  .record-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  .record-controls { width: 100%; flex-wrap: wrap; row-gap: 8px; justify-content: flex-start; }
  .record-controls p { flex-basis: 100%; }
  #refresh { padding: 0 10px; font-size: 13px; }
  .pager { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  .pager p { flex-basis: 100%; text-align: center; order: -1; }
  .pager-status { flex-basis: 100%; justify-content: center; order: -1; }
  .appeal-card { flex-direction: column; align-items: stretch; padding: 30px 24px; }
  footer { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .tier-bar span { transform: scaleX(1); }
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -8px 0 0;
}
.doc-meta img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px #a6092059);
}
.doc-meta p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.doc-intro {
  max-width: 40em;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.protocol-section { margin-bottom: 96px; }
.protocol-section:last-of-type { margin-bottom: 72px; }

.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 48px;
  border-top: 1px solid var(--line);
}
.rule-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
  font-size: 16px;
}
.rule-list .num {
  flex: none;
  min-width: 1.6em;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  font-variation-settings: "opsz" 48;
  color: var(--dim);
}

.protocol-note {
  max-width: 40em;
  margin: 28px 0 0;
  color: var(--dim);
  font-size: 15px;
  font-style: italic;
}
.protocol-close {
  max-width: 46em;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.protocol-close strong { color: var(--text); }

.tier-details {
  display: grid;
  gap: 16px;
}
.tier-detail {
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.tier-detail h3 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tier-detail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tier-detail li {
  position: relative;
  padding-left: 20px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.55;
}
.tier-detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-hot);
}
.tier-detail li strong { color: var(--accent); font-weight: 700; }
.tier-detail ul ul {
  margin-top: 8px;
  padding-left: 4px;
}
.tier-detail ul ul li { font-size: 14.5px; color: var(--muted); }
.tier-detail ul ul li::before {
  width: 4px;
  height: 4px;
  background: var(--dim);
}

.blacklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.blacklist-card {
  padding: 22px 26px;
  border-radius: var(--radius);
}
.blacklist-card.appealable {
  border: 1px solid var(--line);
  background: var(--surface);
}
.blacklist-card.unappealable {
  border: 1px solid #6b2430;
  background: radial-gradient(ellipse 100% 100% at 0% 0%, #a6092026, transparent 60%), var(--surface);
}
.blacklist-card h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.blacklist-card.appealable h3 { color: var(--muted); }
.blacklist-card.unappealable h3 { color: var(--accent); }
.blacklist-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.blacklist-card li {
  position: relative;
  padding-left: 20px;
  font-size: 15.5px;
  line-height: 1.55;
}
.blacklist-card.appealable li::before,
.blacklist-card.unappealable li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.blacklist-card.appealable li::before { background: var(--dim); }
.blacklist-card.unappealable li::before { background: var(--red-hot); }

.probation-card {
  padding: 36px 40px;
  border: 1px solid #503137;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 120% at 100% 0%, #a6092033, transparent 60%),
    #1c1315;
}
.probation-card p {
  max-width: 42em;
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}
.probation-card p:last-of-type { margin-bottom: 26px; }
.probation-card strong { color: var(--text); }

@media (max-width: 800px) {
  .rule-list { columns: 1; }
  .blacklist-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .protocol-section { margin-bottom: 64px; }
  .doc-meta { flex-wrap: wrap; }
  .probation-card { padding: 26px 22px; }
}
