:root {
  --bg: #f3f5fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #eef2ff;
  --text: #182131;
  --muted: #667085;
  --line: #e5e7eb;
  --brand: #c55331;
  --brand-deep: #7e2f17;
  --navy: #122033;
  --navy-soft: #1d314b;
  --mint: #daf4e5;
  --rose: #ffe2d8;
  --gold: #fff1bf;
  --danger: #bf2642;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(197, 83, 49, 0.1), transparent 22%),
    radial-gradient(circle at top right, rgba(18, 32, 51, 0.08), transparent 24%),
    linear-gradient(180deg, #f7efe8 0, #f6f8fc 17rem, var(--bg) 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero,
.control-section,
.pricing-section,
.economics-section,
.workflow-section {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.hero {
  padding: 24px 28px 20px;
}

.control-section,
.pricing-section,
.economics-section,
.workflow-section {
  padding: 24px 28px 28px;
}

.topbar,
.brand-block,
.topbar-links,
.hero-grid,
.hero-actions,
.metric-grid,
.signal-strip,
.auth-shell,
.dashboard-tabs,
.dashboard-grid,
.dashboard-grid-saheli,
.board-grid,
.inline-fields,
.session-badges,
.pill-row,
.pricing-grid,
.economics-grid,
.workflow-grid,
.earnings-grid,
.ops-actions,
.metric-mini-grid,
.list-meta,
.list-actions {
  display: flex;
}

.topbar,
.card-heading {
  justify-content: space-between;
}

.topbar,
.hero-actions,
.metric-grid,
.signal-strip,
.auth-shell,
.dashboard-tabs,
.dashboard-grid,
.dashboard-grid-saheli,
.board-grid,
.inline-fields,
.session-badges,
.pill-row,
.pricing-grid,
.economics-grid,
.workflow-grid,
.earnings-grid,
.ops-actions,
.metric-mini-grid,
.list-meta,
.list-actions {
  gap: 16px;
}

.topbar {
  align-items: center;
  margin-bottom: 24px;
}

.brand-block {
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
}

.eyebrow,
.section-tag,
.card-label,
.panel-label,
.pricing-audience,
.signal-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.06;
}

h1 {
  font-size: 1.18rem;
}

h2 {
  margin: 10px 0 14px;
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

h3 {
  margin: 8px 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

h4 {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.95rem;
}

p,
li,
label,
input,
select,
textarea,
button,
a {
  font-size: 0.96rem;
  line-height: 1.6;
}

.topbar-links {
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.topbar-links a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
}

.topbar-links a,
.primary-btn,
.secondary-btn,
.dashboard-tab,
.action-btn,
.file-input {
  transition: all 180ms ease;
}

.topbar-links a:hover,
.primary-btn:hover,
.secondary-btn:hover,
.dashboard-tab:hover,
.action-btn:hover,
.file-input:hover {
  transform: translateY(-1px);
}

.hero-grid {
  align-items: stretch;
}

.hero-copy,
.hero-card {
  flex: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.hero-text,
.section-heading p:last-child,
.output-copy,
.list-card p,
.stage-card p,
.kit-card p,
.session-checklist article p,
.economy-card p,
.workflow-card p,
.cred-list p {
  color: var(--muted);
}

.hero-actions {
  margin: 20px 0 18px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.dashboard-tab,
.action-btn,
.file-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}

.primary-btn {
  padding: 12px 18px;
  border: 1px solid transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 10px 24px rgba(126, 47, 23, 0.2);
}

.secondary-btn,
.dashboard-tab,
.action-btn,
.file-input {
  padding: 11px 16px;
  border: 1px solid var(--line);
  color: var(--navy);
  background: #fff;
}

.danger-btn {
  color: #fff;
  border-color: transparent;
  background: var(--danger);
}

.hero-points,
.pricing-card ul {
  margin: 0;
  padding-left: 18px;
}

.hero-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  color: #f5f7fb;
  background: linear-gradient(160deg, var(--navy) 0%, #244560 100%);
}

.metric-grid,
.signal-strip,
.pricing-grid,
.economics-grid,
.workflow-grid,
.earnings-grid,
.auth-shell,
.metric-mini-grid {
  flex-wrap: wrap;
}

.metric-grid {
  margin: 16px 0;
}

.metric-grid article,
.signal-strip article,
.earnings-grid article,
.metric-mini-grid article {
  flex: 1 1 160px;
  padding: 18px;
  border-radius: 18px;
}

.metric-grid article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.metric-grid span,
.economy-card span,
.workflow-card span,
.metric-mini-grid strong {
  display: inline-block;
  margin-bottom: 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
}

.hero-card-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
}

.signal-strip article {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.signal-strip strong {
  display: block;
  margin-top: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 22px;
}

.console-card,
.pricing-card,
.economy-card,
.workflow-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.auth-shell {
  align-items: stretch;
}

.auth-card {
  flex: 1.05;
  background: linear-gradient(180deg, #fff 0%, #fffaf7 100%);
}

.session-card,
.operations-card {
  flex: 0.95;
}

.operations-card {
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.session-checklist,
.stage-list,
.card-list,
.kit-list,
.cred-list {
  display: grid;
  gap: 12px;
}

.session-checklist article,
.stage-card,
.list-card,
.kit-card,
.cred-list article {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.cred-list article h6 {
  margin-bottom: 6px;
}

.cred-list p {
  display: grid;
  gap: 2px;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.84rem;
}

.dashboard-tabs {
  margin: 26px 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-2);
  flex-wrap: wrap;
}

.dashboard-tab {
  flex: 1 1 180px;
  border: 0;
  background: transparent;
}

.dashboard-tab.is-active {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 8px 20px rgba(18, 32, 51, 0.18);
}

.dashboard-panel {
  display: none;
}

.dashboard-panel.is-active {
  display: block;
  animation: rise 220ms ease;
}

.dashboard-grid,
.dashboard-grid-saheli,
.board-grid {
  align-items: flex-start;
}

.dashboard-grid > *,
.dashboard-grid-saheli > *,
.board-grid > * {
  flex: 1 1 0;
}

.form-card {
  display: grid;
  gap: 8px;
}

label {
  margin-top: 4px;
  font-weight: 800;
  color: var(--navy);
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d9deea;
  font: inherit;
  color: var(--text);
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(197, 83, 49, 0.12);
  border-color: rgba(197, 83, 49, 0.45);
}

.inline-fields {
  align-items: flex-start;
}

.inline-fields > div {
  flex: 1;
}

.wide-btn {
  width: 100%;
  margin-top: 8px;
}

.status-pill,
.soft-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill,
.soft-pill {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill {
  color: #17603c;
  background: var(--mint);
}

.soft-pill {
  color: var(--brand-deep);
  background: var(--rose);
}

.mini-pill {
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--navy);
  background: #eef2f7;
}

.mini-pill.good {
  background: var(--mint);
}

.mini-pill.warn {
  background: #ffe7c2;
}

.mini-pill.placed {
  background: var(--gold);
}

.pill-row,
.list-meta,
.list-actions,
.ops-actions {
  flex-wrap: wrap;
}

.ops-actions {
  margin-bottom: 16px;
}

.action-btn {
  padding: 10px 14px;
}

.action-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.file-input {
  position: relative;
  overflow: hidden;
}

.file-input input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.toast {
  min-height: 24px;
  margin-bottom: 12px;
  color: var(--brand-deep);
  font-weight: 800;
}

.metric-mini-grid article {
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.metric-mini-grid strong {
  font-size: 1.15rem;
}

.list-card h5,
.stage-card h6,
.kit-card h6 {
  margin-bottom: 6px;
}

.list-card a {
  color: var(--navy-soft);
  font-weight: 700;
  word-break: break-all;
}

.empty-state {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed #cdd5df;
  color: var(--muted);
  background: var(--panel-2);
}

.earnings-grid article {
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.earnings-grid strong {
  display: block;
  margin-top: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
}

.pricing-card,
.economy-card,
.workflow-card {
  flex: 1 1 260px;
}

.pricing-card.featured {
  background: linear-gradient(180deg, #fff9f2 0%, #fff 100%);
}

.control-section.is-locked .dashboard-tabs,
.control-section.is-locked .dashboard-panels,
.control-section.is-locked .operations-card,
.control-section.is-locked .session-card {
  opacity: 0.32;
  pointer-events: none;
  user-select: none;
}

body.authenticated .hero {
  padding: 18px 24px;
}

body.authenticated .hero-copy h2,
body.authenticated .hero-copy .hero-text,
body.authenticated .hero-copy .hero-points,
body.authenticated .hero-copy .hero-actions,
body.authenticated .signal-strip {
  display: none;
}

body.authenticated .hero-grid {
  align-items: center;
}

body.authenticated .hero-copy {
  justify-content: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .hero-grid,
  .dashboard-grid,
  .dashboard-grid-saheli,
  .board-grid,
  .auth-shell {
    flex-direction: column;
  }

  h2 {
    max-width: 14ch;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 1380px);
    padding-top: 10px;
  }

  .hero,
  .control-section,
  .pricing-section,
  .economics-section,
  .workflow-section {
    padding: 18px;
    border-radius: 22px;
  }

  .topbar,
  .inline-fields,
  .hero-actions,
  .dashboard-tabs,
  .ops-actions,
  .topbar-links {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .secondary-btn,
  .dashboard-tab,
  .action-btn,
  .file-input {
    width: 100%;
  }

  .topbar {
    margin-bottom: 18px;
  }
}
