/* Muhnak client dashboard demo. RTL-first. No borders, no gradients, minimal shadows, max weight 500. */
@font-face { font-family: "Ping"; src: url(../assets/fonts/PingAR+LT-Light.otf) format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Ping"; src: url(../assets/fonts/PingAR+LT-Regular.otf) format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ping"; src: url(../assets/fonts/PingAR+LT-Medium.otf) format("opentype"); font-weight: 500; font-display: swap; }

:root {
  --bg: #FFFFFF; --s1: #F5F6F8; --s2: #ECEFF3; --s3: #E2E6EC;
  --ink: #0B1E3F; --ink2: #56627A; --ink3: #8A94A6;
  --blue: #0A3DE6; --blue-soft: #EEF2FE; --blue-mid: #C9D5FB; --sky: #5DE2F7;
  --bar: #D3D9E3; --bar2: #AEB8C8;
  --r-xs: 12px; --r-s: 20px; --r-m: 28px; --r-l: 40px;
  --sp1: 8px; --sp2: 16px; --sp3: 24px; --sp4: 32px; --sp5: 48px; --sp6: 64px;
  --t-xs: 12px; --t-s: 14px; --t-m: 16px; --t-l: 20px; --t-xl: 24px; --t-2xl: 32px; --t-3xl: 48px;
  --gap: 24px; --pad: 48px; --maxw: 1280px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 12px 32px rgba(11, 30, 63, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "Ping", system-ui, sans-serif; font-weight: 400; font-size: var(--t-s); line-height: 1.6; overflow-x: hidden; font-feature-settings: "tnum" 1; }
body.locked { position: fixed; inset-inline: 0; width: 100%; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; font-weight: 500; }
p { font-weight: 400; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--ink2); }
.faint { color: var(--ink3); }
.blue { color: var(--blue); }
.xs { font-size: var(--t-xs); } .s { font-size: var(--t-s); } .m { font-size: var(--t-m); } .l { font-size: var(--t-l); }
.light { font-weight: 300; } .med { font-weight: 500; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { flex: none; display: block; }
.row { display: flex; align-items: center; gap: var(--sp1); }
.row2 { display: flex; align-items: center; gap: var(--sp2); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp2); }
.stack1 > * + * { margin-top: var(--sp1); } .stack2 > * + * { margin-top: var(--sp2); } .stack3 > * + * { margin-top: var(--sp3); } .stack4 > * + * { margin-top: var(--sp4); } .stack5 > * + * { margin-top: var(--sp5); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
/* No sidebar: light top header (wordmark + store) and one floating frosted-glass bottom bar on every size. */
.app { display: block; min-height: 100vh; min-height: 100dvh; }
.wordmark { font-size: var(--t-xl); font-weight: 500; letter-spacing: 0; line-height: 1; padding-inline: var(--sp2); }
.wordmark small { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--ink3); margin-top: 6px; }
.avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: var(--t-xs); font-weight: 500; flex: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 var(--pad); position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px); }
.topbar .wordmark { padding: 0; }
.store-link { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 8px 0 12px; border-radius: var(--r-xs); transition: background .15s; }
.store-link:hover { background: var(--s1); }
.store-link .sn { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.main { min-width: 0; padding: var(--sp3) var(--pad) calc(128px + env(safe-area-inset-bottom)); }
.page { max-width: var(--maxw); margin-inline: auto; }

/* floating glass bar: centred, content-width on desktop; no border, no gradient, soft shadow, opaque fallback */
.bnav { position: fixed; z-index: 50; left: 0; right: 0; margin-inline: auto; bottom: calc(20px + env(safe-area-inset-bottom)); width: min(560px, calc(100vw - 32px)); height: 64px; padding: 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto repeat(2, minmax(0, 1fr)); align-items: center; gap: 4px; border-radius: 24px; background: rgba(255, 255, 255, .94); box-shadow: 0 8px 28px rgba(11, 30, 63, .10); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bnav { background: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); }
}
.bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 52px; border-radius: 16px; font-size: 11px; color: var(--ink3); transition: background .15s, color .15s; }
.bnav a:hover { color: var(--ink); }
.bnav a.on { color: var(--blue); }
.bnav a.plus { flex-direction: row; gap: var(--sp1); height: 44px; padding: 0 var(--sp2); border-radius: 16px; background: var(--blue); color: #fff; font-size: var(--t-s); font-weight: 500; }
.bnav a.plus:hover { background: #0834C4; }
.bnav a.plus .pbox { display: grid; place-items: center; }

.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.c-2 { grid-column: span 2; } .c-3 { grid-column: span 3; } .c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; } .c-6 { grid-column: span 6; } .c-7 { grid-column: span 7; } .c-8 { grid-column: span 8; } .c-9 { grid-column: span 9; } .c-12 { grid-column: 1 / -1; }

.grid-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 60; display: none; }
.grid-overlay.on { display: block; }
.grid-overlay .inner { position: absolute; top: 0; bottom: 0; inset-inline-start: var(--pad); inset-inline-end: var(--pad); }
.grid-overlay .cols { max-width: var(--maxw); height: 100%; margin-inline: auto; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.grid-overlay .cols i { background: rgba(10, 61, 230, .06); }

/* page head */
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp3); margin-bottom: var(--sp4); flex-wrap: wrap; }
.phead h1 { font-size: var(--t-2xl); font-weight: 500; line-height: 1.25; }
.phead .sub { color: var(--ink2); margin-top: var(--sp1); font-size: var(--t-m); }
.crumbs { display: flex; align-items: center; gap: 4px; color: var(--ink3); font-size: var(--t-s); margin-bottom: var(--sp1); flex-wrap: wrap; }
.crumbs a { color: var(--ink2); } .crumbs a:hover { color: var(--blue); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp1); height: 40px; padding: 0 var(--sp2); border-radius: var(--r-xs); font-size: var(--t-s); font-weight: 500; white-space: nowrap; transition: background .15s, color .15s, transform .15s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn-lg { height: 48px; padding: 0 var(--sp3); font-size: var(--t-m); }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--t-xs); border-radius: 10px; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: #0834C4; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-soft { background: var(--s2); color: var(--ink); } .btn-soft:hover { background: var(--s3); }
.btn-ghost { color: var(--blue); padding: 0 8px; } .btn-ghost:hover { background: var(--blue-soft); }
.btn-plain { color: var(--ink2); padding: 0 8px; } .btn-plain:hover { color: var(--ink); background: var(--s1); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-block { width: 100%; }
.iconbtn { width: 40px; height: 40px; border-radius: var(--r-xs); display: grid; place-items: center; color: var(--ink2); }
.iconbtn:hover { background: var(--s1); color: var(--ink); }

.seg { display: inline-flex; background: var(--s1); border-radius: var(--r-xs); padding: 4px; gap: 4px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 9px; color: var(--ink2); font-size: var(--t-s); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11, 30, 63, .06); }

