:root {
  color-scheme: dark;
  --bg: #050b10;
  --surface: #09131a;
  --surface-raised: #0d1a22;
  --surface-soft: #101f28;
  --ink: #f3f7f8;
  --muted: #8fa2aa;
  --muted-bright: #b5c4c9;
  --cyan: #bce9ee;
  --cyan-strong: #75c9d3;
  --gold: #c7a26a;
  --sigil-color: var(--cyan-strong);
  --line: rgba(190, 225, 231, 0.14);
  --line-strong: rgba(190, 225, 231, 0.25);
  --content: 1280px;
  --page-pad: clamp(1rem, 4vw, 3.5rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-frame {
  min-height: 100svh;
  background:
    linear-gradient(rgba(117, 201, 211, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 201, 211, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  width: min(calc(100% - 2 * var(--page-pad)), var(--content));
  min-height: 5.25rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.auth-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.5rem;
  min-width: 10.5rem;
}

.auth-loading {
  width: 8rem;
  height: 2.25rem;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--surface-raised);
  animation: auth-pulse 1.4s ease-in-out infinite;
}

.auth-header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  min-width: 5rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-header-button:hover,
.auth-header-button:focus-visible {
  border-color: var(--cyan-strong);
  color: var(--cyan);
}

.auth-header-button--primary {
  border-color: rgba(199, 162, 106, 0.55);
  background: rgba(199, 162, 106, 0.12);
  color: #e7c999;
}

.auth-header-button--primary:hover,
.auth-header-button--primary:focus-visible {
  border-color: var(--gold);
  background: var(--gold);
  color: #0b0e10;
}

.auth-login-icon {
  display: none;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.account-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 12rem;
  height: 2.4rem;
  padding: 0 0.75rem 0 0.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.25rem;
  background: var(--surface-raised);
  cursor: pointer;
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-avatar {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 1px solid rgba(117, 201, 211, 0.45);
  border-radius: 50%;
  background: rgba(117, 201, 211, 0.12);
  color: var(--cyan);
  font-size: 0.58rem;
  font-weight: 800;
}

.account-name {
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  display: grid;
  z-index: 100;
  width: 15rem;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.35rem;
  background: #10191f;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.5);
}

.account-popover strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover small {
  overflow: hidden;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover button,
.account-popover > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  margin-top: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}

.account-popover > a {
  margin-bottom: -0.45rem;
}

.account-popover button:hover,
.account-popover > a:hover {
  border-color: var(--cyan-strong);
}

.auth-modal-open {
  overflow: hidden;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
}

.auth-dialog {
  width: min(32rem, 100%);
  min-height: 22.5rem;
  overflow: hidden;
  border: 1px solid #3f464a;
  border-radius: 0.45rem;
  background: #171d21;
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.62);
}

.auth-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid #343b3f;
  background: #12181c;
}

.auth-dialog__header h2 {
  margin: 0;
  color: #f4f7f8;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-dialog__header p {
  margin: 0.55rem 0 0;
  color: #a4afb4;
  font-size: 0.82rem;
  line-height: 1.55;
}

.auth-close {
  flex: 0 0 auto;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid #343b3f;
  border-radius: 0.4rem;
  background: #1b2226;
  color: #8f9ba0;
  font-size: 1.4rem;
  line-height: 1;
}

.auth-close:hover {
  border-color: var(--cyan-strong);
  color: white;
}

.auth-dialog__body {
  padding: 1.25rem;
}

.auth-error {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(239, 100, 100, 0.45);
  border-radius: 0.3rem;
  background: rgba(95, 24, 24, 0.28);
  color: #ffc4c4;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.5;
}

.discord-auth-button,
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  border: 1px solid #5865f2;
  border-radius: 0.4rem;
  background: #5865f2;
  color: white;
  font-weight: 800;
}

.discord-auth-button {
  gap: 0.55rem;
}

.discord-auth-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.discord-auth-button:hover:not(:disabled) {
  border-color: #4752c4;
  background: #4752c4;
}

.discord-auth-button:disabled,
.auth-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auth-alternative,
.auth-switch {
  margin: 1rem 0 0;
  color: #8f9a9f;
  font-size: 0.8rem;
  text-align: center;
}

.auth-alternative button,
.auth-switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #d8ad70;
  font-weight: 800;
}

