/* ===== Eyerik portal: one paper surface. Light comes from the top-left everywhere.
   Raised = embossed, dipped = debossed. At rest controls are dipped; hover / selected lifts them (two layers cross-fade).
   Wide: sidebar that collapses to a rail. Narrow: a bottom dock. The page itself stays flat white, with no shadow or
   coloured glow on panels/cards; blue is the brand, green the accent, and every neumorphic shadow is plain grey, not tinted. ===== */
@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #FFFFFF; --ink: #1B2436; --muted: #5C6478; --accent: #16A34A; --fill-a: #2563EB; --fill-b: #1D4ED8; --good: #17794F; --bad: #B3261E; --warn: #8A5200;
  --hi: rgba(255,255,255,.95); --hi2: rgba(255,255,255,.55); --lo: rgba(124,130,168,.55); --lo2: rgba(124,130,168,.28); --edge: rgba(255,255,255,.85);
  --rg-a: rgba(255,255,255,.55); --rg-b: rgba(120,126,165,.10); --dg-a: rgba(120,126,165,.15); --dg-b: rgba(255,255,255,.45);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .38 0 0 0 0 .38 0 0 0 0 .45 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
  --paper: var(--grain), var(--bg);
  --rbg: linear-gradient(145deg, var(--rg-a), var(--rg-b)), var(--paper);
  --dbg: linear-gradient(145deg, var(--dg-a), var(--dg-b)), var(--paper);
  --raise: -2px -2px 3px var(--hi), 2px 2px 4px var(--lo), -10px -10px 20px var(--hi2), 10px 10px 22px var(--lo2), inset 1px 1px 0 var(--edge);
  --raise-sm: -2px -2px 3px var(--hi), 2px 2px 4px var(--lo), -5px -5px 10px var(--hi2), 5px 5px 11px var(--lo2), inset 1px 1px 0 var(--edge);
  --raise-lg: -3px -3px 5px var(--hi), 4px 4px 6px var(--lo), -14px -14px 26px var(--hi2), 14px 14px 28px var(--lo2), inset 1px 1px 0 var(--edge);
  --dip: inset 3px 3px 5px var(--lo), inset 8px 8px 16px var(--lo2), inset -3px -3px 5px var(--hi), inset -8px -8px 16px var(--hi2);
  --dip-sm: inset 2px 2px 4px var(--lo), inset 5px 5px 10px var(--lo2), inset -2px -2px 4px var(--hi), inset -5px -5px 10px var(--hi2);
  /* meaning colours: text/icon (dark enough on paper) and fill (bright) */
  --c-violet: #2563EB; --c-blue: #1566BF; --c-amber: #8A5200; --c-green: #0C7A5F; --c-pink: #16A34A; --c-teal: #0E7490; --c-purple: #1D4ED8; --c-red: #B3261E;
  --f-violet: #7A5CFF; --f-blue: #3B8DEB; --f-amber: #F0B429; --f-green: #3CCB8E; --f-pink: #E55CA0; --f-teal: #22B8D8; --f-purple: #9B6BE8; --f-red: #E5645C;
  --s1: #2a78d6; --s2: #7A5CFF; --s3: #1baf7a; --s4: #eda100; --grid: rgba(120,126,165,.28); --axis: rgba(95,100,135,.55); --band: rgba(120,126,165,.13);
  --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  --r: 26px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #22242F; --ink: #E9EAF6; --muted: #A6AAC6; --accent: #A08DFF; --fill-a: #7A5CFF; --fill-b: #4A5CF0; --good: #62D6A3; --bad: #FF8A80; --warn: #F0B45A;
    --hi: rgba(255,255,255,.075); --hi2: rgba(255,255,255,.035); --lo: rgba(0,0,0,.62); --lo2: rgba(0,0,0,.34); --edge: rgba(255,255,255,.09); --rg-a: rgba(255,255,255,.05); --rg-b: rgba(0,0,0,.2); --dg-a: rgba(0,0,0,.3); --dg-b: rgba(255,255,255,.03);
    --c-violet: #A08DFF; --c-blue: #5FB4FF; --c-amber: #F0B45A; --c-green: #4FD2AE; --c-pink: #FF7AA5; --c-teal: #4FD0E8; --c-purple: #C09BFF; --c-red: #FF8A80; --s1: #3987e5; --s2: #9a82ff; --s3: #199e70; --s4: #c98500; --grid: rgba(255,255,255,.07); --axis: rgba(255,255,255,.24); --band: rgba(255,255,255,.045); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #22242F; --ink: #E9EAF6; --muted: #A6AAC6; --accent: #A08DFF; --fill-a: #7A5CFF; --fill-b: #4A5CF0; --good: #62D6A3; --bad: #FF8A80; --warn: #F0B45A;
  --hi: rgba(255,255,255,.075); --hi2: rgba(255,255,255,.035); --lo: rgba(0,0,0,.62); --lo2: rgba(0,0,0,.34); --edge: rgba(255,255,255,.09); --rg-a: rgba(255,255,255,.05); --rg-b: rgba(0,0,0,.2); --dg-a: rgba(0,0,0,.3); --dg-b: rgba(255,255,255,.03);
  --c-violet: #A08DFF; --c-blue: #5FB4FF; --c-amber: #F0B45A; --c-green: #4FD2AE; --c-pink: #FF7AA5; --c-teal: #4FD0E8; --c-purple: #C09BFF; --c-red: #FF8A80; --s1: #3987e5; --s2: #9a82ff; --s3: #199e70; --s4: #c98500; --grid: rgba(255,255,255,.07); --axis: rgba(255,255,255,.24); --band: rgba(255,255,255,.045); color-scheme: dark; }

/* one accent family for every page */
[data-page], :root { --pc: var(--c-violet); --pa: var(--brand); --pb: var(--brand); }

* { box-sizing: border-box; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background-color: var(--bg); background-image: var(--grain); color: var(--ink); font-family: var(--font); font-size: 14.5px; line-height: 1.7; padding-inline: max(14px, env(safe-area-inset-left, 0px)) max(14px, env(safe-area-inset-right, 0px)); min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
svg.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 800; }
h1 { font-size: clamp(22px, 3vw, 29px); } h2 { font-size: 17px; } h3 { font-size: 15.5px; } p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; } .b { font-weight: 700; } .grow { flex: 1; min-width: 0; } .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 14px; } .stack.s2 { gap: 8px; } .stack.s3 { gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .row.nw { flex-wrap: nowrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; } .row.end { justify-content: flex-end; }
.grid { display: grid; gap: 20px; } .grid.auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); } .grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- dipped at rest, raised on hover / selected ---- */
.neu { --d: var(--dip-sm); --r: var(--raise-sm); position: relative; isolation: isolate; }
.neu::before, .neu::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; transition: opacity .35s cubic-bezier(.4, 0, .2, 1); }
.neu::before { background: var(--dbg); box-shadow: var(--d); } .neu::after { background: var(--rbg); box-shadow: var(--r); opacity: 0; }
.neu:hover::before, .neu:focus-visible::before, .neu[aria-current="page"]::before, .neu[aria-selected="true"]::before, .neu[aria-pressed="true"]::before, .neu.on::before { opacity: 0; }
.neu:hover::after, .neu:focus-visible::after, .neu[aria-current="page"]::after, .neu[aria-selected="true"]::after, .neu[aria-pressed="true"]::after, .neu.on::after { opacity: 1; }
.neu:active::before { opacity: 1; } .neu:active::after { opacity: 0; }
.neu:disabled { opacity: .5; cursor: not-allowed; }
.card { background: var(--rbg); border-radius: var(--r); box-shadow: none; border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); padding: 20px; min-width: 0; }
.card.flat { box-shadow: none; background: var(--dbg); }
.card.tight { padding: 14px; }
.well { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; color: var(--pc, var(--accent)); transition: color .25s; flex: none; }
.well::after { background: var(--brand); box-shadow: var(--raise-sm); }
.well.round { border-radius: 50%; } .well.sm { width: 38px; height: 38px; border-radius: 13px; } .well.lg { width: 64px; height: 64px; border-radius: 22px; }
.well.on, .tile:hover .well, .row-item:hover .well { color: #fff; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); transition: color .25s; flex: none; }
.icon-btn:hover, .icon-btn:focus-visible, .icon-btn[aria-expanded="true"] { color: var(--accent); } .icon-btn.sm { width: 34px; height: 34px; } .icon-btn svg.ic { width: 20px; height: 20px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 16px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none !important; transition: color .25s, transform .25s; white-space: nowrap; }
.btn:hover { color: var(--accent); transform: translateY(-1px); } .btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 13px; } .btn.block { width: 100%; }
.btn svg.ic { width: 19px; height: 19px; }
.btn.danger { color: var(--bad); }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 24px; border-radius: 16px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14.5px;
  box-shadow: -2px -2px 3px var(--hi), 3px 3px 6px var(--lo), 6px 8px 16px var(--lo2), inset 1px 1px 0 rgba(255,255,255,.28); transition: transform .25s, box-shadow .25s, filter .25s; text-decoration: none !important; white-space: nowrap; }
.cta:hover { transform: translateY(-2px); filter: brightness(1.07); } .cta:active { transform: none; box-shadow: inset 3px 3px 7px rgba(10,20,50,.5), inset -2px -2px 5px rgba(255,255,255,.14); }
.cta:disabled { filter: grayscale(.6) opacity(.6); cursor: not-allowed; transform: none; } .cta.sm { min-height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: 13px; } .cta.block { width: 100%; } .cta svg.ic { width: 19px; height: 19px; }
.cta.page { background: var(--brand); }
.cta.green { background: var(--brand); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 15px; border-radius: 19px; font-size: 13px; font-weight: 600; color: var(--muted); transition: color .25s; white-space: nowrap; }
.chip[aria-pressed="true"], .chip.on { color: var(--ink); } .chip b { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--pc, var(--accent)); }
.chip .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.scroll-x { overflow-x: auto; padding: 6px 4px 12px; margin: -6px -4px -6px; scrollbar-width: none; } .scroll-x::-webkit-scrollbar { display: none; } .scroll-x .chips { flex-wrap: nowrap; }
.seg { position: relative; isolation: isolate; display: inline-flex; gap: 4px; padding: 5px; border-radius: 17px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--dbg); box-shadow: var(--dip-sm); z-index: -1; }
.seg button { min-height: 36px; padding: 0 16px; border-radius: 13px; font-weight: 600; font-size: 13px; color: var(--muted); transition: color .25s; white-space: nowrap; }
.seg button::before { opacity: 0 !important; } .seg button:hover, .seg button[aria-selected="true"] { color: var(--pc, var(--accent)); }

