:root {
  --bg: #0b0d12;
  --bg-soft: #11151d;
  --panel: rgba(14, 18, 25, 0.88);
  --panel-strong: rgba(11, 15, 21, 0.96);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #edf1f8;
  --muted: #97a1b1;
  --accent: #ff6a1a;
  --accent-soft: rgba(255, 106, 26, 0.18);
  --ok: #b8ff4d;
  --danger: #ff6464;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.35);
  --ui-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font: Inter, ui-sans-serif, system-ui, sans-serif;
  --graffiti-font: "Marker Felt", "Chalkboard SE", "Bradley Hand", "Brush Script MT", Impact, fantasy;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
html { background: #090b10; }
body {
  position: relative;
  color: var(--text);
  font-family: var(--ui-font);
  background:
    radial-gradient(circle at top left, rgba(255,106,26,.08), transparent 22%),
    radial-gradient(circle at top right, rgba(56,84,132,.16), transparent 26%),
    linear-gradient(180deg, #090b10 0%, #0e1219 50%, #090b10 100%);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0));
  pointer-events: none;
}

.bg-art,
.bg-vignette,
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.bg-art {
  opacity: 0;
  background-image: url('/assets/grunge-mode-bg.webp');
  background-size: cover;
  background-position: center;
  filter: saturate(.95) contrast(1.06) brightness(.64);
  transform: scale(1.04);
  transition: opacity .45s ease, transform .65s ease, filter .45s ease;
}
.bg-vignette {
  background:
    radial-gradient(circle at center, transparent 28%, rgba(0,0,0,.18) 72%, rgba(0,0,0,.42) 100%),
    linear-gradient(180deg, rgba(7,9,12,.08), rgba(7,9,12,.22));
}
.noise {
  opacity: .09;
  mix-blend-mode: soft-light;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.28) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.18) 0 1px, transparent 1px),
    radial-gradient(circle at 30% 80%, rgba(255,255,255,.18) 0 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03), rgba(255,255,255,.03) 1px, transparent 1px, transparent 3px);
  background-size: 140px 140px, 180px 180px, 220px 220px, 100% 4px;
}

body.advanced-on {
  --panel: rgba(8, 8, 10, 0.76);
  --panel-strong: rgba(7, 7, 8, 0.86);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f4ec;
  --muted: #c3b8a7;
  --shadow: 0 34px 88px rgba(0, 0, 0, 0.52);
}
body.advanced-on .bg-art {
  opacity: .34;
  transform: scale(1);
}
body.advanced-on .bg-vignette {
  background:
    linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.32) 18%, rgba(0,0,0,.46) 100%),
    radial-gradient(circle at center, rgba(0,0,0,.05), rgba(0,0,0,.22) 72%, rgba(0,0,0,.58) 100%);
}
body.advanced-on .brand-block h1,
body.advanced-on .stage-intro h2,
body.advanced-on .screen-header h3,
body.advanced-on .nav-rail-head h2 {
  font-family: var(--graffiti-font);
  letter-spacing: .02em;
  text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 24px rgba(255,106,26,.18);
}
body.advanced-on .brand-block h1 {
  transform: rotate(-1deg);
}
body.advanced-on .screen-header h3 {
  transform: rotate(.25deg);
}
body.advanced-on .eyebrow,
body.advanced-on .platform-tag,
body.advanced-on .stage-badge span {
  color: #ffd4bb;
}
body.advanced-on .panel,
body.advanced-on .platform-tab,
body.advanced-on .event-chip,
body.advanced-on .ghost-chip {
  backdrop-filter: blur(10px);
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display-font); }
h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: -.05em;
}
h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.8rem);
  line-height: 1;
  letter-spacing: -.04em;
}
h3 {
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.topbar,
.workspace-shell,
.login-panel,
.login-shell { position: relative; z-index: 1; }
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  flex-wrap: wrap;
}
.brand-block { display: grid; gap: .45rem; min-width: 0; flex: 1 1 30rem; }
.brand-block h1 { max-width: 9ch; }
.eyebrow {
  margin-bottom: .15rem;
  color: #b7c4d6;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .24em;
}
.subhead,
.lead-copy,
.meta-note,
.screen-note,
.picker-copy {
  color: var(--muted);
  line-height: 1.5;
}
.topbar-right {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 24rem;
}
.userbox {
  display: grid;
  gap: .6rem;
  justify-items: end;
  text-align: right;
  min-width: 0;
  max-width: min(100%, 28rem);
}
#userIdentity {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ghost-button { white-space: nowrap; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  user-select: none;
  min-width: 0;
  flex-wrap: wrap;
}
.switch input { display: none; }
.switch-ui {
  position: relative;
  width: 3.6rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.08);
  transition: background .2s ease, border-color .2s ease;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: .18rem;
  left: .2rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #edf1f8;
  transition: transform .22s ease, background .22s ease;
}
.switch input:checked + .switch-ui {
  background: rgba(255,106,26,.25);
  border-color: rgba(255,106,26,.42);
}
.switch input:checked + .switch-ui::after {
  transform: translateX(1.48rem);
  background: #ffb488;
}
.switch-copy {
  max-width: 13rem;
  font-size: .76rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: .16em;
  overflow-wrap: anywhere;
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.5rem 1.5rem;
}
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(18,23,31,.92), rgba(12,16,24,.96));
  box-shadow: var(--shadow);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.02), transparent 35%, transparent 65%, rgba(255,106,26,.05));
  pointer-events: none;
}
body.advanced-on .panel {
  background: linear-gradient(180deg, rgba(19,14,12,.58), rgba(8,8,9,.84));
}

