:root {
  color-scheme: dark;
  --bg: #07080b;
  --bg-deep: #030406;
  --panel: #10131a;
  --panel-2: #151922;
  --panel-3: #1b202b;
  --line: #2a303d;
  --line-soft: #1c212c;
  --text: #f4f6f8;
  --muted: #a4adbd;
  --dim: #6f7a8d;
  --red: #e31930;
  --red-2: #ff3149;
  --cyan: #24c8db;
  --green: #18d37b;
  --amber: #ffbd3c;
  --radius: 8px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  --font-body: "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-display: Bahnschrift, "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(227, 25, 48, 0.08), transparent 32%, rgba(36, 200, 219, 0.06)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 88px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(227, 25, 48, 0.12) 40%, transparent 48% 68%, rgba(36, 200, 219, 0.11) 74%, transparent 84%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 94px);
  background-size: 190% 190%, 120px 120px;
  opacity: 0.7;
  animation: backgroundSweep 18s linear infinite;
}

@keyframes backgroundSweep {
  0% {
    background-position: 0% 50%, 0 0;
  }
  100% {
    background-position: 180% 50%, 120px 0;
  }
}

@keyframes floatConsole {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes scanLine {
  0% {
    transform: translateY(-120%);
  }
  100% {
    transform: translateY(480%);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes entryBrandIn {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 18px));
  }
  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 18px rgba(227, 25, 48, 0.38));
  }
  50% {
    transform: translateY(-8px) scale(1.018);
    filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.34));
  }
}

@keyframes lineDrift {
  0% {
    transform: translateX(-24%);
  }
  100% {
    transform: translateX(24%);
  }
}

@keyframes borderTrace {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

h1,
h2,
h3,
.rd-nav nav a,
.rd-nav nav .nav-current,
.primary-action,
.secondary-action,
.nav-cta,
.eyebrow {
  font-family: var(--font-display);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.rd-nav,
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 76px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 12px max(24px, calc((100vw - 1400px) / 2));
  border-bottom: 1px solid var(--line-soft);
  background: rgba(5, 6, 9, 0.94);
  backdrop-filter: blur(16px);
}

.rd-nav::after,
.topbar::after {
  content: "";
  position: absolute;
  left: max(24px, calc((100vw - 1400px) / 2));
  right: max(24px, calc((100vw - 1400px) / 2));
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 25, 48, 0.5), rgba(255, 255, 255, 0.32), rgba(36, 200, 219, 0.38), transparent);
  animation: lineDrift 9s ease-in-out infinite alternate;
}

.rd-brand,
.brand-mark {
  width: 198px;
  display: inline-flex;
  align-items: center;
}

.rd-brand img,
.brand-mark img {
  width: 190px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 12px rgba(227, 25, 48, 0.18));
  transition: transform 220ms var(--ease), filter 220ms var(--ease);
}

.rd-brand:hover img,
.brand-mark:hover img {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 18px rgba(227, 25, 48, 0.34));
}

.rd-nav nav,
.top-nav,
.top-actions {
  display: flex;
  align-items: center;
}

.rd-nav nav,
.top-nav {
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rd-nav nav a,
.rd-nav nav .nav-current,
.top-nav a,
.top-nav .nav-current {
  position: relative;
  overflow: hidden;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  color: #cbd2df;
  font-size: 13px;
  font-weight: 800;
  transition:
    color 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    transform 180ms var(--ease);
}

.rd-nav nav a::after,
.top-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease);
}

.rd-nav nav .nav-current,
.top-nav .nav-current {
  border-color: rgba(227, 25, 48, 0.42);
  background: rgba(227, 25, 48, 0.1);
  color: var(--text);
  cursor: default;
}

.rd-nav nav .nav-current::after,
.top-nav .nav-current::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--cyan));
}

.rd-nav nav a:hover,
.rd-nav nav a.is-active,
.top-nav a:hover,
.top-nav a.is-active {
  border-color: rgba(227, 25, 48, 0.42);
  background: rgba(227, 25, 48, 0.1);
  color: var(--text);
  transform: translateY(-1px);
}

.rd-nav nav a:hover::after,
.rd-nav nav a.is-active::after,
.top-nav a:hover::after,
.top-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-cta,
.primary-action,
.blue-button {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  background: linear-gradient(180deg, var(--red-2), var(--red));
  color: #080a0e;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 12px 26px rgba(227, 25, 48, 0.22);
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    filter 180ms var(--ease);
}

