:root {
  color-scheme: dark;
  --canvas: #0b111a;
  --canvas-raised: #111927;
  --surface: rgba(16, 24, 38, 0.94);
  --surface-strong: #101827;
  --surface-soft: rgba(22, 32, 49, 0.9);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(56, 189, 248, 0.42);
  --text: #eef5ff;
  --text-soft: #dbe6f3;
  --muted: #a9b6c8;
  --gold: #f6c453;
  --gold-strong: #f6c453;
  --gold-soft: rgba(246, 196, 83, 0.32);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.12);
  --danger: #ef7c83;
  --danger-soft: #3a1e24;
  --success: #42d392;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.625rem;
  --content: 1240px;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-editorial: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--canvas);
  color: var(--text);
  font: 0.95rem/1.55 var(--font-ui);
  text-rendering: optimizeLegibility;
}

a {
  color: var(--text-soft);
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.24em;
}

a:hover {
  color: var(--gold-strong);
  text-decoration-color: var(--gold-soft);
}

img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 0.75rem;
  font: 700 clamp(2.35rem, 5vw, 4.65rem)/0.98 var(--font-editorial);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.25;
}

h3 { margin-bottom: 0.5rem; font-size: 1rem; }
small, .muted { color: var(--muted); }

code {
  color: #dbe8eb;
  font: 0.86em/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--text);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: #0a1118;
}

.header-inner {
  width: min(var(--content), calc(100% - 2rem));
  min-height: 4.35rem;
  margin: auto;
  display: grid;
  grid-template-columns: auto minmax(15rem, 21rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid var(--gold-soft);
  border-radius: 0.1rem;
}

.brand-name {
  font: 600 1rem/1 var(--font-editorial);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.brand-name strong { color: var(--gold-strong); font-weight: 600; }

.global-search {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--canvas-raised);
}

.global-search select,
.global-search input,
.global-search button {
  min-height: 2.55rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.global-search select {
  width: 4.7rem;
  padding-inline: 0.75rem 0.25rem;
  color: var(--gold-strong);
  font-weight: 700;
}

.global-search input {
  width: 100%;
  min-width: 0;
  padding-inline: 0.6rem;
}

.global-search button {
  padding-inline: 0.9rem;
  border-left: 1px solid var(--line);
  color: var(--text-soft);
}

.primary-nav {
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 2vw, 1.75rem);
  overflow-x: auto;
  scrollbar-width: thin;
}

.primary-nav a {
  padding-block: 1.55rem 1.35rem;
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--gold-strong); }