.nav-rail {
  padding: 1.1rem;
  display: grid;
  gap: 1rem;
  align-self: start;
  position: sticky;
  top: 1rem;
}
.nav-rail-head { display: grid; gap: .55rem; }
.platform-menu {
  display: grid;
  gap: .8rem;
}
.platform-tab {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: .95rem 1rem;
  background: rgba(255,255,255,.02);
  color: var(--text);
  display: grid;
  gap: .32rem;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.platform-tab:hover,
.platform-tab:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,106,26,.35);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.platform-tab.active {
  background: linear-gradient(135deg, rgba(255,106,26,.14), rgba(255,255,255,.03));
  border-color: rgba(255,106,26,.38);
  box-shadow: inset 0 0 0 1px rgba(255,106,26,.12), 0 18px 34px rgba(0,0,0,.16);
}
.platform-tag {
  color: #c8d4e4;
  font-size: .7rem;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.platform-tab strong {
  font-size: 1rem;
  line-height: 1.2;
}
.platform-tab small {
  color: var(--muted);
  font-size: .8rem;
}
.nav-footnote {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.stat-card {
  min-height: 5.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255,255,255,.02);
}
.stat-card span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .68rem;
}
.stat-card strong {
  font-size: .96rem;
  line-height: 1.2;
  text-transform: uppercase;
}
.stat-card.accent { border-color: rgba(255,106,26,.25); }

.stage-shell {
  min-width: 0;
  display: grid;
  gap: 1rem;
}
.stage-intro {
  padding: 1.2rem 1.3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
}
.stage-intro > div:first-child { display: grid; gap: .5rem; min-width: 0; flex: 1 1 24rem; }
.stage-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  min-width: 0;
  width: min(100%, 27rem);
}
.stage-badge {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .8rem .85rem;
  background: rgba(255,255,255,.02);
  display: grid;
  gap: .25rem;
  min-width: 0;
  overflow: hidden;
}
.stage-badge span {
  color: var(--muted);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .2em;
}
.stage-badge strong {
  font-size: .95rem;
  line-height: 1.15;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.content-stage {
  position: relative;
  min-height: 52rem;
  padding: .35rem;
}
.tool-screen {
  position: absolute;
  inset: .35rem;
  padding: 1.05rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.992);
  transition: opacity .28s ease, transform .34s ease, visibility 0s linear .34s;
  overflow: auto;
}
.tool-screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}
.screen-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: .15rem .15rem 1rem;
  min-width: 0;
}
.screen-header > div { display: grid; gap: .35rem; min-width: 0; }
.screen-note {
  max-width: 32rem;
  text-align: right;
  font-size: .95rem;
  overflow-wrap: anywhere;
}

