:root {
  --bg: #100b08;
  --bg-soft: #1a120d;
  --surface: rgba(31, 22, 16, 0.86);
  --surface-strong: rgba(40, 28, 20, 0.94);
  --line: rgba(218, 166, 92, 0.24);
  --line-strong: rgba(237, 190, 111, 0.42);
  --text: #fff7ec;
  --muted: #d6c0a8;
  --accent: #e76543;
  --gold: #f1c56b;
  --ice: #9fd8ff;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(28, 9, 4, 0.65), transparent 24rem),
    linear-gradient(135deg, #100b08 0%, #1b0d07 42%, #090807 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

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

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

button:disabled,
.is-submitting button {
  cursor: wait;
  opacity: 0.72;
}

.site-shell {
  width: 100%;
  max-width: 1500px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
}

.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(231, 101, 67, 0.12), transparent 22%, transparent 78%, rgba(241, 197, 107, 0.08)),
    repeating-linear-gradient(90deg, transparent 0 108px, rgba(241, 197, 107, 0.035) 108px 109px);
  opacity: 0.8;
}

.topbar {
  width: 100vw;
  max-width: 100vw;
  margin: 0 calc(50% - 50vw) 22px;
  min-height: 66px;
  padding: 10px clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 10;
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  background: rgba(21, 15, 11, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a2513, #0d0b09);
  border: 1px solid rgba(241, 197, 107, 0.45);
  box-shadow: inset 0 0 18px rgba(241, 197, 107, 0.14);
}

.brand-mark svg {
  width: 26px;
  height: 26px;
  fill: rgba(241, 197, 107, 0.26);
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.main-nav a {
  flex: 0 0 auto;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.main-nav svg,
.user-menu-panel svg,
.hub-rail-nav svg,
.hub-chip svg,
.hub-quick-action svg,
.hub-tool-content em svg {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: currentColor;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.login-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.login-chip {
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  min-height: 42px;
  padding: 4px 12px 4px 5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

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

.avatar-dot,
.avatar-large {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #15100c;
  background: linear-gradient(180deg, #f1c56b, #e76543);
  font-weight: 800;
}

.avatar-dot {
  width: 32px;
  height: 32px;
}

.user-menu-panel {
  width: 210px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 16, 12, 0.98);
  box-shadow: var(--shadow);
  z-index: 20;
}

.user-menu-panel a,
.user-menu-panel button {
  width: 100%;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.flash-stack {
  width: min(100%, var(--max));
  margin: 0 auto 16px;
  position: relative;
  z-index: 4;
  display: grid;
  gap: 8px;
}

.flash {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.flash.success {
  color: #dcffe7;
  border-color: rgba(128, 232, 170, 0.34);
  background: rgba(38, 136, 82, 0.22);
}

.flash.error {
  color: #ffe0c7;
  border-color: rgba(231, 101, 67, 0.4);
  background: rgba(231, 101, 67, 0.18);
}

.breadcrumbs {
  width: min(100%, var(--max));
  margin: 0 auto 16px;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
}

.breadcrumbs a,
.breadcrumb-current {
  max-width: min(48vw, 420px);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.breadcrumbs a:hover {
  color: var(--gold);
}

.breadcrumb-current {
  color: var(--text);
}

.breadcrumb-separator {
  color: rgba(214, 192, 168, 0.58);
  font-size: 0.78rem;
}

main {
  width: min(100%, var(--max));
  margin: 0 auto;
  flex: 1 0 auto;
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 480px;
  padding: clamp(24px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: clamp(18px, 4vw, 40px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background:
    linear-gradient(90deg, rgba(16, 11, 8, 0.92) 0%, rgba(16, 11, 8, 0.7) 44%, rgba(16, 11, 8, 0.34) 100%),
    url("https://images.unsplash.com/photo-1518877593221-1f28583780b4?auto=format&fit=crop&w=1800&q=82") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.38), transparent 52%),
    linear-gradient(120deg, rgba(231, 101, 67, 0.2), transparent 36%, rgba(159, 216, 255, 0.12));
}

.hero-copy,
.welcome-panel {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 650px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
  font-weight: 500;
}

.hero-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-action {
  color: #1b0d07;
  background: linear-gradient(180deg, #f1c56b, #de8b3f);
}

.secondary-action {
  color: var(--text);
  background: rgba(20, 14, 10, 0.78);
  border-color: var(--line);
}

.welcome-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 21, 15, 0.94), rgba(19, 14, 11, 0.9));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}

.status-pill,
.tool-status {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill {
  margin-bottom: 18px;
  color: var(--gold);
  background: rgba(241, 197, 107, 0.12);
  border: 1px solid rgba(241, 197, 107, 0.28);
}

.welcome-panel h2 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.welcome-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 500;
}

.tools-section,
.site-footer {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(44, 27, 18, 0.82), rgba(16, 12, 9, 0.92)),
    linear-gradient(90deg, rgba(231, 101, 67, 0.1), transparent);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.2);
}

.tools-section {
  padding: clamp(18px, 4vw, 28px);
}

.section-heading,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
}

.section-heading a {
  color: var(--accent);
  font-weight: 600;
}

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

.tool-card {
  min-height: 260px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(241, 197, 107, 0.24);
  border-radius: 8px;
  background: #1b130d;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  transform: translateY(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tool-card::before,
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
}

.tool-card::before {
  background-image: var(--image);
  background-size: cover;
  background-position: center;
  transition: transform 360ms ease;
}

.tool-card::after {
  background:
    linear-gradient(180deg, rgba(9, 7, 6, 0.16), rgba(9, 7, 6, 0.9)),
    linear-gradient(120deg, rgba(231, 101, 67, 0.28), transparent 44%);
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(241, 197, 107, 0.55);
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.36);
}

.tool-card:hover::before {
  transform: scale(1.05);
}

.tool-card.is-not-connected:hover::after,
.tool-card.is-not-connected:focus-visible::after {
  background:
    linear-gradient(180deg, rgba(9, 7, 6, 0.72), rgba(9, 7, 6, 0.9)),
    linear-gradient(120deg, rgba(231, 101, 67, 0.36), rgba(0, 0, 0, 0.28));
}

.tool-card.is-not-connected:hover .tool-content,
.tool-card.is-not-connected:hover .tool-status,
.tool-card.is-not-connected:focus-visible .tool-content,
.tool-card.is-not-connected:focus-visible .tool-status {
  opacity: 0.2;
}

.tool-status,
.tool-content,
.tool-hover-label {
  position: relative;
  z-index: 1;
}

.tool-hover-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  color: var(--text);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.tool-card.is-not-connected:hover .tool-hover-label,
.tool-card.is-not-connected:focus-visible .tool-hover-label {
  opacity: 1;
  transform: translateY(0);
}

.tool-status.connected {
  color: #d6ffe4;
  background: rgba(38, 136, 82, 0.3);
  border: 1px solid rgba(128, 232, 170, 0.34);
}

.tool-status.muted {
  color: #ffe0c7;
  background: rgba(231, 101, 67, 0.24);
  border: 1px solid rgba(231, 101, 67, 0.38);
}

.tool-status.pending {
  color: #fff5cf;
  background: rgba(241, 197, 107, 0.2);
  border: 1px solid rgba(241, 197, 107, 0.4);
}

.tool-status.upcoming {
  color: #eaf5ff;
  background: rgba(159, 216, 255, 0.18);
  border: 1px solid rgba(159, 216, 255, 0.34);
}

.tool-content {
  display: grid;
  gap: 5px;
}

.tool-title {
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  line-height: 1.05;
  font-weight: 700;
}

.tool-description {
  max-width: 28ch;
  color: var(--muted);
  font-weight: 500;
}

.site-footer {
  width: 100vw;
  max-width: 100vw;
  margin: auto calc(50% - 50vw) 0;
  padding: 20px clamp(18px, 4vw, 58px);
  position: relative;
  z-index: 1;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.site-footer p {
  margin: 4px 0 0;
  color: var(--muted);
}

.footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.discord-footer-link {
  min-height: 44px;
  padding: 8px 14px 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #5865f2;
  box-shadow: 0 14px 34px rgba(88, 101, 242, 0.28);
  font-weight: 700;
}

.discord-mark-wrap {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.discord-footer-link img {
  display: block;
  width: 22px;
  height: auto;
}

.auth-page {
  min-height: 560px;
  display: grid;
  place-items: center;
}

.form-card,
.panel,
.side-panel,
.profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(42, 27, 18, 0.92), rgba(16, 12, 9, 0.96)),
    linear-gradient(90deg, rgba(231, 101, 67, 0.08), transparent);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.22);
}

.form-card {
  width: min(100%, 480px);
  padding: clamp(22px, 4vw, 34px);
}

.form-card.wide {
  width: min(100%, 780px);
}

.auth-workspace-page {
  min-height: calc(100svh - 156px);
  padding: clamp(32px, 7vw, 82px) 0;
}

.form-card.auth-workspace-card {
  width: min(100%, 620px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.form-card.auth-workspace-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 6vw, 4.1rem);
  line-height: 0.98;
}

.auth-workspace-lead {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  line-height: 1.5;
}

.auth-workspace-form {
  gap: 22px;
  margin-top: 32px;
}

.auth-workspace-form > label {
  gap: 10px;
  color: var(--text);
  font-weight: 650;
}

.auth-workspace-form > label input {
  min-height: 64px;
  padding: 14px 20px;
  border-color: rgba(218, 166, 92, 0.32);
  background: rgba(10, 8, 7, 0.66);
  font-size: 1rem;
}

.auth-form-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.auth-remember {
  gap: 10px !important;
  color: var(--muted);
}

.auth-forgot-joke {
  max-width: 320px;
  text-align: right;
}

.auth-forgot-joke summary {
  list-style: none;
  color: var(--gold);
  cursor: pointer;
  font-weight: 650;
}

.auth-forgot-joke summary::-webkit-details-marker {
  display: none;
}

.auth-forgot-joke p {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(231, 101, 67, 0.38);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(231, 101, 67, 0.1);
  text-align: left;
  font-size: 0.92rem;
}

.auth-submit,
.auth-secondary-cta {
  width: 100%;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.02rem;
}

.auth-divider {
  margin: 34px 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

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

.form-card h1,
.panel h1,
.profile-card h1 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.stack-form {
  display: grid;
  gap: 14px;
}

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

.stack-form label,
.app-admin-form label,
.admin-user-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(218, 166, 92, 0.28);
  border-radius: 8px;
  color: var(--text);
  background: rgba(10, 8, 7, 0.72);
  font: inherit;
  font-weight: 500;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(241, 197, 107, 0.68);
  box-shadow: 0 0 0 3px rgba(241, 197, 107, 0.12);
}

input:disabled,
input[readonly] {
  color: rgba(255, 247, 236, 0.62);
}

.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.full-row {
  grid-column: 1 / -1;
}

.form-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.form-note a {
  color: var(--accent);
  font-weight: 600;
}

.app-link-feedback-page {
  min-height: 58vh;
  align-items: center;
}

.app-link-feedback {
  max-width: 680px;
  text-align: center;
}

.feedback-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #160d08;
  background: linear-gradient(180deg, #f1c56b, #de8b3f);
  box-shadow: 0 18px 42px rgba(231, 101, 67, 0.24);
  font-size: 2.4rem;
  font-weight: 800;
}

.app-link-feedback.error .feedback-mark {
  color: #fff7ec;
  background: linear-gradient(180deg, #e76543, #8b2f22);
}

.link-confirmation-card {
  margin: 18px auto 0;
  padding: 14px 16px;
  display: grid;
  gap: 2px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.link-confirmation-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.feedback-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.notice {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(241, 197, 107, 0.36);
  border-radius: 8px;
  color: #fff1c6;
  background: rgba(241, 197, 107, 0.12);
  font-weight: 600;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
}

.side-panel {
  height: max-content;
  padding: 16px;
  position: sticky;
  top: 98px;
  display: grid;
  gap: 8px;
}

.side-panel a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
}

.side-panel a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.settings-content {
  display: grid;
  gap: 18px;
}

.panel {
  padding: clamp(18px, 4vw, 28px);
}

.section-heading.compact {
  margin-bottom: 14px;
}

.connected-app-list,
.admin-user-list,
.log-list {
  display: grid;
  gap: 12px;
}

.connected-app-row,
.admin-user-row,
.log-row {
  padding: 14px;
  display: grid;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(218, 166, 92, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.connected-app-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.connected-app-row p {
  margin: 3px 0;
  color: var(--muted);
}

.small-muted {
  color: rgba(214, 192, 168, 0.72);
  font-size: 0.86rem;
  font-weight: 500;
}

.app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.app-actions .primary-action,
.app-actions .secondary-action,
.admin-user-row .secondary-action {
  min-height: 40px;
  padding: 8px 12px;
}

.app-admin-form {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(218, 166, 92, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.form-section-title {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-user-row {
  grid-template-columns: minmax(160px, 1fr) 150px auto auto;
}

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

.log-row span {
  color: var(--muted);
  font-weight: 500;
}

.profile-hero {
  min-height: 360px;
  padding: clamp(24px, 5vw, 48px);
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(16, 11, 8, 0.95), rgba(16, 11, 8, 0.48)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=82") center / cover;
  box-shadow: var(--shadow);
}

.profile-card {
  width: min(100%, 680px);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-large {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  font-size: 2.2rem;
}

.muted-text {
  color: var(--muted);
}

.profile-hero-rich {
  min-height: 420px;
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(16, 11, 8, 0.96), rgba(16, 11, 8, 0.58)),
    linear-gradient(135deg, rgba(231, 101, 67, 0.2), transparent 48%),
    url("https://images.unsplash.com/photo-1511497584788-876760111969?auto=format&fit=crop&w=1800&q=76") center / cover;
}

.profile-identity-card {
  align-self: flex-end;
  width: min(100%, 860px);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(28, 21, 17, 0.92), rgba(10, 9, 8, 0.9)),
    linear-gradient(90deg, rgba(241, 197, 107, 0.1), transparent);
  backdrop-filter: blur(12px);
}

.profile-identity-card::before {
  content: "";
  width: 34%;
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(241, 197, 107, 0.12), rgba(231, 101, 67, 0.12)),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.04) 14px 15px);
  opacity: 0.7;
}

.profile-identity-card > * {
  position: relative;
  z-index: 1;
}

.profile-identity-copy {
  min-width: 0;
  flex: 1;
}

.profile-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.profile-meta-line span {
  min-height: 28px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(218, 166, 92, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-email {
  margin: 12px 0 0;
  color: var(--muted);
}

.profile-identity-stats {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-identity-stats span {
  min-width: 118px;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(218, 166, 92, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-identity-stats strong {
  color: var(--gold);
  font-size: 1.15rem;
  line-height: 1;
}

.profile-identity-stats small {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-edit-action {
  align-self: flex-start;
  min-width: 112px;
}

.profile-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.profile-summary-panel,
.profile-showcase-panel,
.profile-shared-stats-panel {
  align-self: start;
}

.profile-stat-grid,
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat-grid div,
.admin-stat-card {
  min-height: 96px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(218, 166, 92, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-stat-grid span,
.admin-stat-card span {
  color: var(--gold);
  font-size: 2rem;
  line-height: 1;
}

.profile-stat-grid small,
.admin-stat-card small {
  color: var(--muted);
}

.profile-shared-stat-list {
  display: grid;
  gap: 14px;
}

.profile-shared-app {
  display: grid;
  gap: 10px;
}

.profile-shared-app + .profile-shared-app {
  padding-top: 14px;
  border-top: 1px solid rgba(218, 166, 92, 0.16);
}

.profile-shared-app-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.profile-shared-app-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(218, 166, 92, 0.22);
  border-radius: 8px;
  background: var(--image) center / cover, rgba(255, 255, 255, 0.06);
}

.profile-shared-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-shared-stat {
  min-width: 0;
  min-height: 98px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 5px;
  border: 1px solid rgba(218, 166, 92, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(231, 101, 67, 0.13), transparent 10rem),
    rgba(255, 255, 255, 0.045);
}

.profile-shared-stat span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--gold);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.08;
}

.profile-shared-stat small {
  color: var(--text);
}

.profile-shared-stat em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.profile-shared-stat.muted span,
.profile-shared-stat.muted small,
.profile-shared-stat.muted em {
  color: var(--muted);
}

.profile-apps-panel {
  grid-row: span 2;
}

.profile-app-grid {
  display: grid;
  gap: 12px;
}

.profile-app-card {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  padding: 12px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(218, 166, 92, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-app-card:hover {
  text-decoration: none;
  border-color: rgba(241, 197, 107, 0.42);
  background: rgba(255, 255, 255, 0.065);
}

.profile-app-card.is-not-connected:hover .profile-app-cover,
.profile-app-card.is-not-connected:hover .profile-app-copy,
.profile-app-card.is-not-connected:hover .tool-status,
.profile-app-card.is-not-connected:focus-visible .profile-app-cover,
.profile-app-card.is-not-connected:focus-visible .profile-app-copy,
.profile-app-card.is-not-connected:focus-visible .tool-status {
  opacity: 0.16;
}

.profile-app-card.is-not-connected:hover .tool-hover-label,
.profile-app-card.is-not-connected:focus-visible .tool-hover-label {
  opacity: 1;
  transform: translateY(0);
}

.profile-app-card > .tool-hover-label {
  background: rgba(12, 8, 6, 0.72);
}

.profile-app-cover,
.app-link-cover,
.app-form-preview {
  background-image: var(--image);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(218, 166, 92, 0.2);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
}

.profile-app-cover {
  width: 92px;
  height: 72px;
}

.profile-app-copy {
  display: grid;
  gap: 4px;
}

.profile-app-copy small {
  color: var(--muted);
}

.showcase-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.showcase-chip-row span {
  padding: 6px 10px;
  border: 1px solid rgba(218, 166, 92, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.app-link-card {
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
}

.app-link-cover {
  width: 112px;
  height: 78px;
}

.app-link-main {
  display: grid;
  gap: 5px;
}

.app-link-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.privacy-card {
  min-height: 126px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(218, 166, 92, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.privacy-card input {
  margin-top: 3px;
}

.privacy-card span {
  display: grid;
  gap: 4px;
}

.privacy-card small {
  color: var(--muted);
}

.admin-overview-panel {
  display: grid;
  gap: 18px;
}

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

.admin-app-head {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.app-form-preview {
  width: 112px;
  height: 72px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(100%, 460px);
  padding: 24px;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(145deg, #25180f, #110d0a);
  box-shadow: var(--shadow);
}

.modal h2 {
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.modal p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 700;
}

.modal-close {
  width: 38px;
  height: 38px;
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}

.style-lab {
  display: grid;
  gap: clamp(54px, 8vw, 92px);
}

.style-lab-hero {
  min-height: calc(100svh - 104px);
  padding: clamp(28px, 7vw, 76px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.7fr);
  align-items: center;
  gap: clamp(26px, 5vw, 68px);
  overflow: hidden;
  border: 1px solid rgba(241, 197, 107, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 16% 18%, rgba(241, 197, 107, 0.16), transparent 25rem),
    radial-gradient(circle at 90% 18%, rgba(231, 101, 67, 0.15), transparent 26rem),
    linear-gradient(135deg, rgba(24, 17, 12, 0.98), rgba(12, 10, 8, 0.96));
  box-shadow: var(--shadow);
}

.style-lab-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 84% 68% at 48% 20%, black 20%, transparent 76%);
  pointer-events: none;
}

.style-lab-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.style-lab-ambient span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(241, 197, 107, 0.8);
  box-shadow:
    56px 42px 0 rgba(231, 101, 67, 0.45),
    122px -24px 0 rgba(159, 216, 255, 0.32),
    210px 72px 0 rgba(241, 197, 107, 0.38);
  animation: labDrift 9s ease-in-out infinite alternate;
}

.style-lab-ambient span:nth-child(1) {
  left: 10%;
  top: 18%;
}

.style-lab-ambient span:nth-child(2) {
  right: 18%;
  top: 30%;
  animation-delay: -2s;
}

.style-lab-ambient span:nth-child(3) {
  left: 48%;
  bottom: 20%;
  animation-delay: -4s;
}

@keyframes labDrift {
  from {
    transform: translate3d(-10px, 8px, 0);
    opacity: 0.38;
  }
  to {
    transform: translate3d(18px, -18px, 0);
    opacity: 0.86;
  }
}

.style-lab-copy,
.style-lab-orbit,
.style-lab-section {
  position: relative;
  z-index: 1;
}

.style-kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.style-lab-copy h1 {
  max-width: 840px;
  margin-bottom: 18px;
  font-size: clamp(3.4rem, 10vw, 7.4rem);
  line-height: 0.92;
  background: linear-gradient(180deg, #fff9ef 26%, #d2aa72 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.style-lab-lead {
  max-width: 650px;
  margin-bottom: 32px;
  color: rgba(255, 247, 236, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.42rem);
  font-weight: 420;
}

.style-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lab-button {
  min-height: 48px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  will-change: transform;
}

.lab-button.primary {
  color: #170d08;
  background: linear-gradient(100deg, #f1c56b, #e76543);
}

.lab-button.ghost {
  color: var(--text);
  border-color: rgba(241, 197, 107, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.lab-button:hover {
  box-shadow: 0 0 30px rgba(231, 101, 67, 0.18);
}

.lab-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(241, 197, 107, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(241, 197, 107, 0.13), transparent 62%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

.style-lab-orbit {
  min-height: 420px;
  padding: 20px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(231, 101, 67, 0.14), transparent 9rem),
    rgba(255, 255, 255, 0.035);
}

.style-lab-orbit::after {
  content: "";
  width: 72%;
  aspect-ratio: 1;
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(241, 197, 107, 0.22);
  border-radius: 50%;
}

.orbit-core {
  width: min(190px, 54vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(241, 197, 107, 0.3);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(34, 24, 16, 0.94), rgba(16, 12, 9, 0.96)),
    radial-gradient(circle at 40% 0%, rgba(241, 197, 107, 0.16), transparent 70%);
}

.orbit-core .avatar-dot {
  width: 56px;
  height: 56px;
}

.orbit-core small {
  color: var(--muted);
}

.orbit-node {
  width: 136px;
  min-height: 52px;
  padding: 8px 10px 8px 8px;
  position: absolute;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(241, 197, 107, 0.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(16, 12, 9, 0.78);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease;
}

.orbit-node em {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  color: var(--text);
  background: rgba(12, 8, 6, 0.84);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 680;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.orbit-node:hover {
  transform: translateY(-3px);
  border-color: rgba(241, 197, 107, 0.48);
}

.orbit-node.is-not-connected:hover span,
.orbit-node.is-not-connected:hover strong,
.orbit-node.is-not-connected:focus-visible span,
.orbit-node.is-not-connected:focus-visible strong {
  opacity: 0.16;
}

.orbit-node.is-not-connected:hover em,
.orbit-node.is-not-connected:focus-visible em {
  opacity: 1;
}

.orbit-node span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-image: var(--node-image);
  background-size: cover;
  background-position: center;
}

.orbit-node strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 650;
}

.orbit-node-1 {
  top: 18%;
  right: 8%;
}

.orbit-node-2 {
  left: 6%;
  top: 32%;
}

.orbit-node-3 {
  right: 10%;
  bottom: 20%;
}

.orbit-node-4 {
  left: 18%;
  bottom: 12%;
}

.style-lab-section {
  display: grid;
  gap: 22px;
}

.style-section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
}

.style-section-head > div {
  flex: 1 1 360px;
}

.style-section-head span,
.style-card-index {
  color: var(--gold);
  font-weight: 700;
}

.style-section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.style-section-copy {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 430;
}

.style-section-link {
  min-height: 40px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(241, 197, 107, 0.22);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 620;
}

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

.style-tool-card {
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(0, 1fr);
  align-items: stretch;
  color: var(--text);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.style-tool-card:hover,
.style-tool-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(241, 197, 107, 0.48);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.28);
}

.style-tool-card.is-not-connected:hover .style-tool-image,
.style-tool-card.is-not-connected:hover .style-tool-body,
.style-tool-card.is-not-connected:focus-visible .style-tool-image,
.style-tool-card.is-not-connected:focus-visible .style-tool-body {
  opacity: 0.2;
}

.style-tool-card.is-not-connected:hover .tool-hover-label,
.style-tool-card.is-not-connected:focus-visible .tool-hover-label {
  opacity: 1;
  transform: translateY(0);
}

.style-tool-card > .tool-hover-label {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(231, 101, 67, 0.24), transparent 16rem),
    rgba(12, 8, 6, 0.62);
}

.style-tool-image {
  background:
    linear-gradient(135deg, rgba(16, 11, 8, 0.16), rgba(16, 11, 8, 0.78)),
    var(--image) center / cover;
}

.style-tool-body {
  padding: 22px;
  display: grid;
  align-content: end;
  gap: 10px;
}

.style-tool-body h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.style-tool-body p,
.style-behavior-card p,
.style-social-strip p {
  margin: 0;
  color: var(--muted);
  font-weight: 430;
}

.style-tool-cta {
  width: max-content;
  margin-top: 4px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 620;
}

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

.style-behavior-card {
  min-height: 220px;
  padding: 24px;
  display: grid;
  align-content: end;
  gap: 12px;
  background:
    linear-gradient(145deg, rgba(44, 27, 18, 0.72), rgba(16, 12, 9, 0.9)),
    radial-gradient(circle at 100% 0%, rgba(231, 101, 67, 0.16), transparent 16rem);
}

.style-behavior-card h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
}

.style-card-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 197, 107, 0.3);
  border-radius: 50%;
}

.style-social-strip {
  min-height: 240px;
  padding: clamp(22px, 4vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  background:
    radial-gradient(circle at 76% 22%, rgba(241, 197, 107, 0.14), transparent 18rem),
    linear-gradient(135deg, rgba(35, 24, 16, 0.86), rgba(14, 11, 9, 0.94));
}

.style-social-strip h3 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 5vw, 3rem);
}

.style-mini-stats {
  display: flex;
  gap: 12px;
}

.style-mini-stats span {
  width: 86px;
  min-height: 82px;
  padding: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 197, 107, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.style-mini-stats strong {
  color: var(--accent);
  font-size: 1.9rem;
}

.style-mini-stats small {
  color: var(--muted);
}

.hub-page {
  width: min(calc(100vw - clamp(28px, 6vw, 68px)), 1420px);
  margin: 0 0 clamp(42px, 7vw, 76px) 50%;
  transform: translateX(-50%);
}

.hub-command-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.hub-rail,
.hub-panel,
.hub-hero-card,
.hub-quick-action,
.hub-tool-card {
  border: 1px solid rgba(241, 197, 107, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(42, 27, 18, 0.84), rgba(16, 12, 9, 0.94)),
    linear-gradient(90deg, rgba(231, 101, 67, 0.08), transparent);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.22);
}

.hub-rail {
  min-height: calc(100svh - 112px);
  padding: 16px;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hub-rail-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.hub-rail-brand strong,
.hub-user-badge strong,
.hub-connection-main strong {
  font-size: 1rem;
}

.hub-rail-brand small,
.hub-user-badge small,
.hub-connection-main small,
.hub-section-note {
  color: var(--muted);
}

.hub-rail-nav {
  display: grid;
  gap: 7px;
}

.hub-rail-nav a {
  min-height: 42px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  color: var(--muted);
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.hub-rail-nav a:hover,
.hub-rail-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.hub-rail-nav a:hover {
  transform: translateX(2px);
}

.hub-rail-nav em {
  min-width: 24px;
  min-height: 24px;
  padding: 2px 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #1b0d07;
  background: var(--gold);
  font-size: 0.78rem;
  font-style: normal;
}

.hub-rail-foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(218, 166, 92, 0.16);
  color: var(--muted);
}

.hub-rail-foot strong {
  color: var(--gold);
}

.hub-stage {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.hub-breadcrumb {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hub-breadcrumb strong {
  color: var(--text);
}

.hub-hero-card {
  min-height: 438px;
  padding: clamp(24px, 4vw, 42px);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  align-items: end;
  gap: clamp(22px, 4vw, 42px);
  background:
    linear-gradient(90deg, rgba(15, 11, 8, 0.95) 0%, rgba(15, 11, 8, 0.78) 46%, rgba(15, 11, 8, 0.46) 100%),
    linear-gradient(120deg, rgba(231, 101, 67, 0.22), transparent 44%),
    url("https://images.unsplash.com/photo-1511497584788-876760111969?auto=format&fit=crop&w=1800&q=74") center / cover;
}

.hub-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(90deg, black, transparent 74%);
}

.hub-hero-copy,
.hub-status-panel {
  position: relative;
  z-index: 1;
}

.hub-chip {
  width: max-content;
  min-height: 32px;
  margin-bottom: 18px;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(241, 197, 107, 0.28);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}

.hub-hero-copy h1 {
  max-width: 840px;
  margin-bottom: 16px;
  font-size: clamp(3.1rem, 5vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hub-lead {
  max-width: 690px;
  margin-bottom: 28px;
  color: rgba(255, 247, 236, 0.82);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

.hub-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-status-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
  border: 1px solid rgba(241, 197, 107, 0.22);
  border-radius: 8px;
  background: rgba(15, 11, 8, 0.72);
  backdrop-filter: blur(14px);
}

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

.hub-user-badge small,
.hub-connection-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hub-progress span {
  width: var(--progress);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.hub-status-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hub-status-numbers span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hub-status-numbers strong {
  color: var(--gold);
  font-size: 1.45rem;
  line-height: 1;
}

.hub-status-numbers small {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.hub-quick-action {
  min-height: 110px;
  padding: 15px;
  display: grid;
  align-content: start;
  gap: 7px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hub-quick-action:hover {
  transform: translateY(-2px);
  border-color: rgba(241, 197, 107, 0.42);
  background:
    linear-gradient(145deg, rgba(50, 31, 20, 0.86), rgba(18, 13, 10, 0.95)),
    linear-gradient(90deg, rgba(231, 101, 67, 0.1), transparent);
}

.hub-quick-action > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--gold);
  background: rgba(241, 197, 107, 0.12);
}

.hub-quick-action small {
  color: var(--muted);
}

.hub-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.hub-panel {
  padding: clamp(18px, 3vw, 24px);
}

.hub-section-head {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hub-section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.hub-section-head a,
.hub-section-note {
  color: var(--accent);
}

.hub-section-head a {
  font-weight: 500;
}

.hub-section-note {
  max-width: 360px;
  text-align: right;
  color: var(--muted);
}

.hub-connection-list {
  display: grid;
  gap: 10px;
}

.hub-connection-row {
  min-height: 78px;
  padding: 10px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(218, 166, 92, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 160ms ease, background 160ms ease;
}

.hub-connection-row:hover {
  border-color: rgba(241, 197, 107, 0.38);
  background: rgba(255, 255, 255, 0.055);
}

.hub-connection-cover {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: var(--image) center / cover, rgba(255, 255, 255, 0.06);
}

.hub-connection-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hub-flow-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.hub-flow-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.hub-flow-list span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 197, 107, 0.24);
  border-radius: 8px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.045);
}

.hub-flow-list p {
  margin: 0;
  color: var(--muted);
}

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

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

.hub-tool-card {
  min-height: 228px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr);
  color: var(--text);
  text-decoration: none;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.hub-tool-card:hover,
.hub-tool-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(241, 197, 107, 0.48);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.28);
}

.hub-tool-media {
  min-height: 100%;
  background:
    linear-gradient(145deg, rgba(16, 11, 8, 0.08), rgba(16, 11, 8, 0.72)),
    var(--image) center / cover;
  transition: transform 260ms ease, opacity 160ms ease;
}

.hub-tool-card:hover .hub-tool-media {
  transform: scale(1.035);
}

.hub-tool-content {
  min-width: 0;
  padding: 20px;
  display: grid;
  align-content: end;
  gap: 10px;
  transition: opacity 160ms ease;
}

.hub-tool-content strong {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  line-height: 1.05;
}

.hub-tool-content small {
  color: var(--muted);
}

.hub-tool-content em {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-style: normal;
}

.hub-tool-card.is-not-connected:hover .hub-tool-media,
.hub-tool-card.is-not-connected:hover .hub-tool-content,
.hub-tool-card.is-not-connected:focus-visible .hub-tool-media,
.hub-tool-card.is-not-connected:focus-visible .hub-tool-content {
  opacity: 0.18;
}

.hub-tool-card.is-not-connected:hover .tool-hover-label,
.hub-tool-card.is-not-connected:focus-visible .tool-hover-label {
  opacity: 1;
  transform: translateY(0);
}

.hub-tool-card > .tool-hover-label {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  background: rgba(12, 8, 6, 0.7);
}

[data-lab-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-lab-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    top: 0;
    max-width: 100vw;
  }

  .breadcrumbs {
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.78rem;
  }

  .breadcrumbs a,
  .breadcrumb-current {
    max-width: 72vw;
  }

  .main-nav {
    order: 3;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    scrollbar-width: none;
  }

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

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

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

  .tool-card {
    min-height: 210px;
  }

  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .profile-grid,
  .privacy-card-grid,
  .admin-stat-grid,
  .profile-shared-stat-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .connected-app-row,
  .app-link-card,
  .profile-app-card,
  .admin-user-row,
  .log-row {
    grid-template-columns: 1fr;
  }

  .app-link-cover,
  .profile-app-cover,
  .app-form-preview {
    width: 100%;
    min-height: 150px;
  }

  .app-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .style-lab-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .style-lab-orbit {
    min-height: 360px;
  }

  .style-tool-row,
  .style-tool-card,
  .style-behavior-grid,
  .style-social-strip {
    grid-template-columns: 1fr;
  }

  .style-tool-image {
    min-height: 180px;
  }

  .style-mini-stats {
    flex-wrap: wrap;
  }

  .hub-page {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
  }

  .hub-command-shell,
  .hub-hero-card,
  .hub-dashboard-grid,
  .hub-tool-grid {
    grid-template-columns: 1fr;
  }

  .hub-rail {
    min-height: auto;
    position: static;
  }

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

  .hub-rail-nav a {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .hub-rail-nav em {
    display: none;
  }

  .hub-status-panel {
    max-width: 520px;
  }

  .hub-tool-card {
    min-height: 210px;
    grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .site-shell {
    padding: 0 10px;
  }

  .topbar {
    width: auto;
    margin-right: -10px;
    margin-left: -10px;
    padding: 10px;
    gap: 10px;
  }

  .brand span:last-child {
    display: none;
  }

  .top-actions {
    margin-left: auto;
  }

  .main-nav a {
    padding-inline: 12px;
    white-space: nowrap;
  }

  .site-footer {
    width: auto;
    margin-right: -10px;
    margin-left: -10px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .hero {
    padding: 22px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.2rem);
  }

  .hero-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .footer-actions,
  .discord-footer-link {
    width: 100%;
  }

  .footer-actions {
    align-items: stretch;
  }

  .discord-footer-link {
    justify-content: center;
  }

  .stack-form.two-cols {
    grid-template-columns: 1fr;
  }

  .auth-workspace-page {
    min-height: auto;
    padding: 28px 0 50px;
  }

  .auth-workspace-form {
    gap: 18px;
    margin-top: 26px;
  }

  .auth-workspace-form > label input,
  .auth-submit,
  .auth-secondary-cta {
    min-height: 56px;
  }

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

  .auth-forgot-joke {
    max-width: none;
    text-align: left;
  }

  .user-menu summary span:last-child {
    display: none;
  }

  .user-menu-panel {
    right: -2px;
  }

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

  .profile-hero-rich {
    min-height: 360px;
  }

  .avatar-large {
    width: 76px;
    height: 76px;
  }

  .profile-edit-action {
    width: 100%;
  }

  .admin-app-head {
    grid-template-columns: 1fr;
  }

  .style-lab {
    gap: 42px;
  }

  .style-lab-hero {
    padding: 24px;
    border-radius: 10px;
  }

  .style-lab-copy h1 {
    font-size: clamp(3rem, 18vw, 4.8rem);
  }

  .style-lab-actions {
    display: grid;
  }

  .lab-button {
    width: 100%;
  }

  .style-lab-orbit {
    min-height: 430px;
  }

  .orbit-node {
    width: min(150px, 44vw);
  }

  .orbit-node-1 {
    top: 8%;
    right: 2%;
  }

  .orbit-node-2 {
    top: 18%;
    left: 0;
  }

  .orbit-node-3 {
    right: 2%;
    bottom: 14%;
  }

  .orbit-node-4 {
    left: 8%;
    bottom: 4%;
  }

  .style-social-strip {
    min-height: auto;
  }

  .style-mini-stats span {
    width: calc(50% - 6px);
  }

  .main-nav svg {
    display: none;
  }

  .hub-page {
    width: 100%;
    max-width: 100%;
  }

  .hub-command-shell {
    gap: 12px;
  }

  .hub-rail {
    padding: 12px;
    gap: 14px;
  }

  .hub-rail-brand .brand-mark {
    width: 36px;
    height: 36px;
  }

  .hub-rail-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hub-rail-nav a {
    min-width: max-content;
    min-height: 38px;
    display: inline-flex;
    padding: 8px 11px;
  }

  .hub-rail-foot {
    display: none;
  }

  .hub-breadcrumb {
    display: none;
  }

  .hub-hero-card {
    min-height: 520px;
    padding: 22px;
    align-items: end;
  }

  .hub-hero-copy h1 {
    font-size: clamp(2.9rem, 13vw, 4rem);
  }

  .hub-hero-actions,
  .hub-quick-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hub-quick-action {
    min-height: 88px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    align-content: center;
  }

  .hub-quick-action small {
    grid-column: 2;
  }

  .hub-section-head {
    display: grid;
  }

  .hub-section-note {
    text-align: left;
  }

  .hub-connection-row {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .hub-connection-row .tool-status {
    grid-column: 2;
  }

  .hub-connection-cover {
    width: 50px;
    height: 50px;
  }

  .hub-tool-card {
    min-height: 360px;
    grid-template-columns: 1fr;
  }

  .hub-tool-media {
    min-height: 170px;
  }

  .hub-tool-content {
    padding: 18px;
  }

  .hub-status-numbers {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Typography pass: keep emphasis for titles, let the rest breathe. */
body {
  font-weight: 400;
}

:where(
  a,
  button,
  label,
  summary,
  input,
  select,
  textarea,
  strong,
  .eyebrow,
  .login-chip,
  .user-menu-panel a,
  .user-menu-panel button,
  .status-pill,
  .tool-status,
  .tool-description,
  .small-muted,
  .form-note,
  .notice,
  .flash,
  .discord-footer-link
) {
  font-weight: 400;
}

:where(
  .primary-action,
  .secondary-action,
  .modal-close,
  .avatar-dot,
  .avatar-large
) {
  font-weight: 500;
}

:where(
  h1,
  h2,
  h3,
  h4,
  .brand,
  .tool-title,
  .form-section-title
) {
  font-weight: 700;
}