.auth-alternative button:hover,
.auth-switch button:hover {
  text-decoration: underline;
}

.auth-disclosure {
  margin-top: 1.15rem;
  padding: 0.8rem;
  border: 1px solid #343b3f;
  border-radius: 0.4rem;
  background: #12181c;
  color: #a0aaaf;
  font-size: 0.72rem;
  line-height: 1.65;
}

.auth-email-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.auth-email-nav:not(:has(.auth-back)) {
  grid-template-columns: 1fr;
}

.auth-back {
  width: 2.3rem;
  height: 2.3rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: #9aa5aa;
  font-size: 1.2rem;
}

.auth-back:hover {
  background: #21282c;
  color: white;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid #343b3f;
  border-radius: 0.4rem;
  background: #12181c;
}

.auth-tabs button {
  min-height: 2.3rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: #9aa5aa;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-tabs button.is-active {
  background: var(--gold);
  color: #0b0e10;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.auth-form label {
  display: grid;
  gap: 0.45rem;
  color: #d7dcde;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 2.55rem;
  padding: 0 0.8rem;
  border: 1px solid #3a4246;
  border-radius: 0.4rem;
  background: #1a2024;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
}

.auth-form input::placeholder {
  color: #6f7a7f;
}

.auth-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(199, 162, 106, 0.16);
}

.auth-submit {
  margin-top: 0.2rem;
  border-color: var(--gold);
  background: var(--gold);
  color: #0b0e10;
}

.auth-submit:hover:not(:disabled) {
  border-color: #deb981;
  background: #deb981;
}

.auth-toast {
  position: fixed;
  z-index: 10000;
  right: 1.25rem;
  bottom: 1.25rem;
  width: min(25rem, calc(100% - 2.5rem));
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  background: #111a1f;
  color: white;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
  font-size: 0.78rem;
  line-height: 1.5;
}

.auth-toast.is-success {
  border-color: rgba(139, 217, 186, 0.55);
}

.auth-toast.is-error {
  border-color: rgba(239, 100, 100, 0.55);
}

@keyframes auth-pulse {
  50% { opacity: 0.45; }
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.7rem;
  width: max-content;
  text-decoration: none;
}

.brand__mark {
  width: 2.45rem;
  height: 2.45rem;
}

.brand__text {
  display: grid;
  gap: 0.13rem;
  line-height: 1;
  text-transform: uppercase;
}

.brand__text strong {
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.brand__text small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.24em;
}

.site-nav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 1.75rem;
}

.site-nav a {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--cyan-strong);
  content: "";
  box-shadow: 0 0 1rem rgba(117, 201, 211, 0.65);
}

.header-count {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.header-count span {
  color: var(--cyan);
  font-size: 0.8rem;
}

.header-count::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #8bd9ba;
  content: "";
  box-shadow: 0 0 0.75rem rgba(139, 217, 186, 0.8);
}

.directory-hero {
  --hero-bleed: calc((100vw - 100%) / -2);
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.75fr);
  align-items: end;
  width: min(calc(100% - 2 * var(--page-pad)), var(--content));
  min-height: 34rem;
  margin: 0 auto;
  border: 0;
  background: transparent;
}

