:root {
  --bg: #070a0f;
  --panel: #0f1721;
  --ink: #f5f8fc;
  --muted: #9aa8b8;
  --line: rgba(255, 255, 255, 0.11);
  --green: #23c98d;
  --cyan: #39b7ff;
  --gold: #f4c95d;
  --red: #ff6b5f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(35, 201, 141, 0.14), transparent 30%),
    radial-gradient(circle at 92% 6%, rgba(57, 183, 255, 0.12), transparent 30%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.user-shell[data-auth="locked"] .portal { display: none; }
.user-shell[data-auth="unlocked"] .auth-screen { display: none; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.back-link { position: fixed; top: 22px; left: 22px; color: var(--muted); font-weight: 800; }
.auth-layout { width: min(100%, 1040px); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: center; }
.auth-copy, .auth-card, .panel, .metric-card, .profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
  box-shadow: var(--shadow);
}
.auth-copy { min-height: 540px; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(28px, 5vw, 46px); }
.auth-card { padding: 22px; }
.brand, .brand-mark { display: inline-flex; align-items: center; }
.brand { gap: 10px; font-weight: 900; }
.brand-mark { justify-content: center; width: 40px; height: 40px; border-radius: 8px; color: #06100c; background: linear-gradient(135deg, var(--green), var(--gold)); font-size: 0.86rem; font-weight: 900; }
.eyebrow { margin: 20px 0 10px; color: var(--gold); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 4.6rem); line-height: 0.98; }
h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.05; }
p { color: var(--muted); }
.auth-copy p:not(.eyebrow) { max-width: 650px; font-size: 1.05rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.auth-tab { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(255,255,255,0.05); font-weight: 850; cursor: pointer; }
.auth-tab.is-active { color: #06100c; background: var(--green); border-color: var(--green); }
.auth-form { display: none; gap: 12px; }
.auth-form.is-active { display: grid; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 8px; color: var(--ink); font-weight: 760; }
input, select, textarea { width: 100%; min-height: 48px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: rgba(255,255,255,0.055); outline: none; }
textarea { resize: vertical; }
select option { color: #101821; }
input:focus, select:focus, textarea:focus { border-color: rgba(35, 201, 141, 0.7); box-shadow: 0 0 0 3px rgba(35, 201, 141, 0.12); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 16px; border: 1px solid transparent; border-radius: 8px; font-weight: 850; cursor: pointer; }
.button.primary { color: #06100c; background: linear-gradient(135deg, var(--green), var(--gold)); }
.button.secondary { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,0.06); }
.button.ghost { color: var(--muted); border-color: var(--line); background: transparent; }
.form-note { min-height: 22px; margin: 4px 0 0; font-size: 0.88rem; }
.form-note.is-error { color: var(--red); }
.form-note.is-success { color: var(--green); }

.portal { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 24px; border-right: 1px solid var(--line); background: rgba(7,10,15,0.72); backdrop-filter: blur(16px); }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a { min-height: 42px; display: flex; align-items: center; padding: 9px 11px; border-radius: 8px; color: var(--muted); font-weight: 800; }
.sidebar nav a.is-active, .sidebar nav a:hover { color: var(--ink); background: rgba(255,255,255,0.07); }
.sidebar .ghost { margin-top: auto; }
.workspace { padding: clamp(20px, 4vw, 44px); }
.topbar, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.topbar { margin-bottom: 24px; }
.topbar .eyebrow, .panel-heading .eyebrow { margin-top: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.metric-card { padding: 18px; box-shadow: 0 10px 34px rgba(0,0,0,0.2); }
.metric-card span { color: var(--muted); font-weight: 800; }
.metric-card strong { display: block; margin-top: 14px; font-size: 2.05rem; line-height: 1; }
.metric-card p { margin-bottom: 0; }
.panel { margin-top: 18px; padding: 20px; box-shadow: 0 10px 34px rgba(0,0,0,0.2); }
.submit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.submit-grid .wide, .submit-grid .button, .submit-grid .form-note { grid-column: 1 / -1; }
.package-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.package-links a, .package-links span { min-height: 58px; display: flex; align-items: center; justify-content: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font-weight: 850; background: rgba(255,255,255,0.055); }
.package-links a { color: #06100c; background: var(--green); border-color: var(--green); }
.package-links span { color: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 8px; color: var(--gold); background: rgba(244, 201, 93, 0.1); font-size: 0.82rem; font-weight: 850; }
.profile-card { margin-top: 18px; padding: 18px; box-shadow: none; }
.profile-card p { margin: 8px 0; }
.profile-card strong { color: var(--ink); }

@media (max-width: 1040px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-copy { min-height: 360px; }
  .portal { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .metric-grid, .package-links { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .auth-screen { padding: 18px; }
  .topbar, .panel-heading { align-items: flex-start; flex-direction: column; }
  .submit-grid { grid-template-columns: 1fr; }
  .workspace { padding: 18px; }
}

.button {
  gap: 8px;
}

.button.is-loading {
  cursor: wait;
  opacity: 0.88;
  pointer-events: none;
}

.button.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(6, 16, 12, 0.28);
  border-top-color: #06100c;
  border-radius: 999px;
  animation: button-spin 760ms linear infinite;
}

.button.secondary.is-loading::before,
.button.ghost.is-loading::before {
  border-color: rgba(245, 248, 252, 0.25);
  border-top-color: var(--ink);
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

.submit-panel {
  max-width: 980px;
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.submission-card {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #dfe5ec;
  border-radius: 10px;
  color: #17202b;
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.submission-card p,
.submission-card small {
  color: #536171;
}

.promo-box {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid #86efac;
  border-radius: 10px;
  background: #ecfdf5;
}

.promo-box strong {
  color: #11351f;
}

.promo-box p {
  margin: 0;
  font-size: 0.9rem;
}

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

.social-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.social-pill.tiktok {
  background: #050505;
}

.social-pill.instagram {
  background: #db2777;
}

.proof-grid,
.field-grid.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.claim-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #15803d;
  font-weight: 900;
  cursor: pointer;
}

.article-submit-form {
  display: grid;
  gap: 16px;
}

.submission-card label {
  color: #17202b;
  font-size: 0.88rem;
  font-weight: 800;
}

.submission-card input,
.submission-card select,
.submission-card textarea {
  min-height: 42px;
  border: 1px solid #d7dee8;
  color: #17202b;
  background: #f9fbfd;
}

.submission-card input[type="file"] {
  padding: 9px;
  background: #ffffff;
}

.category-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.category-box legend {
  width: 100%;
  margin-bottom: 2px;
  color: #17202b;
  font-size: 0.88rem;
  font-weight: 900;
}

.category-box label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
}

.category-box input,
.fast-track-box input {
  width: auto;
  min-height: auto;
  accent-color: #15803d;
}

.editor-shell {
  overflow: hidden;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 7px 10px;
  border-bottom: 1px solid #d7dee8;
  background: #f7f9fb;
}

.editor-toolbar span {
  margin-right: 12px;
  color: #344154;
  font-size: 0.86rem;
}

.editor-toolbar button {
  display: inline-grid;
  min-width: 26px;
  width: auto;
  height: 26px;
  padding: 0 7px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #17202b;
  background: transparent;
  font-weight: 900;
}

.editor-shell textarea {
  min-height: 230px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  resize: vertical;
}

.word-counter {
  margin: -8px 0 0;
  color: #536171;
  font-size: 0.82rem;
}

.fast-track-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #facc15;
  border-radius: 10px;
  background: #fffbeb;
}

.fast-track-box span {
  display: grid;
  gap: 2px;
}

.fast-track-box strong {
  color: #92400e;
}

.fast-track-box small {
  color: #a16207;
}

.button.danger {
  min-height: 52px;
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.2);
}

.button.danger.is-loading::before {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
}

.submission-card .form-note.is-error {
  color: #dc2626;
}

.submission-card .form-note.is-success {
  color: #15803d;
}

@media (max-width: 760px) {
  .proof-grid,
  .field-grid.two-cols {
    grid-template-columns: 1fr;
  }

  .submission-card {
    padding: 16px;
  }

  .editor-toolbar {
    flex-wrap: wrap;
  }
}

.guide-section {
  display: grid;
  gap: 18px;
  margin: 18px 0;
}

.validation-alert {
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: rgba(244, 201, 93, 0.1);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16);
}

.validation-alert strong {
  color: var(--gold);
}

.validation-alert p {
  margin: 8px 0 0;
  color: rgba(245, 248, 252, 0.82);
}

.guide-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.guide-stat {
  min-height: 110px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

.guide-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-stat strong {
  display: block;
  margin-top: 12px;
  font-size: 2.25rem;
  line-height: 1;
}

.guide-stat.blue { border-color: rgba(57, 183, 255, 0.28); background: rgba(57, 183, 255, 0.08); }
.guide-stat.blue strong { color: var(--cyan); }
.guide-stat.amber { border-color: rgba(244, 201, 93, 0.3); background: rgba(244, 201, 93, 0.08); }
.guide-stat.amber strong { color: var(--gold); }
.guide-stat.green { border-color: rgba(35, 201, 141, 0.3); background: rgba(35, 201, 141, 0.08); }
.guide-stat.green strong { color: var(--green); }
.guide-stat.red { border-color: rgba(255, 107, 95, 0.28); background: rgba(255, 107, 95, 0.08); }
.guide-stat.red strong { color: var(--red); }

.guide-panel {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.2);
}

.guide-panel h2 {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.guide-list {
  display: grid;
  gap: 26px;
  margin-top: 22px;
}

.guide-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
}

.guide-item > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.guide-item.red > span { color: #ffb4ad; border: 1px solid rgba(255, 107, 95, 0.45); background: rgba(255, 107, 95, 0.12); }
.guide-item.amber > span { color: var(--gold); border: 1px solid rgba(244, 201, 93, 0.45); background: rgba(244, 201, 93, 0.1); }
.guide-item.green > span { color: var(--green); border: 1px solid rgba(35, 201, 141, 0.45); background: rgba(35, 201, 141, 0.1); }

.guide-item h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.guide-item p {
  margin: 0 0 10px;
  color: rgba(245, 248, 252, 0.78);
}

.guide-item ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.guide-item li + li {
  margin-top: 6px;
}

.submission-card {
  border-color: var(--line);
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
}

.submission-card p,
.submission-card small {
  color: var(--muted);
}

.promo-box {
  border-color: rgba(35, 201, 141, 0.32);
  background: rgba(35, 201, 141, 0.08);
}

.promo-box strong,
.submission-card label,
.category-box legend {
  color: var(--ink);
}

.submission-card input,
.submission-card select,
.submission-card textarea,
.submission-card input[type="file"] {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255,255,255,0.055);
}

.submission-card input::file-selector-button {
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  color: #06100c;
  background: var(--green);
  font-weight: 850;
}

.category-box label {
  color: rgba(245, 248, 252, 0.82);
}

.editor-shell {
  border-color: var(--line);
  background: rgba(255,255,255,0.04);
}

.editor-toolbar {
  border-bottom-color: var(--line);
  background: rgba(255,255,255,0.06);
}

.editor-toolbar span,
.editor-toolbar button {
  color: var(--ink);
}

.editor-shell textarea {
  color: var(--ink);
  background: rgba(255,255,255,0.025);
}

.word-counter {
  color: var(--muted);
}

.word-counter.is-low {
  color: var(--gold);
}

.fast-track-box {
  border-color: rgba(244, 201, 93, 0.38);
  background: rgba(244, 201, 93, 0.08);
}

.fast-track-box strong {
  color: var(--gold);
}

.fast-track-box small {
  color: rgba(244, 201, 93, 0.82);
}

@media (max-width: 1040px) {
  .guide-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .guide-stats,
  .guide-item {
    grid-template-columns: 1fr;
  }
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.quick-grid a {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.quick-grid strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.quick-grid span {
  color: var(--muted);
}

@media (max-width: 900px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

.version-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: rgba(35, 201, 141, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
}

.sidebar-version {
  margin-top: auto;
}

.sidebar-version + .ghost {
  margin-top: 0;
}
