:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef8f5;
  color: #13202a;
  --ink: #13202a;
  --muted: #63717b;
  --line: #cfe6e3;
  --panel: #ffffff;
  --teal: #19b8b0;
  --teal-dark: #087a73;
  --coral: #f1844b;
  --cream: #fff7de;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(25, 184, 176, 0.14), transparent 34%),
    linear-gradient(225deg, rgba(241, 132, 75, 0.16), transparent 28%),
    var(--cream);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(17, 80, 78, 0.08);
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(12px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  color: var(--ink);
}

h2 {
  font-size: 17px;
  margin-bottom: 14px;
}

#status {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 10px 22px rgba(8, 122, 115, 0.22);
  object-fit: cover;
}

.eyebrow {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.token {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  max-width: 280px;
}

.token input {
  grid-column: 1 / -1;
}

.token button {
  grid-column: 2;
  justify-self: end;
  padding: 8px 12px;
}

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

.control-tabs {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(19, 32, 42, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 10px;
  position: sticky;
  top: 91px;
  z-index: 2;
}

.control-tab {
  background: #f4fbfa;
  border: 1px solid #d9eeeb;
  box-shadow: none;
  color: #30424f;
  flex: 1 1 120px;
  font-size: 13px;
  min-height: 42px;
  padding: 9px 12px;
}

.control-tab:hover {
  background: #e9f8f5;
  filter: none;
}

.control-tab.is-active {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(8, 122, 115, 0.18);
  color: #ffffff;
}

[data-control-section][hidden] {
  display: none !important;
}

.intro {
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #effcf8 56%, #ffe9d5 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 140px;
  overflow: hidden;
  padding: 20px;
  position: relative;
}

.intro h2 {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
  margin: 4px 0 8px;
}

.intro p:last-child {
  color: var(--muted);
  max-width: 720px;
}

.intro img {
  aspect-ratio: 1;
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(8, 122, 115, 0.2);
  object-fit: cover;
  width: 140px;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(19, 32, 42, 0.06);
}

.gaming-ops {
  grid-column: 1 / -1;
}

.section-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.gaming-summary,
.review-badge {
  background: #e9f8f5;
  border: 1px solid #c8e8e3;
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
}

.review-badge.has-review {
  background: #fff2e6;
  border-color: #ffc58f;
  color: #9a4b00;
}

.gaming-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.gaming-column {
  display: grid;
  gap: 14px;
}

.gaming-tool {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.gaming-tool:first-child {
  border-top: 0;
  padding-top: 0;
}

.gaming-tool h3 {
  font-size: 18px;
  margin: 0 0 5px;
}

.document-drop {
  align-items: center;
  background: linear-gradient(135deg, #effcf9, #fff8eb);
  border: 1px dashed #8ecfc7;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  margin: 12px 0;
  min-height: 92px;
  padding: 16px;
  text-align: center;
}

.document-drop:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 20px rgba(8, 122, 115, 0.08);
}

.document-drop span {
  color: var(--ink);
  font-weight: 800;
}

.document-drop small {
  color: var(--muted);
}

.document-drop input {
  margin: 7px auto 0;
  max-width: 100%;
}

.importer-options {
  margin-top: 10px;
}

.import-status {
  background: #f4fbfa;
  border-left: 3px solid var(--teal);
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0;
  padding: 10px 12px;
}

.brain-importer textarea[readonly] {
  background: #f2f6f6;
  color: #71818a;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gaming-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.gaming-row {
  align-items: center;
  background: #f7fbfa;
  border: 1px solid #dcecea;
  border-radius: 7px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 12px;
}

.gaming-row.needs-review {
  background: #fff9f3;
  border-color: #ffd0a6;
}

.gaming-row div:first-child,
.build-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.gaming-row span,
.gaming-row p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.status-chip {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 11px !important;
  font-weight: 800;
  padding: 5px 8px;
}

.status-chip.is-live {
  background: #dff8ee;
  color: #087a58;
}

.status-chip.is-review {
  background: #ffe8d2;
  color: #a44d00;
}

.row-actions {
  align-items: center;
  display: flex !important;
  flex: 0 0 auto;
  gap: 6px !important;
}

.row-actions button {
  font-size: 11px;
  min-height: 32px;
  padding: 6px 9px;
}

.button-muted {
  background: #657985;
}

.compact-heading {
  align-items: center;
}

.empty-state {
  background: #f7fbfa;
  border: 1px dashed #c8dfdc;
  border-radius: 7px;
  color: var(--muted);
  margin: 0;
  padding: 14px;
}

@media (max-width: 860px) {
  .gaming-layout,
  .three-up {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .gaming-row,
  .row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gaming-summary,
  .review-badge {
    white-space: normal;
  }
}

.import-panel {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #effcf8);
  display: flex;
  gap: 16px;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.import-panel[hidden] {
  display: none;
}

.plan-panel {
  align-items: center;
  display: flex;
  gap: 16px;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.plan-status {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(160px, 220px) auto;
}

.readiness-panel {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-column: 1 / -1;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
}

.readiness-score,
.trust-pulse {
  background: linear-gradient(135deg, #f0fffc, #fff8e9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.score-ring {
  align-items: center;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, #ffffff 0 55%, transparent 56%),
    conic-gradient(var(--teal), var(--teal-dark));
  border-radius: 50%;
  color: var(--ink);
  display: flex;
  font-size: 32px;
  font-weight: 900;
  justify-content: center;
  margin: 12px 0;
  max-width: 132px;
  width: 100%;
}

.readiness-main {
  display: grid;
  gap: 12px;
}

.progress-track {
  background: #e6f4f1;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-track span {
  background: linear-gradient(90deg, var(--teal), var(--teal-dark));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0;
}

.readiness-items {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.readiness-item {
  align-items: start;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 10px;
}

.readiness-item > span {
  align-items: center;
  background: #ffe8d2;
  border-radius: 50%;
  color: #a64808;
  display: flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.readiness-item.is-complete > span,
.trust-signals .is-complete {
  background: #ddf8ef;
  color: var(--teal-dark);
}

.readiness-item b {
  color: var(--ink);
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.readiness-item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.trust-signals {
  display: grid;
  gap: 8px;
}

.trust-signals span {
  background: #fff7de;
  border: 1px solid #ffdca8;
  border-radius: 999px;
  color: #765d2a;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.plan-badge {
  align-items: center;
  background: #e8f7f2;
  border: 1px solid #b8e8dc;
  border-radius: 999px;
  color: var(--teal-dark);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 14px;
  text-transform: uppercase;
}

.plan-badge[data-plan="pro"] {
  background: #fff1df;
  border-color: #ffd1a2;
  color: #9a4a08;
}

.plan-badge[data-plan="network"] {
  background: #ecf1ff;
  border-color: #cfdcff;
  color: #3154a3;
}

.plan-gated,
.plan-gated-button {
  position: relative;
}

.plan-gated.is-locked {
  background: #f8fbfa;
  border: 1px dashed #b8d8d4;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 12px;
}

.plan-gated.is-locked label,
.plan-gated.is-locked .helper,
.plan-gated.is-locked h2 {
  opacity: 0.58;
}

.plan-gated.is-locked input,
.plan-gated.is-locked textarea,
.plan-gated.is-locked select {
  background: #edf4f3;
}

.lock-note {
  align-items: center;
  background: #fff7de;
  border: 1px solid #ffdca8;
  border-radius: 8px;
  color: #4c3a13;
  display: grid;
  column-gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  margin-bottom: 12px;
  padding: 10px;
}

.lock-note b {
  color: #1d2d35;
  font-size: 13px;
  grid-column: 2;
  line-height: 1.25;
}

.lock-note span {
  color: #765d2a;
  font-size: 12px;
  font-weight: 700;
  grid-column: 2;
  line-height: 1.35;
}

.lock-note button {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-width: 44px;
  padding: 8px 12px;
}

#discardOnboardingDraft {
  background: #5b6f76;
  box-shadow: none;
}

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

.settings-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  color: #30424f;
  font-size: 13px;
  font-weight: 600;
}

label.check {
  align-items: center;
  display: flex;
  gap: 8px;
}

label.check input {
  width: auto;
}

.helper {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  margin: -4px 0 12px;
}

.helper-ok {
  color: var(--teal-dark);
}

.helper-warn {
  color: #9a4a08;
}

.upload-field {
  background: #f4fbfa;
  border: 1px dashed #abdcd6;
  border-radius: 6px;
  padding: 10px;
}

.upload-field input,
.tier-row input[type="file"] {
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
  padding: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #bfdad7;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(25, 184, 176, 0.18);
  outline: 0;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

textarea.large {
  min-height: 180px;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(8, 122, 115, 0.2);
}

button:hover {
  filter: brightness(0.96);
}

button:disabled {
  background: #9db2b5;
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
  opacity: 0.72;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assignment-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.assignment-item {
  align-items: center;
  background: #f4fbfa;
  border: 1px solid #d9eeeb;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.assignment-item button {
  background: #5b6f76;
  box-shadow: none;
  padding: 7px 10px;
}

.tier-editor {
  border: 1px dashed #abdcd6;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 8px 0 14px;
  padding: 12px;
}

.tier-editor h3 {
  font-size: 16px;
  margin: 0;
}

.tier-row {
  align-items: end;
  background: #f6fcfb;
  border: 1px solid #d9eeeb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 74px minmax(110px, 1fr) 105px 120px minmax(150px, 1.2fr) minmax(150px, 1.2fr);
  padding: 10px;
}

.tier-row b {
  color: var(--teal-dark);
  font-size: 13px;
  margin-bottom: 17px;
  text-transform: uppercase;
}

.tier-row label {
  margin-bottom: 0;
}

pre {
  margin: 12px 0 0;
  white-space: pre-wrap;
  background: #13202a;
  color: #e9fbf6;
  border-radius: 6px;
  padding: 12px;
  min-height: 60px;
  overflow: auto;
}

.ad-preview {
  margin-top: 12px;
}

.ad-preview img {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(19, 32, 42, 0.12);
  display: block;
  max-width: 100%;
}

.ad-preview a {
  align-items: center;
  background: #173345;
  border-radius: 6px;
  color: #e9fbf6;
  display: inline-flex;
  font-weight: 800;
  margin: 8px 8px 0 0;
  padding: 9px 12px;
  text-decoration: none;
}

.ad-preview a:hover {
  background: #0f5d63;
}

.ad-preview a.ad-btn-source {
  background: #2d7992;
}

.ad-preview a.ad-btn-boost {
  background: #f1844b;
}

.ad-preview a.ad-btn-buy {
  background: #13a66b;
}

.ad-preview a.ad-btn-chart {
  background: #7c5cff;
}

.ad-preview a.ad-btn-docs {
  background: #5b6f76;
}

.ad-preview a.ad-btn-social {
  background: #1d9bf0;
}

.ad-preview a.ad-btn-chat {
  background: #20a7c7;
}

.gate-page {
  min-height: 100vh;
}

.gate-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.gate-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(19, 32, 42, 0.12);
  max-width: 620px;
  padding: 22px;
  width: 100%;
}

.gate-mascot {
  aspect-ratio: 1;
  border: 3px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(8, 122, 115, 0.18);
  display: block;
  margin-bottom: 14px;
  object-fit: cover;
  width: 104px;
}

.gate-card h1 {
  font-size: 30px;
  line-height: 1.08;
  margin: 4px 0 8px;
}

.gate-copy {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

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

.gate-hidden {
  height: 0;
  left: -9999px;
  opacity: 0;
  position: absolute;
  width: 0;
}

.gate-question {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
}

.gate-question legend {
  color: var(--ink);
  font-weight: 800;
  padding: 0 4px;
}

.gate-option {
  align-items: center;
  background: #f4fbfa;
  border: 1px solid #d9eeeb;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 10px;
}

.gate-option input {
  width: auto;
}

.gate-result {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
  margin-top: 14px;
}

.gate-result-ok {
  color: var(--teal-dark);
}

.gate-result-warn {
  color: #a3451e;
}

.gate-invite {
  align-items: center;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  margin-top: 12px;
  padding: 12px 16px;
  text-decoration: none;
}

@media (max-width: 860px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .control-tabs {
    position: static;
  }

  .layout,
  .intro,
  .grid,
  .settings-grid,
  .tier-row,
  .readiness-panel,
  .readiness-items,
  .plan-panel,
  .plan-status,
  .lock-note {
    grid-template-columns: 1fr;
  }

  .plan-panel {
    align-items: stretch;
    display: grid;
  }

  .lock-note button {
    grid-column: auto;
    grid-row: auto;
  }

  .lock-note b,
  .lock-note span {
    grid-column: auto;
  }

  .intro img {
    width: 100%;
    max-width: 220px;
  }
}