.directory-hero::before,
.directory-hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.directory-hero::before {
  inset: -1rem var(--hero-bleed) -5rem var(--hero-bleed);
  background:
    linear-gradient(90deg, #050b10 0%, rgba(5, 11, 16, 0.96) 24%, rgba(5, 11, 16, 0.65) 50%, rgba(5, 11, 16, 0.08) 84%),
    linear-gradient(180deg, rgba(5, 11, 16, 0.45) 0%, transparent 24%, transparent 60%, rgba(5, 11, 16, 0.8) 78%, #050b10 100%);
}

.directory-hero::after {
  right: var(--hero-bleed);
  bottom: -5rem;
  left: var(--hero-bleed);
  height: 11rem;
  background: linear-gradient(180deg, transparent, var(--bg) 72%);
}

.directory-hero__art {
  position: absolute;
  z-index: -2;
  inset: -1rem var(--hero-bleed) -5rem var(--hero-bleed);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 68%, transparent 100%);
}

.directory-hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 63% center;
  filter: saturate(0.72) contrast(1.05);
}

.directory-hero__content {
  padding: clamp(4rem, 8vw, 7rem) clamp(0rem, 3vw, 2.5rem) clamp(5rem, 7vw, 6rem);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--cyan-strong);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.directory-hero h1 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(3.6rem, 7vw, 7rem);
  font-weight: 330;
  letter-spacing: -0.066em;
  line-height: 0.88;
}

.directory-hero h1 span {
  color: #aabcc1;
}

.directory-hero__content > p:not(.eyebrow) {
  max-width: 35rem;
  margin: 1.55rem 0 0;
  color: #c0cdd1;
  font-size: clamp(0.98rem, 1.5vw, 1.16rem);
  line-height: 1.68;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1.65rem;
  border: 1px solid rgba(188, 233, 238, 0.45);
  padding: 0.78rem 1rem;
  background: rgba(9, 22, 29, 0.68);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-action:hover,
.primary-action:focus-visible {
  border-color: var(--cyan);
  background: rgba(117, 201, 211, 0.12);
}

.primary-action span {
  color: var(--cyan);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.65rem;
}

.hero-actions .primary-action {
  margin-top: 0;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  color: #aebfc4;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.secondary-action:hover {
  color: var(--cyan);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-self: end;
  margin: 0 2rem 2rem 0;
  border: 1px solid var(--line);
  background: rgba(5, 13, 18, 0.78);
  backdrop-filter: blur(16px);
}

.hero-stats div {
  padding: 1rem 1.15rem;
}

.hero-stats div + div {
  border-left: 1px solid var(--line);
}

.hero-stats dt {
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 0.25rem 0 0;
  color: var(--cyan);
  font-size: 1.3rem;
  font-weight: 420;
}

.directory {
  width: min(calc(100% - 2 * var(--page-pad)), var(--content));
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}

.directory-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 32rem);
  align-items: end;
  gap: 3rem;
}

.directory-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  font-weight: 390;
  letter-spacing: -0.05em;
  line-height: 1;
}

.directory-intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.directory-intro {
  display: grid;
  gap: 0.9rem;
}

.directory-intro .unclaimed-key {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  color: #84979e;
  font-size: 0.75rem;
  line-height: 1.5;
}

.directory-intro .unclaimed-key::before {
  width: 1.15rem;
  height: 1px;
  margin-right: 0.65rem;
  flex: 0 0 auto;
  background: rgba(199, 162, 106, 0.72);
  content: "";
}

.unclaimed-key strong {
  color: #c6d4d7;
}

.directory-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(10rem, 1fr));
  gap: 0.7rem;
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  padding: 0.75rem;
  background:
    linear-gradient(110deg, rgba(117, 201, 211, 0.035), transparent 42%),
    rgba(7, 16, 22, 0.9);
}

.directory-filters .search-field {
  grid-column: span 2;
}

.directory-filters .filter-reset {
  min-height: 4.25rem;
}