.nav-cta::before,
.primary-action::before,
.blue-button::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.36) 45%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 520ms var(--ease);
}

.nav-cta:hover,
.primary-action:hover,
.blue-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(227, 25, 48, 0.32);
  filter: saturate(1.08);
}

.nav-cta:hover::before,
.primary-action:hover::before,
.blue-button:hover::before {
  transform: translateX(120%);
}

.secondary-action,
.dark-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  background: #11151d;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.secondary-action:hover,
.dark-button:hover {
  border-color: rgba(36, 200, 219, 0.48);
  background: rgba(36, 200, 219, 0.08);
  box-shadow: 0 12px 26px rgba(36, 200, 219, 0.12);
  transform: translateY(-2px);
}

.wide-action {
  width: 100%;
  min-height: 56px;
  font-size: 15px;
}

.site-shell main,
.admin-main,
.text-main {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
}

.hero-band {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  align-items: center;
  gap: 46px;
  padding: 72px 0 46px;
  animation: riseIn 520ms var(--ease) both;
}

.entry-page main,
.auth-page main {
  width: 100%;
}

.entry-auth-section,
.auth-main {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 77px);
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(20, 11, 28, 0.82), rgba(6, 8, 13, 0.96) 48%, rgba(3, 23, 27, 0.88)),
    radial-gradient(1200px 500px at 8% 50%, rgba(227, 25, 48, 0.16), transparent 58%),
    var(--bg);
}

.entry-auth-section::before,
.auth-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.04) 44%, transparent 52%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 112px);
  background-size: 220% 100%, 112px 112px;
  animation: backgroundSweep 18s linear infinite;
}

.entry-auth-section {
  grid-template-columns: 1fr;
  place-items: center;
  padding: clamp(52px, 7vw, 94px) max(24px, calc((100vw - 1400px) / 2));
}

.entry-brand-panel {
  position: absolute;
  left: max(24px, calc((100vw - 1400px) / 2));
  top: 52%;
  z-index: 0;
  width: min(540px, 42vw);
  transform: translateY(-50%);
  display: grid;
  gap: 16px;
  pointer-events: none;
  animation: entryBrandIn 640ms var(--ease) both;
}

.entry-logo-frame {
  position: relative;
  width: min(520px, 100%);
  min-height: 156px;
  display: grid;
  align-items: center;
}

.entry-logo-frame::before,
.entry-logo-frame::after {
  content: "";
  position: absolute;
  inset: 18% 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(227, 25, 48, 0.24), rgba(255, 255, 255, 0.2), transparent);
  filter: blur(18px);
  transform: skewX(-12deg);
}

.entry-logo-frame::after {
  inset: 28% 14% 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: lineDrift 6s ease-in-out infinite alternate;
}

.entry-glow-logo {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  animation: logoBreathe 7s ease-in-out infinite;
}

.entry-brand-panel h1 {
  margin: 0;
  max-width: 560px;
  font-family: var(--font-display);
  font-size: clamp(34px, 3.3vw, 54px);
  line-height: 0.98;
  text-wrap: balance;
}

.entry-brand-panel p {
  max-width: 520px;
  margin: 0;
  color: #c1c8d5;
  font-size: 16px;
  line-height: 1.62;
}

.entry-brand-panel .hero-actions {
  pointer-events: auto;
}

@media (min-width: 1181px) {
  .entry-brand-panel > .eyebrow,
  .entry-brand-panel h1,
  .entry-brand-panel p,
  .entry-brand-panel .hero-actions {
    display: none;
  }
}

.auth-stage {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 700px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: clamp(48px, 8vw, 96px) 0;
}

