:root {
  --bg: #0b0d0f;
  --surface: #111418;
  --surface-2: #171b20;
  --ink: #f5f2eb;
  --muted: #9ea5ad;
  --line: rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.22);
  --signal: #ff5a36;
  --signal-soft: rgba(255,90,54,.15);
  --good: #b9f2d3;
  --shadow: 0 22px 70px rgba(0,0,0,.28);
  --radius: 22px;
  --content: 1440px;
  --grid-size: 56px;
}

html[data-theme="light"] {
  --bg: #eeeae2;
  --surface: #f7f3eb;
  --surface-2: #e6e1d8;
  --ink: #17191c;
  --muted: #686e74;
  --line: rgba(15,17,20,.12);
  --line-strong: rgba(15,17,20,.22);
  --signal-soft: rgba(255,90,54,.12);
  --shadow: 0 22px 70px rgba(44,35,22,.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  letter-spacing: -.01em;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg);
  background-size: var(--grid-size) var(--grid-size);
  background-position: -1px -1px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,.22),
      transparent 22%,
      transparent 76%,
      rgba(0,0,0,.18)
    );
  z-index: -1;
}

html[data-theme="light"] body::before {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.10),
      transparent 24%,
      transparent 78%,
      rgba(0,0,0,.045)
    );
}

button,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.shell {
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
}

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}

/*
  Light mode deliberately stays translucent instead of becoming a flat,
  cream-coloured slab. The grid/background can still breathe through it.
*/
html[data-theme="light"] .site-header {
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  box-shadow: 0 10px 35px rgba(25, 22, 17, .035);
}

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-size: 18px;
  font-weight: 790;
  letter-spacing: -.035em;
}

