/* Dingmate app: same palette and type as the website, built for phones first. */
:root{
  --ink:#2a1730; --ink-soft:#6b5873; --ground:#f6f2f7; --surface:#ffffff; --line:#e4dbe8;
  --rose:#d8345f; --rose-ink:#ffffff; --rose-soft:#fbe3ea; --mint:#14806a; --mint-soft:#e1f3ee;
  --warn:#9a4a00; --warn-soft:#fdf0dc; --error:#b4233f;
  --display:"Gloock","Iowan Old Style",Georgia,serif;
  --body:"Figtree","Segoe UI",system-ui,-apple-system,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root{ --ink:#f4ebf6; --ink-soft:#bba9c2; --ground:#150c18; --surface:#21142a; --line:#3a2944;
    --rose:#ff6b8f; --rose-ink:#1b0f1f; --rose-soft:#3a1a2a; --mint:#4fd1a8; --mint-soft:#12322a;
    --warn:#ffc27a; --warn-soft:#3a2a12; --error:#ff8aa1; color-scheme:dark; }
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
html{background:var(--ground)}
body{margin:0;background:var(--ground);color:var(--ink);font:17px/1.6 var(--body);-webkit-font-smoothing:antialiased}
a{color:inherit}
:focus-visible{outline:3px solid var(--rose);outline-offset:2px;border-radius:6px}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px max(16px,env(safe-area-inset-right)) 14px max(16px,env(safe-area-inset-left));
  border-bottom:1px solid var(--line);background:var(--surface)}
.brand{display:flex;align-items:center;gap:8px;font-weight:700;text-decoration:none;white-space:nowrap}
.brand i{width:10px;height:10px;border-radius:50%;background:var(--rose);display:inline-block}
.top small{color:var(--ink-soft);font-size:.85rem;text-align:right}
@media (max-width:480px){.top small{display:none}}
main{max-width:600px;margin:0 auto;padding:24px max(16px,env(safe-area-inset-right)) 56px max(16px,env(safe-area-inset-left))}
h1,h2{font-family:var(--display);font-weight:400;line-height:1.12;margin:0}
h1{font-size:clamp(1.9rem,6vw,2.5rem);margin-bottom:10px}
h2{font-size:1.35rem;margin-bottom:6px}
p{margin:0 0 12px}
.lead{color:var(--ink-soft);font-size:1.08rem;margin-bottom:22px}
.muted{color:var(--ink-soft)}
.small{font-size:.9rem}

/* progress */
.progress{margin:0 0 22px}
.progress ol{list-style:none;display:flex;gap:6px;padding:0;margin:0 0 8px}
.progress li{flex:1;height:6px;border-radius:99px;background:var(--line)}
.progress li.done,.progress li.now{background:var(--rose)}
.progress p{margin:0;font-size:.88rem;color:var(--ink-soft);font-weight:600}

.card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:20px;margin:0 0 16px}
.card > *:last-child{margin-bottom:0}
fieldset{border:0;padding:0;margin:0}
legend{font-family:var(--display);font-size:1.3rem;padding:0;margin-bottom:4px}

.field{display:flex;flex-direction:column;gap:6px;margin:0 0 16px}
label,.label{font-weight:600}
.hint{color:var(--ink-soft);font-size:.9rem;margin-top:-2px}
input[type=text],input[type=email],input[type=tel],input[type=url],select,textarea{
  width:100%;font:inherit;font-size:17px;color:var(--ink);background:var(--ground);
  border:1.5px solid var(--line);border-radius:12px;padding:12px 14px}
textarea{min-height:120px;resize:vertical;line-height:1.5}
textarea.tall{min-height:200px}
::placeholder{color:var(--ink-soft);opacity:.55;font-style:italic}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--rose);background:var(--surface)}
.invalid input,.invalid textarea,.invalid select{border-color:var(--error)}
.err{color:var(--error);font-size:.92rem;font-weight:600}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
@media (max-width:520px){.row2{grid-template-columns:1fr}}
.choices{display:flex;flex-direction:column;gap:8px}
.choice{display:flex;gap:10px;align-items:flex-start;font-weight:500;padding:12px 14px;border:1.5px solid var(--line);border-radius:12px;background:var(--ground);cursor:pointer}
.choice input{margin-top:5px;accent-color:var(--rose);width:18px;height:18px;flex:none}
.choice:has(input:checked){border-color:var(--rose);background:var(--rose-soft)}
.inline-choices{flex-direction:row;flex-wrap:wrap}
.inline-choices .choice{flex:1 1 140px}
.check{display:flex;gap:10px;align-items:flex-start;font-weight:500}
.check input{margin-top:5px;accent-color:var(--rose);width:18px;height:18px;flex:none}
.check > span{flex:1;min-width:0;line-height:1.5}
.check a{color:var(--rose);font-weight:600}

.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  font:700 1.05rem var(--body);padding:15px 20px;border-radius:999px;border:0;cursor:pointer;
  text-decoration:none;background:var(--rose);color:var(--rose-ink)}
.btn:hover{filter:brightness(1.05)}
.btn.secondary{background:transparent;color:var(--ink);border:1.5px solid var(--line)}
.btn-ig svg{width:22px;height:22px}
.actions{display:flex;flex-direction:column;gap:10px;margin-top:8px}

.list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}
.list li{display:flex;gap:12px;align-items:flex-start}
.num{flex:none;width:30px;height:30px;border-radius:50%;background:var(--rose-soft);color:var(--rose);
  font-weight:800;display:grid;place-items:center;font-size:.95rem}