.filter-field {
  display: grid;
  min-height: 4.25rem;
  min-width: 0;
  border: 1px solid rgba(190, 225, 231, 0.12);
  padding: 0.58rem 0.78rem 0.38rem;
  background: rgba(4, 12, 17, 0.7);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.filter-field:focus-within {
  border-color: rgba(117, 201, 211, 0.52);
  background: rgba(8, 20, 27, 0.92);
  box-shadow: inset 0 0 0 1px rgba(117, 201, 211, 0.08);
}

.filter-field__label {
  color: #71868e;
  font-size: 0.52rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.filter-control {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.directory-filters input,
.directory-filters select {
  width: 100%;
  height: 2.35rem;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #e1eaec;
  font-size: 0.82rem;
}

.directory-filters input::placeholder {
  color: #72858c;
  opacity: 1;
}

.directory-filters input {
  min-width: 0;
  padding: 0 0 0 1.75rem;
}

.directory-filters select {
  appearance: none;
  padding: 0 2rem 0 0;
}

.directory-filters select option,
.directory-filters select optgroup {
  background: #0a161d;
  color: #e1eaec;
}

.search-icon {
  position: absolute;
  left: 0;
  width: 1rem;
  fill: none;
  stroke: #7da0a8;
  stroke-width: 1.6;
}

.select-chevron {
  position: absolute;
  right: 0;
  width: 0.9rem;
  fill: none;
  stroke: #83b5bd;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
  pointer-events: none;
}

.filter-reset {
  width: 100%;
  min-height: 4.25rem;
  border: 1px solid rgba(190, 225, 231, 0.15);
  padding: 0 0.8rem;
  background: rgba(4, 12, 17, 0.54);
  color: #b7c6ca;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, opacity 150ms ease;
}

.filter-reset:not(:disabled):hover,
.filter-reset:not(:disabled):focus-visible {
  border-color: rgba(117, 201, 211, 0.52);
  background: rgba(117, 201, 211, 0.08);
  color: #eff7f8;
  outline: none;
}

.filter-reset:disabled {
  cursor: default;
  opacity: 0.38;
}

.directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.1rem;
  border-bottom: 1px solid var(--line);
}

.directory-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.directory-toolbar strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.directory-toolbar p span {
  margin: 0 0.4rem;
  color: rgba(143, 162, 170, 0.45);
}

.view-switcher {
  display: flex;
  gap: 0.25rem;
}

.view-switcher button {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.view-switcher button[aria-pressed="true"] {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--cyan);
}

.view-switcher svg {
  width: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.clan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.clan-card {
  --sigil-color: hsl(var(--sigil-hue) 38% 62%);
  position: relative;
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  min-height: 13.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--sigil-color) 4%, transparent), transparent 36%),
    rgba(9, 19, 26, 0.94);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.clan-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 1px;
  background: var(--sigil-color);
  content: "";
  opacity: 0.7;
}

.clan-card:hover {
  border-color: rgba(188, 233, 238, 0.3);
  background-color: rgba(12, 25, 33, 0.98);
}

.clan-card__visual {
  display: flex;
  align-items: center;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 1.15rem 0.65rem;
  background: rgba(2, 9, 13, 0.35);
}

.clan-sigil {
  display: grid;
  width: 3.05rem;
  height: 3.05rem;
  place-items: center;
}

.clan-sigil img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 0.45rem rgba(117, 201, 211, 0.18));
}

.listing-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  color: #92a6ac;
  font-size: 0.54rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.listing-state--managed {
  color: #8ddae5;
}

.spotlight-state {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  color: #e6b86f;
  font-size: 0.57rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spotlight-state::before {
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.7rem rgba(224, 168, 92, 0.45);
  content: "";
}

.clan-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0.95rem 1.1rem 0.9rem;
}

