:root {
  --bg-1: #f3f7ff;
  --bg-2: #eff5f2;
  --ink: #0d1d33;
  --ink-soft: #51617a;
  --line: rgba(13, 29, 51, 0.14);
  --card: rgba(255, 255, 255, 0.86);
  --card-strong: #ffffff;
  --accent: #1865ff;
  --accent-strong: #0c4aca;
  --accent-alt: #00a87e;
  --danger: #b23a3a;
  --danger-strong: #842727;
  --shadow-soft: 0 18px 44px rgba(23, 52, 93, 0.14);
  --shadow-strong: 0 28px 64px rgba(13, 29, 51, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(24, 101, 255, 0.07), transparent 40%),
    linear-gradient(310deg, rgba(0, 168, 126, 0.08), transparent 42%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 6%, rgba(24, 101, 255, 0.17), transparent 34%),
    radial-gradient(circle at 94% 12%, rgba(0, 168, 126, 0.13), transparent 34%),
    radial-gradient(circle at 84% 88%, rgba(255, 146, 61, 0.11), transparent 34%);
}

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.2rem 1.1rem 4rem;
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
}

.brandmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brandmark-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--accent), var(--accent-alt));
  box-shadow: 0 0 0 6px rgba(24, 101, 255, 0.12);
}

.brandmark strong {
  display: block;
  font-size: 1rem;
  line-height: 1;
}

.brandmark small {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.brandmark a {
  color: var(--accent-strong);
  font-weight: 700;
}

.topbar-note {
  font-size: 0.83rem;
  color: var(--ink-soft);
}

.hero {
  margin-bottom: 1.2rem;
  display: grid;
  gap: 1rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.hero-copy {
  padding: 1.3rem 1.1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.94),
    rgba(255, 255, 255, 0.78)
  );
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--ink-soft);
}