.yes,.no{flex:none;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:.8rem;margin-top:2px}
.yes{background:var(--mint-soft);color:var(--mint)}
.no{background:var(--rose-soft);color:var(--rose)}
.note{display:flex;gap:10px;background:var(--mint-soft);border-radius:14px;padding:14px 16px;font-size:.95rem;margin:0 0 16px}
.note.warn{background:var(--warn-soft);color:var(--ink)}
.note.error{background:var(--rose-soft)}
.note b{display:block}
details{border:1px solid var(--line);border-radius:14px;padding:12px 16px;background:var(--surface);margin:0 0 16px}
summary{cursor:pointer;font-weight:700}
details ol{margin:10px 0 0;padding-left:20px}
details li{margin-bottom:6px}
.connected{display:flex;gap:12px;align-items:center;background:var(--mint-soft);border-radius:14px;padding:14px 16px;margin:0 0 18px}
.connected .tick{width:34px;height:34px;border-radius:50%;background:var(--mint);color:var(--surface);display:grid;place-items:center;font-weight:800;flex:none}
.copy{display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:var(--ground);border:1px dashed var(--line);border-radius:12px;padding:10px 12px;font-size:.9rem;word-break:break-all}
footer{max-width:600px;margin:0 auto;padding:0 16px 40px;color:var(--ink-soft);font-size:.85rem;text-align:center}
.hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
.type-card{align-items:center}
.type-card .type-icon{font-size:1.6rem;line-height:1;flex:none}

/* "Fill this in for me" */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.fill{display:flex;flex-direction:column;gap:10px;border:1.5px dashed var(--rose);background:var(--rose-soft);border-radius:18px;padding:20px;margin:0 0 16px}
.fill h2{margin:0}
.fill .hint{margin:0}
.fill input[type=url]{background:var(--surface)}
.fill .btn.secondary{background:var(--surface)}
.fill-picked{font-weight:600;font-size:.95rem}
.fill-status{margin:0;font-size:.95rem;font-weight:600}
.fill-status:empty{display:none}
.linkish{background:none;border:0;padding:0;font:inherit;color:var(--rose);text-decoration:underline;cursor:pointer}
.btn:disabled{opacity:.6;cursor:progress}
.filled textarea,.filled input{border-color:var(--mint)}
.filled-note{color:var(--mint);font-size:.88rem;font-weight:600}
.suggest{border:1.5px solid var(--mint);background:var(--mint-soft);border-radius:12px;padding:12px 14px}
.suggest .label{margin:0 0 6px;font-size:.92rem}
.suggest pre{margin:0 0 10px;white-space:pre-wrap;font:inherit;font-size:.95rem;max-height:240px;overflow:auto}
.suggest-actions{display:flex;flex-wrap:wrap;gap:8px}
.chip{font:600 .92rem var(--body);padding:8px 14px;border-radius:999px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer}
.chip:hover{border-color:var(--rose)}

/* test mode (team only) */
.test-banner{background:var(--warn-soft);color:var(--ink);font-size:.92rem;text-align:center;
  padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));border-bottom:1px solid var(--line)}
.test-banner a{color:var(--warn);font-weight:700}
.test-list{display:flex;flex-direction:column}
.test-head{display:flex;flex-direction:column;gap:2px;margin-bottom:10px}
.test-links{display:flex;flex-wrap:wrap;gap:8px}
.test-links .chip{text-decoration:none}
.actions form{display:contents}
.other-device{margin:16px 0 0;padding-top:14px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:10px}
.other-device p{margin:0}

/* live field help */
.live{font-size:.9rem;font-weight:600}
.live:empty{display:none}
.live.ok{color:var(--mint)}
.live.ok a{color:var(--mint)}
.live.bad{color:var(--error)}

/* learn my voice */
.voice{display:flex;flex-direction:column;gap:10px;margin:4px 0 18px;padding:16px;border:1.5px dashed var(--rose);border-radius:14px;background:var(--rose-soft)}
.voice .label,.voice .hint{margin:0}
.voice .btn.secondary{background:var(--surface)}
.voice .field{margin:6px 0 0}
.voice textarea{background:var(--surface)}

/* the owner's Instagram profile card */
.profile{display:flex;align-items:center;gap:14px;background:var(--mint-soft);border-radius:16px;padding:14px 16px;margin:0 0 18px}
.profile-big{flex-direction:column;text-align:center;background:var(--surface);border:1px solid var(--line);padding:26px 20px;gap:12px}
.avatar{position:relative;flex:none;width:52px;height:52px;border-radius:50%;overflow:hidden;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--rose),#f59e3d);color:#fff;font-weight:800;font-size:1.3rem}
.profile-big .avatar{width:96px;height:96px;font-size:2.4rem;box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--rose)}
.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.profile-text{display:flex;flex-direction:column;min-width:0;line-height:1.35}
.profile-handle{overflow-wrap:anywhere}
.profile-big .profile-handle{font-size:1.25rem}
.profile-name{color:var(--ink-soft)}
.profile-note{color:var(--mint);font-weight:600;margin-top:2px}
.profile .tick{margin-left:auto;width:30px;height:30px;border-radius:50%;background:var(--mint);color:var(--surface);display:grid;place-items:center;font-weight:800;flex:none}