.auth-card,
.auth-panel {
  position: relative;
  overflow: hidden;
  width: min(100%, 448px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  background:
    linear-gradient(#12151d, #12151d) padding-box,
    linear-gradient(110deg, rgba(227, 25, 48, 0.7), rgba(255, 255, 255, 0.12), rgba(36, 200, 219, 0.42), rgba(227, 25, 48, 0.6)) border-box;
  background-size: 100% 100%, 220% 100%;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  animation: cardEnter 520ms var(--ease) both, borderTrace 7s linear infinite;
}

.entry-login-card {
  z-index: 1;
  justify-self: center;
  align-self: center;
  animation-delay: 90ms;
}

.register-card {
  width: min(100%, 672px);
}

.auth-card::before,
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, rgba(227, 25, 48, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(36, 200, 219, 0.09), transparent 44%);
  opacity: 0.85;
}

.auth-card::after,
.auth-panel::after {
  content: "";
  position: absolute;
  left: -15%;
  right: -15%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: lineDrift 5.5s ease-in-out infinite alternate;
}

.auth-card > *,
.auth-panel > * {
  position: relative;
  z-index: 1;
}

.auth-card-heading {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 30px;
  text-align: center;
}

.auth-card-heading .auth-mark {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 22px rgba(227, 25, 48, 0.36));
}

.auth-card-heading > span {
  color: #8f99aa;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.auth-card-heading h1,
.auth-card-heading h2 {
  margin: 0;
  color: #f7f8fb;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1;
  text-transform: uppercase;
}

.auth-card-heading h1 span,
.auth-card-heading h2 span {
  color: #ff3149;
  text-shadow: 0 0 18px rgba(227, 25, 48, 0.42);
}

.auth-card-heading p {
  margin: 0;
  color: #8f99aa;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.register-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.register-form .check-row,
.register-form .wide-action {
  grid-column: 1 / -1;
}

.auth-form label {
  display: grid;
  gap: 9px;
  color: #838d9f;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.input-shell {
  position: relative;
  min-height: 56px;
  border: 1px solid #343946;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  background: rgba(28, 31, 40, 0.92);
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.input-shell:focus-within {
  border-color: rgba(227, 25, 48, 0.74);
  background: rgba(31, 35, 45, 0.98);
  box-shadow: 0 0 0 3px rgba(227, 25, 48, 0.14), 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.input-glyph {
  display: grid;
  place-items: center;
  color: #778297;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 950;
}

.input-shell input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 16px 0 0;
}

.input-shell input::placeholder {
  color: #969daa;
}

.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  color: #c3cad6 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-transform: none !important;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.check-row a,
.auth-switch-copy a {
  color: #ff5d6f;
  font-weight: 950;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 34px 0 28px;
  color: #6f7a8d;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line-soft);
}

.discord-auth-button {
  width: 100%;
  min-height: 58px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #6976ff, #5865f2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 16px 32px rgba(88, 101, 242, 0.28);
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    filter 180ms var(--ease);
}

.discord-auth-button::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 38%, #fff 0 2px, transparent 2.5px),
    radial-gradient(circle at 65% 38%, #fff 0 2px, transparent 2.5px),
    linear-gradient(135deg, #5865f2, #3f49d6);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.2);
}

.discord-auth-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(88, 101, 242, 0.36);
  filter: saturate(1.08);
}

.auth-switch-copy,
.auth-global-status {
  margin: 24px 0 0;
  color: #7e8798;
  text-align: center;
  font-size: 13px;
  font-weight: 750;
}

.auth-global-status {
  width: min(100%, 672px);
  margin: 18px auto 0;
  min-height: 18px;
  color: #ff7d8c;
}

.account-shell {
  display: grid;
  padding-bottom: 72px;
}

.account-profile {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.account-avatar {
  width: 84px;
  aspect-ratio: 1;
  border: 1px solid rgba(227, 25, 48, 0.44);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(227, 25, 48, 0.55), rgba(12, 15, 21, 0.72)),
    #151922;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 18px 36px rgba(227, 25, 48, 0.18);
}

.account-profile h2 {
  margin: 0;
  font-size: 30px;
}

.account-profile p {
  margin: 6px 0 0;
  color: var(--muted);
}

.account-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.eyebrow {
  width: fit-content;
  border: 1px solid rgba(227, 25, 48, 0.42);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: #ff7281;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2,
.page-hero h1,
.admin-title h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p,
.section-heading p,
.page-hero p,
.admin-title p {
  max-width: 760px;
  margin: 0;
  color: #b4bdca;
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions,
.dialog-actions,
.editor-actions,
.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ops-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 360px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(227, 25, 48, 0.08), transparent),
    #0d1016;
  box-shadow: var(--shadow);
  animation: floatConsole 7s ease-in-out infinite;
}

.ops-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 90px;
  background: linear-gradient(180deg, rgba(36, 200, 219, 0.13), transparent);
  opacity: 0.65;
  animation: scanLine 6s linear infinite;
}

.ops-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.ops-header span,
.user-pill span,
.row-thumb span {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--red);
  color: #080a0e;
  font-weight: 950;
}

.ops-header strong {
  font-size: 15px;
  text-transform: uppercase;
}

.terminal-lines {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  font-family: Consolas, "Segoe UI Mono", monospace;
}

.terminal-lines p {
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 14px;
  background: #080b10;
  color: #cfd6e2;
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease);
}