.clan-card__top,
.profile-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-index-state {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.card-index-state > span[aria-hidden="true"] {
  color: #42565e;
  font-size: 0.65rem;
}

.card-index-state .listing-state {
  color: #81949a;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.card-index-state .listing-state--managed {
  color: #8ddae5;
}

.indexed-label,
.freshness {
  color: var(--cyan-strong);
  font-size: 0.59rem;
  font-weight: 750;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.freshness {
  overflow: hidden;
  color: #70838a;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.clan-card h3 {
  margin: 0.45rem 0 0;
  font-size: 1.22rem;
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.clan-card h3 a {
  text-decoration: none;
}

.clan-card h3 a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.clan-card__summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.52rem 0 0;
  color: #a7b7bc;
  font-size: 0.78rem;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.62rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid rgba(190, 225, 231, 0.13);
  padding: 0.2rem 0.4rem;
  background: rgba(188, 233, 238, 0.025);
  color: #9cafb5;
  font-size: 0.59rem;
  letter-spacing: 0.02em;
}

.clan-card__footer {
  display: flex;
  align-items: end;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.7rem;
}

.clan-card__facts {
  display: flex;
  min-width: 0;
  gap: 1.25rem;
  margin: 0;
}

.clan-card__facts div {
  min-width: 0;
}

.clan-card__facts dt {
  color: #61757d;
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clan-card__facts dd {
  overflow: hidden;
  margin: 0.2rem 0 0;
  color: #b9c8cc;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clan-grid[data-view="list"] {
  grid-template-columns: 1fr;
}

.clan-grid[data-view="list"] .clan-card {
  grid-template-columns: 5rem minmax(0, 1fr);
  min-height: 11.5rem;
}

.clan-grid[data-view="list"] .clan-card__summary {
  max-width: 60rem;
  -webkit-line-clamp: 2;
}

.empty-state {
  margin-top: 1rem;
  border: 1px dashed var(--line-strong);
  padding: 4rem 1rem;
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  margin: 0;
}

.empty-state button {
  margin-top: 1rem;
  border: 0;
  background: transparent;
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  width: min(calc(100% - 2 * var(--page-pad)), var(--content));
  min-height: 7rem;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: #6f8289;
  font-size: 0.66rem;
}

.site-footer p {
  margin: 0;
}

.site-footer p:nth-child(2) {
  text-align: center;
}

.site-footer p:last-child {
  justify-self: end;
}

.brand--footer {
  opacity: 0.75;
}

/* Clan profile */
.profile-shell {
  min-height: calc(100svh - 7rem);
}

.profile-shell .site-header {
  margin-bottom: 1.5rem;
}

.profile-wrap {
  width: min(calc(100% - 2 * var(--page-pad)), var(--content));
  margin: 0 auto;
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  color: #71848b;
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: #9bafb5;
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--cyan);
}

.profile-hero {
  --sigil-color: hsl(var(--sigil-hue) 38% 62%);
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  min-height: 22rem;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 4rem);
  background: #08131a;
  clip-path: polygon(0 0, calc(100% - 2rem) 0, 100% 2rem, 100% 100%, 0 100%);
}

.profile-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 14, 19, 0.98), rgba(6, 14, 19, 0.87) 57%, rgba(6, 14, 19, 0.34)),
    url("/warframe-clan-hero.webp") 72% 48% / cover;
  content: "";
  filter: saturate(0.58);
}

.profile-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, color-mix(in srgb, var(--sigil-color) 9%, transparent), transparent 47%);
  content: "";
}

.profile-hero .clan-sigil {
  width: clamp(6rem, 10vw, 8.5rem);
  height: clamp(6rem, 10vw, 8.5rem);
  font-size: 1.2rem;
}

.profile-hero__content {
  min-width: 0;
}