/* account */
.top-right{display:flex;align-items:center;gap:14px}
.top-link{font-weight:700;font-size:.92rem;text-decoration:none;color:var(--rose);white-space:nowrap}
.acct-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.acct-head h1{margin-bottom:4px}
.pill{display:inline-block;font-size:.8rem;font-weight:700;padding:4px 10px;border-radius:999px;background:var(--line);color:var(--ink-soft);white-space:nowrap}
.pill-live{background:var(--mint-soft);color:var(--mint)}
.pill-now{background:var(--rose-soft);color:var(--rose);padding:2px 8px;font-size:.74rem;vertical-align:2px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
.card-head h2{margin:0}
.card-head .chip{text-decoration:none}
.steps{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:0}
.steps li{display:flex;gap:12px;align-items:flex-start;padding:0 0 16px;position:relative}
.steps li:not(:last-child)::before{content:"";position:absolute;left:14px;top:30px;bottom:2px;width:2px;background:var(--line)}
.steps li.step-done:not(:last-child)::before{background:var(--mint)}
.steps .dot{flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:.85rem;background:var(--line);color:var(--ink-soft);position:relative}
.steps .step-done .dot{background:var(--mint);color:var(--surface)}
.steps .step-now .dot{background:var(--rose);color:var(--rose-ink)}
.steps .step-next b{color:var(--ink-soft);font-weight:600}
.summary{margin:10px 0 0;display:flex;flex-direction:column;gap:14px}
.summary > div{display:flex;flex-direction:column;gap:2px;min-width:0}
.summary dt{font-weight:700;font-size:.92rem}
.summary dd{margin:0;display:flex;flex-direction:column;overflow-wrap:anywhere}
.summary .empty dt{color:var(--ink-soft)}

/* practice replies */
.pr{display:flex;flex-direction:column;gap:10px}
.pr-testing{margin:0;font-size:.85rem;font-weight:700;color:var(--ink-soft)}
.bubble{max-width:88%;padding:10px 14px;border-radius:18px;line-height:1.45;overflow-wrap:break-word;word-break:normal;white-space:pre-line}
.bubble.in{align-self:flex-start;background:var(--ground);border:1px solid var(--line);border-bottom-left-radius:6px}
.bubble.out{align-self:flex-end;background:var(--rose);color:var(--rose-ink);border-bottom-right-radius:6px}
.bubble.none{align-self:flex-end;background:transparent;border:1.5px dashed var(--line);color:var(--ink-soft);font-size:.92rem}
.bubble .ch{display:block;font-size:.75rem;font-weight:700;color:var(--ink-soft);margin-bottom:2px}
.pr-tag{margin:0;align-self:flex-end;font-size:.88rem;font-weight:600;color:var(--mint)}
.pr-tag.warn{color:var(--warn)}
.pr-note{margin:0;font-size:.92rem;background:var(--warn-soft);border-radius:10px;padding:8px 12px}
.pr-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;padding-top:4px;border-top:1px solid var(--line)}
.pr-actions form{margin:0}
.pr-more{border:0;padding:0;margin:0;background:none}
.pr-more summary{list-style:none;display:inline-block}
.pr-more summary::-webkit-details-marker{display:none}
.pr-more[open]{flex-basis:100%}
.pr-more form{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.pr-more textarea{min-height:90px}
.chip-yes{border-color:var(--mint)}
.pr-status{font-weight:700;font-size:.92rem;padding:8px 0}
.pr-status.ok{color:var(--mint)}
.pr-progress{display:flex;flex-direction:column;gap:10px}
.bar{height:8px;border-radius:99px;background:var(--line);overflow:hidden}
.bar span{display:block;height:100%;background:var(--mint)}
.chip-quiet{color:var(--ink-soft);border-style:dashed}

/* activity */
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:12px 0 10px}
@media (max-width:420px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.stats div{display:flex;flex-direction:column-reverse;gap:2px}
.stats dt{font-size:.85rem;color:var(--ink-soft);font-weight:600}
.stats dd{margin:0;font-family:var(--display);font-size:2rem;line-height:1}

/* learning from comment replies */
.learn-status{margin:6px 0 12px;font-weight:600}
.learn .actions form{display:contents}

.stats > div{display:flex;flex-direction:column-reverse;justify-content:flex-end}

/* ---------------------------------------------------------------- dashboard
   A step bar, and cards that carry the same step badge (green ✓ done, pink now, grey next). */
main.wide{max-width:1360px}
.acct-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.acct-head .lead{margin-bottom:18px}

.sbadge{flex:none;display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;
  font-weight:700;font-size:.9rem;background:var(--line);color:var(--ink-soft)}
.sbadge.s-done{background:var(--mint);color:var(--surface)}
.sbadge.s-now{background:var(--rose);color:var(--rose-ink);box-shadow:0 0 0 4px var(--rose-soft)}
.sbadge.s-icon{background:var(--ground);color:var(--ink-soft);border:1px solid var(--line)}
.stag{flex:none;font-size:.78rem;font-weight:700;padding:3px 10px;border-radius:99px;margin-left:auto}
.stag.s-done{background:var(--mint-soft);color:var(--mint)}
.stag.s-now{background:var(--rose-soft);color:var(--rose)}
.stag.s-next{background:var(--ground);color:var(--ink-soft)}

.stepbar{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:16px 20px;margin:0 0 18px}
.stepbar ol{list-style:none;margin:0;padding:0;display:flex;align-items:center}
.stepbar li{flex:1 1 auto;display:flex;align-items:center}
.stepbar li:last-child{flex:none}
.stepbar li:not(:last-child)::after{content:"";flex:1 0 14px;height:3px;border-radius:3px;margin:0 10px;background:var(--line)}
.stepbar li.s-done:not(:last-child)::after{background:var(--mint)}
.stepbar a,.stepbar li > span{display:flex;align-items:center;gap:10px;text-decoration:none;flex:none}
.stepbar a:hover .slabel{text-decoration:underline}
.slabel{font-weight:600;font-size:.95rem;line-height:1.2;white-space:nowrap}
.stepbar li.s-next .slabel{color:var(--ink-soft)}
.stepbar li.s-now .slabel{color:var(--rose)}
.stepbar-now{display:none;margin:12px 0 0;font-size:.95rem;color:var(--ink-soft)}

.dgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:18px;align-items:stretch}
.tile{margin:0;display:flex;flex-direction:column;gap:12px;min-width:0;height:100%}
.tile > *{margin:0}
.tile-head{display:flex;align-items:center;gap:10px}
.tile-head h2{margin:0;font-size:1.3rem}
.tile-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:auto}
.tile-actions .btn{width:auto;flex:1;min-width:160px}
.tile-actions form{flex:1;min-width:160px;margin:0}
.tile-actions form .btn{width:100%}
.tile-hero{grid-column:span 2}
/* With the Activity tile there are 8 slots: 4 across makes two even rows. */
@media (min-width:1200px){.dgrid-4{grid-template-columns:repeat(4,minmax(0,1fr))}}
.tile.is-now{border-color:var(--rose);box-shadow:0 0 0 1px var(--rose)}
.tile .profile{margin:0}
.tile .bar{margin:0}
.tile .stats{margin:4px 0}

.info{position:relative;border:0;padding:0;margin:0;background:none;border-radius:0;flex:none}
.info summary{list-style:none;cursor:pointer;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;
  border:1.5px solid var(--line);color:var(--ink-soft);font:italic 700 .8rem/1 Georgia,serif}
.info summary::-webkit-details-marker{display:none}
.info[open] summary{border-color:var(--rose);color:var(--rose)}
.info p{position:absolute;z-index:5;top:30px;left:-120px;width:min(300px,80vw);margin:0;padding:12px 14px;border-radius:12px;
  background:var(--surface);border:1px solid var(--line);box-shadow:0 8px 24px rgba(0,0,0,.25);font-size:.9rem;line-height:1.5;color:var(--ink)}

