/* Shared frame and masthead for every mode. */
:root {
  --site-width: 720px;
  --site-padding: 14px 12px 42px;
  --site-text: #f1f3f5;
  --site-muted: #a6b0b8;
  --site-line: rgba(207, 218, 226, 0.15);
  --site-yellow: #f2dc65;
  --site-action-width: 132px;
  --site-action-height: 88px;
  --site-action-radius: 18px;
  --site-footer-text: #c7b94d;
  --site-hero: radial-gradient(ellipse at 88% 12%, #d6ba4120, transparent 52%), linear-gradient(135deg, #1b2126, #101419 80%);
}
.site-shell {
  width: min(100%, var(--site-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--site-padding);
  color: var(--site-text);
  font-family: Inter, sans-serif;
}
.site-shell .topbar {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 30px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}
.site-shell .brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 7px;
  min-width: 0;
  white-space: normal;
  text-transform: none;
}
.site-shell .kicker {
  flex: 0 0 auto;
  margin: 0;
  color: #d8c969;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(15px, 3.6vw, 20px);
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;
}
.site-shell .brand-divider {
  color: #a99c4d;
  font-size: 12px;
}
.site-shell .brand h1 {
  margin: 0;
  color: var(--site-text);
  font-size: clamp(15px, 3.6vw, 20px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.065em;
  text-transform: none;
}
.site-shell .hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "meta meta" "copy action" "navigation navigation";
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 24px;
  width: 100%;
  height: 225px;
  min-height: 225px;
  margin: 0 0 18px;
  padding: 22px 22px 0;
  border: 1px solid #363b3d;
  border-radius: 24px;
  background: var(--site-hero);
  overflow: hidden;
  box-shadow: 0 18px 48px #0003;
}
.site-shell .hero-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.site-shell .version-label {
  position: static;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: #c5b976;
  font: 700 9px/1.3 Inter, sans-serif;
  letter-spacing: .08em;
  white-space: nowrap;
  text-transform: uppercase;
}
.site-shell .version-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e8d36c;
  box-shadow: 0 0 9px #e8d34d55;
}
.site-shell .hero-copy {
  grid-area: copy;
  align-self: start;
  min-width: 0;
  padding: 12px 0 0;
}
.site-shell .hero-label {
  color: #aab3b9;
  font: 800 10px/1.3 Inter, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.site-shell .hero h2 {
  max-width: 390px;
  min-height: 0;
  margin: 0;
  font: 900 clamp(28px, 5vw, 36px)/1.1 Inter, sans-serif;
  letter-spacing: -.055em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.site-shell .hero .deploy-control {
  grid-area: action;
  align-self: start;
  justify-self: end;
  display: block;
  padding: 12px 0 0;
}
.site-shell .hero .arm { height: var(--site-action-height); }

/* Modes dock into the hero, above the mode-specific result layouts. */
.site-shell .mode-strip {
  grid-area: navigation;
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: auto;
  margin: 0 -22px;
  padding: 0 14px;
  gap: 0;
  border-top: 1px solid #ffffff13;
  background: #080c103d;
}
.site-shell .mode-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 55px;
  padding: 0 7px;
  gap: 6px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #929da6;
  font: 800 11px/1.2 Inter, sans-serif;
  letter-spacing: .015em;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
}
.site-shell .mode-link::after { display: none; }
.site-shell .mode-link:hover,
.site-shell .mode-link:focus-visible {
  color: #fff;
  background: #ffffff08;
}
.site-shell .mode-link.is-active {
  color: var(--site-yellow);
  background: #f2dc6510;
  box-shadow: none;
}
.site-shell .mode-link.is-active::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 3px;
  background: var(--site-yellow);
  box-shadow: 0 -3px 16px #f2dc6538;
}
.site-shell .commander-gear {
  display: grid;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  place-items: center;
  color: inherit;
  font-size: 12px;
  text-shadow: none;
}
.site-shell .commander-link:hover .commander-gear,
.site-shell .commander-link:focus-visible .commander-gear {
  color: #d6f8ff;
  animation: commander-gear-spin 560ms cubic-bezier(.4, 0, .2, 1);
}
@keyframes commander-gear-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .site-shell .commander-link:hover .commander-gear,
  .site-shell .commander-link:focus-visible .commander-gear { animation: none; }
}
.site-shell .mode-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.site-shell :is(#randomizeBtn, #deployBtn).deploy-btn {
  position: relative;
  display: grid;
  width: var(--site-action-width);
  height: var(--site-action-height);
  min-height: 0;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 247, 182, .64);
  border-radius: var(--site-action-radius);
  background: linear-gradient(145deg, #ffec7c, #d2ad2d);
  box-shadow: inset 0 0 0 7px rgba(255, 248, 178, .15);
  color: #16150e;
  font: 950 10px/1 Inter, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: none;
  animation: none;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .08s ease;
}
.site-shell :is(#randomizeBtn, #deployBtn).deploy-btn::before,
.site-shell :is(#randomizeBtn, #deployBtn).deploy-btn::after {
  display: none;
}
.site-shell :is(#randomizeBtn, #deployBtn).deploy-btn:hover,
.site-shell :is(#randomizeBtn, #deployBtn).deploy-btn:focus-visible {
  background: #ffe879;
  box-shadow: 0 12px 34px rgba(242, 220, 101, .28);
  transform: translateY(-1px);
}
.site-shell :is(#randomizeBtn, #deployBtn).deploy-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.site-shell :is(#randomizeBtn, #deployBtn).deploy-btn:active {
  transform: translateY(1px);
}
.site-shell :is(#randomizeBtn, #deployBtn).deploy-btn:disabled {
  cursor: wait;
  filter: saturate(.82);
}
.site-shell .deploy-btn .txt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.site-shell .deploy-btn .txt strong {
  font-size: 18px;
  letter-spacing: -.04em;
}
.site-shell .deploy-btn .txt span {
  color: #69571c;
  font-size: 8px;
}

.site-shell :is(.socialfooter, .commander-footer) {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 16px;
  padding: 14px 0 0;
  gap: 8px;
  border-top: 1px solid var(--site-line);
}
.site-shell :is(.socialfooter, .commander-footer) .social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.site-shell :is(.socialfooter, .commander-footer) a,
.site-shell :is(.socialfooter, .commander-footer) .social-sep {
  color: var(--site-footer-text);
  font: 700 9px/1 Inter, sans-serif;
  letter-spacing: .025em;
}
.site-shell :is(.socialfooter, .commander-footer) a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.site-shell :is(.socialfooter, .commander-footer) a:hover {
  color: #fff08a;
  text-decoration: underline;
}

@media (max-width: 520px) {
  :root {
    --site-padding: 12px 10px 34px;
    --site-action-width: 88px;
    --site-action-height: 68px;
    --site-action-radius: 15px;
  }
  .site-shell .brand { flex-wrap: nowrap; gap: 4px; white-space: nowrap; }
  .site-shell .kicker { font-size: clamp(10px, 3.4vw, 14px); }
  .site-shell .brand h1 { font-size: clamp(9px, 3vw, 14px); }
  .site-shell .hero { height: auto; min-height: 0; grid-template-rows: auto auto auto; gap: 0 13px; padding: 17px 15px 0; border-radius: 22px; }
  .site-shell .hero-copy, .site-shell .hero .deploy-control { padding-bottom: 16px; }
  .site-shell .hero-label { font-size: 9px; letter-spacing: .08em; }
  .site-shell .version-label { gap: 5px; font-size: 8px; letter-spacing: .045em; }
  .site-shell .hero h2 { max-width: 260px; font-size: 22px; }
  .site-shell .mode-strip { margin: 0 -15px; padding: 0 7px; }
  .site-shell .mode-link {
    min-height: 48px;
    padding: 0 2px;
    gap: 0;
    font-size: 10px;
    letter-spacing: -.02em;
  }
  .site-shell .mode-link.is-active::before { right: 13px; left: 13px; }
  .site-shell .commander-gear { display: none; }
  .site-shell.commander-app .deploy-btn:disabled .txt strong { font-size: 15px; }
  .site-shell.commander-app .deploy-btn:disabled .txt span { font-size: 7px; letter-spacing: .03em; }
}
@media (max-width: 380px) {
  .site-shell.commander-app .hero {
    --site-action-width: 68px;
  }
  .site-shell.commander-app .hero .arm { width: 24px; }
  .site-shell.commander-app .hero h2 { font-size: 20px; }
  .site-shell.commander-app .hero .deploy-btn:disabled .txt strong { font-size: 11px; }
}