.profile-kicker {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.profile-kicker .listing-state {
  color: #bdc9cc;
  text-align: left;
}

.profile-kicker .listing-state--managed {
  color: #8ddae5;
}

.profile-kicker .spotlight-state {
  margin-top: 0;
}

.profile-kicker .listing-state::after {
  margin-left: 0.65rem;
  color: #51646b;
  content: "·";
}

.profile-hero h1 {
  max-width: 15ch;
  margin: 0.8rem 0 0;
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-weight: 340;
  letter-spacing: -0.062em;
  line-height: 0.92;
  text-wrap: balance;
}

.profile-hero__summary {
  max-width: 48rem;
  margin: 1.2rem 0 0;
  color: #b9c8cc;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  line-height: 1.65;
}

.profile-actions {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0.65rem;
  width: 12rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 2.8rem;
  border: 1px solid var(--line-strong);
  padding: 0 0.9rem;
  background: rgba(5, 13, 18, 0.65);
  color: #cddadd;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-decoration: none;
  text-transform: uppercase;
}

.button--primary {
  border-color: color-mix(in srgb, var(--sigil-color) 48%, transparent);
  background: color-mix(in srgb, var(--sigil-color) 11%, rgba(5, 13, 18, 0.75));
  color: #eef6f7;
}

.button:hover,
.button:focus-visible {
  border-color: var(--cyan);
  color: #fff;
}

.submission-shell,
.dashboard-shell {
  width: min(calc(100% - 2 * var(--page-pad)), 70rem);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.submission-intro {
  max-width: 58rem;
  margin-bottom: 2.25rem;
}

.submission-intro h1,
.dashboard-heading h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(3.2rem, 8vw, 6.6rem);
  font-weight: 330;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.submission-intro > p:last-of-type,
.dashboard-heading > div > p:last-child {
  max-width: 48rem;
  margin: 1.2rem 0 0;
  color: #a8bbc0;
  line-height: 1.7;
}

.submission-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 2rem;
  border: 1px solid var(--line);
}

.submission-steps span {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  color: #9cafb4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.submission-steps span + span {
  border-left: 1px solid var(--line);
}

.submission-steps strong {
  color: var(--cyan);
  font-size: 0.62rem;
}

.submission-gate,
.submission-success {
  border: 1px solid var(--line-strong);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(120deg, rgba(117, 201, 211, 0.07), transparent 50%), rgba(8, 18, 24, 0.92);
}

.submission-gate h2,
.submission-success h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.submission-gate > p:not(.eyebrow),
.submission-success > p:not(.eyebrow) {
  max-width: 45rem;
  margin: 0.9rem 0 1.4rem;
  color: var(--muted);
  line-height: 1.65;
}

.submission-success .button + .button {
  margin-left: 0.55rem;
}

.listing-form {
  display: grid;
  gap: 1rem;
}

.form-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 32rem);
  align-items: end;
  gap: 2rem;
  margin-top: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.form-section-heading h2,
.dashboard-section__heading h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.form-section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.form-field {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(7, 16, 22, 0.72);
}

.form-field--wide {
  grid-column: 1 / -1;
}

.form-field > span,
.choice-group legend {
  color: #bdd0d4;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-field em {
  color: var(--muted);
  font-size: 0.58rem;
  font-style: normal;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(190, 225, 231, 0.18);
  border-radius: 0;
  padding: 0.75rem;
  background: rgba(2, 9, 13, 0.7);
  color: var(--ink);
  font: inherit;
}

.form-field textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--cyan-strong);
  outline: none;
  box-shadow: 0 0 0 2px rgba(117, 201, 211, 0.08);
}

.form-field small,
.switch-field small {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.choice-group {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(7, 16, 22, 0.58);
}

.choice-group legend {
  padding: 0 0.45rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

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

.choice-grid label {
  position: relative;
}

.choice-grid input {
  position: absolute;
  opacity: 0;
}

.choice-grid span {
  display: grid;
  min-height: 3rem;
  place-items: center;
  border: 1px solid rgba(190, 225, 231, 0.16);
  padding: 0.5rem;
  color: #9fb2b7;
  font-size: 0.67rem;
  text-align: center;
}

.choice-grid input:checked + span {
  border-color: var(--cyan-strong);
  background: rgba(117, 201, 211, 0.1);
  color: #eef8f9;
}

.choice-grid input:focus-visible + span {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.switch-field,
.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 0.9rem;
  color: #b8c8cb;
  font-size: 0.76rem;
  line-height: 1.5;
}

.switch-field span {
  display: grid;
  gap: 0.2rem;
}

.switch-field--prominent,
.consent-field {
  margin-top: 0;
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(7, 16, 22, 0.7);
}

.switch-field input,
.consent-field input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--cyan-strong);
}

.form-error {
  border: 1px solid rgba(224, 100, 106, 0.45);
  padding: 0.8rem 1rem;
  background: rgba(112, 26, 32, 0.2);
  color: #f0b7ba;
  font-size: 0.78rem;
}

