/* Karen OS Inbox (inbox.js), laid out like Gmail: a toolbar with Compose and search, text tabs,
   a full-width list of single-line rows (actions appear on hover), and an open email that replaces
   the list. Replies are written at the bottom of the email; a new email opens in a small window at
   the bottom right. Uses the colour tokens from styles.css. No inline styles (CSP style-src 'self');
   positions are set through CSSOM. Nothing here makes the page scroll sideways. */

.ib.view-in { max-width: none; padding: 16px 24px 40px; gap: 10px; }
.ib-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ib kbd, .ib-pop kbd { font: 600 12px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--grey-ink); background: var(--surface); }
.ib-msgline { margin: 0; }
.ib-msgline:empty { display: none; }

/* Icons and icon buttons, with Gmail-style tooltips (the aria-label) */
.ib-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ib-i.sm { width: 16px; height: 16px; }
.ib-ico { position: relative; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--grey-ink); cursor: pointer; font: 600 14px var(--font); }
.ib-ico:hover { background: rgba(22, 35, 29, 0.07); color: var(--ink); }
.ib-ico:focus-visible { outline: 2px solid var(--green-700); outline-offset: 0; }
.ib-ico:disabled { opacity: 0.35; cursor: default; background: transparent; }
.ib-ico.sm { width: 36px; height: 36px; }
.ib-ico.sm .ib-i { width: 18px; height: 18px; }
.ib-ico.on { background: var(--green-100); color: var(--green-900); }
.ib-ico.spin .ib-i { animation: ibspin 0.8s linear infinite; }
@keyframes ibspin { to { transform: rotate(360deg); } }
@keyframes ibtip { from { opacity: 0; } to { opacity: 1; } }
@media (hover: hover) {
  .ib-ico[aria-label]:hover::after, .ib-ico[aria-label]:focus-visible::after, .ib-more summary[aria-label]:hover::after {
    content: attr(aria-label); position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 80; pointer-events: none;
    background: #2D3833; color: #FFFFFF; font: 600 12px/1.3 var(--font); padding: 5px 8px; border-radius: 6px; white-space: nowrap; animation: ibtip 0.12s 0.4s both; }
  .ib-tr .ib-ico::after, .ib-hover .ib-ico:last-child::after, .ib-dockbtns .ib-ico::after, .ib-top > .ib-ico:last-child::after, .ib-discard::after { left: auto !important; right: 0; transform: none !important; }
  details[open] > summary.ib-ico::after { display: none; }
}

/* Top row: Compose, search, mailbox, Gmail status, help */
.ib-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ib-compose { flex: none; min-height: 48px; padding: 0 22px 0 16px; border-radius: 16px; gap: 10px; box-shadow: 0 1px 3px rgba(22, 35, 29, 0.18); }
.ib-search { flex: 1 1 auto; max-width: 760px; min-width: 0; position: relative; display: flex; align-items: center; }
.ib-search .ib-i { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.ib-search input { width: 100%; min-height: 48px; padding: 0 16px 0 48px; border: 1px solid transparent; border-radius: 24px; background: #EAF0EC; font: 15px var(--font); }
.ib-search input:focus { background: var(--surface); border-color: var(--line); box-shadow: 0 1px 4px rgba(22, 35, 29, 0.16); outline: 0; }
.ib-boxsel { flex: 0 1 auto; width: auto; max-width: 200px; min-height: 40px; padding: 0 10px; border: 1px solid transparent; border-radius: 20px; background: transparent; font: 600 14px var(--font); color: var(--grey-ink); cursor: pointer; }
.ib-boxsel:hover { background: rgba(22, 35, 29, 0.07); }
.ib-boxsel:focus-visible { outline: 2px solid var(--green-700); }
.ib-status.wide { width: auto; border-radius: 20px; padding: 0 12px 0 12px; gap: 6px; display: inline-flex; align-items: center; }
.ib-stxt { font-size: 13px; font-weight: 600; white-space: nowrap; }
.ib-sdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #9AA8A1; flex: none; vertical-align: middle; }
.ib-sdot.ok { background: var(--green-700); } .ib-sdot.warn { background: var(--amber-bar); } .ib-sdot.bad { background: var(--red); }
.ib-status.wide .ib-stxt { color: var(--amber); }

/* The white panel holding the toolbar, tabs and list (or the open email) */
.ib-shell { background: var(--surface); border: 0; border-radius: 16px; min-width: 0; min-height: 60vh; }
.ib-tools { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 2px 12px 2px 4px;
  background: var(--surface); border-radius: 16px 16px 0 0; }
body.demo .ib-tools { top: 53px; }
.ib-shell.reading .ib-tools { border-bottom: 1px solid var(--divider); }
.ib-tl, .ib-tr { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ib-tsep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.ib-count, .ib-picked { font-size: 13px; color: var(--muted); padding: 0 8px; white-space: nowrap; }
.ib-picked { font-weight: 600; color: var(--grey-ink); }
.ib-more { position: relative; }
.ib-more summary.ib-ico::after { content: none; }
.ib-more .menu { min-width: 230px; max-height: 60vh; overflow-y: auto; left: 0; right: auto; z-index: 20; }
.ib-tr .ib-more .menu { left: auto; right: 0; }

.ib-tabn { font-size: 12px; font-weight: 700; color: var(--muted); }

/* The list: one line per email */
.ib-list { min-width: 0; }
.ib-row { position: relative; display: grid; grid-template-columns: 36px 28px minmax(120px, 200px) minmax(0, 1fr) auto 64px; align-items: center;
  gap: 0 8px; min-height: 40px; padding: 0 16px 0 4px; border-bottom: 1px solid var(--divider); background: var(--ground); cursor: pointer;
  font-size: 14px; color: var(--grey-ink); scroll-margin-top: 110px; touch-action: pan-y; }
.ib-row:last-child { border-bottom: 0; border-radius: 0 0 16px 16px; }
.ib-row.unseen { background: var(--surface); }
.ib-row:hover { z-index: 1; background: #EDF3EF; }
.ib-row:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; z-index: 1; }
.ib-row.chk, .ib-row.sel { background: #DDEBE2; }
.ib-cb { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.ib-cb:hover { background: rgba(22, 35, 29, 0.07); }
.ib-cb input { width: 16px; height: 16px; cursor: pointer; }
.ib-own { display: grid; place-items: center; }
.ib-face.xs { width: 24px; height: 24px; font-size: 10px; border-width: 2px; }
.ib-face.sm { width: 30px; height: 30px; font-size: 12px; }
.ib-face.md { width: 36px; height: 36px; font-size: 13px; }
.ib-face.lg2 { width: 52px; height: 52px; font-size: 18px; }
.pav.ib-face.ring.xs { border-width: 2px; }
.ib-nobody { background: var(--surface); border: 1.5px dashed var(--input); color: var(--muted); }
.ib-face.ext { background: var(--blue-bg); color: var(--blue); }
.ib-from { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink); font-weight: 500; }
.ib-fromn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-n { flex: none; font-size: 12px; color: var(--muted); font-weight: 500; }
.ib-from .ib-i { color: var(--muted); }
.ib-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-subj { color: var(--ink); font-weight: 500; }
.ib-snip { color: var(--muted); }
.ib-row.unseen .ib-from, .ib-row.unseen .ib-subj { font-weight: 800; }
.ib-row.unseen .ib-when { color: var(--ink); font-weight: 800; }
.ib-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #017D8A; margin-right: 8px; vertical-align: 1px; }
.ib-dot.b-c2u { background: #560F1C; } .ib-dot.b-ed { background: #BE581A; }
.ib-tags { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ib-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: #EEF2EF; color: var(--grey-ink); font-size: 12px; font-weight: 600;
  white-space: nowrap; text-decoration: none; }
.ib-tag.job { background: var(--blue-bg); color: var(--blue); }
.ib-tag.red { background: #FBECEA; color: var(--red); }
.ib-tag.amber { background: #FFF5E0; color: var(--amber); }
.ib-tag.blue { background: var(--blue-bg); color: var(--blue); }
.ib-tag.green { background: var(--green-100); color: var(--green-900); }
a.ib-tag:hover { text-decoration: underline; }
.ib-notes-n { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.ib-when { text-align: right; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ib-when.over { color: var(--red); }
.ib-hover { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: none; gap: 0; align-items: center; background: inherit; }
.ib-row.chk .ib-hover, .ib-row.sel .ib-hover { background: #DDEBE2; }
.ib-hover .ib-ico { width: 36px; height: 36px; }
.ib-hover .ib-i { width: 18px; height: 18px; }
@media (hover: hover) {
  .ib-row:hover .ib-hover { display: flex; }
  .ib-row:hover .ib-when, .ib-row:hover .ib-tags { visibility: hidden; }
}
.ib-row.swiping { transition: none; z-index: 2; }
.ib-row.swipe-go { background: var(--green-100); }
.ib-empty { display: flex; flex-direction: column; gap: 6px; padding: 56px 22px; margin: 0; text-align: center; font-size: 15px; color: var(--muted); }
.ib-empty b { font-size: 17px; color: var(--green-900); }

/* Faces to drop a dragged email on */
.ib-dragfaces { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 57; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 10px 32px rgba(22, 35, 29, 0.22); padding: 10px 14px 8px; }
.ib-dragfaces[hidden] { display: none; }
.ib-dragfaces p { margin: 0 0 6px; font-size: 13px; color: var(--muted); text-align: center; }
.ib-dfaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.ib-tface { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 6px 4px; border-radius: 12px; border: 2px dashed transparent; }
.ib-tface small { font-size: 12px; font-weight: 600; color: var(--grey-ink); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-tface .pav { width: 44px; height: 44px; }
.ib-tface.drop { border-color: var(--green-700); background: var(--green-100); }
.ib-tface.dim { opacity: 0.4; }
.ib-tface.leave .pav { opacity: 0.6; }
.ib-dwhy { font-size: 11px; font-style: normal; color: var(--muted); max-width: 80px; text-align: center; line-height: 1.2; }
.ib-dwhy:empty { display: none; }
.ib-away { position: absolute; top: 0; right: -2px; font-size: 10px; font-weight: 700; background: var(--amber-bg); color: var(--amber); border-radius: 999px; padding: 1px 6px; font-style: normal; }

/* The open email */
.ib-conv { min-width: 0; }
.ib-x { min-width: 0; }
.ib-xin { display: flex; flex-direction: column; gap: 10px; padding: 16px 24px 28px 24px; max-width: 1080px; min-width: 0; }
.ib-xhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-left: 52px; }
.ib-xhead h2 { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.ib-xtags { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ib-ownerline { margin: 0; padding-left: 52px; font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.ib-ownerline > .pav { display: inline-grid; vertical-align: middle; margin-right: 6px; }
.ib-ownerline b { color: var(--grey-ink); }
.ib-handed q { font-style: italic; color: var(--grey-ink); }
.ib-nudge { margin: 0 0 0 52px; padding: 8px 14px; border-radius: var(--r-ctl); background: var(--amber-bg); color: var(--amber); font-size: 14px; font-weight: 600; }

/* Karen suggests: one slim line, details folded away */
#ibxsug { margin-left: 52px; }
.ib-kbar { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 4px 4px 12px; border-radius: 10px; background: var(--green-100); font-size: 14px; color: var(--green-900); }
.ib-kbar img { flex: none; }
.ib-kbar p { flex: 1; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ib-kbar.quiet { background: var(--ground); color: var(--muted); }
#ibxsug:has(.ib-kdet:not([hidden])) .ib-kbar { border-radius: 10px 10px 0 0; }
.ib-klink { flex: none; min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--green-700); font: 700 14px var(--font); cursor: pointer; }
.ib-klink:hover { background: rgba(47, 107, 85, 0.12); }
.ib-klink:focus-visible { outline: 2px solid var(--green-700); }
.ib-kbar .ib-ico { color: var(--green-900); }
.ib-kdet { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--green-100); border-top: 0; border-radius: 0 0 10px 10px; font-size: 14px; }
.ib-kdet[hidden] { display: none; }
.ib-kdet p { margin: 0; }
.ib-sum { line-height: 1.5; overflow-wrap: break-word; }
.ib-facts { margin: 0; padding-left: 20px; color: var(--grey-ink); display: flex; flex-direction: column; gap: 2px; }
.ib-other .link { font-size: 14px; }
.ib-drafttext { padding: 10px 12px; background: var(--ground); border-radius: var(--r-ctl); line-height: 1.5; overflow-wrap: break-word; }
mark.ib-check { background: #FFE08A; color: #5C3B00; font-weight: 700; border-radius: 3px; padding: 0 2px; }
.ib-checks { font-size: 13px; color: var(--amber); }
.ib-sugfoot { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 13px; }
.ib-sugfoot .link { font-size: 13px; }

/* Messages, stacked like Gmail */
.ib-msgs { display: flex; flex-direction: column; min-width: 0; border-top: 1px solid var(--divider); margin-top: 4px; }
.ib-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--divider); min-width: 0; }
.ib-mmain { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ib-mhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 14px; }
.ib-mhead[data-ib] { cursor: pointer; }
.ib-mhead > div { min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ib-mhead b { color: var(--ink); }
.ib-mhead time { color: var(--muted); font-size: 12px; font-weight: 600; }
.ib-msg.out .ib-mhead b, .ib-mcol.out b { color: var(--green-900); }
.ib-addr1 { color: var(--muted); font-size: 12px; }
.ib-mto { margin: 0 0 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ib-mcol { display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 52px; padding: 6px 0; border: 0;
  border-bottom: 1px solid var(--divider); background: transparent; font: 14px var(--font); color: var(--ink); text-align: left; cursor: pointer; }
.ib-mcol:hover { background: #FAFCFA; }
.ib-mcol span:not(.pav) { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-mcol time { color: var(--muted); font-size: 12px; font-weight: 600; padding-right: 4px; }
.ib-fold { position: relative; width: 100%; height: 36px; border: 0; padding: 0; cursor: pointer; border-bottom: 1px solid var(--divider);
  background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.ib-fold span { position: relative; background: var(--surface); padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px; font: 600 12px var(--font); color: var(--grey-ink); }
.ib-fold:hover span { background: var(--ground); }
.ib-mbodywrap { min-width: 0; }
.ib-mail { font-size: 14px; line-height: 1.55; color: var(--ink); overflow-x: auto; overflow-wrap: break-word; max-width: 100%; contain: content; }
.ib-mail p { margin: 0 0 10px; }
.ib-mail img { max-width: 100%; height: auto; }
.ib-mail table { border-collapse: collapse; max-width: 100%; }
.ib-mail td, .ib-mail th { padding: 4px 8px; vertical-align: top; }
.ib-mail blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--grey-ink); }
.ib-mail pre { white-space: pre-wrap; }
.ib-mail a { overflow-wrap: anywhere; }
.ib-imgph { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 28px; padding: 4px 10px; border: 1px dashed var(--input);
  border-radius: 6px; color: var(--muted); font-size: 12px; background: var(--ground); overflow: hidden; vertical-align: middle; }
a.ib-imgph { color: var(--green-700); text-decoration: none; }
.ib-snipfull { margin: 0; font-size: 14px; color: var(--grey-ink); }
.ib-quiet { margin: 0; padding: 8px 12px; border-radius: var(--r-ctl); font-size: 13px; color: var(--muted); background: var(--ground); overflow-wrap: break-word; }
.ib-mextra { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--divider); }
.ib-atts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.ib-att { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 4px 12px 4px 6px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); cursor: pointer; font: 600 13px var(--font); color: var(--ink); text-align: left; }
.ib-att:hover { background: var(--ground); }
.ib-attic { flex: none; width: 28px; height: 28px; border-radius: 6px; background: var(--blue-bg); color: var(--blue); font-size: 9px; font-weight: 800; display: grid; place-items: center; }
.ib-attn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ib-att small { color: var(--muted); font-weight: 500; }
.ib-mextra .btn.small { min-height: 36px; }
.ib-task { margin-left: 52px; padding: 12px 0; font-size: 15px; }
.ib-task p { margin: 0 0 6px; overflow-wrap: break-word; }
.ib-due { font-weight: 700; color: var(--grey-ink); font-size: 14px; }

/* Smart Reply chips and Reply / Reply all / Forward */
#ibxreply, #ibcompslot { margin-left: 52px; }
#ibxreply[hidden] { display: none; }
.ib-smarts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.ib-smart { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; max-width: 100%; padding: 0 14px; border: 1px solid #BCD6C6; border-radius: 18px; background: var(--surface);
  font: 600 14px var(--font); color: var(--green-900); cursor: pointer; text-align: left; }
.ib-smart:hover { background: var(--green-100); }
.ib-replybtns { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 8px; }
.ib-rbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 20px 0 14px; border: 1px solid var(--input); border-radius: 20px; background: var(--surface);
  font: 600 14px var(--font); color: var(--grey-ink); cursor: pointer; }
.ib-rbtn:hover { background: var(--ground); color: var(--ink); }
.ib-rbtn .ib-i { width: 18px; height: 18px; }

/* Team notes and history */
#ibxnotes { margin-left: 52px; }
.ib-notes { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--divider); padding-top: 14px; margin-top: 8px; min-width: 0; }
.ib-notes h3 { margin: 0; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--grey-ink); }
.ib-notes h3 small { font-size: 12px; font-weight: 600; color: var(--muted); }
.ib-watch, .ib-loops { margin: 0; font-size: 13px; color: var(--grey-ink); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ib-wchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--ground); font-weight: 600; font-size: 13px; }
.ib-comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ib-comments li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.ib-comments li > div { min-width: 0; flex: 1; background: #FFFBEA; border-radius: 10px; padding: 8px 12px; }
.ib-cmeta { margin: 0; font-size: 13px; } .ib-cmeta time { color: var(--muted); }
.ib-cbody { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: break-word; }
.ib-at { color: var(--green-900); font-weight: 700; background: var(--green-100); border-radius: 4px; padding: 0 3px; }
.ib-cform { position: relative; display: flex; flex-direction: column; gap: 0; }
.ib-cform textarea { width: 100%; min-height: 44px; }
.ib-cform .rowbtns { margin-top: 8px; }
.ib-mention { position: absolute; left: 0; top: 100%; z-index: 6; width: min(320px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
  box-shadow: 0 6px 20px rgba(22, 35, 29, 0.14); padding: 4px; margin-top: -40px; }
.ib-hist { font-size: 13px; }
.ib-hist summary { cursor: pointer; font-weight: 600; color: var(--muted); min-height: 36px; display: inline-flex; align-items: center; }
.ib-hist ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ib-hist li { display: flex; gap: 10px; } .ib-hist time { color: var(--muted); flex: none; min-width: 92px; }
.ib-hist li span { min-width: 0; overflow-wrap: break-word; }
.ib-hist li.undone span { text-decoration: line-through; color: var(--muted); }

/* Composer: inline under an email, or in the window at the bottom right */
.ib-comp { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ib-comp.inline { margin: 10px 0 8px; padding: 6px 16px 12px; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 4px rgba(22, 35, 29, 0.12); background: var(--surface); }
.ib-comphead { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; color: var(--muted); }
.ib-comphead .ib-i { width: 16px; height: 16px; }
.ib-cfields { display: flex; flex-direction: column; }
.ib-crow { display: flex; align-items: flex-start; gap: 6px; min-height: 40px; border-bottom: 1px solid var(--divider); min-width: 0; }
.ib-crow[hidden] { display: none; }
.ib-crow:focus-within { border-bottom-color: var(--green-700); }
.ib-cl { flex: none; width: 40px; font-size: 14px; line-height: 38px; color: var(--muted); }
.ib-cv { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 2px 0; }
.ib-cv > select { width: 100%; min-height: 36px; border: 0; background: transparent; font: 14px var(--font); padding: 0; }
.ib-fromtxt { font-size: 14px; overflow-wrap: anywhere; color: var(--grey-ink); }
.ib-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 34px; min-width: 0; }
.ib-addr input { flex: 1 1 60px; min-width: 0; border: 0; min-height: 32px; padding: 0 2px; outline: 0; background: transparent; font: 14px var(--font); }
.ib-chips { display: contents; }
.ib-chipa { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 1px 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font-size: 13px; font-weight: 600; }
.ib-chipa .pav { margin-left: -6px; }
.ib-chipa span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-chipa.bad { background: var(--red-bg); color: var(--red); border-color: var(--red-bg); }
.ib-chipa button { border: 0; background: transparent; color: inherit; font-size: 15px; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; flex: none; }
.ib-chipa button:hover { background: rgba(0, 0, 0, 0.06); }
.ib-cclink { flex: none; min-height: 32px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.ib-cclink:hover { color: var(--ink); background: rgba(22, 35, 29, 0.06); }
.ib-cclink[hidden] { display: none; }
#ibsubj { width: 100%; min-height: 38px; border: 0; padding: 0; outline: 0; font: 14px var(--font); background: transparent; }
.ib-sugs { position: absolute; left: 0; right: 0; top: 100%; z-index: 6; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
  box-shadow: 0 6px 20px rgba(22, 35, 29, 0.14); padding: 4px; max-height: 300px; overflow-y: auto; }
.ib-sugs[hidden] { display: none; }
.ib-sugrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 10px; border: 0; border-radius: 8px; background: transparent;
  font: 14px var(--font); color: var(--ink); text-align: left; cursor: pointer; }
.ib-sugrow:hover, .ib-sugrow.hi { background: var(--ground); }
.ib-sugn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-sugn b, .ib-sugn small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-sugn small { color: var(--muted); }
.ib-sugrow i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.ib-ccfaces { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding-bottom: 4px; }
.ib-ccfaces:empty { display: none; }
.ib-ccl { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.ib-ccf { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 1px 10px 1px 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 600 12px var(--font); color: var(--grey-ink); cursor: pointer; }
.ib-ccf:hover { border-color: var(--input); }
.ib-ccf.on { background: var(--green-100); border-color: var(--green-700); color: var(--green-900); }
.ib-ccf .ib-face.sm { width: 26px; height: 26px; font-size: 10px; }
#ibhead { width: 100%; min-height: 40px; margin-top: 8px; }
.ib-comp #ibbody { width: 100%; min-height: 150px; max-height: 60vh; overflow-y: auto; padding: 12px 0; border: 0; outline: 0; font: 15px/1.5 var(--font); background: transparent; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.ib-dock .ib-comp #ibbody { min-height: 220px; }
.ib-kindnote { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.ib-kindnote[hidden] { display: none; }
.ib-checkwarn { margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; background: #FFF6D6; color: #5C3B00; font-size: 13px; font-weight: 600; }
.ib-checkwarn[hidden] { display: none; }
.ib-block { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--ground); margin-bottom: 8px; }
.ib-blockh { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.ib-tblwrap { overflow-x: auto; }
table.ib-mini { border-collapse: collapse; font-size: 13px; width: 100%; background: var(--surface); }
table.ib-mini th, table.ib-mini td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.ib-files { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.ib-files:empty { display: none; }
.ib-files li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 2px 4px 2px 10px; border-radius: 6px; background: var(--ground); }
.ib-files li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ib-files small { color: var(--muted); }
.ib-files li.t-err { background: var(--red-bg); }
.ib-inc { margin: 0 0 8px; font-size: 14px; }
.ib-preview { border: 1px solid var(--line); border-radius: 10px; background: var(--ground); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-bottom: 8px; }
.ib-preview[hidden] { display: none; }
.ib-pvhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ib-pvhead h4 { margin: 0; font-size: 13px; }
.ib-pvmeta { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.ib-pvmeta div { display: flex; gap: 8px; min-width: 0; } .ib-pvmeta dt { color: var(--muted); width: 56px; flex: none; } .ib-pvmeta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ib-pvmail { background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; padding: 14px; max-height: 420px; overflow: auto; }
.ib-sendoff { margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); font-size: 13px; font-weight: 600; overflow-wrap: break-word; }
.ib-sendoff[hidden] { display: none; }
.ib-comp > .msg:empty { display: none; }
.ib-cbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 8px; }
.ib-sendb { min-height: 40px; padding: 0 24px; border-radius: 20px; }
.ib-senddone { padding: 0 16px; margin-left: 4px; }
.ib-then { min-height: 36px; max-width: 150px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.ib-then, .ib-quick { width: auto; height: 36px; field-sizing: content; }
.ib-boxsel { height: 40px; }
.ib-then:hover, .ib-quick:hover { background: rgba(22, 35, 29, 0.06); }
.ib-cicons { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.ib-quick { min-height: 36px; max-width: 150px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; font: 13px var(--font); color: var(--grey-ink); cursor: pointer; }
.ib-qwrap { position: relative; }
.ib-qwrap[hidden] { display: none; }
.ib-qsel { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.ib-qwrap:focus-within { outline: 2px solid var(--green-700); }
.ib-attach { cursor: pointer; }
.ib-attach:focus-within { outline: 2px solid var(--green-700); }
.ib-discard { margin-left: auto; }
.ib-seg { display: inline-flex; border: 1px solid var(--input); border-radius: var(--r-ctl); overflow: hidden; }
.ib-segb { min-height: 40px; padding: 0 14px; border: 0; background: var(--surface); font: 600 14px var(--font); color: var(--grey-ink); cursor: pointer; }
.ib-segb + .ib-segb { border-left: 1px solid var(--input); }
.ib-segb.on { background: var(--green-900); color: #FFFFFF; }
.ib-seg.small { border-radius: 8px; margin-left: 4px; }
.ib-seg.small .ib-segb { min-height: 30px; padding: 0 10px; font-size: 12px; }

/* The new-email window */
.ib-dock { position: fixed; right: 24px; bottom: 0; z-index: 58; width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 72px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 12px 12px 0 0; box-shadow: 0 8px 32px rgba(22, 35, 29, 0.3); }
.ib-dock[hidden] { display: none; }
.ib-dockh { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 4px 0 16px; border-radius: 12px 12px 0 0;
  background: var(--green-900); color: #FFFFFF; font-size: 14px; cursor: pointer; }
.ib-dockbtns { display: flex; }
.ib-dockh .ib-ico { color: #FFFFFF; width: 36px; height: 36px; }
.ib-dockh .ib-ico:hover { background: rgba(255, 255, 255, 0.16); }
.ib-dockb { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 12px; }
.ib-dock.min { width: 300px; }
.ib-dock.min .ib-dockb { display: none; }
.ib-dock.max { top: 5vh; bottom: 5vh; left: max(16px, 10vw); right: max(16px, 10vw); width: auto; max-height: none; border-radius: 12px; }
.ib-dock.max .ib-dockb { display: flex; flex-direction: column; }
.ib-dock.max .ib-comp { flex: 1; }
.ib-dock.max .ib-comp #ibbody { flex: 1; }

/* Popovers */
.ib-pop { position: fixed; z-index: 60; width: 340px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 10px 32px rgba(22, 35, 29, 0.22); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ib-pop[hidden] { display: none; }
.ib-pop.wide { width: 420px; }
.ib-pop p { margin: 0; font-size: 14px; color: var(--grey-ink); }
.ib-poph { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ib-pop .rowbtns { margin-top: 2px; }
.ib-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.ib-pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 96px; padding: 8px 4px; border: 2px solid transparent; border-radius: 12px;
  background: var(--ground); font: 13px var(--font); color: var(--ink); cursor: pointer; text-align: center; }
.ib-pick b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-pick small { font-size: 11px; color: var(--muted); line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.ib-pick:hover { border-color: var(--input); }
.ib-pick.pre, .ib-pick.on { border-color: var(--green-700); background: var(--green-100); }
.ib-pick.no { opacity: 0.45; cursor: not-allowed; }
.ib-pick .ib-away { top: 4px; right: 4px; }
.ib-pickwhy { min-height: 0; font-size: 13px; color: var(--amber); }
.ib-pickwhy:empty { display: none; }
.ib-note { display: flex; flex-direction: column; gap: 6px; }
.ib-note label, .ib-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--grey-ink); }
.ib-note input, .ib-field input, .ib-field select, .ib-field textarea { width: 100%; min-height: 44px; }
.ib-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-presets .btn { flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.2; height: auto; min-height: 48px; padding: 6px 12px; display: inline-flex; }
.ib-presets .btn small { font-size: 11px; font-weight: 500; color: var(--muted); }
.ib-dt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ib-dt label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--grey-ink); min-width: 0; }
.ib-dt input, .ib-dt select { min-height: 44px; width: 100%; }
.ib-waiton { align-self: flex-start; }
.ib-jobres { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.ib-jobrow { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 0 10px; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent;
  font: 14px var(--font); color: var(--ink); text-align: left; cursor: pointer; }
.ib-jobrow:hover, .ib-jobrow:focus-visible { background: var(--ground); }
.ib-jobrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-jobrow small { grid-column: 2; color: var(--muted); font-size: 12px; }
.ib-keylist { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ib-keylist div { display: flex; gap: 12px; align-items: center; } .ib-keylist dt { width: 84px; flex: none; } .ib-keylist dd { margin: 0; }
.ib-pop:has(.ib-keylist.cols) { width: 520px; }
.ib-keylist.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }

/* Sending… Undo, bottom left like Gmail */
.ib-sendbar { position: fixed; left: 24px; bottom: 24px; z-index: 59; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; max-width: calc(100vw - 32px);
  background: var(--ink); color: #FFFFFF; border-radius: 8px; padding: 4px 6px 4px 16px; font-size: 14px; box-shadow: 0 6px 24px rgba(22, 35, 29, 0.3); }
.ib-sendbar[hidden] { display: none; }
.ib-sendbar span { min-width: 0; overflow-wrap: anywhere; flex: 1 1 160px; margin-right: 8px; }
.ib-tbtn { min-height: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #A9DDBF; font: 700 14px var(--font); cursor: pointer; }
.ib-tbtn:hover { background: rgba(255, 255, 255, 0.1); }
.ib-tbtn:disabled { opacity: 0.5; }

/* Brands: a coloured dot plus the word; "Brand?" in amber. Filters are underlined text. */
.ib-bl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--grey-ink); white-space: nowrap; }
.ib-bd { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9AA8A1; flex: none; }
.ib-bl.b-wt .ib-bd, .ib-bd.b-wt { background: #1E4A3D; }
.ib-bl.b-c2u .ib-bd, .ib-bd.b-c2u { background: #560F1C; }
.ib-bl.b-ed .ib-bd, .ib-bd.b-ed { background: #BE581A; }
.ib-bl.none { color: var(--amber); }
.ib-bl.none .ib-bd { background: var(--amber-bar); }
.ib-blink { display: inline-flex; align-items: center; min-height: 24px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font: inherit; }
.ib-blink:hover { background: rgba(22, 35, 29, 0.07); }
.ib-blink:focus-visible { outline: 2px solid var(--green-700); }
.ib-blink .ib-bl { font-size: 13px; }
.ib-bpick { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; }
.ib-bopt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; font: 600 15px var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.ib-bopt:hover, .ib-bopt.on { background: var(--green-100); }
.ib-bopt:focus-visible { outline: 2px solid var(--green-700); }
.ib-bopt .ib-bd { width: 10px; height: 10px; }
.ib-pophint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* Status: a dot plus a word */
.ib-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--grey-ink); white-space: nowrap; min-width: 0; }
.ib-st i { width: 8px; height: 8px; border-radius: 50%; background: #9AA8A1; flex: none; }
.ib-st.new i { background: var(--blue); }
.ib-st.warn { color: var(--amber); } .ib-st.warn i { background: var(--amber-bar); }
.ib-st.pend { color: var(--blue); } .ib-st.pend i { background: var(--blue); }
.ib-st.good i { background: var(--green-700); }
.ib-st.bad { color: var(--red); white-space: normal; overflow-wrap: anywhere; } .ib-st.bad i { background: var(--red); }
.ib-xtags .ib-st, .ib-xtags .ib-mbx { font-size: 13px; }

/* Someone's own mailbox: lock plus "Private" (owner only), or the mailbox name once shared */
.ib-i.xs { width: 13px; height: 13px; stroke-width: 2; }
.ib-priv { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--grey-ink); white-space: nowrap; }
.ib-mbx { font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* "Other": one quiet line with a count, rows inside when opened */
.ib-othersec { border-top: 1px solid var(--divider); }
.ib-othert { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 16px; border: 0; background: transparent; font: 600 14px var(--font);
  color: var(--muted); cursor: pointer; text-align: left; }
.ib-othert:hover { color: var(--ink); background: #F7FAF8; }
.ib-othert:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.ib-othert small { font-weight: 500; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-othert .ib-i { transition: transform 0.15s ease; }
.ib-othersec.open .ib-othert .ib-i { transform: rotate(90deg); }
.ib-row.oth { color: var(--muted); }
.ib-row.oth .ib-from, .ib-row.oth .ib-subj { color: var(--grey-ink); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .ib-othert .ib-i { transition: none; } }

/* Inbox settings */
.ib-toolt { font-size: 15px; color: var(--ink); }
.ib-set { display: flex; flex-direction: column; gap: 24px; max-width: 820px; }
.ib-setsec h2 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.ib-setlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); }
.ib-setrow { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; min-height: 52px; padding: 8px 14px; border-bottom: 1px solid var(--divider); min-width: 0; }
.ib-setrow:last-child { border-bottom: 0; }
.ib-setrow.off .ib-setmain { opacity: 0.6; }
.ib-setmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.ib-setmain b { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.ib-setmain small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ib-setside { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; min-width: 0; }
.ib-sethelp { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.ib-setcheck { margin-top: 12px; font-size: 14px; }
.ib-setadd { margin-top: 10px; }
.ib-setadd summary { display: inline-flex; align-items: center; min-height: 36px; list-style: none; }
.ib-setadd summary::-webkit-details-marker { display: none; }
.ib-setform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 8px; }
.ib-setform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--grey-ink); flex: 1 1 180px; min-width: 0; }
.ib-setform input, .ib-setform select { min-height: 40px; width: 100%; }
@media (pointer: coarse) {
  .ib-bf, .ib-othert, .ib-blink, .ib-setadd summary, .ib-setside .link { min-height: 44px; }
  .ib-setform input, .ib-setform select { min-height: 44px; }
}
@media (max-width: 720px) {
  .ib-tags .ib-bl { font-size: 11px; }
  .ib-tags .ib-mbx { display: none; }
  .ib-tags .ib-priv { font-size: 0; gap: 0; }
  .ib-othert small { display: none; }
  .ib-shell.reading .ib-tl .ib-more .menu { left: auto; right: 0; }
  .ib-tags .ib-bl + .ib-tag.job { display: none; }
}

/* Mid-width: a narrower sender column */
@media (max-width: 1100px) {
  .ib-row { grid-template-columns: 36px 28px minmax(100px, 160px) minmax(0, 1fr) auto 64px; }
  .ib-tags .ib-tag + .ib-tag { display: none; }
}
@media (max-width: 900px) {
  .ib-tools, body.demo .ib-tools { top: 65px; }
  .ib-xhead, .ib-ownerline { padding-left: 0; }
  #ibxsug, #ibxreply, #ibcompslot, #ibxnotes, .ib-task, .ib-nudge { margin-left: 0; }
  .ib-xin { padding: 14px 16px 24px; }
}

/* Phones: Gmail's app layout */
@media (max-width: 720px) {
  .ib.view-in { padding: 10px 0 96px; gap: 8px; }
  .ib-top { padding: 0 12px; gap: 6px; }
  .ib-compose { position: fixed; right: 16px; bottom: 16px; z-index: 40; min-height: 56px; border-radius: 16px; box-shadow: 0 4px 14px rgba(22, 35, 29, 0.3); }
  .ib-top > .ib-ico:last-child { display: none; }
  .ib-search input { min-height: 46px; }
  .ib-boxsel { max-width: 120px; padding: 0 4px; font-size: 13px; }
  .ib-status.wide .ib-stxt { display: none; }
  .ib-status.wide { width: 40px; padding: 0; }
  .ib-msgline { padding: 0 16px; }
  .ib-shell { border-radius: 0; border-left: 0; border-right: 0; }
  .ib-tools { border-radius: 0; }
  .ib-row { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "av from when" "av subj subj" "av snip tags"; gap: 0 12px; align-items: center;
    min-height: 76px; padding: 10px 16px; }
  .ib-row:last-child { border-radius: 0; }
  .ib-cb { display: none; }
  .ib-own { grid-area: av; align-self: start; padding-top: 2px; position: relative; }
  .ib-own .pav { width: 40px; height: 40px; font-size: 14px; border-width: 3px; }
  .ib-row.chk .ib-own::after { content: "✓"; position: absolute; inset: 2px 0 auto; width: 40px; height: 40px; margin: auto; border-radius: 50%; background: var(--green-700); color: #FFFFFF;
    display: grid; place-items: center; font-size: 20px; font-weight: 700; }
  .ib-from { grid-area: from; font-size: 15px; }
  .ib-when { grid-area: when; }
  .ib-line { display: contents; }
  .ib-line .ib-dot { display: none; }
  .ib-subj { grid-area: subj; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ib-snip { grid-area: snip; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ib-tags { grid-area: tags; justify-content: flex-end; }
  .ib-tags .ib-tag + .ib-tag { display: none; }
  .ib-hover { display: none !important; }
  .ib-dash { display: none; }
  .ib-shell.reading .ib-tr, .ib-tsep { display: none; }
  .ib-tl { gap: 0; }
  .ib:has(.ib-shell.reading) .ib-compose { display: none; }
  .ib-xin { padding: 12px 16px 24px; }
  .ib-xhead h2 { font-size: 20px; }
  .ib-msg { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .ib-mcol { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .ib-mcol > span:not(.pav) { display: none; }
  .ib-attn { max-width: 160px; }
  .ib-dock, .ib-dock.max { inset: 0; width: auto; max-width: none; max-height: none; border-radius: 0; }
  .ib-dock.min { inset: auto 0 0 0; width: auto; }
  .ib-dockh { border-radius: 0; min-height: 52px; }
  .ib-dock .ib-dockbtns [data-ib=dmax] { display: none; }
  .ib-dock .ib-dockb { display: flex; flex-direction: column; }
  .ib-dock .ib-comp { flex: 1; }
  .ib-dock .ib-comp #ibbody { flex: 1; }
  .ib-pop.wide, .ib-pop:has(.ib-keylist.cols) { width: 340px; }
  .ib-keylist.cols { grid-template-columns: minmax(0, 1fr); }
  .ib-sendbar { left: 12px; right: 12px; bottom: 12px; }
  .ib-replybtns { gap: 8px; }
  .ib-cicons { order: 3; flex-basis: 100%; }
  .ib-crow [data-c=showsubj] { display: none; }
  .ib-rbtn { padding: 0 14px 0 10px; }
}

/* Touch screens: every target at least 44px */
@media (pointer: coarse) {
  .ib-ico, .ib-ico.sm, .ib-hover .ib-ico, .ib-dockh .ib-ico { width: 44px; height: 44px; }
  .ib-row { min-height: 56px; }
  .ib-tab, .ib-smart, .ib-rbtn, .ib-sendb, .ib-boxsel, .ib-then, .ib-quick, .ib-cclink, .ib-klink, .ib-tbtn, .ib-segb, .ib-seg.small .ib-segb, .ib-ccf, .ib-att { min-height: 44px; }
  .ib-crow { min-height: 48px; }
  .ib-sugfoot .link, .ib-hist summary, .ib-other .link { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Signature shown under the body of a composer (signature.js): not editable, a little muted */
.sig-block { margin: 4px 0 10px; padding: 8px 0 0; border-top: 1px solid var(--divider); color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
.sig-block[hidden] { display: none; }
.sig-label { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.sig-body { color: #222222; font-size: 14px; user-select: none; -webkit-user-select: none; cursor: default; }
.sig-body p { margin: 0 0 4px; }
.sig-body a { color: inherit; text-decoration: underline; pointer-events: none; }
.sig-body table { border-collapse: collapse; }
/* A signature lays out like it does in Gmail: none of the page's table look (full width, row lines, cell padding) */
.sig-body table { width: auto; font-size: inherit; }
.sig-body td, .sig-body th { padding: 0; border: 0; height: auto; background: none; font-size: inherit; font-weight: inherit; color: inherit; white-space: normal; vertical-align: middle; text-align: left; }
.sig-body img { max-width: 100%; height: auto; }
.sig-note { margin: 0; font-style: italic; }
.sig-regards { margin: 0 0 4px; }

/* Calm row: sender monogram, bold title plus a small dot when new; no coloured bar */
.ib-own2 { display: inline-grid; place-items: center; flex: none; }
.ib-row .ib-face.ext { background: var(--green-100); color: var(--green-900); }

/* Pictures in emails: shrink to fit, signature pictures keep their own size */
.ib-mail img.ib-pic { max-width: 100%; height: auto; vertical-align: middle; }
.ib-imgbar { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); }
.ib-imgbar .link { font-size: 13px; }

/* Brand logo badge: the brand's own colour with its logo, on every email */
.ib-logo { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 7px; border-radius: 5px; background: #9AA8A1; flex: none; vertical-align: middle; }
.ib-logo img { height: 12px; width: auto; max-width: 78px; display: block; }
.ib-logo.b-wt { background: #1E4A3D; } .ib-logo.b-c2u { background: #560F1C; } .ib-logo.b-ed { background: #BE581A; }
.ib-blink .ib-logo { height: 24px; }

/* Email body tidy: signatures and quoted history */
.ib-mail table { width: auto; table-layout: auto; }
.ib-mail td, .ib-mail th { padding: 2px 8px; }
.ib-mail hr { border: 0; border-top: 1px solid var(--divider); margin: 8px 0; }
.ib-mail p:empty, .ib-mail div:empty { display: none; }
.ib-qtoggle { display: inline-flex; align-items: center; min-height: 28px; margin: 6px 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--grey-ink); font: 600 12px var(--font); cursor: pointer; }
.ib-qtoggle:hover { background: var(--ground); }
.ib-qtoggle:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }
.ib-quoted[hidden] { display: none; }

/* All open: owner faces */

/* "Same as Gmail" line: calm, one line, a quiet dot that turns amber only when the counts differ */

/* Left rail, like Gmail's labels: compact rows, a soft pill for the selected one, grey counts */
.ib-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 12px; align-items: start; min-width: 0; }
.ib-rail { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; padding: 4px 0 16px; min-width: 0; }
body.demo .ib-rail { top: 65px; }
.ib-rail .ib-compose { align-self: flex-start; }
.ib-railin { display: flex; flex-direction: column; gap: 0; }
.ib-ri { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 0 14px 0 10px; border: 0; border-radius: 0 16px 16px 0; background: transparent;
  font: 500 14px var(--font); color: var(--grey-ink); text-align: left; cursor: pointer; }
.ib-ri:hover { background: rgba(22, 35, 29, 0.07); }
.ib-ri:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.ib-ri.on { background: var(--green-100); color: var(--green-900); font-weight: 700; }
.ib-ri .ib-rn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-ri .ib-tabn { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.ib-ri.on .ib-tabn { color: var(--green-900); font-weight: 700; }
.ib-rico { flex: none; width: 24px; display: grid; place-items: center; color: var(--muted); }
.ib-ri.on .ib-rico { color: var(--green-900); }
.ib-rico .ib-i { width: 18px; height: 18px; }
.ib-rdot { display: block; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #8A9A92; }
.ib-rl { font-size: 11px; color: var(--amber); }
.ib-rg { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 32px; margin-top: 8px; padding: 0 14px 0 8px; border: 0; background: transparent;
  font: 600 13px var(--font); color: var(--muted); text-align: left; cursor: pointer; border-radius: 0 16px 16px 0; }
.ib-rg:hover { background: rgba(22, 35, 29, 0.07); color: var(--ink); }
.ib-rg:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.ib-rg .ib-i { transition: transform 0.12s; transform: rotate(-90deg); }
.ib-rg.open .ib-i { transform: none; }
.ib-rg small { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--grey-ink); }
.ib-rb .ib-bd { width: 10px; height: 10px; }
.ib-rb.warn .ib-rn { color: var(--amber); }
@media (prefers-reduced-motion: reduce) { .ib-rg .ib-i { transition: none; } }
@media (max-width: 720px) {
  .ib-body { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ib-rail { position: static; padding: 0 12px; }
  .ib-railin { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .ib-railin::-webkit-scrollbar { display: none; }
  .ib-ri, .ib-rg { width: auto; flex: none; border: 1px solid var(--line); border-radius: 999px; min-height: 40px; padding: 0 12px 0 8px; margin: 0; }
  .ib-ri .ib-rico:has(.ib-i), .ib-ri .ib-rico:has(.ib-rdot), .ib-ri .ib-rico:empty { display: none; }
  .ib-ri.on { border-color: var(--green-700); }
  .ib-rg .ib-i { display: none; }
  .ib-row.unseen { background: var(--surface); }
}

/* Gmail look: flat list, hairline rows, calm labels */
.ib-from .ib-fbadge { display: none; width: 22px; height: 22px; flex: none; }
.ib-from .ib-fbadge.none { font-size: 12px; }
@media (min-width: 721px) { .ib-own { display: none; } .ib-from .ib-fbadge { display: inline-flex; } }
.ib-star-gap { display: block; width: 28px; height: 28px; }
.ib-star { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #7C8C84; cursor: pointer; }
.ib-star .ib-i { width: 18px; height: 18px; }
.ib-star:hover { color: var(--amber); background: rgba(22, 35, 29, 0.07); }
.ib-star:focus-visible { outline: 2px solid var(--green-700); }
.ib-star.on { color: var(--amber-bar); }
.ib-star.on .ib-i { fill: currentColor; }
.ib-tags { gap: 8px; }
.ib-row .ib-tag { height: auto; padding: 0; background: transparent; font-size: 12px; font-weight: 600; }
.ib-row .ib-tag.red { color: var(--red); } .ib-row .ib-tag.amber { color: var(--amber); } .ib-row .ib-tag.job, .ib-row .ib-tag.blue { color: var(--blue); }
.ib-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 150px; height: 22px; padding: 0 8px 0 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--grey-ink); background: var(--surface); }
.ib-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-bd.none { background: transparent; box-shadow: inset 0 0 0 2px var(--amber-bar); }
.ib-selm { display: inline-block; }
.ib-selm summary { list-style: none; }
.ib-selm summary::-webkit-details-marker { display: none; }
.ib-caret { display: inline-grid; place-items: center; width: 24px; height: 32px; margin-left: -6px; border-radius: 8px; color: var(--grey-ink); cursor: pointer; }
.ib-caret:hover { background: rgba(22, 35, 29, 0.07); }
.ib-caret:focus-visible { outline: 2px solid var(--green-700); }
.ib-selm .menu { min-width: 140px; }
.ib-cball { width: 36px; }
.ib-count { font-size: 12px; }

/* The open email: a large plain subject, a small dot and labels beside it, then one quiet owner line */
.ib-xhead h2 { font-size: 22px; font-weight: 400; line-height: 1.35; }
.ib-xtags { align-items: center; gap: 4px 12px; font-size: 12px; }
.ib-blink .ib-bl { font-size: 12px; font-weight: 500; color: var(--grey-ink); }
.ib-ownerline { font-size: 12px; line-height: 1.5; color: var(--muted); }
.ib-ownerline > .pav { width: 18px; height: 18px; font-size: 9px; }
.ib-kbar { min-height: 36px; background: transparent; border: 1px solid var(--divider); font-size: 13px; color: var(--grey-ink); }
.ib-kbar.quiet { background: transparent; }
.ib-kdet { border-color: var(--divider); }
@media (max-width: 720px) { .ib-ownerline { padding-left: 0; } }
.ib-selm summary::after { content: none !important; }
.ib-row { grid-template-columns: 36px 28px minmax(100px, 150px) minmax(0, 1fr) auto 64px; }
.ib-chip span { display: none; }
.ib-tags .ib-priv { font-size: 0; gap: 0; }
@media (min-width: 1500px) { .ib-chip span { display: inline; } .ib-tags .ib-priv { font-size: 12px; gap: 4px; } .ib-row { grid-template-columns: 36px 28px minmax(120px, 200px) minmax(0, 1fr) auto 64px; } }
@media (max-width: 720px) {
  .ib-star, .ib-star-gap, .ib-selm, .ib-chip { display: none; }
  .ib-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
}

/* Drag onto the faces in the left rail */
.ib-ri.drop { background: var(--green-100); outline: 2px dashed var(--green-700); outline-offset: -2px; color: var(--green-900); }
.ib-ri.dim { opacity: 0.4; }
/* Get Karen's Help */
.ib-karenbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid #BCD6C6; border-radius: 18px; background: var(--surface); color: var(--green-900); font: inherit; font-weight: 600; cursor: pointer; }
.ib-karenbtn:hover { background: var(--green-100); }
.ib-karenbtn:disabled { opacity: 0.6; cursor: default; }
.ib-karenbtn .ib-i, .ib-rkaren .ib-i { width: 18px; height: 18px; }
.ib-tidy { margin: 8px 0; padding: 12px 14px; border: 1px solid #BCD6C6; border-radius: 12px; background: var(--green-100); }
.ib-tidy[hidden] { display: none; }
.ib-tidyh { margin: 0 0 6px; font-size: 14px; }
.ib-tidytxt { padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); line-height: 1.5; overflow-wrap: anywhere; }
.ib-tidyst { margin: 8px 0 0; font-size: 13px; color: var(--grey-ink); }
.ib-tidyst.err { color: var(--red, #9b2c2c); }
.ib-tidyst.warn { color: var(--amber); }
.ib-tidy .rowbtns { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ib-tidynotes { margin-top: 10px; padding: 8px 12px; border-radius: 8px; border: 1px dashed var(--amber); font-size: 13px; color: var(--grey-ink); }
.ib-tidynotes ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 720px) { .ib-karenbtn { min-height: 44px; } }

/* ---------- Two panes, like Outlook: the list on the left, the open email on the right ---------- */
/* Every second row a calm Karen-green, the selected one stronger with a bar on its left */
.ib-list > .ib-row { background: var(--surface); }
.ib-list > .ib-row:nth-child(even), .ib-othersec .ib-row:nth-child(odd) { background: #EDF3EE; }
.ib-list > .ib-row:hover, .ib-othersec .ib-row:hover { background: #E2EDE5; }
.ib-list > .ib-row.chk, .ib-list > .ib-row.sel, .ib-othersec .ib-row.chk, .ib-othersec .ib-row.sel { background: #D5E8DB; }
.ib-row.sel { box-shadow: inset 3px 0 0 var(--green-700); }
.ib-row.chk .ib-hover, .ib-row.sel .ib-hover { background: #D5E8DB; }
.ib-panetools[hidden] { display: none; }
.ib-panebody { min-width: 0; }
.ib-panempty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 50vh; padding: 40px 24px; text-align: center; color: var(--muted); }
.ib-panempty p { margin: 0; font-size: 16px; color: var(--grey-ink); }
.ib-panempty small { font-size: 13px; }
.ib-panem-ic { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 50%; background: #EDF3EE; color: var(--green-700); }
.ib-panem-ic .ib-i { width: 30px; height: 30px; }

@media (min-width: 1100px) {
  .ib-shell.split { display: grid; grid-template-columns: minmax(360px, 42%) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 150px); min-height: 520px;
    overflow: hidden; border: 1px solid var(--line); }
  body.demo .ib-shell.split { height: calc(100vh - 205px); }
  .ib-shell.split .ib-tools { grid-column: 1; grid-row: 1; position: static; border-radius: 0; border-right: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
  .ib-shell.split .ib-list { grid-column: 1; grid-row: 2; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--divider); }
  .ib-shell.split .ib-conv:not([hidden]) { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
  .ib-shell.split .ib-panetools { position: static; flex: none; border-radius: 0; border-bottom: 1px solid var(--divider); }
  .ib-shell.split .ib-panebody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
  .ib-shell.split .ib-x { flex: 1 0 auto; display: flex; flex-direction: column; }
  .ib-shell.split .ib-xin { flex: 1 1 auto; max-width: none; padding: 16px 24px 0; }
  .ib-shell.split .ib-tl .ib-ico { width: 38px; height: 38px; }

  /* The left list uses the stacked row (the phone layout): sender, subject, preview, time, owner face and brand dot */
  .ib-shell.split .ib-row { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "av from when" "av subj subj" "av snip tags"; gap: 0 12px; align-items: center;
    min-height: 74px; padding: 9px 14px 9px 12px; scroll-margin: 0; border-radius: 0; }
  .ib-shell.split .ib-row:last-child { border-radius: 0; }
  .ib-shell.split .ib-cb, .ib-shell.split .ib-star, .ib-shell.split .ib-star-gap, .ib-shell.split .ib-chip, .ib-shell.split .ib-hover, .ib-shell.split .ib-dash { display: none !important; }
  .ib-shell.split .ib-own { display: grid; grid-area: av; align-self: start; padding-top: 2px; position: relative; }
  .ib-shell.split .ib-own .pav { width: 38px; height: 38px; font-size: 13px; border-width: 3px; }
  .ib-shell.split .ib-row.chk .ib-own::after { content: "✓"; position: absolute; inset: 2px 0 auto; width: 38px; height: 38px; margin: auto; border-radius: 50%; background: var(--green-700); color: #FFFFFF;
    display: grid; place-items: center; font-size: 19px; font-weight: 700; }
  .ib-shell.split .ib-from { grid-area: from; font-size: 14px; font-weight: 700; color: var(--ink); }
  .ib-shell.split .ib-when { grid-area: when; }
  .ib-shell.split .ib-line { display: contents; }
  .ib-shell.split .ib-line .ib-dot { display: none; }
  .ib-shell.split .ib-subj { grid-area: subj; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
  .ib-shell.split .ib-snip { grid-area: snip; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
  .ib-shell.split .ib-tags { grid-area: tags; justify-content: flex-end; gap: 5px; }
  .ib-shell.split .ib-tags .ib-tag + .ib-tag { display: none; }
  .ib-shell.split .ib-row.unseen .ib-subj { color: var(--blue); font-weight: 700; }
  .ib-shell.split .ib-row.unseen .ib-snip { color: var(--grey-ink); }
  .ib-shell.split .ib-othert small { display: none; }

  /* The reply bar and the inline composer stay docked at the bottom of the reading pane */
  .ib-shell.split #ibxreply, .ib-shell.split #ibcompslot { position: sticky; bottom: 0; z-index: 3; margin: 0 -24px; padding: 6px 24px 10px; background: var(--surface); box-shadow: 0 -1px 0 var(--divider); }
  .ib-shell.split #ibxreply { order: 8; margin-top: auto; }
  .ib-shell.split #ibcompslot { order: 9; }
  .ib-shell.split #ibxreply .ib-rbtn[data-ib=replyall], .ib-shell.split #ibxreply .ib-rbtn[data-ib=forward] { display: none; }
  .ib-shell.split #ibxreply .ib-rbtn, .ib-shell.split #ibxreply .ib-smart { min-height: 36px; }
  .ib-shell.split .ib-from .ib-i { display: none; }
  .ib-shell.split #ibxreply .ib-smarts { margin: 4px 0 2px; }
  .ib-shell.split #ibxreply .ib-replybtns { margin: 6px 0 0; }
  .ib-shell.split #ibcompslot:empty { display: none; }
  .ib-shell.split #ibcompslot { max-height: 46vh; overflow-y: auto; padding: 10px 24px 0; }
  .ib-shell.split .ib-comp.inline { margin: 0; padding: 4px 14px 10px; box-shadow: none; }
  .ib-shell.split .ib-comp #ibbody { min-height: 84px; height: 96px; padding: 8px 0; }
  .ib-shell.split .ib-comp .ib-cbar { position: sticky; bottom: 0; z-index: 1; padding: 6px 0 10px; background: var(--surface); }
  .ib-shell.split #ibxnotes { padding-bottom: 18px; }
}

/* Round brand badge on each email: the brand's own mark on its colour (images in assets/brands/badge-*.png) */
.ib-bbadge { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; object-fit: cover; user-select: none; }
.ib-bbadge.none { box-shadow: inset 0 0 0 2px var(--amber-bar); color: var(--amber); font-weight: 700; font-size: 16px; background: var(--amber-bg); }
.ib-shell.split .ib-own .ib-bbadge { width: 38px; height: 38px; }
.ib-shell.split .ib-own .ib-bbadge.none { font-size: 18px; }

/* Villa line drawing for empty states */
.ib-villa { width: 150px; height: auto; margin: 0 auto 6px; color: var(--green-700); }
.ib-villa .roof { fill: #EDF3EE; }
.ib-villa .door { fill: var(--green-900); stroke: none; }
.ib-villa .glass { fill: #fff; }

.ib-crow > .ib-ico, .ib-crow > .ib-cclink { margin-top: 3px; }
.ib-crow > .ib-cv { padding: 2px 0; }
.ib-crow > .ib-cv .ib-addr { min-height: 36px; }
.ib-crow#ibsubjrow { align-items: center; }

/* ---------- Calm pass (Oct 2026): one marker per row, Reply is the one filled button ---------- */
.ib-mk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ib-mk.red { color: var(--red); }
.ib-mk.job { font-variant-numeric: tabular-nums; }
.ib-clip { display: inline-flex; align-items: center; color: var(--muted); }
.ib-rbtn.main { background: var(--green-700); border-color: var(--green-700); color: #FFFFFF; font-weight: 700; padding: 0 22px 0 16px; }
.ib-rbtn.main:hover { background: var(--green-hover, #275A47); color: #FFFFFF; }
.ib-rbtn.main .ib-i { stroke: currentColor; }
.ib-rlink { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 20px; background: transparent;
  font: 600 14px var(--font); color: var(--grey-ink); cursor: pointer; }
.ib-rlink:hover { background: var(--ground); color: var(--ink); }
.ib-rlink:focus-visible, .ib-rbtn.main:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }
.ib-rlink .ib-i { width: 17px; height: 17px; }
.ib-replybtns { align-items: center; }
@media (pointer: coarse) { .ib-rlink, .ib-rbtn.main { min-height: 44px; } }

/* ---------- Full design pass (Phase B) ---------- */
/* Done, Snooze, Hand to and Waiting carry their word on wide screens; icon only below 1280px */
.ib-ico.ib-lbl .ib-lbt { display: none; }
@media (min-width: 1280px) {
  .ib-ico.ib-lbl { width: auto; border-radius: 999px; padding: 0 12px 0 8px; gap: 6px; grid-auto-flow: column; }
  .ib-ico.ib-lbl .ib-lbt { display: inline; font: 600 14px var(--font); color: var(--grey-ink); white-space: nowrap; }
  .ib-ico.ib-lbl::after { content: none !important; display: none !important; }
  .ib-shell.split .ib-tl .ib-ico.ib-lbl { width: auto; }
}
/* The open email's brand: a plain muted word (click to change it) */
.ib-blink.plain { font: 500 13px var(--font); color: var(--muted); }
.ib-blink.plain.none { color: var(--amber); }
/* Images held back: one quiet line */
.ib-imgbar { padding: 4px 0; border: 0; background: transparent; }
/* Day pickers in the Snooze and To-do pop-ups */
.ib-dtl { margin: 10px 0 6px; font-size: 13px; font-weight: 600; color: var(--grey-ink); }
.ib-pop .dpick { margin-bottom: 4px; }
.ib-pop .dpick-val { font-size: 14px; font-weight: 600; color: var(--ink); }
.ib-time { margin-top: 8px; }
.ib-time select { min-height: 44px; }

/* ---------- Gmail look (Oct 2026): Finn asked for the Inbox to look as close to Gmail as possible ---------- */
/* Gmail's own palette and type, scoped to the Inbox. Later rules here win over the earlier Karen-green ones. */
.ib, .ib-pop, .ib-dock, .ib-sendbar {
  --gm-ink: #1F1F1F; --gm-ink2: #444746; --gm-muted: #5F6368; --gm-ground: #F6F8FC; --gm-read: #F2F6FC; --gm-unread: #FFFFFF;
  --gm-pill: #D3E3FD; --gm-pill-ink: #041E49; --gm-compose: #C2E7FF; --gm-compose-ink: #001D35; --gm-search: #E9EEF6; --gm-sel: #C2DBFF;
  --gm-line: rgba(100, 121, 143, 0.12); --gm-hover: rgba(31, 31, 31, 0.08); --gm-outline: #747775; --gm-blue: #0B57D0; --gm-yellow: #F2B600;
  --font: "Google Sans Text", "Google Sans", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
#v-inbox { background: var(--gm-ground, #F6F8FC); }
.ib.view-in { background: var(--gm-ground); color: var(--gm-ink); min-height: 100vh; }

/* Search: Gmail's wide rounded grey bar */
.ib-search { max-width: 720px; }
.ib-search input { min-height: 48px; border-radius: 24px; background: var(--gm-search); color: var(--gm-ink); font: 400 16px var(--font); }
.ib-search input::placeholder { color: var(--gm-ink2); }
.ib-search input:focus { background: var(--gm-unread); border-color: transparent; box-shadow: 0 1px 1px rgba(65, 69, 73, 0.3), 0 1px 3px 1px rgba(65, 69, 73, 0.15); }
.ib-search .ib-i { color: var(--gm-ink2); }

/* Compose: the big pale-blue rounded button */
.ib .ib-compose, .ib .ib-compose:hover { min-height: 56px; padding: 0 24px 0 16px; border: 0; border-radius: 16px; background: var(--gm-compose); color: var(--gm-compose-ink);
  font: 500 14px var(--font); gap: 12px; box-shadow: none; }
.ib .ib-compose:hover { box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15); }
.ib .ib-compose .ib-i { width: 22px; height: 22px; stroke-width: 1.7; }

/* Left rail: Gmail's folder rows, a pale-blue pill for the open one, bold count; then headings like "Labels" */
@media (min-width: 721px) {
  .ib-body { grid-template-columns: 236px minmax(0, 1fr); gap: 8px 16px; }
  .ib-rail { gap: 16px; }
  .ib-ri { min-height: 32px; padding: 0 12px 0 14px; gap: 14px; border-radius: 0 16px 16px 0; }
  .ib-rg { min-height: 32px; margin-top: 14px; padding: 0 14px 0 6px; gap: 6px; border-radius: 0 16px 16px 0; font: 500 16px var(--font); }
  .ib-ri.ib-rb { padding-left: 34px; }
}
.ib-ri { font: 400 14px var(--font); color: var(--gm-ink); }
.ib-ri:hover { background: var(--gm-hover); }
.ib-ri.on { background: var(--gm-pill); color: var(--gm-pill-ink); font-weight: 700; }
.ib-ri .ib-tabn { font: 400 12px var(--font); color: var(--gm-ink); letter-spacing: 0.3px; }
.ib-ri.on .ib-tabn { color: var(--gm-pill-ink); font-weight: 700; }
.ib-rico { width: 20px; color: var(--gm-ink2); }
.ib-ri.on .ib-rico { color: var(--gm-pill-ink); }
.ib-rico .ib-i { width: 20px; height: 20px; }
.ib-rh { margin: 14px 0 4px; padding: 0 14px 0 16px; font: 500 16px var(--font); color: var(--gm-ink); letter-spacing: 0.1px; }
.ib-rg { color: var(--gm-ink); }
.ib-rg:hover { background: var(--gm-hover); color: var(--gm-ink); }
.ib-rg small { font: 400 12px var(--font); color: var(--gm-ink2); }
.ib-lab .ib-i { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.ib-lab.b-wt { color: #017D8A; } .ib-lab.b-c2u { color: #8C2236; } .ib-lab.b-ed { color: #E37400; }
.ib-lab.none { color: var(--gm-muted); } .ib-lab.none .ib-i { fill: none; stroke: currentColor; stroke-width: 1.8; }

/* The white card holding the toolbar and the list */
.ib-shell { background: var(--gm-unread); border-radius: 16px; }
.ib-tools { min-height: 48px; padding: 4px 16px 4px 8px; background: var(--gm-unread); }
.ib-tools .ib-ico { color: var(--gm-ink2); }
.ib-tools .ib-ico:hover { background: var(--gm-hover); color: var(--gm-ink); }
.ib-count { font: 400 12px var(--font); color: var(--gm-ink2); letter-spacing: 0.3px; }

/* Rows, desktop: checkbox, star, brand marker, sender, subject - snippet, time; read rows pale blue-grey, unread white and bold */
@media (min-width: 721px) {
  .ib .ib-list > .ib-row, .ib .ib-othersec .ib-row { grid-template-columns: 40px 28px 26px minmax(120px, 200px) minmax(0, 1fr) auto 76px;
    min-height: 40px; padding: 0 16px 0 8px; gap: 0 6px; border-bottom: 1px solid var(--gm-line); background: var(--gm-read); color: var(--gm-ink); font: 400 14px var(--font); }
  .ib .ib-list > .ib-row.unseen, .ib .ib-othersec .ib-row.unseen { background: var(--gm-unread); }
  .ib .ib-list > .ib-row:hover, .ib .ib-othersec .ib-row:hover { z-index: 2; background: var(--gm-read);
    box-shadow: inset 1px 0 0 #DADCE0, inset -1px 0 0 #DADCE0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15); }
  .ib .ib-list > .ib-row.unseen:hover, .ib .ib-othersec .ib-row.unseen:hover { background: var(--gm-unread); }
  .ib .ib-list > .ib-row.chk, .ib .ib-list > .ib-row.sel, .ib .ib-othersec .ib-row.chk, .ib .ib-othersec .ib-row.sel { background: var(--gm-sel); box-shadow: none; }
  .ib .ib-row.chk .ib-hover, .ib .ib-row.sel .ib-hover { background: var(--gm-sel); }
  .ib .ib-row .ib-hover { background: inherit; right: 10px; }
  .ib-row .ib-cb input { width: 18px; height: 18px; accent-color: var(--gm-blue); }
  .ib-row .ib-from { font-weight: 400; color: var(--gm-ink); }
  .ib-row .ib-subj { font-weight: 400; color: var(--gm-ink); }
  .ib-row .ib-snip { color: var(--gm-muted); }
  .ib-row .ib-when { font: 400 12px var(--font); color: var(--gm-ink2); letter-spacing: 0.2px; }
  .ib .ib-row.unseen .ib-from, .ib .ib-row.unseen .ib-subj { font-weight: 700; color: var(--gm-ink); }
  .ib .ib-row.unseen .ib-when { font-weight: 700; color: var(--gm-ink); }
  .ib-row .ib-when.over { color: var(--red); }
  .ib-imp { display: grid; place-items: center; width: 24px; height: 24px; color: transparent; }
  .ib-imp .ib-i { width: 18px; height: 18px; fill: currentColor; stroke: none; }
  .ib-imp.b-wt { color: #017D8A; } .ib-imp.b-c2u { color: #8C2236; } .ib-imp.b-ed { color: #E37400; }
  .ib-imp:not([class*="b-"]) .ib-i { fill: none; stroke: var(--gm-muted); stroke-width: 1.4; }
  .ib-star { color: var(--gm-muted); }
  .ib-star.on { color: var(--gm-yellow); }
  .ib-achips { grid-column: 5 / 8; display: flex; gap: 8px; padding: 0 0 8px; min-width: 0; }
  .ib-row:has(.ib-achips) { align-items: start; padding-top: 0; }
  .ib-row:has(.ib-achips) > .ib-cb, .ib-row:has(.ib-achips) > .ib-star, .ib-row:has(.ib-achips) > .ib-imp { align-self: start; margin-top: 6px; }
  .ib-row:has(.ib-achips) > .ib-cb { margin-top: 0; }
  .ib-row:has(.ib-achips) > .ib-from, .ib-row:has(.ib-achips) > .ib-tags { align-self: start; height: 40px; }
  .ib-row:has(.ib-achips) > .ib-line, .ib-row:has(.ib-achips) > .ib-when { align-self: start; line-height: 40px; }
  .ib-row:has(.ib-achips) .ib-hover { top: 20px; }
  .ib-achip { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; height: 32px; padding: 0 12px 0 8px; border: 1px solid #DADCE0; border-radius: 16px;
    background: var(--gm-unread); font: 500 14px var(--font); color: var(--gm-ink2); }
  .ib-achip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ib-aic { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 3px; font: 700 7px/1 var(--font); font-style: normal; color: #FFFFFF; background: #D93025; }
  .ib-aic.img { background: #D93025; box-shadow: inset 0 -6px 0 rgba(255, 255, 255, 0.35); }
}
@media (max-width: 720px) { .ib-imp, .ib-achips { display: none; } }

/* Hover actions, like Gmail's archive / snooze icons over the time */
.ib-hover .ib-ico { color: var(--gm-ink2); }
.ib-hover .ib-ico:hover { background: var(--gm-hover); color: var(--gm-ink); }

/* The open email: Gmail's large subject, round avatar, outlined pill buttons */
.ib-xhead h2 { font: 400 22px var(--font); color: var(--gm-ink); }
.ib-msg { border-bottom-color: var(--gm-line); }
.ib-mhead b { color: var(--gm-ink); font-weight: 700; }
.ib-msg.out .ib-mhead b, .ib-mcol.out b { color: var(--gm-ink); }
.ib-mhead time { font: 400 12px var(--font); color: var(--gm-ink2); }
.ib-mail { font: 400 14px/1.5 var(--font); color: var(--gm-ink); }
.ib-msgs { border-top-color: var(--gm-line); }
.ib .ib-rbtn, .ib .ib-rbtn.main, .ib .ib-rlink { min-height: 36px; padding: 0 20px 0 14px; border: 1px solid var(--gm-outline); border-radius: 18px; background: var(--gm-unread);
  color: var(--gm-ink2); font: 500 14px var(--font); }
.ib .ib-rbtn:hover, .ib .ib-rbtn.main:hover, .ib .ib-rlink:hover { background: var(--gm-hover); color: var(--gm-ink); }
.ib .ib-rbtn .ib-i, .ib .ib-rlink .ib-i { stroke: currentColor; }
.ib-att { border-color: #DADCE0; border-radius: 16px; }
.ib-ownerline, .ib-mto, .ib-addr1 { color: var(--gm-muted); }

/* The new-email window: Gmail's pale header */
.ib-dockh { background: #F2F6FC; color: var(--gm-ink); font: 500 14px var(--font); }
.ib-dockh .ib-ico { color: var(--gm-ink2); }
.ib-dockh .ib-ico:hover { background: var(--gm-hover); }
.ib-sendb { background: var(--gm-blue); border-color: var(--gm-blue); color: #FFFFFF; font: 500 14px var(--font); }
.ib-sendb:hover { background: #0842A0; border-color: #0842A0; }
/* Send + done: the quiet twin of Send, outlined in the same green */
.btn.ib-sendb.ib-senddone { background: #FFFFFF; border-color: var(--green-700); color: var(--green-700); font-weight: 600; }
.btn.ib-sendb.ib-senddone:hover { background: var(--green-100); border-color: var(--green-hover); color: var(--green-900); }

/* Phones keep Gmail's app layout from above, on the Gmail palette */
@media (max-width: 720px) {
  .ib .ib-list > .ib-row { background: var(--gm-unread); border-bottom: 0; }
  .ib .ib-list > .ib-row:nth-child(even) { background: var(--gm-unread); }
  .ib .ib-list > .ib-row.chk, .ib .ib-list > .ib-row.sel { background: var(--gm-sel); }
  .ib-rh { display: none; }
  .ib-ri.on { border-color: var(--gm-pill); }
  .ib .ib-compose { position: fixed; right: 16px; bottom: 16px; min-height: 56px; box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15); }
}

/* Brand identifiers on each row: the round badge before the sender, and a Gmail-style label chip before the subject */
.ib-from { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ib-from .ib-fbadge { width: 22px; height: 22px; }
.ib-lchip { display: inline-flex; align-items: center; flex: none; height: 20px; padding: 0 8px; margin-right: 8px; border-radius: 4px; font-size: 12px; font-weight: 500; line-height: 20px; color: #FFFFFF; vertical-align: middle; white-space: nowrap; }
.ib-lchip.b-wt { background: #017D8A; }
.ib-lchip.b-c2u { background: #8C2236; }
.ib-lchip.b-ed { background: #B85E00; }
@media (max-width: 720px) { .ib-lchip { display: none; } }

/* Attachment viewer: dark overlay like Gmail's, file name bar on top, the file in the middle */
.ib-viewer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgba(20, 20, 20, 0.88); }
.ib-vbar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px; color: #FFFFFF; flex: none; }
.ib-vname { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-vn { font-size: 13px; color: #C8C8C8; }
.ib-vbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #FFFFFF; cursor: pointer; }
.ib-vbtn:hover, .ib-vbtn:focus-visible { background: rgba(255, 255, 255, 0.14); }
.ib-vbtn[data-v="prev"] .ib-i { transform: rotate(90deg); }
.ib-vbtn[data-v="next"] .ib-i { transform: rotate(-90deg); }
.ib-vbtn[hidden] { display: none; }
.ib-vbody { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 24px 24px; }
.ib-vimg { max-width: 100%; max-height: 100%; object-fit: contain; background: #FFFFFF; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4); }
.ib-vpdf { width: min(1000px, 100%); height: 100%; border: 0; background: #FFFFFF; }
.ib-vtext { width: min(1000px, 100%); height: 100%; margin: 0; padding: 20px; overflow: auto; background: #FFFFFF; color: #222222; font-size: 13px; white-space: pre-wrap; }
.ib-vmsg { color: #FFFFFF; text-align: center; font-size: 15px; line-height: 1.8; }
@media (max-width: 720px) { .ib-vbody { padding: 0 0 8px; } .ib-vbar .btn { display: none; } }

/* Attachments as cards (like Gmail): a big file-type tile, the name on two lines, and View / Download */
.ib-attshead { margin: 14px 0 8px; font-size: 13px; font-weight: 600; color: var(--grey-ink); }
.ib-atts { gap: 12px; }
.ib-attcard { display: flex; flex-direction: column; width: 220px; max-width: 100%; border: 1px solid #DADCE0; border-radius: 12px; background: var(--surface); overflow: hidden; }
.ib-attcard:hover { border-color: #B9BDC2; box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15); }
.ib-attcard .ib-att { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 10px 12px; border: 0; border-radius: 0; background: transparent; text-align: left; cursor: pointer; }
.ib-attcard .ib-att:hover { background: var(--ground); }
.ib-attcard .ib-attic { width: 40px; height: 40px; border-radius: 8px; font-size: 10px; }
.ib-attic.t-pdf { background: #FDE7E7; color: #B42318; }
.ib-attic.t-sheet { background: #E3F3E8; color: #146C2E; }
.ib-attic.t-doc { background: #E3ECFB; color: #1A56C4; }
.ib-attic.t-img { background: #F3E8FB; color: #7A2DB5; }
.ib-attmeta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ib-attcard .ib-attn { max-width: none; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.ib-attmeta small { font-size: 12px; color: var(--muted); }
.ib-attacts { display: flex; border-top: 1px solid #ECEDEF; }
.ib-attb { flex: 1 1 0; min-height: 38px; border: 0; background: transparent; font: 600 13px var(--font); color: var(--green-700); cursor: pointer; }
.ib-attb + .ib-attb { border-left: 1px solid #ECEDEF; }
.ib-attb:hover { background: var(--green-100); }
.ib-attb:focus-visible, .ib-attcard .ib-att:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
@media (max-width: 560px) { .ib-attcard { width: 100%; } }
@media (pointer: coarse) { .ib-attb { min-height: 44px; } }

/* Spreadsheet preview in the viewer */
.ib-vsheet { display: flex; flex-direction: column; width: min(1200px, 100%); height: 100%; background: #FFFFFF; }
.ib-vtabs { display: flex; gap: 2px; padding: 6px 8px 0; background: #F1F3F4; overflow-x: auto; flex: none; }
.ib-vtabs button { border: 0; padding: 8px 14px; background: transparent; font: 500 13px var(--font); color: #3C4043; cursor: pointer; border-radius: 6px 6px 0 0; white-space: nowrap; }
.ib-vtabs button[aria-selected="true"] { background: #FFFFFF; color: #146C2E; font-weight: 700; }
.ib-vgrid { flex: 1; min-height: 0; overflow: auto; }
.ib-vgrid table { width: auto; border-collapse: collapse; font-size: 12px; }
.ib-vgrid td { padding: 4px 8px; border: 1px solid #E2E3E5; color: #202124; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.ib-vgrid tr:first-child td { background: #F8F9FA; font-weight: 600; }
.ib-vgrid .ib-vmsg { color: #202124; padding: 24px; }

/* A received email with its sender's own layout (fillBody: .ib-css). The app's table, th and td look is undone so the
   email shows as it does in Gmail (browser defaults plus the sender's inline styles). */
.ib-mail.ib-css { line-height: normal; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #222; }
.ib-mail.ib-css table { border-collapse: separate; border-spacing: 2px; width: auto; max-width: none; font-size: inherit; table-layout: auto; }
.ib-mail.ib-css td, .ib-mail.ib-css th { padding: 1px; border: 0; height: auto; background: none; white-space: normal; vertical-align: inherit;
  color: inherit; font-size: inherit; line-height: inherit; }
.ib-mail.ib-css th { font-weight: 700; text-align: center; }
.ib-mail.ib-css p { margin: 1em 0; }
.ib-mail.ib-css p:empty, .ib-mail.ib-css div:empty { display: block; }
.ib-mail.ib-css hr { border: 0; border-top: 1px solid #ccc; margin: 8px 0; }
.ib-mail.ib-css img { height: auto; }
/* Gmail's "replied" arrow before the sender, when our reply is the last email on the item */
.ib-replied { display: inline-flex; align-items: center; color: var(--muted); margin-right: 4px; flex: none; }
.ib-replied svg { width: 15px; height: 15px; }
/* Forward to (Cameron, Chelsea, Kevin): drop targets only */
.ib-rfwd .ib-rfi { margin-left: auto; color: var(--muted); display: inline-flex; }
.ib-rfwd .ib-rfi svg { width: 13px; height: 13px; }
.ib-rfwd.drop { outline: 2px solid var(--accent, #1a73e8); outline-offset: -2px; }

/* Files dragged in from the computer: the email being written shows where they'll land */
.ib-comp { position: relative; }
.ib-comp.ib-filedrop::after { content: "Drop to attach"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(231, 242, 236, 0.92); border: 2px dashed var(--green-700); border-radius: inherit; color: var(--green-900);
  font-weight: 700; font-size: 16px; z-index: 5; pointer-events: none; }

/* Sending: a small, quiet pill bottom left. The ring fills over the 5 second wait; the X inside cancels (Finn, 20 Oct 2026) */
.ib-sendbar { left: 16px; bottom: 16px; right: auto; gap: 8px; flex-wrap: nowrap; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: rgba(31, 31, 31, 0.86); font-size: 13px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); max-width: min(360px, calc(100vw - 32px)); }
.ib-sendbar #ibsendtext { flex: 1 1 auto; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255, 255, 255, 0.92); }
.ib-ring { position: relative; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #FFFFFF; cursor: pointer; }
.ib-ring svg { position: absolute; inset: 0; width: 32px; height: 32px; transform: rotate(-90deg); }
.ib-ring circle { fill: none; stroke-width: 3; }
.ib-ring .trk { stroke: rgba(255, 255, 255, 0.18); }
.ib-ring .arc { stroke: #A9DDBF; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; animation: ib-ring-fill var(--ib-send-s, 5s) linear forwards; }
.ib-ring span { position: relative; font-size: 18px; line-height: 32px; opacity: 0.85; }
.ib-ring:hover span, .ib-ring:focus-visible span { opacity: 1; }
.ib-ring:hover .trk { stroke: rgba(255, 255, 255, 0.3); }
.ib-ring:focus-visible { outline: 2px solid #A9DDBF; outline-offset: 2px; }
.ib-sendnow { flex: none; border: 0; background: transparent; color: rgba(255, 255, 255, 0.6); font: 600 12px var(--font); cursor: pointer; padding: 4px 2px; }
.ib-sendnow:hover { color: #FFFFFF; text-decoration: underline; }
@keyframes ib-ring-fill { to { stroke-dashoffset: 0; } }
/* Gone to Gmail: the ring spins until it's sent */
.ib-sendbar.busy .arc { animation: ib-ring-spin 0.9s linear infinite; stroke-dashoffset: 70; }
.ib-sendbar.busy .ib-ring span, .ib-sendbar.busy .ib-sendnow { display: none; }
@keyframes ib-ring-spin { to { transform: rotate(360deg); transform-origin: 18px 18px; } }
.ib-sendbar.busy svg { animation: ib-ring-spin 0.9s linear infinite; }
.ib-sendbar.busy .arc { animation: none; }
@media (prefers-reduced-motion: reduce) { .ib-ring .arc { animation-duration: 0.01s; } .ib-sendbar.busy svg { animation: none; } }
@media (max-width: 720px) { .ib-sendbar { left: 12px; bottom: 12px; right: auto; } }

/* Karen's K in the composer: one press rewrites what's typed, in place */
.ib-kbtn { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #BCD6C6; border-radius: 50%; background: var(--surface); cursor: pointer; }
.ib-kbtn:hover { background: var(--green-100); }
.ib-kbtn:focus-visible { outline: 2px solid var(--green-700, #2f6b4a); outline-offset: 2px; }
.ib-kbtn:disabled { cursor: default; }
.ib-kmark { display: block; width: 22px; height: 22px; }
.ib-kmark > b { display: grid; place-items: center; width: 100%; height: 100%; font-size: 16px; font-weight: 800; color: var(--green-900); }
.ib-kbtn.busy { border-color: var(--green-700, #2f6b4a); }
#ibbody.ib-rewriting { opacity: 0.55; transition: opacity 0.2s; }
.ib-tidy { padding: 8px 12px; }
.ib-tidybar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.ib-tidybar .link { font-size: 13px; }
.ib-tidyok { font-weight: 600; color: var(--green-900); }
.ib-tidysep { width: 1px; height: 16px; background: var(--line); }
.ib-tchip { min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; }
.ib-tchip:hover { background: var(--green-100); }
.ib-tidy .ib-tidyst:first-child, .ib-tidy .ib-tidynotes:first-child { margin-top: 0; }
.ib-tidy .ib-tidynotes + .ib-tidybar, .ib-tidy .ib-tidyst + .ib-tidybar { margin-top: 8px; }
.ib-tidybar .ib-taccept { min-height: 28px; padding: 0 14px; font-size: 13px; }
.ib-comp #ibbody.ib-suggested { background: var(--green-100); border-radius: 8px; padding-left: 10px; padding-right: 10px; }

/* Links made from job numbers and phone numbers in an email */
.ib-mail a.ib-joblink, .ib-mail a.ib-tellink { color: var(--green-900); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.ib-mail a.ib-joblink:hover, .ib-mail a.ib-tellink:hover { text-decoration-style: solid; }

/* Who else is on this email */
.ib-pres { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--grey-ink); background: var(--surface-2, #f4f6f5); }
.ib-pres[hidden] { display: none; }
.ib-pres.warn { background: #FFF4E0; color: #6B4500; }
.ib-presf { display: inline-flex; }
.ib-presf > * + * { margin-left: -6px; }
.ib-presnote { margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; background: #FFF4E0; color: #6B4500; }
.ib-presnote[hidden] { display: none; }

/* All clear */
.ib-cheerk { display: block; width: 72px; height: 72px; margin: 0 auto 6px; }
/* Search results: where each one is now */
.ib-sres { flex: none; padding: 1px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; background: var(--surface-2, #eef1ef); color: var(--grey-ink); }
.ib-sres.done { color: var(--muted); }
/* The message box is a rich editor: its placeholder, and the B I U buttons */
.ib-comp #ibbody.short { min-height: 120px; }
.ib-comp #ibbody.empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.ib-comp #ibbody:focus-visible { outline: none; }
.ib-fmt { display: inline-flex; gap: 0; margin-right: 4px; padding-right: 4px; border-right: 1px solid var(--line); }
.ib-fmt .ib-ico b, .ib-fmt .ib-ico i, .ib-fmt .ib-ico u { font: 15px/1 Georgia, "Times New Roman", serif; }
.ib-fmt .ib-ico b { font-weight: 700; }

/* ---------- Phones: an app-style Inbox (Finn, 21 Oct 2026) ----------
   A tab bar along the bottom (Mine, Unassigned, Search, Compose); inside an email, a thumb-height bar with Reply,
   Done, Snooze and Hand to. Room is left for the iPhone's home bar. */
.ib-tabbar, .ib-readbar { display: none; }
@media (max-width: 720px) {
  .ib-tabbar, .ib-readbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(22, 35, 29, 0.06); }
  .ib-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px;
    border: 0; border-radius: 12px; background: transparent; color: var(--grey-ink); font: 600 12px var(--font); cursor: pointer; }
  .ib-tab .ib-i { width: 22px; height: 22px; }
  .ib-tab.on { color: var(--green-900); background: var(--green-100); }
  .ib-tabc { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--green-700, #2f6b4a); color: #FFFFFF;
    font: 700 11px/18px var(--font); text-align: center; }
  .ib-tabc:empty { display: none; }
  .ib-tabnew { color: var(--green-900); }
  .ib-tabnew .ib-i { width: 24px; height: 24px; }
  /* The floating Compose button gives way to the tab bar */
  .ib-compose { display: none !important; }
  .ib.view-in { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* Reading an email: the read bar instead of the tabs */
  .ib-readbar { display: none; }
  body:has(.ib-shell.reading) .ib-tabbar { display: none; }
  body:has(.ib-shell.reading) .ib-readbar { display: grid; }
  body:has(.ib-dock:not([hidden])) .ib-tabbar, body:has(.ib-dock:not([hidden])) .ib-readbar { display: none; }
  .ib-sendbar { bottom: calc(80px + env(safe-area-inset-bottom)); }
  /* A slimmer top bar on the Inbox, so more of the list shows */
  body:has(#v-inbox:not([hidden])) .side { padding-top: calc(6px + env(safe-area-inset-top)); padding-bottom: 6px; }
  body:has(#v-inbox:not([hidden])) .brand .mark { width: 28px; height: 28px; }
  body:has(#v-inbox:not([hidden])) .menubtn { height: 38px; padding: 0 12px; }
}
@media (max-width: 720px) { body:has(#v-inbox:not([hidden])) .brand .company { display: none; } }
@media (max-width: 720px) {
  /* Writing a reply: the bars step aside so Send is never covered */
  body:has(.ib-comp) .ib-readbar, body:has(.ib-comp) .ib-tabbar { display: none !important; }
  /* Pop-ups (snooze, hand to, waiting) come up from the bottom, like a phone's own sheets */
  .ib-pop { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto; max-width: none; max-height: 82vh;
    border-radius: 18px 18px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(22, 35, 29, 0.25); }
}