/* ---- form fields: dipped ---- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lab { font-size: 12.5px; font-weight: 700; color: var(--muted); padding-inline: 4px; display: flex; align-items: center; gap: 6px; }
.inp { width: 100%; min-height: 46px; padding: 10px 16px; border: 0; border-radius: 16px; background: var(--dbg); box-shadow: var(--dip-sm); color: var(--ink); outline: none; transition: box-shadow .2s; }
.inp:focus { box-shadow: var(--dip-sm), 0 0 0 2px var(--accent); } textarea.inp { min-height: 90px; resize: vertical; line-height: 1.8; } .inp::placeholder { color: var(--muted); opacity: .75; }
select.inp { appearance: none; background-image: var(--dbg); padding-inline-end: 38px; } .selwrap { position: relative; } .selwrap::after { content: ""; position: absolute; inset-inline-end: 16px; top: 50%; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.hint { font-size: 12px; color: var(--muted); padding-inline: 4px; } .err { color: var(--bad); font-size: 12.5px; font-weight: 600; padding-inline: 4px; }
.num { font-variant-numeric: tabular-nums; }
.inp.dir-ltr { direction: ltr; text-align: left; }
/* tag input: words as little raised pills inside a dipped box */
.tagbox { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 52px; padding: 8px 12px; border-radius: 16px; background: var(--dbg); box-shadow: var(--dip-sm); cursor: text; }
.tagbox:focus-within { box-shadow: var(--dip-sm), 0 0 0 2px var(--accent); }
.tagbox input { flex: 1; min-width: 120px; border: 0; background: none; outline: none; min-height: 34px; }
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px 0 12px; border-radius: 16px; background: var(--rbg); box-shadow: var(--raise-sm); font-size: 13px; font-weight: 600; } [dir="rtl"] .tag { padding: 0 12px 0 6px; }
.tag button { width: 22px; height: 22px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; } .tag button:hover { color: var(--bad); } .tag svg.ic { width: 14px; height: 14px; }
/* switch: a knob that slides in a dipped slot */
.switch { position: relative; isolation: isolate; flex: none; width: 58px; height: 32px; border-radius: 16px; transition: background .3s; }
.switch::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--dbg); box-shadow: var(--dip-sm); z-index: -1; }
.switch::after { content: ""; position: absolute; inset: 4px; border-radius: inherit; background: var(--brand); opacity: 0; transition: opacity .3s; z-index: -1; box-shadow: none; }
.switch[aria-checked="true"]::after { opacity: 1; }
.switch i { position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--rbg); box-shadow: var(--raise-sm); transition: inset-inline-start .3s cubic-bezier(.3, .7, .2, 1); }
.switch[aria-checked="true"] i { inset-inline-start: 30px; } .switch:disabled { opacity: .5; cursor: not-allowed; } .switch.violet::after { background: var(--brand); box-shadow: none; }
.swrow { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.swrow .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* progress groove */
.groove { position: relative; height: 10px; border-radius: 6px; background: var(--dbg); box-shadow: var(--dip-sm); }
.groove > i { position: absolute; top: 2px; bottom: 2px; inset-inline-start: 2px; width: max(14px, calc(var(--w, 0%) - 4px)); border-radius: 4px; background: linear-gradient(90deg, #F5C451, #E0A21B); }
.groove.violet > i { background: var(--brand); } .groove.green > i { background: var(--brand); } .groove.tall { height: 16px; border-radius: 9px; } .groove.tall > i { border-radius: 7px; }

/* ---- badges ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 10px; border-radius: 12px; background: var(--dbg); box-shadow: var(--dip-sm); font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.badge svg.ic { width: 13px; height: 13px; stroke-width: 2.2; }
.badge.pink { color: var(--c-pink); } .badge.blue { color: var(--c-blue); } .badge.green { color: var(--c-green); } .badge.amber { color: var(--c-amber); } .badge.violet { color: var(--c-violet); } .badge.red { color: var(--c-red); } .badge.teal { color: var(--c-teal); } .badge.purple { color: var(--c-purple); }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(18px, 3vw, 38px); max-width: 1760px; margin: 0 auto; padding-block: 22px; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 24px; container-type: inline-size; }
.sidebar { position: sticky; top: 22px; z-index: 20; align-self: start; width: 246px; height: calc(100dvh - 44px); min-height: 560px; display: flex; flex-direction: column; gap: 20px; padding: 14px; border-radius: 32px; background: var(--rbg); box-shadow: var(--raise); transition: width .38s cubic-bezier(.3, .7, .2, 1), box-shadow .38s ease; }
.brand { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 14px; color: var(--accent); white-space: nowrap; }
.brand svg { width: 30px; height: 30px; flex: none; } .brand-name { font-weight: 800; font-size: 19px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: none; padding: 4px; margin: -4px; }
.nav-item { --d: var(--dip); display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 16px; border-radius: 20px; color: var(--muted); font-weight: 600; font-size: 15px; text-align: start; transition: color .25s, transform .25s; text-decoration: none !important; }
.nav-item:hover { color: var(--ink); transform: translateY(-1px); } .nav-item[aria-current="page"] { color: var(--pc); }
.nav-item .label { flex: 1; white-space: nowrap; overflow: hidden; min-width: 0; transition: opacity .2s; }
.nav-item .cnt { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; box-shadow: none; }
.led { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--lo); transition: background .25s, box-shadow .25s; } .nav-item[aria-current="page"] .led { background: var(--pc); box-shadow: 0 0 9px var(--pc); }
.tip { position: absolute; inset-inline-end: calc(100% + 18px); top: 50%; transform: translate(6px, -50%); z-index: 5; padding: 7px 14px; border-radius: 14px; background: var(--rbg); box-shadow: var(--raise-sm); font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
[dir="rtl"] .tip { transform: translate(-6px, -50%); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.collapse { min-height: 46px; border-radius: 18px; } .collapse svg.ic { transition: transform .38s; } [dir="ltr"] .collapse svg.ic { transform: rotate(180deg); } .collapse[aria-expanded="false"] svg.ic { transform: rotate(180deg); } [dir="ltr"] .collapse[aria-expanded="false"] svg.ic { transform: none; }
@media (min-width: 961px) {
  .sidebar.is-collapsed { width: 84px; } .sidebar.is-collapsed .brand { gap: 0; padding: 0 12px; } .sidebar.is-collapsed .brand-name, .sidebar.is-collapsed .nav-item .label, .sidebar.is-collapsed .nav-item .cnt, .sidebar.is-collapsed .led { opacity: 0; flex: 0 0 0; width: 0; margin: 0; padding: 0; overflow: hidden; }
  .sidebar.is-collapsed .nav-item { gap: 0; } .sidebar.is-collapsed .nav-item:hover .tip, .sidebar.is-collapsed .nav-item:focus-visible .tip { opacity: 1; transform: translate(0, -50%); }
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; } .mark-top { display: none; line-height: 0; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .desk-only { display: contents; } @media (max-width: 960px) { .desk-only { display: none; } }
.help { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 22px; color: var(--accent); font-weight: 700; font-size: 14px; transition: transform .25s; } .help:hover { transform: translateY(-1px); }
.theme { position: relative; isolation: isolate; width: 82px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: var(--muted); direction: ltr; }
.theme::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--dbg); box-shadow: var(--dip-sm); z-index: -1; } .theme .ic { width: 20px; height: 20px; }
.knob { position: absolute; top: 5px; left: 5px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--rbg); box-shadow: var(--raise-sm); color: #C77A0A; transition: transform .4s cubic-bezier(.3, .7, .2, 1); }
.theme[aria-checked="true"] .knob { transform: translateX(38px); color: var(--accent); } .knob .ic { width: 19px; height: 19px; }
.pausebar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 20px; background: var(--dbg); box-shadow: var(--dip); flex-wrap: wrap; }
.pausebar.warn b { color: var(--c-amber); } .pausebar.bad b { color: var(--c-red); } .pausebar .grow { min-width: 200px; }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); padding-bottom: 130px; padding-top: 14px; }
  .sidebar { position: fixed; z-index: 30; top: auto; height: auto; min-height: 0; width: auto; flex-direction: row; padding: 10px; border-radius: 30px; inset: auto max(14px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); }
  .brand, .collapse, .tip, .side-foot { display: none; } .nav { flex-direction: row; gap: 6px; width: 100%; overflow: visible; padding: 0; margin: 0; }
  .nav-item { flex: 1; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; min-height: 64px; padding: 0 2px; border-radius: 22px; font-size: 11.5px; position: relative; color: color-mix(in srgb, var(--pc) 38%, var(--muted)); }
  .nav-item:hover { transform: none; color: var(--pc); } .nav-item[aria-current="page"] { color: #fff; }
  .nav-item[aria-current="page"]::after { background: var(--brand); box-shadow: -2px -2px 3px var(--hi), 3px 4px 8px var(--lo), inset 1px 1px 0 rgba(255,255,255,.3); }
  .nav-item .label { flex: none; overflow: visible; font-size: 11px; } .led { display: none; } .nav-item.desk { display: none; } .nav-item .cnt { position: absolute; top: 4px; inset-inline-end: 12px; min-width: 18px; height: 18px; font-size: 10.5px; }
  .mark-top { display: block; } .toast { bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (min-width: 961px) { .nav-item.mob { display: none; } }
@media (max-width: 560px) { .help span { display: none; } .help { width: 44px; padding: 0; justify-content: center; } .card { padding: 16px; } .nav { gap: 3px; } }

/* ---- the account card, tiles, numbers ---- */
.layout { display: grid; grid-template-columns: minmax(290px, 370px) minmax(0, 1fr); gap: 28px; align-items: start; }
.side-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; } .sections { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
@container (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); } .side-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); align-items: start; } }
.acc-name { font-weight: 800; font-size: 16px; overflow-wrap: anywhere; }
.acc-menu { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 20px; background: var(--dbg); box-shadow: var(--dip); }
.acc-menu button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-align: start; } .acc-menu button:hover { color: var(--accent); } .acc-menu .on { color: var(--ink); }
.sec-title { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 15px; font-weight: 800; }
.sec-title .bar { width: 5px; height: 20px; border-radius: 3px; background: var(--pc, var(--accent)); box-shadow: 0 0 8px var(--pc, var(--accent)); } .sec-title .line { flex: 1; height: 6px; border-radius: 4px; background: var(--dbg); box-shadow: var(--dip-sm); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.tiles.q5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.tiles.q4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @container (min-width: 1180px) { .tiles.q4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } } @media (max-width: 420px) { .tiles.q4 { grid-template-columns: minmax(0, 1fr); } }
.tile { display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 92px; padding: 16px 18px; text-align: start; background: var(--rbg); border-radius: var(--r); box-shadow: var(--raise); transition: transform .3s, box-shadow .3s; color: inherit; text-decoration: none !important; }
a.tile:hover, button.tile:hover { transform: translateY(-3px); box-shadow: var(--raise-lg); } button.tile:active, a.tile:active { transform: none; box-shadow: var(--dip); background: var(--dbg); }
.tile .num-big { font-size: 28px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; } .tile .cap { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.tile.hot .num-big { color: var(--c-pink); }
.hero { display: flex; flex-direction: column; gap: 14px; }
.hero .big { font-size: 44px; font-weight: 800; line-height: 1.1; color: var(--c-pink); font-variant-numeric: tabular-nums; }
.hero.calm .big { color: var(--accent); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 20px; text-align: center; border-radius: 28px; background: var(--dbg); box-shadow: var(--dip); } .empty p { max-width: 46ch; color: var(--muted); }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; } .check .tick { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--dbg); box-shadow: var(--dip-sm); color: transparent; flex: none; } .check.done .tick { color: #fff; background: var(--brand); box-shadow: none; } .check.done .t { color: var(--muted); text-decoration: line-through; } .check .tick svg { width: 16px; height: 16px; stroke-width: 2.6; }
.funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.funnel .f { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; } .funnel .bar { width: 100%; border-radius: 14px; background: var(--dbg); box-shadow: var(--dip-sm); height: 110px; position: relative; overflow: hidden; } .funnel .bar i { position: absolute; inset-inline: 4px; bottom: 4px; border-radius: 11px; height: var(--h, 10%); min-height: 12px; background: linear-gradient(180deg, var(--c1), var(--c2)); }
.funnel .n { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; } .funnel .l { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.4; }

/* ---- chart ---- */
.legend { display: flex; flex-wrap: wrap; gap: 10px; } .plot { position: relative; min-width: 0; } .plot svg { display: block; overflow: visible; }
.plot .tick, .plot .xl { fill: var(--muted); font-size: 11.5px; font-family: inherit; font-variant-numeric: tabular-nums; } .plot .gridl { stroke: var(--grid); stroke-width: 1; } .plot .axisl { stroke: var(--axis); stroke-width: 1; } .plot .bandbg { fill: var(--band); opacity: 0; transition: opacity .2s; } .plot .band { outline: none; } .plot .band.hov .bandbg { opacity: 1; } .plot .peak { fill: var(--ink); font-size: 12px; font-weight: 700; font-family: inherit; }
.ctip { position: absolute; z-index: 6; min-width: 150px; padding: 10px 14px; border-radius: 16px; background: var(--rbg); box-shadow: var(--raise-sm); pointer-events: none; font-size: 12.5px; opacity: 0; transition: opacity .15s; } .ctip.show { opacity: 1; } .ctip .th { color: var(--muted); font-weight: 600; margin-bottom: 4px; } .ctip .tr { display: flex; align-items: center; gap: 8px; line-height: 1.9; } .ctip .key { width: 12px; height: 3px; border-radius: 2px; flex: none; }

/* ---- lists ---- */
.row-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; background: var(--rbg); box-shadow: var(--raise-sm); min-width: 0; color: inherit; text-align: start; width: 100%; transition: transform .25s, box-shadow .25s; text-decoration: none !important; }
button.row-item:hover, a.row-item:hover { transform: translateY(-2px); box-shadow: var(--raise); } button.row-item:active, a.row-item:active { transform: none; box-shadow: var(--dip-sm); }
.row-item.sel { box-shadow: var(--dip-sm); background: var(--dbg); } .row-item.unread .nm { font-weight: 800; } .row-item.unread::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c-pink); box-shadow: 0 0 8px var(--c-pink); flex: none; margin-inline-end: -4px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff; flex: none; background: linear-gradient(145deg, var(--a1, #7A5CFF), var(--a2, #5236E0)); box-shadow: var(--raise-sm); text-transform: uppercase; } .avatar.sm { width: 36px; height: 36px; font-size: 14px; } .avatar.lg { width: 56px; height: 56px; font-size: 21px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.meter { display: inline-flex; align-items: center; gap: 8px; } .meter .groove { width: 64px; height: 8px; } .meter .groove > i { top: 1.5px; bottom: 1.5px; }

/* ---- messages ---- */
.split { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.split .listcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: sticky; top: 22px; max-height: calc(100dvh - 120px); }
.split .listcol .list { overflow-y: auto; padding: 6px 6px 14px; margin: -6px; min-height: 0; flex: 1; scrollbar-width: thin; }
.thread { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.thread-head { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; } .thread-head .btn { flex: none; } .thread-head .grow h2 { font-size: 16px; }
@media (max-width: 560px) { .thread-head .avatar.lg { width: 44px; height: 44px; font-size: 17px; } .thread-head .btn span, .thread-head .btn { padding: 0 12px; } }
.msgs { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 26px; background: var(--dbg); box-shadow: var(--dip); max-height: min(58dvh, 620px); min-height: 200px; overflow-y: auto; scrollbar-width: thin; direction: ltr; }
.bub { max-width: min(82%, 520px); padding: 10px 16px; border-radius: 20px; line-height: 1.8; background: var(--rbg); box-shadow: var(--raise-sm); white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-start; border-bottom-left-radius: 6px; }
.bub.out { align-self: flex-end; border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; background: var(--brand); color: #fff; box-shadow: -2px -2px 3px var(--hi), 3px 3px 6px var(--lo); }
.bub.out.rule { background: #2B8FE0; } .bub.out.human { background: var(--brand); } .bub.out.external { background: linear-gradient(145deg, #8E92B0, #666A8A); }
.bub .by { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; opacity: .85; margin-bottom: 2px; } .bub .by svg { width: 13px; height: 13px; stroke-width: 2.2; } .bub .at { font-size: 10.5px; opacity: .7; margin-top: 2px; }
.bub .pub { font-size: 10.5px; font-weight: 700; opacity: .85; }
.daysep { align-self: center; font-size: 11.5px; color: var(--muted); padding: 2px 12px; border-radius: 10px; background: var(--rbg); box-shadow: var(--raise-sm); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 20px; background: var(--dbg); box-shadow: var(--dip); } .banner .ic { margin-top: 3px; }
.banner.pink .ic { color: var(--c-pink); } .banner.violet .ic { color: var(--c-violet); } .banner.amber .ic { color: var(--c-amber); } .banner.red .ic { color: var(--c-red); } .banner.blue .ic { color: var(--c-blue); } .banner.green .ic { color: var(--c-green); }
.composer { display: flex; flex-direction: column; gap: 10px; }
.stagepick { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: none; }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); } .split .listcol { position: static; max-height: none; } .split.open-thread .listcol { display: none; } .split:not(.open-thread) .thread { display: none; } .back { display: grid; }
}

/* ---- the phone preview ---- */
.phone { width: min(100%, 320px); margin-inline: auto; border-radius: 40px; padding: 10px; background: #1c1e2a; box-shadow: -2px -2px 3px var(--hi), 6px 8px 18px var(--lo), 14px 16px 34px var(--lo2); }
.phone .screen { border-radius: 31px; background: #FBFBFD; color: #1D1F2C; min-height: 430px; display: flex; flex-direction: column; overflow: hidden; position: relative; font-size: 13.5px; }
:root[data-theme="dark"] .phone .screen { background: #14151D; color: #ECEDF6; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone .screen { background: #14151D; color: #ECEDF6; } }
.phone .notch { position: absolute; top: 8px; inset-inline: 0; margin-inline: auto; width: 90px; height: 24px; border-radius: 12px; background: #0B0C12; z-index: 2; }
.phone .ph-head { display: flex; align-items: center; gap: 10px; padding: 40px 14px 10px; border-bottom: 1px solid rgba(120,126,165,.22); } .phone .ph-head b { font-size: 13px; } .phone .ph-head .avatar { width: 30px; height: 30px; font-size: 12px; box-shadow: none; }
.phone .ph-body { direction: ltr; flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 14px 12px; overflow-y: auto; }
.phone .pb { max-width: 82%; padding: 8px 13px; border-radius: 18px; background: rgba(120,126,165,.2); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-start; font-size: 13px; }
.phone .pb.me { align-self: flex-end; background: var(--brand); color: #fff; }
.phone .pb.dim { opacity: .55; font-style: italic; } .phone .plink { align-self: flex-end; max-width: 82%; padding: 9px 14px; border-radius: 16px; border: 1px solid rgba(37,99,235,.5); color: #1D4ED8; font-weight: 700; font-size: 12.5px; text-align: center; } :root[data-theme="dark"] .phone .plink { color: #8FB4FF; }
.phone .pmedia { align-self: flex-end; width: 62%; height: 90px; border-radius: 16px; background: linear-gradient(145deg, rgba(37,99,235,.25), rgba(22,163,74,.25)); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #1D4ED8; }
.phone .pcm { background: rgba(120,126,165,.12); border-radius: 14px; padding: 10px 12px; margin-bottom: 4px; } .phone .pcm .who { font-weight: 800; font-size: 12px; } .phone .pcm .rep { margin-top: 8px; padding-inline-start: 12px; border-inline-start: 2px solid rgba(37,99,235,.5); }
.phone .ph-foot { padding: 8px 12px 14px; } .phone .fake-in { border: 1px solid rgba(120,126,165,.35); border-radius: 18px; padding: 7px 14px; color: #8B8FA8; font-size: 12px; }
.ph-tabs { display: flex; justify-content: center; margin-bottom: 12px; }
.sentence { font-size: 15.5px; line-height: 2.1; } .sentence .w { display: inline-block; padding: 0 12px; margin: 0 2px; border-radius: 12px; background: var(--dbg); box-shadow: var(--dip-sm); font-weight: 700; color: var(--pc, var(--accent)); line-height: 1.8; } .sentence .w.empty { color: var(--muted); font-weight: 500; }

/* ---- wizard ---- */
.steps { display: flex; align-items: center; gap: 0; justify-content: center; margin: 4px 0 6px; }
.steps button { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-weight: 700; color: var(--muted); transition: color .25s; } .steps button .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.steps button.on { color: var(--pc); } .steps button.done { color: var(--c-green); } .steps .sep { width: clamp(18px, 6vw, 60px); height: 4px; border-radius: 2px; background: var(--dbg); box-shadow: var(--dip-sm); margin-inline: 6px; } .steps .sep.done { background: var(--brand); box-shadow: none; }
@media (max-width: 560px) { .steps button .t { display: none; } .steps button.on .t { display: inline; } }
.wiz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 28px; align-items: start; } .wiz .pv { position: sticky; top: 22px; } @container (max-width: 900px) { .wiz { grid-template-columns: minmax(0, 1fr); } .wiz .pv { position: static; } }
.choice { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px; text-align: start; width: 100%; color: var(--muted); transition: color .25s; } .choice.on { color: var(--ink); } .choice .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; } .choice .t b { color: var(--ink); font-size: 15px; }
.choice .mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--dbg); box-shadow: var(--dip-sm); color: transparent; flex: none; } .choice.on .mark { color: #fff; background: var(--brand); box-shadow: none; } .choice .mark svg { width: 15px; height: 15px; stroke-width: 2.8; }
.postgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.postcard { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 20px; text-align: start; color: var(--muted); transition: color .25s; } .postcard .pic { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(37,99,235,.22), rgba(240,180,41,.22)); color: var(--accent); overflow: hidden; position: relative; } .postcard .pic img { width: 100%; height: 100%; object-fit: cover; } .postcard .pic .mark { position: absolute; top: 6px; inset-inline-end: 6px; }
.postcard.on { color: var(--ink); } .postcard .pt { font-size: 12.5px; line-height: 1.6; }
.variant { display: flex; gap: 10px; align-items: flex-start; } .variant .inp { flex: 1; } .varlab { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.insert { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.block-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; } @media (max-width: 640px) { .block-row { grid-template-columns: minmax(0, 1fr) auto; } .block-row > :nth-child(2), .block-row > :nth-child(3) { grid-column: 1 / -1; } }
.section { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 24px; background: var(--rbg); box-shadow: var(--raise-sm); } .section.off > .body { display: none; } .section > .head { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.rule-card { display: flex; flex-direction: column; gap: 14px; } .rule-card .sum { font-size: 13.5px; line-height: 1.9; color: var(--muted); } .rule-card .sum b { color: var(--ink); }
.starter { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px; text-align: start; width: 100%; background: var(--rbg); box-shadow: var(--raise-sm); transition: transform .25s, box-shadow .25s; } .starter:hover { transform: translateY(-2px); box-shadow: var(--raise); }
.starter .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .starter .t b { font-size: 14.5px; }
.tester { display: flex; flex-direction: column; gap: 14px; }
.result { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 20px; background: var(--dbg); box-shadow: var(--dip); }

/* ---- diagrams (flowcharts) and their popovers ---- */
.explain { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--accent); vertical-align: middle; flex: none; } .explain svg.ic { width: 17px; height: 17px; stroke-width: 2; }
.pop { position: fixed; z-index: 80; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 18px; border-radius: 26px; background: var(--rbg); box-shadow: var(--raise-lg), 0 24px 60px rgba(30,32,60,.28); animation: popin .18s ease-out; }
@keyframes popin { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(30,32,50,.38); backdrop-filter: blur(2px); animation: fadein .2s; } @keyframes fadein { from { opacity: 0; } }
@media (max-width: 640px) { .pop { inset: auto 0 0 0 !important; width: auto; max-height: 86dvh; border-radius: 28px 28px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); } }
.dg { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 14px; justify-content: center; }
.dg-node { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 10px; width: 116px; border-radius: 20px; background: var(--dbg); box-shadow: var(--dip-sm); font-size: 12px; line-height: 1.5; font-weight: 600; position: relative; } .dg-node .well { width: 38px; height: 38px; border-radius: 13px; }
.dg-node small { font-weight: 500; color: var(--muted); font-size: 11px; line-height: 1.4; }
.dg-node.trigger .well { color: var(--c-blue); } .dg-node.do .well { color: var(--c-green); } .dg-node.ai .well { color: var(--c-violet); } .dg-node.human .well { color: var(--c-pink); } .dg-node.if .well { color: var(--c-amber); } .dg-node.stop .well { color: var(--c-red); } .dg-node.result .well { color: var(--c-teal); }
.dg-node .well::before, .dg-node .well::after { content: none; } .dg-node .well { background: var(--rbg); box-shadow: var(--raise-sm); }
.dg-arrow { display: flex; align-items: center; justify-content: center; width: 30px; color: var(--muted); flex: none; } .dg-arrow svg { width: 22px; height: 22px; stroke-width: 2.2; transform: scaleX(var(--flip, 1)); } [dir="rtl"] .dg-arrow svg { --flip: -1; }
.dg-fork { display: flex; flex-direction: column; gap: 10px; align-items: stretch; justify-content: center; } .dg-branch { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 22px; background: var(--rbg); box-shadow: var(--raise-sm); } .dg-branch .lab2 { font-size: 11px; font-weight: 800; color: var(--muted); width: 54px; text-align: center; flex: none; line-height: 1.4; }
.dg-branch .dg-node { width: 98px; padding: 8px 6px; box-shadow: var(--dip-sm); } .dg-branch .dg-arrow { width: 20px; }
.dg-cap { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.9; text-align: start; }
.dg-stage { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; text-align: start; font-size: 13px; }
.inline-diagram { padding: 18px; border-radius: 24px; background: var(--dbg); box-shadow: var(--dip); }

/* ---- modal / sheet ---- */
.modal { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(30,32,50,.42); backdrop-filter: blur(2px); animation: fadein .2s; }
.dialog { width: min(640px, 100%); max-height: calc(100dvh - 28px); overflow: auto; padding: 22px; border-radius: 28px; background: var(--rbg); box-shadow: var(--raise-lg), 0 30px 80px rgba(30,32,60,.3); display: flex; flex-direction: column; gap: 16px; animation: popin .2s ease-out; } .dialog.wide { width: min(860px, 100%); }
@media (max-width: 640px) { .modal { align-items: end; padding: 0; } .dialog { border-radius: 28px 28px 0 0; max-height: 92dvh; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); } }
.toasts { position: fixed; inset-inline: 0; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 100; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 20px; background: var(--rbg); box-shadow: var(--raise); font-weight: 600; font-size: 13.5px; animation: popin .25s ease-out; max-width: calc(100vw - 28px); } .toast .ic { width: 20px; height: 20px; color: var(--good); } .toast.bad .ic { color: var(--bad); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--lo2); border-top-color: var(--accent); animation: rot .8s linear infinite; display: inline-block; } @keyframes rot { to { transform: rotate(360deg); } } .loading { display: grid; place-items: center; padding: 60px; }
.skel { border-radius: 18px; background: var(--dbg); box-shadow: var(--dip-sm); animation: pulse 1.4s ease-in-out infinite; } @keyframes pulse { 50% { opacity: .55; } }

/* ---- sign in ---- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 20px; padding: 32px 28px; border-radius: 34px; background: var(--rbg); box-shadow: var(--raise-lg); }
.auth .logo { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--accent); } .auth .logo svg { width: 44px; height: 44px; } .auth .logo b { font-size: 26px; color: var(--ink); font-weight: 800; }
.auth-tools { position: fixed; top: 16px; inset-inline-end: 16px; display: flex; gap: 10px; z-index: 5; }
.pw-rules { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); } .pw-rules .ok { color: var(--good); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ===================== v2: calm. Violet → blue only; green and amber appear only when they mean "done" or "careful" ===================== */
:root { --c-blue: #3F55D8; --c-pink: #5B3CF5; --c-teal: #3F55D8; --c-purple: #6C4DFF; --s1: #6F86F5; --s2: #7A5CFF; --s3: #B7A8FF; }
:root[data-theme="dark"] { --c-blue: #8FA2FF; --c-pink: #A08DFF; --c-teal: #8FA2FF; --c-purple: #B7A8FF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-blue: #8FA2FF; --c-pink: #A08DFF; --c-teal: #8FA2FF; --c-purple: #B7A8FF; } }
.well, .well.on { --pa: var(--brand); --pb: var(--brand); }
.badge.pink, .badge.blue, .badge.teal, .badge.purple { color: var(--accent); }

/* the menu: plain until chosen */
.nav { gap: 6px; }
.nav-item { background: none; box-shadow: none; min-height: 50px; border-radius: 25px; color: var(--muted); font-weight: 600; }
.nav-item:hover { color: var(--ink); transform: none; }
.nav-item[aria-current="page"], .nav-item[aria-expanded="true"] { color: var(--accent); background: var(--rbg); box-shadow: var(--raise-sm); }
.nav-item .led { display: none; }
.nav-item .chev { width: 16px; height: 16px; opacity: .55; }
.nav-item .circ { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; }
.nav-item[aria-current="page"] .circ { background: var(--brand); color: #fff; box-shadow: none; }
.nav-item .circ svg.ic { width: 20px; height: 20px; }
.sidebar.is-collapsed .nav-item .chev { display: none; }

/* the submenu: frosted glass */
.flyout { position: fixed; z-index: 60; min-width: 230px; padding: 10px; border-radius: 28px; display: flex; flex-direction: column; gap: 4px; background: color-mix(in srgb, var(--bg) 58%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); border: 1px solid rgba(255,255,255,.55); box-shadow: 0 18px 50px rgba(40,44,90,.28), inset 0 1px 0 rgba(255,255,255,.6); animation: popin .18s ease-out; }
:root[data-theme="dark"] .flyout { border-color: rgba(255,255,255,.12); box-shadow: 0 18px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); }
.flyout a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px 0 10px; border-radius: 23px; color: var(--ink); font-weight: 600; text-decoration: none !important; transition: background .2s; } [dir="rtl"] .flyout a { padding: 0 10px 0 14px; }
.flyout a:hover { background: color-mix(in srgb, var(--bg) 40%, transparent); } .flyout a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--bg) 70%, transparent); box-shadow: var(--raise-sm); }
.flyout .circ { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); } .flyout a[aria-current="page"] .circ { color: var(--accent); } .flyout .circ svg.ic { width: 19px; height: 19px; }
.flyout .cnt { margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* the dock on phones: small circles, no labels, plain until chosen */
@media (max-width: 960px) {
  .sidebar { padding: 7px; border-radius: 999px; inset: auto 50% calc(14px + env(safe-area-inset-bottom, 0px)) auto; transform: translateX(50%); width: max-content; max-width: calc(100vw - 28px); }
  [dir="ltr"] .sidebar { transform: translateX(50%); }
  .nav { gap: 4px; width: auto; justify-content: center; }
  .nav-item { flex: none; width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; justify-content: center; background: none !important; box-shadow: none !important; color: var(--muted) !important; position: relative; }
  .nav-item::before, .nav-item::after { content: none !important; }
  .nav-item .label, .nav-item .chev, .nav-item .tip { display: none; }
  .nav-item .circ { width: 46px; height: 46px; background: none; }
  .nav-item .circ svg.ic { width: 22px; height: 22px; }
  .nav-item[aria-current="page"] .circ, .nav-item[aria-expanded="true"] .circ { background: var(--brand); color: #fff; box-shadow: none; }
  .nav-item .cnt { position: absolute; top: 3px; inset-inline-end: 3px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .app { padding-bottom: 96px; } .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* squares with soft corners for the numbers */
.sqgrid { display: grid; grid-template-columns: repeat(auto-fill, 168px); gap: 18px; justify-content: start; } @media (max-width: 420px) { .sqgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sq { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; aspect-ratio: 1 / 1; min-height: 0; padding: 18px; border-radius: 30px; background: var(--rbg); box-shadow: var(--raise); color: inherit; text-decoration: none !important; text-align: start; transition: transform .3s, box-shadow .3s; }
a.sq:hover, button.sq:hover { transform: translateY(-3px); box-shadow: var(--raise-lg); }
.sq .ico { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: var(--dbg); box-shadow: var(--dip-sm); } .sq .ico svg.ic { width: 20px; height: 20px; }
.sq .n { font-size: 32px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; } .sq .cap { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.sq.hl .n { color: var(--accent); }

/* one calm chart */
.mini { display: flex; align-items: flex-end; gap: clamp(8px, 2.4vw, 22px); height: 150px; padding: 8px 4px 0; }
.mini .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; min-width: 0; }
.mini .bar { width: min(26px, 100%); border-radius: 13px; background: var(--brand); opacity: .45; min-height: 6px; height: var(--h); transition: opacity .2s, transform .2s; position: relative; }
.mini .col.today .bar, .mini .col:hover .bar { opacity: 1; } .mini .col .v { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 16px; } .mini .col.today .v { color: var(--accent); } .mini .d { font-size: 11px; color: var(--muted); }

/* the AI credit, quietly above every page */
.credit { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--dbg); box-shadow: var(--dip-sm); font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none !important; font-variant-numeric: tabular-nums; }
.credit svg.ic { width: 17px; height: 17px; color: var(--accent); } .credit small { font-weight: 500; color: var(--muted); font-size: 11.5px; } .credit.low { color: var(--c-amber); }

/* messages: a calm list; the conversation opens only when asked for */
.convlist { display: flex; flex-direction: column; gap: 4px; max-width: 860px; }
.conv { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 22px; color: inherit; width: 100%; text-align: start; transition: background .2s, box-shadow .2s; }
.conv:hover { background: var(--rbg); box-shadow: var(--raise-sm); }
.conv .nm { font-weight: 700; } .conv.unread .nm { color: var(--ink); } .conv .pv { font-size: 13px; color: var(--muted); }
.conv .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); flex: none; }
.conv .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; } .conv .meta .t { font-size: 11.5px; color: var(--muted); }
.convhead { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.drawer-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(30,32,50,.3); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fadein .2s; }
.drawer { position: fixed; z-index: 75; top: 12px; bottom: 12px; inset-inline-end: 12px; width: min(600px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 32px; overflow: hidden; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4); border: 1px solid rgba(255,255,255,.5); box-shadow: 0 24px 70px rgba(30,32,70,.35); animation: slidein .25s ease-out; }
:root[data-theme="dark"] .drawer { border-color: rgba(255,255,255,.1); } @keyframes slidein { from { opacity: 0; transform: translateX(-24px); } } [dir="ltr"] .drawer { animation-name: slidein2; } @keyframes slidein2 { from { opacity: 0; transform: translateX(24px); } }
.drawer .scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; flex: 1; padding: 2px; scrollbar-width: thin; }
.drawer .msgs { max-height: min(40dvh, 400px); min-height: 140px; flex: none; }
@media (max-width: 700px) { .drawer { inset: 0; width: auto; border-radius: 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px)); } }
.acc { border-radius: 22px; background: var(--rbg); box-shadow: var(--raise-sm); overflow: hidden; } .acc > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; font-weight: 700; cursor: pointer; } .acc > summary::-webkit-details-marker { display: none; }
.acc > summary .chev { margin-inline-start: auto; width: 18px; height: 18px; transition: transform .25s; color: var(--muted); } .acc[open] > summary .chev { transform: rotate(180deg); } .acc .in { padding: 4px 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.softbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 20px; background: var(--dbg); box-shadow: var(--dip-sm); font-size: 13px; flex-wrap: wrap; } .softbar svg.ic { width: 18px; height: 18px; color: var(--accent); flex: none; } .softbar.warn svg.ic { color: var(--c-amber); } .softbar.bad svg.ic { color: var(--c-red); }
.pausebar { background: var(--dbg); }