.form-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.form-actions .button {
  min-width: 12rem;
}

.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.dashboard-heading h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.dashboard-section {
  margin-top: 2.5rem;
}

.dashboard-section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}

.dashboard-section__heading span {
  color: var(--cyan);
  font-size: 1.15rem;
}

.dashboard-grid,
.submission-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

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

.dashboard-card,
.submission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(8, 18, 24, 0.85);
}

.dashboard-card h3,
.submission-row h3 {
  margin: 0.45rem 0 0;
  font-size: 1.15rem;
  font-weight: 520;
}

.dashboard-card p,
.submission-row p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.dashboard-card__actions {
  display: flex;
  gap: 0.5rem;
}

.dashboard-status {
  color: #9aaeb3;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dashboard-status.is-approved,
.dashboard-status.is-managed {
  color: #8ddae5;
}

.dashboard-status.is-pending,
.dashboard-status.is-needs_info {
  color: #e6b86f;
}

.dashboard-status.is-rejected {
  color: #dc8589;
}

.submission-row__note {
  max-width: 50rem;
  color: #c1d0d3 !important;
}

.dashboard-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed var(--line-strong);
  padding: 1.25rem;
  color: var(--muted);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 0.72fr);
  gap: 1rem;
  margin-top: 1rem;
}

.profile-column {
  display: grid;
  gap: 1rem;
}

.profile-panel {
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  background: rgba(9, 19, 26, 0.9);
}

.profile-panel__label {
  margin: 0 0 0.75rem;
  color: var(--cyan-strong);
  font-size: 0.59rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.profile-panel h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 440;
  letter-spacing: -0.035em;
}

.profile-panel__copy {
  margin: 1rem 0 0;
  color: #aebdc1;
  font-size: 0.92rem;
  line-height: 1.75;
}

.claim-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.2rem;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.claim-link:hover,
.claim-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.claim-panel {
  position: relative;
  background:
    linear-gradient(135deg, rgba(199, 162, 106, 0.07), transparent 46%),
    rgba(9, 19, 26, 0.9);
}

.claim-panel::before {
  position: absolute;
  top: -1px;
  left: clamp(1.4rem, 3vw, 2.25rem);
  width: 3rem;
  height: 1px;
  background: rgba(199, 162, 106, 0.78);
  content: "";
}

.profile-facts {
  margin: 0;
}

.profile-facts div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.45rem;
  border-bottom: 1px solid var(--line);
}

.profile-facts div:first-child {
  border-top: 1px solid var(--line);
}

.profile-facts dt {
  color: #71848b;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0;
  color: #c3d0d3;
  font-size: 0.75rem;
  text-align: right;
}

.profile-facts .profile-status {
  overflow: visible;
}

.profile-status .listing-state {
  color: #b9c7ca;
}

.profile-status .listing-state--managed {
  color: #8ddae5;
}

.activity-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.activity-indicator::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #8bd9ba;
  content: "";
  box-shadow: 0 0 0.6rem rgba(139, 217, 186, 0.7);
}

.profile-note {
  margin: 1rem 0 0;
  color: #70838a;
  font-size: 0.71rem;
  line-height: 1.6;
}

.related-section {
  margin-top: clamp(3rem, 7vw, 5.5rem);
}

.related-section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.related-section h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 410;
  letter-spacing: -0.04em;
}