.terminal-lines p:hover {
  border-color: rgba(36, 200, 219, 0.38);
  background: #0c1118;
  transform: translateX(4px);
}

.terminal-lines span {
  color: var(--cyan);
  margin-right: 10px;
}

.system-strip,
.workflow-grid,
.service-grid,
.info-band,
.doc-grid,
.policy-layout,
.route-grid,
.compact-flow,
.home-panel-row,
.delivery-split {
  display: grid;
  gap: 16px;
}

.system-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 52px;
}

.system-strip article,
.workflow-grid article,
.service-grid article,
.doc-panel,
.resource-card,
.showcase-card,
.update-row,
.empty-state,
.no-match,
.route-card,
.home-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 26, 0.92);
  box-shadow: var(--shadow);
  transition:
    transform 220ms var(--ease),
    border-color 220ms var(--ease),
    background 220ms var(--ease),
    box-shadow 220ms var(--ease);
}

.system-strip article:hover,
.workflow-grid article:hover,
.service-grid article:hover,
.doc-panel:hover,
.resource-card:hover,
.showcase-card:hover,
.update-row:hover,
.empty-state:hover,
.no-match:hover,
.route-card:hover,
.home-panel:hover {
  border-color: rgba(227, 25, 48, 0.42);
  background: rgba(18, 23, 32, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(-5px);
}

.system-strip article,
.workflow-grid article,
.service-grid article,
.route-card,
.home-panel {
  padding: 20px;
}

.route-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-card {
  min-height: 230px;
  display: grid;
  align-content: space-between;
  gap: 16px;
}

.route-card::before,
.home-panel::before,
.doc-panel::before,
.resource-card::before,
.showcase-card::before,
.update-row::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(227, 25, 48, 0.12), transparent 38%, rgba(36, 200, 219, 0.08));
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.route-card:hover::before,
.home-panel:hover::before,
.doc-panel:hover::before,
.resource-card:hover::before,
.showcase-card:hover::before,
.update-row:hover::before {
  opacity: 1;
}

.route-card span {
  width: fit-content;
  border: 1px solid rgba(36, 200, 219, 0.42);
  border-radius: var(--radius);
  padding: 7px 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.route-card strong {
  display: block;
  margin-top: 18px;
  font-size: 28px;
}

.route-card p,
.home-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.compact-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.compact-flow article {
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(90deg, rgba(227, 25, 48, 0.12), rgba(16, 19, 26, 0.88));
  transition:
    transform 220ms var(--ease),
    border-color 220ms var(--ease),
    background 220ms var(--ease);
}

.compact-flow article:hover {
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(36, 200, 219, 0.12), rgba(16, 19, 26, 0.94));
  transform: translateY(-4px);
}

.compact-flow span {
  color: var(--cyan);
  font-family: Consolas, "Segoe UI Mono", monospace;
  font-weight: 950;
}

.compact-flow strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 18px;
}

.compact-flow p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.home-panel-row,
.delivery-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 54px 0 72px;
}

.home-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.home-panel h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

.system-strip span,
.workflow-grid span {
  color: var(--red-2);
  font-family: Consolas, "Segoe UI Mono", monospace;
  font-size: 13px;
  font-weight: 900;
}

.system-strip strong,
.workflow-grid strong,
.service-grid strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 16px;
}

.system-strip p,
.workflow-grid p,
.service-grid p,
.resource-content p,
.update-row p,
.doc-panel p,
.doc-panel li,
.doc-panel dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.resource-band,
.workflow-band,
.services-band,
.updates-band,
.home-section {
  padding: 54px 0;
  border-top: 1px solid var(--line-soft);
  animation: riseIn 560ms var(--ease) both;
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}

.section-heading h2 {
  font-size: clamp(32px, 4vw, 50px);
}

