/* ============================================================
   Pathwise — premium B2B attribution analytics
   Aesthetic: clean light dashboard, deep indigo accent,
   editorial display type, dense-but-readable data viz.
   ============================================================ */

:root {
  /* core palette */
  --bg:        #f6f7fb;
  --surface:   #ffffff;
  --surface-2: #fbfcfe;
  --ink:       #0f1226;
  --ink-soft:  #3a3f5c;
  --muted:     #6b7193;
  --faint:     #626987;
  --line:      #e7e9f4;
  --line-soft: #eef0f8;

  /* brand */
  --indigo:    #4f46e5;
  --indigo-600:#4338ca;
  --indigo-700:#3730a3;
  --indigo-50: #eef0ff;
  --indigo-glow: rgba(79,70,229,.18);

  /* channel hues */
  --c-google:  #4f7cff;
  --c-meta:    #7c5cff;
  --c-tiktok:  #13c2c2;
  --c-email:   #f59e0b;
  --c-organic: #22c55e;

  /* semantic */
  --up:   #08783a;
  --down: #e11d48;
  --warn: #984900;

  --shadow-sm: 0 1px 2px rgba(16,18,38,.04), 0 1px 1px rgba(16,18,38,.03);
  --shadow-md: 0 4px 18px -6px rgba(16,18,38,.12), 0 2px 6px -2px rgba(16,18,38,.06);
  --shadow-lg: 0 24px 60px -20px rgba(16,18,38,.28), 0 8px 24px -12px rgba(16,18,38,.14);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.45;
}

/* atmospheric backdrop */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(1100px 600px at 78% -8%, rgba(79,70,229,.07), transparent 60%),
    radial-gradient(900px 500px at -5% 10%, rgba(124,92,255,.05), transparent 55%);
  pointer-events: none; z-index: 0;
}

::selection { background: var(--indigo); color: #fff; }

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid rgba(79,70,229,.42); outline-offset: 3px; }

/* ---------- layout shell ---------- */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #14152b 0%, #1a1b38 100%);
  color: #c7c9e6;
  padding: 22px 16px;
  border-right: 1px solid rgba(255,255,255,.05);
}

.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 8px 22px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--indigo) 0%, #7c5cff 100%);
  box-shadow: 0 6px 18px -4px var(--indigo-glow), inset 0 1px 0 rgba(255,255,255,.25);
  position: relative; overflow: hidden;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-mark:has(img) { background: #fff; }
.brand-name {
  font-family: var(--display);
  font-weight: 600; font-size: 20px; letter-spacing: -.02em;
  color: #fff;
}
.brand-name .dot { color: #8b7cff; }

.nav-group-label {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: #9699bd; font-weight: 700;
  padding: 16px 10px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 10px;
  color: #b9bce0; font-weight: 500; font-size: 13.5px;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(79,70,229,.32), rgba(79,70,229,.08));
  color: #fff;
}
.nav-item.active::before {
  content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px; background: #8b7cff;
}
.nav-item .badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  background: #2bd47d; color: #06210f; border-radius: 20px;
  padding: 2px 7px; line-height: 1.2;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 14px;
}
.workspace {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 12px;
  background: rgba(255,255,255,.04);
}
.ws-avatar {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg,#9a4d00,#b91c1c);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
}
.ws-meta b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.ws-meta span { font-size: 11.5px; color: #8b8eb8; }

/* ---------- main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 30px;
  background: rgba(246,247,251,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.page-title h1 {
  font-family: var(--display);
  font-weight: 560; font-size: 25px; letter-spacing: -.025em;
  margin: 0; line-height: 1.1;
}
.page-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 8px 12px; width: 230px;
  box-shadow: var(--shadow-sm); color: var(--muted);
}
.search svg { width: 15px; height: 15px; }
.search input { border: 0; outline: 0; background: 0; font-size: 13px; flex: 1; color: var(--ink); }
.search kbd {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
}

.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-soft); box-shadow: var(--shadow-sm);
  transition: .15s; position: relative;
}
.icon-btn:hover { border-color: var(--indigo); color: var(--indigo); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .ping {
  position: absolute; top: 8px; right: 9px; width: 7px; height: 7px;
  background: var(--down); border-radius: 50%; border: 2px solid var(--surface);
}

/* date range selector */
.daterange {
  display: flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 3px; box-shadow: var(--shadow-sm);
}
.daterange button {
  border: 0; background: 0; padding: 7px 13px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: .15s; white-space: nowrap;
}
.daterange button:hover { color: var(--ink); }
.daterange button.active {
  background: var(--ink); color: #fff;
  box-shadow: 0 2px 8px -2px rgba(16,18,38,.4);
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--indigo); color: #fff; border: 0;
  padding: 9px 15px; border-radius: 11px; font-weight: 600; font-size: 13px;
  box-shadow: 0 6px 16px -5px var(--indigo-glow); transition: .15s;
}
.btn-primary:hover { background: var(--indigo-600); transform: translateY(-1px); }
.btn-primary svg { width: 15px; height: 15px; }

/* ---------- content ---------- */
.content { padding: 24px 30px 60px; }
.view { display: none; animation: viewIn .4s cubic-bezier(.16,1,.3,1); }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin: 4px 0 14px;
}
.section-head h2 {
  font-family: var(--display); font-weight: 540; font-size: 18px;
  letter-spacing: -.02em; margin: 0;
}
.section-head p { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }

/* ---------- KPI cards ---------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 15px 16px 12px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: .2s; cursor: default;
}
.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #dcdef0; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.kpi-ico {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--indigo-50); color: var(--indigo);
}
.kpi-ico svg { width: 15px; height: 15px; }
.kpi-value {
  font-family: var(--display); font-weight: 560; font-size: 26px;
  letter-spacing: -.03em; margin: 9px 0 5px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi-foot { display: flex; align-items: center; gap: 8px; }
.delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px;
}
.delta svg { width: 11px; height: 11px; }
.delta.up { color: var(--up); background: rgba(22,163,74,.1); }
.delta.down { color: var(--down); background: rgba(225,29,72,.1); }
.kpi-foot .vs { font-size: 11px; color: var(--faint); }
.kpi-spark { position: absolute; right: 10px; bottom: 8px; width: 70px; height: 26px; opacity: .9; }

/* ---------- panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
}
.panel-head h3 {
  font-family: var(--display); font-weight: 540; font-size: 16px;
  letter-spacing: -.02em; margin: 0;
}
.panel-head .sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.panel-body { padding: 0 20px 18px; }

.grid-2 { display: grid; grid-template-columns: 1.62fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* legend chips */
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; }

/* segmented toggle */
.seg {
  display: inline-flex; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 3px;
}
.seg button {
  border: 0; background: 0; padding: 6px 13px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); transition: .15s;
}
.seg button.active { background: var(--surface); color: var(--indigo); box-shadow: var(--shadow-sm); }

