/* Tax Intelligence V9 — Joshi Gadgil & Co. brand: navy (logo blue), slate grey, cool paper background. */
:root {
  --brand: #0B3D7E; --brand-dark: #082D5E; --brand-ink: #FFFFFF; --brand-soft: #E7EEF8; --brand-soft-2: #F1F5FB;
  --ink: #14213D; --ink-2: #33415A; --muted: #5F6B7A; --grey: #5F6062;
  --line: #DCE3EE; --line-2: #EDF1F7; --paper: #F5F7FB; --surface: #FFFFFF;
  --ok: #1D7A46; --ok-soft: #E4F4EA; --warn: #8A5A0B; --warn-soft: #FDF4E3; --danger: #B3261E; --danger-soft: #FBEAE8;
  --radius: 10px; --shadow: 0 1px 2px rgba(11,45,94,.06), 0 6px 18px rgba(11,45,94,.06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14.5px/1.55 var(--font); color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.hidden, [hidden] { display: none !important; }
h1, h2, h3 { color: var(--ink); }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--surface);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.btn:hover { border-color: #B9C6DA; background: var(--brand-soft-2); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { color: var(--danger); }
.btn-ok { color: var(--ok); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 9px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; padding: 8px 11px; outline: none; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
label.field { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-2); margin: 12px 0 5px; }
.svg { width: 18px; height: 18px; flex: none; }

/* login */
.login-wrap { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr auto; }
.login-brand { background: linear-gradient(160deg, #0B3D7E 0%, #082D5E 70%, #071F42 100%); color: #EEF3FA; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.login-brand .logo-card { background: #fff; border-radius: 12px; padding: 16px 20px; display: inline-flex; align-self: flex-start; }
.login-brand .logo-card img { height: 46px; display: block; }
.login-brand h1 { font-family: var(--serif); font-size: 32px; line-height: 1.25; margin: 0 0 12px; max-width: 540px; color: #fff; font-weight: 600; }
.login-brand p { color: #C9D7EA; max-width: 500px; margin: 0; }
.login-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.login-points li { display: flex; gap: 12px; color: #DCE6F4; }
.login-points li::before { content: ""; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: #8FB4E6; flex: none; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin: 0 0 6px; font-size: 24px; font-family: var(--serif); }
.login-card .sub { color: var(--muted); margin: 0 0 18px; }
.login-card .btn-primary { width: 100%; padding: 10px 14px; }
.login-foot { grid-column: 1 / -1; }
.error { color: var(--danger); background: var(--danger-soft); padding: 9px 12px; border-radius: 8px; margin-top: 12px; font-size: 13px; }
.fineprint { color: var(--muted); font-size: 12px; margin-top: 22px; }

/* app shell */
.shell { height: 100%; display: grid; grid-template-rows: 60px 1fr 30px; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brandmark { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brandmark img { height: 28px; max-width: 260px; object-fit: contain; display: block; }
.brandmark .app { padding-left: 12px; border-left: 1px solid var(--line); font-weight: 700; color: var(--brand); font-size: 14px; white-space: nowrap; }
.spacer { flex: 1; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 13px; border-radius: 7px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.who { text-align: right; line-height: 1.2; }
.who b { display: block; font-size: 13px; }
.who span { font-size: 11.5px; color: var(--muted); }
.bell { position: relative; }
.bell .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #C0392B; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.menu { position: absolute; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(11,45,94,.18);
  padding: 6px; min-width: 210px; }
.menu button { display: flex; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; gap: 8px; }
.menu button:hover { background: var(--brand-soft-2); }
.notif-panel { width: 380px; max-height: 480px; overflow: auto; padding: 0; }
.notif-panel .head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.notif { padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.notif:hover { background: var(--brand-soft-2); }
.notif.unread { border-left: 3px solid var(--brand); }
.notif b { display: block; font-size: 13.5px; }
.notif span { font-size: 12px; color: var(--muted); }
.footbar { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-top: 1px solid var(--line);
  background: var(--surface); font-size: 11.5px; color: var(--muted); gap: 10px; }
.footbar .credit { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--grey); }
.footbar .credit img { height: 16px; }

.body { display: grid; grid-template-columns: var(--lw, 272px) 1fr; min-height: 0; }
.body.with-panel { grid-template-columns: var(--lw, 272px) 1fr var(--rw, 360px); }
body.resizing { cursor: col-resize; user-select: none; }
.sidebar { position: relative; border-right: 1px solid var(--line); background: #FAFBFD; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.sidebar .top { padding: 12px 12px 6px; }
.sidebar .top .btn { width: 100%; }
.nav { padding: 4px 8px 8px; display: grid; gap: 1px; border-bottom: 1px solid var(--line); }
.nav button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.nav button:hover { background: var(--line-2); }
.nav button.on { background: var(--brand); color: #fff; }
.nav .count { margin-left: auto; background: #C0392B; color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; }
.side-label { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted); padding: 12px 16px 4px; }
.side-label button { border: 0; background: none; color: var(--brand); font-weight: 700; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.list { padding: 0 8px 8px; }
.item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.item:hover { background: var(--line-2); }
.item.on { background: var(--brand-soft); }
.item .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.item .d { font-size: 11px; color: var(--muted); }
.item .x { opacity: 0; border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 4px; }
.item:hover .x { opacity: 1; }
.list > .small { padding: 4px 10px; }
.main { min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--paper); }
.view { flex: 1; min-height: 0; overflow: auto; }
.page { max-width: 1120px; margin: 0 auto; padding: 24px 28px 40px; }
.page h2 { margin: 0 0 4px; font-size: 22px; font-family: var(--serif); font-weight: 600; }
.page .lead { color: var(--muted); margin: 0 0 20px; max-width: 760px; }

/* chat */
#view-chat { display: flex; flex-direction: column; overflow: hidden; }
.chat { flex: 1; min-height: 0; overflow: auto; }
.thread { max-width: 1120px; margin: 0 auto; padding: 24px 32px 12px; }
.ctx { max-width: 1120px; margin: 14px auto 0; padding: 0 24px; display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.msg { margin: 0 0 22px; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.msg.user .bubble { background: var(--brand); color: #F3F7FD; border-radius: 14px 14px 4px 14px; padding: 10px 14px; max-width: 78%; white-space: pre-wrap; }
.msg.user .files { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.msg.bot .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow); }
.msg.bot .card.selected { border-color: #9DB6DA; }
.msg.bot .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--brand-soft); color: var(--brand); }
.pill.good { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--danger-soft); color: var(--danger); }
.pill.muted { background: var(--line-2); color: var(--ink-2); }

/* rendered answers */
.md { color: var(--ink); line-height: 1.65; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 10px; }
.md h3 { font-size: 15.5px; margin: 16px 0 6px; color: var(--brand); }
.md h4 { font-size: 14.5px; margin: 14px 0 6px; }
.md h5 { font-size: 13.5px; margin: 12px 0 4px; color: var(--ink-2); }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md li > ul, .md li > ol { margin: 4px 0 2px; }
.md strong { color: var(--ink); }
.md code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.md pre { background: #0F1B2D; color: #E6EDF7; padding: 12px 14px; border-radius: 8px; overflow: auto; font-size: 12.5px; }
.md blockquote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft-2); color: var(--ink-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md .tablewrap { overflow-x: auto; margin: 4px 0 12px; }
.md table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--brand-soft-2); color: var(--brand); font-weight: 700; }
.md .email-body { white-space: pre-wrap; background: var(--brand-soft-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
sup.cite { line-height: 0; }
sup.cite button { border: 0; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 10.5px; min-width: 17px; height: 17px;
  padding: 0 5px; border-radius: 9px; margin: 0 1px 0 2px; cursor: pointer; vertical-align: 2px; }
sup.cite button:hover { background: var(--brand); color: #fff; }
.reflist { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.reflist h4 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.ref { display: flex; gap: 10px; align-items: baseline; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ref:hover { background: var(--brand-soft-2); }
.ref .n { color: var(--brand); font-weight: 700; min-width: 22px; }
.ref .l { color: var(--ink-2); }
.ref .s { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; display: flex; gap: 6px; align-items: flex-start; }
.notice { background: var(--warn-soft); border: 1px solid #F0D9B5; border-radius: 10px; padding: 12px 14px; color: #5D3A0E; }
.links { display: grid; gap: 6px; margin-top: 12px; }
.links h4 { margin: 8px 0 2px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.lnk { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--ink); }
.lnk:hover { border-color: var(--brand); }
.lnk b { font-size: 13px; }
.lnk span { color: var(--muted); font-size: 12px; }
.small { font-size: 12px; color: var(--muted); }
.actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.actions button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 3px 10px; cursor: pointer; font-size: 12px; color: var(--muted); }
.actions button:hover { border-color: #B9C6DA; color: var(--ink-2); }
.actions button.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.chat-img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; display: block; margin-top: 4px; }
.empty { text-align: center; padding: 50px 20px 20px; }
.empty h2 { font-size: 26px; margin: 0 0 8px; font-family: var(--serif); font-weight: 600; }
.empty p { color: var(--muted); margin: 0 auto 22px; max-width: 620px; }
.suggest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 720px; margin: 0 auto; }
.suggest button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: grid; gap: 2px; }
.suggest button b { font-size: 11.5px; color: var(--brand); text-transform: uppercase; letter-spacing: .4px; }
.suggest button:hover { border-color: var(--brand); box-shadow: var(--shadow); }

/* composer */
.composer-wrap { border-top: 1px solid var(--line); background: var(--surface); }
.composer { max-width: 1120px; margin: 0 auto; padding: 12px 32px 12px; }
.modes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.modes button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 4px 12px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.modes button:hover { border-color: #B9C6DA; }
.modes button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--brand-soft-2); border-radius: 8px;
  padding: 4px 8px; font-size: 12px; max-width: 320px; }
.chip .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ink-2); }
.chip .st { color: var(--muted); white-space: nowrap; }
.chip.err { background: var(--danger-soft); border-color: #F2C9C5; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 2px; }
.composer .box { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 6px; background: var(--surface); }
.composer .box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; max-height: 45vh; min-height: 76px; padding: 8px 4px; background: transparent; font-size: 15px; line-height: 1.55; }
.composer.tall textarea { min-height: 42vh; }
.box-actions { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: 6px; align-self: stretch; }
.composer .hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 10px; }
.attach-wrap { position: relative; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.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; } }

/* right-hand sources panel */
.srcpanel { position: relative; border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.srcpanel .ph { padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); }
.srcpanel .ph h3 { margin: 0; font-size: 14px; }
.srcpanel .ph .small { margin-top: 2px; }
.srcpanel .pb { flex: 1; overflow: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
.srccard { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #FBFCFE; }
.srccard.flash { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.srccard .h { display: flex; gap: 8px; align-items: flex-start; }
.srccard .n { background: var(--brand); color: #fff; border-radius: 9px; min-width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.srccard .t { font-weight: 700; font-size: 13px; line-height: 1.35; }
.srccard .f { font-size: 11.5px; color: var(--muted); margin: 4px 0 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.srccard .x { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; border-left: 2px solid var(--line); padding-left: 8px; }
.srccard a { font-size: 12px; }
.srcpanel .emptyp { color: var(--muted); font-size: 13px; padding: 10px 4px; }

/* panels, tables, forms */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 4px; font-size: 16px; }
.panel .row, .row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.row .input { width: auto; flex: 1 1 160px; }
.row select.input { flex: 0 1 180px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.tabs button { border: 0; background: none; padding: 9px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { background: #C0392B; color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; margin-left: 4px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tile b { display: block; font-size: 22px; color: var(--brand); font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; color: var(--muted); }
table.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: top; }
.tbl th { background: var(--brand-soft-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.acts > * { margin: 0 6px 6px 0; vertical-align: top; }
.tbl td.acts { white-space: normal; }
.tbl .acts .inline { display: inline-flex; gap: 6px; align-items: center; }
.tbl .acts select.input { width: auto; padding: 4px 8px; }
.tbl tfoot td { font-weight: 700; background: var(--brand-soft-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; display: block; aspect-ratio: 16/10; object-fit: cover; object-position: top; background: var(--line-2); cursor: zoom-in; }
.gallery figcaption { padding: 8px 10px; font-size: 12px; color: var(--ink-2); }
.result-img { margin-top: 14px; }
.result-img img { max-width: 100%; border: 1px solid var(--line); border-radius: 10px; display: block; cursor: zoom-in; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.section-h { margin: 26px 0 10px; font-size: 15px; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.formgrid .full { grid-column: 1 / -1; }
.logo-prev { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; background: #fff; display: flex; align-items: center; min-height: 70px; }
.logo-prev img { max-height: 56px; max-width: 100%; }

/* calculators */
.calc-lines .input { padding: 6px 8px; }
.calc-lines td { padding: 6px 8px; }
.calc-lines input[type=number] { text-align: right; }
.result-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.regime { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 16px; }
.regime.best { border: 2px solid var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.regime h3 { margin: 0 0 2px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.regime .big { font-size: 28px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; margin-top: 10px; }
.kv span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.kv .tot { font-weight: 700; border-top: 1px solid var(--line); padding-top: 4px; }
.verdict { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); color: #134D2C; font-weight: 600; }

/* toast and dialog */
.toast { position: fixed; bottom: 44px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 9px; box-shadow: var(--shadow); z-index: 60; font-size: 13.5px; max-width: 90vw; }
.toast.err { background: var(--danger); }
dialog { border: 0; border-radius: 14px; padding: 22px; max-width: 560px; width: calc(100% - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.wide { max-width: 820px; }
dialog h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 600; font-size: 20px; }
dialog::backdrop { background: rgba(11,29,56,.45); }
dialog.viewer { max-width: 94vw; width: auto; padding: 10px; }
dialog.viewer img { max-width: 90vw; max-height: 86vh; display: block; }
.dlg-scroll { max-height: 60vh; overflow: auto; }
.row-gap { height: 16px; }

@media (max-width: 1100px) { .body.with-panel { grid-template-columns: var(--lw, 250px) 1fr; } .srcpanel { display: none; } }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; } .login-brand { display: none; }
  .body, .body.with-panel { grid-template-columns: 1fr; } .sidebar { display: none; }
  .grid2, .grid3, .result-cards, .formgrid { grid-template-columns: 1fr; } .suggest { grid-template-columns: 1fr; }
  .brandmark .app, .who { display: none; }
}

/* ---------- V10: resizable panels, navigation icons, toggle, professional answers, sign-in badge ---------- */
.resizer { position: absolute; top: 0; bottom: 0; right: 0; width: 7px; cursor: col-resize; z-index: 6; }
.resizer.left { left: 0; right: auto; }
.resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: transparent; transition: background .15s; }
.resizer:hover::after, body.resizing .resizer::after { background: var(--brand); width: 2px; }
.ic { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.nav button span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav button.on .ic { opacity: 1; }
.topbar { box-shadow: 0 1px 0 rgba(11,45,94,.04), 0 2px 10px rgba(11,45,94,.04); position: relative; z-index: 5; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track { width: 32px; height: 18px; border-radius: 9px; background: #C9D3E2; position: relative; transition: background .15s; flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .track { background: var(--brand); }
.toggle input:checked + .track::after { transform: translateX(14px); }
.toggle input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-soft); }
.modes { align-items: center; }

/* answer cards */
.msg.bot .card { padding: 0; overflow: hidden; }
.msg.bot .meta { margin: 0; padding: 10px 20px; border-bottom: 1px solid var(--line-2); background: #FBFCFE; }
.msg.bot .card > :not(.meta) { margin-left: 22px; margin-right: 22px; }
.msg.bot .card > .md, .msg.bot .card > .notice { margin-top: 16px; }
.msg.bot .card > :last-child { margin-bottom: 16px; }
.md { font-size: 15px; line-height: 1.72; color: #1B2840; }
.md > p:first-child { font-size: 15.5px; color: var(--ink); }
.md h3, .md h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--brand); margin: 20px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--line-2); }
.md h5 { font-size: 14px; color: var(--ink); text-transform: none; }
.md ol > li::marker { color: var(--brand); font-weight: 700; }
.md ul > li::marker { color: var(--brand); }
.md table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.md th { background: var(--brand); color: #fff; border-color: var(--brand); font-size: 12.5px; letter-spacing: .3px; }
.md tbody tr:nth-child(even) td { background: #F7F9FC; }
.md td { border-color: var(--line-2); }
.reflist { margin-top: 18px; }
.ref .kind { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.ref .kind.web { background: #E6F2EC; color: #17633C; }
.ref .l a { color: inherit; }
.srccard .web-pill { background: #E6F2EC; color: #17633C; }
.srccard .url { font-size: 11.5px; word-break: break-all; }

/* sign-in: JGIT badge on the seam between the two panels */
.login-wrap { position: relative; }
.seam-badge { position: absolute; z-index: 5; left: calc(100% * 1.1 / 2.1); bottom: 54px; transform: translateX(-50%);
  background: #fff; border-radius: 12px; padding: 9px 14px 10px; width: 124px; text-align: center;
  box-shadow: 0 8px 24px rgba(7,31,66,.22); }
.seam-badge .by { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.seam-badge img { width: 78px; height: auto; display: block; margin: 0 auto; }
.mobile-credit { display: none; }
.login-brand > div:nth-child(2) { padding-right: 70px; }
@media (max-width: 900px) {
  .seam-badge { display: none; }
  .mobile-credit { display: flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--muted); font-size: 12px; }
  .mobile-credit img { height: 26px; }
}

/* admin web sources */
.src-row-title { font-weight: 700; }
.src-row-url { font-size: 12px; color: var(--muted); word-break: break-all; }
.suggest-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.suggest-row:last-child { border-bottom: 0; }
.suggest-row .t { font-weight: 600; font-size: 13.5px; }
.preview { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #FBFCFE; font-size: 12.5px; max-height: 220px; overflow: auto; white-space: pre-wrap; }

/* ===================== V10.2: calm, document-style chat (like a professional assistant) ===================== */
.thread { max-width: 820px; padding: 28px 28px 16px; }
.empty { padding: 18vh 20px 20px; }
.empty h2 { font-family: var(--font); font-size: 28px; font-weight: 600; letter-spacing: -.2px; color: var(--ink); margin-bottom: 10px; }
.empty p { font-size: 14.5px; max-width: 560px; }
.msg { margin: 0 0 28px; }
.msg.user .bubble { background: #EEF1F6; color: var(--ink); border-radius: 18px; padding: 10px 16px; max-width: 75%; font-size: 15px; line-height: 1.55; }
.msg.bot .card, .msg.bot .card.selected { background: transparent; border: 0; box-shadow: none; padding: 0; overflow: visible; border-radius: 0; }
.msg.bot .card > :not(.meta) { margin-left: 0; margin-right: 0; }
.msg.bot .card > .md { margin-top: 0; }
.msg.bot .card > :last-child { margin-bottom: 0; }
.waiting { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13.5px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--line-2); border-radius: 6px; padding: 2px 8px; margin-bottom: 10px; }
.tag.warn { color: var(--warn); background: var(--warn-soft); }
.tag.err { color: var(--danger); background: var(--danger-soft); }

.md { font-size: 15.5px; line-height: 1.75; color: #1E2A3E; }
.md > p:first-child { font-size: 15.5px; }
.md p { margin: 0 0 14px; }
.md h3, .md h4 { font-size: 16.5px; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 22px 0 8px; padding: 0; border: 0; }
.md h5 { font-size: 15px; margin: 16px 0 6px; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 24px; }
.md li { margin: 5px 0; padding-left: 2px; }
.md ol > li::marker { color: var(--ink-2); font-weight: 600; }
.md ul > li::marker { color: var(--muted); }
.md strong { font-weight: 650; color: var(--ink); }
.md table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14px; margin: 4px 0 14px; }
.md th { background: #F4F6FA; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); font-size: 13px; letter-spacing: 0; font-weight: 650; }
.md td { border: 0; border-bottom: 1px solid var(--line-2); }
.md tbody tr:last-child td { border-bottom: 0; }
.md tbody tr:nth-child(even) td { background: transparent; }
.md blockquote { background: transparent; border-left: 3px solid var(--line); color: var(--ink-2); }
.md .subj { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.md .subj span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.md .email-body { background: #F8FAFC; border-color: var(--line-2); }
sup.cite button { background: #E9EDF4; color: var(--ink-2); font-weight: 650; }
sup.cite button:hover { background: var(--brand); color: #fff; }

.reflist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; border: 0; padding: 0; }
.refchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid var(--line); background: var(--surface);
  border-radius: 99px; padding: 3px 10px 3px 4px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.refchip:hover, .refchip.flash { border-color: var(--brand); color: var(--brand); }
.refchip .n { background: #E9EDF4; color: var(--ink-2); border-radius: 99px; min-width: 18px; height: 18px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; }
.refchip.web .n { background: #E6F2EC; color: #17633C; }
.refchip .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px; }
.foot .actions { margin: 0; gap: 2px; }
.foot .info { font-size: 12px; color: var(--muted); }
.foot .verify { font-size: 12px; color: var(--muted); flex-basis: 100%; }
.foot .verify a { color: var(--muted); }
.ib { border: 0 !important; background: transparent !important; width: 30px; height: 30px; padding: 6px !important; border-radius: 8px !important; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.ib svg { width: 17px; height: 17px; }
.ib:hover { background: var(--line-2) !important; color: var(--ink); }
.ib.on { color: var(--brand); background: var(--brand-soft) !important; }
.note { font-size: 12.5px; }
.links { max-width: 640px; }

.composer-wrap { border-top: 0; background: linear-gradient(to bottom, rgba(245,247,251,0), var(--paper) 30%); }
.composer { max-width: 820px; padding: 6px 28px 14px; }
.composer .box { border-radius: 18px; padding: 8px; box-shadow: 0 2px 10px rgba(11,45,94,.07); }
.composer .hint { justify-content: center; text-align: center; }
.modes button { background: transparent; border-color: transparent; color: var(--muted); }
.modes button:hover { background: var(--line-2); border-color: transparent; color: var(--ink-2); }
.modes button.on { background: var(--surface); color: var(--brand); border-color: var(--line); box-shadow: 0 1px 2px rgba(11,45,94,.06); }
.chat { background: var(--paper); }

/* sources panel: reference + a short summary */
.srcpanel .pb { gap: 4px; padding: 10px 12px; }
.srccard { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; background: transparent; padding: 12px 6px; }
.srccard:last-child { border-bottom: 0; }
.srccard.flash { box-shadow: none; background: var(--brand-soft-2); border-radius: 8px; }
.srccard .n { background: #E9EDF4; color: var(--ink-2); }
.srccard .t { font-size: 13.5px; font-weight: 650; }
.srccard .f { margin: 5px 0 6px 28px; gap: 4px 8px; }
.srccard .kind { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: var(--line-2); color: var(--ink-2); }
.srccard .kind.web { background: #E6F2EC; color: #17633C; }
.srccard .sum { margin: 0 0 0 28px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.srccard .open { display: inline-block; margin: 6px 0 0 28px; font-size: 12px; text-decoration: none; }

/* personal data */
.pii-tag { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: #5B3E8A; background: #F1ECFA; border-radius: 6px; padding: 1px 7px; }

/* quality and trust page */
.q-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.q-head .lead { max-width: 640px; }
.q-run { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 8px; }
.q-prog { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px; margin: 6px 0 16px; }
.q-prog-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.q-prog progress { width: 100%; height: 8px; accent-color: var(--brand); }
.q-emptyp { margin: 10px 0 18px; }
.q-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-radius: 12px; padding: 14px 16px; margin: 6px 0 14px; border: 1px solid; flex-wrap: wrap; }
.q-banner.good { background: var(--ok-soft); border-color: #BFE3CC; }
.q-banner.bad { background: var(--danger-soft); border-color: #F2C9C5; }
.q-banner b { font-size: 15px; }
.q-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.q-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; border-top: 3px solid var(--line); }
.q-tile.pass { border-top-color: var(--ok); }
.q-tile.fail { border-top-color: var(--danger); }
.q-tile .v { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.q-tile.fail .v { color: var(--danger); }
.q-tile .l { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.q-tile .t { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.q-tabs { margin-bottom: 10px; display: inline-flex; }
.q-tbl td { vertical-align: top; font-size: 13px; }
.q-tbl details.ans summary { cursor: pointer; color: var(--brand); font-size: 12px; margin-top: 4px; }
.q-tbl details.ans .md { font-size: 13px; line-height: 1.55; margin-top: 6px; max-width: 520px; }
.q-tbl .pre { white-space: pre-wrap; }
.yn { font-weight: 700; } .yn.y { color: var(--ok); } .yn.n { color: var(--danger); }
.q-sub { margin: 26px 0 8px; font-size: 15px; }

/* ===================== V12: message box on top, answers below it ===================== */
.hero { flex: none; }
.hero .empty { padding: 14vh 20px 18px; }
#view-chat.fresh .composer-wrap { border-bottom: 0; }
#view-chat.fresh .chat { display: none; }
.composer-wrap { flex: none; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 6px 14px -12px rgba(11,45,94,.25); position: relative; z-index: 2; }
#view-chat.fresh .composer-wrap { box-shadow: none; }
.composer { padding: 14px 28px 12px; }
.composer .hint { margin-top: 8px; }
.thread { padding-top: 22px; padding-bottom: 40vh; }   /* room so the latest question can sit right under the box */
.iso { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.iso-card { padding: 14px 16px; }
.iso-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.iso-row { display: grid; grid-template-columns: 70px 1fr; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 13px; align-items: baseline; }
.iso-row .pill { justify-self: start; font-size: 10.5px; }
.iso-row .c { font-weight: 600; color: var(--ink-2); }
.iso-row .d { grid-column: 2; color: var(--muted); font-size: 12px; word-break: break-word; }
@media (max-width: 1100px) { .iso { grid-template-columns: 1fr; } }

/* V13: newest exchange first, earlier exchanges below and always visible */
.thread { padding-bottom: 28px; }
.exchange { padding: 4px 0 6px; }
.exchange + .exchange { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 4px; }
.exchange:first-child .msg.user .bubble { box-shadow: 0 0 0 2px var(--brand-soft); }
.exchange:not(:first-child) { opacity: .92; }
.exchange:nth-child(2)::before { content: "Earlier in this chat"; display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin: -12px 0 14px; }

/* V14: diagram designer */
.dg-panel { margin-bottom: 18px; }
.dg-styles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.dg-styles button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 11px; cursor: pointer; display: grid; gap: 2px; }
.dg-styles button b { font-size: 13px; color: var(--ink); }
.dg-styles button span { font-size: 11.5px; color: var(--muted); }
.dg-styles button:hover { border-color: #B9C6DA; }
.dg-styles button.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); background: var(--brand-soft-2); }
.dg-examples { margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dg-examples button { border: 1px dashed #B9C6DA; background: transparent; border-radius: 99px; padding: 3px 10px; font-size: 12px; color: var(--ink-2); cursor: pointer; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-examples button:hover { border-color: var(--brand); color: var(--brand); }
.dg-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dg-src button { font-size: 12.5px; }
.dg-result img { width: 100%; border-radius: 10px; border: 1px solid var(--line); margin-top: 12px; cursor: zoom-in; }
@media (max-width: 1100px) { .dg-styles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- V15: downloads, income tax computation, e-mail settings ---------- */
.dl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.dl-bar[hidden] { display: none; }
.dl-bar .dl-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.it-top { margin-bottom: 4px; }
.it-about { margin: 2px 0 6px; color: var(--ink-2); }
.it-all { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 8px; cursor: pointer; }
fieldset.it-head { border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px 12px; margin: 12px 0 0; }
fieldset.it-head[hidden], .itf[hidden], [data-for][hidden], [data-rt][hidden] { display: none; }
fieldset.it-head legend { font-weight: 700; color: var(--brand); padding: 0 6px; font-size: 14px; }
.result-cards.one { grid-template-columns: 1fr; }
.regime[role=button] { cursor: pointer; }
.regime.shown { outline: 2px dashed var(--brand); outline-offset: 2px; }
.regime .link { color: var(--brand); margin-top: 6px; font-weight: 600; }
.it-warn ul { margin: 6px 0 0 18px; padding: 0; }
.it-stmt td.ind { padding-left: 26px; color: var(--ink-2); }
.it-stmt tr.it-headrow td { font-weight: 700; background: var(--brand-soft-2); }
.it-stmt tr.sub td { font-weight: 600; }
.it-stmt tr.tot td { font-weight: 700; border-top: 1px solid var(--line); }
.it-stmt tr.tot.big td { font-size: 15px; color: var(--brand); background: var(--brand-soft-2); }
.it-filing { margin-top: 18px; }
.it-filing h3 { margin-top: 0; }
.it-filing tr.on td { background: var(--ok-soft); }
.it-forms { margin-top: 12px; }
.it-forms summary, .it-notes summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.it-notes { margin-top: 14px; }
.mail-help { background: var(--brand-soft-2); padding: 8px 10px; border-radius: 8px; }
.mail-help:empty { display: none; }

/* ---------- V16: Current updates ---------- */
.upd-filters { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.upd-filters .input { width: auto; min-width: 180px; }
.upd-filters #upd-q { flex: 1; min-width: 220px; }
.upd-list { display: grid; gap: 12px; }
.upd-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.upd-card.unverified { border-left: 4px solid var(--warn); }
.upd-card h3 { margin: 8px 0 6px; font-size: 15.5px; line-height: 1.35; }
.upd-card h3 a { color: var(--ink); text-decoration: none; }
.upd-card h3 a:hover { color: var(--brand); text-decoration: underline; }
.upd-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.upd-sum { margin: 0 0 6px; color: var(--ink-2); line-height: 1.5; }
.upd-acts { margin-top: 10px; flex-wrap: wrap; gap: 8px; }
.upd-preview pre { white-space: pre-wrap; max-height: 320px; overflow: auto; background: var(--line-2); padding: 10px; border-radius: 8px; font-size: 12px; }
.empty-note { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.err-text { color: var(--danger); }
#upd-sources td.acts { white-space: nowrap; }

/* ---------- V17: read state, PDFs, notification history ---------- */
.upd-card.unread { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-soft, rgba(31,58,95,.15)); }
.upd-card.unread h3 a { font-weight: 700; }
.upd-card:not(.unread):not(.unverified) h3 a { font-weight: 500; }
.upd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); display: inline-block; }
.upd-filters .chk { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.upd-filters .grow { flex: 1; }
.upd-more { justify-self: center; }
.input-sm { padding: 4px 8px; font-size: 13px; width: auto; }
.upd-detail .upd-acts { margin-top: 14px; }
.notif.read b { font-weight: 500; color: var(--ink-2); }
.notif-list { max-height: 60vh; overflow: auto; }
.notif-foot { display: flex; justify-content: space-between; padding: 6px 8px; border-top: 1px solid var(--line); }

/* V18 AI service */
.q-prov { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.q-prov select { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.ai-ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; font-size: 13px; }
.ai-ctl .ai-budget { width: 110px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.ai-test { flex-basis: 100%; }
.ai-days summary { cursor: pointer; font-size: 13px; font-weight: 600; margin: 6px 0; }
.ai-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } }
td.nowrap { white-space: nowrap; }