.resource-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(230px, 300px) minmax(0, 1.25fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.resource-toolbar label,
.editor-panel label {
  display: grid;
  gap: 8px;
  color: #8e98aa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.resource-toolbar input,
.resource-toolbar select,
.editor-panel input,
.editor-panel textarea,
.editor-panel select {
  transition:
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease),
    background 180ms var(--ease);
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: #11151d;
  color: var(--text);
  padding: 14px 15px;
  letter-spacing: 0;
}

.resource-toolbar input:focus,
.resource-toolbar select:focus,
.editor-panel input:focus,
.editor-panel textarea:focus,
.editor-panel select:focus {
  border-color: rgba(227, 25, 48, 0.7);
  box-shadow: 0 0 0 3px rgba(227, 25, 48, 0.14);
}

.resource-toolbar small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chips button {
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    color 180ms var(--ease);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 43px;
  padding: 0 14px;
  background: #11151d;
  color: #ccd3df;
  font-size: 13px;
  font-weight: 850;
}

.filter-chips button.is-active,
.filter-chips button:hover {
  border-color: rgba(227, 25, 48, 0.55);
  background: rgba(227, 25, 48, 0.14);
  color: var(--text);
  transform: translateY(-2px);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.resource-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  overflow: hidden;
  isolation: isolate;
}

.resource-card::after,
.showcase-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 520ms var(--ease);
}

.resource-card:hover::after,
.showcase-card:hover::after {
  transform: translateX(120%);
}

.resource-media {
  min-height: 230px;
  border-right: 1px solid var(--line);
  background: #090c11;
}

.resource-media img,
.resource-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease), filter 420ms var(--ease);
}

.resource-card:hover .resource-media img,
.resource-card:hover .resource-placeholder {
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.04);
}

.resource-placeholder {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(-35deg, rgba(255, 255, 255, 0.06) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, rgba(227, 25, 48, 0.35), rgba(36, 200, 219, 0.08)),
    #121720;
}

.resource-placeholder span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 58px;
  font-weight: 950;
}

.resource-content {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
}

.resource-tags,
.resource-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-tags span,
.resource-meta span {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 6px 9px;
  background: #0c1017;
  color: #aeb7c7;
  font-size: 12px;
  font-weight: 800;
}

.resource-tags span:first-child {
  border-color: rgba(227, 25, 48, 0.45);
  color: #ff8794;
}

