/* Closavo — app styles. No external fonts, no trackers. */
:root {
  --bg: #f7f4ef; --bg2: #efeae2; --card: #ffffff; --ink: #1f1d2b; --ink2: #4d4a5c; --ink3: #8a8698;
  --line: #e6e0d6; --brand: #4338ca; --brand2: #6157e6; --brand-soft: #ecebfd; --accent: #e8875f; --accent-soft: #fcede5;
  --sage: #5f8a72; --sage-soft: #e5efe8; --warn: #b4572d; --warn-soft: #fbe9df; --danger: #b42d3c;
  --shadow: 0 1px 2px rgba(31,29,43,.06), 0 6px 24px rgba(31,29,43,.06);
  --shadow-lg: 0 12px 48px rgba(31,29,43,.18);
  --r: 18px; --r-sm: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #15141c; --bg2: #1c1b25; --card: #21202b; --ink: #f2eff8; --ink2: #c7c3d4; --ink3: #8f8ba0; --line: #33313f;
  --brand: #8b85ff; --brand2: #a39eff; --brand-soft: #2a2850; --accent: #f0a07d; --accent-soft: #3a2a24; --sage: #8fbca0; --sage-soft: #213029;
  --warn: #f0a07d; --warn-soft: #3a2a24; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.25); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #15141c; --bg2: #1c1b25; --card: #21202b; --ink: #f2eff8; --ink2: #c7c3d4; --ink3: #8f8ba0; --line: #33313f;
  --brand: #8b85ff; --brand2: #a39eff; --brand-soft: #2a2850; --accent: #f0a07d; --accent-soft: #3a2a24; --sage: #8fbca0; --sage-soft: #213029;
  --warn: #f0a07d; --warn-soft: #3a2a24; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.25); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
a { color: var(--brand); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .25rem; }
h2 { font-size: 1.35rem; margin: 0 0 .75rem; }
h3 { font-size: 1.08rem; margin: 0 0 .5rem; }
h4 { font-size: .95rem; margin: .6rem 0 .3rem; }
.muted { color: var(--ink3); } .small { font-size: .86rem; } .tiny { font-size: .76rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

/* Shell */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.shell > *, .grid > *, .actions > * { min-width: 0; }
.side { display: none; }
.main { padding: 16px 16px 108px; max-width: 980px; width: 100%; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.brandmark { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.logo { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--accent)); display: grid; place-items: center; color: #fff; font-size: 18px; }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--ink3); font-size: .72rem; font-weight: 600; padding: 6px 2px; border-radius: 12px; }
.tab .ic { font-size: 20px; line-height: 1; filter: grayscale(.4); }
.tab.on { color: var(--brand); } .tab.on .ic { filter: none; }
@media (min-width: 900px) {
  .shell { grid-template-columns: 240px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--bg2); }
  .side .brandmark { margin: 0 8px 22px; }
  .side a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink2); text-decoration: none; font-weight: 600; }
  .side a.nav:hover { background: var(--card); }
  .side a.nav.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow); }
  .side .spacer { flex: 1; }
  .tabbar { display: none; }
  .main { padding: 28px 36px 60px; }
  .topbar .brandmark { visibility: hidden; }
}

/* Banner */
.demo-banner { background: linear-gradient(90deg, var(--brand-soft), var(--accent-soft)); color: var(--ink2); font-size: .82rem; padding: 8px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.demo-banner b { color: var(--ink); }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: minmax(0, 1fr); } .g3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: 1fr 1fr 1fr; } }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.section-title h2 { margin: 0; font-size: 1.15rem; }
.section-title a { font-size: .86rem; font-weight: 600; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; text-decoration: none; font-size: .94rem; min-height: 42px; transition: transform .08s ease, background .15s; }
.btn:hover { background: var(--bg2); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); padding-left: 8px; padding-right: 8px; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn.sm { padding: 6px 12px; min-height: 34px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Hero actions on Home */
.hello { margin-bottom: 18px; }
.hello p { margin: 4px 0 0; color: var(--ink2); }
.actions { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action { position: relative; border-radius: var(--r); padding: 18px 16px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.action .ai { font-size: 26px; }
.action b { font-family: var(--serif); font-size: 1.06rem; display: block; }
.action span { font-size: .82rem; color: var(--ink3); }
.action.big { grid-column: 1 / -1; background: linear-gradient(135deg, var(--brand), #6d4fd8 60%, var(--accent)); color: #fff; border: 0; min-height: 132px; }
.action.big span { color: rgba(255,255,255,.85); }
.action.big::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
@media (min-width: 760px) { .actions { grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); } .action.big { grid-column: auto; } }

/* Lists */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; }
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 600; } .item .s { font-size: .84rem; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--ink3); }

.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; font-family: var(--serif); font-size: 1.1rem; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.8rem; }
.avatar.sm { width: 34px; height: 34px; font-size: .9rem; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--bg2); color: var(--ink2); border: 1px solid var(--line); white-space: nowrap; }
.pill.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--warn); border-color: transparent; }
.pill.sage { background: var(--sage-soft); color: var(--sage); border-color: transparent; }
.pill.sim { background: repeating-linear-gradient(45deg, var(--accent-soft), var(--accent-soft) 6px, transparent 6px, transparent 12px); color: var(--warn); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Connection cards */
.conn-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .conn-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .conn-grid { grid-template-columns: 1fr 1fr 1fr; } }
.conn { text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; transition: transform .12s, box-shadow .12s; }
.conn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.conn .top { display: flex; gap: 12px; align-items: center; }
.conn .nm { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; }
.conn .meta { font-size: .82rem; color: var(--ink3); }
.conn .sum { font-size: .9rem; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conn .foot { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--ink3); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { flex: 1; min-width: 180px; position: relative; }
.search input { width: 100%; padding-left: 38px; }
.search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink3); font-size: 18px; }