.brand-sub {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .11em;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.source-badge,
.ghost-btn,
.theme-btn {
  height: 38px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.source-badge {
  padding: 0 14px;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px var(--signal-soft);
}

.ghost-btn {
  padding: 0 15px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.theme-btn {
  width: 38px;
  cursor: pointer;
  font-size: 18px;
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

.hero {
  padding: 82px 0 46px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr);
  gap: 58px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--signal);
}

h1 {
  margin: 0;
  max-width: 930px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 500;
  font-size: clamp(54px, 7.2vw, 114px);
  line-height: .88;
  letter-spacing: -.065em;
}

h1 em {
  font-style: normal;
  color: var(--signal);
}

.hero-note {
  max-width: 690px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
}

.hero-note strong {
  color: var(--ink);
  font-weight: 700;
}

.hero-scorecard {
  border-top: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-stat {
  padding: 19px 0 14px;
  border-bottom: 1px solid var(--line);
  min-height: 106px;
}

.hero-stat:nth-child(odd) {
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.hero-stat:nth-child(even) {
  padding-left: 22px;
}

.hero-stat-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
  margin-bottom: 8px;
}

.hero-stat-value {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 54px;
  line-height: .82;
  letter-spacing: -.06em;
}

.hero-stat-value.signal {
  color: var(--signal);
}

.hero-stat-meta {
  color: var(--muted);
  font-size: 10px;
  margin-top: 7px;
}

/* -------------------------------------------------------------------------- */
/* Filters                                                                    */
/* -------------------------------------------------------------------------- */

.control-deck {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 24px;
}

.periods,
.verdicts,
.sorts {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.control-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-right: 2px;
}

.chip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: .18s ease;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--line);
}

.chip.active {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

.search {
  position: relative;
  justify-self: end;
  width: min(100%, 350px);
}

.search input {
  width: 100%;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--ink);
  outline: 0;
  padding: 0 43px 0 16px;
}

.search input:focus {
  border-color: var(--line-strong);
}

.search::after {
  content: "⌕";
  position: absolute;
  right: 16px;
  top: 8px;
  font-size: 22px;
  color: var(--muted);
  pointer-events: none;
}

.sort-deck {
  padding: 16px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.definition {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  max-width: 620px;
}

.definition strong {
  color: var(--ink);
}

/* -------------------------------------------------------------------------- */
/* Main dashboard                                                             */
/* -------------------------------------------------------------------------- */

.dashboard {
  padding: 20px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(330px, .52fr);
  gap: 20px;
  align-items: start;
}

.panel {
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ranking-panel {
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  overflow: hidden;
}

.panel-head {
  min-height: 79px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

.panel-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin-bottom: 5px;
}

.panel-title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.035em;
}

.panel-meta {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.table-head {
  display: grid;
  grid-template-columns: 54px minmax(170px,1fr) 68px 68px 68px 68px 82px 96px;
  min-height: 46px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  padding-right: 10px;
}

.table-head > div:nth-child(n+3) {
  text-align: right;
}

.ranking-list {
  display: grid;
}

.rank-row {
  --bar: 50%;
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(170px,1fr) 68px 68px 68px 68px 82px 96px;
  align-items: center;
  min-height: 80px;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
  transition: background .18s ease;
  padding-right: 10px;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: var(--bar);
  background: linear-gradient(90deg, var(--signal-soft), transparent);
  opacity: .75;
  transform-origin: left;
  animation: barIn .7s cubic-bezier(.22,.8,.22,1) both;
}

.rank-row:hover {
  background: color-mix(in srgb, var(--surface-2) 64%, transparent);
}

@keyframes barIn {
  from {
    transform: scaleX(0);
    opacity: 0;
  }

  to {
    transform: scaleX(1);
    opacity: .75;
  }
}

.rank-no {
  color: var(--muted);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 20px;
  text-align: center;
}

.outlet {
  padding: 0 14px;
  min-width: 0;
}

.outlet-name {
  font-weight: 780;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outlet-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.metric {
  text-align: right;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 25px;
  line-height: 1;
}

.metric.primary {
  color: var(--signal);
  font-size: 32px;
}

.metric.rate {
  font-size: 20px;
}

.metric small {
  display: block;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--muted);
  font-size: 8px;
  margin-top: 5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.row-action {
  display: flex;
  justify-content: flex-end;
}

.open-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: .18s ease;
}

.open-btn:hover {
  border-color: var(--signal);
  color: var(--signal);
  transform: translateX(2px);
}

/* -------------------------------------------------------------------------- */
/* Side panels                                                                */
/* -------------------------------------------------------------------------- */

.side-stack {
  display: grid;
  gap: 20px;
}

.latest-panel {
  border-radius: var(--radius) var(--radius) 0 var(--radius);
  overflow: hidden;
}

.case-list {
  display: grid;
}

.case-card {
  padding: 18px 20px 19px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  display: grid;
  gap: 9px;
  transition: background .18s ease;
}

.case-card:last-child {
  border-bottom: 0;
}

.case-card:hover {
  background: var(--surface-2);
}

.case-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 760;
}

.case-verdict {
  color: var(--signal);
}

.case-verdict.no-breach {
  color: var(--good);
}

.case-title {
  font-size: 14px;
  line-height: 1.38;
  font-weight: 700;
}

.case-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.method-panel {
  padding: 24px 22px 22px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.method-panel::after {
  content: "PFU";
  position: absolute;
  right: -10px;
  bottom: -25px;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 110px;
  letter-spacing: -.08em;
  color: color-mix(in srgb, var(--ink) 5%, transparent);
  pointer-events: none;
}

.method-title {
  margin: 0 0 9px;
  font-size: 16px;
}

.method-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  max-width: 390px;
}

.method-copy strong {
  color: var(--ink);
}

.method-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.method-list li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
}

.method-list b {
  color: var(--ink);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 44px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.footer b {
  color: var(--ink);
}

/* -------------------------------------------------------------------------- */
/* Drawer                                                                     */
/* -------------------------------------------------------------------------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(6px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}

.drawer {
  position: fixed;
  z-index: 81;
  right: 0;
  top: 0;
  height: 100dvh;
  width: min(690px,94vw);
  background: var(--bg);
  border-left: 1px solid var(--line-strong);
  transform: translateX(102%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
  box-shadow: -30px 0 90px rgba(0,0,0,.35);
}

body.drawer-open .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.drawer-open .drawer {
  transform: translateX(0);
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 22px 24px;
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.drawer-title {
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 34px;
  letter-spacing: -.045em;
}

.drawer-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
}

.drawer-body {
  padding: 24px;
}

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

.drawer-stat {
  padding: 18px 14px 16px 0;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.drawer-stat:not(:first-child) {
  padding-left: 14px;
}

.drawer-stat:last-child {
  border-right: 0;
}

.drawer-stat-label {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  margin-bottom: 7px;
}

.drawer-stat-number {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 38px;
  line-height: .9;
  letter-spacing: -.05em;
}

.drawer-stat-number.signal {
  color: var(--signal);
}

.drawer-stat-note {
  color: var(--muted);
  font-size: 9px;
  margin-top: 6px;
}

.status-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0 8px;
}

.status-pill {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.drawer-cases {
  display: grid;
  margin-top: 8px;
}

.drawer-case {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-case-id {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.drawer-case h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.drawer-case p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.case-link {
  color: var(--signal);
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 52px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-scorecard {
    max-width: 720px;
  }

  .control-deck {
    grid-template-columns: 1fr 1fr;
  }

  .search {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .side-stack {
    grid-template-columns: 1fr 1fr;
  }

  .table-head,
  .rank-row {
    grid-template-columns: 50px minmax(150px,1fr) 64px 64px 64px 64px 80px 90px;
  }
}

@media (max-width: 780px) {
  .shell {
    width: min(calc(100% - 20px),var(--content));
  }

  .topbar {
    height: 68px;
  }

  .brand-sub,
  .ghost-btn,
  .source-badge span:last-child {
    display: none;
  }

  .source-badge {
    width: 38px;
    padding: 0;
  }

  .hero {
    padding: 54px 0 36px;
  }

  h1 {
    font-size: clamp(54px,18vw,78px);
  }

  .hero-note {
    font-size: 15px;
  }

  .hero-scorecard {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stat-value {
    font-size: 44px;
  }

  .control-deck {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .search {
    grid-column: auto;
    order: -1;
  }

  .sort-deck {
    align-items: flex-start;
  }

  .dashboard {
    padding-top: 18px;
  }

  .side-stack {
    grid-template-columns: 1fr;
  }

  .table-head {
    display: none;
  }

  .rank-row {
    grid-template-columns: 40px minmax(0,1fr) 54px 54px 42px;
    min-height: 78px;
    padding-right: 8px;
  }

  .rank-row .cases-total,
  .rank-row .violation-count,
  .rank-row .criticism-count {
    display: none;
  }

  .metric {
    font-size: 23px;
  }

  .metric.primary {
    font-size: 29px;
  }

  .metric.rate {
    font-size: 17px;
  }

  .metric small {
    display: none;
  }

  .open-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 0;
  }

  .open-btn::after {
    content: "↗";
    font-size: 14px;
  }

  .outlet {
    padding: 0 7px;
  }

  .outlet-name {
    font-size: 15px;
  }

  .drawer-stats {
    grid-template-columns: 1fr 1fr;
  }

  .drawer-stat:nth-child(2) {
    border-right: 0;
  }

  .drawer-stat:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .drawer-case {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer {
    flex-direction: column;
  }
}



/* -------------------------------------------------------------------------- */
/* v3 data states                                                             */
/* -------------------------------------------------------------------------- */

.source-badge {
  padding: 0 14px;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 16%, transparent);
}

.source-badge.is-error .source-dot {
  background: var(--signal);
  box-shadow: 0 0 0 5px var(--signal-soft);
}

.period-caption {
  color: var(--muted);
  font-size: 11px;
  margin-left: auto;
}

.loading-state,
.latest-loading {
  color: var(--muted);
  font-size: 12px;
}

.loading-state {
  padding: 44px 24px;
  text-align: center;
}

.latest-loading {
  padding: 24px 20px;
}

.drawer-stats-five {
  grid-template-columns: repeat(5, 1fr);
}

.drawer-stats-five .drawer-stat {
  padding-right: 10px;
}

.drawer-stats-five .drawer-stat:not(:first-child) {
  padding-left: 10px;
}

.drawer-case-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.drawer-case-status.violation,
.drawer-case-status.criticism {
  color: var(--signal);
}

.drawer-case-status.noViolation {
  color: var(--good);
}

.drawer-case-date {
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}

.vvp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}