.checklist{list-style:none;padding:0;display:flex;flex-direction:column;gap:8px}
.checklist li{display:flex;gap:10px;align-items:flex-start;min-width:0}
.ck{flex:none;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:.72rem;font-weight:700;margin-top:3px}
.has .ck{background:var(--mint-soft);color:var(--mint)}
.missing .ck{border:1.5px dashed var(--line);color:var(--ink-soft)}
.ck-text{display:flex;flex-direction:column;min-width:0;line-height:1.35}
.ck-text b{font-size:.9rem}
.ck-val{font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.rows{margin:0;display:flex;flex-direction:column;gap:10px}
.rows div{display:flex;flex-direction:column;gap:0}
.rows dt{font-size:.88rem;font-weight:600;color:var(--ink-soft)}
.rows dd{margin:0;font-size:.95rem;line-height:1.4}
.learn-status{font-size:.98rem}
.linkbtn{background:none;border:0;padding:0;font:inherit;font-size:.92rem;color:var(--ink-soft);text-decoration:underline;cursor:pointer}
.signout{max-width:240px;margin:22px auto 0}

/* Reading text stays a comfortable width even when the dashboard is wide. */
.shell-main .sec-head p,.shell-main .lead{max-width:75ch}
/* mid widths: labels sit under their badges so six steps fit without touching */
@media (max-width:1180px) and (min-width:821px){
  .stepbar ol,.stepbar li{align-items:flex-start}
  .stepbar li:not(:last-child)::after{margin-top:13px}
  .stepbar a,.stepbar li > span{flex-direction:column;gap:6px}
  .slabel{font-size:.82rem;text-align:center;white-space:normal;max-width:6em}
}
@media (max-width:820px){
  /* phones: small labels under each circle, all six fit */
  .stepbar{padding:14px 6px}
  .stepbar ol{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:start}
  .stepbar li{position:relative;justify-content:center;min-width:0}
  .stepbar li:not(:last-child)::after{position:absolute;top:14px;left:calc(50% + 18px);right:calc(-50% + 18px);margin:0}
  .stepbar a,.stepbar li > span{flex-direction:column;align-items:center;gap:5px;min-width:0;width:100%}
  .slabel{display:block;font-size:.66rem;line-height:1.2;text-align:center;white-space:normal;max-width:4.5em}
  .stepbar-now{display:block}
  .dgrid{grid-template-columns:minmax(0,1fr)}
  .tile-hero{grid-column:auto}
  .tile{height:auto}
  .rows div{grid-template-columns:minmax(0,1fr);gap:0}
  .info p{left:auto;right:-10px}
}

/* Practice: a full-width "ask" bar on top, then every answer as cards filling the screen */
.askbar{border-color:var(--rose);display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.askbar h2{margin:0}
.askbar .hint{margin:0}
.askbar-form{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.askbar-form textarea{min-height:52px;resize:vertical}
.answers-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:6px 0 16px}
.answers-progress{flex:1 1 280px;display:flex;flex-direction:column;gap:6px;max-width:520px}
.answers-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.answers-actions .btn{width:auto}
.answers{column-width:340px;column-gap:18px}
.answers > .pr{break-inside:avoid;display:flex;margin:0 0 18px}
/* Side by side only when the CONTENT area is wide enough (the sidebar takes room too). */
@container (min-width:920px){
  .askbar{grid-template-columns:minmax(220px,300px) minmax(0,1fr);align-items:center}
  .askbar .radios{flex-direction:column;gap:6px}
  .askbar-form{grid-template-columns:minmax(260px,1fr) auto auto;align-items:stretch}
  .askbar-form .btn{width:auto;padding-inline:26px}
}
@container (min-width:560px) and (max-width:919.98px){
  .askbar-form{grid-template-columns:minmax(0,1fr) auto;align-items:center}
  .askbar-form textarea{grid-column:1 / -1}
  .askbar-form .btn{width:auto;padding-inline:26px}
}

/* radio buttons that look like radio buttons */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.radios{display:flex;gap:8px;margin:0;padding:0;border:0}
.radio{display:flex;align-items:center;gap:8px;padding:10px 16px;border:1.5px solid var(--line);border-radius:12px;
  background:var(--ground);font-weight:600;cursor:pointer;white-space:nowrap}
.radio input{width:18px;height:18px;margin:0;accent-color:var(--rose)}
.radio:has(input:checked){border-color:var(--rose);background:var(--rose-soft)}

/* make every button look pressable */
.btn{box-shadow:0 2px 0 rgba(0,0,0,.25),0 6px 16px -8px var(--rose);transition:transform .08s ease,filter .15s ease,box-shadow .15s ease}
.btn:hover{filter:brightness(1.08);transform:translateY(-1px)}
.btn:active{transform:translateY(1px);box-shadow:0 1px 0 rgba(0,0,0,.25)}
.btn.secondary{box-shadow:0 2px 0 rgba(0,0,0,.2)}
.btn.secondary:hover{border-color:var(--rose);background:var(--rose-soft)}
.chip{background:var(--ground);box-shadow:0 2px 0 rgba(0,0,0,.2);transition:transform .08s ease,border-color .15s ease;display:inline-flex;align-items:center;gap:6px}
.chip:hover{transform:translateY(-1px);background:var(--rose-soft)}
.chip:active{transform:translateY(1px);box-shadow:none}
.chip-yes{background:var(--mint-soft);border-color:var(--mint);color:var(--mint)}
.chip-yes:hover{background:var(--mint-soft);border-color:var(--mint)}
.pr-more summary.chip{list-style:none}
.pr-more summary.chip::-webkit-details-marker{display:none}
@media (prefers-reduced-motion: reduce){.btn,.chip{transition:none}.btn:hover,.chip:hover{transform:none}}

/* checked replies: grouped below, greyed out */
.archive{border:0;padding:0;background:none;margin:8px 0 0}
.archive > summary{display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border:1.5px solid var(--line);border-radius:999px;
  background:var(--surface);font-weight:700;margin:0 0 16px;box-shadow:0 2px 0 rgba(0,0,0,.2)}
.archive > summary::before{content:"▸";transition:transform .15s}
.archive[open] > summary::before{transform:rotate(90deg)}
.archive .pr{opacity:.6}
.archive .pr:hover{opacity:1}
.pr-actions .chip{padding:7px 12px;font-size:.88rem}
.pr-actions .chip-quiet{margin-left:auto}

/* Needs you + alert settings */
.btn-inline{width:auto;padding:12px 22px;flex:none}
.kind-tag{display:inline-block;font-size:.8rem;font-weight:700;padding:4px 10px;border-radius:99px;background:var(--ground);color:var(--ink-soft);border:1px solid var(--line)}
.k-health,.k-complaint{background:var(--warn-soft);color:var(--warn);border-color:transparent}
.k-business{background:var(--mint-soft);color:var(--mint);border-color:transparent}
.ny .pr-actions a.chip{text-decoration:none}
.alert-row{display:flex;flex-direction:column;gap:8px;padding:14px 0;border-bottom:1px solid var(--line)}
.alert-row:first-child{padding-top:0}
.alert-row:last-child{border-bottom:0;padding-bottom:0}
.alert-row legend{padding:0;margin-bottom:2px}
.alert-row .hint{margin:0}
.alert-row .radios{flex-wrap:wrap}
.alert-row .radio{flex:1 1 0;min-width:0;white-space:normal;padding:10px 12px}
.alert-row legend .kind-tag{font-family:var(--body)}
.needs-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.needs-list li{display:flex;justify-content:space-between;gap:10px;font-size:.92rem}
.needs-list .v{color:var(--ink-soft);white-space:nowrap}

.btn.secondary.btn-now{border-color:var(--rose);color:var(--rose)}
.btn.secondary.btn-now:hover{background:var(--rose-soft)}
.confirm-off{border:0;padding:0;margin:0;background:none;position:relative}
.confirm-off > summary{list-style:none;cursor:pointer}
.confirm-off > summary::-webkit-details-marker{display:none}
.confirm-box{position:absolute;z-index:5;right:0;bottom:calc(100% + 8px);width:min(300px,80vw);padding:14px;border-radius:14px;
  background:var(--surface);border:1px solid var(--line);box-shadow:0 8px 24px rgba(0,0,0,.3);display:flex;flex-direction:column;gap:10px}
.confirm-box p{margin:0;font-size:.92rem;line-height:1.45}
.confirm-box .btn{width:100%}

/* Posts (posting add-on) */
.posts-layout{display:grid;grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:24px;align-items:start}
@media (max-width:900px){.posts-layout{grid-template-columns:1fr}}
.post-form{position:sticky;top:16px}
@media (max-width:900px){.post-form{position:static}}
.drop{display:flex;flex-direction:column;gap:6px;border:1.5px dashed var(--rose);background:var(--rose-soft);border-radius:16px;padding:16px;cursor:pointer}
.drop{position:relative}
.drop input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.drop:focus-within{outline:3px solid var(--rose);outline-offset:2px}
.drop.over{background:var(--surface)}
.drop-text b{color:var(--rose)}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:8px}
.thumbs img,.thumbs .ph{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:10px;border:1px solid var(--line)}
.ph{display:grid;place-items:center;background:var(--ground);color:var(--ink-soft);font-size:.8rem;font-weight:700;text-align:center;padding:6px;overflow-wrap:anywhere;border-radius:10px;border:1px solid var(--line);aspect-ratio:4/5}
.writer{gap:8px}
.writer-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.when{border:0;padding:0;display:flex;flex-direction:column;gap:8px}
.when legend{font-weight:700;margin-bottom:6px}
.when .choice span{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.when input[type=datetime-local]{width:auto;height:auto;margin:0;accent-color:auto;font:inherit;padding:8px 10px;border:1.5px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink)}
.post-list h2{margin-top:0}
.plist{display:flex;flex-direction:column;gap:14px}
.plist > .card{margin:0}
.post{display:grid;grid-template-columns:120px minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:480px){.post{grid-template-columns:84px minmax(0,1fr);gap:12px}}
.post-media{display:grid;grid-template-columns:1fr 1fr;gap:4px}
.post-media > :only-child{grid-column:1 / -1}
.post-media img,.post-media .ph{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:8px}
.post-body{display:flex;flex-direction:column;gap:8px;min-width:0}
.post-cap{margin:0;white-space:pre-line;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.post.is-canceled{opacity:.6}

/* ---------------------------------------------------------------- app shell (signed in) */
.shell-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:var(--surface);
  border-bottom:1px solid var(--line);
  padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left))}