/* Forms */
input[type=text], input[type=search], input[type=number], input[type=date], input[type=datetime-local], input[type=password], input[type=email], textarea, select {
  width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-sm); padding: 11px 13px; outline: none; }
textarea { resize: vertical; min-height: 92px; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
label.f { display: block; font-size: .84rem; font-weight: 600; color: var(--ink2); margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); }
.seg { display: inline-flex; background: var(--bg2); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .86rem; color: var(--ink2); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow); }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-sm); padding: 12px; text-align: left; cursor: pointer; font-size: .9rem; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand); }
.opt small { display: block; color: var(--ink3); font-size: .78rem; margin-top: 2px; }

/* Modal / sheet */
.overlay { position: fixed; inset: 0; background: rgba(20,18,30,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { background: var(--bg); width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: up .22s cubic-bezier(.2,.8,.2,1); }
.sheet.narrow { max-width: 560px; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--card); }
.sheet-head h2 { margin: 0; font-size: 1.2rem; flex: 1; }
.sheet-body { padding: 18px; overflow-y: auto; }
.sheet-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (min-width: 760px) { .overlay { align-items: center; padding: 24px; } .sheet { max-width: 920px; border-radius: 24px; max-height: 90vh; } }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Connection modal tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 18px; background: var(--card); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 12px 12px; font-weight: 600; color: var(--ink3); border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; font-size: .9rem; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.profile-head { display: flex; gap: 16px; align-items: center; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: .92rem; }
.kv dt { color: var(--ink3); } .kv dd { margin: 0; }
.fact { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.fact + .fact { margin-top: 8px; }
.fact .grow { flex: 1; }
.fact.pending { border-style: dashed; border-color: var(--accent); background: var(--accent-soft); }
.fact.conflict { border-color: var(--warn); }
.kind { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kind.stated { color: var(--sage); } .kind.observed { color: var(--brand); } .kind.inferred { color: var(--warn); }

/* Messages */
.bubbles { display: flex; flex-direction: column; gap: 6px; }
.bub { max-width: 80%; padding: 9px 13px; border-radius: 18px; font-size: .93rem; white-space: pre-wrap; word-wrap: break-word; }
.bub.them { background: var(--card); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 6px; }
.bub.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.bub.unknown { background: var(--warn-soft); align-self: center; border: 1px dashed var(--warn); }
.bub .when { display: block; font-size: .68rem; opacity: .65; margin-top: 2px; }
.bub.hl { outline: 3px solid var(--accent); }
.daysep { align-self: center; font-size: .72rem; color: var(--ink3); margin: 8px 0 2px; }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 420px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 4px 2px 12px; }
.msg { max-width: 88%; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-radius: 20px 20px 6px 20px; padding: 10px 14px; }
.msg.ai { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; padding: 12px 16px; box-shadow: var(--shadow); }
.msg.ai ul { margin: 6px 0; padding-left: 20px; } .msg.ai p { margin: 0; }
.msg.ai blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--accent); color: var(--ink2); }
.msg .meta { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.src { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--bg2); border-radius: 8px; padding: 2px 8px; font-size: .74rem; cursor: pointer; color: var(--ink2); }
.src:hover { border-color: var(--brand); color: var(--brand); }
sup.cite { font-size: .7rem; color: var(--brand); font-weight: 700; cursor: pointer; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--line); }
.composer textarea { min-height: 48px; max-height: 160px; border-radius: 24px; padding: 13px 16px; }
.suggests { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.suggests button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: .84rem; cursor: pointer; color: var(--ink2); }
.suggests button:hover { border-color: var(--brand); color: var(--brand); }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Practice */
.persona { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--card); cursor: pointer; text-align: left; display: flex; gap: 12px; align-items: center; }
.persona.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.stage { position: relative; border-radius: 28px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--brand) 16%, var(--card)), var(--card)); border: 1px solid var(--line); padding: 26px 18px 18px; text-align: center; overflow: hidden; }
.orb { width: 132px; height: 132px; border-radius: 50%; margin: 6px auto 10px; display: grid; place-items: center; font-size: 54px; position: relative; background: var(--card); box-shadow: var(--shadow-lg); }
.orb::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid transparent; }
.orb.speaking::before { border-color: var(--accent); animation: pulse 1.2s infinite; }
.orb.listening::before { border-color: var(--sage); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }
.mic { width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 30px; cursor: pointer; box-shadow: var(--shadow-lg); }
.mic.on { background: var(--sage); } .mic.speaking { background: var(--accent); }
.caption { min-height: 48px; font-size: 1.02rem; color: var(--ink2); max-width: 560px; margin: 0 auto; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.transcript { max-height: 340px; overflow-y: auto; text-align: left; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow .step { padding: 4px 10px; border-radius: 999px; background: var(--sage-soft); color: var(--sage); font-weight: 600; font-size: .8rem; }

/* Reflect: big button */
.bigred-wrap { display: grid; place-items: center; padding: 26px 0 12px; }
.bigred { width: 200px; height: 200px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; background: radial-gradient(circle at 35% 30%, #ff8a7a, #d23c3c 55%, #a82424); box-shadow: 0 16px 40px rgba(210,60,60,.35), inset 0 -8px 18px rgba(0,0,0,.18); transition: transform .1s; }
.bigred:active { transform: scale(.97); }
.bigred.rec { animation: breathe 1.6s infinite; }
@keyframes breathe { 0%,100% { box-shadow: 0 0 0 0 rgba(210,60,60,.45), 0 16px 40px rgba(210,60,60,.35); } 50% { box-shadow: 0 0 0 22px rgba(210,60,60,0), 0 16px 40px rgba(210,60,60,.35); } }
.meter { height: 6px; border-radius: 4px; background: var(--bg2); overflow: hidden; max-width: 220px; margin: 12px auto 0; }
.meter i { display: block; height: 100%; background: var(--sage); width: 0; transition: width .08s; }
.progress { height: 10px; border-radius: 6px; background: var(--bg2); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); width: 0; transition: width .3s; }

/* Brief / report */
.brief h3 { margin-top: 18px; }
.brief ul { margin: 6px 0; padding-left: 20px; } .brief li { margin: 3px 0; }
.callout { border-radius: var(--r-sm); padding: 12px 14px; background: var(--brand-soft); color: var(--ink); font-size: .92rem; }
.callout.warn { background: var(--warn-soft); }
.callout.sage { background: var(--sage-soft); }
.alt { border-left: 3px solid var(--accent); padding: 6px 12px; margin: 10px 0; }
.alt .you { color: var(--ink3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink3) 50%, transparent); }

/* Journal */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; margin-bottom: 14px; }
.tl::before { content: ""; position: absolute; left: -20px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); }
.tl.refl::before { border-color: var(--accent); } .tl.sim::before { border-color: var(--sage); }