/* ---------- chart helpers ---------- */
.chart-wrap { position: relative; width: 100%; }
.area-chart, .svg-chart { display: block; width: 100%; }
.tip {
  position: absolute; pointer-events: none; opacity: 0;
  background: var(--ink); color: #fff; border-radius: 10px;
  padding: 9px 11px; font-size: 12px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -112%); transition: opacity .12s; z-index: 30;
  white-space: nowrap; line-height: 1.5;
}
.tip b { font-family: var(--mono); font-weight: 600; }
.tip .tip-date { color: #b9bce0; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 3px; }
.tip .tip-row { display: flex; align-items: center; gap: 7px; }
.tip .tip-row i { width: 8px; height: 8px; border-radius: 2px; }

/* ---------- channel breakdown rows ---------- */
.chan-row {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.chan-row:last-child { border-bottom: 0; }
.chan-glyph {
  width: 26px; height: 26px; border-radius: 8px; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.chan-name { font-weight: 600; font-size: 13px; }
.chan-bar { height: 6px; border-radius: 4px; background: var(--line-soft); margin-top: 5px; overflow: hidden; }
.chan-bar > i { display: block; height: 100%; border-radius: 4px; transition: width .6s cubic-bezier(.16,1,.3,1); }
.chan-vals { text-align: right; font-variant-numeric: tabular-nums; }
.chan-glyph, .fl-ico { box-shadow: inset 0 0 0 999px rgba(0,0,0,.36); }
.chan-vals b { font-size: 13.5px; font-weight: 700; }
.chan-vals span { display: block; font-size: 11px; color: var(--muted); }

/* ---------- tables ---------- */
.table-tools { display: flex; gap: 10px; align-items: center; padding: 14px 20px; flex-wrap: wrap; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: .15s;
}
.filter-pill:hover { color: var(--ink); }
.filter-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.table-search {
  margin-left: auto; display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; background: var(--surface);
}
.table-search svg { width: 14px; height: 14px; color: var(--faint); }
.table-search input { border: 0; outline: 0; background: 0; font-size: 13px; width: 150px; }

.dtable { width: 100%; border-collapse: collapse; }
.dtable thead th {
  text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 9px 16px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--surface-2); user-select: none; white-space: nowrap;
}
.dtable thead th.num { text-align: right; }
.dtable thead th.sortable { cursor: pointer; }
.dtable thead th.sortable:hover { color: var(--ink); }
.dtable th .arrow { opacity: 0; font-size: 9px; margin-left: 3px; }
.dtable th.sorted .arrow { opacity: 1; color: var(--indigo); }
.dtable tbody tr { transition: background .12s; cursor: pointer; }
.dtable tbody tr:hover { background: var(--indigo-50); }
.dtable tbody td {
  padding: 13px 16px; border-bottom: 1px solid var(--line-soft);
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.dtable td.num { text-align: right; font-weight: 600; }
.cmp-cell { display: flex; align-items: center; gap: 11px; }
.cmp-cell .chan-glyph { width: 30px; height: 30px; border-radius: 9px; }
.cmp-cell b { font-weight: 600; font-size: 13.5px; display: block; }
.cmp-cell span { font-size: 11.5px; color: var(--muted); }
.spark-cell svg { width: 78px; height: 26px; vertical-align: middle; }

.status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status.Active   { color: var(--up);   background: rgba(22,163,74,.1); }
.status.Active::before { background: var(--up); }
.status.Paused   { color: var(--muted); background: #eef0f8; }
.status.Paused::before { background: var(--muted); }
.status.Ended { color: var(--warn); background: rgba(152,73,0,.12); }
.status.Ended::before { background: var(--warn); }

.roas-tag { font-weight: 700; }
.roas-good { color: var(--up); }
.roas-mid  { color: var(--warn); }
.roas-bad  { color: var(--down); }

/* ---------- attribution ---------- */
.attr-bars { display: flex; flex-direction: column; gap: 14px; }
.attr-bar-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 14px; align-items: center; }
.attr-bar-row .lbl { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.attr-track { height: 30px; background: var(--line-soft); border-radius: 9px; overflow: hidden; position: relative; }
.attr-fill {
  height: 100%; border-radius: 9px; display: flex; align-items: center; padding-left: 11px;
  color: #fff; font-weight: 700; font-size: 12.5px;
  transition: width .7s cubic-bezier(.16,1,.3,1); min-width: 2px;
}
.attr-pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }

/* funnel */
.funnel { display: flex; flex-direction: column; gap: 3px; padding-top: 6px; }
.funnel-stage {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 13px; align-items: center;
}
.funnel-stage .fl { display: flex; align-items: center; gap: 9px; }
.funnel-stage .fl-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.funnel-stage .fl-ico svg { width: 15px; height: 15px; }
.funnel-stage .stage-name { font-weight: 600; font-size: 13.5px; }
.funnel-track { background: var(--line-soft); border-radius: 10px; height: 40px; overflow: hidden; }
.funnel-bar {
  height: 100%; border-radius: 10px;
  transition: width .7s cubic-bezier(.16,1,.3,1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.funnel-stage .stage-count { font-family: var(--mono); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.funnel-drop {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--muted); padding: 2px 0 2px 105px; font-weight: 600;
}
.funnel-drop .cvr { color: var(--indigo); font-weight: 700; }
.funnel-drop .lost { color: var(--down); }

.journey { display: flex; flex-direction: column; gap: 11px; }
.journey-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px;
  background: var(--surface-2);
}
.journey-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.journey-head b { font-size: 13px; }
.journey-head .val { font-family: var(--mono); font-weight: 600; color: var(--up); font-size: 13px; }
.touchline { display: flex; align-items: center; gap: 0; }
.touch {
  display: flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.touch .tdot { width: 8px; height: 8px; border-radius: 50%; }
.touch-arrow { flex: 1; height: 2px; min-width: 14px; background: repeating-linear-gradient(90deg,var(--faint) 0 4px,transparent 4px 8px); margin: 0 2px; }

/* ---------- live feed ---------- */
.feed-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.feed-list { display: flex; flex-direction: column; }
.feed-item {
  display: flex; align-items: center; gap: 13px; padding: 13px 20px;
  border-bottom: 1px solid var(--line-soft); position: relative;
}
.feed-item.fresh { animation: feedIn .55s cubic-bezier(.16,1,.3,1); }
@keyframes feedIn {
  from { opacity: 0; transform: translateX(-14px); background: var(--indigo-50); }
  to   { opacity: 1; transform: none; }
}
.feed-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  flex-shrink: 0; color: #fff; position: relative;
}
.feed-ico svg { width: 18px; height: 18px; }
.feed-main { flex: 1; min-width: 0; }
.feed-main .ft { font-size: 13.5px; font-weight: 600; }
.feed-main .ft .who { color: var(--indigo); }
.feed-main .fm { font-size: 12px; color: var(--muted); margin-top: 1px; display: flex; align-items: center; gap: 7px; }
.feed-chan { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.feed-chan i { width: 7px; height: 7px; border-radius: 2px; }
.feed-val {
  font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--up);
  background: rgba(22,163,74,.09); padding: 3px 9px; border-radius: 8px; white-space: nowrap;
}
.feed-time { font-size: 11px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2bd47d; position: relative;
}
.pulse-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  background: #2bd47d; opacity: .45; animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.7); opacity: .5; } 100% { transform: scale(2.4); opacity: 0; } }

.live-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }

.feed-stat { text-align: center; padding: 16px; }
.feed-stat .big { font-family: var(--display); font-size: 30px; font-weight: 560; letter-spacing: -.03em; }
.feed-stat .lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ---------- reports ---------- */
.reports-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.report-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 20px; box-shadow: var(--shadow-sm); transition: .2s; position: relative; overflow: hidden;
}
.report-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent, var(--indigo));
}
.report-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.report-card h3 { font-family: var(--display); font-weight: 540; font-size: 17px; margin: 0 0 5px; letter-spacing: -.02em; }
.report-card p { color: var(--muted); font-size: 13px; margin: 0 0 16px; line-height: 1.5; }
.report-meta { display: flex; gap: 18px; }
.report-meta .rm { }
.report-meta .rm .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; }
.report-meta .rm .v { font-size: 13px; font-weight: 600; margin-top: 2px; }
.report-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.report-foot .cadence { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.report-foot .cadence svg { width: 14px; height: 14px; }
.report-foot .updated { font-size: 11.5px; color: var(--faint); }

/* ---------- campaign detail modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(15,18,38,.5); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 30px;
}
.overlay.open { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--r-xl); width: min(720px, 100%);
  max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg);
  animation: modalIn .35s cubic-bezier(.16,1,.3,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 0; }
.modal-head .x { margin-left: auto; }
.modal-head h2 { font-family: var(--display); font-weight: 540; font-size: 21px; margin: 0; letter-spacing: -.02em; }
.modal-head .mh-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.modal-body { padding: 18px 24px 24px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 18px; }
.mini-kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 13px; }
.mini-kpi .k { font-size: 11px; color: var(--muted); font-weight: 600; }
.mini-kpi .v { font-family: var(--display); font-size: 21px; font-weight: 560; letter-spacing: -.02em; margin-top: 5px; font-variant-numeric: tabular-nums; }

.report-tag {
  position: absolute; top: 14px; right: 14px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--indigo);
  background: var(--indigo-50); border-radius: 6px; padding: 3px 7px;
}
.report-desc { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.report-window-note {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 11px; margin-bottom: 16px;
}
.report-window-note svg { width: 14px; height: 14px; }
.report-kpis { grid-template-columns: repeat(4,1fr); }
.report-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; margin-top: 5px; }
.report-delta svg { width: 12px; height: 12px; }
.report-delta.up { color: var(--up); }
.report-delta.down { color: var(--down); }
.report-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 9px 14px; cursor: pointer; transition: .15s;
}
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-ghost svg { width: 15px; height: 15px; }

/* report builder form */
.report-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; outline: 0; transition: .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-glow); background: var(--surface); }
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: .15s; }
.swatch.active { border-color: var(--ink); transform: scale(1.08); }