.shell-biz{font-weight:600;color:var(--ink-soft);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}
.shell-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:99px;font-size:.82rem;font-weight:700;white-space:nowrap}
.shell-status i{width:8px;height:8px;border-radius:50%;background:currentColor}
.shell-status.s-on{background:var(--mint-soft);color:var(--mint)}
.shell-status.s-trial{background:var(--rose-soft);color:var(--rose)}
.shell-status.s-paused{background:var(--warn-soft);color:var(--warn)}
.shell-status.s-setup{background:var(--ground);color:var(--ink-soft);border:1px solid var(--line)}
.shell{display:flex;gap:32px;max-width:none;margin:0;
  padding:24px max(16px,env(safe-area-inset-right)) 32px max(16px,env(safe-area-inset-left))}
.shell-side{flex:0 0 220px;display:flex;flex-direction:column;gap:2px;align-self:flex-start;position:sticky;top:16px}
.shell-side hr{border:0;border-top:1px solid var(--line);margin:10px 4px;width:auto}
.side-link{display:flex;align-items:center;gap:10px;min-height:42px;padding:8px 12px;border-radius:10px;border:0;
  background:transparent;color:var(--ink-soft);font:500 .98rem var(--body);text-decoration:none;text-align:left;cursor:pointer;width:100%}
.side-link:hover{background:var(--surface);color:var(--ink)}
.side-link.on{background:var(--rose-soft);color:var(--ink);font-weight:700}
.side-link svg{flex:none}
.side-out{margin-top:10px}
.count{margin-left:auto;min-width:22px;padding:1px 7px;border-radius:99px;background:var(--rose);color:var(--rose-ink);
  font-size:.75rem;font-weight:800;text-align:center;line-height:1.5}
