:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4f7;
  --text: #111827;
  --muted: #667085;
  --line: #d9e2e8;
  --cyan: #18b7c9;
  --green: #13a36b;
  --amber: #e0a018;
  --red: #d34f4f;
  --ink: #18212f;
  --shadow: 0 18px 50px rgba(24, 33, 47, 0.09);
  --radius: 8px;
  --sidebar-width: 280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  max-width: 100%;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 22px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  background: var(--ink);
  border-radius: 7px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.side-nav a {
  padding: 11px 12px;
  color: var(--muted);
  font-size: 14px;
  border-radius: 7px;
}

.side-nav a:hover,
.side-nav a.is-active {
  color: var(--ink);
  background: var(--surface-soft);
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sidebar-note span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

main {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.section {
  padding: 78px clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.hero-section {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: center;
  background:
    linear-gradient(125deg, rgba(24, 183, 201, 0.08), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f3f8fa 100%);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 670px;
  margin: 26px 0 0;
  color: #475467;
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 750;
  border-radius: 7px;
}

.button.primary {
  color: #ffffff;
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}

.hero-dashboard-card,
.flow-builder,
.campaign-panel,
.analytics-panel,
.integration-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-dashboard-card {
  padding: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: #ffffff;
}

.hero-dashboard-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.panel-topline strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
  text-transform: none;
}

.section-heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 780px);
  gap: 20px;
  align-items: start;
  margin-bottom: 34px;
}

.section-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--cyan);
  font-weight: 850;
  background: #e7f8fa;
  border-radius: 7px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.05;
}

.section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.geo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.flow-builder {
  min-width: 0;
  padding: 18px;
}