.resource-content h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.resource-actions {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.resource-content button,
.buy-resource-link {
  transition:
    transform 180ms var(--ease),
    filter 180ms var(--ease),
    box-shadow 180ms var(--ease);
  width: fit-content;
  border: 0;
  border-radius: var(--radius);
  min-height: 40px;
  padding: 0 14px;
  background: var(--red);
  color: #080a0e;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.resource-content button:not(:disabled):hover,
.buy-resource-link:hover {
  transform: translateY(-2px);
  filter: saturate(1.12);
  box-shadow: 0 13px 26px rgba(227, 25, 48, 0.24);
}

.resource-content button:disabled {
  background: #2a303d;
  color: #8c96a8;
  box-shadow: none;
}

.buy-resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.purchase-note {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.4;
}

.empty-state,
.no-match {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
}

.empty-state strong,
.no-match strong {
  font-size: 20px;
}

.empty-state p,
.no-match p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.showcase-band {
  position: relative;
  padding: 72px max(24px, calc((100vw - 1400px) / 2));
  border-top: 1px solid var(--line-soft);
  background: rgba(3, 5, 8, 0.35);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.showcase-card {
  min-height: 100%;
  display: grid;
  grid-template-rows: 210px minmax(0, 1fr);
}

.showcase-media {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #090c11;
}

.showcase-media img,
.showcase-media .resource-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 520ms var(--ease),
    filter 520ms var(--ease);
}

.showcase-card:hover .showcase-media img,
.showcase-card:hover .showcase-media .resource-placeholder {
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.05);
}

.showcase-content {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.showcase-content span {
  width: fit-content;
  border: 1px solid rgba(227, 25, 48, 0.42);
  border-radius: var(--radius);
  padding: 6px 9px;
  color: #ff8794;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.showcase-content h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.showcase-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.showcase-content strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
}

.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-grid span {
  display: inline-flex;
  width: fit-content;
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 7px 10px;
  background: rgba(36, 200, 219, 0.12);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.update-list {
  display: grid;
  gap: 12px;
}

.update-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.update-row div {
  display: grid;
  align-content: start;
  gap: 8px;
}

.update-row span,
.update-row small {
  color: var(--dim);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.update-row strong {
  font-size: 18px;
}

.update-row ul,
.doc-panel ul,
.doc-panel ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.info-band {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 54px 0 72px;
}

.info-band article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px;
  background: rgba(16, 19, 26, 0.92);
}

.info-band h2 {
  margin: 0;
  font-size: 28px;
}

.info-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rd-footer {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto 32px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  color: var(--dim);
  font-size: 13px;
}

.rd-footer a {
  color: var(--text);
  font-weight: 800;
}

.code-dialog {
  width: min(480px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: #10131a;
  color: var(--text);
  box-shadow: var(--shadow);
}

.code-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
}

.code-dialog h2 {
  margin: 14px 0 8px;
  font-size: 24px;
}

.code-dialog p,
.code-dialog small {
  color: var(--muted);
}

.code-display {
  min-height: 66px;
  border: 1px dashed rgba(227, 25, 48, 0.75);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  margin: 18px 0;
  background: rgba(227, 25, 48, 0.1);
  color: var(--text);
  font-family: Consolas, "Segoe UI Mono", monospace;
  font-size: 24px;
  font-weight: 950;
}

.text-main {
  padding-bottom: 80px;
}

.page-hero {
  display: grid;
  gap: 16px;
  padding: 70px 0 34px;
  animation: riseIn 520ms var(--ease) both;
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(38px, 5vw, 64px);
}

.doc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  animation: riseIn 620ms var(--ease) both;
}

.policy-layout {
  grid-template-columns: minmax(0, 1fr);
}

.doc-panel {
  display: grid;
  gap: 15px;
  align-content: start;
  padding: 24px;
}

.doc-panel h2,
.doc-panel h3 {
  margin: 0;
}

.doc-panel h2 {
  color: var(--text);
  font-size: 24px;
}

.doc-panel h3 {
  color: #dbe1eb;
  font-size: 16px;
}

.doc-panel dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.doc-panel dl div {
  border-left: 3px solid var(--red);
  padding-left: 12px;
}

.doc-panel dt {
  color: var(--text);
  font-weight: 900;
}

.doc-panel dd {
  margin: 4px 0 0;
}

/* Owner console */
.top-actions {
  justify-content: flex-end;
  gap: 10px;
}

.credit-pill,
.user-pill {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #11151d;
}

.coin-stack {
  width: 16px;
  height: 12px;
  border: 2px solid var(--cyan);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--cyan), 0 8px 0 var(--cyan);
}

.user-pill {
  border: 0;
  color: var(--text);
}

.user-pill span {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.admin-main {
  padding-bottom: 80px;
}

.admin-title {
  display: grid;
  gap: 14px;
  padding: 58px 0 28px;
}

.admin-title h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 880px) 340px;
  gap: 24px;
  align-items: start;
}

.editor-panel,
.admin-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 26, 0.94);
  box-shadow: var(--shadow);
  animation: riseIn 560ms var(--ease) both;
}

.editor-panel {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.editor-section {
  display: grid;
  gap: 16px;
}

.editor-section h2,
.guideline-box h2,
.side-heading h2 {
  margin: 0;
}

.editor-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.editor-section h2 span {
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: var(--red);
}

.editor-section h2.purple span {
  background: var(--cyan);
}

.editor-section h2.green span {
  background: var(--green);
}

.editor-panel textarea {
  min-height: 170px;
  resize: vertical;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.current-list,
.editor-card,
.guideline-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #11151d;
  transition:
    transform 200ms var(--ease),
    border-color 200ms var(--ease),
    background 200ms var(--ease);
}

.editor-card:hover,
.guideline-box:hover {
  border-color: rgba(36, 200, 219, 0.38);
  background: #121923;
  transform: translateY(-3px);
}

.current-list {
  min-height: 80px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
}

.current-list p,
.image-strip p,
.form-status {
  margin: 0;
  color: var(--muted);
}

.current-list span {
  color: var(--dim);
}

.current-list code {
  border-radius: 6px;
  padding: 5px 8px;
  background: #07090d;
  color: var(--cyan);
  font-family: Consolas, "Segoe UI Mono", monospace;
  font-weight: 900;
}

.editor-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.card-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.card-heading h2 {
  margin: 0;
  font-size: 16px;
}

.card-heading p {
  margin: 4px 0 0;
  color: var(--dim);
  font-size: 13px;
}

.upload-icon,
.link-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: rgba(227, 25, 48, 0.12);
}