.shell-main{flex:1 1 auto;min-width:0;max-width:none;margin:0;padding:0;container-type:inline-size}
.shell-main.wide{max-width:none}
.shell-bottom{display:none}
.shell-foot{max-width:none;margin:0 auto;padding:0 16px 32px;color:var(--ink-soft);font-size:.82rem;text-align:center}
.shell-foot a{color:inherit}
/* section pages */
.sec-head{margin:0 0 18px}
.sec-head p{color:var(--ink-soft);margin:6px 0 0}
.sec-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.sec-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:18px 20px;display:flex;flex-direction:column;gap:8px;min-width:0}
.sec-card h2{font-family:var(--body);font-weight:700;font-size:1.05rem;margin:0}
.sec-card p{margin:0;color:var(--ink-soft)}
.sec-card .tile-actions{margin-top:auto;padding-top:6px}
.sec-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.sec-row:first-of-type{border-top:0}
.soon{display:inline-block;padding:2px 10px;border-radius:99px;background:var(--ground);border:1px solid var(--line);
  color:var(--ink-soft);font-size:.78rem;font-weight:700;align-self:flex-start}
.more-list{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:4px 16px}
.more-list a{display:flex;align-items:center;gap:12px;min-height:54px;border-bottom:1px solid var(--line);text-decoration:none;font-weight:600}
.more-list a:last-child{border-bottom:0}
.more-list a span{margin-left:auto;color:var(--ink-soft);font-weight:500;font-size:.9rem}

@media (max-width:900px){
  .shell-side{display:none}
  .shell{padding-top:18px}
  body.in-shell{padding-bottom:calc(68px + env(safe-area-inset-bottom))}
  .shell-bottom{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:20;background:var(--surface);
    border-top:1px solid var(--line);
    padding:0 max(4px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px,env(safe-area-inset-left))}
  .bottom-link{flex:1;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    min-height:60px;color:var(--ink-soft);font-size:.72rem;font-weight:700;text-decoration:none}
  .bottom-link.on{color:var(--rose)}
  .bottom-link .count{position:absolute;top:6px;left:calc(50% + 6px);margin:0;padding:0 6px;min-width:18px;font-size:.68rem}
  .shell-biz{order:3;flex-basis:100%}
}
/* Needs you: answer from the dashboard */
.ny-reply{display:flex;flex-direction:column;gap:8px;margin-top:4px;padding-top:10px;border-top:1px solid var(--line)}
.ny-reply > label:first-child{font-weight:700;font-size:.92rem}
.ny-reply textarea{width:100%;min-height:84px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;
  background:var(--surface);color:var(--ink);font:400 1rem var(--body);resize:vertical}
.ny-reply .check{font-size:.92rem}
.ny-note{margin:4px 0 0;padding:8px 12px;border-radius:10px;font-size:.92rem;font-weight:600}
.ny-note.ok{background:var(--mint-soft);color:var(--mint)}
.ny-note.bad{background:var(--warn-soft);color:var(--warn)}

/* Pause / resume the assistant (Home and Assistant) */
.pill-paused{background:var(--warn-soft);color:var(--warn)}
.pause-card{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:16px 20px;margin:0 0 18px}
.pause-card h2{font-size:1.05rem;margin:0 0 4px}
.pause-card p{margin:0;color:var(--ink-soft);font-size:.92rem;max-width:52ch}
.pause-card form{margin:0}
.pause-card .btn{width:auto;margin:0;white-space:nowrap}
.pause-card.is-paused{border-color:var(--warn);background:var(--warn-soft)}

/* Activity: All / Filtered */
.feed-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 12px}
.feed-tabs .chip{text-decoration:none}
.feed-tabs .chip.on{background:var(--rose);color:var(--rose-ink);border-color:var(--rose)}

a.kind-tag{text-decoration:none}
a.kind-tag:hover{filter:brightness(1.15)}

/* Account switcher (top bar) and "Your accounts" */
.acct-switch{position:relative;flex:1 1 auto;min-width:0;border:0;background:none;padding:0;margin:0;box-shadow:none}
.acct-switch summary{list-style:none;display:inline-flex;align-items:center;gap:6px;max-width:100%;cursor:pointer;
  font-weight:700;color:var(--ink);padding:6px 10px;border-radius:10px;border:1px solid var(--line)}
.acct-switch summary::-webkit-details-marker{display:none}
.acct-switch summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acct-switch summary .count{margin-left:4px}
.acct-switch[open] summary{background:var(--ground)}
.acct-menu{position:absolute;z-index:30;top:calc(100% + 6px);left:0;min-width:min(320px,90vw);max-width:90vw;
  background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:6px;
  box-shadow:0 12px 32px rgba(0,0,0,.25);display:flex;flex-direction:column;gap:2px}
.acct-menu form{margin:0}
.acct-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:0;border-radius:10px;
  background:transparent;color:var(--ink);font:500 .95rem var(--body);text-align:left;text-decoration:none;cursor:pointer}
.acct-item span{display:flex;flex-direction:column;min-width:0}
.acct-item small{color:var(--ink-soft)}
.acct-item:hover{background:var(--ground)}
.acct-item.on{background:var(--rose-soft)}
.acct-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.acct-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:14px;min-width:0}
.acct-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.acct-card-head h2{font-size:1.15rem;margin:0 0 2px}
.acct-nums{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:0}
.acct-nums .acct-needs{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between}
.acct-nums .acct-needs dd{margin:0}
.acct-nums div{background:var(--ground);border-radius:12px;padding:10px}
.acct-nums dt{font-size:.78rem;color:var(--ink-soft);font-weight:600}
.acct-nums dd{margin:2px 0 0;font:400 1.6rem var(--display);line-height:1.1}
.acct-nums .hot{background:var(--rose-soft)}
.acct-nums .hot dd{color:var(--rose)}
.acct-card form{margin:0;margin-top:auto}
.acct-card .btn{width:100%;margin:0}
@media (max-width:900px){.acct-switch{order:3;flex-basis:100%}}
.side-back{color:var(--ink-soft);font-size:.92rem}
.acct-add{color:var(--rose);font-weight:700;border-top:1px solid var(--line);border-radius:0 0 10px 10px;margin-top:4px}
.acct-card-add{align-items:center;justify-content:center;text-align:center;border-style:dashed;text-decoration:none;color:var(--ink);min-height:200px;gap:6px}
.acct-card-add > span:first-child{font-size:2rem;line-height:1;color:var(--rose)}
.acct-card-add:hover{border-color:var(--rose)}
.add-form form{display:flex;flex-direction:column;gap:12px;max-width:560px}
.add-form .btn{align-self:flex-start;width:auto}
.acct-card > .btn{margin-top:auto;text-align:center}