body:has(.profile-hero) .primary-nav a[href="/players/recent"] {
  border-bottom: 2px solid var(--gold-strong);
  color: var(--gold-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.locale-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.locale-form select,
.locale-form button {
  min-height: 2.45rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.locale-form button { color: var(--muted); }

.login-link,
button,
.button {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-sm);
  background: #7d581c;
  color: #fff4d6;
  font: 700 0.9rem/1 var(--font-ui);
  text-decoration: none;
  cursor: pointer;
}

.login-link:hover,
button:hover,
.button:hover {
  border-color: var(--gold);
  background: #966d25;
  color: #fff8e7;
}

button[name="operation"][value="delete"] {
  border-color: #6e3138;
  background: var(--danger-soft);
  color: #ffb8bd;
}

.app-main {
  width: min(var(--content), calc(100% - 3rem));
  min-height: calc(100vh - 12rem);
  margin: auto;
  padding: clamp(2.2rem, 5vw, 4.5rem) 0 5rem;
}

.eyebrow {
  margin-bottom: 0.6rem;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-heading { max-width: 58rem; margin-bottom: 2rem; }
.page-heading h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

.page-heading p:last-child {
  max-width: 48rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero,
.home-hero {
  position: relative;
  margin: calc(clamp(2.2rem, 5vw, 4.5rem) * -1) calc((100% - (100vw - 15px)) / 2) 2rem;
  padding: clamp(4.5rem, 10vw, 8rem) max(1.5rem, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid var(--line);
  background-color: var(--canvas-raised);
  background-image: image-set(
    url("/assets/ledger-map.avif") type("image/avif"),
    url("/assets/ledger-map.webp") type("image/webp")
  );
  background-position: center;
  background-size: cover;
}

.hero-copy { max-width: 52rem; }
.hero h1, .home-hero h1 { max-width: 14ch; }

.hero p,
.home-hero p {
  max-width: 46rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-search {
  max-width: 44rem;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: auto minmax(12rem, 1fr) auto;
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #0a1219;
}

.hero-search select,
.hero-search input,
.hero-search button {
  min-height: 3.35rem;
  border: 0;
  border-radius: 0;
}

.hero-search select {
  width: 5.5rem;
  color: var(--gold-strong);
  font-weight: 800;
}

.hero-search button {
  border-left: 1px solid var(--gold-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.grid,
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}

.card,
.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.15rem;
}

.card h2, .card h3 { color: var(--text-soft); }
.card > p:last-child { margin-bottom: 0; }

.card > h2 + p,
.card > h3 + p { color: var(--text); font-size: 1.08rem; }

.feature-ledger { margin-top: 1.25rem; }

.feature-ledger .card {
  min-height: 9rem;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.feature-ledger .card h2 { color: var(--gold-strong); }

.profile-hero {
  position: relative;
  margin: calc(clamp(2.2rem, 5vw, 4.5rem) * -1) calc((100% - (100vw - 15px)) / 2) 0;
  padding: 1.55rem max(1.5rem, calc((100vw - var(--content)) / 2)) 1.2rem;
  border-bottom: 1px solid var(--line);
  background-color: var(--canvas-raised);
  background-image: image-set(
    url("/assets/ledger-map.avif") type("image/avif"),
    url("/assets/ledger-map.webp") type("image/webp")
  );
  background-position: center;
  background-size: cover;
}

.profile-identity {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}

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

.profile-crest {
  width: 9.5rem;
  aspect-ratio: 1;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  background: var(--surface-soft);
  object-fit: cover;
}

.profile-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
}

.profile-title-row h1 {
  margin-bottom: 0;
  font-size: clamp(3rem, 5vw, 4rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-sm);
  background: #2a2112;
  color: var(--gold-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trust-line { margin: 0.65rem 0 0; color: var(--text-soft); }

.summary-strip {
  width: 100%;
  max-width: 100%;
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-top: 1px solid var(--line);
}

.summary-strip .stat-card {
  min-width: 0;
  padding: 0.95rem 1.4rem 0.2rem 0;
}

.summary-strip .stat-card + .stat-card {
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
}

.stat-card h2 {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card p {
  margin: 0;
  color: var(--text);
  font: 500 clamp(1rem, 2vw, 1.3rem)/1.25 var(--font-ui);
  overflow-wrap: anywhere;
}

.profile-tabs {
  margin-inline: calc((100% - (100vw - 15px)) / 2);
  padding-inline: max(1.5rem, calc((100vw - var(--content)) / 2));
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #0a1219;
  scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar { display: none; }

.profile-page .profile-tabs {
  -ms-overflow-style: none;
  scrollbar-color: transparent transparent;
  scrollbar-width: none;
}

.profile-page .profile-tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.profile-tabs a {
  padding: 1rem 0 0.85rem;
  border-bottom: 2px solid transparent;
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.profile-tabs a[aria-current="page"],
.profile-tabs a:hover { border-bottom-color: var(--gold-strong); color: var(--gold-strong); }

.ledger-section { padding-top: 1.35rem; }

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

.section-heading h2, .section-heading p { margin: 0; }
.section-heading p { color: var(--muted); font-size: 0.85rem; }

.table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  scrollbar-color: var(--line-strong) var(--surface-soft);
}

table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  background: transparent;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: #101820;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #111c25; }
.profile-ledger td:nth-child(4), .profile-ledger td:last-child { color: var(--cyan); }

main > table,
main section > table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.empty-state {
  min-height: 12rem;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

form { margin: 0; }

main > form,
main section > form,
main .card > form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.surface > form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

td form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  padding: 0;
  border: 0;
  background: transparent;
}

label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.38rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

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

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #09121a;
  color: var(--text);
}

textarea { min-height: 9rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #65727d; }

input[type="checkbox"] {
  width: 1.1rem;
  min-height: 1.1rem;
  accent-color: var(--gold);
}

input[type="file"] { padding: 0.48rem; }

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.problem {
  max-width: 58rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid #6e3138;
  border-left: 4px solid var(--danger);
  background: var(--danger-soft);
}

.problem h1 { font-size: clamp(2rem, 5vw, 3.4rem); }

.app-footer {
  border-top: 1px solid var(--line);
  background: #070d12;
}

.footer-inner {
  width: min(var(--content), calc(100% - 3rem));
  min-height: 5rem;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-inner p { margin: 0; }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem 1.2rem;
}

.footer-meta a { color: var(--muted); }

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

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: auto minmax(14rem, 1fr) auto;
    gap: 0.9rem;
    padding-block: 0.65rem;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    border-top: 1px solid var(--line);
  }

  .primary-nav a { padding-block: 0.8rem 0.55rem; }
}

@media (max-width: 760px) {
  .header-inner {
    width: min(100% - 1rem, var(--content));
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand-name { font-size: 0.9rem; }

  .global-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .primary-nav { grid-row: 3; }
  .locale-form { display: none; }

  .app-main,
  .footer-inner { width: min(100% - 1.25rem, var(--content)); }

  .hero,
  .home-hero,
  .profile-hero {
    margin-inline: -0.625rem;
    padding-inline: 1rem;
  }

  .profile-identity {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .profile-crest { width: 5.5rem; }
  .profile-title-row h1 { font-size: clamp(2rem, 10vw, 3rem); }

  .summary-strip {
    grid-template-columns: repeat(3, minmax(9rem, 1fr));
    overflow-x: auto;
  }

  .profile-tabs {
    margin-inline: -0.625rem;
    padding-inline: 1rem;
    gap: 1.35rem;
  }

  .section-heading { align-items: start; flex-direction: column; }
  .hero-search { grid-template-columns: 5rem minmax(0, 1fr); }

  .hero-search button {
    grid-column: 1 / -1;
    border-top: 1px solid var(--gold-soft);
    border-left: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { justify-content: flex-start; }
}

@media (max-width: 430px) {
  body { font-size: 0.9rem; }
  .brand img { width: 2.25rem; height: 2.25rem; }

  .login-link {
    min-height: 2.35rem;
    padding-inline: 0.75rem;
    font-size: 0.78rem;
  }

  .app-main { padding-top: 1.75rem; }
  .profile-identity { grid-template-columns: 1fr; }
  .profile-crest { width: 4.75rem; }

  .profile-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h1 { font-size: 2.4rem; }
  th, td { padding: 0.65rem 0.75rem; }
}

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

/* Faithful Go adaptation of RuneLedger's final pre-Go visual system. */
body {
  background:
    radial-gradient(circle at 50% -14%, rgba(56, 189, 248, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(7, 12, 21, 0.75), rgba(6, 10, 17, 0.94)),
    image-set(
      url("/assets/runic-dashboard-bg.avif") type("image/avif"),
      url("/assets/runic-dashboard-bg.webp") type("image/webp")
    ) center top / cover fixed;
  color: var(--text);
  font-family: var(--font-ui);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(rgba(148, 163, 184, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 10, 18, 0.72), transparent 44%, rgba(5, 10, 18, 0.78));
  background-size: 56px 56px, 56px 56px, auto;
  pointer-events: none;
}

h1,
h2,
h3 {
  font-family: var(--font-ui);
  letter-spacing: -0.015em;
}

h1 {
  font-size: 2.625rem;
  font-weight: 850;
  line-height: 1.08;
}

h2 { font-size: 1.1875rem; font-weight: 820; }
h3 { font-weight: 820; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(9, 15, 25, 0.96);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: 100%;
  min-height: 3.375rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.875rem;
}

.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.brand { gap: 0.625rem; }

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 0.5rem;
}

.brand-name,
.footer-brand {
  font-family: var(--font-ui);
  letter-spacing: 0;
  text-transform: none;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.25rem;
  font-weight: 900;
}

.brand-name strong,
.footer-brand strong { color: var(--text); font-weight: 900; }
.brand-name span,
.footer-brand span span { color: var(--cyan); }

.beta-badge {
  display: inline-flex;
  min-height: 1.25rem;
  align-items: center;
  padding: 0 0.375rem;
  border: 1px solid rgba(246, 196, 83, 0.28);
  border-radius: 999px;
  background: rgba(246, 196, 83, 0.1);
  color: var(--gold);
  font-size: 0.625rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-nav {
  margin-left: auto;
  justify-content: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.primary-nav::-webkit-scrollbar { display: none; }

.primary-nav a {
  min-height: 1.875rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.5625rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: #9aa8bb;
  font-size: 0.8125rem;
  font-weight: 760;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  border-color: rgba(56, 189, 248, 0.2);
  background: rgba(56, 189, 248, 0.07);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rs-clock {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.625rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.72);
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  gap: .4rem;
  white-space: nowrap;
}
.rs-clock time { font-variant-numeric: tabular-nums; }
.rs-clock-info { position: relative; display: inline-flex; }
.rs-clock-zone {
  min-height: 1.75rem;
  padding: 0 .125rem;
  border: 0;
  border-radius: .2rem;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline dotted;
  text-underline-offset: .25em;
}
.rs-clock-zone:hover,
.rs-clock-zone:focus-visible { background: transparent; color: var(--text); }
.rs-clock-tooltip {
  position: absolute;
  z-index: 30;
  inset-inline-end: -.5rem;
  top: calc(100% + .5rem);
  width: 15rem;
  max-width: calc(100vw - 2rem);
  padding: .75rem .875rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text-soft);
  box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .35);
  font: 400 .8rem/1.5 var(--font-ui);
  white-space: normal;
}
.rs-clock-tooltip::before {
  content: "";
  position: absolute;
  inset: -.5rem 0 auto;
  height: .5rem;
}

.locale-form { gap: 0.25rem; }

.locale-form select,
.locale-form button,
.login-link {
  min-height: 2rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
}

.locale-form select,
.locale-form button {
  padding: 0.25rem 0.45rem;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
}

.login-link,
button,
.button {
  border-color: rgba(56, 189, 248, 0.38);
  border-radius: 0.5rem;
  background: #2563eb;
  color: #f8fbff;
  box-shadow: none;
  font-weight: 800;
}

.login-link { padding: 0 0.75rem; }

.login-link:hover,
button:hover,
.button:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: #1d4ed8;
  color: #fff;
}

.button.secondary {
  min-height: 2.375rem;
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.7);
  color: #dbe6f3;
}

.button.secondary:hover {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(30, 41, 59, 0.72);
}

.app-main {
  width: min(77.5rem, calc(100% - 2rem));
  min-height: calc(100vh - 12rem);
  padding: 1.625rem 0 3.375rem;
}

body:has(.home-hero) .app-main { min-height: 0; }

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21.25rem, 26.25rem);
  gap: 1.125rem;
  align-items: stretch;
  margin: 0;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.5rem;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(17, 25, 39, 0.98), rgba(12, 18, 29, 0.98));
  box-shadow: 0 0.875rem 2.125rem rgba(0, 0, 0, 0.26);
}

.hero-copy {
  max-width: none;
  display: grid;
  align-content: center;
  padding: 0;
}

.home-hero h1 {
  max-width: 48rem;
  margin-bottom: 0;
  font-size: 2.75rem;
  font-weight: 850;
  line-height: 1.08;
}

.home-hero .hero-lead {
  max-width: 48rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.eyebrow,
.search-kicker {
  margin: 0 0 0.4375rem;
  color: var(--cyan);
  font-size: 0.6875rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-stats,
.hero-links,
.search-console-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.hero-stats { margin-top: 1.125rem; }
.hero-links { margin-top: 1rem; }

.hero-stats span,
.search-console-meta span {
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.5625rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.4375rem;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 740;
}

.search-console {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(15, 23, 35, 0.96), rgba(8, 13, 22, 0.96));
}

.search-console-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.1875rem;
}

.search-console-copy p {
  margin: 0.4375rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.search-field {
  min-height: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.5rem;
  background: rgba(5, 10, 18, 0.82);
}

.search-field:focus-within {
  border-color: rgba(56, 189, 248, 0.54);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.search-field input,
.search-field button {
  min-height: 3rem;
  border: 0;
  border-radius: 0;
}

.search-field input {
  min-width: 0;
  padding: 0 0.875rem;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.search-field input::placeholder { color: rgba(170, 182, 199, 0.62); }
.search-field button { padding: 0 0.875rem; }
.search-field button { border-color: rgba(66, 211, 146, 0.5); background: #10a76d; }
.search-field button:hover { background: #0d8f5e; }
.search-console-meta { margin-top: -0.125rem; }

.ledger-preview,
.home-panels {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.625rem;
}

.ledger-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-panels { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ledger-preview article,
.home-panel,
.card,
.surface {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.5rem;
  background: rgba(13, 20, 32, 0.82);
  box-shadow: none;
}

.ledger-preview article,
.home-panel {
  min-height: 6rem;
  padding: 0.75rem;
}

.ledger-preview strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 1rem;
}

.ledger-preview span,
.home-panel p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.home-panel {
  display: flex;
  flex-direction: column;
}

.home-panel h2 {
  margin: 0 0 0.4375rem;
  color: var(--text);
  font-size: 1rem;
}

.home-panel a {
  width: fit-content;
  margin-top: auto;
  padding-top: 0.625rem;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.page-heading {
  max-width: 60rem;
  margin-bottom: 1.125rem;
  padding: 0.25rem 0 1.125rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.page-heading h1 { margin-bottom: 0.625rem; font-size: 2.625rem; }
.page-heading p:last-child { color: var(--muted); }

.profile-hero {
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem 0.5rem 0 0;
  background: linear-gradient(180deg, rgba(15, 23, 35, 0.9), rgba(8, 13, 22, 0.94));
}

.profile-crest { border-color: var(--line-strong); }
.profile-tabs { margin-inline: 0; border-color: var(--line); background: rgba(8, 13, 22, 0.92); }

.summary-strip,
.table-shell,
main > table,
main section > table,
main > form,
main section > form,
main .card > form {
  border-color: rgba(148, 163, 184, 0.16);
  border-radius: 0.5rem;
  background: rgba(7, 12, 21, 0.76);
  box-shadow: none;
}

th { background: rgba(10, 16, 27, 0.96); color: #b9c6d8; }
th, td { border-bottom-color: rgba(148, 163, 184, 0.14); }
tbody tr:hover td { background: rgba(56, 189, 248, 0.06); }

input,
select,
textarea {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 0.5rem;
  background: rgba(7, 12, 21, 0.84);
  color: var(--text);
}

.badge {
  border-color: rgba(56, 189, 248, 0.28);
  border-radius: 0.4375rem;
  background: rgba(56, 189, 248, 0.08);
  color: var(--cyan);
}

.app-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(7, 12, 21, 0.92);
}

.footer-inner {
  width: min(77.5rem, calc(100% - 2rem));
  min-height: 0;
  padding: 1.375rem 0 1.75rem;
  display: block;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.65fr);
  gap: 2.5rem;
  align-items: start;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
}

.footer-brand img { border-radius: 0.375rem; }
.footer-about p { max-width: 32rem; margin: 0.5rem 0 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }

.footer-link-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(7.5rem, 1fr));
  gap: 1.75rem;
}

.footer-link-group { display: grid; align-content: start; gap: 0.5rem; }
.footer-link-group h2 { margin: 0 0 0.25rem; color: var(--text); font-size: 0.8125rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-link-group a { color: var(--muted); font-size: 0.8125rem; line-height: 1.35; text-decoration: none; }
.footer-link-group a:hover { color: var(--cyan); }

.footer-bottom {
  margin-top: 1.125rem;
  padding-top: 1.125rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-bottom div { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.footer-bottom div span { padding: 0.25rem 0.5rem; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 0.4375rem; background: rgba(15, 23, 42, 0.72); }

@media (max-width: 1080px) {
  .header-inner { grid-template-columns: auto 1fr; padding: 0.625rem 0.875rem; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; width: 100%; }
  .header-actions { justify-self: end; }
}

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }
  .ledger-preview { grid-template-columns: 1fr; }
  .home-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  body { background-attachment: scroll, scroll, scroll; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .rs-clock { grid-column: 1 / -1; grid-row: 3; justify-self: end; }
  .brand-name { font-size: 1rem; }
  .app-main, .footer-inner { width: min(100% - 1.25rem, 77.5rem); }
  .app-main { padding-top: 0.875rem; }
  .home-hero { padding: 1rem; }
  .home-hero h1 { font-size: 2rem; }
  .home-panels, .footer-link-groups { grid-template-columns: 1fr; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .beta-badge, .locale-form button { display: none; }
  .header-actions { gap: 0.25rem; }
  .login-link { padding-inline: 0.5rem; }
  .search-field { grid-template-columns: 1fr; }
  .search-field button { border-top: 1px solid rgba(148, 163, 184, 0.18); }
  .hero-links .button { width: 100%; }
}

/* Public product surfaces, aligned with RuneLedger's final pre-Go release. */
.content-section,
.market-analysis,
.profile-context section,
.evidence-panel,
.competition-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.5rem;
  background: rgba(12, 19, 31, 0.86);
}

.content-section { padding: 1rem; }
.content-section + .content-section { margin-top: 0.75rem; }

.breadcrumb {
  min-height: 1.75rem;
  margin-bottom: 0.625rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
}

.breadcrumb a { color: var(--cyan); text-decoration: none; }

.surface-nav {
  min-height: 2.75rem;
  margin-bottom: 0.75rem;
  padding: 0 0.375rem;
  display: flex;
  align-items: stretch;
  gap: 0.125rem;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.5rem;
  background: rgba(8, 13, 22, 0.9);
  scrollbar-width: none;
}

.surface-nav::-webkit-scrollbar { display: none; }

.surface-nav a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.surface-nav a:hover,
.surface-nav a[aria-current="page"] {
  border-bottom-color: var(--cyan);
  color: var(--text);
}

.compact-nav { width: fit-content; max-width: 100%; }

.segmented-control {
  display: inline-flex;
  padding: 0.1875rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.5rem;
  background: rgba(7, 12, 21, 0.84);
}

.segmented-control a {
  min-height: 2.125rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  text-decoration: none;
}

.segmented-control a[aria-current="page"] {
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
}

.compact-empty { min-height: 8rem; padding: 1.25rem; }
.compact-empty strong { display: block; margin-bottom: 0.25rem; color: var(--text); }
.compact-empty p { max-width: 38rem; margin: 0; }

/* Search */
.search-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  gap: 0.75rem;
  align-items: stretch;
}

.search-hero-copy,
main .search-panel {
  min-height: 19rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.5rem;
  background: linear-gradient(145deg, rgba(21, 32, 49, 0.96), rgba(9, 15, 25, 0.97));
}

.search-hero-copy {
  display: grid;
  align-content: center;
  padding: 1.5rem;
  background:
    linear-gradient(120deg, rgba(56, 189, 248, 0.14), transparent 55%),
    linear-gradient(145deg, rgba(21, 32, 49, 0.96), rgba(9, 15, 25, 0.97));
}

.search-hero-copy h1 { max-width: 13ch; margin-bottom: 0.75rem; }
.search-hero-copy > p:last-of-type { max-width: 43rem; margin-bottom: 0; color: var(--muted); }

.trust-chips {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.trust-chips span,
.competition-card-meta span {
  min-height: 1.625rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 0.375rem;
  background: rgba(56, 189, 248, 0.07);
  color: #b9dff2;
  font-size: 0.6875rem;
  font-weight: 820;
}

main .search-panel {
  margin: 0;
  padding: 1.125rem;
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.45fr) minmax(0, 1fr);
  align-content: center;
  gap: 0.625rem;
}

.search-panel-copy { grid-column: 1 / -1; margin-bottom: 0.375rem; }
.search-panel-copy h2 { margin: 0; }
.search-panel-copy p:last-child { margin: 0.375rem 0 0; color: var(--muted); font-size: 0.8125rem; }
.search-panel label { align-self: end; }
.search-panel button { grid-column: 1 / -1; min-height: 2.875rem; background: #0e9f6e; border-color: rgba(66, 211, 146, 0.48); }
.search-panel button:hover { background: #0b8b60; }
.search-results { margin-top: 0.75rem; }

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

.trust-grid article { min-height: 9rem; padding: 1rem; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 0.5rem; background: rgba(11, 18, 29, 0.82); }
.trust-grid h2 { margin-bottom: 0.375rem; font-size: 1rem; }
.trust-grid article > p:last-child { margin: 0; color: var(--muted); font-size: 0.8125rem; }

/* Market */
.market-header,
.price-hero,
.directory-heading,
.detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.market-header {
  margin-bottom: 0.75rem;
  padding: 0.875rem 0 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.market-header > div:first-child { max-width: 50rem; }
.market-header h1 { margin-bottom: 0.5rem; }
.market-header p:last-child,
.price-title-block > p:last-child { margin: 0; color: var(--muted); }
.market-actions { display: flex; gap: 0.375rem; }
.market-actions .selected { border-color: rgba(56, 189, 248, 0.46); background: rgba(56, 189, 248, 0.13); color: var(--cyan); }

main .market-search {
  margin: 0 0 0.75rem;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 7rem 10rem minmax(14rem, 1fr) auto;
  align-items: end;
  gap: 0.625rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.5rem;
  background: rgba(8, 13, 22, 0.82);
}

main .market-search > label:not(.market-query) { display: none; }
.market-search button { min-height: 2.7rem; }
.market-query { position: relative; }
.market-suggestions {
  position: absolute;
  inset: calc(100% + 0.25rem) 0 auto;
  z-index: 20;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
  background: #08111d;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.4);
}
.market-suggestions a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0.55rem; }
.catalogue-pagination { display: flex; justify-content: flex-end; margin-top: 1rem; }

.market-analysis {
  margin-bottom: 0.75rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.8fr);
  gap: 1rem;
  align-items: center;
  background:
    linear-gradient(110deg, rgba(56, 189, 248, 0.1), transparent 42%),
    rgba(12, 19, 31, 0.9);
}

.market-analysis h2 { margin-bottom: 0.375rem; }
.market-analysis > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.market-proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.375rem; }
.market-proof-grid span { min-height: 4.25rem; padding: 0.625rem; display: grid; align-content: center; gap: 0.125rem; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 0.4375rem; background: rgba(7, 12, 21, 0.66); color: var(--muted); font-size: 0.6875rem; }
.market-proof-grid strong { color: var(--cyan); font-size: 0.8125rem; }

.market-catalogue { padding: 0.875rem; }
.market-catalogue table td:nth-child(4),
.market-catalogue table td:nth-child(5) { font-variant-numeric: tabular-nums; }

.price-hero {
  padding: 1.125rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.5rem 0.5rem 0 0;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.13), transparent 48%), rgba(12, 19, 31, 0.94);
}

.price-title-block h1 { margin-bottom: 0.5rem; }
.price-summary { margin-top: 0; padding: 0 1rem 0.75rem; border-radius: 0 0 0.5rem 0.5rem; }
.detail-grid { margin-top: 0.75rem; display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 0.75rem; align-items: start; }
.detail-grid .ledger-section { padding-top: 0; min-width: 0; }

.evidence-panel { padding: 1rem; }
.evidence-panel h2 { margin-bottom: 0.5rem; font-size: 1rem; }
.evidence-panel > p:last-child { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.8125rem; }
.evidence-panel dl { margin: 0; }
.evidence-panel dl div { padding: 0.5rem 0; display: flex; justify-content: space-between; gap: 0.75rem; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.evidence-panel dt { color: var(--muted); font-size: 0.75rem; }
.evidence-panel dd { margin: 0; color: var(--text); font-size: 0.75rem; font-weight: 800; text-align: right; }

/* Profile */
.profile-page .profile-hero {
  padding: 1.125rem;
  border-radius: 0.5rem 0.5rem 0 0;
  background:
    linear-gradient(115deg, rgba(56, 189, 248, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(15, 23, 35, 0.96), rgba(8, 13, 22, 0.96));
}

.profile-page .profile-identity { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
.profile-avatar { position: relative; width: 5.5rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(56, 189, 248, 0.32); border-radius: 50%; background: rgba(7, 12, 21, 0.82); }
.profile-avatar img { width: 3.75rem; height: 3.75rem; border-radius: 0.5rem; }
.profile-avatar span { position: absolute; right: -0.25rem; bottom: -0.125rem; min-height: 1.375rem; display: inline-flex; align-items: center; padding: 0 0.375rem; border: 1px solid rgba(246, 196, 83, 0.35); border-radius: 0.375rem; background: #16130d; color: var(--gold); font-size: 0.625rem; font-weight: 900; }
.profile-page .profile-title-row h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
.profile-page .trust-line { margin-top: 0.5rem; color: var(--muted); font-size: 0.8125rem; }
.profile-page .trust-line span { color: #c9d7e7; }
.profile-page .summary-strip { margin-top: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 0; border-top: 1px solid rgba(148, 163, 184, 0.16); border-radius: 0; background: transparent; }
.profile-page .summary-strip .stat-card { padding-top: 0.75rem; }

.profile-game-switcher {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.profile-game-switcher > span { margin-right: 0.25rem; color: var(--muted); font-size: 0.6875rem; font-weight: 850; text-transform: uppercase; }
.profile-game-switcher a { min-height: 1.875rem; display: inline-flex; align-items: center; padding: 0 0.625rem; border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 0.375rem; color: var(--muted); font-size: 0.75rem; font-weight: 850; text-decoration: none; }
.profile-game-switcher a[aria-current="page"] { border-color: rgba(56, 189, 248, 0.42); background: rgba(56, 189, 248, 0.11); color: var(--cyan); }
.profile-game-switcher small { margin-left: auto; padding: 0.25rem 0.5rem; border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 0.375rem; text-transform: capitalize; }

.profile-page .profile-tabs { position: sticky; top: 3.375rem; z-index: 10; gap: 1.25rem; padding: 0 0.75rem; border: 1px solid rgba(148, 163, 184, 0.16); border-top: 0; border-radius: 0 0 0.5rem 0.5rem; backdrop-filter: blur(16px); }
.profile-page .profile-tabs a { padding: 0.75rem 0 0.625rem; font-size: 0.8125rem; }
.profile-content-grid { margin-top: 0.75rem; display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 0.75rem; align-items: start; }
.profile-content-grid .ledger-section { min-width: 0; padding-top: 0; }
.profile-context { display: grid; gap: 0.75rem; }
.profile-context section { padding: 0.875rem; }
.profile-context h2 { margin-bottom: 0.375rem; font-size: 0.9375rem; }
.profile-context section > p:last-child { margin: 0; color: var(--muted); font-size: 0.78125rem; }

/* Directories and competitions */
.directory-heading,
.detail-heading { max-width: none; }
.directory-heading > div,
.detail-heading > div { max-width: 58rem; }
.directory-heading h1,
.detail-heading h1 { font-size: 2.625rem; }
.directory-controls { margin-bottom: 0.75rem; padding: 0.625rem; display: flex; align-items: end; justify-content: space-between; gap: 0.75rem; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 0.5rem; background: rgba(8, 13, 22, 0.82); }
main .directory-controls form { margin: 0; padding: 0; display: grid; grid-template-columns: minmax(10rem, 18rem) auto; align-items: end; gap: 0.5rem; border: 0; background: transparent; }
.directory-ledger { margin-top: 0.75rem; }
.detail-page > .summary-strip,
.competition-page > .summary-strip { margin: 0 0 0.75rem; padding: 0 1rem 0.75rem; }

.competition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 0.625rem; }
.competition-card { padding: 0.875rem; }
.competition-card-meta { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.competition-card h3 { margin: 0.75rem 0 0.25rem; font-size: 1rem; }
.competition-card h3 a { color: var(--text); text-decoration: none; }
.competition-card h3 a:hover { color: var(--cyan); }
.competition-card > p { margin-bottom: 0.625rem; color: var(--cyan); font-size: 0.75rem; font-weight: 800; }
.competition-card dl { margin: 0; }
.competition-card dl div { padding: 0.375rem 0; display: flex; justify-content: space-between; gap: 0.75rem; border-top: 1px solid rgba(148, 163, 184, 0.1); font-size: 0.75rem; }
.competition-card dt { color: var(--muted); }
.competition-card dd { margin: 0; color: var(--text-soft); text-align: right; }
.competition-layout { margin-bottom: 0.75rem; display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 0.75rem; align-items: start; }
.participation-panel > p { color: var(--muted); font-size: 0.8125rem; }
.competition-candidates { display: grid; gap: 0.5rem; }
.competition-candidates article { padding: 0.75rem; border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 0.4375rem; background: rgba(7, 12, 21, 0.58); }
.competition-candidates article h3 { margin: 0; }
.competition-candidates article p { color: var(--muted); }
main .competition-candidates form { margin: 0; padding: 0; border: 0; background: transparent; }

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 0.75rem;
  align-items: start;
}

main .tool-form {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  border: 0;
  background: transparent;
}

.tool-form .wide-field,
.tool-form button { grid-column: 1 / -1; }
.tool-form textarea { min-height: 6rem; }
.tool-results { margin-top: 0.75rem; }

@media (max-width: 980px) {
  .search-hero,
  .market-analysis { grid-template-columns: 1fr; }
  .profile-content-grid,
  .detail-grid,
  .competition-layout { grid-template-columns: 1fr; }
  .tool-layout { grid-template-columns: 1fr; }
  .profile-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .search-hero { grid-template-columns: 1fr; }
  .search-hero-copy,
  main .search-panel { min-height: 0; }
  .search-hero-copy { padding: 1rem; }
  .trust-grid { grid-template-columns: 1fr; }
  .market-header,
  .price-hero,
  .directory-heading,
  .detail-heading { align-items: flex-start; flex-direction: column; }
  .market-actions { width: 100%; }
  .market-actions .button { flex: 1; }
  main .market-search { grid-template-columns: 1fr; }
  .market-suggestions { position: static; margin-top: 0.25rem; }
  .market-proof-grid { grid-template-columns: 1fr; }
  .profile-page .profile-identity { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .profile-avatar { width: 4.5rem; }
  .profile-avatar img { width: 3rem; height: 3rem; }
  .profile-page .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-page .summary-strip .stat-card:nth-child(3) { padding-left: 0; border-left: 0; }
  .profile-page .profile-tabs { top: 6.7rem; }
  .profile-context { grid-template-columns: 1fr; }
  .directory-controls { align-items: stretch; flex-direction: column; }
  main .directory-controls form { width: 100%; grid-template-columns: minmax(0, 1fr) auto; }
}

@media (max-width: 430px) {
  main .search-panel { grid-template-columns: 1fr; }
  .search-panel-copy,
  .search-panel button { grid-column: auto; }
  .profile-page .profile-identity { grid-template-columns: 1fr; }
  .profile-page .profile-title-row h1 { font-size: 2.25rem; }
  .profile-page .summary-strip { grid-template-columns: 1fr 1fr; }
  .profile-game-switcher small { display: none; }
  .directory-heading h1,
  .detail-heading h1 { font-size: 2rem; }
  main .directory-controls form { grid-template-columns: 1fr; }
  main .tool-form { grid-template-columns: 1fr; }
  .tool-form .wide-field,
  .tool-form button { grid-column: auto; }
}

/* Technical player profile — restored from the final pre-Go information model. */
body:has(.technical-profile-hero) .app-main {
  width: min(92rem, calc(100% - 2rem));
}

.profile-page {
  --profile-accent: var(--cyan);
  --profile-accent-soft: rgba(56, 189, 248, 0.12);
  --profile-accent-line: rgba(56, 189, 248, 0.36);
}

.profile-page.profile-game-osrs {
  --profile-accent: #e8b35b;
  --profile-accent-soft: rgba(232, 179, 91, 0.12);
  --profile-accent-line: rgba(232, 179, 91, 0.38);
}

.profile-source-notice {
  min-height: 2rem;
  margin-bottom: 0.625rem;
  padding: 0.4rem 0.625rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.375rem;
  background: rgba(8, 13, 22, 0.78);
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-source-notice > span {
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--profile-accent-line);
  border-radius: 50%;
  color: var(--profile-accent);
  font-size: 0.62rem;
  font-weight: 900;
}

.technical-profile-hero {
  position: relative;
  min-height: 17.5rem;
  padding: 1.125rem 11.75rem 5.8rem 1.125rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.5rem 0.5rem 0 0;
  background:
    linear-gradient(90deg, var(--profile-accent-soft), transparent 43%),
    linear-gradient(180deg, rgba(17, 27, 42, 0.98), rgba(8, 13, 22, 0.98));
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.24);
}

.technical-profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background: image-set(
    url("/assets/runic-dashboard-bg.avif") type("image/avif"),
    url("/assets/runic-dashboard-bg.webp") type("image/webp")
  ) center / cover no-repeat;
  pointer-events: none;
}

.technical-profile-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--profile-accent), var(--gold) 54%, transparent 92%);
  opacity: 0.8;
}

.technical-profile-main,
.profile-stat-strip,
.profile-quick-actions {
  position: relative;
  z-index: 2;
}

.technical-profile-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.technical-profile-avatar {
  position: relative;
  width: 6rem;
  height: 6rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--profile-accent-line);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.08), rgba(5, 9, 16, 0.96) 68%);
  box-shadow: inset 0 0 0 0.25rem rgba(8, 13, 22, 0.9), 0 0 1.5rem var(--profile-accent-soft);
}

.technical-profile-avatar img {
  width: 4.65rem;
  height: 4.65rem;
  object-fit: contain;
  border-radius: 50%;
}

.technical-profile-avatar > span {
  position: absolute;
  right: -0.15rem;
  bottom: 0.15rem;
  min-width: 2rem;
  padding: 0.18rem 0.35rem;
  border: 1px solid rgba(246, 196, 83, 0.42);
  border-radius: 0.25rem;
  background: #17130c;
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

.technical-profile-identity { min-width: 0; max-width: 48rem; }
.technical-profile-identity .eyebrow { margin-bottom: 0.35rem; color: var(--profile-accent); }
.technical-profile-title-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.technical-profile-title-row h1 { margin: 0; font-size: clamp(2.4rem, 4vw, 3.5rem); letter-spacing: -0.045em; }
.technical-profile-identity > p:last-child { max-width: 45rem; margin: 0.55rem 0 0; color: #c3d0df; font-size: 0.84rem; }

.profile-status-badge {
  min-height: 1.55rem;
  padding: 0.15rem 0.5rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(66, 211, 146, 0.34);
  border-radius: 0.3rem;
  background: rgba(66, 211, 146, 0.1);
  color: #8eebbd;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.technical-profile-character {
  position: absolute;
  z-index: 1;
  top: -0.35rem;
  right: 1rem;
  width: 10.75rem;
  height: 15rem;
  display: grid;
  place-items: end center;
  filter: drop-shadow(0 1rem 1rem rgba(0,0,0,0.5));
}

.technical-profile-character::before {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 0.5rem;
  width: 92%;
  height: 3rem;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--profile-accent-soft), transparent 68%);
}

.technical-profile-character img { position: relative; max-width: 100%; max-height: 100%; object-fit: contain; }

.profile-stat-strip {
  position: absolute;
  right: 1.125rem;
  bottom: 1rem;
  left: 1.125rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.375rem;
  background: rgba(5, 10, 17, 0.82);
  backdrop-filter: blur(12px);
}

.profile-stat {
  min-width: 0;
  padding: 0.58rem 0.7rem;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
}

.profile-stat:first-child { border-left: 0; }
.profile-stat > span { display: block; overflow: hidden; color: var(--muted); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.07em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.profile-stat > strong { display: block; margin-top: 0.1rem; overflow: hidden; color: var(--text); font: 800 0.93rem/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.profile-stat.updated > strong { overflow: visible; white-space: normal; }
.profile-stat.positive > strong { color: #7ce2af; }
.profile-stat.negative > strong { color: #ff9ea4; }

.profile-quick-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.45rem;
}

.profile-quick-actions .button { min-height: 2.1rem; padding: 0.35rem 0.7rem; font-size: 0.72rem; }

.profile-technical-bar {
  min-height: 3.75rem;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-top: 0;
  background: rgba(10, 16, 26, 0.92);
}

.profile-technical-bar .profile-game-switcher { margin: 0; padding: 0; border: 0; }
.profile-technical-bar .profile-game-switcher a { gap: 0.55rem; }
.profile-technical-bar .profile-game-switcher small { margin: 0; border: 0; padding: 0; font-size: 0.62rem; }
.profile-technical-bar .profile-game-switcher a[aria-current="page"] { border-color: var(--profile-accent-line); background: var(--profile-accent-soft); color: var(--profile-accent); }

.profile-ledger-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-ledger-meta div { display: grid; grid-template-columns: auto auto; gap: 0.35rem; align-items: baseline; }
.profile-ledger-meta dt { color: var(--muted); font-size: 0.61rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.profile-ledger-meta dd { margin: 0; color: var(--text-soft); font-size: 0.69rem; font-weight: 800; }

.profile-page .technical-tabs {
  position: sticky;
  top: 4.35rem;
  z-index: 12;
  min-height: 3rem;
  padding: 0 0.6rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  background: rgba(8, 13, 22, 0.92);
  backdrop-filter: blur(16px);
  scrollbar-width: thin;
}

.profile-page .technical-tabs a {
  min-width: max-content;
  padding: 0.78rem 0.7rem 0.62rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.profile-page .technical-tabs a:hover { color: var(--text); }
.profile-page .technical-tabs a[aria-current="page"] { border-color: var(--profile-accent); color: var(--profile-accent); }

.technical-profile-layout {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.25rem;
  gap: 0.75rem;
  align-items: start;
}

.technical-metric-panel,
.technical-side-card {
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(15, 23, 36, 0.96), rgba(8, 13, 22, 0.96));
  box-shadow: 0 0.75rem 1.75rem rgba(0,0,0,0.16);
}

.technical-metric-panel { min-width: 0; overflow: hidden; }
.technical-section-heading { margin: 0; padding: 0.85rem 0.95rem; align-items: end; border-bottom: 1px solid rgba(148, 163, 184, 0.13); }
.technical-section-heading .eyebrow { margin-bottom: 0.25rem; color: var(--profile-accent); }
.technical-section-heading h2 { margin: 0; font-size: 1.15rem; }
.technical-section-heading > div:first-child > p:last-child { max-width: 45rem; margin: 0.3rem 0 0; color: var(--muted); font-size: 0.74rem; }

.metric-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.55rem; color: var(--muted); font-size: 0.64rem; }
.metric-legend span { display: inline-flex; align-items: center; gap: 0.25rem; }
.legend-dot { width: 0.45rem; height: 0.45rem; display: inline-block; border-radius: 50%; background: #4d5a6c; }
.legend-dot.positive { background: var(--success); }

.technical-table-shell { margin: 0; border: 0; border-radius: 0; overflow-x: auto; }
.technical-skill-table { width: 100%; min-width: 68rem; border-collapse: collapse; font-size: 0.69rem; }
.technical-skill-table thead { background: rgba(6, 11, 18, 0.84); }
.technical-skill-table th { padding: 0.56rem 0.55rem; border-bottom: 1px solid rgba(148, 163, 184, 0.16); color: #93a6bc; font-size: 0.59rem; font-weight: 900; letter-spacing: 0.055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.technical-skill-table th.numeric,
.technical-skill-table td.numeric { text-align: right; }
.technical-skill-table td { padding: 0.48rem 0.55rem; border-bottom: 1px solid rgba(148, 163, 184, 0.09); color: var(--text-soft); vertical-align: middle; white-space: nowrap; }
.technical-skill-table tbody tr:last-child td { border-bottom: 0; }
.technical-skill-table tbody tr:hover { background: var(--profile-accent-soft); }

.technical-metric-identity { min-width: 8.75rem; display: inline-flex; align-items: center; gap: 0.52rem; }
.technical-metric-identity img { width: 1.75rem; height: 1.75rem; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 0.15rem 0.2rem rgba(0,0,0,0.5)); }
.technical-metric-identity > span { display: grid; }
.technical-metric-identity strong { color: var(--text); font-size: 0.76rem; }
.technical-metric-identity small { font-size: 0.58rem; letter-spacing: 0.05em; text-transform: uppercase; }

.technical-skill-table .level-value { color: var(--profile-accent); font: 900 0.78rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.technical-skill-table .rank-value { color: #cbd8e8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.technical-skill-table .amount-value { color: #f0e0b7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 800; }
.technical-skill-table .delta-value { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.technical-skill-table .delta-value.positive { color: #72dfa9; font-weight: 850; }
.technical-skill-table .delta-value.negative { color: #ff969e; }
.technical-skill-table .delta-value.neutral { color: #65758a; }

.target-copy { display: block; color: #d1dceb; font-size: 0.64rem; }
.target-progress { width: 7rem; height: 0.22rem; margin-top: 0.25rem; display: block; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: rgba(148, 163, 184, 0.14); }
.target-progress::-webkit-progress-bar { border-radius: inherit; background: rgba(148, 163, 184, 0.14); }
.target-progress::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--profile-accent), var(--gold)); }
.target-progress::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--profile-accent), var(--gold)); }

.technical-profile-sidebar { display: grid; gap: 0.75rem; }
.technical-side-card { padding: 0.82rem; }
.technical-side-heading { margin-bottom: 0.65rem; display: flex; align-items: center; gap: 0.45rem; }
.technical-side-heading > img { width: 1.1rem; height: 1.1rem; object-fit: contain; }
.technical-side-heading h2 { margin: 0; font-size: 0.9rem; }

.milestone-kpis { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 0.375rem; background: rgba(6, 11, 18, 0.5); }
.milestone-kpis div { min-width: 0; padding: 0.5rem 0.35rem; border-left: 1px solid rgba(148, 163, 184, 0.1); text-align: center; }
.milestone-kpis div:first-child { border-left: 0; }
.milestone-kpis dt { min-height: 1.8rem; color: var(--muted); font-size: 0.56rem; font-weight: 800; line-height: 1.25; text-transform: uppercase; }
.milestone-kpis dd { margin: 0.15rem 0 0; color: var(--profile-accent); font: 900 1rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }

.milestone-details,
.tracker-details { margin: 0.55rem 0 0; }
.milestone-details div,
.tracker-details div { padding: 0.42rem 0; display: flex; justify-content: space-between; gap: 0.5rem; border-top: 1px solid rgba(148, 163, 184, 0.09); }
.milestone-details dt,
.tracker-details dt { color: var(--muted); font-size: 0.64rem; }
.milestone-details dd,
.tracker-details dd { margin: 0; color: var(--text-soft); font-size: 0.64rem; font-weight: 800; text-align: right; }

.technical-side-link { margin-top: 0.55rem; padding-top: 0.55rem; display: flex; justify-content: space-between; border-top: 1px solid rgba(148, 163, 184, 0.12); color: var(--profile-accent); font-size: 0.67rem; font-weight: 850; text-decoration: none; }

.profile-data-empty { min-height: 15rem; padding: 2rem; display: flex; align-items: center; justify-content: center; gap: 0.8rem; color: var(--muted); text-align: left; }
.profile-data-empty h3 { margin: 0; color: var(--text); }
.profile-data-empty p { max-width: 36rem; margin: 0.25rem 0 0; font-size: 0.76rem; }

@media (max-width: 1120px) {
  .technical-profile-layout { grid-template-columns: 1fr; }
  .technical-profile-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-ledger-meta { display: none; }
}

@media (max-width: 760px) {
  body:has(.technical-profile-hero) .app-main { width: min(100% - 1rem, 92rem); }
  .profile-source-notice { align-items: flex-start; }
  .technical-profile-hero { min-height: 23.25rem; padding: 0.9rem 0.9rem 9.25rem; }
  .technical-profile-main { align-items: flex-start; }
  .technical-profile-avatar { width: 4.75rem; height: 4.75rem; }
  .technical-profile-avatar img { width: 3.65rem; height: 3.65rem; }
  .technical-profile-character { top: 5.25rem; right: 0.4rem; width: 7rem; height: 10rem; opacity: 0.82; }
  .technical-profile-title-row h1 { font-size: 2.25rem; }
  .technical-profile-identity > p:last-child { padding-right: 5.75rem; font-size: 0.74rem; }
  .profile-stat-strip { right: 0.9rem; bottom: 0.8rem; left: 0.9rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-stat:nth-child(4) { border-left: 0; border-top: 1px solid rgba(148, 163, 184, 0.12); }
  .profile-stat:nth-child(n+5) { border-top: 1px solid rgba(148, 163, 184, 0.12); }
  .profile-quick-actions { margin-top: 0.75rem; }
  .profile-technical-bar { align-items: flex-start; flex-direction: column; }
  .profile-technical-bar .profile-game-switcher { width: 100%; }
  .profile-technical-bar .profile-game-switcher a { flex: 1; justify-content: space-between; }
  .profile-page .technical-tabs { top: 6.7rem; }
  .technical-section-heading { align-items: flex-start; flex-direction: column; }
  .metric-legend { justify-content: flex-start; }
  .technical-profile-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .technical-profile-main { gap: 0.65rem; }
  .technical-profile-avatar { width: 4rem; height: 4rem; }
  .technical-profile-avatar img { width: 3rem; height: 3rem; }
  .technical-profile-title-row h1 { font-size: 1.9rem; }
  .technical-profile-identity .eyebrow { font-size: 0.62rem; }
  .technical-profile-character { opacity: 0.55; }
  .profile-stat { padding: 0.48rem; }
  .profile-stat > strong { font-size: 0.78rem; }
  .profile-technical-bar .profile-game-switcher small { display: none; }
}

/* Whole-product technical polish: the corrected profile is the visual source of truth. */
body:has(.market-page) .app-main,
body:has(.directory-page) .app-main,
body:has(.technical-price-page) .app-main,
body:has(.member-page) .app-main {
  width: min(88rem, calc(100% - 2rem));
}

.directory-title-meta,
.market-header-meta,
.price-identity-meta {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.directory-title-meta span,
.market-header-meta span,
.price-identity-meta span {
  min-height: 1.55rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 0.35rem;
  background: rgba(6, 11, 18, 0.62);
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
}

.directory-surface-nav { margin-top: -0.25rem; }
.directory-empty { min-height: 13rem; }
.directory-empty > div { max-width: 42rem; }
.directory-empty a,
.compact-empty a { color: var(--cyan); font-size: 0.76rem; font-weight: 850; text-decoration: none; }

.home-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-panel { min-height: 9.25rem; }
.home-panel .eyebrow { margin-bottom: 0.35rem; }
.home-panel a { display: inline-flex; align-items: center; }

.detail-command-heading,
.tool-heading,
.form-page-heading {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.detail-command-heading > div,
.tool-heading > div,
.form-page-heading > div { max-width: 62rem; }

.detail-heading-meta { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.detail-heading-meta span { padding: 0.25rem 0.5rem; border: 1px solid rgba(148, 163, 184, 0.15); border-radius: 0.35rem; color: var(--muted); font-size: 0.67rem; font-weight: 800; }

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

.manifest-grid article {
  min-height: 10.75rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.5rem;
  background: rgba(10, 17, 28, 0.82);
}

.manifest-grid h2 { margin: 0; font-size: 1rem; }
.manifest-grid p:last-child { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.55; }

.trust-ledger,
.release-ledger,
.market-signal-summary {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.5rem;
  background: rgba(10, 17, 28, 0.84);
}

.trust-ledger { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr); gap: 1.25rem; }
.trust-ledger h2 { margin: 0; }
.trust-ledger p { color: var(--muted); }
.trust-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.trust-ledger dl,
.health-grid { margin: 0; }
.trust-ledger dl div { padding: 0.6rem 0; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.trust-ledger dt { color: var(--muted); font-size: 0.72rem; }
.trust-ledger dd { margin: 0; color: var(--text); font-size: 0.72rem; font-weight: 850; text-align: right; }

.health-grid { margin-top: 0.75rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem; }
.health-grid article { min-height: 8.5rem; display: grid; align-content: center; padding: 1rem; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 0.5rem; background: rgba(9, 16, 27, 0.84); }
.health-grid span { color: var(--cyan); font-size: 0.68rem; font-weight: 900; text-transform: uppercase; }
.health-grid strong { margin-top: 0.3rem; color: var(--text); font: 850 1rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.health-grid small { margin-top: 0.5rem; color: var(--muted); }

.release-ledger { display: grid; grid-template-columns: minmax(17rem, 0.72fr) minmax(0, 1.28fr); gap: 1rem; align-items: center; }
.release-ledger h2 { margin: 0; font-size: 1.05rem; }
.release-ledger > p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.6; }

/* Market command surface */
.market-command-header { padding-bottom: 1.25rem; }
.market-command-header > div:first-child { max-width: 62rem; }
.market-command-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(30rem, 0.9fr);
  gap: 0.625rem;
}

.market-command-deck .market-search { margin: 0; }
.market-console-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.5rem;
  background: rgba(7, 12, 21, 0.78);
}

.market-console-stats div { min-width: 0; padding: 0.7rem 0.8rem; border-left: 1px solid rgba(148, 163, 184, 0.12); border-top: 1px solid rgba(148, 163, 184, 0.12); }
.market-console-stats div:nth-child(-n+2) { border-top: 0; }
.market-console-stats div:nth-child(odd) { border-left: 0; }
.market-console-stats dt { color: var(--muted); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.market-console-stats dd { margin: 0.3rem 0 0; overflow: hidden; color: var(--text); font: 850 0.78rem/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }

.market-signal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(9rem, 0.42fr)) minmax(18rem, 1fr);
  gap: 0;
  align-items: center;
}
.market-signal-summary > div { min-height: 4.2rem; display: grid; align-content: center; padding: 0 0.8rem; border-right: 1px solid rgba(148, 163, 184, 0.12); }
.market-signal-summary span { color: var(--muted); font-size: 0.64rem; font-weight: 850; text-transform: uppercase; }
.market-signal-summary strong { margin-top: 0.25rem; color: var(--text); font: 850 0.78rem/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; }
.market-signal-summary p { margin: 0; padding-left: 1rem; color: var(--muted); font-size: 0.76rem; line-height: 1.45; }

.market-table-shell { background: rgba(4, 8, 14, 0.78); }
.market-table { min-width: 72rem; }
.market-table th { font-size: 0.62rem; letter-spacing: 0.035em; text-transform: uppercase; }
.market-table td { height: 3.75rem; font-size: 0.74rem; vertical-align: middle; }

@media (max-width: 720px) {
  .market-table-shell:has(.market-table:not(.signal-table)) { overflow: visible; border: 0; background: transparent; }
  .market-table:not(.signal-table) { display: block; min-width: 0; }
  .market-table:not(.signal-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .market-table:not(.signal-table) tbody { display: grid; gap: 0.75rem; }
  .market-table:not(.signal-table) tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; padding: 0.875rem; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 0.45rem; background: rgba(5, 10, 18, 0.84); }
  .market-table:not(.signal-table) td { display: grid; align-content: start; min-width: 0; height: auto; padding: 0; border: 0; text-align: left; white-space: normal; }
  .market-table:not(.signal-table) td:first-child { grid-column: 1 / -1; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
  .market-table:not(.signal-table) td::before { margin-bottom: 0.25rem; color: var(--muted); content: attr(data-label); font-size: 0.6rem; font-weight: 850; letter-spacing: 0.045em; text-transform: uppercase; }
  .market-table:not(.signal-table) td:first-child::before { display: none; }
}
.market-item-identity { min-width: 13.5rem; display: flex; align-items: center; gap: 0.65rem; color: var(--text); text-decoration: none; }
.market-item-identity img { width: 2.75rem; height: 2.75rem; flex: 0 0 auto; object-fit: contain; image-rendering: auto; }
.market-item-identity strong,
.market-item-identity small,
.market-pair small { display: block; }
.market-item-identity strong { font-size: 0.78rem; }
.market-item-identity small,
.market-pair small { margin-top: 0.15rem; color: var(--muted); font-size: 0.64rem; }
.numeric-cell { font: 780 0.74rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }
.data-quality-chip,
.signal-badge { display: inline-flex; align-items: center; min-height: 1.5rem; padding: 0 0.45rem; border: 1px solid rgba(66, 211, 146, 0.28); border-radius: 0.35rem; background: rgba(66, 211, 146, 0.08); color: var(--success); font-size: 0.66rem; font-weight: 900; }
.signal-badge { border-color: rgba(56, 189, 248, 0.3); background: rgba(56, 189, 248, 0.09); color: var(--cyan); }
.market-margin,
.market-margin-rate { display: block; }
.market-margin { color: var(--success); font-size: 0.74rem; }
.market-margin-rate { margin-top: 0.18rem; color: var(--muted); font-size: 0.64rem; }

/* Technical item sheet */
.technical-price-hero { min-height: 9.5rem; align-items: center; }
.price-item-heading { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.price-item-art { width: 6rem; height: 6rem; flex: 0 0 auto; margin: 0; display: grid; place-items: center; border: 1px solid rgba(246, 196, 83, 0.24); border-radius: 0.5rem; background: rgba(5, 10, 18, 0.7); }
.price-item-art img { width: 5.5rem; height: 5.5rem; object-fit: contain; }
.price-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.price-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; border: 1px solid rgba(148, 163, 184, 0.16); border-top: 0; border-radius: 0 0 0.5rem 0.5rem; background: rgba(5, 10, 18, 0.86); }
.price-stat-grid article { min-width: 0; min-height: 6.25rem; padding: 0.75rem; border-left: 1px solid rgba(148, 163, 184, 0.12); }
.price-stat-grid article:first-child { border-left: 0; }
.price-stat-grid span,
.price-stat-grid small { display: block; color: var(--muted); font-size: 0.61rem; }
.price-stat-grid span { font-weight: 850; letter-spacing: 0.035em; text-transform: uppercase; }
.price-stat-grid strong { display: block; margin-top: 0.5rem; overflow: hidden; color: var(--text); font: 900 0.9rem/1.15 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.price-stat-grid small { margin-top: 0.45rem; line-height: 1.35; }
.market-move { color: var(--success) !important; }
.price-terminal-grid { margin-top: 0.625rem; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr); gap: 0.625rem; }
.price-market-frame { margin: 0; }
.price-technical-ledger { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 0.4rem; background: rgba(5, 10, 18, 0.52); }
.price-technical-ledger div { min-width: 0; padding: 0.75rem; border-left: 1px solid rgba(148, 163, 184, 0.1); border-top: 1px solid rgba(148, 163, 184, 0.1); }
.price-technical-ledger div:nth-child(-n+3) { border-top: 0; }
.price-technical-ledger div:nth-child(3n+1) { border-left: 0; }
.price-technical-ledger dt { color: var(--muted); font-size: 0.64rem; }
.price-technical-ledger dd { margin: 0.35rem 0 0; color: var(--text); font: 850 0.76rem/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; }
.item-contract-panel { margin: 0; }
.price-history-ledger { margin-top: 0.625rem; }

/* Tools and private forms */
.calculator-workbench,
.form-layout { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(19rem, 0.62fr); gap: 0.625rem; align-items: start; }
.calculator-console form,
.form-console form { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.calculator-console form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 0.75rem; align-items: end; }
.calculator-console label,
.form-console label { min-width: 0; display: grid; gap: 0.38rem; color: var(--text-soft); font-size: 0.72rem; font-weight: 850; }
.calculator-console input,
.form-console input,
.form-console select,
.form-console textarea { width: 100%; }
.calculator-console button { min-height: 2.75rem; }
.calculator-note { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.7rem; }
.calculator-reference { margin: 0; }
.calculator-result { margin-top: 0.625rem; padding: 1rem; display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(22rem, 1.15fr) auto; gap: 1rem; align-items: center; border: 1px solid rgba(66, 211, 146, 0.25); border-radius: 0.5rem; background: rgba(10, 25, 25, 0.84); }
.calculator-result h2 { margin: 0; }
.calculator-result dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calculator-result dl div { padding: 0.5rem 0.75rem; border-left: 1px solid rgba(148, 163, 184, 0.12); }
.calculator-result dt { color: var(--muted); font-size: 0.64rem; }
.calculator-result dd { margin: 0.3rem 0 0; color: var(--success); font: 900 1rem/1.1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.calculator-result a { color: var(--cyan); font-size: 0.72rem; font-weight: 850; text-decoration: none; }

.form-layout { grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 0.55fr); }
.form-console { padding: 1rem; }
.form-console form { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.form-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.form-console textarea { min-height: 8rem; resize: vertical; }
.form-console label small { color: var(--muted); font-size: 0.64rem; font-weight: 650; }
.form-console button { width: fit-content; min-width: 13rem; }
.form-switch { margin: 0.85rem 0 0; padding-top: 0.75rem; border-top: 1px solid rgba(148, 163, 184, 0.12); color: var(--muted); font-size: 0.72rem; }
.form-context-rail { margin: 0; }
.form-context-rail > a { color: var(--cyan); font-size: 0.72rem; font-weight: 850; text-decoration: none; }
.file-field { padding: 0.75rem; border: 1px dashed rgba(56, 189, 248, 0.28); border-radius: 0.5rem; background: rgba(56, 189, 248, 0.04); }
.boundary-list { margin: 0.85rem 0 0; padding: 0; display: grid; gap: 0.5rem; list-style: none; }
.boundary-list li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.5rem; align-items: start; padding-top: 0.5rem; border-top: 1px solid rgba(148, 163, 184, 0.1); }
.boundary-list strong { color: var(--cyan); font: 850 0.68rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.boundary-list span { color: var(--muted); font-size: 0.72rem; line-height: 1.45; }

.member-page > .card,
.member-page > section,
.member-page > .grid,
.member-page > table { margin-top: 0.625rem; }
.member-nav { margin-bottom: 0.625rem; }
.member-page .grid { gap: 0.625rem; }
.member-page .card { background: rgba(10, 17, 28, 0.84); }
.member-page form { box-shadow: none; }
.competition-open-link { display: inline-flex; margin-top: 0.75rem; color: var(--cyan); font-size: 0.7rem; font-weight: 850; text-decoration: none; }
.competition-empty { min-height: 12rem; }

.problem { max-width: 52rem; padding: 1.25rem; border-color: rgba(239, 124, 131, 0.3); border-radius: 0.5rem; background: rgba(31, 15, 22, 0.9); }

@media (max-width: 1100px) {
  .market-command-deck,
  .price-terminal-grid,
  .calculator-workbench,
  .form-layout,
  .trust-ledger { grid-template-columns: 1fr; }
  .market-signal-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .market-signal-summary p { grid-column: 1 / -1; padding: 0.8rem 0 0; }
  .price-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price-stat-grid article:nth-child(4) { border-left: 0; }
  .price-stat-grid article:nth-child(n+4) { border-top: 1px solid rgba(148, 163, 184, 0.12); }
}

@media (max-width: 800px) {
  .home-panels,
  .manifest-grid,
  .health-grid { grid-template-columns: 1fr; }
  .detail-command-heading,
  .tool-heading,
  .form-page-heading { align-items: flex-start; flex-direction: column; }
  .price-technical-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-technical-ledger div:nth-child(n) { border-left: 1px solid rgba(148, 163, 184, 0.1); border-top: 1px solid rgba(148, 163, 184, 0.1); }
  .price-technical-ledger div:nth-child(-n+2) { border-top: 0; }
  .price-technical-ledger div:nth-child(odd) { border-left: 0; }
  .calculator-console form { grid-template-columns: 1fr; }
  .calculator-result { grid-template-columns: 1fr; }
  .calculator-result dl div:first-child { border-left: 0; }
  .form-field-grid { grid-template-columns: 1fr; }
  .release-ledger { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body:has(.market-page) .app-main,
  body:has(.directory-page) .app-main,
  body:has(.technical-price-page) .app-main,
  body:has(.member-page) .app-main { width: min(100% - 1rem, 88rem); }
  .market-console-stats,
  .market-signal-summary,
  .price-stat-grid,
  .price-technical-ledger { grid-template-columns: 1fr; }
  .market-console-stats div:nth-child(n),
  .market-signal-summary > div:nth-child(n),
  .price-stat-grid article:nth-child(n),
  .price-technical-ledger div:nth-child(n) { border-left: 0; border-top: 1px solid rgba(148, 163, 184, 0.12); }
  .market-console-stats div:first-child,
  .market-signal-summary > div:first-child,
  .price-stat-grid article:first-child,
  .price-technical-ledger div:first-child { border-top: 0; }
  .market-signal-summary p { grid-column: auto; }
  .technical-price-hero { align-items: flex-start; }
  .price-item-heading { align-items: flex-start; }
  .price-item-art { width: 4.75rem; height: 4.75rem; }
  .price-item-art img { width: 4.25rem; height: 4.25rem; }
  .price-hero-actions { width: 100%; justify-content: flex-start; }
  .price-hero-actions .button { flex: 1; }
  .calculator-result dl { grid-template-columns: 1fr; }
  .calculator-result dl div { border-left: 0; border-top: 1px solid rgba(148, 163, 184, 0.12); }
  .calculator-result dl div:first-child { border-top: 0; }
  .form-console button { width: 100%; }
}

/* Player directories and release notes share the existing RuneScape palette. */
.footer-version { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.footer-version:hover { color: var(--text); }
.skill-directory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; }
.skill-directory-card { display: flex; align-items: center; gap: 1rem; min-height: 86px; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); color: var(--text); text-decoration: none; }
.skill-directory-card:hover { border-color: var(--gold); background: var(--canvas-raised); }
.skill-directory-card img { flex-shrink: 0; object-fit: contain; }
.skill-directory-card span { display: grid; gap: .4rem; }
.skill-directory-card small { color: var(--muted); }
.clan-directory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.clan-directory-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.clan-directory-card h3 { margin: .5rem 0; overflow-wrap: anywhere; }
.clan-directory-card h3 a { color: var(--text); }
.clan-directory-card p:not(.eyebrow) { color: var(--muted); font-size: .85rem; }
.directory-controls select { max-width: 100%; min-width: 0; }
.directory-page > .segmented-control, .compare-page > .segmented-control { margin-bottom: 1.25rem; }
.skill-picker { min-width: 0; margin: 0; border: 1px solid var(--line); padding: 1rem; border-radius: var(--radius-md); }
.skill-picker legend { padding: 0 .5rem; font-weight: 650; }
.skill-picker-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .4rem 1rem; max-height: 300px; overflow: auto; padding: .25rem; }
.skill-picker-options label { display: flex; align-items: center; gap: .6rem; min-height: 38px; margin: 0; font-weight: 400; }
.skill-picker-options input { width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
.changelog-page { max-width: 1000px; margin: 0 auto; }
.version-badge { display: inline-block; padding: .4rem .65rem; border: 1px solid var(--gold-soft); border-radius: var(--radius-sm); color: var(--gold); font-weight: 650; font-variant-numeric: tabular-nums; }
.release-timeline { display: grid; gap: 1rem; }
.release-entry { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); scroll-margin-top: 5rem; }
.release-entry h2 { margin: 0; }
.release-entry p, .release-entry li, .release-version small { color: var(--muted); line-height: 1.65; }
.release-entry li + li { margin-top: .5rem; }
.release-version { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.price-chart { margin: 0 0 1.5rem; }
.price-chart svg { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }
.price-chart polyline { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.price-chart-axis { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .8rem; margin: .5rem 0; }
.price-chart figcaption { color: var(--muted); font-size: .85rem; margin-top: .75rem; }
.price-history-ledger details > summary { padding: 1rem 0; cursor: pointer; color: var(--text); font-weight: 600; }
@media (max-width: 640px) {
 .locale-form { display: flex; }
 .locale-form button { display: inline-block; padding-inline: .35rem; }
 .locale-form select { width: auto; min-width: 0; padding-inline: .35rem; }
 .price-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .release-entry { grid-template-columns: 1fr; gap: 1rem; padding: 1.1rem; }
 .release-version { flex-direction: row; align-items: center; flex-wrap: wrap; }
 .skill-directory-grid, .clan-directory-grid { grid-template-columns: 1fr; }
 .directory-controls form { min-width: 0; width: 100%; }
 .directory-controls select { width: 100%; }
 .price-chart-axis { font-size: .7rem; }
}
.profile-entry-list,.support-messages{display:grid;gap:1rem;padding:1.25rem}
.profile-entry{display:flex;justify-content:space-between;gap:1.5rem;padding:1.1rem 0;border-bottom:1px solid var(--line);align-items:center}
.profile-entry h3{margin:0 0 .4rem}.profile-entry p{margin:.35rem 0}.profile-entry small{color:var(--muted)}.profile-entry>strong{white-space:nowrap;color:var(--cyan)}
.claim-code{overflow-wrap:anywhere;padding:1rem;background:var(--canvas);border:1px solid var(--line);border-radius:8px;user-select:all}
.form-feedback{padding:1rem;border-left:3px solid #e0b253;background:#201d18;color:#f0dfbf;border-radius:6px}
.account-shortcuts a.card{text-decoration:none}.account-shortcuts a.card:hover{border-color:var(--cyan)}.account-shortcuts strong{font-size:2rem}
.support-ticket-summary{display:flex;gap:1rem;flex-wrap:wrap}.support-messages{padding:0;margin:1.5rem 0}.message-content{white-space:pre-wrap;overflow-wrap:anywhere}
.member-page>.card,.identity-page>.content-section{margin:1.5rem 0}.member-page form+form{margin-top:1rem}
input[type=file]{max-width:100%;min-width:0}button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:640px){.profile-entry{align-items:flex-start;flex-direction:column;gap:.7rem}.profile-entry-list{padding:1rem}.header-inner{gap:.5rem}.header-actions{gap:.25rem}.beta-badge{display:none}.login-link{padding:.5rem}.support-messages .card{padding:1rem}}
button.secondary{background:var(--surface-soft);color:var(--text-soft);border:1px solid var(--line)}
.member-page article.card>form{display:block;padding:0;border:0;background:transparent}.member-page article.card>form button{width:auto;min-height:44px}
@media(max-width:380px){.header-brand-wrap .brand-name{display:none}.header-inner{grid-template-columns:auto minmax(0,1fr)}.header-actions{justify-self:end}}
.header-inner { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.profile-rank-filter { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.profile-rank-filter label { margin: 0; }
.profile-rank-filter select { width: auto; min-width: 0; max-width: 100%; }
.profile-rank-filter p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .8rem; }
.profile-score-table { min-width: 0; }
.profile-score-table td:first-child { white-space: normal; }
.profile-score-table .technical-metric-identity { min-width: 0; }
.profile-score-table .technical-metric-identity strong { overflow-wrap: anywhere; }
.profile-page .technical-tabs { top: var(--header-height, 4.35rem); }
@media(max-width:1080px){.header-inner{grid-template-columns:auto minmax(0,1fr) auto}.rs-clock{justify-self:end}}
@media(max-width:700px){.header-inner{grid-template-columns:minmax(0,1fr) auto}.header-actions{grid-column:2;grid-row:1}.profile-rank-filter{align-items:stretch}.profile-rank-filter select{flex:1}.profile-rank-filter label{flex-basis:100%}}
.member-page .card{min-width:0}.member-page [role=status]{overflow-wrap:anywhere}.member-page .table-shell{max-width:100%;overflow-x:auto}