.flow-tabs,
.scenario-switcher,
.brand-selector,
.question-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.flow-tab,
.scenario-tab,
.brand-option,
.question-filter {
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.flow-tab:hover,
.scenario-tab:hover,
.brand-option:hover,
.question-filter:hover {
  color: var(--ink);
  border-color: #b8c8d1;
}

.flow-tab.is-active,
.scenario-tab.is-active,
.brand-option.is-active,
.question-filter.is-active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.flow-stage {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 340px;
  margin-top: 18px;
  padding: 22px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.flow-visual {
  position: relative;
  height: 250px;
}

.pulse-node,
.flow-card-node {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 7px;
}

.pulse-node {
  width: 92px;
  height: 92px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  background: var(--cyan);
  box-shadow: 0 0 0 12px rgba(24, 183, 201, 0.12);
}

.pulse-node:nth-child(1) {
  left: 16px;
  top: 18px;
}

.pulse-node:nth-child(2) {
  right: 16px;
  top: 78px;
  background: var(--green);
}

.pulse-node:nth-child(3) {
  left: 52px;
  bottom: 16px;
  background: var(--amber);
}

.flow-card-node {
  width: 150px;
  min-height: 72px;
  padding: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(24, 33, 47, 0.08);
}

.flow-content h3 {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}

.flow-content p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.flow-content ul,
.scenario-points {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.flow-content li,
.scenario-points li {
  position: relative;
  padding-left: 20px;
  color: #475467;
  line-height: 1.45;
}

.flow-content li::before,
.scenario-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 999px;
}

.method-list {
  display: grid;
  gap: 14px;
}

.method-list article {
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.method-icon {
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  background: var(--cyan);
  border-radius: 7px;
}

.geo-icon {
  background: linear-gradient(135deg, var(--cyan), #8ee8ef);
}

.ooh-icon {
  background: linear-gradient(135deg, var(--amber), #f3d172);
}

.crm-icon {
  background: linear-gradient(135deg, var(--green), #8eddbd);
}

.method-list h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.method-list p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.scenarios-section {
  background: #ffffff;
}

.scenario-detail {
  min-width: 0;
  margin-top: 18px;
  padding: 24px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scenario-kicker {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.scenario-detail h3 {
  overflow-wrap: anywhere;
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.12;
}

.scenario-detail p {
  max-width: 920px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.scenario-detail .scenario-points {
  max-width: 920px;
}

.integration-blueprints {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.miro-board {
  display: none;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(rgba(24, 33, 47, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 47, 0.04) 1px, transparent 1px),
    #ffffff;
  background-size: 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(24, 33, 47, 0.06);
}

.miro-board.is-active {
  display: grid;
}

.miro-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.miro-header span {
  flex: 0 0 auto;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  background: var(--ink);
  border-radius: 7px;
}

.miro-header h3 {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.miro-header p {
  max-width: 980px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.miro-flow,
.miro-split-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.miro-step {
  position: relative;
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 150px;
  padding: 16px;
  background: #fffdf3;
  border: 1px solid #eadf9f;
  border-radius: 6px;
  box-shadow: 0 10px 20px rgba(24, 33, 47, 0.08);
  transform: rotate(-0.35deg);
}

.miro-step::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 50%;
  z-index: 1;
  width: 13px;
  height: 3px;
  background: var(--cyan);
}

.miro-step:last-child::after,
.miro-split-flow > .miro-step:last-child::after {
  display: none;
}

.miro-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  background: var(--cyan);
  border-radius: 999px;
}

.miro-step strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.22;
}

.miro-step small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.miro-step:nth-child(even) {
  transform: rotate(0.3deg);
}

.miro-step.is-accent {
  background: #fff3dc;
  border-color: rgba(224, 160, 24, 0.42);
}

.miro-step.is-accent span {
  background: var(--amber);
}

.miro-step.is-target {
  background: #eef9fb;
  border-color: rgba(24, 183, 201, 0.34);
}

.miro-step.is-target span {
  background: var(--green);
}

.miro-split-flow {
  grid-template-columns: minmax(130px, 0.9fr) minmax(240px, 1.35fr) minmax(130px, 0.9fr) minmax(130px, 0.9fr) minmax(130px, 0.9fr);
  align-items: stretch;
}

.miro-branch {
  position: relative;
  display: grid;
  gap: 10px;
}

.miro-branch::before,
.miro-branch::after {
  content: "";
  position: absolute;
  left: -12px;
  width: 12px;
  height: 3px;
  background: var(--cyan);
}

.miro-branch::before {
  top: 35px;
}

.miro-branch::after {
  bottom: 35px;
}

.split-lane,
.split-result {
  min-height: 70px;
  padding: 14px;
  border-radius: 7px;
}

.split-lane {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  background: #eef9fb;
  border: 1px solid rgba(24, 183, 201, 0.34);
}

.split-lane.muted {
  background: #f7fafb;
  border-color: var(--line);
}

.split-result {
  display: grid;
  align-content: center;
  gap: 8px;
  color: #ffffff;
  background: var(--ink);
}

.split-lane span,
.split-lane small,
.split-result span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.split-result span {
  color: rgba(255, 255, 255, 0.72);
}

.split-lane strong,
.split-result strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.25;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(280px, 0.95fr);
  gap: 22px;
}

.campaign-panel,
.analytics-panel,
.integration-panel {
  min-width: 0;
  padding: 20px;
}

.campaign-panel {
  grid-row: span 2;
}

.campaign-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.campaign-stats article {
  min-width: 0;
  padding: 12px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.campaign-stats span,
.campaign-stats strong {
  display: block;
}

.campaign-stats span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.campaign-stats strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.funnel {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.funnel div {
  position: relative;
  min-height: 66px;
  overflow: hidden;
  padding: 13px 15px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.funnel div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: linear-gradient(90deg, rgba(24, 183, 201, 0.18), rgba(19, 163, 107, 0.12));
}

.funnel span,
.funnel strong {
  position: relative;
  display: block;
}

.funnel span {
  color: var(--muted);
  font-size: 13px;
}

.funnel strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 24px;
}

.comparison {
  display: grid;
  gap: 18px;
}

.comparison article {
  display: grid;
  gap: 8px;
}

.comparison span {
  color: var(--muted);
  font-size: 13px;
}

.comparison strong {
  color: var(--ink);
  font-size: 22px;
}

.bar {
  height: 13px;
  overflow: hidden;
  background: #e7edf1;
  border-radius: 999px;
}

.bar::before {
  content: "";
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.bar.neutral::before {
  background: var(--amber);
}

.panel-note {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.integration-list {
  display: grid;
  gap: 13px;
}

.integration-list div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #475467;
  line-height: 1.45;
}

.status {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 999px;
}

.status.ok {
  background: var(--green);
}

.status.wait {
  background: var(--amber);
}

.status.risk {
  background: var(--red);
}

.questions-section {
  background: #ffffff;
}

.question-toolbar {
  margin-bottom: 18px;
}

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

.question-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.question-card strong {
  color: var(--ink);
  font-size: 16px;
}

.question-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.question-tag {
  width: fit-content;
  padding: 5px 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  background: #e7f8fa;
  border-radius: 6px;
}

@media (max-width: 1060px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
  }

  .side-nav {
    display: flex;
    flex: 1 1 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .side-nav a {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
  }

  .sidebar-note {
    display: none;
  }

  main {
    margin-left: 0;
  }

  .hero-section,
  .geo-layout,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-section {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  .miro-flow,
  .miro-split-flow,
  .campaign-stats {
    grid-template-columns: 1fr;
  }

  .miro-step::after {
    right: 50%;
    top: auto;
    bottom: -10px;
    width: 2px;
    height: 10px;
  }

  .miro-branch::before,
  .miro-branch::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 42px 14px;
  }

  .sidebar {
    gap: 14px;
    padding: 14px;
  }

  .side-nav {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: 36px;
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .hero-copy p {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.55;
  }

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

  .button {
    width: 100%;
  }

  .hero-dashboard-card {
    padding: 6px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-number {
    width: 38px;
    height: 38px;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .section-heading p {
    font-size: 16px;
  }

  .flow-tabs,
  .scenario-switcher,
  .brand-selector,
  .question-toolbar {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .flow-tab,
  .scenario-tab,
  .brand-option,
  .question-filter {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
  }

  .scenario-detail,
  .flow-builder,
  .miro-board,
  .campaign-panel,
  .analytics-panel,
  .integration-panel {
    padding: 16px;
  }

  .scenario-detail h3 {
    font-size: 26px;
  }

  .questions-grid,
  .flow-stage,
  .miro-flow,
  .miro-split-flow,
  .campaign-stats {
    grid-template-columns: 1fr;
  }

  .flow-stage {
    padding: 16px;
  }

  .miro-board {
    gap: 14px;
  }

  .miro-header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .miro-step {
    min-height: 128px;
    padding: 14px;
  }

  .flow-visual {
    height: 210px;
  }

  .miro-step::after {
    right: 50%;
    top: auto;
    bottom: -10px;
    width: 2px;
    height: 10px;
  }

  .miro-branch::before,
  .miro-branch::after {
    display: none;
  }
}