.upload-icon::before,
.link-icon::before {
  content: "";
  width: 17px;
  height: 17px;
  border: 3px solid var(--red);
  border-radius: 5px;
}

.link-icon {
  background: rgba(36, 200, 219, 0.12);
}

.link-icon::before {
  border-color: var(--cyan);
  border-radius: 999px;
}

.drop-zone {
  transition:
    transform 200ms var(--ease),
    border-color 200ms var(--ease),
    background 200ms var(--ease);
  min-height: 130px;
  border: 2px dashed #3a4251;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
}

.drop-zone:hover {
  border-color: rgba(36, 200, 219, 0.62);
  background: rgba(36, 200, 219, 0.05);
  transform: translateY(-2px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone strong {
  color: #d8dde7;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.drop-zone small {
  color: var(--dim);
  letter-spacing: 0;
  text-transform: none;
}

.link-stack {
  display: grid;
  gap: 10px;
}

.image-strip {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-strip img {
  width: 220px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
}

.guideline-box {
  padding: 18px;
}

.guideline-box ul {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.editor-actions .dark-button {
  width: 150px;
}

.blue-button.wide {
  flex: 1;
}

.admin-side {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.side-heading a {
  color: var(--red-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-resource-list {
  display: grid;
  gap: 10px;
}

.admin-script-row {
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #11151d;
}

.admin-script-row:hover {
  border-color: rgba(227, 25, 48, 0.48);
  background: #141a24;
  transform: translateX(3px);
}

.admin-script-row.is-selected {
  border-color: rgba(227, 25, 48, 0.65);
}

.row-thumb {
  width: 58px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(227, 25, 48, 0.1);
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-script-row h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.admin-script-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-script-row button,
.dark-button.compact {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 34px;
  padding: 0 12px;
  background: #1b202b;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.no-scripts {
  min-height: 120px;
  border: 1px dashed #3a4251;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 1180px) {
  .rd-nav,
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .rd-nav nav,
  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .hero-band,
  .entry-auth-section,
  .admin-layout,
  .resource-toolbar,
  .info-band,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .system-strip,
  .workflow-grid,
  .service-grid,
  .route-grid,
  .compact-flow,
  .home-panel-row,
  .delivery-split,
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-auth-section {
    place-items: start center;
    min-height: auto;
    padding-top: 56px;
  }

  .entry-brand-panel {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 760px;
    transform: none;
    pointer-events: auto;
    animation: riseIn 640ms var(--ease) both;
  }

  .entry-login-card {
    justify-self: center;
  }

  .resource-card,
  .update-row {
    grid-template-columns: 1fr;
  }

  .resource-media {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-side {
    position: static;
  }
}

@media (max-width: 720px) {
  body {
    background:
      linear-gradient(135deg, rgba(227, 25, 48, 0.1), transparent 36%, rgba(36, 200, 219, 0.07)),
      var(--bg);
  }

  .site-shell main,
  .admin-main,
  .text-main,
  .rd-footer {
    width: min(100% - 24px, 1400px);
  }

  .rd-nav,
  .topbar {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 9px 12px 8px;
  }

  .rd-brand,
  .brand-mark {
    width: 148px;
    min-width: 0;
  }

  .rd-brand img,
  .brand-mark img {
    width: 148px;
    height: 38px;
  }

  .rd-nav::after,
  .topbar::after {
    left: 12px;
    right: 12px;
  }

  .rd-nav nav,
  .top-nav {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 2px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .rd-nav nav::-webkit-scrollbar,
  .top-nav::-webkit-scrollbar,
  .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .rd-nav nav a,
  .rd-nav nav .nav-current,
  .top-nav a,
  .top-nav .nav-current {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 11px;
    white-space: nowrap;
    font-size: 12px;
    scroll-snap-align: start;
  }

  .rd-nav .nav-cta,
  .topbar .nav-cta {
    grid-column: 2;
    grid-row: 1;
    width: max-content;
    min-width: max-content;
    min-height: 38px;
    padding: 0 14px;
    font-size: 12px;
    justify-self: end;
    align-self: center;
  }

  .hero-band {
    min-height: auto;
    padding-top: 44px;
  }

  .entry-auth-section,
  .auth-main {
    min-height: auto;
  }

  .entry-auth-section {
    padding: 18px 12px 36px;
    gap: 16px;
  }

  .entry-brand-panel h1 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .entry-logo-frame {
    height: 118px;
    min-height: 0;
    overflow: hidden;
    justify-items: center;
  }

  .entry-glow-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 300px;
    max-width: none;
    transform: translate(-50%, -50%);
    animation: none;
    filter: drop-shadow(0 0 22px rgba(227, 25, 48, 0.36));
  }

  .entry-brand-panel {
    gap: 10px;
  }

  .entry-brand-panel p {
    font-size: 14px;
    line-height: 1.45;
  }

  .auth-stage {
    width: min(100% - 24px, 700px);
    padding: 24px 0 42px;
  }

  .auth-card,
  .auth-panel {
    width: 100%;
    padding: 20px;
  }

  .auth-card-heading {
    gap: 8px;
    margin-bottom: 22px;
  }

  .auth-card-heading .auth-mark {
    width: 56px;
    height: 56px;
  }

  .auth-card-heading h1,
  .auth-card-heading h2 {
    font-size: clamp(28px, 10vw, 38px);
  }

  .auth-card-heading p {
    font-size: 12px;
    line-height: 1.4;
  }

  .auth-form {
    gap: 14px;
  }

  .input-shell {
    min-height: 52px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .auth-divider {
    margin: 24px 0 20px;
    gap: 10px;
  }

  .discord-auth-button {
    min-height: 52px;
  }

  .account-avatar {
    width: 72px;
  }

  .account-profile h2 {
    font-size: 26px;
  }

  .register-form,
  .account-profile {
    grid-template-columns: 1fr;
  }

  .account-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .system-strip,
  .workflow-grid,
  .service-grid,
  .resource-grid,
  .route-grid,
  .compact-flow,
  .home-panel-row,
  .delivery-split,
  .showcase-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .dialog-actions,
  .editor-actions,
  .page-actions,
  .rd-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-action,
  .secondary-action,
  .editor-actions .dark-button {
    width: 100%;
  }

  .page-hero {
    padding: 38px 0 24px;
    gap: 12px;
  }

  .page-hero h1,
  .hero-copy h1,
  .section-heading h2,
  .admin-title h1 {
    font-size: clamp(32px, 11vw, 46px);
    line-height: 1.02;
  }

  .page-hero p,
  .hero-copy p,
  .section-heading p,
  .admin-title p {
    font-size: 16px;
    line-height: 1.55;
  }

  .eyebrow {
    padding: 7px 10px;
    font-size: 11px;
  }

  .resource-band,
  .workflow-band,
  .services-band,
  .updates-band,
  .home-section,
  .showcase-band {
    padding: 36px 0;
  }

  .showcase-band {
    padding-inline: 12px;
  }

  .resource-toolbar {
    gap: 12px;
  }

  .resource-toolbar input,
  .resource-toolbar select,
  .editor-panel input,
  .editor-panel textarea,
  .editor-panel select {
    padding: 13px 14px;
  }

  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filter-chips button {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
  }

  .resource-media {
    min-height: 178px;
  }

  .resource-content,
  .showcase-content {
    padding: 16px;
  }

  .resource-content h3,
  .showcase-content h3 {
    font-size: 20px;
  }

  .resource-tags span,
  .resource-meta span {
    font-size: 11px;
    padding: 5px 8px;
  }

  .resource-actions {
    justify-items: stretch;
  }

  .resource-content button,
  .buy-resource-link {
    width: 100%;
  }

  .showcase-card {
    grid-template-rows: 176px minmax(0, 1fr);
  }

  .code-dialog {
    width: min(calc(100% - 24px), 480px);
    max-height: calc(100vh - 24px);
    overflow: auto;
    padding: 20px;
  }

  .code-display {
    min-height: 58px;
    font-size: 20px;
  }

  .rd-footer {
    gap: 10px;
    margin-bottom: 22px;
    text-align: center;
  }

  .editor-panel {
    padding: 18px;
  }
}