.tool-form {
  display: grid;
  gap: 1rem;
}
.field-grid {
  display: grid;
  gap: .9rem;
}
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label {
  display: grid;
  gap: .48rem;
  min-width: 0;
}
label > span,
.checkline span,
.picker-title {
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  padding: .92rem 1rem;
  background: rgba(0,0,0,.28);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  font-family: var(--ui-font);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
textarea { min-height: 6.25rem; resize: vertical; }
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255,106,26,.48);
  box-shadow: 0 0 0 3px rgba(255,106,26,.10);
  background: rgba(0,0,0,.34);
}
.checkline {
  display: flex;
  gap: .7rem;
  align-items: center;
  padding-top: 1.8rem;
}
.checkline input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}
.advanced-only { display: none; }
body.advanced-on .advanced-only { display: grid; }

.meta-flow-chooser {
  display: grid;
  gap: .85rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 1rem;
  background: rgba(255,255,255,.02);
}
.picker-header {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: flex-start;
}
.picker-header > div:first-child { display: grid; gap: .3rem; }
.picker-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.event-chip,
.ghost-chip,
.run-button,
.login-button,
.ghost-button {
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--ui-font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.event-chip,
.ghost-chip {
  padding: .72rem .95rem;
  font-size: .82rem;
  background: rgba(255,255,255,.02);
}
.event-chip:hover,
.ghost-chip:hover,
.event-chip:focus-visible,
.ghost-chip:focus-visible,
.run-button:hover,
.run-button:focus-visible,
.ghost-button:hover,
.login-button:hover {
  transform: translateY(-1px);
}
.event-chip.is-active {
  background: linear-gradient(135deg, rgba(255,106,26,.22), rgba(255,255,255,.04));
  border-color: rgba(255,106,26,.45);
  box-shadow: inset 0 0 0 1px rgba(255,106,26,.14);
}
.ghost-chip {
  color: var(--muted);
}
.picker-summary {
  color: #ffd6bf;
  font-size: .86rem;
}

.action-row {
  display: flex;
  justify-content: flex-start;
}
.run-button,
.login-button,
.ghost-button {
  padding: .95rem 1.15rem;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
}
.run-button,
.login-button {
  background: linear-gradient(90deg, #ff6a1a, #cf5311);
  box-shadow: 0 12px 28px rgba(255,106,26,.22);
}
.run-button:disabled { opacity: .62; cursor: wait; }
.ghost-button {
  background: rgba(255,255,255,.04);
  box-shadow: none;
}

.result-box {
  display: grid;
  gap: .65rem;
  padding-top: .2rem;
  border-top: 1px solid var(--line);
}
.preview,
.log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.preview {
  font-size: .78rem;
  color: #ffc49d;
  white-space: pre-wrap;
  word-break: break-word;
}
.log {
  margin: 0;
  min-height: 9rem;
  max-height: 19rem;
  overflow: auto;
  padding: .95rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(0,0,0,.28);
  color: #e4dfd3;
  font-size: .78rem;
  line-height: 1.55;
}
.log[data-kind="ok"] { border-color: rgba(184,255,77,.24); }
.log[data-kind="warn"] { border-color: rgba(255,106,26,.24); }
.log[data-kind="error"] { border-color: rgba(255,100,100,.24); color: #ffd8d8; }
.log[data-kind="pending"] { border-color: rgba(255,255,255,.14); color: #c7cfdb; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.login-panel {
  width: min(46rem, 100%);
  display: grid;
  gap: 1rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: linear-gradient(180deg, rgba(15,19,26,.95), rgba(10,12,18,.98));
  box-shadow: var(--shadow);
}
.login-button {
  width: fit-content;
  display: inline-grid;
  gap: .25rem;
}
.login-button small {
  color: rgba(255,255,255,.82);
  font-size: .62rem;
  letter-spacing: .18em;
}
code {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  padding: .16rem .4rem;
}

@media (max-width: 1180px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }
  .nav-rail {
    position: static;
  }
  .platform-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stage-intro {
    flex-direction: column;
  }
  .stage-badges {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .two-col,
  .three-col,
  .four-col,
  .stage-badges,
  .nav-footnote {
    grid-template-columns: 1fr;
  }
  .screen-header {
    flex-direction: column;
  }
  .screen-note {
    text-align: left;
    max-width: none;
  }
  .content-stage {
    min-height: auto;
  }
  .tool-screen {
    position: relative;
    inset: auto;
    display: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
    padding: .95rem;
  }
  .tool-screen.is-active {
    display: block;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 1rem 1rem .75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .brand-block,
  .topbar-right {
    flex: 0 0 auto;
    width: 100%;
  }
  .brand-block {
    gap: .4rem;
  }
  .topbar-right {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    justify-content: stretch;
    align-items: start;
    gap: .85rem;
  }
  .userbox {
    justify-items: start;
    text-align: left;
    max-width: 100%;
    gap: .75rem;
  }
  .switch {
    width: 100%;
  }
  .switch-copy {
    max-width: min(100%, 16rem);
  }
  .workspace-shell {
    padding: .85rem .8rem 1rem;
  }
  .nav-rail,
  .content-stage {
    border-radius: 1.2rem;
  }
  .stage-intro {
    display: none;
  }
  .nav-rail-head .lead-copy,
  .nav-footnote {
    display: none;
  }
  .platform-menu {
    display: flex;
    gap: .65rem;
    overflow-x: auto;
    padding-bottom: .15rem;
    scrollbar-width: none;
  }
  .platform-menu::-webkit-scrollbar { display: none; }
  .platform-tab {
    min-width: 14rem;
    flex: 0 0 auto;
  }
  .picker-header {
    flex-direction: column;
  }
  .picker-actions {
    justify-content: flex-start;
  }
  .action-row,
  .run-button,
  .login-button {
    width: 100%;
  }
  .run-button,
  .login-button,
  .ghost-button {
    justify-content: center;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  body.advanced-on .bg-art {
    opacity: .26;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


@font-face {
  font-family: "P2WMarker";
  src: url('/assets/fonts/MarkerFelt.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: "P2WBrooklyn";
  src: url('/assets/fonts/Brooklyn_Kid.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: "P2WPaintCans";
  src: url('/assets/fonts/PaintCans.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: "P2WScrawler";
  src: url('/assets/fonts/Scrawler_3rd.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: "P2WStencil";
  src: url('/assets/fonts/Stencil_Damage.otf') format('opentype');
  font-display: swap;
}

.brand-headline {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(5.8rem, 12vw, 8.9rem);
  padding: .2rem 0 .45rem;
  overflow: visible;
}
.brand-title-text {
  max-width: none;
  transition: opacity .25s ease, transform .25s ease;
}
.brand-wordmark,
.login-wordmark {
  position: relative;
  overflow: visible;
  isolation: isolate;
}
.brand-wordmark {
  display: none;
  width: min(100%, 52rem);
  min-height: clamp(5.9rem, 12.5vw, 9.2rem);
  --cycle-duration: 25s;
}
.login-wordmark {
  display: grid;
  width: min(100%, 38rem);
  min-height: clamp(6.4rem, 18vw, 10.2rem);
  padding: .35rem clamp(.35rem, 1.8vw, 1rem) .55rem;
  margin-bottom: .25rem;
  overflow: hidden;
  --cycle-duration: 30s;
}
.wordmark-text-frame,
.wordmark-image-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px) scale(.985);
  animation: wordmarkCycle var(--cycle-duration) infinite;
  animation-delay: calc(var(--index) * -5s);
}
.wordmark-text-frame {
  display: grid;
  align-items: center;
  justify-items: start;
  width: 100%;
  padding: .2rem 0 .35rem;
  white-space: nowrap;
  line-height: 1.02;
  font-size: clamp(3rem, 8vw, 6rem);
  text-transform: uppercase;
  letter-spacing: -.045em;
  color: #eef1f6;
  text-shadow: 0 3px 0 rgba(0,0,0,.55), 0 14px 34px rgba(0,0,0,.35);
}
.brand-wordmark .wordmark-text-frame {
  font-size: clamp(4.45rem, 9vw, 7.35rem);
}
.login-wordmark .wordmark-text-frame,
.login-wordmark .wordmark-image-frame {
  display: grid;
  place-items: center;
  text-align: center;
}
.login-wordmark .wordmark-text-frame {
  width: 100%;
  max-width: 100%;
  padding-inline: clamp(.15rem, 1.2vw, .65rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-size: clamp(2.45rem, 9.1vw, 4.5rem);
  line-height: .96;
  letter-spacing: -.055em;
  transform-origin: center center;
}
.wordmark-image-frame img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,.34));
}
.font-marker { font-family: "P2WMarker", var(--ui-font); }
.font-brooklyn { font-family: "P2WBrooklyn", var(--ui-font); }
.font-paintcans { font-family: "P2WPaintCans", var(--ui-font); }
.font-scrawler { font-family: "P2WScrawler", var(--ui-font); }
.font-stencil { font-family: "P2WStencil", var(--ui-font); }

.login-wordmark .font-marker { font-size: clamp(2.5rem, 9.4vw, 4.55rem); }
.login-wordmark .font-brooklyn { font-size: clamp(2.15rem, 8.4vw, 4rem); letter-spacing: -.07em; }
.login-wordmark .font-paintcans { font-size: clamp(2.35rem, 8.8vw, 4.15rem); }
.login-wordmark .font-scrawler { font-size: clamp(2.2rem, 8.6vw, 4.05rem); letter-spacing: -.065em; }
.login-wordmark .font-stencil { font-size: clamp(2.55rem, 9vw, 4.35rem); letter-spacing: -.05em; }
.login-wordmark .wordmark-image-frame { padding-inline: clamp(.1rem, 1vw, .5rem); }
.login-wordmark .wordmark-image-frame img { max-height: clamp(5.7rem, 15vw, 8.8rem); }

@keyframes wordmarkCycle {
  0%, 14% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  18%, 100% {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
}

body.advanced-on .brand-wordmark {
  display: block;
}
body.advanced-on .brand-title-text {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  pointer-events: none;
}
body.advanced-on .brand-headline {
  min-width: min(100%, 52rem);
  min-height: clamp(6.7rem, 14vw, 10.6rem);
  padding-bottom: .8rem;
}
body.advanced-on .topbar {
  padding-bottom: 1.45rem;
}
body.advanced-on .brand-wordmark .wordmark-text-frame {
  color: #f5f1e8;
  text-shadow: 0 3px 0 rgba(0,0,0,.72), 0 0 18px rgba(255,106,26,.14), 0 20px 38px rgba(0,0,0,.46);
}

body.login-shell {
  --text: #eef2f7;
  --muted: #a5aebb;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.15);
  --panel: rgba(10, 12, 16, 0.86);
  --panel-strong: rgba(8, 10, 14, 0.94);
  background:
    radial-gradient(circle at top left, rgba(255,106,26,.09), transparent 24%),
    radial-gradient(circle at top right, rgba(67,86,119,.14), transparent 24%),
    linear-gradient(180deg, #05070b 0%, #0b0f16 46%, #06080c 100%);
  color: var(--text);
}
body.login-shell::before {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
}
body.login-shell .bg-art {
  opacity: .12;
  background-image: url('/assets/grunge-user-bg.png');
  background-size: cover;
  background-position: center;
  filter: grayscale(1) brightness(.4) contrast(1.06);
  transform: scale(1.03);
}
body.login-shell .bg-vignette {
  background:
    linear-gradient(180deg, rgba(0,0,0,.26), rgba(0,0,0,.18)),
    radial-gradient(circle at center, rgba(0,0,0,.05), rgba(0,0,0,.22) 72%, rgba(0,0,0,.48) 100%);
}
body.login-shell .noise {
  opacity: .08;
  mix-blend-mode: soft-light;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.login-panel {
  width: min(39rem, 100%);
  display: grid;
  gap: .9rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1.8rem;
  background:
    linear-gradient(180deg, rgba(13,17,23,.86), rgba(8,10,14,.95)),
    linear-gradient(120deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  box-shadow: 0 32px 72px rgba(0,0,0,.38);
  backdrop-filter: blur(10px);
}
.login-stack {
  grid-template-columns: 1fr;
}
.login-hero-block {
  display: grid;
  gap: .8rem;
  padding: .75rem .85rem .4rem;
  border-bottom: 1px solid var(--line);
}
.login-hero-block .eyebrow {
  color: #98a3b1;
}
.login-copy-block {
  display: grid;
  gap: 1rem;
  padding: .85rem;
}
.login-copy-block .lead-copy {
  max-width: none;
  color: #c1c9d6;
}
.login-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.login-chip {
  display: inline-flex;
  align-items: center;
  padding: .55rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.03);
  color: #d8dee8;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
body.login-shell .login-button {
  justify-content: center;
  align-items: center;
  width: min(20rem, 100%);
  color: #f7f1e8;
  background: linear-gradient(90deg, #ff6a1a, #c84d0d);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 18px 34px rgba(255,106,26,.22);
}
body.login-shell .login-button small {
  color: rgba(255,255,255,.78);
}

@media (max-width: 900px) {
  .brand-wordmark {
    width: min(100%, 44rem);
    min-height: clamp(5.4rem, 13vw, 8rem);
  }
}
@media (max-width: 720px) {
  .brand-headline {
    min-height: clamp(4.9rem, 15vw, 7rem);
    padding-bottom: .35rem;
  }
  .brand-wordmark {
    min-height: clamp(5rem, 16vw, 7.4rem);
  }
  .brand-wordmark .wordmark-text-frame {
    font-size: clamp(3.15rem, 12vw, 5.2rem);
  }
  .login-panel {
    padding: 1rem;
  }
  .login-wordmark {
    width: min(100%, 100%);
    min-height: clamp(5.15rem, 24vw, 7.2rem);
    padding: .2rem .45rem .35rem;
  }
  .login-wordmark .wordmark-text-frame {
    font-size: clamp(1.9rem, 10.5vw, 3.3rem);
    padding-inline: .15rem;
  }
  .login-wordmark .font-brooklyn { font-size: clamp(1.8rem, 9.8vw, 3.05rem); }
  .login-wordmark .font-scrawler { font-size: clamp(1.8rem, 9.7vw, 3rem); }
  body.login-shell .login-button {
    width: 100%;
  }
}


/* v9 login wordmark fit fixes */
.login-panel { overflow: hidden; }
.login-hero-block { min-width: 0; }
.login-wordmark > * { min-width: 0; }


/* v10 mobile header spacing fix */
@media (max-width: 720px) {
  .brand-headline,
  body.advanced-on .brand-headline {
    min-height: auto;
  }
  .brand-block,
  .topbar-right,
  .userbox,
  .switch {
    min-height: 0;
  }
  .topbar-right > * {
    min-width: 0;
  }
  .ghost-button {
    align-self: flex-start;
  }
}