.chips { display: flex; flex-wrap: wrap; gap: var(--sp1); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px var(--sp2); border-radius: var(--r-xs); background: var(--s1); color: var(--ink); font-size: var(--t-s); transition: background .15s, color .15s; text-align: start; line-height: 1.4; }
.chip:hover { background: var(--s2); }
.chip.on { background: var(--ink); color: #fff; }
.chip .x { opacity: .6; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--s2); color: var(--ink2); font-size: var(--t-xs); white-space: nowrap; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.ink { background: var(--ink); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bar2); display: inline-block; flex: none; }
.dot.blue { background: var(--blue); } .dot.sky { background: var(--sky); }

.field { width: 100%; height: 48px; border: 0; border-radius: var(--r-xs); background: var(--s1); padding: 0 var(--sp2); font-size: var(--t-m); outline: none; transition: box-shadow .15s, background .15s; }
textarea.field { height: auto; min-height: 112px; padding: 12px var(--sp2); resize: vertical; line-height: 1.7; }
.field:focus { background: #fff; box-shadow: 0 0 0 2px var(--blue); }
.field.err { box-shadow: 0 0 0 2px var(--ink); background: #fff; }
.field[dir="ltr"] { text-align: right; }
.label { display: block; font-size: var(--t-s); color: var(--ink2); margin-bottom: var(--sp1); }
.errmsg { font-size: var(--t-xs); color: var(--ink); margin-top: 6px; display: flex; gap: 6px; align-items: center; }

.choice { display: flex; align-items: center; gap: var(--sp2); width: 100%; min-height: 64px; padding: var(--sp2) 20px; border-radius: var(--r-s); background: var(--s1); text-align: start; transition: background .15s, transform .15s; }
.choice:hover { background: var(--s2); }
.choice.on { background: var(--blue-soft); }
.choice .t { font-size: var(--t-m); font-weight: 500; }
.choice .d { font-size: var(--t-s); color: var(--ink2); }
.choice .mark { width: 24px; height: 24px; border-radius: 8px; background: #fff; display: grid; place-items: center; color: transparent; flex: none; }
.choice.on .mark { background: var(--blue); color: #fff; }
.choices { display: grid; gap: var(--sp1); }
.choices.two { grid-template-columns: 1fr 1fr; }

.toggle { width: 44px; height: 26px; border-radius: 13px; background: var(--bar); position: relative; flex: none; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.toggle.on { background: var(--blue); }
.toggle.on::after { transform: translateX(-18px); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: none; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--s2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 8px; background: var(--blue); margin-top: -8px; }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--s2); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 8px; background: var(--blue); border: 0; }

/* ---------- surfaces ---------- */
.card { background: var(--s1); border-radius: var(--r-m); padding: var(--sp3); min-width: 0; }
.card.white { background: #fff; }
.panel { background: var(--s1); border-radius: var(--r-l); padding: var(--sp4); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: var(--sp2); margin-bottom: var(--sp2); min-height: 32px; }
.card-h h2, .card-h h3 { font-size: var(--t-m); font-weight: 500; }
.kpi .lab { font-size: var(--t-s); color: var(--ink2); }
.kpi .val { font-size: var(--t-2xl); font-weight: 300; line-height: 1.2; margin-top: var(--sp1); }
.kpi .val .u { font-size: var(--t-s); color: var(--ink2); margin-inline-start: 4px; font-weight: 400; }
.kpi .foot { font-size: var(--t-xs); color: var(--ink3); margin-top: var(--sp1); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: var(--t-xs); color: var(--ink2); }
.delta.up { color: var(--blue); }
.hint { display: flex; gap: 12px; align-items: flex-start; padding: 12px var(--sp2); border-radius: var(--r-xs); background: var(--blue-soft); color: var(--ink); font-size: var(--t-s); }
.hint .ic { color: var(--blue); margin-top: 2px; }
.hint button { color: var(--blue); font-size: var(--t-xs); font-weight: 500; white-space: nowrap; margin-inline-start: auto; }

/* hero */
.hero { padding: var(--sp1) 0 0; }
.hero .lab { color: var(--ink2); font-size: var(--t-m); }
.hero .big { font-size: 56px; line-height: 1.1; font-weight: 300; letter-spacing: -0.5px; margin-top: var(--sp1); }
.hero .big .u { font-size: var(--t-l); color: var(--ink2); font-weight: 400; margin-inline-start: 8px; letter-spacing: 0; }
.roas-card { background: var(--s1); color: var(--ink); border-radius: var(--r-l); padding: var(--sp4); display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp3); min-height: 100%; }
.roas-card .lab { color: var(--ink2); font-size: var(--t-m); }
.roas-card .big { font-size: 40px; font-weight: 300; line-height: 1.2; }
.roas-card .big b { font-weight: 300; color: var(--blue); }
.roas-card .foot { color: var(--ink2); font-size: var(--t-s); }

/* list rows */
.list > * + * { margin-top: var(--sp1); }
.li { display: flex; align-items: center; gap: var(--sp2); padding: 12px var(--sp2); border-radius: var(--r-s); background: #fff; min-width: 0; }
button.li, a.li { width: 100%; text-align: start; transition: background .15s; }
button.li:hover, a.li:hover { background: var(--blue-soft); }
.li .t { font-weight: 500; font-size: var(--t-s); line-height: 1.45; }
.li .d { color: var(--ink2); font-size: var(--t-xs); }
.li .end { margin-inline-start: auto; text-align: end; flex: none; }
.ibox { width: 40px; height: 40px; border-radius: var(--r-xs); background: var(--s1); display: grid; place-items: center; color: var(--ink); flex: none; }
.ibox.blue { background: var(--blue-soft); color: var(--blue); }
.ibox.ink { background: var(--ink); color: #fff; }

/* recommendations */
.rec { background: #fff; border-radius: var(--r-s); padding: var(--sp2) 20px; display: flex; flex-direction: column; gap: 12px; }
.rec .t { font-size: var(--t-m); font-weight: 500; line-height: 1.45; }
.rec .b { color: var(--ink2); font-size: var(--t-s); line-height: 1.7; }
.rec .acts { display: flex; gap: var(--sp1); flex-wrap: wrap; }
.rec.leaving { opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }

/* feed */
.feed { position: relative; }
.feed .fi { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.feed .fi .ic { color: var(--blue); margin-top: 2px; }
.feed .fi .t { font-size: var(--t-s); line-height: 1.6; }
.feed .fi .w { font-size: var(--t-xs); color: var(--ink3); }

/* progress (spend cap) */
.meter { height: 10px; border-radius: 5px; background: var(--s2); position: relative; overflow: hidden; }
.meter i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 5px; background: var(--blue); transition: width .5s var(--ease); }
.meter b { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 5px; background: var(--blue-mid); }

/* since last visit */
.since { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp2); }
.since .v { font-size: var(--t-xl); font-weight: 300; line-height: 1.2; }
.since .k { font-size: var(--t-xs); color: var(--ink2); }

/* charts */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: "Ping", system-ui, sans-serif; fill: var(--ink3); font-size: 11px; }
.chart .lbl-strong { fill: var(--ink); font-size: 12px; font-weight: 500; }
.pair { display: grid; grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp2) var(--sp3); align-items: center; }
.pair .h { font-size: var(--t-xs); color: var(--ink3); }
.pair .p { display: flex; align-items: center; gap: var(--sp1); font-weight: 500; font-size: var(--t-s); min-width: 0; }
.pair .bar { display: flex; align-items: center; gap: var(--sp1); min-width: 0; }
.pair .bar svg { flex: 1 1 auto; height: 16px; min-width: 0; }
.pair .bar .v { flex: none; font-size: var(--t-s); min-width: 64px; text-align: start; }
.say { display: flex; gap: 12px; align-items: flex-start; padding: var(--sp2) 20px; border-radius: var(--r-s); background: #fff; font-size: var(--t-m); line-height: 1.7; }
.say .ic { color: var(--blue); margin-top: 4px; }

/* tables (pro density) */
.tbl { width: 100%; display: grid; gap: 4px; }
.tbl .tr { display: grid; align-items: center; gap: var(--sp2); padding: 12px var(--sp2); border-radius: var(--r-xs); background: #fff; min-width: 0; }
.tbl .th { background: none; color: var(--ink3); font-size: var(--t-xs); padding-block: 4px; }
.tbl .tr > * { min-width: 0; }
.tbl .tr .n { text-align: end; font-variant-numeric: tabular-nums; }
a.tr, button.tr { text-align: start; width: 100%; transition: background .15s; }
a.tr:hover, button.tr:hover { background: var(--blue-soft); }

/* creative tiles */
.creative { border-radius: var(--r-s); overflow: hidden; background: var(--s2); aspect-ratio: 4 / 5; width: 100%; }
.creative svg { width: 100%; height: 100%; display: block; }
.creative img { width: 100%; height: 100%; object-fit: cover; }
.thumb { width: 56px; flex: none; border-radius: 12px; }
.pick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp2); }
.pick { position: relative; border-radius: var(--r-s); padding: 0; transition: transform .15s; }
.pick .creative { transition: box-shadow .15s; }
.pick .creative { transition: transform .15s var(--ease), opacity .15s; }
.pick-grid:has(.pick.on) .pick:not(.on) .creative { opacity: .55; }
.pick.on .creative { transform: scale(.97); }
.pick .ok { position: absolute; top: 8px; inset-inline-start: 8px; width: 24px; height: 24px; border-radius: 8px; background: var(--blue); color: #fff; display: none; place-items: center; }
.pick.on .ok { display: grid; }
.upload-tile { aspect-ratio: 4 / 5; border-radius: var(--r-s); background: var(--s1); display: grid; place-items: center; text-align: center; color: var(--ink2); gap: var(--sp1); padding: var(--sp2); }
.upload-tile:hover { background: var(--s2); }

/* ---------- onboarding ---------- */
.ob { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.ob-inner { width: 100%; max-width: 560px; margin: 0 auto; padding: var(--sp5) var(--sp3) var(--sp6); display: flex; flex-direction: column; }
.ob-top { display: flex; align-items: center; justify-content: space-between; height: 40px; margin-bottom: var(--sp5); }
.ob-progress { display: flex; gap: 4px; flex: 1; max-width: 200px; margin-inline: var(--sp2); }
.ob-progress i { height: 4px; flex: 1; border-radius: 2px; background: var(--s2); }
.ob-progress i.on { background: var(--blue); }
.ob h1 { font-size: var(--t-2xl); line-height: 1.3; font-weight: 500; }
.ob .sub { color: var(--ink2); font-size: var(--t-m); margin-top: var(--sp1); line-height: 1.7; }
.ob .body { margin-top: var(--sp4); }
.ob .cta { margin-top: var(--sp4); display: flex; gap: var(--sp1); align-items: center; }
.ob-hello { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; max-width: 560px; margin: 0 auto; padding: var(--sp5) var(--sp3); }
.ob-hello h1 { font-size: var(--t-3xl); line-height: 1.2; font-weight: 500; }
.ob-hello .sub { font-size: var(--t-l); line-height: 1.7; color: var(--ink2); margin-top: var(--sp3); max-width: 480px; }
.ob-hello .cta { margin-top: var(--sp5); }
.bubble { background: var(--s1); border-radius: var(--r-s); padding: var(--sp2) 20px; font-size: var(--t-m); line-height: 1.75; text-align: start; width: 100%; transition: background .15s, box-shadow .15s; }
.bubble:hover { background: var(--s2); }
.bubble.on { background: var(--blue-soft); }
.bubble.on .who span:first-child { color: var(--blue); }
.bubble .who { font-size: var(--t-xs); color: var(--ink3); margin-bottom: var(--sp1); display: flex; justify-content: space-between; }
.consent { margin-top: var(--sp3); padding: var(--sp2); border-radius: var(--r-xs); background: var(--s1); font-size: var(--t-s); color: var(--ink2); line-height: 1.7; }
.consent a { color: var(--blue); }
.prep { display: grid; gap: var(--sp2); margin-top: var(--sp4); }
.prep .li { background: var(--s1); opacity: 0; transform: translateY(6px); animation: rise .4s var(--ease) forwards; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp2); }
.plan { background: var(--s1); border-radius: var(--r-s); padding: 20px; text-align: start; display: flex; flex-direction: column; gap: 4px; transition: background .15s, box-shadow .15s; position: relative; }
.plan:hover { background: var(--s2); }
.plan.on { background: var(--blue-soft); }
.plan.on .nm, .plan.on .pr { color: var(--blue); }
.plan .nm { font-size: var(--t-m); font-weight: 500; }
.plan .pr { font-size: var(--t-2xl); font-weight: 300; line-height: 1.2; margin-top: var(--sp1); }
.plan .pr small { font-size: var(--t-xs); color: var(--ink2); font-weight: 400; }
.plan .pc { font-size: var(--t-s); color: var(--ink2); }
.plan .rg { font-size: var(--t-xs); color: var(--ink3); margin-top: var(--sp1); }
.plan .fit { position: absolute; top: 16px; inset-inline-end: 16px; }
.calc { margin-top: var(--sp2); padding: 12px var(--sp2); border-radius: var(--r-xs); background: var(--s1); font-size: var(--t-s); }

/* wizard */
.wz { max-width: 640px; }
.wz-top { display: flex; align-items: center; gap: var(--sp2); margin-bottom: var(--sp4); }
.wz-top .ob-progress { max-width: none; margin: 0; }
.wz h1 { font-size: var(--t-2xl); line-height: 1.3; }
.wz .sub { color: var(--ink2); font-size: var(--t-m); margin-top: var(--sp1); }
.wz .body { margin-top: var(--sp4); }
.wz .cta { margin-top: var(--sp4); display: flex; gap: var(--sp1); }
.muhnak-says { display: flex; gap: 12px; align-items: flex-start; margin-bottom: var(--sp3); }
.muhnak-says .avatar { background: var(--blue); }
.muhnak-says .msg { background: var(--s1); border-radius: 4px var(--r-s) var(--r-s) var(--r-s); padding: 12px var(--sp2); font-size: var(--t-m); line-height: 1.7; }
.stepper { display: flex; align-items: center; gap: var(--sp2); }
.stepper .v { font-size: var(--t-3xl); font-weight: 300; min-width: 140px; text-align: center; line-height: 1.1; }
.adv { margin-top: var(--sp3); }
.adv > button { display: flex; align-items: center; gap: var(--sp1); color: var(--ink2); font-size: var(--t-s); height: 32px; }
.adv .advbody { margin-top: var(--sp2); padding: var(--sp3); background: var(--s1); border-radius: var(--r-s); display: grid; gap: var(--sp3); }
.summary { display: grid; gap: 4px; }
.summary .li { background: var(--s1); }
.form-pro { display: grid; gap: var(--sp3); }
.form-pro .sec { background: var(--s1); border-radius: var(--r-m); padding: var(--sp3); display: grid; gap: var(--sp2); }
.form-pro .sec h3 { font-size: var(--t-m); }
.form-pro .g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp2); }
.form-pro .g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp2); }
.form-pro .field { background: #fff; height: 40px; font-size: var(--t-s); }
.form-pro textarea.field { min-height: 72px; }
.form-pro .chip { background: #fff; min-height: 32px; padding: 4px 12px; font-size: var(--t-xs); }
.form-pro .chip.on { background: var(--ink); }
select.field { appearance: none; -webkit-appearance: none; background-image: none; cursor: pointer; }
.kw { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--sp1); align-items: center; }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(11, 30, 63, .32); opacity: 0; transition: opacity .2s; }
.sheet { position: relative; background: #fff; width: min(560px, calc(100vw - 48px)); max-height: 86vh; max-height: 86dvh; border-radius: var(--r-l); box-shadow: var(--shadow); display: flex; flex-direction: column; opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .22s var(--ease), transform .22s var(--ease); }
.sheet:focus { outline: none; }
.sheet.wide { width: min(880px, calc(100vw - 48px)); }
.sheet-wrap.in .sheet-bg { opacity: 1; }
.sheet-wrap.in .sheet { opacity: 1; transform: none; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: var(--sp2); padding: var(--sp3) var(--sp4) var(--sp2); }
.sheet-h h2 { font-size: var(--t-l); font-weight: 500; line-height: 1.35; }
.sheet-b { padding: 0 var(--sp4) var(--sp4); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-f { padding: var(--sp2) var(--sp4) var(--sp3); display: flex; gap: var(--sp1); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4px var(--sp2); }
.kv dt { color: var(--ink2); font-size: var(--t-s); padding: 10px 0; }
.kv dd { margin: 0; font-size: var(--t-s); font-weight: 500; padding: 10px 0; }

/* toast */
.toast { position: fixed; z-index: 90; bottom: var(--sp4); inset-inline-start: 50%; transform: translate(50%, 16px); background: var(--ink); color: #fff; padding: 12px var(--sp3); border-radius: var(--r-xs); font-size: var(--t-s); opacity: 0; transition: opacity .2s, transform .2s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.in { opacity: 1; transform: translate(50%, 0); }

/* presenter */
/* Docked in the top header (data-where=bar); small floating icon only on shell-less screens (onboarding). */
.pr-btn { width: 40px; height: 40px; border-radius: var(--r-xs); display: grid; place-items: center; color: var(--ink2); flex: none; transition: background .15s, color .15s; }
.pr-btn:hover, .pr-btn[aria-expanded="true"] { background: var(--s1); color: var(--blue); }
.pr-btn[data-where="float"] { position: fixed; z-index: 70; inset-inline-end: var(--sp3); bottom: var(--sp3); background: var(--s1); }
.pr-dock { gap: 4px; }
.pr-panel { position: fixed; z-index: 75; inset-inline-end: var(--sp3); bottom: 72px; width: 320px; max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: var(--r-m); box-shadow: var(--shadow); padding: var(--sp3); display: none; }
.pr-panel.in { display: block; animation: rise .2s var(--ease); }
.pr-panel[data-where="bar"] { bottom: auto; top: 76px; max-height: calc(100vh - 176px); max-height: calc(100dvh - 176px); }
.pr-panel h3 { font-size: var(--t-m); }
.pr-panel .sec + .sec { margin-top: var(--sp3); }
.pr-panel .lab { font-size: var(--t-xs); color: var(--ink3); margin-bottom: var(--sp1); }
.pr-panel .chip { min-height: 32px; padding: 4px 12px; font-size: var(--t-xs); }

/* product */
.prod { display: grid; grid-template-columns: 48px minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: var(--sp2); align-items: center; padding: 12px var(--sp2); border-radius: var(--r-s); background: #fff; }
.prod .shape { width: 48px; height: 48px; border-radius: var(--r-xs); overflow: hidden; }
.prod .shape svg { width: 100%; height: 100%; }
.prod .k { font-size: var(--t-xs); color: var(--ink3); display: none; }
.idea { display: flex; gap: 12px; align-items: flex-start; padding: var(--sp2) 20px; border-radius: var(--r-s); background: var(--blue-soft); }
.idea .ic { color: var(--blue); margin-top: 2px; }
.idea .t { font-weight: 500; font-size: var(--t-s); }
.idea .b { font-size: var(--t-s); color: var(--ink2); margin-top: 4px; line-height: 1.7; }
.idea .acts { display: flex; gap: var(--sp1); margin-top: 12px; flex-wrap: wrap; }

/* reports */
.rb { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: var(--sp3); align-items: start; }
.rb-side { position: sticky; top: 96px; display: grid; gap: var(--sp2); }
.rb-side .card { padding: 20px; }
.rb-prev { background: var(--s1); border-radius: var(--r-l); padding: var(--sp3); overflow: hidden; }
.rb-prev .scaler { transform-origin: top right; }
.cal { user-select: none; }
.cal .mh { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp1); }
.cal .wd, .cal .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.cal .wd span { font-size: 11px; color: var(--ink3); padding: 4px 0; }
.cal .days button { height: 36px; border-radius: 10px; font-size: var(--t-s); color: var(--ink); }
.cal .days button:hover { background: var(--s2); }
.cal .days button.in { background: var(--blue-soft); border-radius: 0; }
.cal .days button.edge { background: var(--blue); color: #fff; border-radius: 10px; }
.cal .days button[disabled] { color: var(--bar2); pointer-events: none; }
.cal .days button.today { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.secrow { display: flex; align-items: center; gap: var(--sp1); padding: 8px 12px; border-radius: var(--r-xs); background: #fff; }
.secrow + .secrow { margin-top: 4px; }
.secrow.drag { opacity: .4; }
.secrow.over { box-shadow: inset 0 2px 0 var(--blue); }
.secrow .grip { cursor: grab; color: var(--ink3); }
.secrow .nm { flex: 1; font-size: var(--t-s); }
.secrow .mv { display: none; }

/* A4 report pages */
.a4 { width: 794px; height: 1123px; background: #fff; position: relative; padding: 56px 56px 72px; display: flex; flex-direction: column; overflow: hidden; color: var(--ink); }
.a4 + .a4 { margin-top: var(--sp3); }
.a4 .ph { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp3); margin-bottom: var(--sp4); }
.a4 .ph h1 { font-size: 26px; line-height: 1.3; font-weight: 500; }
.a4 .ph .per { font-size: 13px; color: var(--ink2); margin-top: 6px; }
.a4 .ph .logo { max-height: 48px; max-width: 140px; object-fit: contain; }
.a4 .ph-mini { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink3); margin-bottom: var(--sp3); }
.a4 .pf { position: absolute; bottom: 28px; inset-inline: 56px; display: flex; justify-content: space-between; font-size: 11px; color: var(--ink3); }
.a4 .pf .wm { font-size: 14px; color: var(--ink); font-weight: 500; }
.a4 .blk { break-inside: avoid; page-break-inside: avoid; margin-bottom: 28px; }
.a4 .blk h2 { font-size: 16px; font-weight: 500; margin-bottom: 12px; }
.a4 .kp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.a4 .kp .card { padding: 16px; border-radius: 20px; }
.a4 .kp .val { font-size: 22px; font-weight: 300; margin-top: 4px; line-height: 1.2; }
.a4 .kp .lab { font-size: 11px; color: var(--ink2); }
.a4 .kp .dl { font-size: 11px; color: var(--ink2); margin-top: 4px; }
.a4 .tbl .tr { background: var(--s1); padding: 8px 12px; font-size: 12px; }
.a4 .tbl .th { background: none; }
.a4 .note { background: var(--s1); border-radius: 20px; padding: 16px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.a4 .ads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.a4 .ads .t { font-size: 11px; margin-top: 6px; line-height: 1.5; }
.a4 .rl { font-size: 12px; line-height: 1.7; padding: 8px 12px; background: var(--s1); border-radius: 12px; }
.a4 .rl + .rl { margin-top: 4px; }
.print-root { display: none; }
body.print-view { background: #ECEFF3; }
body.print-view .pr-btn { display: none; }
.print-pages { display: flex; flex-direction: column; align-items: center; padding: 24px 0; }
@media print { body.print-view { background: #fff; } .print-pages { padding: 0; display: block; } }

/* motion */
.fade-in { animation: rise .32s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  :root { --pad: 32px; }
  .rb { grid-template-columns: 320px minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  :root { --pad: 32px; --gap: 16px; }
  .topbar { height: 64px; }
  .topbar .wordmark { font-size: var(--t-l); }
  .main { padding: var(--sp3) var(--pad) calc(112px + env(safe-area-inset-bottom)); }
  /* bar spans the screen minus 12px each side, sits above the safe area; "+" is an icon-only action */
  .bnav { width: auto; left: 12px; right: 12px; margin: 0; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 0 4px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
  .bnav a { height: 56px; }
  .bnav a.plus { flex-direction: column; height: 56px; padding: 0; background: none; }
  .bnav a.plus:hover { background: none; }
  .bnav a.plus .pbox { width: 48px; height: 40px; border-radius: 16px; background: var(--blue); color: #fff; }
  .bnav a.plus .pl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pr-btn[data-where="float"] { bottom: calc(16px + env(safe-area-inset-bottom)); inset-inline-end: var(--sp2); }
  .pr-panel { bottom: calc(72px + env(safe-area-inset-bottom)); inset-inline-end: var(--sp2); }
  .pr-panel[data-where="bar"] { top: 64px; max-height: calc(100dvh - 172px); }
  .ob-inner { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .ob-hello { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .grid12 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .c-2 { grid-column: span 2; } .c-3 { grid-column: span 4; } .c-4 { grid-column: span 4; } .c-5, .c-6, .c-7, .c-8, .c-9 { grid-column: span 8; }
  .t-4 { grid-column: span 4 !important; } .t-8 { grid-column: span 8 !important; }
  .grid-overlay .inner { inset-inline-start: var(--pad); }
  .grid-overlay .cols { grid-template-columns: repeat(8, 1fr); }
  .grid-overlay .cols i:nth-child(n+9) { display: none; }
  .rb { grid-template-columns: 1fr; }
  .rb-side { position: static; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 720px) {
  :root { --pad: 16px; --gap: 16px; }
  body { font-size: var(--t-s); }
  .topbar { height: 56px; }
  .topbar .wordmark small, .store-link .sn { display: none; }
  .store-link { height: 40px; padding: 4px; }
  .main { padding-top: var(--sp2); }
  .grid12 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .c-2, .c-3 { grid-column: span 2; } .c-4, .c-5, .c-6, .c-7, .c-8, .c-9, .t-4, .t-8 { grid-column: span 4 !important; }
  .m-2 { grid-column: span 2 !important; } .m-4 { grid-column: span 4 !important; }
  .grid-overlay .cols { grid-template-columns: repeat(4, 1fr); }
  .grid-overlay .cols i:nth-child(n+5) { display: none; }
  .phead { margin-bottom: var(--sp3); }
  .phead h1 { font-size: var(--t-xl); }
  .phead .sub { font-size: var(--t-s); }
  .hero .big { font-size: 40px; }
  .hero .big .u { font-size: var(--t-m); }
  .roas-card { padding: var(--sp3); border-radius: var(--r-m); }
  .roas-card .big { font-size: var(--t-2xl); }
  .kpi .val { font-size: var(--t-xl); }
  .card { padding: var(--sp2); border-radius: var(--r-s); }
  .panel { padding: var(--sp3); border-radius: var(--r-m); }
  .card-h h2, .card-h h3 { font-size: var(--t-s); }
  .since { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp1) var(--sp2); }
  .pair .p { grid-column: 1 / -1; margin-top: var(--sp1); }
  .pair .hh { display: none; }
  .pair .bar .v { min-width: 0; font-size: var(--t-xs); }
  .say { font-size: var(--t-s); padding: var(--sp2); }
  .sheet-wrap { align-items: flex-end; }
  .sheet, .sheet:focus { outline: none; }
.sheet.wide { width: 100%; max-height: 90vh; max-height: 90dvh; border-radius: var(--r-m) var(--r-m) 0 0; transform: translateY(32px); }
  .sheet-h { padding: 20px var(--sp3) 12px; }
  .sheet-b { padding: 0 var(--sp3) var(--sp3); }
  .sheet-f { padding: 12px var(--sp3) calc(16px + env(safe-area-inset-bottom)); }
  .ob-inner { padding: var(--sp3) var(--sp2) calc(88px + env(safe-area-inset-bottom)); }
  .ob-top { margin-bottom: var(--sp4); }
  .ob h1, .wz h1 { font-size: var(--t-xl); }
  .ob .sub, .wz .sub { font-size: var(--t-s); }
  .ob-hello h1 { font-size: var(--t-2xl); }
  .ob-hello .sub { font-size: var(--t-m); }
  .choices.two { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr 1fr; gap: var(--sp1); }
  .plan { padding: var(--sp2); }
  .plan .pr { font-size: var(--t-xl); }
  .plan .fit { position: static; margin-bottom: 4px; align-self: flex-start; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prod { grid-template-columns: 48px repeat(3, minmax(0, 1fr)); row-gap: var(--sp1); column-gap: 12px; }
  .prod .shape { grid-row: span 2; align-self: start; }
  .prod .nmcol { grid-column: 2 / -1; }
  .prod .k { display: block; }
  .prod .sp { display: none !important; }
  .form-pro .g2, .form-pro .g3 { grid-template-columns: 1fr; }
  .stepper .v { font-size: var(--t-2xl); min-width: 110px; }
  .secrow .mv { display: flex; }
  .secrow .grip { display: none; }
  .pr-panel { width: calc(100vw - 32px); }
  .pr-panel[data-where="bar"] { top: 60px; }
  .kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .tbl .tr { padding: 12px; gap: var(--sp1); }
}

/* ---------- print (report export) ---------- */
@page { size: A4 portrait; margin: 0; }
@media print {
  .pr-btn, .pr-panel, .toast, .grid-overlay { display: none !important; }
  body.print-view .a4 { margin: 0 !important; page-break-after: always; break-after: page; }
  body.print-view .a4:last-child { page-break-after: auto; break-after: auto; }
  html, body { background: #fff !important; }
  body.printing > *:not(.print-root) { display: none !important; }
  body.printing .print-root { display: block !important; }
  .print-root .a4 { margin: 0 !important; box-shadow: none !important; page-break-after: always; break-after: page; }
  .print-root .a4:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