.vvp-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.vvp-chip.violated {
  color: var(--signal);
  border-color: color-mix(in srgb, var(--signal) 45%, var(--line));
}

.load-more-btn {
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.load-more-btn:hover {
  border-color: var(--signal);
  color: var(--signal);
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .92em;
}

@media (max-width: 780px) {
  .drawer-stats-five {
    grid-template-columns: 1fr 1fr;
  }

  .drawer-stats-five .drawer-stat {
    border-bottom: 1px solid var(--line);
  }

  .drawer-stats-five .drawer-stat:nth-child(even) {
    border-right: 0;
  }

  .drawer-stats-five .drawer-stat:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
}


/* -------------------------------------------------------------------------- */
/* Pagination                                                                 */
/* -------------------------------------------------------------------------- */

.pagination {
  min-height: 76px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.pagination-summary {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.pagination-controls,
.page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.page-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.page-btn.active {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

.page-btn:disabled {
  opacity: .35;
  cursor: default;
}

.page-gap {
  min-width: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.page-nav {
  padding-inline: 13px;
}

.ranking-panel.is-loading .ranking-list {
  opacity: .42;
  pointer-events: none;
}

.ranking-list {
  transition: opacity .16s ease;
}

.footer-v31 {
  align-items: flex-start;
}

.footer-main {
  max-width: 820px;
}

.footer-contact {
  text-align: right;
  max-width: 360px;
}

.footer-contact a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.footer-contact a:hover {
  color: var(--signal);
}

@media (max-width: 780px) {
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    justify-content: space-between;
  }

  .page-numbers {
    flex: 1;
    justify-content: center;
  }

  .page-nav {
    font-size: 0;
    width: 36px;
    padding: 0;
  }

  #prevPageButton::after {
    content: "←";
    font-size: 14px;
  }

  #nextPageButton::after {
    content: "→";
    font-size: 14px;
  }

  .footer-contact {
    text-align: left;
  }
}


/* -------------------------------------------------------------------------- */
/* Tenketanken / social / visitor counter                                     */
/* -------------------------------------------------------------------------- */

.x-follow-btn {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 740;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.x-follow-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
}

.x-mark {
  font-size: 16px;
  line-height: 1;
  transform: translateY(-.5px);
}

.footer-v32 {
  align-items: flex-start;
}

.footer-main {
  max-width: 850px;
}

.footer-brandline {
  margin-bottom: 8px;
}

.footer-disclaimer {
  max-width: 780px;
  color: var(--muted);
}

.footer-contact {
  text-align: right;
  max-width: 390px;
}

.footer-contact-links {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.footer-contact a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.footer-contact a:hover {
  color: var(--signal);
}

.visit-counter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .015em;
  background: color-mix(in srgb, var(--surface) 66%, transparent);
}

.visit-counter #visitCount {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.visit-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px var(--signal-soft);
}

@media (max-width: 960px) {
  .x-follow-label {
    display: none;
  }

  .x-follow-btn {
    width: 38px;
    padding: 0;
  }
}

@media (max-width: 780px) {
  .footer-contact {
    text-align: left;
  }

  .footer-contact-links {
    justify-content: flex-start;
  }
}

/* -------------------------------------------------------------------------- */
/* Ranking transitions                                                        */
/* -------------------------------------------------------------------------- */

/*
  Search/filter/sort uses the View Transitions API when supported.
  Each medium gets a stable transition name in app.js, so rows move smoothly
  between positions instead of disappearing and being rebuilt abruptly.
*/

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

::view-transition-group(*) {
  animation-duration: 280ms;
  animation-timing-function: cubic-bezier(.22, .8, .22, 1);
}

::view-transition-old(*) {
  animation-timing-function: ease-out;
}

::view-transition-new(*) {
  animation-timing-function: ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