h1 {
  margin: 0.35rem 0 0.55rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.4rem, 6.5vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.subtitle {
  margin: 0;
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.45;
}

.subtitle a {
  color: var(--accent-strong);
  font-weight: 700;
}

.subtitle.small {
  font-size: 0.88rem;
}

.hero-tags {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags span {
  border: 1px solid rgba(24, 101, 255, 0.18);
  background: rgba(24, 101, 255, 0.08);
  color: #184fbd;
  border-radius: 999px;
  padding: 0.35rem 0.67rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-metrics {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.hero-metrics article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.7rem;
}

.hero-metrics strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.hero-metrics span {
  display: block;
  margin-top: 0.24rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

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

.public-stack {
  display: grid;
  gap: 1rem;
}

.public-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-showcase {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.94),
    rgba(235, 245, 255, 0.86)
  );
}

.visual-main {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(13, 29, 51, 0.12);
}

.visual-main img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.visual-tile {
  margin: 0;
  border: 1px solid rgba(13, 29, 51, 0.11);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
}

.visual-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.visual-tile figcaption {
  padding: 0.5rem 0.62rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.photo-credit {
  margin: 0;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.photo-credit a {
  color: var(--accent-strong);
  font-weight: 700;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  backdrop-filter: blur(8px);
  transition: transform 170ms ease, box-shadow 190ms ease;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(23, 52, 93, 0.16);
}

.app-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.app-sidebar {
  position: sticky;
  top: 1rem;
  border: 1px solid rgba(12, 74, 202, 0.24);
  border-radius: 22px;
  background: linear-gradient(170deg, #0d2c67, #0b2554 56%, #0d3a79);
  color: #edf3ff;
  box-shadow: var(--shadow-strong);
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.app-sidebar .eyebrow {
  color: rgba(237, 243, 255, 0.68);
}

.app-sidebar h2 {
  color: #f8fbff;
  margin: 0.3rem 0 0;
  font-size: 1.18rem;
}

.sidebar-meta {
  margin: 0.7rem 0 0;
  color: rgba(237, 243, 255, 0.82);
  font-size: 0.82rem;
  line-height: 1.45;
}

.tab-nav {
  display: grid;
  gap: 0.45rem;
}

.tab-btn {
  width: 100%;
  border: 1px solid rgba(237, 243, 255, 0.22);
  border-radius: 12px;
  background: rgba(237, 243, 255, 0.09);
  color: #f8fbff;
  text-align: left;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 0.58rem 0.7rem;
  cursor: pointer;
  transition: background 180ms ease, transform 150ms ease, border-color 180ms ease;
}

.tab-btn:hover {
  background: rgba(237, 243, 255, 0.16);
}

.tab-btn.is-active {
  border-color: rgba(237, 243, 255, 0.52);
  background: linear-gradient(
    140deg,
    rgba(237, 243, 255, 0.28),
    rgba(237, 243, 255, 0.42)
  );
  transform: translateX(2px);
}

.app-sidebar-foot {
  display: grid;
  gap: 0.5rem;
}

.app-sidebar-foot .btn {
  width: 100%;
}

.app-sidebar-foot .btn.secondary {
  color: #f7fbff;
  background: rgba(237, 243, 255, 0.18);
}

.app-sidebar-foot .btn.secondary:hover {
  background: rgba(237, 243, 255, 0.26);
}

.app-sidebar-foot .btn.danger {
  background: rgba(178, 58, 58, 0.94);
}

.app-main {
  min-width: 0;
}

.status-toast {
  position: sticky;
  top: 0.8rem;
  z-index: 20;
  border: 1px solid rgba(13, 29, 51, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  padding: 0.62rem 0.78rem;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(13, 29, 51, 0.13);
}

.status-toast.success {
  border-color: rgba(0, 168, 126, 0.42);
  background: rgba(230, 249, 243, 0.96);
  color: #0f5a4a;
}

.status-toast.error {
  border-color: rgba(178, 58, 58, 0.36);
  background: rgba(255, 238, 238, 0.95);
  color: #872727;
}

.status-toast.info {
  border-color: rgba(24, 101, 255, 0.38);
  background: rgba(235, 243, 255, 0.96);
  color: #0c4aca;
}

.app-main-header {
  display: grid;
  gap: 1rem;
}

.app-main-header h2 {
  margin: 0.32rem 0 0.5rem;
  font-size: 1.36rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.kpi-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.7rem;
}

.kpi-card span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: var(--ink-soft);
}

.kpi-card strong {
  display: block;
  margin-top: 0.3rem;
  line-height: 1;
  font-size: 1.28rem;
}

.app-tab-panel {
  display: grid;
  gap: 1rem;
}

.quick-actions-card {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.95),
    rgba(240, 248, 255, 0.88)
  );
  border-color: rgba(24, 101, 255, 0.23);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.quick-action {
  text-align: left;
  border: 1px solid rgba(13, 29, 51, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.8rem;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 180ms ease;
}

.quick-action-media {
  display: block;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(13, 29, 51, 0.14);
}

.quick-action-media img {
  display: block;
  width: 100%;
  height: 84px;
  object-fit: cover;
}

.quick-action strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
}

.quick-action span {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.77rem;
  color: var(--ink-soft);
  line-height: 1.42;
}

.quick-action:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 101, 255, 0.34);
  box-shadow: 0 12px 20px rgba(12, 74, 202, 0.12);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.panel-head h2 {
  margin: 0;
}

.wizard-card {
  border-color: rgba(24, 101, 255, 0.22);
  background: linear-gradient(
    165deg,
    rgba(237, 246, 255, 0.92),
    rgba(255, 255, 255, 0.94)
  );
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.wizard-step-indicators {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.wizard-step {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.48rem 0.6rem;
  cursor: pointer;
  transition: background 170ms ease, color 170ms ease, border-color 170ms ease;
}

.wizard-step.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
}

.wizard-panel {
  border: 1px dashed rgba(24, 101, 255, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.73);
  padding: 0.85rem;
  display: grid;
  gap: 0.55rem;
}

.wizard-actions {
  align-items: center;
}

.form-advanced {
  border: 1px dashed rgba(13, 29, 51, 0.2);
  border-radius: 14px;
  padding: 0.7rem 0.75rem;
  background: rgba(255, 255, 255, 0.76);
}

.form-advanced summary {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.template-btn {
  border: 1px solid rgba(13, 29, 51, 0.2);
  border-radius: 999px;
  background: rgba(13, 29, 51, 0.06);
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.44rem 0.72rem;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.template-btn:hover {
  border-color: rgba(24, 101, 255, 0.36);
  background: rgba(24, 101, 255, 0.11);
}

.auth-card {
  background: linear-gradient(
    170deg,
    rgba(255, 255, 255, 0.96),
    rgba(246, 251, 255, 0.86)
  );
  border-radius: 22px;
  box-shadow: var(--shadow-strong);
}

.trust-band {
  background: linear-gradient(
    130deg,
    rgba(12, 74, 202, 0.94),
    rgba(0, 168, 126, 0.86)
  );
  color: #f7fbff;
}

.trust-band .eyebrow {
  color: rgba(247, 251, 255, 0.72);
}

.logo-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.logo-cloud span {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.audience-card {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.94),
    rgba(232, 245, 255, 0.86)
  );
}

.audience-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.audience-column {
  border: 1px solid rgba(13, 29, 51, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.72rem;
}

.audience-column h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
}

.audience-list {
  margin: 0.48rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.36rem;
}

.audience-list li {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.4;
}

.feature-card h2,
.workflow-card h2,
.cta-band h2 {
  margin: 0 0 0.55rem;
}

.feature-card p,
.workflow-card p,
.cta-band p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.workflow-list div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.7rem;
}

.workflow-list strong {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 0.22rem;
}

.workflow-list span {
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.cta-band {
  background: linear-gradient(
    146deg,
    rgba(255, 255, 255, 0.92),
    rgba(233, 244, 255, 0.82)
  );
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.top-space {
  margin-top: 1rem;
}

.stack {
  display: grid;
  gap: 0.65rem;
}

.form-grid {
  display: grid;
  gap: 0.7rem;
}

.form-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

label {
  display: grid;
  gap: 0.36rem;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

details summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(13, 29, 51, 0.2);
  border-radius: 11px;
  padding: 0.63rem 0.72rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 101, 255, 0.18);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.auth-switch .btn.is-active {
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.align-end {
  align-items: end;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(12, 74, 202, 0.25);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.btn.secondary {
  color: var(--ink);
  background: rgba(13, 29, 51, 0.08);
}

.btn.secondary:hover {
  box-shadow: none;
  background: rgba(13, 29, 51, 0.14);
}

.btn.ghost {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid rgba(13, 29, 51, 0.18);
}

.btn.ghost:hover {
  box-shadow: none;
  background: rgba(13, 29, 51, 0.08);
}

.btn.danger {
  background: var(--danger);
}

.btn.danger:hover {
  box-shadow: none;
  background: var(--danger-strong);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(13, 29, 51, 0.1);
  font-size: 0.8rem;
  vertical-align: top;
}

th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.output {
  margin: 0;
  min-height: 3.2rem;
  max-height: 14rem;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(13, 29, 51, 0.11);
  background: rgba(13, 29, 51, 0.05);
  color: #13253e;
  padding: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.45;
}

.output.log {
  max-height: 20rem;
}

.session-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: rise-in 460ms ease forwards;
}

.reveal.delay-1 {
  animation-delay: 70ms;
}

.reveal.delay-2 {
  animation-delay: 130ms;
}

.reveal.delay-3 {
  animation-delay: 190ms;
}

.reveal.delay-4 {
  animation-delay: 240ms;
}

.reveal.delay-5 {
  animation-delay: 300ms;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
  }

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

  .tab-btn {
    text-align: center;
    font-size: 0.77rem;
    padding: 0.52rem;
  }

  .hero-layout,
  .grid,
  .quick-actions-grid,
  .visual-grid,
  .audience-columns,
  .public-grid,
  .workflow-list,
  .form-grid.two-up,
  .form-grid.three-up {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .auth-card {
    padding: 1rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wizard-header,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .wizard-step-indicators {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .session-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  table {
    min-width: 520px;
  }
}

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

  .tab-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wizard-step-indicators {
    grid-template-columns: 1fr;
  }
}