/* Home: Today and "Setup complete" */
.today{display:flex;flex-direction:column;gap:14px}
.today-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.today-head h2{margin:0}
.today-nums{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0}
.today-nums div{background:var(--ground);border-radius:12px;padding:10px 12px}
.today-nums dt{font-size:.8rem;color:var(--ink-soft);font-weight:600}
.today-nums dd{margin:2px 0 0;font:400 1.7rem var(--display);line-height:1.1}
.today-nums dd a{color:inherit;text-decoration:none}
.today-nums .hot{background:var(--rose-soft)}
.today-nums .hot dd{color:var(--rose)}
.latest{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.latest li{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who status" "text status";gap:2px 12px;
  padding:10px 0;border-top:1px solid var(--line)}
.latest-who{grid-area:who;font-weight:700;font-size:.9rem}
.latest-text{grid-area:text;color:var(--ink-soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.latest-status{grid-area:status;align-self:center;font-size:.78rem;font-weight:700;padding:3px 10px;border-radius:99px;
  background:var(--ground);color:var(--ink-soft);white-space:nowrap}
.latest-status.s-reply{background:var(--mint-soft);color:var(--mint)}
.latest-status.s-handoff{background:var(--rose-soft);color:var(--rose)}
.setup-done{padding:10px 16px}
.setup-done summary{display:flex;align-items:center;gap:8px;font-weight:700}
.setup-done summary .muted{margin-left:auto;font-weight:500}
.setup-done .stepbar{margin:12px 0 0;border:0;padding:0;background:none}
@media (max-width:620px){.today-nums{grid-template-columns:repeat(2,minmax(0,1fr))}}
.latest-h{font:700 .85rem var(--body);color:var(--ink-soft);margin:4px 0 -6px}
.usage-card .bar.warn span{background:var(--warn)}
.usage-card .bar.full span{background:var(--error)}

/* Connected channels on "Your accounts" */
.chan-chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.chan{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:99px;border:1px solid var(--line);
  font-size:.82rem;font-weight:700;color:var(--ink-soft);opacity:.75}
.chan.on{opacity:1;color:var(--ink);background:var(--ground)}
.chan span{font-weight:500;color:var(--ink-soft)}
.chan a{font-weight:600}
.chan-ic{width:18px;height:18px;flex:none}
.chan-ic.ig{fill:none;stroke:#e1306c;stroke-width:2}
.chan-ic.ig circle:last-child{fill:#e1306c;stroke:none}
.chan-ic.fb{fill:#0a7cff}
.chan-ic.fb .bolt{fill:#fff}
.chan:not(.on) .chan-ic{filter:grayscale(1)}
.chan-h{display:flex;align-items:center;gap:8px}
.chan-h .chan-ic{width:22px;height:22px}
.chan-ic.wa{fill:#25d366}
.msg-from,.latest-who{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.msg-from .chan-ic,.latest-who .chan-ic{width:15px;height:15px}
.acct-chans{display:flex;align-items:center;gap:4px}
.acct-chans .chan-ic{width:13px;height:13px}
.chip-ic{display:inline-flex;align-items:center;gap:6px}
.chip-ic .chan-ic{width:16px;height:16px}
.dbl-note{margin-top:16px;border-color:var(--warn)}
.chan-ic.tg circle{fill:#26a5e4}
.chan-ic.tg .plane{fill:#fff}
.tg-steps{margin:0;padding-left:20px;color:var(--ink-soft);display:flex;flex-direction:column;gap:4px}
.tg-form{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.tg-form input{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:400 .95rem var(--body)}
.tg-form .btn{width:auto;align-self:flex-start;margin:0}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------------------------------------------------------------- Inbox */
.inbox{display:grid;grid-template-columns:minmax(280px,380px) minmax(0,1fr);gap:18px;align-items:start}
.ib-list,.ib-thread{background:var(--surface);border:1px solid var(--line);border-radius:18px;min-width:0}
.ib-list{padding:16px;display:flex;flex-direction:column;gap:10px;position:sticky;top:16px;max-height:calc(100vh - 120px);overflow:auto}
.ib-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.ib-head h1{margin:0;font-size:1.8rem}
.ib-search input{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--ground);color:var(--ink);font:400 .95rem var(--body)}
.ib-filters{margin:0}
.ib-rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.ib-row{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who time" "last chip";gap:3px 10px;
  padding:11px 10px;border-radius:12px;text-decoration:none;color:var(--ink)}
.ib-row:hover{background:var(--ground)}
.ib-row.on{background:var(--rose-soft)}
.ib-who{grid-area:who;display:flex;align-items:center;gap:6px;min-width:0}
.ib-who b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ib-who .chan-ic,.ib-ttl h2 .chan-ic{width:16px;height:16px;flex:none}
.ib-time{grid-area:time;white-space:nowrap}
.ib-last{grid-area:last;color:var(--ink-soft);font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ib-chip{grid-area:chip;justify-self:end;align-self:center;font-size:.72rem;font-weight:700;padding:2px 9px;border-radius:99px;
  background:var(--ground);color:var(--ink-soft);white-space:nowrap}
.ib-chip.s-needs{background:var(--rose-soft);color:var(--rose)}
.ib-chip.s-you{background:var(--warn-soft);color:var(--warn)}
.ib-chip.s-ai{background:var(--mint-soft);color:var(--mint)}
.ib-empty,.ib-pick{padding:24px 8px;text-align:center}
.ib-thread{padding:16px 18px;display:flex;flex-direction:column;gap:12px}
.ib-thead{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid var(--line)}
.ib-back{display:none;color:var(--ink)}
.ib-ttl{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:1 1 auto;min-width:0}
.ib-ttl h2{margin:0;font-size:1.15rem;display:flex;align-items:center;gap:8px}
.ib-actions{display:flex;gap:8px;flex-wrap:wrap}
.ib-actions form{margin:0}
.ib-msgs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ib-in,.ib-out{display:flex;flex-direction:column;gap:3px;max-width:min(560px,85%)}
.ib-in{align-self:flex-start}
.ib-out{align-self:flex-end;align-items:flex-end}
.ib-in .bubble,.ib-out .bubble{margin:0;max-width:100%}
.bubble.out.mine{background:var(--ground);color:var(--ink);border:1px solid var(--line)}
.ib-by{font-size:.75rem;font-weight:700;color:var(--ink-soft)}
.ib-meta{font-size:.75rem;color:var(--ink-soft)}
.ib-note{align-self:center;font-size:.8rem;color:var(--ink-soft);background:var(--ground);border-radius:99px;padding:4px 12px;text-align:center;max-width:90%}
.ib-review{justify-content:flex-end}
.ib-reply{display:flex;gap:10px;align-items:flex-end;border-top:1px solid var(--line);padding-top:12px}
.ib-reply textarea{flex:1;min-height:52px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--ground);color:var(--ink);font:400 1rem var(--body);resize:vertical}
.ib-reply .btn{width:auto;margin:0}
.ib-hint{margin:0}
@media (max-width:900px){
  .inbox{grid-template-columns:minmax(0,1fr)}
  .ib-list{position:static;max-height:none}
  .inbox.has-open .ib-list{display:none}
  .inbox:not(.has-open) .ib-thread{display:none}
  .ib-back{display:inline-flex}
}
.ib-actions a.chip{text-decoration:none;display:inline-flex;align-items:center}
.ny-said{display:flex;flex-direction:column;margin-bottom:6px}
.trial-bar{margin:0 0 16px;padding:10px 14px;border-radius:12px;font-size:.95rem;font-weight:600;background:var(--mint-soft);color:var(--mint)}
.trial-bar.soon{background:var(--warn-soft);color:var(--warn)}
.trial-bar.ended{background:var(--rose-soft);color:var(--error)}
.tg-welcome{display:grid;gap:8px;margin:12px 0}.tg-welcome textarea{width:100%;font:inherit;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink)}.tg-welcome p{margin:0}
.tg-preview{display:flex;flex-direction:column}
.tg-preview .bubble{max-width:100%}
.tg-welcome details form{display:grid;gap:8px;margin-top:10px}
.profile-handle{overflow-wrap:normal;word-break:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;display:block}
.profile-text{min-width:0}
.btn-google{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;background:#fff;color:#1f1f1f;border:1px solid #dadce0;text-decoration:none}
.btn-google:hover{background:#f7f8f8}
.or-line{display:flex;align-items:center;gap:12px;color:var(--ink-soft);font-size:.85rem;margin:16px 0}
.or-line::before,.or-line::after{content:"";flex:1;border-top:1px solid var(--line)}
.chan-setup details.how{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
.chan-setup details.how summary{cursor:pointer;font-weight:600;font-size:.92rem;color:var(--ink-soft)}
.chan-setup details.how ol{margin:10px 0 8px;padding-left:20px;display:grid;gap:6px}
.chan-setup details.how p{margin:6px 0 0}
.chan-setup .tg-form{display:grid;gap:10px}
.chan-setup .tg-form .btn{width:100%}
.chan-status{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:12px}
.chan-status li{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:10px}
.chan-status li .chan-ic{margin-top:3px}
.chan-status li div{display:flex;flex-direction:column;min-width:0}
.chan-name{font-weight:600;font-size:.95rem;white-space:nowrap}
.chan-state{font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chan-state.off{color:var(--ink-soft)}
.chan-state.on{color:var(--mint);font-weight:600}

/* Desktop proportions: the app is built phone-first (17px, roomy cards). On a
   computer screen that reads oversized, so the dashboard steps the scale down
   and keeps the content a comfortable width next to the menu. */
@media (min-width:900px){
  .shell{font-size:15px}
  .shell-main,.shell-main.wide{max-width:1440px}
  .shell-main.full{max-width:none}
  .shell-main h1{font-size:2.1rem;margin-bottom:6px}
  .shell-main h2{font-size:1.2rem}
  .shell-main .lead,.shell-main .sec-head p{font-size:.98rem}
  .shell-main .card{padding:16px 18px;border-radius:14px}
  .shell-main .dgrid{gap:14px}
  .shell-main .tile{gap:10px}
  .shell-main .btn{min-height:40px;padding-top:8px;padding-bottom:8px;font-size:.95rem}
  .shell-main .stats dd{font-size:1.6rem}
  .shell-main .sec-card{padding:14px 16px;border-radius:14px}
  .shell-main .acct-card{padding:16px;border-radius:14px}
  .shell-main .acct-nums dd{font-size:1.35rem}
  .shell-side .side-link{font-size:.95rem}
}

/* Pages that update by themselves (see app_shell.html): new items fade in. */
@keyframes live-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.live-new{animation:live-in .35s ease-out}
@media (prefers-reduced-motion:reduce){.live-new{animation:none}}

/* Inbox: chats with messages the owner hasn't seen yet */
.ib-unread{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:6px;
  padding:0 6px;border-radius:99px;background:var(--rose);color:var(--rose-ink);font-size:.72rem;
  font-weight:800;line-height:1;vertical-align:middle}
.ib-row.unread .ib-last{color:var(--ink);font-weight:700}
.ib-row.unread .ib-time{color:var(--ink);font-weight:700}

/* Assistant page: the owner's instructions */
.instr{margin-top:20px}
.instr-list{list-style:none;margin:12px 0 16px;padding:0;display:grid;gap:8px}
.instr-list li{margin:0;padding:0;border:0;background:none}
.instr-list summary{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;cursor:pointer;list-style:none}
.instr-list summary::-webkit-details-marker{display:none}
.instr-text{min-width:0;overflow-wrap:anywhere}
.instr-form{display:grid;gap:8px;margin-top:10px}
.instr-form textarea{width:100%}
.instr-form .pr-actions{display:flex;justify-content:flex-end}
.instr-form .btn{width:auto;min-width:120px}
.instr-form textarea{min-height:64px}