.related-section__heading a {
  color: var(--muted-bright);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.related-card {
  --sigil-color: hsl(var(--sigil-hue) 38% 62%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  border: 1px solid var(--line);
  padding: 1rem;
  background: var(--surface);
  text-decoration: none;
}

.related-card:hover,
.related-card:focus-visible {
  border-color: var(--line-strong);
}

.related-card .clan-sigil {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 0.56rem;
}

.related-card strong {
  display: block;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.6rem;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: minmax(12rem, 1fr) auto auto;
  }

  .header-count {
    display: none;
  }
}

@media (max-width: 980px) {
  .directory-hero {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    width: min(32rem, calc(100% - 4rem));
    margin: 0 2rem 2rem;
  }

  .directory-filters {
    grid-template-columns: repeat(3, minmax(10rem, 1fr));
  }

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

  .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-actions {
    grid-column: 1 / -1;
    width: auto;
    flex-direction: row;
  }

  .profile-actions .button {
    flex: 1;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .submission-steps,
  .choice-grid,
  .choice-grid--tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .submission-steps span:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .submission-steps span:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .form-section-heading,
  .form-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-heading,
  .dashboard-card,
  .submission-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 4.5rem;
  }

  .site-nav {
    display: none;
  }

  .header-count {
    display: none;
  }

  .auth-controls {
    grid-column: 2;
    min-width: 0;
  }

  .auth-header-button {
    min-width: 4.6rem;
    padding-inline: 0.65rem;
  }

  .auth-controls .auth-header-button--primary {
    display: none;
  }

  .auth-header-button[data-auth-open="login"] {
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0;
  }

  .auth-header-button[data-auth-open="login"] span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .auth-login-icon {
    display: block;
  }

  .directory-hero {
    min-height: 39rem;
    margin-top: 0;
  }

  .directory-hero__art {
    inset: -1rem var(--hero-bleed) -7rem var(--hero-bleed);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, #000 56%, transparent 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, #000 56%, transparent 100%);
  }

  .directory-hero::before {
    inset: -1rem var(--hero-bleed) -7rem var(--hero-bleed);
    background:
      linear-gradient(90deg, rgba(5, 11, 16, 0.88), rgba(5, 11, 16, 0.25)),
      linear-gradient(180deg, rgba(5, 11, 16, 0.18) 0%, rgba(5, 11, 16, 0.12) 42%, rgba(5, 11, 16, 0.86) 73%, #050b10 96%);
  }

  .directory-hero::after {
    right: var(--hero-bleed);
    bottom: -7rem;
    left: var(--hero-bleed);
    height: 15rem;
  }

  .directory-hero__content {
    align-self: end;
    padding: 5rem 0 9rem;
  }

  .directory-hero h1 {
    font-size: clamp(3.4rem, 17vw, 5.2rem);
  }

  .hero-stats {
    position: absolute;
    right: 0;
    bottom: 1rem;
    left: 0;
    width: auto;
    margin: 0;
  }

  .hero-stats div {
    padding: 0.8rem 0.65rem;
  }

  .hero-stats dt {
    font-size: 0.48rem;
  }

  .hero-stats dd {
    font-size: 1rem;
  }

  .directory-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .directory-filters {
    grid-template-columns: 1fr;
  }

  .filter-reset {
    grid-column: auto;
    min-height: 3.15rem;
  }

  .directory-toolbar .directory-meta {
    display: none;
  }

  .clan-card,
  .clan-grid[data-view="list"] .clan-card {
    grid-template-columns: 4.25rem minmax(0, 1fr);
    min-height: 12.75rem;
  }

  .clan-card__visual {
    padding-inline: 0.55rem;
  }

  .clan-card .clan-sigil {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 0.55rem;
  }

  .clan-card__body {
    padding: 1rem;
  }

  .clan-card__footer {
    display: none;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    padding-block: 1.25rem;
  }

  .site-footer p:nth-child(2) {
    display: none;
  }

  .profile-hero {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 1.5rem;
  }

  .profile-hero > .clan-sigil {
    width: 5rem;
    height: 5rem;
  }

  .profile-hero h1 {
    font-size: clamp(2.8rem, 15vw, 4.5rem);
  }

  .profile-actions {
    grid-column: auto;
    flex-direction: column;
  }

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

@media (max-width: 470px) {
  .account-name {
    display: none;
  }

  .account-menu summary {
    padding-right: 0.3rem;
  }

  .auth-dialog__header,
  .auth-dialog__body {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .clan-card {
    transition: none;
  }
}