.mob-only { display: none; } @media (max-width: 960px) { .mob-only { display: grid; } }

/* the dashboard: every element is the same rounded square */
.sqboard { display: grid; grid-template-columns: repeat(auto-fill, 236px); gap: 20px; justify-content: start; }
.sqc { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; aspect-ratio: 1 / 1; padding: 18px; border-radius: 30px; background: var(--rbg); box-shadow: var(--raise); color: inherit; text-decoration: none !important; text-align: start; overflow: hidden; min-width: 0; transition: transform .3s, box-shadow .3s; }
a.sqc:hover { transform: translateY(-3px); box-shadow: var(--raise-lg); }
.sqc .ico { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: var(--dbg); box-shadow: var(--dip-sm); flex: none; } .sqc .ico svg.ic { width: 20px; height: 20px; }
.sqc .n { font-size: 34px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; } .sqc .cap { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; } .sqc.hl .n { color: var(--accent); }
.sqc .go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent); } .sqc .go svg.ic { width: 16px; height: 16px; }
.sqc .fit { overflow: hidden; gap: 6px; } .sqc .check { min-height: 30px; gap: 10px; font-size: 12.5px; line-height: 1.4; } .sqc .check .tick { width: 22px; height: 22px; } .sqc .check .tick svg { width: 13px; height: 13px; }
.sqc .mini { height: auto; flex: 1; min-height: 0; gap: 6px; padding: 0; } .sqc .mini .bar { width: min(14px, 100%); border-radius: 7px; } .sqc .mini .v { font-size: 10px; min-height: 13px; } .sqc .mini .d { font-size: 9.5px; white-space: nowrap; }
.mini-row { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 12px; border-radius: 17px; background: var(--dbg); box-shadow: var(--dip-sm); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none !important; }
.dotst { width: 9px; height: 9px; border-radius: 50%; background: var(--lo); flex: none; } .dotst.on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.sqc .acc-menu { position: absolute; z-index: 3; }
@media (max-width: 560px) { .sqboard { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .sqc { padding: 14px; border-radius: 26px; } .sqc .n { font-size: 28px; } .sqc .cap { font-size: 11.5px; } .sqc .fit { overflow-y: auto; } }

.postcard .pic img { position: absolute; inset: 0; z-index: 1; } .postcard .pic .mark { z-index: 2; }

.row-item .groove { flex: 1; min-width: 90px; }

/* ===================== v3: the layout of the reference screens ===================== */
/* "add new" is the one loud thing; the shortcuts below it are faded until you reach for them */
.addbar { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 27px; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none !important; box-shadow: -2px -2px 3px var(--hi), 4px 6px 14px var(--lo), inset 1px 1px 0 rgba(255,255,255,.3); transition: transform .25s, filter .25s; width: 100%; }
.addbar:hover { transform: translateY(-2px); filter: brightness(1.06); } .addbar svg.ic { width: 22px; height: 22px; stroke-width: 2.2; }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.shortcut { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-radius: 22px; color: inherit; text-align: start; text-decoration: none !important; background: transparent; border: 1px dashed color-mix(in srgb, var(--muted) 40%, transparent); opacity: .5; transition: opacity .25s, transform .25s, box-shadow .25s, background .25s, border-color .25s; width: 100%; }
.shortcut:hover, .shortcut:focus-visible { opacity: 1; background: var(--rbg); box-shadow: var(--raise-sm); border-color: transparent; transform: translateY(-2px); }
.shortcut .ico { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--dbg); box-shadow: var(--dip-sm); color: var(--accent); flex: none; } .shortcut .ico svg.ic { width: 19px; height: 19px; }
.shortcut b { font-size: 14px; } .shortcut .d { font-size: 11.5px; color: var(--muted); }
.shortcut .t { display: flex; flex-direction: column; min-width: 0; }
/* the feature cards of the dashboard: wide, an icon, a title, one line */
.featgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.feat { display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 12px 16px; border-radius: 24px; background: var(--rbg); box-shadow: var(--raise-sm); color: inherit; text-align: start; text-decoration: none !important; transition: transform .25s, box-shadow .25s; }
.feat:hover { transform: translateY(-3px); box-shadow: var(--raise); } .feat:active { transform: none; box-shadow: var(--dip-sm); }
.feat .ico { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; background: var(--dbg); box-shadow: var(--dip-sm); color: var(--accent); flex: none; } .feat .ico svg.ic { width: 21px; height: 21px; }
.feat .t { display: flex; flex-direction: column; min-width: 0; } .feat .t b { color: var(--accent); font-size: 15px; } .feat .t span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.banner-soft { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 26px; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); box-shadow: var(--raise-sm); } .banner-soft .h { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--accent); } .banner-soft .h .x { margin-inline-start: auto; }
.statsbtn[aria-pressed="true"] { color: var(--accent); }
.acc-menu .addacc { color: #fff; background: var(--brand); font-weight: 800; justify-content: center; min-height: 46px; border-radius: 23px; margin-bottom: 6px; } .acc-menu .addacc:hover { color: #fff; filter: brightness(1.07); }
.acc-menu button:not(.addacc) { opacity: .6; } .acc-menu button:not(.addacc):hover, .acc-menu button.on { opacity: 1; }

/* the reply editor: settings on one side, the phone on the other */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 34px; align-items: start; }
@container (max-width: 920px) { .editor { grid-template-columns: minmax(0, 1fr); } }
.editor .colhead { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 4px; } .editor .colhead h2 { font-size: 18px; }
.dots { display: inline-flex; align-items: center; } .dots i { width: 13px; height: 13px; border-radius: 50%; background: var(--lo2); transition: background .3s; } .dots i.on { background: var(--accent); box-shadow: none; } .dots b { width: 14px; height: 3px; background: var(--lo2); } .dots b.on { background: var(--accent); }
.fieldrow { display: flex; gap: 10px; align-items: stretch; } .fieldrow .grow { min-width: 0; } .fieldrow .cta { width: 52px; padding: 0; min-height: 52px; border-radius: 17px; }
.tipbox { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 22px; background: color-mix(in srgb, #F0B429 16%, var(--bg)); color: var(--ink); font-size: 12.5px; line-height: 1.9; } .tipbox svg.ic { width: 34px; height: 34px; color: #D98E10; flex: none; stroke-width: 1.6; }
.builder { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pbx { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; line-height: 1.7; resize: none; outline: none; padding: 0; min-height: 1.7em; overflow: hidden; display: block; }
.pb.me.edit { position: relative; max-width: 88%; padding-inline-end: 30px; } .pb.me.edit .px { position: absolute; top: 4px; inset-inline-end: 6px; width: 20px; height: 20px; border-radius: 50%; color: rgba(255,255,255,.75); display: grid; place-items: center; } .pb.me.edit .px:hover { color: #fff; background: rgba(255,255,255,.2); } .pb.me.edit .px svg { width: 12px; height: 12px; stroke-width: 2.6; }
.pb.me.edit .vl { font-size: 10px; opacity: .75; margin-bottom: 2px; }
.pcard { align-self: flex-end; width: 88%; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 16px; background: rgba(120,126,165,.14); position: relative; font-size: 12px; }
.pcard input { width: 100%; border: 0; border-bottom: 1px solid rgba(120,126,165,.35); background: transparent; color: inherit; font: inherit; padding: 4px 2px; outline: none; direction: ltr; } .pcard input.lab { direction: inherit; font-weight: 700; }
.pcard .pt2 { font-weight: 800; color: #6C4DFF; display: flex; align-items: center; gap: 6px; } :root[data-theme="dark"] .pcard .pt2 { color: #B7A8FF; } .pcard .px { position: absolute; top: 6px; inset-inline-end: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #8B8FA8; } .pcard .px svg { width: 12px; height: 12px; stroke-width: 2.6; }
.phone .ph-head .hi { margin-inline-start: auto; display: flex; gap: 10px; color: #8B8FA8; } .phone .ph-head .hi svg { width: 17px; height: 17px; }
.phone .ph-body { min-height: 300px; }
.submit-outline { border: 1.5px solid var(--accent) !important; color: var(--accent) !important; border-radius: 18px; min-height: 50px; font-weight: 800; }

/* the post chooser: a window with tall pictures, confirm and cancel */
.postgrid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .postgrid.compact .postcard { padding: 0; background: none; box-shadow: none; border-radius: 16px; }
.postgrid.compact .postcard::before, .postgrid.compact .postcard::after { content: none !important; }
.postgrid.compact .pic { aspect-ratio: 9 / 16; border-radius: 16px; } .postgrid.compact .postcard.on .pic { outline: 3px solid var(--accent); outline-offset: -3px; } .postgrid.compact .pt, .postgrid.compact .tiny { display: none; }
.dialog.picker { width: min(520px, 100%); } .dialog.picker .pgwrap { max-height: 58dvh; overflow-y: auto; padding: 2px; }

/* ===================== v4: no more dipped buttons =====================
   not selected: flat and faint · hover: raised · selected: raised with a soft tint of the accent */
.neu::before { background: transparent !important; box-shadow: none !important; }
.neu::after { opacity: 0; }
.neu:hover::after, .neu:focus-visible::after { opacity: 1; }
.neu:active::after { opacity: .7; }
.neu[aria-pressed="true"]::after, .neu[aria-selected="true"]::after, .neu[aria-current="page"]::after, .neu.on::after {
  opacity: 1; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 14%, var(--rg-a)), color-mix(in srgb, var(--accent) 7%, var(--rg-b))), var(--paper); }
.neu:not(:hover):not(:focus-visible):not(.on):not([aria-pressed="true"]):not([aria-selected="true"]):not([aria-current="page"]):not([aria-expanded="true"]):not(.well):not(.knob) { color: var(--muted); }
.neu[aria-pressed="true"], .neu[aria-selected="true"], .neu.on:not(.well), .neu[aria-expanded="true"] { color: var(--accent); }
.btn.neu, .chip.neu { font-weight: 700; }
.seg::before { background: color-mix(in srgb, var(--muted) 8%, transparent); box-shadow: none; }
.seg button:hover, .seg button[aria-selected="true"] { color: var(--accent); }
/* icon wells: a faint tint, filled with the accent when chosen */
.well { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.well.on { background: none; }
/* the small flat things */
.badge, .credit, .softbar, .mini-row { background: color-mix(in srgb, var(--muted) 9%, transparent); box-shadow: none; }
.badge.green, .badge.amber, .badge.red, .badge.violet, .badge.blue, .badge.pink, .badge.teal, .badge.purple { background: color-mix(in srgb, currentColor 11%, transparent); }
.empty { background: color-mix(in srgb, var(--muted) 6%, transparent); box-shadow: none; }
.msgs { background: color-mix(in srgb, var(--muted) 6%, transparent); box-shadow: none; }
.sq .ico, .feat .ico, .shortcut .ico, .sqc .ico { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: none; }
.row-item.sel { background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: none; }

/* lists are cards: minimal, raised, they lift when you reach for them, the detail opens on click */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 18px; }
.ccard { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 128px; width: 100%; padding: 16px 18px; border-radius: 26px; background: var(--rbg); box-shadow: none; border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); color: inherit; text-align: start; text-decoration: none !important; cursor: pointer; transition: transform .25s, border-color .25s; }
.ccard:hover, .ccard:focus-visible { transform: translateY(-4px); box-shadow: none; } .ccard:active { transform: none; box-shadow: none; }
.ccard .top { display: flex; align-items: center; gap: 12px; min-width: 0; } .ccard .nm { font-weight: 800; font-size: 15px; } .ccard .sub { font-size: 12px; color: var(--muted); }
.ccard .pv { font-size: 13px; color: var(--muted); line-height: 1.7; } .ccard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.ccard .dot { position: absolute; top: 14px; inset-inline-end: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.ccard.unread .nm { color: var(--accent); }
.ccard .ico { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); flex: none; } .ccard .ico svg.ic { width: 21px; height: 21px; }
.ccard.off { opacity: .6; } .ccard.off:hover { opacity: 1; }
.cardgrid .daysep { grid-column: 1 / -1; justify-self: start; }
.rule-card { cursor: pointer; transition: transform .25s, box-shadow .25s; } .rule-card:hover { transform: translateY(-3px); box-shadow: var(--raise); }
.kv { display: flex; flex-direction: column; gap: 4px; } .kv .r { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--muted) 7%, transparent); } .kv .r span:first-child { color: var(--muted); font-size: 12.5px; } .kv .r b { font-size: 13.5px; text-align: end; overflow-wrap: anywhere; }

.cardgrid .empty { grid-column: 1 / -1; }

/* ===================== v5: compact forms: nothing stretches across the screen ===================== */
.editor { grid-template-columns: minmax(0, 520px) minmax(300px, 380px); justify-content: center; gap: 40px; }
.col640 { max-width: 640px; }
.selwrap { max-width: 280px; }
.field > .inp:not(textarea), .field > .selwrap { max-width: 420px; }
.field > textarea.inp { max-width: 640px; }
.swrow { justify-content: flex-start; gap: 16px; padding: 10px 16px; border-radius: 20px; background: color-mix(in srgb, var(--muted) 7%, transparent); min-height: 54px; max-width: 420px; }
.swrow .t { flex: 1; } .swrow > .switch { margin-inline-start: auto; }
.seg { flex-wrap: wrap; overflow: visible; }
.seg.fit { align-self: flex-start; }
.acc { max-width: 100%; }
.section { background: none; box-shadow: none; padding: 0; border-radius: 0; gap: 12px; } .section > .head { max-width: 420px; }

.acc { max-width: 420px; background: none; box-shadow: none; } .acc[open] { background: var(--rbg); box-shadow: var(--raise-sm); }
.acc > summary { width: fit-content; min-height: 40px; padding: 0 16px; border-radius: 20px; color: var(--muted); font-size: 13px; } .acc > summary:hover { color: var(--accent); box-shadow: var(--raise-sm); } .acc[open] > summary { width: 100%; box-shadow: none; color: var(--ink); }
.card.stack > .swrow, .card.stack > .field { max-width: 460px; }
.card.stack { max-width: 560px; } .card.stack .grid.two { grid-template-columns: 1fr 1fr; } .card.stack .grid.two .inp { max-width: none; }

/* ===================== expanding cards (Settings) ===================== */
.xcards { display: flex; gap: 14px; align-items: stretch; min-height: 340px; }
.xc { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; border-radius: 28px; background: color-mix(in srgb, var(--muted) 6%, transparent); transition: flex-grow .5s cubic-bezier(.2,.8,.2,1), background .3s, box-shadow .3s; overflow: hidden; }
.xc:hover { background: var(--rbg); box-shadow: var(--raise-sm); }
.xh { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; flex: 1; min-height: 260px; padding: 24px 14px; color: var(--muted); text-align: center; width: 100%; }
.xi { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 22px; transition: all .3s; } .xi svg { width: 28px; height: 28px; }
.xc:hover .xi { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.xt { font-size: 15px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; transition: opacity .25s; }
.xs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s, opacity .3s; font-size: 12.5px; }
.xs li { display: flex; align-items: center; gap: 8px; justify-content: center; } .xs svg { width: 16px; height: 16px; color: var(--accent); }
.xc:hover:not(.open) .xs { max-height: 160px; opacity: 1; }
.xch { width: 18px; height: 18px; opacity: .4; transition: transform .3s; }
.xc .in { display: none; }
/* one open: it takes the room, the others shrink to their icon */
.xcards.has-open .xc:not(.open) { flex-grow: .0001; flex-basis: 84px; }
.xcards.has-open .xc:not(.open) .xt, .xcards.has-open .xc:not(.open) .xch, .xcards.has-open .xc:not(.open) .xs { display: none; }
.xcards.has-open .xc:not(.open) .xi { width: 52px; height: 52px; }
.xc.open { flex-grow: 12; background: var(--rbg); box-shadow: var(--raise-sm); cursor: default; }
.xc.open .xh { flex: none; flex-direction: row; justify-content: flex-start; min-height: 0; padding: 18px 22px; gap: 14px; color: var(--ink); text-align: start; }
.xc.open .xi { width: 44px; height: 44px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); } .xc.open .xi svg { width: 22px; height: 22px; }
.xc.open .xt { font-size: 18px; flex: 1; } .xc.open .xs { display: none; } .xc.open .xch { transform: rotate(90deg); opacity: .6; margin-inline-start: auto; }
.xc.open .in { display: block; padding: 4px 22px 26px; animation: xin .5s .15s both; } @keyframes xin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.xc .in .card { box-shadow: none; background: color-mix(in srgb, var(--muted) 6%, transparent); max-width: none; } .xc .in .card.stack { max-width: none; }
.xc .in > .stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; gap: 16px; }
.xc .in .swrow { max-width: none; background: none; padding-inline: 0; }
@media (max-width: 820px) { .xcards { flex-direction: column; min-height: 0; } .xc { flex: none !important; } .xh { min-height: 0; flex-direction: row; justify-content: flex-start; padding: 16px 20px; } .xs { display: none; } .xcards.has-open .xc:not(.open) { flex-basis: auto; } .xcards.has-open .xc:not(.open) .xt { display: block; } .xi { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .xc, .xs, .xc .in { transition: none !important; animation: none !important; } }

/* ===== expanding cards as a grid (replaces the vertical strips) ===== */
.xcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-height: 0; align-items: stretch; }
.xc { flex: none; transition: background .3s, box-shadow .3s; }
.xh { min-height: 190px; flex: none; }
.xcards.has-open { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xcards.has-open .xc.open { grid-column: 1 / -1; order: -1; animation: xin .4s both; }
.xcards.has-open .xc:not(.open) { flex: none; }
.xcards.has-open .xc:not(.open) .xh { min-height: 0; flex-direction: row; justify-content: flex-start; padding: 14px 18px; gap: 12px; }
.xcards.has-open .xc:not(.open) .xt { display: block; font-size: 14px; }
.xcards.has-open .xc:not(.open) .xi { width: 40px; height: 40px; } .xcards.has-open .xc:not(.open) .xi svg { width: 20px; height: 20px; }
.xc.open .xh { min-height: 0; }
@media (max-width: 820px) { .xcards, .xcards.has-open { grid-template-columns: 1fr; } .xh { min-height: 0; } .xcards.has-open .xc.open { order: 0; } }

/* ===================== v6: flat backgrounds, colour palettes, narrow buttons, a coloured menu, the step-by-step editor ===================== */
/* the paper is one flat colour: no texture, no gradient. The palette (js/theme-init.js) sets --bg, --brand, --accent… */
:root { --brand: #5B3CF5; --paper: var(--bg); --rbg: var(--bg); --dbg: var(--bg); }
.neu[aria-pressed="true"]::after, .neu[aria-selected="true"]::after, .neu[aria-current="page"]::after, .neu.on::after { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
body, .app, .main { background: var(--bg); }
.cta, .addbar, .nav-item .cnt, .flyout .cnt { background: var(--brand); }

/* buttons are as wide as their words, never as wide as the page */
.stack > .cta, .stack > .btn, .stack > .addbar, .stack > button:not(.ccard):not(.nav-item), .card > .cta, .card > .btn { align-self: flex-start; }
.cta.block, .btn.block { width: auto; min-width: 200px; align-self: flex-start; }
.auth-card .cta.block, .auth-card .btn.block { align-self: stretch; width: 100%; min-width: 0; }
.cta.page { min-width: 160px; }
.addbar { width: auto; padding: 0 24px; min-height: 48px; }
.softbar { max-width: 720px; }
.submit-save { align-self: center; min-width: 220px; min-height: 48px; }

/* the menu: every place has its own soft colour; the open one is filled */
.sidebar { background: color-mix(in srgb, var(--brand) 5%, var(--bg)); }
.nav-item .circ { background: color-mix(in srgb, var(--nc, var(--brand)) 15%, transparent); color: var(--nc, var(--brand)); box-shadow: none; }
.nav-item[aria-current="page"] .circ, .nav-item[aria-expanded="true"] .circ { background: var(--nc, var(--brand)); color: #fff; box-shadow: none; }
.nav-item:hover .circ { background: color-mix(in srgb, var(--nc, var(--brand)) 26%, transparent); }
.nav-item[data-key="home"], .flyout a[href="#/home"] { --nc: #2F7FE0; }
.nav-item[data-key="messages"], .flyout a[href="#/messages"] { --nc: var(--brand); }
.flyout a[href="#/rules"] { --nc: #D68A0B; } .flyout a[href="#/contacts"] { --nc: #1F9E6E; } .flyout a[href="#/activity"] { --nc: #1B94B5; }
.nav-item[data-key="settings"] { --nc: #D68A0B; }
.nav-item[data-key="overview"] { --nc: #2F7FE0; } .nav-item[data-key="customers"] { --nc: #1F9E6E; } .nav-item[data-key="keys"] { --nc: #D68A0B; } .nav-item[data-key="jobs"] { --nc: var(--brand); }
.flyout a .circ { background: color-mix(in srgb, var(--nc, var(--brand)) 15%, transparent); color: var(--nc, var(--brand)); }
.flyout a[aria-current="page"] .circ { background: var(--nc, var(--brand)); color: #fff; }

/* palette picker */

/* the editor: two numbered steps and one sentence that says what the reply does */
.sumline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 14px 18px; border-radius: 20px; background: color-mix(in srgb, var(--brand) 8%, var(--bg)); font-size: 14px; line-height: 1.9; max-width: 860px; }
.sumline b { padding: 2px 10px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--accent); font-weight: 700; }
.sumline b.todo { background: color-mix(in srgb, var(--c-amber) 16%, transparent); color: var(--c-amber); }
.stepno { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-inline-end: 10px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; font-weight: 800; vertical-align: middle; }
.colhead h2 { display: flex; align-items: center; }
.colhint { margin: -6px 0 6px; color: var(--muted); font-size: 13px; text-align: center; }

/* studio: choices, pictures, steps */
.seg.wrapseg { flex-wrap: wrap; overflow: visible; }
.seg button[aria-pressed="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pickcard { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: 18px; text-align: start; font-size: 13px; min-height: 0; }
.pickcard[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent) inset; color: var(--accent); }
.pickcard[disabled] { opacity: .5; cursor: not-allowed; }
.pickcard .ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.pickimg { width: 100%; aspect-ratio: 9 / 12; object-fit: cover; border-radius: 12px; background: color-mix(in srgb, var(--muted) 10%, transparent); }
.thumb { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; flex: none; background: color-mix(in srgb, var(--muted) 10%, transparent); }
.thumb.lg { width: 96px; height: 96px; }
.slidethumb { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; background: color-mix(in srgb, var(--muted) 10%, transparent); }
.slidethumb.empty { display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.still { height: 220px; width: auto; border-radius: 14px; background: color-mix(in srgb, var(--muted) 10%, transparent); }
.reelplayer { max-height: 480px; max-width: 100%; border-radius: 16px; background: #000; align-self: flex-start; }
.chip-in { margin-inline-start: 8px; padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,.2); font-weight: 600; font-size: 12px; }
.btn .chip-in, .btn.neu .chip-in { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.softbar.warn { background: color-mix(in srgb, var(--c-amber) 14%, transparent); } .softbar.warn svg.ic { color: var(--c-amber); }
.ccard.add { border: 2px dashed color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: none; background: transparent; }
.ccard .clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card textarea.inp { resize: vertical; min-height: 44px; }

/* admin tables */
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 12px; text-align: start; border-bottom: 1px solid color-mix(in srgb, var(--muted) 18%, transparent); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 700; font-size: 12px; }

/* palettes are five colours: background, surface, text, brand, accent */
.cta, .cta.page, .nav-item[aria-current="page"] .circ, .stepno { color: var(--on-brand, #fff); }
.card, .ccard, .dialog { background: var(--rbg); }

/* dashboard tiles: near-square, raised, one colour per area */
.tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 20px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; aspect-ratio: 1 / .95; padding: 16px; border-radius: 28px; background: var(--rbg); box-shadow: var(--raise); color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s; min-width: 0; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--raise-lg); text-decoration: none; }
.tile:active { transform: none; box-shadow: var(--raise-sm); }
.tile .tg { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 10px; color: var(--t); background: color-mix(in srgb, var(--t) 14%, transparent); }
.tile .ico { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: var(--t); background: color-mix(in srgb, var(--t) 16%, transparent); box-shadow: var(--dip-sm); }
.tile .ico svg { width: 22px; height: 22px; }
.tile .tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .tile .tt b { font-size: 14.5px; line-height: 1.4; } .tile .tt span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.tile.primary { background: var(--t); box-shadow: var(--raise), inset 0 1px 0 rgba(255,255,255,.35); color: #fff; }
.tile.primary .tg { color: #fff; background: rgba(255,255,255,.22); } .tile.primary .ico { color: #fff; background: rgba(255,255,255,.22); box-shadow: none; } .tile.primary .tt span { color: rgba(255,255,255,.85); }
@container (max-width: 960px) { .tilegrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; } }

/* Zernio key cards: full / empty / open slots / off */
.ccard.k-full { box-shadow: none; } .ccard.k-full .keystate { color: #D6455D; font-weight: 700; }
.ccard.k-empty { box-shadow: none; } .ccard.k-empty .keystate { color: #6B7385; font-weight: 700; }
.ccard.k-open { box-shadow: none; } .ccard.k-open .keystate { color: #2E9E5B; font-weight: 700; }
.ccard.k-off { opacity: .6; }

/* the auto-reply editor: three cards, a flat chat, a save bar */
.ruleed { max-width: 780px; }
.subcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--dbg); box-shadow: var(--dip-sm); }
.subcard h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; } .subcard h3 svg.ic { width: 18px; height: 18px; color: var(--accent); }
.chat { display: flex; flex-direction: column; border-radius: 22px; background: color-mix(in srgb, var(--muted) 7%, transparent); overflow: hidden; }
.chat .chead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid color-mix(in srgb, var(--muted) 15%, transparent); font-size: 14px; }
.chat .cav { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand, #fff); font-weight: 800; font-size: 13px; }
.chat .cbody { display: flex; flex-direction: column; gap: 8px; padding: 16px; min-height: 180px; }
.cb { position: relative; max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.7; word-break: break-word; }
.cb.in { align-self: flex-start; background: color-mix(in srgb, var(--muted) 16%, transparent); border-end-start-radius: 6px; } .cb.in .who { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.cb.out { align-self: flex-end; background: var(--brand); color: var(--on-brand, #fff); border-end-end-radius: 6px; padding-inline-end: 36px; min-width: 40%; }
.cb.out .cv { font-size: 11px; font-weight: 700; opacity: .8; margin-bottom: 2px; }
.cb.out.ghost { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--ink); padding-inline-end: 14px; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.cb .cbx { width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: inherit; font: inherit; line-height: 1.7; padding: 0; min-height: 26px; } .cb .cbx::placeholder { color: inherit; opacity: .65; }
.cb .cx { position: absolute; top: 8px; inset-inline-end: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); color: inherit; border: 0; cursor: pointer; } .cb .cx svg { width: 12px; height: 12px; }
.cfile { display: flex; align-items: center; gap: 10px; } .cfile .cico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.22); } .cfile .cname { font-size: 13px; font-weight: 600; word-break: break-all; }
.cthumb { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; } .cin { width: 100%; border: 0; border-bottom: 1px solid rgba(255,255,255,.4); outline: 0; background: transparent; color: inherit; font: inherit; padding: 4px 0; } .cin::placeholder { color: inherit; opacity: .65; }
.cempty { align-self: center; margin: auto; color: var(--muted); font-size: 13px; }
.cbar { display: flex; flex-wrap: wrap; gap: 8px; } .cvars { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 22px; background: var(--rbg); box-shadow: var(--raise-lg); } .savebar .sumline { padding: 0; background: none; font-size: 13px; }
.stepno svg.ic { width: 16px; height: 16px; }

/* the editor as a dashboard: the chat on the left, a grid of neumorphic cards on the right */
.ruleed { max-width: none; }
.rgrid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; direction: ltr; }
.rgrid > * { direction: ltr; } [dir="rtl"] .rgrid > * { direction: rtl; }
.rchat { position: sticky; top: 12px; }
.rchat .tcard { gap: 14px; }
.rgrid > .stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.tcard { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 28px; background: var(--rbg); box-shadow: none; border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); min-width: 0; }
.tcard.wide { grid-column: 1 / -1; }
.tcard h2.ct, .tcard h3.ct { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; }
.tcard .cti { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--dbg); box-shadow: var(--dip-sm); flex: none; } .tcard .cti svg { width: 18px; height: 18px; }
.guide { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; } .guide li { position: relative; padding-inline-start: 14px; font-size: 12px; line-height: 1.7; color: var(--muted); } .guide li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.chat { box-shadow: var(--dip); background: var(--dbg); }
@media (max-width: 900px) { .rgrid { grid-template-columns: minmax(0, 1fr); } .rchat { position: static; } .rgrid > .stack { grid-template-columns: minmax(0, 1fr); } .tcard.wide { grid-column: auto; } }

/* the chat looks like iMessage: white page, blue bubbles for us, grey for them, the system font */
.chat { background: #fff; box-shadow: var(--dip); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Vazirmatn", sans-serif; }
.chat .chead { background: #F6F6F8; border-bottom: 1px solid #E5E5EA; color: #000; justify-content: center; flex-direction: column; gap: 4px; padding: 10px 16px; }
.chat .cav { background: linear-gradient(#9BA3AF, #7E8794); color: #fff; width: 36px; height: 36px; }
.chat .chead b { font-size: 12px; font-weight: 500; color: #000; }
.chat .cbody { background: #fff; gap: 4px; padding: 16px 14px; }
.cb { font-size: 15px; line-height: 1.45; padding: 8px 14px; border-radius: 19px; }
.cb.in { background: #E9E9EB; color: #000; border-end-start-radius: 19px; border-end-start-radius: 5px; }
.cb.in .who { color: #8E8E93; font-size: 11px; font-weight: 500; }
.cb.out { background: #0A84FF; color: #fff; border-end-end-radius: 5px; padding-inline-end: 34px; margin-top: 4px; }
.cb.out .cv { opacity: .8; font-weight: 500; }
.cb.out.ghost { background: #E8F1FF; color: #0A84FF; padding-inline-end: 14px; }
.cb .cx { background: rgba(255,255,255,.28); }
.cfile .cico { background: rgba(255,255,255,.25); }
.cempty { color: #8E8E93; }
:root[data-theme="dark"] .chat, :root[data-theme="dark"] .chat .cbody { background: #000; }
:root[data-theme="dark"] .chat .chead { background: #1C1C1E; border-color: #2C2C2E; } :root[data-theme="dark"] .chat .chead b { color: #fff; }
:root[data-theme="dark"] .cb.in { background: #26252A; color: #fff; } :root[data-theme="dark"] .cb.out.ghost { background: #0B2A4D; }

/* cards respond: they rise a little, grow slightly, take a touch of colour, and the shadow and the light under them follow */
.tcard { transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background-color .25s; backface-visibility: hidden; }
.tcard:hover, .tcard:focus-within { transform: translateY(-4px); background: color-mix(in srgb, var(--accent) 2.5%, var(--rbg)); box-shadow: none; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.tcard:hover .cti, .tcard:focus-within .cti { color: #fff; background: var(--accent); transition: all .25s; }
.tcard:active { transform: translateY(-1px); }
.rchat .tcard:hover { transform: none; }
.tile, .ccard { transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background-color .25s; }
.tile:hover { transform: translateY(-4px); box-shadow: 14px 20px 38px var(--lo), -10px -12px 28px var(--hi); background: color-mix(in srgb, var(--t) 3%, var(--rbg)); }
.tile.primary:hover { background: color-mix(in srgb, var(--t) 90%, #fff); }
@media (prefers-reduced-motion: reduce) { .tcard, .tile, .ccard { transition: none; } .tcard:hover, .tile:hover { transform: none; } }

.postcard .pic { position: relative; } .postcard .pic img + svg.ic { display: none; } .rbadge { position: absolute; bottom: 8px; inset-inline-start: 8px; padding: 2px 8px; border-radius: 9px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.55); color: #fff; }

/* messages: a coloured edge and a label tell comments from direct messages; the "waiting" dot sits before the name */
.ccard.ch-comment, .ccard.ch-dm, .ccard.ch-story { box-shadow: none; }
.ccard.ch-comment:hover, .ccard.ch-dm:hover, .ccard.ch-story:hover { box-shadow: none; }
.chtag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 700; }
.chtag svg.ic { width: 14px; height: 14px; } .ch-comment .chtag { color: #1D4ED8; background: rgba(37,99,235,.1); } .ch-dm .chtag { color: #0E7A3E; background: rgba(22,163,74,.12); } .ch-story .chtag { color: #0E7490; background: rgba(14,116,144,.12); }
.chtag .chw { font-weight: 600; opacity: .85; }
.ndot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #F2A100; margin-inline-end: 7px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(242,161,0,.2); }
.ccard .dot { display: none; }
.fbar { display: flex; flex-direction: column; gap: 10px; } .fbar .frow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .fbar .frow select.inp { max-width: 230px; }

/* search fields and filter selects are raised, not dipped */
input[type="search"].inp, .fbar select.inp, .fbar input.inp { background: var(--rbg); box-shadow: var(--raise-sm); border-color: transparent; }
input[type="search"].inp:hover, .fbar select.inp:hover { box-shadow: var(--raise); }
input[type="search"].inp:focus, .fbar select.inp:focus, .fbar input.inp:focus { box-shadow: var(--raise), 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); outline: none; }

/* dropdown: the button grows downward into the list of choices */
.dd { position: relative; min-width: 170px; max-width: 100%; display: inline-block; vertical-align: top; } .field .dd, .stack > .dd { display: block; }
.dd-btn { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--rbg); color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: var(--raise-sm); transition: border-radius .2s, box-shadow .2s; }
.dd-btn:hover { box-shadow: var(--raise); } .dd-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dd-ch { width: 16px; height: 16px; color: var(--muted); transition: transform .25s; } .dd.open .dd-ch { transform: rotate(180deg); }
.dd-list { position: absolute; z-index: 60; inset-inline: 0; top: calc(100% - 2px); max-height: 0; overflow: hidden; background: var(--rbg); border-radius: 0 0 16px 16px; box-shadow: 0 16px 28px var(--lo2); opacity: 0; visibility: hidden; transition: max-height .25s ease, opacity .2s, visibility 0s .25s; }
.dd.open .dd-btn { border-end-start-radius: 0; border-end-end-radius: 0; box-shadow: var(--raise-sm); } .dd.open .dd-list { visibility: visible; transition-delay: 0s; max-height: 260px; overflow-y: auto; opacity: 1; padding: 4px 0 6px; border-top: 1px solid color-mix(in srgb, var(--muted) 14%, transparent); }
.dd-o { display: block; width: 100%; text-align: start; padding: 10px 16px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.dd-o:hover, .dd-o.hl { background: color-mix(in srgb, var(--accent) 8%, transparent); } .dd-o.on { color: var(--accent); font-weight: 700; }
.fbar .frow .dd { min-width: 190px; max-width: 260px; }

/* colour as a thin flat edge, not a glow: the panel itself carries no shadow */
.ccard { box-shadow: none; border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); }
.ccard.ch-comment { border-color: color-mix(in srgb, var(--fill-a) 45%, transparent); }
.ccard.ch-dm { border-color: color-mix(in srgb, var(--c-green) 45%, transparent); }
.ccard.ch-story { border-color: color-mix(in srgb, var(--c-pink) 45%, transparent); }
.ccard.ch-comment:hover, .ccard.ch-dm:hover, .ccard.ch-story:hover { box-shadow: none; }
.ccard.k-full { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.ccard.k-empty { border-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.ccard.k-open { border-color: color-mix(in srgb, var(--c-green) 45%, transparent); }

.wordmark { display: inline-flex; align-items: center; gap: .42em; height: auto; font-size: 23px; font-weight: 900; letter-spacing: -.01em; line-height: 1; color: var(--ink); direction: ltr; white-space: nowrap; }
.wordmark::before { content: ""; width: 1.5em; height: 1.5em; flex: none; background: linear-gradient(100deg, #05CFF2, #1E66F5, #7C3AED, #05CFF2); background-size: 300% 300%; animation: logo-flow 7s linear infinite; -webkit-mask: url(/mark.png) center / contain no-repeat; mask: url(/mark.png) center / contain no-repeat; }
@keyframes logo-flow { to { background-position: 300% 50%; } }
@media (prefers-reduced-motion: reduce) { .wordmark::before { animation: none; } }
.wordmark::after { content: "Agentto"; font-family: "Poppins", var(--font); }
.wordmark.mini { font-size: 22px; } .wordmark.mini::after, .sidebar.is-collapsed .brand .wordmark::after { content: none; }
.brand .wordmark { font-size: 24px; } .auth .logo .wordmark { font-size: 30px; }

/* the calendar: a month, a click on a day */
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calhd { text-align: center; font-weight: 700; color: var(--muted, #888); font-size: 13px; padding: 4px 0; }
.calcell { min-height: 92px; padding: 8px; border: 0; border-radius: 16px; background: var(--rbg); box-shadow: var(--raise-sm); display: flex; flex-direction: column; gap: 4px; align-items: stretch; text-align: start; cursor: pointer; font: inherit; color: inherit; }
.calcell.off { opacity: .45; } .calcell.today { box-shadow: var(--raise-sm), 0 0 0 2px var(--accent); } .calcell.occ .cnum { color: var(--accent); }
.calcell .cnum { font-weight: 800; display: flex; gap: 6px; align-items: baseline; } .calcell .cnum small { font-weight: 500; opacity: .55; font-size: 11px; }
.calcell .cocc { font-size: 11px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); }
.calcell .cits { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.cdot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--rbg); box-shadow: var(--raise-sm); } .cdot svg { width: 12px; height: 12px; }
.cdot.blue { color: #2563EB; box-shadow: var(--raise-sm), 0 0 0 2px rgba(37,99,235,.35); } .cdot.amber { color: #8A5200; box-shadow: var(--raise-sm), 0 0 0 2px rgba(230,160,40,.35); } .cdot.green { color: #16A34A; box-shadow: var(--raise-sm), 0 0 0 2px rgba(22,163,74,.35); }
@media (max-width: 640px) { .calcell { min-height: 62px; padding: 5px; border-radius: 12px; } .calcell .cocc, .calcell .cnum small { display: none; } .cdot { width: 16px; height: 16px; } .cdot svg { width: 9px; height: 9px; } }
.sidebar .brand { justify-content: center; padding-inline: 8px; } .sidebar.is-collapsed .brand { justify-content: center; }

/* the calendar, made small and quiet: round day tokens, dots instead of text */
.calgrid { max-width: 400px; margin-inline: auto; gap: 4px; }
.calhd { font-size: 12px; font-weight: 600; opacity: .7; padding: 2px 0 4px; }
.calcell { min-height: 0; aspect-ratio: 1 / 1; padding: 6px 4px; border-radius: 50%; align-items: center; justify-content: center; gap: 2px; box-shadow: none; background: transparent; transition: box-shadow .25s, transform .25s; }
.calcell:hover { box-shadow: var(--raise-sm); transform: translateY(-1px); }
.calcell.off { opacity: .3; }
.calcell .cnum { font-weight: 700; font-size: 14px; flex-direction: column; align-items: center; gap: 0; line-height: 1.15; } .calcell .cnum small { display: none; }
.calcell.today { background: var(--rbg); box-shadow: var(--raise-sm); color: var(--accent); }
.calcell .cits { margin: 0; gap: 3px; justify-content: center; min-height: 6px; flex-wrap: nowrap; }
.calcell .cdot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: none; opacity: .75; } .calcell .cdot svg { display: none; }
.calcell .cdot.blue { background: #2563EB; box-shadow: none; opacity: 1; } .calcell .cdot.amber { background: #e6a028; box-shadow: none; opacity: 1; } .calcell .cdot.green { background: #16A34A; box-shadow: none; opacity: 1; }
.calcell .cits b { font-size: 9px; opacity: .6; }
.calcell.occ::after { content: ""; position: absolute; top: 9%; inset-inline-end: 22%; width: 6px; height: 6px; border-radius: 50%; background: #d6628f; box-shadow: none; } .calcell .cocc { display: none; }
@media (max-width: 640px) { .calgrid { gap: 3px; } .calcell .cnum { font-size: 12.5px; } }
.calgrid { width: 100%; } .caltool, .calnote { max-width: 400px; width: 100%; margin-inline: auto; }

/* visible but not active: the entry stays, quieter, with a small lock */
.nav-item.is-locked .circ, .flyout a .lockmark { opacity: .5; } .nav-item.is-locked .label { opacity: .6; }
.lockmark { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-inline-start: auto; opacity: .55; } .lockmark svg { width: 13px; height: 13px; }
.is-collapsed .lockmark { display: none; }
.locked-page { display: grid; justify-items: center; gap: 14px; padding: 48px 16px; text-align: center; } .lockorb { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--rbg); box-shadow: var(--raise); color: var(--accent); } .lockorb svg { width: 34px; height: 34px; }

/* the feature picker: main features as small raised rows; a feature opens a quiet menu of its parts, each with "visible" and "active" */
.fp { display: grid; gap: 10px; max-width: 520px; }
.fp-key { display: block; margin: 0 0 2px; line-height: 1.9; } .fp-k { display: inline-grid; place-items: center; width: 20px; height: 20px; vertical-align: middle; } .fp-k svg { width: 14px; height: 14px; } .fp-k.vis { color: #3b6ee6; } .fp-k.act { color: #17a37e; margin-inline-start: 8px; }
.fp-g { display: grid; gap: 8px; }
.fp-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 18px; background: var(--rbg); box-shadow: var(--raise-sm); transition: box-shadow .25s; } .fp-row.on { box-shadow: var(--raise-sm); }
.fp-label { flex: 1; font-weight: 700; } .fp-row .sw, .fp-row .switch { flex: none; } .fp-count { font-size: 12px; font-weight: 700; color: var(--muted); }
.fp-more { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: box-shadow .25s, transform .25s; } .fp-more:hover { box-shadow: var(--raise-sm); } .fp-more svg { width: 14px; height: 14px; }
.fp-menu { display: grid; gap: 2px; padding: 6px 8px; margin-inline: 10px; border-radius: 16px; background: color-mix(in srgb, var(--rbg) 86%, transparent); }
.fp-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 13.5px; } .fp-name { flex: 1; } .fp-name i { opacity: .5; font-style: normal; }
.fp-t { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; opacity: .45; transition: box-shadow .25s, opacity .25s, color .25s; color: var(--muted); } .fp-t svg { width: 14px; height: 14px; }
.fp-t.on { opacity: 1; box-shadow: var(--raise-sm); background: var(--rbg); } .fp-t.vis.on { color: #3b6ee6; box-shadow: var(--raise-sm); } .fp-t.act.on { color: #17a37e; box-shadow: var(--raise-sm); }

/* the schedule page: the calendar on one side, the chosen day on the other */
.calpage { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 28px; align-items: start; } .calcol { min-width: 0; }
.daypanel { padding: 22px 24px; border-radius: 28px; background: var(--rbg); box-shadow: none; border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); display: grid; gap: 16px; min-height: 360px; }
.dp-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; } .dp-num { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 800; background: var(--rbg); box-shadow: var(--raise-sm); color: var(--accent); } .dp-num.hol { color: #d6403c; box-shadow: var(--raise-sm); }
.dp-title { font-size: 17px; font-weight: 800; }
.calcell.hol .cnum { color: #d6403c; } .calcell.sel { background: var(--rbg); box-shadow: var(--raise-sm); } .calcell.today:not(.sel) { box-shadow: var(--raise-sm); } .calcell.occ::after { background: #16A34A; box-shadow: none; }
.callegend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); max-width: 400px; width: 100%; margin-inline: auto; } .callegend span { display: inline-flex; align-items: center; gap: 6px; } .lg { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } .lg.red { background: #d6403c; } .lg.vio { background: #16A34A; } .lg.blue { background: #2563EB; }
.badge.vio { background: rgba(22,163,74,.14); color: #0E7A3E; } .badge.pink { background: rgba(214,64,60,.14); color: #d6403c; }
@media (max-width: 980px) { .calpage { grid-template-columns: 1fr; } .daypanel { min-height: 0; } }

/* the plan builder: flat tinted controls and small raised steppers; nothing is pressed in */
.pb { display: grid; gap: 22px; }
.pb-in { width: 100%; border: 0; border-radius: 14px; padding: 11px 14px; background: color-mix(in srgb, var(--ink, #222) 6%, transparent); color: inherit; font: inherit; box-shadow: none; outline: none; } .pb-in:focus { background: color-mix(in srgb, var(--accent, #3b6ee6) 10%, transparent); }
.pb-name .pb-in { font-size: 18px; font-weight: 800; background: transparent; padding-inline: 2px; border-radius: 0; box-shadow: 0 2px 0 color-mix(in srgb, var(--ink, #222) 10%, transparent); } .pb-name .pb-in:focus { box-shadow: 0 2px 0 var(--accent); background: transparent; }
.pb-sec { display: grid; gap: 12px; } .pb-sec h4 { margin: 0; font-size: 15px; font-weight: 800; } .pb-hint { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.pb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-chip { border: 0; padding: 8px 16px; border-radius: 14px; font-weight: 700; cursor: pointer; background: color-mix(in srgb, var(--ink, #222) 6%, transparent); color: inherit; transition: box-shadow .25s, transform .25s, background .25s; } .pb-chip:hover { box-shadow: var(--raise-sm); } .pb-chip.on { background: var(--rbg); box-shadow: var(--raise-sm); color: var(--accent); } .pb-chip.soft { background: transparent; box-shadow: var(--raise-sm); } .pb-chip:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.pb-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--ink, #222) 4%, transparent); } .pb-range svg { width: 16px; height: 16px; color: var(--accent); }
.pb-link { border: 0; background: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 4px 6px; margin-inline-start: auto; font-size: 13px; }
.pb-cal { display: grid; gap: 8px; max-width: 320px; } .pb-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.pb-day { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: inherit; transition: box-shadow .2s; } .pb-day:hover:not(:disabled) { box-shadow: var(--raise-sm); } .pb-day.off { opacity: .35; } .pb-day.hol { color: #d6403c; } .pb-day.in { background: rgba(59,110,230,.12); border-radius: 8px; } .pb-day.edge { background: var(--rbg); box-shadow: var(--raise-sm); color: var(--accent); } .pb-day.past, .pb-day:disabled { opacity: .25; cursor: default; }
.pb-plat { display: grid; gap: 6px; } .pb-plat-h { font-size: 12.5px; font-weight: 800; color: var(--muted); letter-spacing: .03em; }
.pb-krow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-radius: 16px; background: color-mix(in srgb, var(--ink, #222) 4%, transparent); transition: background .25s, box-shadow .25s; } .pb-krow.on { background: var(--rbg); box-shadow: var(--raise-sm); }
.pb-stepper { display: flex; align-items: center; gap: 10px; } .pb-stepper b { min-width: 22px; text-align: center; font-size: 16px; }
.pb-step { width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--rbg); box-shadow: var(--raise-sm); color: inherit; font-size: 16px; font-weight: 800; transition: box-shadow .2s, transform .2s; } .pb-step svg { width: 14px; height: 14px; } .pb-step:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--raise-sm); } .pb-step:disabled { opacity: .35; box-shadow: none; background: transparent; cursor: default; }
.pb-sum { margin: 4px 0 0; padding: 10px 14px; border-radius: 16px; background: rgba(59,110,230,.08); font-size: 14px; } .pb-sum b { color: var(--accent); font-size: 18px; }
.pb-auto { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--ink, #222) 4%, transparent); } .pb-auto input { position: absolute; opacity: 0; } .pb-auto small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.6; margin-top: 2px; }
.pb-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; margin-top: 2px; background: color-mix(in srgb, var(--ink, #222) 8%, transparent); display: grid; place-items: center; transition: box-shadow .25s, background .25s; } .pb-auto input:checked + .pb-tick { background: var(--rbg); box-shadow: var(--raise-sm); } .pb-auto input:checked + .pb-tick::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #17a37e; }

/* each platform in its own card, glowing in its own colour; the kinds sit together as small tiles */
.pb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.pb-card { --pc: #3b6ee6; padding: 14px 14px 16px; border-radius: 24px; background: var(--rbg); box-shadow: none; border: 1px solid color-mix(in srgb, var(--pc) 35%, transparent); display: grid; gap: 12px; }
.pb-card-h { display: flex; align-items: center; gap: 10px; } .pb-card-h b { flex: 1; font-size: 15px; } .pb-card-n { font-size: 12px; color: var(--muted); font-weight: 700; } .pb-logo { width: 28px; height: 28px; display: block; } .pb-logo svg { width: 100%; height: 100%; }
.pb-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pb-tile { display: grid; gap: 6px; padding: 8px 10px; border-radius: 16px; background: color-mix(in srgb, var(--ink, #222) 4%, transparent); transition: box-shadow .25s, background .25s; } .pb-tile.on { background: var(--rbg); box-shadow: var(--raise-sm); }
.pb-tile-l { font-size: 12.5px; font-weight: 700; line-height: 1.4; } .pb-tile .pb-stepper { justify-content: space-between; gap: 6px; } .pb-tile .pb-step { width: 26px; height: 26px; font-size: 14px; } .pb-tile .pb-step:hover:not(:disabled) { box-shadow: var(--raise-sm); }

/* the chosen chip is raised with a glow underneath; the others stay flat */
.pb-chip.on { background: var(--rbg); box-shadow: var(--raise-sm); color: var(--accent); transform: translateY(-1px); } .pb-chip:not(.on) { box-shadow: none; } .pb-chip:not(.on):hover:not(:disabled) { box-shadow: var(--raise-sm); }

/* the roadmap of an auto-reply: stages in a row, the current one coloured and raised with a glow, the finished ones green, the rest flat */
.road { display: flex; align-items: flex-start; gap: 0; margin: 0 0 4px; padding: 0; list-style: none; }
.road-s { flex: 1; position: relative; display: flex; justify-content: center; min-width: 0; }
.road-s:not(:last-child)::after { content: ""; position: absolute; top: 20px; inset-inline-start: calc(50% + 24px); width: calc(100% - 48px); height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink, #222) 10%, transparent); transition: background .3s; } .road-s.done:not(:last-child)::after { background: #17a37e; opacity: .6; }
.road-b { border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 6px; padding: 0 2px; font: inherit; color: var(--muted); } .road-n { font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.3; }
.road-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ink, #222) 6%, transparent); transition: box-shadow .3s, background .3s, color .3s, transform .3s; } .road-dot svg { width: 18px; height: 18px; }
.road-b:hover .road-dot { box-shadow: var(--raise-sm); }
.road-s.done .road-dot { background: var(--rbg); color: #17a37e; box-shadow: var(--raise-sm); } .road-s.done .road-n { color: #17a37e; }
.road-s.now .road-dot { background: var(--rbg); color: var(--accent); box-shadow: var(--raise-sm); transform: translateY(-2px); } .road-s.now .road-n { color: var(--accent); font-weight: 800; }
.road-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.ruleed .tagbox { box-shadow: none; background: color-mix(in srgb, var(--ink, #222) 6%, transparent); }

.rgrid > .stack > * { grid-column: 1 / -1; }

/* the logo-and-handles layout editor (Library → Brand): a preview per picture size with boxes to drag and resize */
.bl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; } @container (max-width: 760px) { .bl-grid { grid-template-columns: minmax(0, 1fr); } } @media (max-width: 800px) { .bl-grid { grid-template-columns: minmax(0, 1fr); } }
.bl-wrap { display: flex; justify-content: center; padding: 6px 0; }
.bl-stage { position: relative; width: 100%; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--accent, #3b6ee6) 14%, var(--rbg)), color-mix(in srgb, var(--ink, #222) 8%, var(--rbg))); box-shadow: var(--raise-sm); touch-action: none; user-select: none; }
.bl-hint { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; opacity: .6; pointer-events: none; }
.bl-safe { position: absolute; inset-inline: 0; background: repeating-linear-gradient(135deg, rgba(220,60,80,.16) 0 6px, rgba(220,60,80,.06) 6px 12px); pointer-events: none; }
.bl-box { position: absolute; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1.5px dashed color-mix(in srgb, var(--accent, #3b6ee6) 70%, transparent); background: color-mix(in srgb, var(--accent, #3b6ee6) 10%, transparent); cursor: grab; overflow: hidden; } .bl-box.custom { border-style: solid; background: color-mix(in srgb, var(--accent, #3b6ee6) 18%, transparent); } .bl-box:active { cursor: grabbing; }
.bl-logo { width: 100%; height: 100%; object-fit: contain; pointer-events: none; } .bl-text { font-weight: 800; white-space: nowrap; color: var(--ink, #222); pointer-events: none; }
.bl-grip { position: absolute; inset-inline-end: 0; bottom: 0; width: 12px; height: 12px; background: var(--accent, #3b6ee6); border-start-start-radius: 6px; cursor: nwse-resize; }
.bl-item { display: grid; gap: 10px; padding: 14px; border-radius: 16px; box-shadow: var(--raise-sm); background: var(--rbg); }
.bl-range { width: 100%; accent-color: var(--accent, #3b6ee6); }
.pb-chip.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 12px; }

.bl-thumb { width: 64px; height: 44px; flex: none; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--ink, #222) 6%, transparent); overflow: hidden; } .bl-thumb .bl-logo { width: 100%; height: 100%; object-fit: contain; }
.bl-name { position: absolute; inset-inline-start: 0; top: -1px; font-style: normal; font-size: 9px; padding: 1px 5px; border-end-end-radius: 6px; background: color-mix(in srgb, var(--accent, #3b6ee6) 80%, #000); color: #fff; white-space: nowrap; opacity: .9; pointer-events: none; }
.bl-num { display: grid; gap: 2px; width: 84px; } .pb-in.num { padding: 7px 8px; width: 100%; }
.bl-color { width: 38px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 8px; } .bl-item.off { opacity: .55; }
.bl-box { overflow: visible; } .bl-box > .bl-logo, .bl-box > .bl-text { max-width: 100%; max-height: 100%; }

.bl-grid { grid-template-columns: minmax(0, 1fr) !important; }
.bl-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .bl-num { width: auto; } .pb-in.num { text-align: center; }
.bl-item > .row > .btn { flex: none; }

/* a feature that is shown but not active: the customer sees it, with a lock, and knows it can be added later */
.lock-lab { display: inline-flex; align-items: center; gap: 6px; } .lock-lab .ic { width: 13px; height: 13px; opacity: .7; }
.lock-note { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--rbg); box-shadow: var(--raise-sm); } .lock-note p { margin: 2px 0 0; }
.lockorb.sm { width: 40px; height: 40px; flex: none; } .lockorb.sm .ic { width: 18px; height: 18px; }
.pickcard.locked { opacity: .6; }

.card:has(> [data-locked]) .go-new { opacity: .4; pointer-events: none; }

/* the auto-reply editor is one column: the roadmap, then the card of the current step */
.rgrid { grid-template-columns: minmax(0, 1fr) !important; } .rgrid > .stack { display: flex !important; flex-direction: column; gap: 18px; max-width: 820px; margin-inline: auto; width: 100%; }
.road-s.todo .road-dot { color: var(--c-amber); box-shadow: var(--raise-sm); } .road-s.todo .road-n { color: var(--c-amber); }

/* the dock on phones: its own layer, so it does not jump when the browser's address bar shows and hides while scrolling */
@media (max-width: 960px) {
  .sidebar { position: fixed; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); will-change: transform; -webkit-transform: translate3d(50%, 0, 0); transform: translate3d(50%, 0, 0); backface-visibility: hidden; contain: layout; }
  [dir="ltr"] .sidebar { transform: translate3d(50%, 0, 0); }
  html { overscroll-behavior-y: none; }
}

/* Agentto: the brand colour runs through every main button as a soft gradient of itself */
.cta, .cta.page, .cta.green { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 78%, #fff), var(--brand)); color: var(--on-brand, #fff); box-shadow: -2px -2px 3px var(--hi), 3px 3px 6px var(--lo), 6px 8px 16px var(--lo2), inset 1px 1px 0 rgba(255,255,255,.25); }

/* ---- the dashboard (Agentto): networks, the profile, then sections of name-only tiles ---- */
.dash .dsec { display: grid; gap: 12px; }
.dsec-h { display: flex; align-items: center; gap: 10px; margin: 6px 4px 0; font-size: 17px; font-weight: 800; }
.dsec-i { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent)); } .dsec-i svg.ic { width: 19px; height: 19px; }
.dash .tilegrid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.dash .tile { aspect-ratio: auto; min-height: 118px; justify-content: center; align-items: center; text-align: center; gap: 10px; padding: 18px 12px; }
.dash .tile .ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent)); box-shadow: var(--raise-sm); } .dash .tile .ico svg.ic { width: 24px; height: 24px; }
.dash .tile .tt b { font-size: 15.5px; font-weight: 800; }
.dash .tile.primary { color: #fff; background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 72%, #fff), var(--brand)); box-shadow: var(--raise); }
.dash .tile.primary .ico { color: #fff; background: rgba(255,255,255,.22); box-shadow: none; }
.netcard { display: grid; gap: 14px; }
.netrow { display: flex; gap: 14px; flex-wrap: wrap; }
.net-b { position: relative; width: 52px; height: 52px; border: 0; border-radius: 16px; padding: 8px; background: var(--rbg); box-shadow: var(--raise-sm); cursor: pointer; transition: transform .2s, box-shadow .2s; } .net-b:hover { transform: translateY(-2px); box-shadow: var(--raise); }
.net-b:not(.on) .net-logo { filter: grayscale(1) opacity(.45); }
.net-logo { display: block; width: 100%; height: 100%; } .net-logo svg { width: 100%; height: 100%; display: block; }
.net-st { position: absolute; top: -5px; inset-inline-end: -5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; color: #fff; background: color-mix(in srgb, var(--ink) 40%, var(--bg)); box-shadow: 0 0 0 2px var(--bg); }
.net-b.on .net-st { background: #22B573; }
/* the connected networks in the top bar: small, only the ones that are connected */
.topnets { display: inline-flex; align-items: center; gap: 8px; } .topnets .net-b { width: 38px; height: 38px; border-radius: 12px; padding: 6px; } .topnets .net-st { width: 15px; height: 15px; font-size: 9.5px; top: -4px; inset-inline-end: -4px; }
@media (max-width: 640px) { .dash .tilegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .dash .tile { min-height: 112px; } }

/* ---- the auto-reply wizard (Agentto): a title, four stages, one stage on screen, buttons at the bottom ---- */
.wz { max-width: 860px; margin-inline: auto; width: 100%; }
.wz > .stack { display: flex; flex-direction: column; gap: 16px; }
.wz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wz-head h1 { font-size: 22px; margin: 0; }
.wz-count { display: grid; justify-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--brand); padding: 8px 12px; border-radius: 14px; background: var(--rbg); box-shadow: var(--raise-sm); }
.wz-bar { display: flex; gap: 4px; } .wz-bar i { width: 18px; height: 5px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 12%, transparent); } .wz-bar i.on { background: var(--brand); }
.wz-stage { display: grid; gap: 14px; }
.wz-card { display: grid; gap: 14px; padding: 18px; border-radius: 24px; background: var(--rbg); box-shadow: var(--raise); }
.wz-h { margin: 0; font-size: 15.5px; font-weight: 800; }
.wz-nets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wz-net { position: relative; display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border: 0; border-radius: 20px; font: inherit; color: inherit; cursor: pointer; background: color-mix(in srgb, var(--ink) 5%, transparent); transition: box-shadow .2s, transform .2s; }
.wz-net .net-logo { width: 40px; height: 40px; } .wz-net b { font-size: 13.5px; }
.wz-net.on { background: var(--rbg); box-shadow: var(--raise-sm), 0 0 0 2px var(--brand); }
.wz-net:disabled { cursor: not-allowed; } .wz-net:disabled .net-logo { filter: grayscale(1) opacity(.45); } .wz-net:disabled b { opacity: .55; }
.wz-soon { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 8px; color: var(--muted); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.wz-tick { position: absolute; top: 8px; inset-inline-end: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--brand); } .wz-tick svg.ic { width: 14px; height: 14px; }
.wz-opts { display: grid; gap: 10px; }
.wz-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-radius: 18px; font: inherit; color: inherit; text-align: start; cursor: pointer; background: color-mix(in srgb, var(--ink) 5%, transparent); transition: box-shadow .2s; }
.wz-opt b { font-size: 15px; } .wz-oi { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; color: var(--brand); background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent)); }
.wz-radio { width: 22px; height: 22px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 25%, transparent); }
.wz-opt.on { background: var(--rbg); box-shadow: var(--raise-sm), 0 0 0 2px var(--brand); } .wz-opt.on .wz-radio { background: var(--brand); box-shadow: inset 0 0 0 5px var(--rbg); }
.wz-rows { display: grid; gap: 10px; }
.wz-row { display: grid; gap: 10px; padding: 12px 14px; border-radius: 18px; background: color-mix(in srgb, var(--ink) 4%, transparent); transition: background .2s, box-shadow .2s; } .wz-row.open { background: var(--rbg); box-shadow: var(--raise-sm); }
.wz-rh { display: flex; align-items: center; gap: 12px; min-height: 40px; } .wz-rh b { font-size: 15px; }
.wz-ri { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent)); } .wz-ri svg.ic { width: 19px; height: 19px; }
.wz-fold { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; padding: 6px; } .wz-fold svg.ic { width: 18px; height: 18px; transition: transform .2s; } [dir="rtl"] .wz-fold svg.ic { transform: scaleX(-1); } .wz-fold[aria-expanded="true"] svg.ic { transform: rotate(90deg); }
.wz-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 10px; color: var(--brand); background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent)); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-body { padding-inline-start: 48px; } @media (max-width: 640px) { .wz-body { padding-inline-start: 0; } }
.wz-i { width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--muted); cursor: pointer; } .wz-i svg.ic { width: 17px; height: 17px; }
.wz-info { margin: 0; font-size: 13px; line-height: 1.8; color: var(--muted); padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 6%, transparent); }
.wz-sum { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .wz-sum li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; } .wz-sum b { min-width: 0; }
.wz-si { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent)); } .wz-si svg.ic { width: 16px; height: 16px; }
.wz-nav { gap: 10px; } .wz-nav .cta, .wz-nav .btn { min-height: 46px; }
.wz .road { margin: 4px 0; } .wz .road-n { font-size: 12.5px; }
@media (max-width: 760px) { .wz .desk-road, .wz .desk-cancel { display: none; } .wz-nav .cta { flex: 1; } .wz-nets { gap: 8px; } .wz-net { padding: 14px 6px; } }
@media (min-width: 761px) { .wz-count { display: none; } }
@media (max-width: 960px) { .wz-nav { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }
/* the dashboard on wide screens: two columns of sections */
@media (min-width: 1100px) { .stack.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; align-items: start; } .dash .dash-wide { grid-column: 1 / -1; } .dash .tilegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash .netcard, .dash > .card { min-height: 100%; } }
/* the wizard's buttons on a phone: a light glass strip, not another card */
@media (max-width: 760px) { .wz-nav { background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 8px 24px -12px rgba(20,30,70,.28); padding: 10px 12px; } .wz-stage { padding-bottom: 8px; } }

/* ---- nothing pressed in, anywhere: choices are flat chips (the chosen one raised with a glow), inputs are flat tinted fields ---- */
.seg { gap: 8px; padding: 0; flex-wrap: wrap; overflow: visible; }
.seg::before { content: none !important; }
.seg button { min-height: 38px; padding: 0 16px; border-radius: 14px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: none; transition: box-shadow .25s, transform .25s, background .25s, color .25s; }
.seg button:hover { box-shadow: var(--raise-sm); color: var(--ink); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { color: var(--brand); background: var(--rbg); box-shadow: var(--raise-sm); transform: translateY(-1px); }
.inp, select.inp, .tagbox { background: color-mix(in srgb, var(--ink) 6%, transparent); background-image: none; box-shadow: none; }
.inp:focus, .tagbox:focus-within { background: color-mix(in srgb, var(--brand) 9%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 55%, transparent); }
/* the top bar on a phone: the title, then one row of small controls */
@media (max-width: 560px) { .topbar .actions { gap: 8px; flex-wrap: nowrap; } .credit small { display: none; } .topnets .net-b { width: 34px; height: 34px; } }
.pickph { display: grid; place-items: center; color: var(--brand); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, var(--bg)), color-mix(in srgb, var(--brand-2, var(--brand)) 16%, var(--bg))); } .pickph svg.ic { width: 26px; height: 26px; opacity: .7; }
@media (min-width: 961px) { .sidebar:not(.is-collapsed) .nav-item .label { white-space: normal; line-height: 1.35; } }
/* settings → networks: one row per network */
.netset { display: grid; gap: 12px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.net-logo.sm { width: 34px; height: 34px; flex: none; } .net-on { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #22B573; } .net-on svg.ic { width: 14px; height: 14px; }
.netset .cta { width: 100%; }
@media (max-width: 960px) { .toasts { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }

/* ---- Start: step 1 is plan cards + a full comparison table; step 2 (after Continue) is the sign-up form ---- */
.auth-card.plan-step { width: min(980px, 100%); }
.auth-card.details-step { width: min(480px, 100%); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.plan-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 16px; border-radius: 22px; text-align: start; background: color-mix(in srgb, var(--ink) 4%, transparent); transition: box-shadow .2s, background .2s, transform .2s; }
.plan-card:hover { transform: translateY(-2px); }
.plan-card.on { background: var(--rbg); box-shadow: var(--raise-sm), 0 0 0 2px var(--brand); }
.pc-radio { position: absolute; top: 14px; inset-inline-end: 14px; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 25%, transparent); }
.plan-card.on .pc-radio { background: var(--brand); box-shadow: inset 0 0 0 4px var(--rbg); }
.pc-name { font-size: 16px; }
.pc-price { font-size: 18px; } .pc-price small { font-size: 12px; font-weight: 600; color: var(--muted); } .pc-free { color: var(--brand); }
.pc-tok { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); } .pc-tok svg.ic { width: 15px; height: 15px; }
.pc-desc { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.compare-acc { margin-top: 4px; max-width: none; }
.ct-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.compare-table th, .compare-table td { padding: 9px 10px; text-align: center; border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.compare-table thead th { font-weight: 800; }
.compare-table th[scope="row"] { text-align: start; font-weight: 600; color: var(--muted); white-space: nowrap; }
.compare-table .ct-group th { text-align: start; padding-top: 16px; font-size: 12px; font-weight: 800; color: var(--brand); text-transform: none; border-bottom: none; }
.ct-yes { color: var(--brand); } .ct-yes svg.ic { width: 16px; height: 16px; } .ct-no { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.back-step { align-self: flex-start; }

/* ===================== entry pages (sign in / sign up / start / guest request): the flat, white, one-accent-blue
   look from the marketing landing page - no embossed shadows, hairline borders instead, lift only on hover.
   theme-init.js sets --bg/--rbg/--dbg/--ink/--brand etc as INLINE styles on <html> (one per palette), which
   beats any plain selector in this file, so every one of those tokens must be re-declared here, not just --bg. ===================== */
.auth, .auth-dialog {
  --brand: #16305C; --accent: #2563EB; --bg: #fff; --rbg: #fff; --dbg: #F3F4F6; --paper: #fff;
  --ink: #12141A; --muted: #626A7E; --auth-line: #E6E8EF; --auth-chip: #F3F4F6;
  --raise: none; --raise-sm: none; --raise-lg: none; --dip: none; --dip-sm: none;
}
:root[data-theme="dark"] .auth, :root[data-theme="dark"] .auth-dialog { --brand: #2F62D6; --accent: #7FB0F5; --bg: #0E1016; --rbg: #0E1016; --dbg: #181B24; --paper: #0E1016; --ink: #EDEEF1; --muted: #9A9FAD; --auth-line: #2A2E3A; --auth-chip: #181B24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth, :root:not([data-theme="light"]) .auth-dialog { --bg: #0E1016; --rbg: #0E1016; --dbg: #181B24; --paper: #0E1016; --ink: #EDEEF1; --muted: #9A9FAD; --auth-line: #2A2E3A; --auth-chip: #181B24; } }
body:has(.auth) { background: #fff; transition: background .25s; }
:root[data-theme="dark"] body:has(.auth) { background: #0E1016; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body:has(.auth) { background: #0E1016; } }

/* flat white, no background glow: the page itself carries no shadow or coloured blur */
.auth { position: relative; isolation: isolate; }

.auth .neu::before, .auth-dialog .neu::before, .auth .neu::after, .auth-dialog .neu::after { box-shadow: none; background: var(--auth-chip); }
.auth .neu, .auth-dialog .neu { border: 1px solid var(--auth-line); }
.auth .neu.icon-btn, .auth-dialog .neu.icon-btn { border-radius: 50%; }
.auth .btn.neu, .auth-dialog .btn.neu { border-radius: 14px; }
.auth .neu:hover::after, .auth-dialog .neu:hover::after { background: var(--bg); }
.auth .btn.neu:hover, .auth-dialog .btn.neu:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(10,14,30,.25); }
.auth-card { position: relative; z-index: 1; box-shadow: 0 2px 10px rgba(16,20,40,.04), 0 28px 60px -32px rgba(16,20,40,.16); border: 1px solid var(--auth-line); border-radius: 28px; }
:root[data-theme="dark"] .auth-card { box-shadow: 0 2px 10px rgba(0,0,0,.2), 0 28px 60px -32px rgba(0,0,0,.55); }
.auth .inp, .auth-dialog .inp { border: 1px solid var(--auth-line); background: var(--auth-chip); transition: box-shadow .2s, border-color .2s, background .2s; }
.auth .inp:focus, .auth-dialog .inp:focus { background: var(--bg); border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.auth .banner, .auth-dialog .banner { box-shadow: none; border: 1px solid var(--auth-line); background: var(--auth-chip); }
.auth .start-cta { margin-top: 6px; }

/* plan cards: shown for reference only right now, so they read as inert info, never as a thing you could tap */
.auth .plan-card { background: var(--auth-chip); border: 1px solid var(--auth-line); box-shadow: none; cursor: default; }
.auth .plan-card:hover { transform: none; }
.auth .plan-card.off { opacity: .8; }
.auth .plan-card.off .pc-name, .auth .plan-card.off .pc-price b { color: var(--muted); }
.auth .pc-soon { position: absolute; top: 14px; inset-inline-end: 14px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 16%, var(--bg)); color: var(--muted); font-size: 10.5px; font-weight: 800; }

.auth-dialog { box-shadow: 0 24px 60px -20px rgba(10,14,30,.28); border: 1px solid var(--auth-line); }
.modal:has(.auth-dialog) { background: rgba(20,22,30,.5); backdrop-filter: blur(3px); }