/* Attachments */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.att { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--card); }
.att img { width: 100%; aspect-ratio: 16/11; object-fit: cover; display: block; background: var(--bg2); }
.att .cap { padding: 8px 10px; font-size: .82rem; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: .9rem; z-index: 200; box-shadow: var(--shadow-lg); animation: up .2s; max-width: calc(100vw - 32px); text-align: center; }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* Onboarding */
.onb { max-width: 560px; margin: 0 auto; padding: 28px 16px 60px; }
.onb .dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 22px; }
.onb .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .onb .dots i.on { background: var(--brand); width: 22px; border-radius: 4px; }
.empty { text-align: center; padding: 34px 16px; color: var(--ink3); }
.empty .e { font-size: 40px; margin-bottom: 6px; }
.notice { font-size: .82rem; color: var(--ink3); border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--card); }
.plan.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.price { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; }
.usage-bar { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; margin-top: 4px; }
.usage-bar i { display: block; height: 100%; background: var(--brand); }

/* Phone refinements */
.btn { white-space: nowrap; }
.chat-head { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 759px) {
  .actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .action.big { grid-column: 1 / -1; }
  .action:not(.big) { min-height: 112px; padding: 14px 12px; }
  .action:not(.big) b { font-size: .95rem; line-height: 1.2; }
  .action:not(.big) span { display: none; }
  .chat { height: calc(100dvh - 330px); min-height: 360px; }
  h1 { font-size: 1.6rem; }
}