/* ---------- popovers (notifications + account) ---------- */
.popwrap { position: relative; }
.popover {
  position: absolute; z-index: 60; min-width: 320px; max-width: 360px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 6px; display: none;
  animation: popIn .18s cubic-bezier(.16,1,.3,1);
}
.popover.open { display: block; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.notif-pop { top: calc(100% + 10px); right: 0; }
.account-pop { bottom: calc(100% + 10px); left: 0; min-width: 248px; }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px; }
.pop-head b { font-size: 14px; font-weight: 700; color: var(--ink); }
.pop-muted { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.pop-link { font-size: 12px; font-weight: 600; color: var(--indigo); background: 0; border: 0; cursor: pointer; }
.pop-link:hover { text-decoration: underline; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left;
  background: 0; border: 0; border-radius: 11px; padding: 10px; cursor: pointer; position: relative; transition: .12s;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.read { opacity: .58; }
.notif-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.notif-ico svg { width: 15px; height: 15px; color: #fff; }
.notif-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-text b { font-size: 13px; font-weight: 600; color: var(--ink); }
.notif-text > span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.notif-ago { font-size: 10.5px; color: var(--faint) !important; margin-top: 2px; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); flex: 0 0 auto; margin-top: 6px; }

.acct-info { padding: 4px 12px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.acct-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 12.5px; color: var(--muted); }
.acct-row b { color: var(--ink); font-weight: 600; }
.acct-menu { display: flex; flex-direction: column; }
.acct-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: 0; border: 0; border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; transition: .12s;
}
.acct-item:hover { background: var(--surface-2); color: var(--ink); }
.acct-item.danger { color: var(--down); }
.acct-item.danger:hover { background: rgba(225,29,72,.07); }
.acct-item svg { width: 15px; height: 15px; }

/* account button (was static .workspace) */
.workspace { width: 100%; border: 0; cursor: pointer; transition: .15s; }
.workspace:hover { background: rgba(255,255,255,.08); }
.workspace .ws-meta { text-align: left; }
.ws-caret { width: 16px; height: 16px; color: #8b8eb8; margin-left: auto; flex: 0 0 auto; }

/* ---------- global search dropdown ---------- */
.search { position: relative; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 320px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60;
  animation: popIn .16s cubic-bezier(.16,1,.3,1);
}
.search-results.open { display: block; }
.sr-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: 0; border: 0; border-radius: 10px; padding: 9px 10px; cursor: pointer; transition: .12s;
}
.sr-item:hover { background: var(--surface-2); }
.sr-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--indigo-50); color: var(--indigo); flex: 0 0 auto; }
.sr-ico svg { width: 15px; height: 15px; }
.sr-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.sr-text b { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-text > span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-kind { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--faint); background: var(--surface-2); border-radius: 5px; padding: 2px 6px; flex: 0 0 auto; }
.sr-empty { padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }

/* toast */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; animation: toastIn .4s cubic-bezier(.16,1,.3,1);
}
.toast svg { width: 17px; height: 17px; color: #2bd47d; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* mobile menu */
.menu-btn { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .feed-layout { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90; width: 256px;
    transform: translateX(-110%); transition: transform .3s cubic-bezier(.16,1,.3,1);
  }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: grid; }
  .search { display: none; }
  .grid-2b { grid-template-columns: 1fr; }
  .mini-kpis { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 12px 16px; gap: 10px; }
  /* keep every topbar control reachable: title shrinks, actions stay pinned right */
  .page-title { min-width: 0; flex: 1; }
  .page-title h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-title p { display: none; }
  .topbar-actions { gap: 6px; flex: 0 0 auto; }
  .daterange { overflow-x: auto; }
  .daterange button { padding: 7px 9px; font-size: 12px; }
  /* Export collapses to an icon-only button on phones */
  .btn-primary#export-top { padding: 9px 11px; font-size: 0; gap: 0; }
  .btn-primary#export-top svg { margin: 0; }
  .notif-pop, .search-results { right: 8px; left: auto; min-width: 280px; max-width: calc(100vw - 16px); }
  .attr-bar-row { grid-template-columns: 84px 1fr 50px; }
}

/* ---------- workspace revenue-goal pacing banner ---------- */
.ws-goal { padding: 16px 20px; margin-bottom: 16px; }
.ws-goal-head { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.ws-goal-ico {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--indigo-50); color: var(--indigo);
}
.ws-goal-ico svg { width: 18px; height: 18px; }
.ws-goal-title { font-weight: 600; font-size: 14px; }
.ws-goal-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.ws-goal-badge {
  margin-left: auto; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 20px; white-space: nowrap;
}
.ws-goal-badge.good { color: var(--up); background: rgba(22,163,74,.1); }
.ws-goal-badge.warn { color: var(--warn); background: rgba(217,119,6,.12); }
.ws-goal-track { height: 9px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.ws-goal-track > i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--indigo), #7c5cff);
  transition: width .8s cubic-bezier(.16,1,.3,1);
}
/* account-menu anchor variant */
a.acct-item { text-decoration: none; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d4d7ec; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #bcc0e0; }

/* ===== AI insights panel ===== */
.ai-panel { margin-bottom: 18px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.ai-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--indigo), #7c5cff, #13c2c2); }
.ai-panel .panel-head h3 { display: inline-flex; align-items: center; gap: 7px; }
.ai-panel .panel-head h3 svg { width: 16px; height: 16px; color: var(--indigo); }
.ai-empty { color: var(--muted); font-size: 13.5px; }
.ai-loading { display: flex; align-items: center; gap: 9px; color: var(--indigo); font-size: 13.5px; font-weight: 500; }
.ai-loading svg { width: 16px; height: 16px; animation: aiPulse 1.1s ease-in-out infinite; }
@keyframes aiPulse { 0%,100% { opacity: .35; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
.ai-error { display: flex; align-items: center; gap: 9px; color: var(--warn); font-size: 13.5px; }
.ai-error svg { width: 16px; height: 16px; flex: none; }
.ai-err-note { font-size: 12px; color: var(--warn); background: rgba(217,119,6,.09); padding: 7px 10px; border-radius: 8px; margin-bottom: 12px; }
.ai-summary { font-size: 14px; line-height: 1.55; color: var(--ink, #1c2030); margin-bottom: 14px; }
.ai-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ai-rec { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.ai-rec-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
.ai-rec-top b { font-size: 13.5px; }
.ai-rec-detail { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ai-impact { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; flex: none; }
.ai-impact.up { color: var(--up); background: rgba(22,163,74,.12); }
.ai-impact.warn { color: var(--warn); background: rgba(217,119,6,.12); }
.ai-impact.muted { color: var(--muted); background: rgba(107,113,147,.12); }
.ai-ask { display: flex; gap: 8px; padding: 0 20px 16px; }
.ai-ask input { flex: 1; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13.5px; background: var(--surface); color: inherit; }
.ai-ask input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-glow); }
.ai-ask .btn-primary { flex: none; }
.ai-answer { margin: 0 20px 18px; padding: 13px 15px; background: var(--indigo-50); border: 1px solid var(--line); border-radius: 10px; }
.ai-answer .ai-q { font-size: 12px; font-weight: 600; color: var(--indigo); margin-bottom: 6px; }
.ai-answer .ai-a { font-size: 13.5px; line-height: 1.55; }

/* ============================================================
   Entered-data UI: empty states, data entry, dual bars, helpers
   ============================================================ */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 28px; }
.empty-state .empty-ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--indigo-50); color: var(--indigo); }
.empty-state .empty-ico svg { width: 28px; height: 28px; }
.empty-state h3 { margin: 4px 0 0; font-family: 'Fraunces', serif; font-size: 21px; font-weight: 560; color: var(--ink); }
.empty-state p { margin: 0; max-width: 460px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.empty-state .empty-cta { margin-top: 8px; }

.mini-note { font-size: 13px; color: var(--muted); line-height: 1.55; padding: 10px 0; }
.mini-note b { color: var(--ink); }

/* dual bars (revenue vs spend per channel) */
.dual-bar { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.dual-bar:last-child { border-bottom: none; }
.dual-bar-name { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.dual-bar-track { position: relative; height: 18px; background: var(--line-soft); border-radius: 6px; margin-bottom: 5px; overflow: hidden; display: flex; align-items: center; }
.dual-bar-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; transition: width .6s cubic-bezier(.16,1,.3,1); }
.dual-bar-track i.rev { background: var(--indigo); }
.dual-bar-track i.spd { background: var(--c-meta); opacity: .8; }
.dual-bar-track span { position: relative; z-index: 1; margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; }

/* data entry forms */
.data-form { display: flex; flex-direction: column; gap: 14px; }
.data-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.data-form-row .field { flex: 1 1 200px; }
.data-form-row .btn-primary { flex: none; }
.import-note { display: flex; gap: 10px; padding: 12px 13px; background: var(--indigo-50); border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.import-note svg { width: 18px; height: 18px; flex: none; color: var(--indigo); }
.import-note code { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }

/* table row actions (client) */
.dtable .row-action { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; transition: .15s; }
.dtable .row-action:hover { border-color: var(--down); color: var(--down); }
.dtable .row-action.edit-ch:hover { border-color: var(--indigo); color: var(--indigo); }
.dtable .row-action svg { width: 15px; height: 15px; }
.sort-button { width: 100%; display: inline-flex; justify-content: inherit; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; text-transform: inherit; letter-spacing: inherit; }
.ai-error .btn-ghost { margin-left: 10px; }

/* ============================================================
   First-run onboarding (gating, skippable, re-runnable)
   ============================================================ */
body.onb-open { overflow: hidden; }
.onb { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.onb[hidden] { display: none; }
.onb-backdrop { position: absolute; inset: 0; background: rgba(15,18,38,.55); backdrop-filter: blur(4px); animation: fade .25s; }
.onb-card {
  position: relative; z-index: 1; width: min(540px, 100%); max-height: 92vh; overflow: auto;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 22px 26px 24px; animation: onbIn .3s cubic-bezier(.16,1,.3,1);
}
@keyframes onbIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.onb-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.onb-progress { display: flex; gap: 6px; }
.onb-dot { width: 22px; height: 5px; border-radius: 3px; background: var(--line); transition: .25s; }
.onb-dot.active { background: var(--indigo); }
.onb-dot.done { background: #b9b6f0; }
.onb-skip { margin-left: auto; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 7px; }
.onb-skip:hover { color: var(--ink); background: var(--surface-2); }
.onb-body { padding: 8px 0 4px; min-height: 220px; }

.onb-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; }
.onb-mark { width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; background: linear-gradient(135deg, var(--indigo), #7c5cff); box-shadow: 0 8px 22px -6px var(--indigo-glow); margin-bottom: 4px; }
.onb-mark svg { width: 28px; height: 28px; }
.onb-mark-done { background: linear-gradient(135deg, #08783a, #05642f); }
.onb-mark-done svg { stroke: #fff; }
.onb-hero h2, .onb-step-head h2 { font-family: 'Fraunces', serif; font-weight: 560; font-size: 24px; letter-spacing: -.02em; margin: 0; color: var(--ink); }
.onb-hero p, .onb-step-head p { margin: 0; max-width: 420px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.onb-points { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 9px; text-align: left; width: 100%; max-width: 400px; }
.onb-points li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-soft); }
.onb-points li svg { width: 17px; height: 17px; flex: none; color: var(--up); }

.onb-step-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.onb-step-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--indigo-50); color: var(--indigo); }
.onb-step-ico svg { width: 22px; height: 22px; }
.onb-field { margin-top: 2px; }
.onb-field input { padding: 12px 14px; font-size: 15px; }

.onb-honest { display: flex; gap: 12px; align-items: flex-start; padding: 14px 15px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.onb-honest svg { width: 20px; height: 20px; flex: none; color: var(--muted); margin-top: 1px; }
.onb-honest b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 3px; }
.onb-honest span { font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.onb-summary { width: 100%; max-width: 400px; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.onb-sum-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.onb-sum-row:last-child { border-bottom: none; }
.onb-sum-row span { color: var(--muted); }
.onb-sum-row b { color: var(--ink); }

.onb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.onb-next { gap: 6px; }
.onb-next svg { width: 15px; height: 15px; transform: rotate(90deg); }

@media (max-width: 560px) {
  .onb { padding: 0; align-items: stretch; }
  .onb-card { width: 100%; max-height: 100vh; border-radius: 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
  .onb-body { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
