/* Ops Desk: calm, warm, friendly-but-polished (think Headspace). The team's mascots carry the personality;
   everything else stays soft and quiet. Every colour that differs between Yuzu and Scribeless is a registered
   custom property, so switching glides, and the switch itself runs a circular View Transition (Arc-style). */

@font-face { font-family: "Figtree"; src: url("vendor/figtree-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

@property --brand      { syntax: "<color>"; inherits: true; initial-value: #F5C518; }
@property --brand-deep { syntax: "<color>"; inherits: true; initial-value: #8A6A00; }
@property --on-brand   { syntax: "<color>"; inherits: true; initial-value: #2B2410; }
@property --wash       { syntax: "<color>"; inherits: true; initial-value: #FFF6D6; }
@property --wash-2     { syntax: "<color>"; inherits: true; initial-value: #FFFBEE; }
@property --bg         { syntax: "<color>"; inherits: true; initial-value: #FBF8F2; }
@property --ink        { syntax: "<color>"; inherits: true; initial-value: #2C2A26; }
@property --glow       { syntax: "<color>"; inherits: true; initial-value: rgba(245, 197, 24, .22); }

:root {
  --surface: #FFFFFF; --muted: #77736B; --faint: #A6A198; --hair: rgba(60, 50, 30, .08);
  --shadow: 0 0 0 1px var(--hair);
  --shadow-lift: 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent);
  --overlay-shadow: 0 24px 60px rgba(40, 30, 10, .12);
  --urgent: #D9534F; --high: #E0822F; --medium: #6C7BD9; --ok: #3E9D72; --wait: #A2659E;
  --r-lg: 22px; --r: 16px; --r-sm: 12px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --font: "Figtree", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --sidebar: 260px;
  color-scheme: light;
}
html[data-biz="yuzu"] {
  --brand: #F5C518; --brand-deep: #8A6A00; --on-brand: #2B2410; --wash: #FFF4CF; --wash-2: #FFFBEE;
  --bg: #FBF8F2; --ink: #2C2A26; --glow: rgba(245, 197, 24, .22);
}
html[data-biz="scribeless"] {
  --brand: #3D63F2; --brand-deep: #2341B8; --on-brand: #FFFFFF; --wash: #E9EEFF; --wash-2: #F5F7FF;
  --bg: #F6F7FB; --ink: #23263A; --glow: rgba(61, 99, 242, .16);
}
/* Dark mode: data-theme is set before first paint from the toggle (System / Light / Dark, per device). */
html[data-theme="dark"] { --surface: #1C1B19; --muted: #A9A49B; --faint: #77736C; --hair: rgba(255, 245, 225, .08);
        --overlay-shadow: 0 24px 60px rgba(0,0,0,.5); color-scheme: dark; }
html[data-theme="dark"][data-biz="yuzu"] { --bg: #141311; --ink: #EFEAE0; --wash: #2C2610; --wash-2: #1A1813; --brand-deep: #F5C518; }
html[data-theme="dark"][data-biz="scribeless"] { --bg: #111320; --ink: #E7E9F4; --wash: #1A2148; --wash-2: #151830; --brand-deep: #8EA6FF; --surface: #191B2B; }
html {
  transition: --brand .8s var(--ease), --brand-deep .8s var(--ease), --on-brand .8s var(--ease), --wash .8s var(--ease),
              --wash-2 .8s var(--ease), --bg .8s var(--ease), --ink .8s var(--ease), --glow .8s var(--ease);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; font: 400 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
               background: radial-gradient(900px 380px at 85% -160px, color-mix(in srgb, var(--glow) 55%, transparent), transparent 70%); }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: biz-reveal .8s var(--ease) both; }
@keyframes biz-reveal { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); } to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); } }

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px 18px; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; }
.main { min-width: 0; padding: 22px 32px 90px; }
/* Pages sit in a centred column; the board uses the whole width. */
/* Every page uses the full width of the window (Mansehej, 26 Oct); lists that read better narrow set their own width */
.main > .topbar, .main > .filters, .main > .view, .main > .updated { width: 100%; max-width: none; margin-inline: auto; }

.logo { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 650; letter-spacing: -.015em; padding: 0 6px; }
.logo-dot { width: 26px; height: 26px; border-radius: 50%; flex: none; position: relative;
            background: var(--brand); }
.logo-dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); opacity: .9;
                   transform: translate(5px, -5px) scale(.55); transition: transform .8s var(--ease); }
html[data-biz="scribeless"] .logo-dot::after { transform: translate(-4px, 4px) scale(.42); }
.logo.big { justify-content: center; font-size: 26px; } .logo.big .logo-dot { width: 34px; height: 34px; }

/* Business switch */
.biz-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px;
              background: color-mix(in srgb, var(--ink) 6%, transparent); isolation: isolate; }
.biz-switch button { position: relative; z-index: 1; border: 0; background: none; padding: 8px 10px; border-radius: 999px;
                     font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: color .5s var(--ease); }
.biz-pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
            background: var(--brand); transition: transform .65s var(--ease); }
html[data-biz="scribeless"] .biz-pill { transform: translateX(100%); }
html[data-biz="yuzu"] .biz-switch [data-set-biz="yuzu"],
html[data-biz="scribeless"] .biz-switch [data-set-biz="scribeless"] { color: var(--on-brand); }
.biz-switch.small button { padding: 6px 10px; font-size: 13px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; text-decoration: none;
         color: var(--muted); font-weight: 500; transition: background .25s, color .25s; }
.nav a:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
.nav a.active { background: var(--wash); color: var(--ink); font-weight: 600; }
.nav a.active svg { color: var(--brand-deep); }
.count { margin-left: auto; min-width: 20px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; text-align: center; line-height: 20px;
         background: var(--wash); color: var(--brand-deep); }
.count:empty { display: none; }

.team-title { font-size: 12px; color: var(--faint); margin: 0 12px 8px; font-weight: 600; }
.team-list { display: flex; flex-direction: column; gap: 1px; }
.mate { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 12px; cursor: pointer; color: var(--muted);
        font-size: 14px; border: 0; background: none; text-align: left; transition: background .2s, color .2s; }
.mate:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
.mate.on { background: var(--wash); color: var(--ink); }
.mate .n { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bk { margin-top: auto; font-size: 12px; color: var(--faint); padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
.bk.bad { color: var(--urgent); background: color-mix(in srgb, var(--urgent) 10%, var(--bg)); border-radius: 10px; padding: 8px 10px;
  position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 16px var(--bg); }  /* stays in view however long the team list is */
.bk.bad span { color: var(--ink); opacity: .8; overflow-wrap: anywhere; }
.bk:not([hidden]) + .me { margin-top: 0; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 8px 10px; }
.me a { margin-left: auto; color: var(--faint); font-size: 12px; text-decoration: none; }
.me a:hover { color: var(--ink); }

/* Mascots: soft round frames */
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; background: var(--wash);
          box-shadow: 0 0 0 2px var(--surface); }
.mate .avatar { width: 26px; height: 26px; }
.avatar.lg { width: 48px; height: 48px; }
.avatar.human { display: grid; place-items: center; font-size: 12px; font-weight: 650; background: var(--ink); color: var(--bg); }

/* ---------------------------------------------------------------- top bar, search, filters */
.topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5; padding: 6px 0 12px;
          background: linear-gradient(var(--bg) 75%, transparent); }
.mobile-brand, .mobile-switch { display: none; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 46px; border-radius: 999px;
          background: var(--surface); box-shadow: var(--shadow); transition: box-shadow .3s var(--ease); }
.search:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.search svg { color: var(--faint); }
.search input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--faint); }
         padding: 6px 12px; white-space: nowrap; transition: opacity .2s; }
.need.why { color: var(--ink); opacity: .8; }
kbd { font: 500 11.5px var(--font); color: var(--faint); background: color-mix(in srgb, var(--ink) 5%, transparent); border-radius: 6px; padding: 2px 7px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
        background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--muted); cursor: pointer; white-space: nowrap; border: 0;
        transition: background .2s, color .2s; }
.chip:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.chip.on { background: var(--ink); color: var(--bg); }
.chip select { max-width: 150px; text-overflow: ellipsis; border: 0; background: none; font: inherit; color: inherit; outline: 0; cursor: pointer; padding: 0 14px 0 0; appearance: none; -webkit-appearance: none;
               background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
               background-position: right 4px center, right 0 center; background-size: 4px 4px; background-repeat: no-repeat; }
.chip.clear { background: none; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- headings */
.greet { margin: 18px 0 4px; }
.greet h1 { margin: 0; font-size: 30px; font-weight: 650; letter-spacing: -.025em; line-height: 1.15; }
.greet p { margin: 6px 0 0; color: var(--muted); font-size: 15.5px; }
.greet p b { color: var(--ink); font-weight: 600; }
.h { display: flex; align-items: baseline; gap: 10px; margin: 34px 0 12px; }
.h h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.h .sub { color: var(--faint); font-size: 13.5px; }

/* Summary tiles */
.hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 0; }
.stat { padding: 16px 18px 15px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); cursor: pointer;
        transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.stat:hover { box-shadow: var(--shadow-lift); }
.stat .v { font-size: 28px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.stat.accent { background: var(--wash); box-shadow: none; position: relative; overflow: hidden; }
.stat.accent::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--brand); opacity: .22; }
.stat.accent .v { color: var(--brand-deep); }

/* ---------------------------------------------------------------- items */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px 14px 14px; border-radius: var(--r-lg);
        background: var(--surface); box-shadow: var(--shadow); cursor: pointer; position: relative; text-decoration: none;
        transition: transform .35s var(--ease), box-shadow .35s var(--ease); animation: rise .5s var(--ease) both; }
.item:hover { box-shadow: var(--shadow-lift); }
.item .t { font-weight: 600; font-size: 15px; line-height: 1.38; overflow-wrap: anywhere; letter-spacing: -.005em; }
.item .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.item .meta .tag { margin-right: -4px; }
.item .right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.item.needs::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* status & priority, expressed quietly */
.st { display: inline-flex; align-items: center; gap: 6px; }
.st i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; }
.st.blocked i { background: var(--wait); } .st.running i { background: var(--ok); animation: breathe 2.4s ease-in-out infinite; }
.st.done i { background: color-mix(in srgb, var(--ok) 55%, var(--faint)); } .st.ready i, .st.todo i { background: var(--medium); }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 18%, transparent); } }
.prio { font-weight: 600; } .prio.p0 { color: var(--urgent); } .prio.p1 { color: var(--high); } .prio.p2 { color: var(--medium); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; margin-right: 8px;
       background: var(--wash); color: var(--brand-deep); white-space: nowrap; }
.tag.soft { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); font-weight: 500; }
.tag.biz::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.tag.biz.yuzu::before { background: #F5C518; } .tag.biz.scribeless::before { background: #3D63F2; } .tag.biz.both::before { background: linear-gradient(90deg, #F5C518 50%, #3D63F2 50%); }
.tag.due { background: color-mix(in srgb, var(--high) 13%, transparent); color: var(--high); }
.tag.p0 { background: color-mix(in srgb, var(--urgent) 12%, transparent); color: var(--urgent); }
.tag.p1 { background: color-mix(in srgb, var(--high) 13%, transparent); color: var(--high); }
.tag.p2 { background: color-mix(in srgb, var(--medium) 13%, transparent); color: var(--medium); }
.tag.p3 { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); }
.ico { display: inline-flex; align-items: center; gap: 5px; } .ico svg { width: 14px; height: 14px; }

.empty { padding: 30px 24px; text-align: center; color: var(--faint); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.empty b { display: block; color: var(--muted); font-size: 15px; font-weight: 600; margin-bottom: 2px; }

/* ---------------------------------------------------------------- board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding: 6px 2px 14px; scroll-snap-type: x mandatory; margin-top: 10px; }
.col { scroll-snap-align: start; border-radius: 26px; padding: 14px 12px; min-height: 220px; display: flex; flex-direction: column; gap: 10px;
       background: color-mix(in srgb, var(--surface) 45%, transparent); }
.col h3 { margin: 2px 8px 6px; font-size: 14px; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.col h3 .n { color: var(--faint); font-weight: 500; }
.col .item, .today-rail .item { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; gap: 10px; }
.col .item .storychip { max-width: 100%; }
.col .item > .avatar, .today-rail .item > .avatar { display: none; }
.col .item .right, .today-rail .item .right { flex-direction: row; justify-content: space-between; align-items: center; color: var(--muted); }
.col .item .right .who, .today-rail .item .right .who { display: flex; align-items: center; gap: 8px; }
.col .item .right .avatar, .today-rail .item .right .avatar { width: 24px; height: 24px; }
@media (min-width: 861px) {
  /* Board: columns fill the screen height and scroll on their own, like a real kanban board. */
  .main[data-view="board"] { padding-bottom: 20px; }
  .main[data-view="board"] .board { height: calc(100dvh - 158px); min-height: 440px; align-items: stretch; margin-top: 4px; }
  .main[data-view="board"] .col { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .main[data-view="board"] .updated { margin-top: 10px; }
}
/* Today: what needs people on the left; what the team is doing, snoozed and done in a rail on wide screens. */
.today { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 36px; }
.today-rail .h h2 { display: flex; align-items: center; gap: 7px; }
.today-rail .h h2 svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (min-width: 1360px) {
  .today { grid-template-columns: minmax(0, 1fr) 340px; }
  .today-top { grid-column: 1 / -1; }
  .today-rail { position: sticky; top: 84px; align-self: start; max-height: calc(100dvh - 100px); overflow-y: auto;
                padding: 0 4px 20px; margin-top: 0; scrollbar-width: thin; }
  .today-rail .item .need { display: none; }
}

/* ---------------------------------------------------------------- accounts */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 12px; }
.tile { padding: 18px 16px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); cursor: pointer;
        display: flex; flex-direction: column; gap: 10px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); animation: rise .5s var(--ease) both; }
.tile:hover { box-shadow: var(--shadow-lift); }
.tile .name { font-weight: 650; font-size: 16px; letter-spacing: -.01em; display: flex; align-items: flex-start; gap: 10px; }
.tile .snap { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile .nums { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.tile .nums .tag { margin: 0; }

.acct-head { display: flex; align-items: center; gap: 16px; margin: 14px 0 0; }
.acct-head h1 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -.025em; }
.acct-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; margin-top: 8px; }
.back:hover { color: var(--ink); }
.prose { font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
.prose p { margin: 0 0 10px; } .prose p:last-child { margin-bottom: 0; } .prose ul, .prose ol { padding-left: 20px; margin: 6px 0 10px; }
.prose strong { font-weight: 650; } .prose a { color: var(--brand-deep); }
.prose table { border-collapse: collapse; width: 100%; font-size: 13px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--hair); padding: 7px 10px; text-align: left; vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }
.prose code { background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
.prose pre { background: color-mix(in srgb, var(--ink) 5%, transparent); padding: 12px 14px; border-radius: 14px; overflow-x: auto; }
.prose blockquote { margin: 0; padding: 2px 14px; border-left: 3px solid var(--brand); color: var(--muted); }
.prose h1, .prose h2, .prose h3 { font-size: 15px; margin: 14px 0 6px; font-weight: 650; }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.loop { padding: 14px 18px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); font-size: 14px; }
.loop .lt { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; color: var(--muted); }
.loop.needs .lt { color: var(--brand-deep); }
.loop.closed { opacity: .5; box-shadow: none; }

/* ---------------------------------------------------------------- drafts */
.draft .snip { color: var(--muted); font-size: 13.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mb-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--wash); color: var(--brand-deep); flex: none; }
.mb-ico svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- drawer */
.scrim { position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 22%, transparent); opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 30; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 31; top: 14px; right: 14px; bottom: 14px; width: min(600px, calc(100vw - 28px));
          background: var(--surface); border-radius: 28px; box-shadow: var(--overlay-shadow);
          transform: translateX(calc(100% + 30px)); transition: transform .55s var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.drawer.on { transform: none; }
.drawer-grip { display: none; }
.d-head { position: sticky; top: 0; z-index: 2; padding: 22px 24px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent);
          backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.d-head h2 { margin: 12px 0 0; font-size: 21px; font-weight: 650; line-height: 1.3; letter-spacing: -.015em; }
.d-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.d-top .tag { margin: 0; }
.d-close { margin-left: auto; border: 0; background: color-mix(in srgb, var(--ink) 6%, transparent); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.d-close:hover { color: var(--ink); }
.d-close svg { width: 16px; height: 16px; }
.d-body { padding: 4px 24px 30px; display: flex; flex-direction: column; gap: 20px; }
.d-owner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--wash-2); }
.d-owner .nm { font-weight: 650; } .d-owner .sm { color: var(--muted); font-size: 13px; }
.props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; font-size: 14px; }
.props div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .props .k { color: var(--faint); font-size: 12.5px; }
.props a { color: var(--brand-deep); text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
       border: 0; background: color-mix(in srgb, var(--ink) 6%, transparent); cursor: pointer; text-decoration: none; transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.btn:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(.97); }
.btn.wide { width: 100%; padding: 14px; }
.btn svg { width: 16px; height: 16px; }
.section-label { font-size: 13px; color: var(--faint); font-weight: 600; margin-bottom: 8px; }
.timeline { display: flex; flex-direction: column; gap: 16px; }
.cmt { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.cmt .who { font-weight: 600; font-size: 13.5px; } .cmt .when { color: var(--faint); font-weight: 400; margin-left: 8px; }
.cmt .prose { font-size: 14px; margin-top: 2px; }
.composer { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.composer textarea { width: 100%; min-height: 76px; resize: vertical; border-radius: 12px; border: 0; padding: 4px; font: inherit; background: none; color: var(--ink); outline: 0; }
.composer textarea::placeholder { color: var(--faint); }
.composer .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.composer select { border-radius: 999px; border: 0; padding: 9px 14px; font: inherit; font-size: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--hair); }
.prio-pick { position: relative; cursor: pointer; }
.prio-pick select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }

.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px;
          width: max-content; max-width: min(560px, calc(100vw - 24px)); pointer-events: none; }
.tst { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--ink); color: var(--bg);
       font-weight: 500; font-size: 14px; line-height: 1.35; box-shadow: var(--overlay-shadow); pointer-events: auto;
       opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .3s var(--ease), transform .35s var(--ease); }
.tst.on { opacity: 1; transform: none; }
.tst.out { opacity: 0; transform: translateY(6px) scale(.98); }
.tst-m { flex: 1; min-width: 0; padding: 4px 0; }
.tst-i { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; color: #fff; }
.tst-i svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tst.ok .tst-i { background: var(--ok); } .tst.err .tst-i { background: var(--urgent); }
.tst-a { flex: none; border: 0; border-radius: 12px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer;
         background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); }
.tst-a:hover { background: color-mix(in srgb, var(--bg) 26%, transparent); }
.tst-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: none; color: inherit; opacity: .55; }
.tst-x:hover { opacity: 1; background: color-mix(in srgb, var(--bg) 14%, transparent); }
.tst-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.updated { color: var(--faint); font-size: 12.5px; margin-top: 36px; text-align: center; }
.tabbar { display: none; }
.skel { height: 72px; border-radius: var(--r-lg); background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 60%, transparent), var(--surface), color-mix(in srgb, var(--surface) 60%, transparent));
        background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- login */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card { width: min(400px, 100%); padding: 40px 30px 30px; border-radius: 30px; background: var(--surface); box-shadow: var(--shadow);
              text-align: center; display: flex; flex-direction: column; gap: 18px; }
.login-sub { color: var(--muted); margin: 0; font-size: 15px; } .login-note { color: var(--faint); font-size: 13px; margin: 0; }
.login-card .btn.primary { background: var(--ink); color: var(--bg); box-shadow: none; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 8px 16px calc(100px + env(safe-area-inset-bottom)); }
  .topbar { flex-wrap: wrap; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 650; flex: 1; letter-spacing: -.015em; }
  .mobile-brand .logo-dot { width: 22px; height: 22px; }
  .mobile-brand .logo-dot::after { inset: 6px; }
  .mobile-switch { display: block; width: 184px; }
  .search { order: 3; flex-basis: 100%; height: 44px; }
  .search kbd { display: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 2px; padding: 0 16px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .greet h1 { font-size: 25px; } .greet p { font-size: 14.5px; }
  .hero { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
  .stat { padding: 14px 16px; } .stat .v { font-size: 24px; }
  .h { margin-top: 28px; }
  .item { grid-template-columns: auto 1fr; padding: 14px; gap: 12px; align-items: start; }
  .item .avatar { width: 34px; height: 34px; margin-top: 1px; }
  .item .right { display: none; }
  .when-m { display: inline !important; }
  .board { grid-auto-columns: 86%; margin: 6px -16px 0; padding: 6px 16px 14px; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 90vh; border-radius: 28px 28px 0 0;
            transform: translateY(105%); padding-bottom: env(safe-area-inset-bottom); }
  .drawer-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 15%, transparent); margin: 10px auto 0; }
  .d-head { padding: 12px 20px 14px; } .d-body { padding: 4px 20px 30px; }
  .props { grid-template-columns: 1fr 1fr; }
  .toasts { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 76px); width: calc(100vw - 24px); }
  .tst { width: 100%; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
            z-index: 20; padding: 6px; border-radius: 26px; background: color-mix(in srgb, var(--surface) 85%, transparent);
            backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); box-shadow: 0 0 0 1px var(--hair); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 20px;
              text-decoration: none; color: var(--faint); font-size: 11px; font-weight: 600; transition: background .3s, color .3s; }
  .tabbar a.active { color: var(--ink); background: var(--wash); }
  .tabbar a.active svg { color: var(--brand-deep); }
  .tabbar .count { position: absolute; top: 3px; right: calc(50% - 22px); font-size: 10px; padding: 0 5px; min-width: 16px; line-height: 16px; background: var(--brand); color: var(--on-brand); }
}
.when-m { display: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- card context */
.need { color: var(--muted); font-size: 13.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.needbox { padding: 14px 16px; border-radius: var(--r); background: var(--wash); }
.needbox .sum-h b { color: var(--brand-deep); }
.sumbox { padding: 14px 16px; border-radius: var(--r); box-shadow: var(--shadow); }
.sum-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.sum-h .avatar { width: 26px; height: 26px; }
.when { color: var(--faint); font-size: 12.5px; font-weight: 400; margin-left: auto; }
.clamp { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.more { border: 0; background: none; color: var(--brand-deep); font-weight: 600; font-size: 13px; padding: 6px 0 0; cursor: pointer; }
.ctx { display: flex; flex-direction: column; gap: 18px; }
.ctx-sec { display: flex; flex-direction: column; gap: 10px; }
.ctx-h { display: flex; align-items: center; gap: 10px; }
.ctx-t { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14.5px; }
.ctx-t svg { width: 16px; height: 16px; color: var(--brand-deep); }
.ctx-s { color: var(--faint); font-size: 12.5px; }
.ctx-link { margin-left: auto; font-size: 12.5px; color: var(--muted); text-decoration: none; padding: 3px 10px; border-radius: 999px; box-shadow: 0 0 0 1px var(--hair); }
.ctx-link:hover { color: var(--ink); }
.ctx-title { font-weight: 600; font-size: 15px; }
.convo, .sconvo { display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 12px 14px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--hair); }
.msg.ours { background: var(--wash-2); box-shadow: none; }
.msg-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.msg-sub { color: var(--faint); font-size: 12px; margin: 2px 0 8px; overflow-wrap: anywhere; }
.msg-b { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.msg-b a, .prose a { color: var(--brand-deep); }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.ext { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); }
.smsg { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 2px 0; }
.smsg.hid { display: none; }
.smsg .prose { font-size: 14px; margin-top: 1px; }
.sconvo > .more { align-self: flex-start; padding: 0 0 4px; }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--muted); }
.att svg { width: 13px; height: 13px; }
.draftbox { padding: 14px 16px; border-radius: var(--r); background: var(--wash-2); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent); }
.fold { border-radius: var(--r); }
.fold summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); padding: 6px 2px; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform .25s var(--ease); }
.fold[open] summary::before { transform: rotate(90deg); }
.fold > .panel, .fold > .timeline { margin-top: 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; }

/* ---------- card brief (plain-English summary), reports, sticky reply bar ---------- */
#view.quiet * { animation: none !important; }
.brief { display: flex; flex-direction: column; gap: 14px; }
.brief .skel { margin: 0; }
.brief-h { display: flex; align-items: center; gap: 10px; }
.brief .label { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.drawer .skel { background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 4%, transparent), color-mix(in srgb, var(--ink) 9%, transparent), color-mix(in srgb, var(--ink) 4%, transparent));
                background-size: 200% 100%; }
.brief .ai.writing { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); cursor: default; }
.brief .ai.writing svg { width: 12px; height: 12px; fill: var(--brand); stroke: none; animation: spark 1.6s var(--ease) infinite; }
@keyframes spark { 50% { transform: scale(.7) rotate(45deg); opacity: .5; } }
.brief-load { display: flex; flex-direction: column; gap: 9px; }
.bl-line { display: block; height: 13px; border-radius: 7px; background-size: 200% 100%; animation: shimmer 1.4s infinite;
           background-image: linear-gradient(90deg, color-mix(in srgb, var(--ink) 5%, transparent), color-mix(in srgb, var(--ink) 11%, transparent), color-mix(in srgb, var(--ink) 5%, transparent)); }
.bl-note { margin: 4px 0 0; font-size: 13px; color: var(--faint); }
@media (prefers-reduced-motion: reduce) { .brief .ai.writing svg, .bl-line { animation: none; } }
.brief .ai { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 3px 9px; border-radius: 999px; box-shadow: 0 0 0 1px var(--hair); cursor: help; }
.situation { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink); }
.askbox { padding: 14px 16px 12px; border-radius: var(--r); background: var(--wash); }
.askbox .label { color: var(--brand-deep); }
.askbox ol, .donebox ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.askbox li::marker { color: var(--brand-deep); font-weight: 700; }
.donebox ul { color: var(--muted); font-size: 14.5px; }
.donebox li::marker { color: var(--ok); }
.filedoc { max-height: 520px; overflow: auto; }
.folds { display: flex; flex-direction: column; gap: 10px; }
.folds #reports { display: contents; }
.d-foot { position: sticky; bottom: 0; z-index: 2; padding: 12px 24px calc(14px + env(safe-area-inset-bottom));
          background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
          border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 10px; }
.d-foot textarea { width: 100%; min-height: 42px; max-height: 40vh; resize: none; border: 0; border-radius: 14px; padding: 11px 14px; font: inherit;
                   background: color-mix(in srgb, var(--ink) 4%, transparent); color: var(--ink); outline: 0; transition: min-height .25s var(--ease); }
.d-foot textarea:focus, .d-foot textarea:not(:placeholder-shown) { min-height: 96px; }
.d-foot textarea::placeholder { color: var(--faint); }
.d-foot .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.d-foot .btn { padding: 8px 14px; font-size: 14px; }
.d-foot select { margin-left: auto; border-radius: 999px; border: 0; padding: 8px 12px; font: inherit; font-size: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--hair); }
@media (max-width: 760px) { .d-foot { padding: 10px 20px calc(12px + env(safe-area-inset-bottom)); } .d-foot select { margin-left: 0; } }
@media (max-width: 760px) {
  .d-foot { gap: 8px; }
  .d-foot .row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .d-foot .row::-webkit-scrollbar { display: none; }
  .d-foot .btn, .d-foot select { flex: none; padding: 7px 12px; font-size: 13.5px; }
  .d-foot textarea { min-height: 40px; padding: 9px 13px; }
  .d-foot textarea:focus, .d-foot textarea:not(:placeholder-shown) { min-height: 80px; }
  .d-head h2 { font-size: 18.5px; }
}
.tag.me { background: var(--brand); color: var(--on-brand, #fff); }

/* ---------- light / dark toggle ---------- */
.brand { display: flex; align-items: center; }
.theme-btn { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
             background: transparent; color: var(--muted); transition: background .2s var(--ease), color .2s var(--ease); flex: none; }
.theme-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-brand .theme-btn { margin-left: 2px; width: 30px; height: 30px; }

/* ---------- snooze ---------- */
.tag.snz { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); font-weight: 500; }
.tag svg, .snzbar svg, .snoozed-sec summary svg, [data-snooze-menu] svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-snooze-menu] svg { width: 15px; height: 15px; }
.snzbar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r); font-size: 14px; color: var(--muted);
          background: color-mix(in srgb, var(--ink) 4.5%, transparent); }
.snzbar b { color: var(--ink); font-weight: 600; }
.snzbar .more { margin-left: auto; flex: none; }
.snz-wrap { position: relative; display: inline-flex; }
.snz-pop { position: fixed; z-index: 40; min-width: 250px; padding: 6px; border-radius: 16px; background: var(--surface);
           box-shadow: 0 0 0 1px var(--hair), var(--overlay-shadow); display: flex; flex-direction: column; animation: rise .2s var(--ease) both; }
.snz-pop[hidden] { display: none; }
.snz-pop > button { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border: 0; border-radius: 10px; background: none;
                    font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.snz-pop > button:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.snz-pop .w { color: var(--faint); font-size: 13px; }
.snz-pick { display: flex; gap: 6px; padding: 8px 6px 4px; margin-top: 4px; border-top: 1px solid var(--hair); }
.snz-pick input { flex: 1; min-width: 0; border: 0; border-radius: 10px; padding: 7px 9px; font: inherit; font-size: 13px; color: var(--ink);
                  background: color-mix(in srgb, var(--ink) 5%, transparent); color-scheme: inherit; }
.snz-pick .btn { padding: 7px 12px; font-size: 13px; }
.snoozed-sec { margin-top: 8px; }
.snoozed-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 4px 12px;
                         font-size: 17px; font-weight: 650; color: var(--muted); }
.snoozed-sec > summary::-webkit-details-marker { display: none; }
.snoozed-sec > summary .sub { font-size: 13px; font-weight: 400; color: var(--faint); }
.snoozed-sec > summary svg { width: 16px; height: 16px; }

/* Screens: a bot's live screen, embedded */
.screen-head { margin-bottom: 14px; }
.screen-head .sub { max-width: 640px; line-height: 1.4; }
.screen-frame { display: block; width: 100%; height: calc(100vh - 210px); min-height: 480px; border: 0; border-radius: var(--r-lg); background: #111; }

/* Saved logins (a bot's vault) above its screen */
.vault { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--surface); }
.vault-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vault-items { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.vault-item button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 6px; font-size: 15px; line-height: 1; opacity: .6; }
.vault-item button:hover { opacity: 1; }
.vault .hint { color: var(--faint); font-size: 13px; }
.vault-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; }
.vault-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.vault-form label i { font-style: normal; color: var(--faint); }
.vault-form input:not([type=checkbox]) { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); background: var(--bg, transparent); color: var(--ink); }
.vault-form .wide { grid-column: 1 / -1; }
.vault-also { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.vault-also .chk { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); }
.vault-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 700px) { .vault-form { grid-template-columns: 1fr; } }

/* Connectors */
.conn-page { padding-bottom: 40px; }
.conn-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 14px 0 6px; }
.conn-head h1 { margin: 0; font-size: 30px; font-weight: 680; letter-spacing: -.03em; }
.conn-head .sub { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 620px; line-height: 1.45; }
.conn-search { flex: 0 0 280px; height: 42px; }
.conn-sec { margin: 30px 0 12px; font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.conn-sec span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); margin-left: 6px; }
.conn-note { margin: 12px 0 0; padding: 12px 16px; border-radius: var(--r); background: var(--wash); color: var(--ink); font-size: 14px; }

.conn-logo { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), 0 1px 2px rgba(0,0,0,.04); overflow: hidden; }
.conn-logo img { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); object-fit: contain; z-index: 1; }
.conn-logo b { font-weight: 700; color: var(--faint); font-size: 17px; }
.conn-logo.lg { width: 48px; height: 48px; border-radius: 13px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); grid-auto-flow: dense; gap: 12px; }
.tile-c { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hair); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.tile-c:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--hair), 0 10px 26px -14px rgba(0,0,0,.25); }
.tile-c.open { grid-column: span 2; box-shadow: 0 0 0 2px var(--brand); }
.tile-top { display: flex; align-items: center; gap: 12px; }
.tile-t { display: flex; flex-direction: column; min-width: 0; }
.tile-t b { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-t span { font-size: 12px; color: var(--faint); }
.tile-d { margin: 0; flex: 1; color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-f { display: flex; justify-content: flex-end; }
.tile-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--hair); }
.tile-form input { flex: 1 1 180px; font: inherit; font-size: 13.5px; padding: 8px 11px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); background: var(--bg); color: var(--ink); }
.tile-form p { margin: 0; flex-basis: 100%; font-size: 13px; color: var(--muted); line-height: 1.45; }
.tile-form a { font-size: 13px; color: var(--brand-deep); }
code.copy { flex-basis: 100%; cursor: copy; font-size: 12px; padding: 7px 10px; border-radius: 8px; background: var(--wash-2); color: var(--ink); overflow-wrap: anywhere; }
.conn-more { display: block; margin: 14px auto 0; }

.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.ghost { background: none; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.ok { background: color-mix(in srgb, #1f9d55 13%, transparent); color: #1b7f46; }
.pill.warn { background: color-mix(in srgb, #e3a008 16%, transparent); color: #8a6100; }
.pill.bad { background: color-mix(in srgb, #d64545 13%, transparent); color: #b33636; }
html[data-theme="dark"] .pill.ok { color: #5fd38f; } html[data-theme="dark"] .pill.warn { color: #f0c14b; } html[data-theme="dark"] .pill.bad { color: #ff8a8a; }

.conn-card { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 12px; }
.conn-h { display: flex; gap: 14px; align-items: center; }
.conn-t { flex: 1; min-width: 0; }
.conn-t h3 { margin: 0; font-size: 16px; font-weight: 650; }
.conn-t .sub { color: var(--muted); font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; }
.conn-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.conn-err { margin-top: 10px; font-size: 13px; color: #b33636; }
.conn-accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0 22px; margin: 14px 0; }
.conn-acct { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.conn-gform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.conn-gform input { font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); background: var(--bg); color: var(--ink); min-width: 230px; }
.conn-page .hint { color: var(--faint); font-size: 12.5px; }

.sw { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw i { position: relative; width: 32px; height: 18px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 18%, transparent); transition: background .2s; flex: none; }
.sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.sw input:checked + i { background: #1f9d55; }
.sw input:checked + i::after { transform: translateX(14px); }
.sw input:focus-visible + i { box-shadow: 0 0 0 2px var(--brand); }
.sw.ro, .conn-tool.ro { opacity: .55; cursor: not-allowed; }

.conn-tools { margin-top: 14px; border-top: 1px solid var(--hair); padding-top: 10px; }
.conn-tools summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.conn-tool { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--hair); cursor: pointer; }
.conn-tool:last-child { border-bottom: 0; }
.conn-tool .sw { margin-top: 1px; }
.tn { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; }
.tn code { font-size: 12.5px; color: var(--ink); }
.tn .desc { flex-basis: 100%; color: var(--faint); font-size: 12.5px; line-height: 1.4; }

.conn-adv { margin-top: 30px; }
.conn-adv summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.conn-adv[open] summary { margin-bottom: 12px; }
.conn-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.conn-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.conn-form label i { font-style: normal; color: var(--faint); }
.conn-form input, .conn-form select { font: inherit; font-size: 14px; padding: 8px 11px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); background: var(--bg); color: var(--ink); }
.conn-form .wide { grid-column: 1 / -1; }
.conn-form code.copy { flex-basis: auto; display: inline; padding: 3px 6px; }
@media (max-width: 760px) { .conn-form { grid-template-columns: 1fr; } .conn-head { flex-direction: column; align-items: stretch; } .conn-search { flex-basis: auto; } .tile-c.open { grid-column: auto; } }

/* the forms above set display; keep [hidden] working */
.conn-form[hidden], .conn-form [hidden], .vault-form[hidden], .tile-form[hidden] { display: none !important; }
.tile-form.tile-app { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; }
.tile-form.tile-app p, .tile-form.tile-app code.copy { grid-column: 1 / -1; }
@media (max-width: 760px) { .tile-form.tile-app { grid-template-columns: 1fr; } }
.built-row { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile-c.built { padding: 12px 14px; background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.tile-c.built:hover { transform: none; box-shadow: inset 0 0 0 1px var(--hair); }
.tile-c.built .tile-t span { color: #1b7f46; }
html[data-theme="dark"] .tile-c.built .tile-t span { color: #5fd38f; }

/* Connector mode: read-only / manual approval / write access */
.seg { display: inline-flex; margin-top: 16px; padding: 3px; gap: 2px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.seg button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: background .2s var(--ease), color .2s; }
.seg button:hover:not(:disabled):not(.on) { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button.on.m-read { color: #1b7f46; } .seg button.on.m-approval { color: #8a6100; } .seg button.on.m-write { color: #b33636; }
html[data-theme="dark"] .seg button.on.m-read { color: #5fd38f; } html[data-theme="dark"] .seg button.on.m-approval { color: #f0c14b; } html[data-theme="dark"] .seg button.on.m-write { color: #ff8a8a; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.seg-help { margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.conn-tool { align-items: center; cursor: default; }
.conn-tool .pill { flex: none; min-width: 112px; justify-content: center; }
.tn .chg { font-size: 11.5px; color: var(--faint); }
.conn-paste { box-shadow: inset 0 0 0 2px var(--brand); margin-top: 12px; }
.conn-paste ol { margin: 14px 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--ink); }
.conn-paste ol li { margin-bottom: 6px; }
.conn-paste ol .btn { margin-right: 4px; }
.conn-paste .tile-form { border-top: 0; padding-top: 0; }

/* Connectors, connected services: one card per service, one row per account */
.conn-note { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; line-height: 1.45; }
.conn-note.ok { background: color-mix(in srgb, #1f9d55 11%, var(--surface)); }
.conn-note.bad { background: color-mix(in srgb, #d64545 11%, var(--surface)); }
.conn-note .icon-btn { margin: -4px -6px -4px 0; }
.conn-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.conn-stats span { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--hair); }
.conn-stats b { color: var(--ink); font-weight: 680; margin-right: 2px; }
.conn-stats .ok { color: #1b7f46; } .conn-stats .warn { color: #8a6100; }
html[data-theme="dark"] .conn-stats .ok { color: #5fd38f; } html[data-theme="dark"] .conn-stats .warn { color: #f0c14b; }

.svcs { display: flex; flex-direction: column; gap: 14px; }
.svc { border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), 0 1px 2px rgba(0,0,0,.03), 0 12px 32px -24px rgba(40,30,10,.18); overflow: hidden;
  animation: rise .35s var(--ease) both; scroll-margin: 90px; }
.svc.flash { animation: svc-flash 1.3s var(--ease); }
@keyframes svc-flash { 0%, 40% { box-shadow: inset 0 0 0 2px var(--brand), 0 0 0 6px var(--glow); } }
.svc-h { display: flex; align-items: center; gap: 14px; padding: 18px 20px 16px; }
.svc-t { flex: 1; min-width: 0; }
.svc-t h3 { margin: 0; font-size: 16.5px; font-weight: 680; letter-spacing: -.01em; }
.svc-t p { margin: 3px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.accts { border-top: 1px solid var(--hair); }
.acct-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--hair); transition: background .2s; }
.acct-row:last-child { border-bottom: 0; }
.acct-row:hover { background: color-mix(in srgb, var(--wash-2) 70%, transparent); }
.acct-badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none; font-size: 14px; font-weight: 750;
  background: color-mix(in srgb, var(--c) 17%, transparent); color: color-mix(in srgb, var(--c) 72%, #000); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent); }
html[data-theme="dark"] .acct-badge { color: color-mix(in srgb, var(--c) 75%, #fff); }
.acct-main { min-width: 0; }
.acct-top { display: flex; align-items: center; gap: 6px; min-height: 24px; flex-wrap: wrap; }
.acct-name { font-size: 14.5px; font-weight: 640; color: var(--ink); }
.acct-name.unnamed { color: var(--muted); font-weight: 560; }
.acct-name .dom { color: var(--faint); font-weight: 500; }
.acct-top .icon-btn { width: 24px; height: 24px; opacity: 0; transition: opacity .15s; }
.acct-row:hover .acct-top .icon-btn, .acct-top .icon-btn:focus-visible { opacity: 1; }
.acct-top .icon-btn svg { width: 13px; height: 13px; }
.acct-top .pill { margin-left: 4px; }
.acct-sub { font-size: 12.5px; color: var(--faint); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-row.s-error .acct-sub { color: #b33636; white-space: normal; }
.acct-ctl { display: flex; align-items: center; justify-content: flex-end; }
.acct-tools { display: flex; gap: 2px; }
.acct-row.g { grid-template-columns: auto minmax(0, 1fr) auto; }
.acct-rename { display: flex; gap: 6px; align-items: center; }
.acct-rename input { font: inherit; font-size: 14px; padding: 5px 10px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); background: var(--bg); color: var(--ink); width: 180px; }

.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 0; background: none; color: var(--faint); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.icon-btn.danger:hover { background: color-mix(in srgb, #d64545 12%, transparent); color: #b33636; }
.icon-btn svg { width: 16px; height: 16px; }
.btn.xs { padding: 5px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .6; cursor: progress; }
.spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.seg.sm { margin-top: 0; }
.seg.sm button { padding: 6px 11px; font-size: 12.5px; }
.seg.saving { opacity: .75; cursor: progress; }
.seg.saving button:disabled { cursor: progress; opacity: 1; }
.sw.saving { opacity: .6; cursor: progress; }

.svc-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 10px 10px; border-top: 1px solid var(--hair); }
.accts + .svc-f, .acct-add + .svc-f { border-top: 1px solid var(--hair); }
.add-acct { color: var(--brand-deep); }
html[data-theme="dark"] .add-acct { color: var(--brand); }
.add-acct svg { width: 15px; height: 15px; }
.tools-toggle { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.tools-toggle:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.tools-toggle svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.tools-toggle.open svg { transform: rotate(90deg); }
.tool-list { padding: 2px 20px 14px; border-top: 1px solid var(--hair); max-height: 420px; overflow: auto; }
.tool-list .conn-tool { gap: 12px; }
.tool-list .hint { margin: 10px 0 0; }
.tag-read, .tag-chg { flex: none; width: 70px; text-align: center; font-size: 11.5px; font-weight: 650; padding: 3px 0; border-radius: 999px; }
.tag-read { background: color-mix(in srgb, #1f9d55 12%, transparent); color: #1b7f46; }
.tag-chg { background: color-mix(in srgb, #e3a008 15%, transparent); color: #8a6100; }
html[data-theme="dark"] .tag-read { color: #5fd38f; } html[data-theme="dark"] .tag-chg { color: #f0c14b; }

.acct-add { padding: 16px 20px 18px; background: color-mix(in srgb, var(--wash-2) 80%, var(--surface)); border-top: 1px solid var(--hair); animation: rise .25s var(--ease) both; }
.acct-add-h b { display: block; font-size: 14.5px; font-weight: 650; }
.acct-add-h span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.acct-add-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; margin-top: 12px; }
.acct-add-f label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 560; }
.acct-add-f input { font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); background: var(--surface); color: var(--ink); }
.acct-add-f input:focus, .acct-rename input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--glow); }
.acct-add-a { display: flex; gap: 8px; margin-top: 14px; }
.chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.chips .chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; }
.chips .chip:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
.chips .chip .acct-badge { width: 24px; height: 24px; border-radius: 999px; font-size: 11.5px; }

.conn-paste ol { padding-left: 40px; padding-right: 20px; }
.conn-paste .tile-form { padding: 0 20px 18px; }
button.pill.as-link { border: 0; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.tile-f { gap: 8px; align-items: center; }
.tile-f .btn svg { width: 14px; height: 14px; }

@media (max-width: 760px) {
  .acct-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .acct-ctl { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; }
  .acct-tools { grid-row: 1; grid-column: 3; }
  .acct-row.g .acct-ctl { grid-column: auto; }
  .acct-top .icon-btn { opacity: 1; }
  .svc-t p { white-space: normal; }
}
.accts.grid2 { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: -1px; }
.accts.grid2 .acct-row { border-bottom: 1px solid var(--hair); padding-top: 10px; padding-bottom: 10px; }
.accts.grid2 .acct-row:nth-child(odd) { border-right: 1px solid var(--hair); }
.accts.grid2 .acct-row:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
@media (max-width: 900px) { .accts.grid2 { grid-template-columns: 1fr; } .accts.grid2 .acct-row:nth-child(odd) { border-right: 0; } }

/* ---------------------------------------------------------------- Logins: team passwords, 2FA and passkeys */
.lg-page { padding-bottom: 40px; }
.lg-tools { display: flex; gap: 10px; align-items: center; }
.lg-tools .btn { white-space: nowrap; height: 42px; }
.lg-tools .btn[hidden] { display: none; }
.lg-fields .lbl { display: block; }
.lg-tools .conn-search { flex: 0 0 260px; }
.lg-stats { margin: 22px 0 10px; font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lg-list { display: flex; flex-direction: column; gap: 10px; }
.lg-card { border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.lg-card:not(.open):hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--hair), 0 10px 26px -16px rgba(0,0,0,.28); }
.lg-card.open { box-shadow: 0 0 0 2px var(--brand), 0 18px 40px -24px rgba(0,0,0,.3); }
.lg-card.new { margin: 16px 0 6px; }
@keyframes lg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lg-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-lg); }
.lg-row.static { cursor: default; }
.lg-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.lg-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lg-t b { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-t span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-kind { display: flex; gap: 6px; flex: none; }
.lg-kind .pill::before, .pill.pk::before, .pill.pw::before { display: none; }
.pill svg { width: 13px; height: 13px; stroke-width: 2; }
.pill.pk { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand-deep); }
.lg-used { flex: 0 0 210px; font-size: 12.5px; color: var(--faint); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-stack { display: flex; align-items: center; flex: 0 0 130px; justify-content: flex-end; padding-left: 6px; }
.lg-stack .avatar { width: 28px; height: 28px; margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); transition: transform .2s var(--ease); }
.lg-row:hover .lg-stack .avatar { margin-left: -4px; }
.lg-stack b { margin-left: 4px; font-size: 12px; font-weight: 650; color: var(--muted); }
.lg-stack i { font-style: normal; font-size: 12.5px; color: var(--faint); }
.lg-chev { flex: none; color: var(--faint); transition: transform .3s var(--ease); }
.lg-card.open .lg-chev { transform: rotate(180deg); }

.lg-edit { padding: 4px 18px 18px; border-top: 1px solid var(--hair); margin: 0 0 0; animation: lg-in .3s var(--ease) both; }
.lg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 16px; }
.lg-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 550; color: var(--muted); }
.lg-fields label i { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 4px; }
.lg-fields input:not([type=checkbox]) { font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--bg); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.lg-fields input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--glow); }
.lg-fields .wide { grid-column: 1 / -1; }
.lg-chk { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; color: var(--ink) !important; }
.lg-note { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r); background: var(--wash-2); font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.lg-note svg { margin-top: 2px; color: var(--brand-deep); }

.lg-who { margin-top: 18px; }
.lg-wh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.lg-wh b { font-size: 14px; font-weight: 650; }
.lg-count, .lg-sub { font-size: 12.5px; color: var(--muted); }
.lg-group { margin-top: 10px; }
.lg-gh { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.lg-all { border: 0; background: none; padding: 0; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--brand-deep); cursor: pointer; }
.lg-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.lg-mates { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-mate { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 0; cursor: pointer; font-size: 13px; font-weight: 550;
  background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--muted); transition: background .2s var(--ease), color .2s, box-shadow .2s, transform .15s; }
.lg-mate:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.lg-mate:active { transform: scale(.97); }
.lg-mate .avatar { width: 24px; height: 24px; filter: grayscale(.85); opacity: .75; transition: filter .25s, opacity .25s; }
.lg-mate .tick { width: 0; height: 14px; stroke-width: 2.4; opacity: 0; margin-left: -4px; transition: width .2s var(--ease), opacity .2s, margin .2s; }
.lg-mate.on { background: var(--brand); color: var(--on-brand); box-shadow: 0 4px 12px -6px var(--glow); }
.lg-mate.on .avatar { filter: none; opacity: 1; }
.lg-mate.on .tick { width: 14px; opacity: 1; margin-left: 0; }
.lg-mate:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.lg-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--hair); }
.lg-actions .hint { color: var(--faint); font-size: 12.5px; flex: 1; min-width: 200px; }
.btn.danger { color: #b33636; }
.btn.danger:hover { background: color-mix(in srgb, #d64545 10%, transparent); }
html[data-theme="dark"] .btn.danger { color: #ff8a8a; }

.lg-tip { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; padding: 14px 18px; border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.lg-tip svg { margin-top: 2px; color: var(--brand-deep); }
.lg-tip b { display: block; color: var(--ink); font-weight: 650; margin-bottom: 2px; }
.lg-tip a { color: var(--brand-deep); }

/* cards: a mini card, the month's spend, limits and recent payments */
.lg-cc { flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.lg-cc > span { position: relative; width: 40px; height: 27px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(135deg, #3a3f4b, #16181d); box-shadow: 0 6px 14px -8px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.08); }
.lg-cc > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.16) 50%, transparent 60%); }
.lg-cc i { position: absolute; left: 6px; top: 8px; width: 8px; height: 6px; border-radius: 1.5px; background: linear-gradient(135deg, #f3d27a, #b88a2b); }
.lg-cc b { position: absolute; right: 4px; bottom: 2px; font: italic 800 8px/1 system-ui, sans-serif; letter-spacing: .02em; color: #fff; }
.lg-cc.visa > span { background: linear-gradient(135deg, #2b4fd8, #12207a); }
.lg-cc.mastercard > span { background: linear-gradient(135deg, #2c2c34, #101014); }
.lg-cc.mastercard > span::before { content: ""; position: absolute; right: 4px; bottom: 3px; width: 15px; height: 9px;
  background: radial-gradient(circle at 4.5px 4.5px, #eb001b 4.5px, transparent 5px), radial-gradient(circle at 10.5px 4.5px, rgba(247,158,27,.92) 4.5px, transparent 5px); }
.lg-cc.amex > span { background: linear-gradient(135deg, #2e77bc, #1b4f86); }
.lg-meter { display: flex; flex-direction: column; gap: 4px; width: 190px; }
.lg-meter-t { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lg-meter-t b { color: var(--ink); font-weight: 650; }
.lg-meter-s { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.lg-bar { height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.lg-bar i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--brand); transition: width .5s var(--ease); }
.lg-meter.hot .lg-bar i { background: #e0663c; }
.lg-empty-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border-radius: var(--r-lg); cursor: pointer; text-align: left;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 16%, transparent); background: none; color: var(--ink); transition: border-color .2s, background .2s; }
.lg-empty-card:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.lg-empty-card > span:last-child { display: flex; flex-direction: column; }
.lg-empty-card b { font-size: 15px; font-weight: 650; } .lg-empty-card span span { font-size: 13px; color: var(--muted); }
.lg-tools .btn svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; stroke-width: 2; }
.lg-fields input.cc-num { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.lg-fields select { font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); background: var(--bg); color: var(--ink); }
.lg-limits { margin-top: 18px; }
.lg-fields.lg-lim { grid-template-columns: 120px 1fr 1fr; margin-top: 0; }
.lg-money { position: relative; display: flex; }
.lg-money b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--faint); pointer-events: none; }
.lg-money input { flex: 1; min-width: 0; padding-left: 26px !important; }
.lg-edit.ro .lg-mate { pointer-events: none; }
.lg-edit.ro input:disabled, .lg-edit.ro select:disabled { opacity: .75; }
.lg-pays-wrap { margin-top: 18px; }
.lg-pays { display: flex; flex-direction: column; gap: 2px; }
.lg-pays .hint { font-size: 13px; color: var(--faint); }
.lg-pay { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.lg-pay .avatar { width: 26px; height: 26px; }
.lg-pay-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.lg-pay-t b { font-weight: 650; }
.lg-pay-t .l1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-pay-t .l2 { font-size: 12px; color: var(--faint); }
.lg-pay .pill::before { display: none; }

/* a bot's screen page: its logins */
.vault-item { text-decoration: none; cursor: pointer; }
.vault-item svg { width: 13px; height: 13px; stroke-width: 2; }
.vault-item .shared { margin-left: 2px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 650; background: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--brand-deep); }
.vault-slot .lg-edit { border-top: 1px solid var(--hair); margin-top: 12px; padding: 0 0 4px; }

@media (max-width: 900px) { .lg-used { display: none; } }
@media (max-width: 760px) {
  .lg-tools { flex-direction: column; align-items: stretch; } .lg-tools .conn-search { flex-basis: auto; }
  .lg-fields { grid-template-columns: 1fr; } .lg-kind { display: none; } .lg-row { padding: 12px 14px; }
  .lg-fields.lg-lim { grid-template-columns: 1fr 1fr; } .lg-fields.lg-lim label:first-child { grid-column: 1 / -1; }
  .lg-stack { flex: 0 0 auto; } .lg-stack .avatar:nth-child(n+4) { display: none; }
}

/* Google mailbox priority (drag to reorder) and listener switches beside the mode control */
.rank-help { padding: 0 20px 12px; margin-top: -6px; font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.accts.ranked .acct-row.g { grid-template-columns: auto auto auto minmax(0, 1fr) auto; gap: 10px; padding-top: 9px; padding-bottom: 9px; background: var(--surface);
  transition: transform .18s var(--ease), background .2s, box-shadow .2s; position: relative; }
.accts.ranked:not(.can-sort) .acct-row.g { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.accts.ranked .acct-row.g .acct-badge { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.rank { width: 18px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.acct-row.g:first-child .rank { color: var(--brand-deep); }
html[data-theme="dark"] .acct-row.g:first-child .rank { color: var(--brand); }
.grip { display: grid; place-items: center; width: 22px; height: 30px; margin-left: -10px; border: 0; border-radius: 7px; background: none; color: var(--faint);
  cursor: grab; touch-action: none; opacity: .55; transition: opacity .15s, background .15s; }
.grip svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.acct-row:hover .grip, .grip:focus-visible { opacity: 1; }
.grip:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.grip:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--brand); }
.accts.sorting { user-select: none; }
.accts.sorting .acct-row { transition: transform .18s var(--ease); }
.accts.sorting .acct-row.dragging { transition: none; z-index: 2; cursor: grabbing; background: var(--surface);
  box-shadow: 0 14px 34px -12px rgba(40,30,10,.35), inset 0 0 0 1px var(--hair); border-radius: 12px; }
.accts.sorting .acct-row.dragging .grip { cursor: grabbing; opacity: 1; }
.acct-ctl { gap: 14px; }

/* No visible scrollbars anywhere; everything still scrolls. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

/* Show / copy a saved password or 2FA code (credential manager, 22 Oct) */
.lg-secret { display: grid; gap: 8px; margin: 16px 0 4px; padding: 12px 14px; border-radius: var(--r); background: var(--wash-2); }
.lg-sec-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-sec-row .lbl { min-width: 76px; font-size: 13px; color: var(--muted, #6b7280); }
.lg-sec-row code { flex: 1; min-width: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: .02em;
  padding: 6px 10px; border-radius: 8px; background: var(--paper, #fff); border: 1px solid var(--line, #e5e7eb); user-select: all; word-break: break-all; }
.lg-secret .hint { font-size: 12px; }
.vault-item.own { border-style: dashed; }
.vault-item.own .shared { font-size: 11px; opacity: .75; margin-left: 6px; }

/* ---------------------------------------------------------------- pull requests (22 Oct) */
.pr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 4px; }
.pr-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.pr-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.pr-head .sub a { color: inherit; }
.pr-err { margin: 10px 2px; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; background: color-mix(in srgb, var(--high) 12%, transparent); color: var(--high); }
.pr-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; align-items: center; }
.pr-gap { width: 10px; }
.pr-board { grid-auto-columns: minmax(270px, 1fr); }
.pr-col .pr-sub { margin: -6px 8px 4px; font-size: 12px; color: var(--faint); }
.pr-col.merge h3::before, .pr-col.dev h3::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.item.pr { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
.item.pr .t { font-size: 14px; }
.item.pr .right { flex-direction: row; justify-content: space-between; align-items: center; color: var(--muted); }
.item.pr .right .who { display: flex; align-items: center; gap: 7px; }
.pr-note { font-size: 13px; color: var(--muted); margin-top: 3px; }
.pr-note.you { color: var(--brand-deep); font-weight: 600; }
.pr-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pr-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pr-pill.ok { color: color-mix(in srgb, var(--ok) 85%, var(--ink)); } .pr-pill.ok i { background: var(--ok); }
.pr-pill.bad { color: var(--urgent); } .pr-pill.bad i { background: var(--urgent); }
.pr-pill.run i { background: var(--medium); animation: breathe 2.4s ease-in-out infinite; }
.pr-size { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pr-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pr-link { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
           font: 500 12px var(--font); color: var(--muted); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.pr-link:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.pr-link .st i { width: 6px; height: 6px; }
.pr-link.go { padding-left: 9px; background: var(--wash); color: var(--brand-deep); font-weight: 650; }
.pr-link.go svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.avatar.xs { width: 18px; height: 18px; }
.pr-wait { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--hair); padding-top: 8px; }
.pr-wait .who { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.pr-wait .avatar { width: 20px; height: 20px; font-size: 10px; }
.pr-by { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.pr-more { align-self: center; }
.pr-parked { margin: 18px 2px 30px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pr-parked .list { width: 100%; }

/* ---------------------------------------------------------------- AI accounts (22 Oct) */
.ai-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ai-acct { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-lg);
           background: var(--surface); box-shadow: var(--shadow); }
.ai-acct.limited { box-shadow: var(--shadow), inset 3px 0 0 var(--high); }
.ai-acct.fallback { background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: none; }
.ai-rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
           background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); }
.ai-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 2px; font-size: 15px; }
.ai-name b { margin-right: 8px; }
.ai-use { display: grid; grid-template-columns: 80px minmax(80px, 220px) auto; gap: 10px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ai-bar { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.ai-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.ai-bar.high i { background: var(--medium); } .ai-bar.full i { background: var(--urgent); }
.ai-use-v { font-variant-numeric: tabular-nums; }
.ai-note { font-size: 12.5px; color: var(--faint); margin-top: 6px; display: block; }
.ai-actions { display: flex; gap: 6px; align-items: center; }
.ai-actions .chip[disabled] { opacity: .4; cursor: default; }
.ai-addwrap { margin: 18px 2px 30px; }
.ai-add { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.ai-add a { color: var(--brand-deep); font-weight: 650; }
.ai-add form { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ai-add input { flex: 1; min-width: 240px; font: inherit; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--hair);
                background: color-mix(in srgb, var(--ink) 3%, transparent); color: var(--ink); }
.ai-msg { margin: 12px 2px 0; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; background: color-mix(in srgb, var(--ok) 12%, transparent); }
.ai-msg.bad { background: color-mix(in srgb, var(--urgent) 12%, transparent); color: var(--urgent); }
@media (max-width: 700px) { .ai-acct { grid-template-columns: 30px 1fr; } .ai-actions { grid-column: 1 / -1; } .ai-use { grid-template-columns: 70px 1fr; } .ai-use-v { grid-column: 2; } }

/* Approvals (23 Oct): what the bots can do and what needs a ✅ */
.ap-list { display: flex; flex-direction: column; gap: 8px; }
.ap-row { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.ap-row.is-off { opacity: .6; }
.ap-top { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; }
.ap-top[data-ap-open] { cursor: pointer; }
.ap-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 15px; }
.ap-id { font-size: 11.5px; color: var(--faint); }
.ap-about { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.ap-rule { color: var(--ink); }
.ap-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.ap-meta b { color: var(--ink); font-weight: 600; }
.ap-ctl { display: flex; align-items: center; gap: 8px; }
.ap-chev { color: var(--faint); font-size: 13px; width: 14px; text-align: center; }
.ap-sel select { max-width: 260px; text-overflow: ellipsis; }
.ap-sel select:disabled { cursor: default; }
.ap-state { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
            background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); white-space: nowrap; }
.ap-state.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.ap-state.some { background: color-mix(in srgb, var(--medium) 14%, transparent); color: var(--medium); }
.ap-state.off { background: color-mix(in srgb, var(--urgent) 12%, transparent); color: var(--urgent); }
.ap-sub { border-top: 1px solid var(--hair); padding: 10px 18px 12px; }
.ap-subh { font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; margin: 2px 0 6px; }
.ap-route { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 5px 0; font-size: 13px; }
.ap-route + .ap-route { border-top: 1px dashed var(--hair); }
.ap-route code { font-size: 12.5px; overflow-wrap: anywhere; }
.ap-route .m { display: inline-block; min-width: 52px; font-weight: 700; color: var(--muted); }
.ap-route .m.delete { color: var(--urgent); } .ap-route .m.post { color: var(--ok); } .ap-route .m.put, .ap-route .m.patch { color: var(--medium); }
.ap-n { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.ap-req { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 6px 0; font-size: 13px; }
.ap-req .avatar { width: 24px; height: 24px; }
.ap-req .ap-meta { margin-top: 2px; }
.ap-hist { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); font-size: 13.5px; }
@media (max-width: 700px) {
  .ap-top { grid-template-columns: 1fr; } .ap-ctl { justify-content: space-between; }
  .ap-route { grid-template-columns: 1fr auto; } .ap-route code { grid-column: 1 / -1; }
  .ap-hist { flex-direction: column; gap: 2px; }
}
.ap-msgh { font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; }
.ap-msgh + .slack-msg, .slack-msg + .ap-msgh { margin-top: 0; }
.slack-msg + .ap-msgh { margin-top: 14px; }
.slack-msg { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 12px 14px; border-radius: var(--r);
             background: color-mix(in srgb, var(--ink) 3%, transparent); font-size: 13.5px; line-height: 1.45; }
.slack-msg .avatar { width: 32px; height: 32px; border-radius: 8px; }
.sm-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.sm-head span { color: var(--faint); font-size: 12px; }
.sm-body { overflow-wrap: anywhere; }
.sm-body pre { margin: 6px 0; padding: 8px 10px; border-radius: 8px; white-space: pre-wrap; font-size: 12.5px;
               background: var(--surface); box-shadow: 0 0 0 1px var(--hair); }
.sm-body code { font-size: 12.5px; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--urgent) 8%, transparent); color: var(--urgent); }
.sm-body .mention { color: #1D9BD1; background: color-mix(in srgb, #1D9BD1 12%, transparent); border-radius: 4px; padding: 0 2px; font-weight: 500; }
.sm-thread { margin-top: 8px; font-size: 13px; }
.sm-thread summary { cursor: pointer; color: #1D9BD1; font-weight: 600; font-size: 12.5px; }
.sm-thread .sm-body { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--hair); }

.sm-btns { display: flex; gap: 8px; margin: 8px 0 4px; }
.sm-btn { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 4px; border: 1px solid var(--hair); }
.sm-btn.ok { background: #007a5a; border-color: #007a5a; color: #fff; }
.sm-btn.no { color: #e01e5a; border-color: #e01e5a55; background: transparent; }
.sm-ctx { font-size: 12px; opacity: .65; }

/* Approvals → Waiting: a triage queue (list + detail) */
.aq-tabs { display: flex; gap: 2px; margin: 2px 0 16px; border-bottom: 1px solid var(--hair); }
.aq-tabs a { padding: 8px 14px 10px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.aq-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.aq-tabs a b { font-size: 11px; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--urgent); color: #fff; vertical-align: 1px; }
kbd { font: 600 10.5px/1 var(--font); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--hair); background: var(--surface); color: var(--muted); }

.aq-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; min-height: 34px; }
.aq-bar.sel { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r-sm); padding: 6px 8px 6px 14px; }
.aq-seg { display: inline-flex; background: var(--hair); border-radius: 10px; padding: 3px; }
.aq-seg button { white-space: nowrap; font: 600 13px var(--font); border: 0; background: none; color: var(--muted); padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.aq-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.aq-seg span, .aq-cat span { opacity: .6; margin-left: 2px; }
.aq-cats { display: flex; gap: 4px; flex-wrap: wrap; }
.aq-cat { font: 600 12.5px var(--font); border: 1px solid var(--hair); background: none; color: var(--muted); padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.aq-cat.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.aq-hint { margin-left: auto; font-size: 12px; color: var(--faint); display: flex; gap: 3px; align-items: center; }

.aq-split { display: grid; grid-template-columns: minmax(320px, 32%) 1fr; gap: 16px; align-items: start; }
.aq-list { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); overflow: hidden; }
.aq-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; border-bottom: 1px solid var(--hair); cursor: pointer; position: relative; }
.aq-row:last-child { border-bottom: 0; }
.aq-row:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.aq-row.sel { background: color-mix(in srgb, var(--medium) 10%, transparent); }
.aq-row.sel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--medium); }
.aq-row.pend { opacity: .55; }
.aq-pick { margin: 0; accent-color: var(--medium); opacity: .35; }
.aq-row:hover .aq-pick, .aq-pick:checked, .aq-row.sel .aq-pick { opacity: 1; }
.aq-pick-sp { width: 13px; flex: none; }
.aq-av { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.aq-av.sm { width: 18px; height: 18px; border-radius: 5px; vertical-align: -4px; margin-right: 2px; }
.aq-rmain { min-width: 0; flex: 1; }
.aq-rtitle { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aq-rmeta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.aq-going { color: var(--ok); font-weight: 600; }
.aq-rside { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.aq-flag { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--hair); color: var(--muted); }
.aq-flag.warn { background: color-mix(in srgb, var(--high) 18%, transparent); color: var(--high); }
.aq-left { font-size: 11.5px; color: var(--faint); }
.aq-left.late, .late { color: var(--urgent); font-weight: 600; }

.aq-pane { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; }
.aq-d > .aq-foot { margin-left: 0; margin-right: 0; }
.aq-inline { display: none; }
.aq-d { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); display: flex; flex-direction: column; width: 100%; max-height: inherit; overflow: hidden; }
.aq-d > header, .aq-d > section, .aq-d > details, .aq-d > .aq-alert { margin: 0 22px; }
.aq-d { overflow-y: auto; }
.aq-dh { padding-top: 20px; }
.aq-sys { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.aq-dh h2 { font-size: 20px; line-height: 1.3; margin: 4px 0 6px; overflow-wrap: anywhere; }
.aq-dmeta { font-size: 13px; color: var(--muted); }
.aq-dmeta a { color: inherit; }
.aq-alert { margin-top: 14px !important; padding: 10px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--high) 12%, transparent); font-size: 13.5px; }
.aq-d h3 { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 6px; }
.aq-why p { margin: 0; font-size: 14.5px; line-height: 1.5; padding-left: 12px; border-left: 3px solid var(--hair); }
.aq-body { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.aq-body pre { max-height: 320px; overflow: auto; }
.aq-body.prose pre { font: 14px/1.55 var(--font); white-space: pre-wrap; background: color-mix(in srgb, var(--ink) 3%, transparent); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 14px 16px; max-height: none; }
.aq-older p { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.aq-orow { font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--hair); }
.aq-orow span { color: var(--faint); margin-left: 6px; }
.aq-older .aq-btn { margin-top: 8px; }
.aq-tech { margin-top: 18px !important; font-size: 13px; }
.aq-tech summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.aq-tech h4 { font-size: 11.5px; color: var(--muted); margin: 12px 0 4px; }
.aq-tech p { margin: 0; overflow-wrap: anywhere; }
.aq-tech pre { white-space: pre-wrap; word-break: break-all; font-size: 12px; background: var(--hair); border-radius: 8px; padding: 8px 10px; margin: 0; max-height: 220px; overflow: auto; }
.aq-foot { position: sticky; top: 0; z-index: 1; margin-top: 14px; padding: 10px 22px; background: var(--surface); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aq-end { height: 22px; flex: none; }
.aq-btn { font: 700 13.5px var(--font); padding: 8px 16px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 8px; }
.aq-btn kbd { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: inherit; }
.aq-btn.ok { background: #007a5a; color: #fff; }
.aq-btn.ok:hover { background: #006a4e; }
.aq-btn.no { background: none; color: var(--urgent); border-color: color-mix(in srgb, var(--urgent) 40%, transparent); }
.aq-btn.no.solid { background: var(--urgent); color: #fff; }
.aq-btn.no kbd { border-color: color-mix(in srgb, var(--urgent) 30%, transparent); background: none; }
.aq-btn.ghost { background: none; color: var(--muted); border-color: var(--hair); }
.aq-btn:disabled { opacity: .5; cursor: default; }
.aq-irrev { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.aq-wait { font-size: 13.5px; color: var(--muted); }
.aq-undo { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ok); font-weight: 600; width: 100%; }
.aq-undo .aq-btn { margin-left: auto; }
.aq-rej { display: flex; gap: 8px; width: 100%; }
.aq-rej input { flex: 1; font: 14px var(--font); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--bg); color: var(--ink); }
.aq-empty { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); padding: 60px 20px; text-align: center; color: var(--muted); width: 100%; }
.aq-clear { text-align: center; padding: 70px 20px; color: var(--muted); }
.aq-clear h2 { color: var(--ink); margin: 10px 0 4px; }
.aq-tick { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 24px; color: #fff; background: var(--ok); }

.aq-history { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); overflow: hidden; }
.aq-hrow { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--hair); }
.aq-hrow:last-child { border-bottom: 0; }
.aq-st { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex: none; width: 64px; text-align: center; background: var(--hair); color: var(--muted); }
.aq-st.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.aq-st.run { background: color-mix(in srgb, var(--medium) 15%, transparent); color: var(--medium); }
.aq-st.bad, .aq-st.no { background: color-mix(in srgb, var(--urgent) 13%, transparent); color: var(--urgent); }

@media (max-width: 1180px) {
  .aq-split { display: block; }
  .aq-pane { display: none; }
  .aq-inline { display: block; border-bottom: 1px solid var(--hair); background: var(--bg); padding: 10px; }
  .aq-inline .aq-d { max-height: none; }
  .aq-inline .aq-foot { position: static; }
  .aq-hint { display: none; }
}

/* Mail reader: Inbox and Drafts (list + conversation) */
.mr-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.mr-split { display: grid; grid-template-columns: minmax(320px, 32%) 1fr; gap: 16px; align-items: start; }
.mr-list { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); overflow: hidden; }
.mr-row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px 11px 12px; border-bottom: 1px solid var(--hair); cursor: pointer; position: relative; }
.mr-row:last-child { border-bottom: 0; }
.mr-row:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.mr-row.sel { background: color-mix(in srgb, var(--medium) 10%, transparent); }
.mr-row.sel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--medium); }
.mr-kind { color: var(--faint); flex: none; margin-top: 2px; }
.mr-kind svg { width: 16px; height: 16px; }
.mr-rmain { min-width: 0; flex: 1; }
.mr-rt { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-rs { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mr-rside { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.mr-when { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.mr-pill { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--hair); color: var(--muted); white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.mr-pill.draft { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.mr-pill.wait { background: color-mix(in srgb, var(--high) 16%, transparent); color: var(--high); }
.mr-pill.bot { background: color-mix(in srgb, var(--medium) 13%, transparent); color: var(--medium); }
.mr-pill.appr { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand-deep); }
.mr-pill.done { background: var(--hair); color: var(--faint); }
.mr-rarc { font-size: 11.5px; color: var(--faint); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.mr-keys kbd { margin-left: 6px; }
.mr-keys kbd + kbd { margin-left: 0; }
.mr-appr { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-sm);
           background: color-mix(in srgb, var(--brand) 12%, var(--surface)); font-size: 13.5px; }
.mr-appr-t { flex: 1; min-width: 220px; }
.mr-appr-t span { color: var(--muted); font-size: 12.5px; }
.mr-appr-t p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.mr-appr-a { display: flex; gap: 6px; align-items: center; }
.aq-mail .arc-reader { margin-top: 6px; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--hair); }

.mr-pane { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); }
.mr-inline { display: none; }
.mr-head { padding: 20px 24px 14px; border-bottom: 1px solid var(--hair); }
.mr-head h2 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; overflow-wrap: anywhere; }
.mr-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.mr-av { width: 18px; height: 18px; border-radius: 5px; }
.mr-mb { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--hair); }
.mr-links { margin-left: auto; display: flex; gap: 6px; }
.mr-btn { font: 600 12.5px var(--font); padding: 5px 11px; border-radius: 8px; border: 1px solid var(--hair); background: none; color: var(--ink); cursor: pointer; text-decoration: none; }
.mr-btn:hover { background: var(--hair); }
.mr-btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.mr-need { margin-top: 12px; font-size: 13.5px; background: color-mix(in srgb, var(--brand, #F5C518) 18%, transparent); border-radius: var(--r-sm); padding: 8px 12px; line-height: 1.45; }
.mr-thread { padding: 8px 24px 24px; }
.mr-all { font: 600 12.5px var(--font); color: var(--muted); background: none; border: 1px dashed var(--hair); border-radius: 8px; padding: 6px 10px; margin: 10px 0 4px; cursor: pointer; width: 100%; }
.mr-msg { padding: 16px 0; border-bottom: 1px solid var(--hair); }
.mr-msg.folded { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; font-size: 13.5px; }
.mr-msg.folded:hover b { text-decoration: underline; }
.mr-snip { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.mr-mh { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.mr-ini { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.mr-msg.folded .mr-ini { width: 24px; height: 24px; font-size: 11px; }
.mr-ini.ours { background: var(--brand, #F5C518); color: var(--on-brand, #2B2410); }
.mr-who { flex: 1; min-width: 0; font-size: 14px; }
.mr-addr { font-size: 12px; color: var(--faint); }
.mr-to { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-body { font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; padding-left: 40px; }
.mr-msg .atts { padding-left: 40px; }
.mr-sig { margin-top: 6px; color: var(--muted); font-size: 13px; }
.mr-sig summary { cursor: pointer; display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--hair); list-style: none; font-weight: 700; letter-spacing: 1px; }
.mr-sig[open] { font-size: 12.5px; line-height: 1.5; border-left: 2px solid var(--hair); padding-left: 10px; }
.mr-sig[open] summary { margin-bottom: 6px; }
.mr-draft { margin-top: 18px; border: 1.5px dashed color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 5%, transparent); border-radius: var(--r-sm); padding: 14px 16px; }
.mr-dh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mr-dtag { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ok); }
.mr-dmb { font-size: 12px; color: var(--muted); }
.mr-dh .mr-btn { margin-left: auto; }
.mr-draft .mr-body { padding-left: 0; margin-top: 10px; }
.mr-draft .mr-to { white-space: normal; }
.mr-nodraft, .mr-empty { color: var(--muted); font-size: 13.5px; padding: 18px 24px; }
.mr-nodraft { padding: 16px 0 0; }
@media (max-width: 1180px) {
  .mr-split { display: block; }
  .mr-pane { display: none; }
  .mr-inline { display: block; background: var(--bg); padding: 10px; border-bottom: 1px solid var(--hair); }
  .mr-inline .mr-head, .mr-inline .mr-thread { background: var(--surface); }
  .mr-body, .mr-msg .atts { padding-left: 0; }
}
.mr-note { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }

/* editing and sending drafts */
.mr-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mr-from { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-right: auto; }
.mr-from select { font: 13px var(--font); padding: 5px 8px; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); }
.mr-form { display: grid; gap: 8px; margin-top: 8px; }
.mr-form label { display: grid; grid-template-columns: 64px 1fr; align-items: center; font-size: 12.5px; color: var(--muted); }
.mr-form .mr-from { display: inline-flex; margin: 0; }
.mr-form input, .mr-form textarea { font: 14px var(--font); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); width: 100%; box-sizing: border-box; }
.mr-form textarea { font-size: 14.5px; line-height: 1.55; resize: vertical; min-height: 220px; }
.mr-draft.editing { border-style: solid; }
.mr-draft.sending { border-style: solid; border-color: var(--ok); }
.mr-sendbar { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ok); margin-top: 6px; }
.mr-sendbar .mr-btn { margin-left: auto; }
.mr-btn.ghost { color: var(--muted); }
.mr-btn:disabled { opacity: .5; cursor: default; }

/* wide screens: the reading column stays at a comfortable line length */
.mr-body, .mr-form, .aq-body, .aq-why p { max-width: 920px; }

/* Inbox and Drafts on wide screens: the list and the email scroll on their own, filling the window below the header,
   so scrolling one never drags the other or the page (26 Oct, James). --mr-top is set by the page after it draws. */
@media (min-width: 1181px) {
  .main[data-view="mail"] { padding-bottom: 16px; }
  .main[data-view="mail"] .updated { display: none; }
  .main[data-view="mail"] .mr-split { height: calc(100dvh - var(--mr-top, 190px) - 16px); min-height: 420px; align-items: stretch; }
  .main[data-view="mail"] .mr-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .main[data-view="mail"] .mr-pane { position: static; max-height: none; overscroll-behavior: contain; scrollbar-width: thin; }
}

/* attachments open in a new tab */
a.att { text-decoration: none; color: var(--ink); cursor: pointer; }
a.att:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.att small { color: var(--faint); font-size: 11.5px; }

/* feedback on a draft: highlight to comment, then send it all back to the bot that wrote it */
.mr-draft [data-fb-body] { cursor: text; }
.mr-draft [data-fb-body]::selection, .mr-draft [data-fb-body] *::selection { background: color-mix(in srgb, var(--brand, #F5C518) 55%, transparent); }
.fb-mark { background: color-mix(in srgb, var(--brand, #F5C518) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px;
           box-shadow: 0 1.5px 0 color-mix(in srgb, var(--brand, #F5C518) 90%, var(--ink)); }
.fb-mark::after { content: attr(data-fb-n); font: 700 9.5px var(--font); vertical-align: super; margin-left: 2px; color: var(--muted); }
.fb-pop { position: fixed; z-index: 90; background: var(--surface); color: var(--ink); border-radius: 12px; padding: 4px;
          box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 0 0 1px var(--hair); animation: fbin .14s var(--ease, ease-out); }
@keyframes fbin { from { opacity: 0; transform: translateY(4px); } }
.fb-pop-add { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--font); border: 0; background: none; color: var(--ink); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.fb-pop-add:hover { background: var(--hair); }
.fb-pop-add svg { width: 14px; height: 14px; }
.fb-pop.open { width: min(380px, calc(100vw - 16px)); padding: 12px; display: grid; gap: 8px; }
.fb-pop q, .fb-notes q { display: block; quotes: none; font-size: 12.5px; color: var(--muted); border-left: 3px solid var(--brand, #F5C518); padding: 1px 0 1px 8px;
                         overflow-wrap: anywhere; max-height: 5.2em; overflow: hidden; }
.fb-pop textarea, .fb-panel textarea { font: 14px/1.5 var(--font); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface);
                                        color: var(--ink); width: 100%; box-sizing: border-box; resize: vertical; outline: 0; }
.fb-pop textarea:focus, .fb-panel textarea:focus { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.fb-pop-acts { display: flex; align-items: center; gap: 6px; }
.fb-pop-acts span { margin-right: auto; font-size: 11.5px; color: var(--faint); }
.fb-panel { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm, 12px); background: var(--surface); box-shadow: 0 0 0 1px var(--hair); display: grid; gap: 10px; max-width: 920px; }
.fb-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.fb-h select { font: 13px var(--font); padding: 4px 8px; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); }
.fb-why, .fb-tip { font-size: 12px; color: var(--faint); }
.fb-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fb-notes li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.fb-notes p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.fb-n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--font); background: var(--brand, #F5C518); color: var(--on-brand, #2B2410); margin-top: 1px; }
.fb-del { border: 0; background: none; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.fb-del:hover { color: var(--ink); background: var(--hair); }
.fb-panel .mr-acts { margin-top: 0; }
.fb-sent { margin-top: 12px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* waits-on links between cards */
.tag.waits { background: color-mix(in srgb, var(--medium) 13%, transparent); color: var(--medium); }
.deps .dep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dep { display: flex; align-items: center; gap: 6px; }
.dep-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; font: inherit; font-size: 14px; color: var(--ink);
            background: color-mix(in srgb, var(--ink) 4%, transparent); border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.dep-open:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.dep-open svg { width: 14px; height: 14px; color: var(--ok); }
.dep.met .dep-t { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.dep-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-s { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dep-rm { border: 0; background: none; color: var(--faint); font-size: 18px; cursor: pointer; padding: 0 6px; border-radius: 6px; }
.dep-rm:hover { color: var(--ink); background: var(--hair); }
.dep-add { display: flex; gap: 8px; margin-top: 8px; }
.dep-add input { flex: 1; min-width: 0; font: 14px var(--font); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; cursor: pointer; text-align: left; }
.mr-need.waits { background: color-mix(in srgb, var(--medium) 12%, transparent); }

/* holds on drafts */
.hold { margin: 10px 0 4px; padding: 12px 14px; border-radius: var(--r-sm, 12px); font-size: 13.5px; line-height: 1.45; max-width: 920px;
        background: color-mix(in srgb, var(--high) 11%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--high) 35%, transparent); }
.hold.met { background: color-mix(in srgb, var(--ok) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
.hold.cancelled { background: color-mix(in srgb, #d33 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, #d33 35%, transparent); }
.hold-h { font-weight: 700; color: var(--high); }
.hold.met .hold-h { color: var(--ok); } .hold.cancelled .hold-h { color: #c22; }
.hold-says { margin-top: 4px; color: var(--ink); }
.hold-w { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.hold-w li { display: flex; align-items: baseline; gap: 8px; }
.hold-w li i { width: 7px; height: 7px; border-radius: 50%; background: var(--high); flex: none; transform: translateY(-1px); }
.hold-w li.bad i { background: #d33; }
.hold-w li svg { width: 13px; height: 13px; color: var(--ok); flex: none; align-self: center; }
.hold-w li.ok .linkbtn, .hold-w li.ok > span:first-of-type { color: var(--muted); }
.hold-st { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.hold-f { margin-top: 8px; font-size: 12px; color: var(--muted); }
.hold-form { margin: 10px 0; padding: 12px 14px; border-radius: var(--r-sm, 12px); background: var(--surface); box-shadow: 0 0 0 1px var(--hair); }
.hold-form label { grid-template-columns: 80px 1fr; }
.mr-btn.warn { color: var(--high); border-color: color-mix(in srgb, var(--high) 45%, transparent); }
.mr-btn.warn:hover { background: color-mix(in srgb, var(--high) 10%, transparent); }
.mr-draft.held { border-color: color-mix(in srgb, var(--high) 55%, transparent); background: color-mix(in srgb, var(--high) 4%, transparent); }

/* ---------- storylines (27 Oct): one real-world thing going on, owning its cards ---------- */
.stories { display: flex; flex-direction: column; gap: 10px; }
.story { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); position: relative; animation: rise .5s var(--ease) both;
         transition: box-shadow .35s var(--ease); }
.story:hover { box-shadow: var(--shadow-lift); }
.story.needs::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.story .sh { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; cursor: pointer; }
.story .chev { width: 18px; height: 18px; fill: none; stroke: var(--faint); stroke-width: 2; margin-top: 3px; transition: transform .3s var(--ease); }
.story.open .chev { transform: rotate(90deg); }
.story .t { font-weight: 650; font-size: 15.5px; line-height: 1.35; letter-spacing: -.005em; }
.story .sn { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story .sm { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; color: var(--faint); font-size: 12.5px; }
.story .sm .tag { margin-right: -4px; }
.schip { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; margin-top: 1px;
         color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.schip.bad { --c: var(--urgent); } .schip.warn { --c: var(--high); } .schip.soft { --c: var(--wait); }
.schip.ok { --c: var(--ok); } .schip.done { --c: var(--faint); }
.story .sb { padding: 0 18px 16px; }
.story .snow { margin: 0 0 10px; line-height: 1.55; font-size: 14.5px; }
.story .snext { line-height: 1.5; font-size: 14px; }
.story .sneed { margin-top: 10px; padding: 9px 12px; border-radius: var(--r-sm); line-height: 1.45; font-size: 14px;
                background: color-mix(in srgb, var(--brand) 13%, transparent); border-left: 3px solid var(--brand); }
.story .sunclear { margin-top: 8px; padding: 8px 12px; border-radius: var(--r-sm); font-size: 13px; line-height: 1.45; color: var(--muted);
                   background: color-mix(in srgb, var(--wait) 9%, transparent); }
.story .scols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
@media (max-width: 760px) { .story .scols { grid-template-columns: 1fr; } }
.stl { margin: 0; padding: 0; list-style: none; }
.stl li { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 4px 0 4px 12px; border-left: 2px solid var(--hair); font-size: 13.5px; line-height: 1.4; }
.stl .d { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.scards { display: flex; flex-direction: column; gap: 2px; }
.scard { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: baseline; padding: 5px 8px; margin: 0 -8px; border-radius: 8px;
         cursor: pointer; font-size: 13px; }
.scard:hover { background: var(--wash-2); }
.scard .st { font-size: 11.5px; color: var(--muted); } .scard .ow { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.scard.needs .tt { font-weight: 600; }
.story .sact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.story .sact .chip, .chip.mini { position: relative; }
.story .sact .chip select, .chip.mini select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chip.mini { padding: 2px 10px; font-size: 12px; margin-left: 6px; }
.storychip { display: inline-flex; align-items: center; gap: 5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
             color: var(--brand-deep); font-weight: 600; cursor: pointer; }
.storychip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.storychip:hover { text-decoration: underline; }
.props .span2 { grid-column: 1 / -1; }

/* ---------- arcs (27 Oct): one page per real-world thing, with everything needed to act on it ---------- */
.nav-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 16px 12px 4px; }
a.story { display: block; color: inherit; text-decoration: none; }
.arc-find input { width: 100%; padding: 11px 16px; border-radius: var(--r); border: 0; box-shadow: var(--shadow); background: var(--surface);
                  color: var(--ink); font: inherit; font-size: 14.5px; margin: 6px 0 4px; }
.more-link { margin: 10px 4px; font-size: 14px; } .more-link a { color: var(--brand-deep); font-weight: 600; text-decoration: none; }
.arc-page { margin-top: 6px; }
.arc-head h1 { margin: 10px 0 6px; font-size: 27px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.arc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; align-items: center; }
.arc-meta .tag { margin-right: -6px; }
.arc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; margin-top: 18px; align-items: start; }
@media (max-width: 1100px) { .arc-grid { grid-template-columns: 1fr; } }
.arc-main > section, .arc-main > .move { margin-bottom: 18px; }
.arc-main h2 { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.arc-now { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 18px; }
.arc-now .snow { margin: 0 0 10px; font-size: 15.5px; line-height: 1.6; }
.arc-now .snext { font-size: 14.5px; line-height: 1.5; }
.arc-now .sunclear { margin-top: 10px; padding: 9px 12px; border-radius: var(--r-sm); font-size: 13.5px; line-height: 1.45; color: var(--muted);
                     background: color-mix(in srgb, var(--wait) 9%, transparent); }
.move { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; position: relative; }
.arc-moves .move::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.mv-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; line-height: 1.4; font-size: 15px; }
.mv-k { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-deep); white-space: nowrap; }
.mv-meta { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.45; }
.mv-why { margin: 8px 0 4px; font-size: 14px; line-height: 1.5; }
.mv-act { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.move.reply textarea { width: 100%; margin-top: 10px; border: 0; box-shadow: var(--shadow); border-radius: var(--r-sm); padding: 10px 12px;
                       font: inherit; font-size: 14.5px; background: var(--wash-2); color: var(--ink); resize: vertical; }
.move.reply .chip.mini { font-weight: 500; }
.arc-reader { margin-top: 10px; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.arc-reader .mr-head h2 { text-transform: none; letter-spacing: normal; color: var(--ink); }
.feed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.feed-chips .chip .n { color: var(--faint); font-weight: 500; margin-left: 2px; }
.feed { display: flex; flex-direction: column; gap: 8px; }
.fi { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 14px; font-size: 14px; }
.fi-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; }
.fi-h svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; color: var(--muted); }
.fi-h .avatar { width: 20px; height: 20px; }
.fi-when { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.fi-sub { font-weight: 600; font-size: 13.5px; margin-top: 4px; }
.fi .prose { margin-top: 4px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.fi .prose p { margin: 4px 0; }
.fi.email { border-left: 3px solid var(--medium); } .fi.email.ours { border-left-color: var(--ok); }
.fi.draft { border-left: 3px dashed var(--high); background: color-mix(in srgb, var(--high) 5%, var(--surface)); }
.fi.approval { border-left: 3px solid var(--wait); } .fi.approval.live { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.fi.approval.small, .fi.cardev { padding: 7px 14px; }
.fi.slack.human { border-left: 3px solid var(--brand); } .fi.slack.customer { border-left: 3px solid var(--medium); }
.fi.cardev.blocked { border-left: 3px solid var(--wait); } .fi.cardev.completed { border-left: 3px solid var(--ok); }
.fi-more summary { cursor: pointer; list-style: none; color: var(--ink); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.fi-more summary::-webkit-details-marker { display: none; }
.fi-more summary span { color: var(--brand-deep); font-weight: 600; }
.fi-more[open] summary { display: none; }
.fi-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-size: 13px; } .fi-files a { color: var(--brand-deep); }
.fi-fold > summary { cursor: pointer; list-style: none; color: var(--faint); font-size: 12.5px; padding: 2px 6px; }
.fi-fold > summary::-webkit-details-marker { display: none; }
.fi-fold[open] > summary { margin-bottom: 6px; } .fi-fold > .fi { margin-bottom: 6px; opacity: .92; }
.linkbtn.fi-card { font-size: 12px; }
.arc-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1100px) { .arc-side { position: static; } }
.side-box { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px 14px; }
.side-box h3 { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.side-box h3 .n { color: var(--faint); margin-left: 4px; }
.side-box .scard { grid-template-columns: 76px 1fr; } .side-box .scard .ow { display: none; }
.side-row { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 13px; line-height: 1.4; color: inherit; text-decoration: none; }
.side-row svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; margin-top: 2px; }
.apst { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; background: var(--wash-2); color: var(--muted); }
.apst.pending { color: var(--brand-deep); background: color-mix(in srgb, var(--brand) 15%, transparent); }
.apst.done { color: var(--ok); } .apst.failed, .apst.rejected { color: var(--urgent); }
.sact .chip { position: relative; } .sact .chip select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.side-box .sact { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- arc page: spacing and the timeline (27 Oct, second pass) ---------- */
.arc-page { max-width: 1240px; }
.arc-head { margin-bottom: 4px; }
.arc-grid { gap: 24px; margin-top: 20px; }
.arc-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.arc-main > section, .arc-main > .move { margin: 0; }
.arc-main h2 { margin: 0 0 10px 2px; }
.arc-now { padding: 18px 20px; }
.arc-now .snow { margin: 0 0 12px; }
.arc-now .sunclear { margin-top: 12px; padding: 10px 14px; }
.arc-moves { display: flex; flex-direction: column; gap: 10px; }
.arc-moves h2 { margin-bottom: 0; }
.move { padding: 16px 18px 16px 20px; margin: 0; }
.arc-moves .move::before { top: 18px; bottom: 18px; }
.mv-meta { margin-top: 6px; }
.mv-why { margin: 10px 0 6px; }
.mv-act { margin-top: 12px; }
.move .fi-more, .move details { margin-top: 6px; }
.move .fi-more summary { color: var(--brand-deep); font-weight: 600; font-size: 13.5px; }
.move.reply textarea { margin-top: 12px; }
.arc-reader { margin: 12px -6px 0 -8px; border-radius: var(--r); background: var(--surface); }
.arc-reader .mr-head { padding: 14px 16px 10px; }
.arc-reader .mr-thread { padding: 4px 16px 16px; }
.side-box { padding: 14px 16px; }
.side-box h3 { margin-bottom: 10px; }
.side-box .scard { padding: 6px 8px; margin: 0 -8px; }
.side-row { padding: 6px 0; }
.side-row + .side-row { border-top: 1px solid var(--hair); }

.feed-bar { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.feed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.feed-chips .chip .n { margin-left: 6px; color: var(--faint); font-weight: 600; font-size: 12px; }
.feed-chips .chip.on .n { color: inherit; opacity: .7; }

.tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tl::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--hair); border-radius: 2px; }
.tl.inner { padding-left: 0; margin-top: 6px; } .tl.inner::before { display: none; }
.tl-day { position: relative; margin: 18px 0 8px 44px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tl-day:first-child { margin-top: 6px; }
.te { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; margin: 0 0 10px; }
.te-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
          background: var(--surface); box-shadow: 0 0 0 4px var(--bg), var(--shadow); color: var(--muted); font-size: 13px; margin-top: 6px; }
.te-dot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.te-dot .avatar, .te-dot .te-av { width: 28px; height: 28px; border-radius: 50%; }
.te-box { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 11px 16px 12px; min-width: 0; }
.te-head { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; line-height: 1.45; }
.te-who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.te-verb { color: var(--muted); }
.te-head time { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.te-card { border: 0; background: var(--wash-2); color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 600; padding: 1px 8px;
           border-radius: 999px; cursor: pointer; white-space: nowrap; }
.te-card:hover { color: var(--ink); }
.te-link { color: var(--brand-deep); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.te-sub { margin-top: 6px; font-weight: 650; font-size: 14px; line-height: 1.4; }
.te-text { margin-top: 6px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; color: var(--ink); }
.te-text p { margin: 0 0 6px; } .te-text p:last-child { margin-bottom: 0; }
.te-text ul, .te-text ol { margin: 4px 0 6px; padding-left: 20px; }
.te-more > summary { list-style: none; cursor: pointer; } .te-more > summary::-webkit-details-marker { display: none; }
.te-show { display: inline-block; margin-top: 4px; color: var(--brand-deep); font-weight: 600; font-size: 13px; }
.te-more[open] > summary { display: none; }
.te-files { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 13px; } .te-files a { color: var(--brand-deep); text-decoration: none; }
.te-pill { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--wash-2); color: var(--muted); margin-left: 4px; }
.te-pill.wait { color: var(--brand-deep); background: color-mix(in srgb, var(--brand) 15%, transparent); }
.te-pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.te-pill.bad { color: var(--urgent); background: color-mix(in srgb, var(--urgent) 10%, transparent); }
/* what each kind looks like */
.te.email.theirs .te-dot { color: var(--medium); box-shadow: 0 0 0 4px var(--bg), 0 0 0 1px color-mix(in srgb, var(--medium) 45%, transparent); }
.te.email.theirs .te-box { box-shadow: 0 0 0 1px color-mix(in srgb, var(--medium) 28%, transparent); }
.te.email.ours .te-dot { color: var(--ok); }
.te.draft .te-dot { color: var(--high); }
.te.draft .te-box { background: color-mix(in srgb, var(--high) 6%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--high) 35%, transparent); }
.te.approval .te-dot { color: var(--wait); }
.te.approval.live .te-box { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent); }
.te.slack.human .te-box { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent); }
.te.cardev .te-box, .te.approval.small .te-box, .te.comment .te-box { padding: 8px 14px; }
.te.cardev .te-head, .te.approval.small .te-head { font-size: 13px; }
.te.cardev.completed .te-dot { box-shadow: 0 0 0 4px var(--bg), 0 0 0 2px color-mix(in srgb, var(--ok) 60%, transparent); }
.te.cardev.blocked .te-dot { box-shadow: 0 0 0 4px var(--bg), 0 0 0 2px color-mix(in srgb, var(--wait) 60%, transparent); }
.te.fold { margin-bottom: 8px; }
.te.fold .te-dot { width: 10px; height: 10px; margin: 8px 9px 0; box-shadow: 0 0 0 4px var(--bg); background: var(--faint); }
.te-fold > summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; padding: 3px 0; }
.te-fold > summary::-webkit-details-marker { display: none; }
.te-fold > summary::before { content: "＋ "; color: var(--faint); }
.te-fold[open] > summary::before { content: "－ "; }
.te-fold .te-box { background: color-mix(in srgb, var(--surface) 70%, transparent); }
@media (max-width: 640px) { .tl::before { left: 13px; } .te { grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
  .te-dot { width: 22px; height: 22px; } .te-dot .avatar, .te-dot .te-av { width: 22px; height: 22px; } .tl-day { margin-left: 32px; } .te-box { padding: 10px 12px; } }
.mr-compact-note { color: var(--faint); font-size: 12.5px; padding: 4px 0 8px; }
.arc-reader .mr-head h2 { font-size: 15px; margin: 0 0 4px; }
.te-older { margin-top: 8px; border-top: 1px solid var(--hair); padding-top: 6px; }
.te-older > summary { list-style: none; cursor: pointer; color: var(--brand-deep); font-size: 13px; font-weight: 600; }
.te-older > summary::-webkit-details-marker { display: none; }
.te-older .te-dot { display: none; } .te-older .te { grid-template-columns: minmax(0, 1fr); } .te-older .te-box { box-shadow: none; padding: 8px 0 0; background: none; }
.tl-more { margin: 4px 0 0 44px; }
.side-row .grow { flex: 1; min-width: 0; }
.side-x { border: 0; background: none; color: var(--faint); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.side-x:hover { color: var(--urgent); }

/* disconnected mailboxes (27 Oct) */
.mb-banner { display: flex; gap: 12px; align-items: center; margin: 4px 0 16px; padding: 12px 16px; border-radius: var(--r-lg);
             background: color-mix(in srgb, var(--urgent) 9%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--urgent) 30%, transparent); }
.mb-banner > svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--urgent); stroke-width: 1.8; }
.mb-text { flex: 1; font-size: 14px; line-height: 1.45; }
.mb-act { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) { .mb-banner { flex-wrap: wrap; } .mb-act { width: 100%; } }
.acct-sub.bad { color: var(--urgent); }
.acct-top .pill.bad { margin-left: 8px; } .acct-top .btn.sm { margin-left: 8px; }

/* ---------- phones (27 Oct): tab bar + More sheet, and the arc pages ---------- */
.tab-more, .more-sheet, .more-scrim { display: none; }
#view { min-width: 0; }
#view a, #view b, .te-files a, .mr-att, .fi-files a { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .tab-more { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 20px;
              border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 500; cursor: pointer; }
  .tab-more svg { width: 22px; height: 22px; fill: currentColor; }
  .tab-more.active { color: var(--ink); background: var(--wash); }
  .more-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(20, 16, 8, .28); opacity: 0; transition: opacity .25s var(--ease); }
  .more-scrim.on { opacity: 1; }
  .more-sheet { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 80vh; overflow-y: auto;
                padding: 4px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--surface);
                box-shadow: var(--overlay-shadow); transform: translateY(105%); transition: transform .32s var(--ease); }
  .more-sheet.on { transform: none; }
  .more-sheet[hidden], .more-scrim[hidden] { display: none; }
  .more-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
  .more-nav a { padding: 12px 12px; font-size: 16px; }
  .more-nav .nav-label { margin: 14px 12px 4px; }

  /* arcs */
  .story .sh { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 14px 14px 14px 16px; }
  .story .schip { grid-column: 1; justify-self: start; }
  .story .chev { grid-column: 2; grid-row: 1; }
  .story .stt { grid-column: 1 / -1; }
  .story .t { font-size: 15px; }
  .arc-head h1 { font-size: 22px; }
  .arc-meta { gap: 2px 10px; font-size: 12.5px; }
  .arc-grid { gap: 18px; margin-top: 14px; }
  .arc-main { gap: 18px; }
  .arc-now { padding: 14px 16px; }
  .arc-now .snow { font-size: 15px; }
  .move { padding: 14px 14px 14px 16px; }
  .mv-h { font-size: 14.5px; }
  .mv-act .btn { flex: 1; justify-content: center; }
  .move.reply .mv-h { flex-direction: column; align-items: flex-start; gap: 6px; }
  .move.reply .chip.mini { max-width: 100%; margin-left: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .arc-reader { margin: 10px -6px 0 -8px; }
  .feed-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .feed-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .feed-chips::-webkit-scrollbar { display: none; }
  .feed-chips .chip { flex: none; }
  .feed-bar > [data-feed-refresh] { align-self: flex-start; }
  .tl-more { margin-left: 32px; }
  .side-box { padding: 12px 14px; }
  .arc-find input { font-size: 16px; }  /* 16px stops iOS zooming into the field */
  .move.reply textarea, .mr-form textarea, .mr-form input, #cmt { font-size: 16px; }
  .now-page .greet h1, .stories-page .greet h1 { font-size: 24px; }
}
@media (max-width: 860px) {
  .d-foot .row { flex-wrap: wrap; row-gap: 8px; }
  .d-foot .row .btn { flex: 1 1 auto; justify-content: center; }
  .dep, .dep-open { min-width: 0; max-width: 100%; }
  .dep-open { flex-wrap: wrap; white-space: normal; text-align: left; }
  .dep-t, .dep-s { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .props { grid-template-columns: 1fr; }
}
@media (max-width: 860px) { .aq-btn kbd, kbd { display: none; } }
.mr-rt { overflow: hidden; text-overflow: ellipsis; }
.mr-rt b { overflow-wrap: normal; }

/* live work (27 Oct): a bot working on the arc right now */
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: live-pulse 1.8s ease-out infinite; flex: none; }
.schip.live { --c: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.schip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: live-pulse 1.8s ease-out infinite; }
.live-line { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 13px; color: var(--ok); }
.live-line b { color: var(--ink); font-weight: 600; }
.arc-live { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.al-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-lg);
          background: color-mix(in srgb, var(--ok) 8%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 32%, transparent); }
.al-av { position: relative; flex: none; } .al-av .avatar { width: 32px; height: 32px; }
.al-av .live-dot { position: absolute; right: -2px; bottom: -2px; border: 2px solid var(--surface); width: 11px; height: 11px; }
.al-main { flex: 1; min-width: 0; }
.al-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; line-height: 1.4; }
.al-when { color: var(--ok); font-weight: 600; font-size: 12.5px; }
.al-link { margin-left: auto; color: var(--brand-deep); font-weight: 600; font-size: 13px; text-decoration: none; }
.al-said { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.al-tool { margin-top: 4px; font-size: 12px; color: var(--faint); }
@media (max-width: 640px) { .al-link { margin-left: 0; } }

/* active (27 Oct): people or bots working on it */
.act-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.schip.active { --c: var(--brand-deep); display: inline-flex; align-items: center; gap: 6px; }
.schip.active::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.live-line .sep { color: var(--faint); margin: 0 2px; }
.live-line { flex-wrap: wrap; color: var(--muted); }
.al-row.person { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent); }
.al-row.person .al-when { color: var(--brand-deep); }
.al-av .act-dot { position: absolute; right: -2px; bottom: -2px; border: 2px solid var(--surface); width: 11px; height: 11px; }
.al-av .avatar.human { width: 32px; height: 32px; }
.act-who { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 4px; vertical-align: middle; }
.act-who .chip { padding: 3px 11px; font-size: 12.5px; }
@media (max-width: 860px) { .act-who { display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 8px -16px 0; padding: 0 16px; scrollbar-width: none; } .act-who .chip { flex: none; } }
/* phones: no sideways scroll (27 Oct): the Active filter row scrolls inside the page width, long code wraps, and the
   main column clips anything that still pokes out (clip, not hidden, so sticky headers keep working) */
@media (max-width: 860px) {
  .act-who { display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 8px 0 0; padding: 0; max-width: 100%; }
  .h { flex-wrap: wrap; } .h .sub { min-width: 0; max-width: 100%; }
  .main { overflow-x: clip; }
}
.te-text code, .sm-body code, .aq-body code, .prose code { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.te-text pre, .sm-body pre, .prose pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }

/* ---------- arc page, third pass (27 Oct): one timeline ---------- */
.arc-page.v3 { max-width: 860px; }
.ah-top { display: flex; align-items: center; gap: 10px; }
.ah-menu { margin-left: auto; position: relative; }
.ah-menu > summary { list-style: none; cursor: pointer; width: 34px; height: 30px; display: grid; place-items: center; border-radius: 10px;
                     color: var(--muted); font-size: 20px; line-height: 1; }
.ah-menu > summary::-webkit-details-marker { display: none; }
.ah-menu > summary:hover, .ah-menu[open] > summary { background: var(--wash-2); color: var(--ink); }
.ah-pop { position: absolute; right: 0; top: 36px; z-index: 30; min-width: 220px; background: var(--surface); border-radius: var(--r);
          box-shadow: var(--overlay-shadow), 0 0 0 1px var(--hair); padding: 6px; display: flex; flex-direction: column; }
.ah-pop > button, .ah-pop > label { position: relative; text-align: left; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink);
          padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.ah-pop > button:hover, .ah-pop > label:hover { background: var(--wash-2); }
.ah-pop select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.who-on { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.arc-page.v3 .arc-now { margin-top: 16px; }
.sunclear-f { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.sunclear-f > summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.sunclear-f p { margin: 6px 0 0; line-height: 1.5; }
.arc-tl { margin-top: 18px; }
.tl-now { background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent);
          padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tl-now-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-deep); }
.nw { border-radius: var(--r-sm); background: var(--wash-2); padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.nw.ask { display: grid; grid-template-columns: auto 1fr; gap: 10px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.nw.ask.lead { background: none; padding: 2px 2px 0; color: var(--muted); font-size: 13.5px; }
.nw > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.nw > summary::-webkit-details-marker { display: none; }
.nw-k { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-deep); white-space: nowrap; padding-top: 2px; }
.nw-t { flex: 1; min-width: 0; font-weight: 600; }
.nw-hint { color: var(--brand-deep); font-size: 12.5px; font-weight: 600; }
.nw-act { display: flex; gap: 6px; align-items: center; }
.nw-body { margin-top: 10px; }
.nw.draft .arc-reader { margin: 10px 0 0; }
.say { margin-top: 4px; }
.say textarea { width: 100%; min-height: 44px; border: 0; border-radius: var(--r-sm); padding: 11px 13px; font: inherit; font-size: 15px; resize: none;
                background: var(--wash-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); }
.say textarea:focus { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 55%, transparent); background: var(--surface); }
.say-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.say-to { flex: 1; color: var(--muted); font-size: 12.5px; }
.tl-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; }
.tl-links .chip { text-decoration: none; }
.arc-tl .feed-bar { margin-top: 4px; }
/* compact entries: one header line and two lines of text, tap to open */
.tl .te-box { cursor: pointer; }
.tl .te-box:not(.open) .te-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl .te-box:not(.open) .te-text p { margin: 0; display: inline; }
.tl .te-box:not(.open) .te-text p + p::before { content: " "; }
.tl .te-box:not(.open) .te-text :is(ul, ol, pre, table, blockquote, h1, h2, h3) { display: inline; margin: 0; padding: 0; }
.tl .te-box:not(.open) .te-files { display: none; }
.tl .te-box.open { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
.tl-cards { margin-top: 14px; }
.tl-cards > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13.5px; padding: 6px 2px; }
.tl-cards .scards { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px 16px; margin-top: 6px; }
@media (max-width: 860px) {
  .tl-now { padding: 12px; }
  .nw-act { width: 100%; } .nw-act .btn { flex: 1; justify-content: center; }
  .say textarea { font-size: 16px; min-height: 68px; }
  .ah-pop { right: -4px; }
}
@media (max-width: 860px) { .tl .te-box:not(.open) .te-who { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }

/* the arc's story (27 Oct): one line per thing that happened, each opening to its sources */
.tl.evs { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px 18px 8px 14px; }
.tl.evs::before { left: 27px; top: 22px; bottom: 22px; }
.tl.evs .tl-day { margin-left: 40px; }
.tl.evs .tl-day:first-child { margin-top: 4px; }
.tl.evs .te { margin-bottom: 4px; }
.tl.evs .te-dot { width: 22px; height: 22px; margin: 7px 3px 0; box-shadow: 0 0 0 4px var(--surface), 0 0 0 1px var(--hair); }
@media (max-width: 640px) {
  .tl.evs { padding: 10px 12px 6px 8px; } .tl.evs::before { left: 18px; } .tl.evs .tl-day { margin-left: 30px; }
  .tl.evs .te-dot { margin: 7px 0 0; }
  .feed-bar { flex-direction: row; align-items: center; }
  .feed-bar .feed-chips { flex: 1; min-width: 0; margin-right: 0; }
  .feed-bar > [data-feed-refresh] { flex: none; align-self: center; }
}
.tl.evs .te-dot svg { width: 12px; height: 12px; }
.ev-box { padding: 6px 4px 8px; min-width: 0; }
.ev-h { display: flex; align-items: baseline; gap: 10px; cursor: pointer; font-size: 14.5px; line-height: 1.45; }
.ev-what { flex: 1; min-width: 0; }
.ev-h time { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-src > summary { list-style: none; cursor: pointer; color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.ev-src > summary::-webkit-details-marker { display: none; }
.ev-src > summary:hover { color: var(--brand-deep); }
.ev-src[open] > summary { color: var(--brand-deep); margin-bottom: 6px; }
.ev-src .tl.inner .te { grid-template-columns: 26px minmax(0, 1fr); }
.te.ev.email_in .te-dot { color: var(--medium); } .te.ev.email_out .te-dot { color: var(--ok); }
.te.ev.approval .te-dot, .te.ev.decision .te-dot { color: var(--wait); }
.te.ev.problem .te-dot { background: color-mix(in srgb, var(--urgent) 18%, var(--surface)); }
.te.ev.decision .ev-what b, .te.ev.problem .ev-what { font-weight: 600; }
.ev-upd { color: var(--faint); font-size: 12.5px; margin: 0 0 6px 44px; }

/* Mail search and snooze (29 Oct) */
.mr-search { flex: 1 1 220px; max-width: 340px; }
.mr-q { width: 100%; border: 0; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.mr-q:focus { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 55%, transparent); }
.mr-sres { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.snz-pop.snz-inline { position: absolute; top: calc(100% + 6px); right: 0; }
.ah-snz { margin-left: auto; margin-right: 6px; }
.ah-snz + .ah-menu { margin-left: 0; }
@media (max-width: 760px) {
  .mr-keys { display: none; }
  .mr-bar .aq-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .mr-bar .aq-cats::-webkit-scrollbar { display: none; }
  .mr-search { max-width: none; flex-basis: 100%; }
  .mr-links { flex-wrap: wrap; }
}
.mr-row { scroll-margin-top: 96px; }
.mr-back { margin-bottom: 10px; }
.mr-phone { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); overflow: hidden; }
@media (max-width: 760px) { .mr-bar .aq-cat { white-space: nowrap; flex: none; } }
/* scroll areas don't hand the wheel to the page, and sticky panes sit below the sticky search bar (29 Oct) */
.mr-pane, .aq-d, .sidebar { overscroll-behavior: contain; }
.aq-pane { top: 80px; max-height: calc(100vh - 96px); }
.mr-pane { top: 80px; max-height: calc(100vh - 96px); }

/* no scrollbars anywhere: everything still scrolls (29 Oct) */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
/* new attachments in the draft editor */
.mr-adds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mr-attach { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.mr-attach svg, .mr-adds .att svg { width: 14px; height: 14px; }
.mr-x { border: 0; background: none; color: var(--faint); cursor: pointer; font: inherit; padding: 0 0 0 6px; }
/* a deploy: "Updating…", then "Refresh to update" */
.update-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 14px;
              font-size: 13.5px; font-weight: 600; background: var(--brand); color: var(--on-brand); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.update-bar.busy { background: var(--surface); color: var(--muted); box-shadow: 0 0 0 1px var(--hair); }
.update-bar button { border: 0; border-radius: 999px; padding: 5px 12px; font: inherit; cursor: pointer; background: var(--on-brand); color: var(--brand); }
.ub-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--hair); border-top-color: var(--brand); animation: ubspin .8s linear infinite; }
@keyframes ubspin { to { transform: rotate(360deg); } }
.update-bar button:hover { opacity: .9; }

/* ---------- Today (29 Oct): one ranked list, grouped by the kind of effort ---------- */
.today-page { max-width: 860px; }
.td-bar { height: 6px; border-radius: 999px; background: var(--hair); overflow: hidden; margin: 16px 2px 24px; }
.td-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .5s var(--ease); }
.td-grp { margin: 0 0 24px; }
.td-gh { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
.td-gh b { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.td-gh span { color: var(--faint); font-size: 12.5px; }
.td-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.td-it { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 16px 18px;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); cursor: default; transition: box-shadow .2s var(--ease); }
.td-it.sel { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 70%, transparent), var(--shadow); }
.td-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--wash-2); margin-top: 1px; }
.td-main { min-width: 0; }
.td-q { font-weight: 650; font-size: 15.5px; line-height: 1.4; overflow-wrap: anywhere; }
.td-min { display: inline-block; white-space: nowrap; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; vertical-align: 1px;
  color: var(--brand-deep); background: color-mix(in srgb, var(--brand) 16%, transparent); }
.td-why { margin-top: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.td-why em { font-style: normal; font-weight: 600; color: var(--ink); }
.td-why em.hot { color: var(--urgent); }
.td-rec { margin-top: 3px; color: var(--ok); font-size: 13.5px; line-height: 1.45; }
.td-dflt { margin-top: 3px; color: var(--faint); font-size: 13px; line-height: 1.45; }
.td-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; color: var(--faint); font-size: 12.5px; }
.td-meta .td-arc { color: var(--muted); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.td-meta .td-arc:hover { color: var(--ink); text-decoration: underline; }
.td-biz { font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.td-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; }
.td-acts .btn .k { margin-left: 2px; font-size: 10.5px; font-weight: 700; opacity: .55; }
.td-ans { margin-top: 12px; }
.td-ans textarea { width: 100%; border: 0; border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: 14.5px; resize: vertical; background: var(--wash-2); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair); }
.td-ans textarea:focus { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 55%, transparent); }
.td-ans-f { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.td-fold { margin: 0 0 10px; }
.td-fold > summary { padding: 14px 18px; border-radius: var(--r); background: color-mix(in srgb, var(--surface) 60%, transparent); box-shadow: 0 0 0 1px var(--hair); color: var(--muted); font-size: 14px; }
.td-fold > summary b { color: var(--ink); font-weight: 650; }
.td-fold[open] > summary { margin-bottom: 8px; }
.td-keys { margin: 24px 2px 0; color: var(--faint); font-size: 12.5px; }
.td-keys kbd { margin-right: 2px; }
@media (max-width: 760px) {
  .td-it { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .td-n { display: none; }
  .td-acts { justify-content: flex-start; margin-top: 8px; }
  .td-acts .btn .k, .td-keys { display: none; }
  .td-meta .td-arc { max-width: 100%; }
}

/* ---------- Arcs (29 Oct): reference, grouped by account ---------- */
.arcs2 { max-width: 980px; }
.arc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; }
.arc-tabs .chip .n { margin-left: 6px; color: var(--faint); font-weight: 600; font-size: 12px; }
.arc-tabs .chip.on .n { color: inherit; opacity: .7; }
.arc-grp { margin: 0 0 20px; }
.ag-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; font-size: 14px; font-weight: 700; }
.ag-h a { color: var(--ink); text-decoration: none; } .ag-h a:hover { text-decoration: underline; }
.ag-h .live-dot { margin-right: 6px; }
.ag-n { color: var(--faint); font-weight: 600; font-size: 12.5px; }
.ag-list { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.arc-line { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 18px;
  color: inherit; text-decoration: none; border-top: 1px solid var(--hair); transition: background .15s var(--ease); }
.arc-line:first-child { border-top: 0; }
.arc-line:hover { background: var(--wash-2); }
.arc-line .schip { justify-self: start; }
.al-m { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.al-t { font-weight: 650; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.al-s { color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.al-s b { color: var(--ink); font-weight: 600; }
.al-w { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12.5px; white-space: nowrap; margin-top: 2px; }
.ag-more { margin: 8px 2px 0; border: 0; background: none; padding: 4px 0; color: var(--brand-deep); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
@media (max-width: 760px) {
  .arc-line { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 14px; }
  .arc-line .schip { grid-column: 1; grid-row: 1; }
  .arc-line .al-w { grid-column: 2; grid-row: 1; }
  .arc-line .al-m { grid-column: 1 / -1; }
  .al-s { -webkit-line-clamp: 2; }
}

/* ---------- spacing pass (29 Oct) ---------- */
.story .sh .schip { justify-self: start; }
@media (max-width: 760px) {
  .mr-bar .aq-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .pr-head { position: relative; } #pr-refresh { position: absolute; top: 4px; right: 0; }
  .pr-filters { flex-wrap: nowrap; overflow-x: auto; margin: 14px -16px 4px; padding: 0 16px; scrollbar-width: none; } .pr-filters .chip { flex: none; }
  .svc-h { flex-wrap: wrap; } .svc-h > .pill { margin-left: 62px; }
  .lg-tools { flex-direction: row; flex-wrap: wrap; } .lg-tools .conn-search { flex: 1 1 100%; order: -1; } .lg-tools .btn { flex: 1; }
}
@media (max-width: 640px) {
  .feed-bar .feed-chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
}
@media (max-width: 1180px) {
  .aq-inline { padding: 0; } .aq-inline .aq-d { border-radius: 0; box-shadow: none; }
}

.td-it { cursor: pointer; } .td-it:hover { box-shadow: var(--shadow-lift); } .td-it.sel:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 70%, transparent), var(--shadow-lift); }

/* chat on the arc page (29 Oct): the arc's Slack thread as a conversation, answered here */
.chat { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--hair); }
.chat-h { display: flex; align-items: center; gap: 8px; }
.chat-who { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.chat-who .muted { font-size: 12.5px; }
.chat-h .chip { text-decoration: none; }
.cm-av, .chat .avatar.human { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.cm-av.sm { width: 22px; height: 22px; }
.chat-more { align-self: center; border: 0; background: none; color: var(--brand-deep); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 2px 8px; }
.chat-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cm { display: flex; gap: 10px; align-items: flex-start; max-width: 88%; }
.cm.mine { align-self: flex-end; }
.cm-b { min-width: 0; padding: 9px 13px 10px; border-radius: 4px 16px 16px 16px; background: var(--wash-2); box-shadow: inset 0 0 0 1px var(--hair); }
.cm.mine .cm-b { border-radius: 16px 4px 16px 16px; background: color-mix(in srgb, var(--brand) 16%, var(--surface)); box-shadow: none; }
.cm.pending { opacity: .6; }
.cm-h { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; margin-bottom: 2px; }
.cm-h span { color: var(--faint); }
.cm-h .cm-tag { color: var(--brand-deep); font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.cm-text { font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.cm-text > :first-child { margin-top: 0; } .cm-text > :last-child { margin-bottom: 0; }
.cm-text p { margin: 0 0 8px; } .cm-text ul, .cm-text ol { margin: 0 0 8px; padding-left: 20px; }
.cm-text blockquote { margin: 0 0 8px; padding: 2px 12px; border-left: 3px solid var(--brand); color: var(--muted); }
.cm-text pre { white-space: pre-wrap; font-size: 12.5px; }
.cm-text a { color: var(--brand-deep); }
.cm-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cm.noise { align-self: center; max-width: 100%; font-size: 12px; color: var(--faint); }
.cm.noise summary { cursor: pointer; list-style: none; } .cm.noise summary::-webkit-details-marker { display: none; }
.cm.noise .cm-text { font-size: 12.5px; margin-top: 6px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--wash-2); color: var(--muted); }
.cm-new { display: flex; align-items: center; gap: 10px; color: var(--brand-deep); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cm-new::before, .cm-new::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--brand) 45%, transparent); }
.chat-empty { margin: 0; color: var(--muted); font-size: 13.5px; }
.chat-typing { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.chat-typing .dots { display: inline-flex; gap: 3px; padding: 8px 10px; border-radius: 12px; background: var(--wash-2); }
.chat-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); animation: typing 1.2s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .15s; } .chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
@media (max-width: 640px) { .cm { max-width: 100%; } .chat-who .muted { display: none; } }

/* Today: replies and changes on followed arcs */
.td-upd .td-gh { flex-wrap: wrap; align-items: center; }
.td-upd .td-gh .chip:first-of-type { margin-left: auto; }
.td-it.upd { grid-template-columns: 28px minmax(0, 1fr); padding: 13px 16px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent), var(--shadow); }
.td-it.upd .avatar { width: 28px; height: 28px; border-radius: 50%; }
.upd-dot { background: var(--brand); transform: scale(.45); }
.upd-h { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.upd-ago { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.upd-t { margin-top: 3px; color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm.noise.ask { align-self: stretch; color: var(--muted); } .cm.noise summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm.noise { align-self: stretch; min-width: 0; text-align: center; } .cm.noise details { min-width: 0; width: 100%; } .cm.noise .cm-text { text-align: left; }

/* the arc page (29 Oct, fourth pass): the arc on the left and its chat beside it; on narrower screens Overview, Chat and
   Timeline are tabs, the chat full height with its box at the bottom */
.arc-page.v4 { max-width: 860px; }
.arc-page.v4 .arc-now { margin-top: 0; }
.arc-page.v4 .tl-now { margin-top: 14px; }
.arc-page.v4 .tl-h { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 26px 2px 0; }
.arc-page.v4 .tl-links { margin-top: 10px; }
.arc-panes { display: flex; gap: 2px; padding: 3px; margin: 14px 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.arc-panes button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600;
  border: 0; background: none; color: var(--muted); padding: 8px 10px; border-radius: 999px; cursor: pointer; transition: background .2s var(--ease), color .2s; }
.arc-panes button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.arc-panes .n { font-size: 11px; font-weight: 700; min-width: 18px; line-height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: var(--on-brand); }
.pane-dots { display: inline-flex; gap: 2px; } .pane-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand-deep); animation: typing 1.2s infinite ease-in-out; }
.pane-dots i:nth-child(2) { animation-delay: .15s; } .pane-dots i:nth-child(3) { animation-delay: .3s; }
.arc-page.v4[data-pane="ov"] :is(.pane-tl, .pane-chat), .arc-page.v4[data-pane="chat"] :is(.pane-ov, .pane-tl),
.arc-page.v4[data-pane="tl"] :is(.pane-ov, .pane-chat) { display: none; }
.arc-page.v4[data-pane="tl"] .tl-h { display: none; }
.arc-chatcol .chat { margin: 0; padding: 14px 16px 12px; border: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.chat-h { padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.chat-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.chat-body:empty { display: none; }
.chat-typing .tw { line-height: 1.4; }
.chat-typing.on .dots i { background: var(--brand-deep); }
/* phones and narrow windows: the chat's box stays above the tab bar */
.arc-chatcol .say { position: sticky; bottom: 0; margin: 0 -16px -12px; padding: 10px 16px 12px; border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@media (max-width: 860px) {
  .arc-chatcol .say { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 64px); }
  .arc-chatcol .chat { padding: 12px 12px 12px; } .arc-chatcol .say { margin: 0 -12px -12px; padding: 10px 12px 12px; }
  .arc-chatcol .say textarea { min-height: 46px; }
  .arc-chatcol .say-to { display: none; } .arc-chatcol .say-foot { justify-content: flex-end; }
}
/* wide: two columns, the chat sticky beside the arc and scrolling inside itself */
@media (min-width: 1200px) {
  .arc-page.v4 { max-width: 1340px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); gap: 24px; align-items: start; }
  .arc-panes { display: none; }
  .arc-page.v4[data-pane] :is(.pane-ov, .pane-tl, .pane-chat) { display: block; }
  .arc-page.v4[data-pane] .tl-h { display: block; }
  .arc-chatcol { position: sticky; top: 72px; height: calc(100vh - 150px); min-height: 420px; }
  .arc-chatcol .chat { height: 100%; }
  .arc-chatcol .chat-body { flex: 1; overflow-y: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px; overscroll-behavior: contain; }
  .arc-chatcol .chat-body::-webkit-scrollbar { display: none; }
  .arc-chatcol .cm { max-width: 94%; }
  .arc-chatcol .say { position: static; }
}
.arc-page.v4 .arc-main { gap: 14px; }
.arc-page.v4 .arc-head { margin-bottom: 0; }
.arc-page.v4 .arc-panes { margin: 0; }
.arc-page.v4 .arc-tl { margin: 0; }
.arc-page.v4 .tl-h { margin-top: 12px; }
.arc-page.v4 .nw:not([open]) > summary { padding: 2px 0; }
/* Arcs on wide screens: the account groups in two columns, each line stacked like on a phone */
@media (min-width: 1400px) {
  .arcs2 { max-width: 1340px; }
  .ag-cols { columns: 2; column-gap: 22px; }
  .ag-cols .arc-grp { break-inside: avoid; display: inline-block; width: 100%; }
  .ag-cols .arc-line { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 16px; }
  .ag-cols .arc-line .schip { grid-column: 1; grid-row: 1; }
  .ag-cols .arc-line .al-w { grid-column: 2; grid-row: 1; }
  .ag-cols .arc-line .al-m { grid-column: 1 / -1; }
}
.td-due { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  color: var(--urgent); background: color-mix(in srgb, var(--urgent) 12%, transparent); }
.say-connect { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--wash-2); box-shadow: inset 0 0 0 1px var(--hair); }
.say-connect p { flex: 1; margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.say-connect .btn { text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) { .say-connect { flex-direction: column; align-items: stretch; } }

/* Just decided and what changed (30 Oct) */
.aq-justs { display: grid; gap: 6px; margin: 12px 0; }
.arc-page.v4 .aq-justs { margin-top: 14px; }
.aq-justs-h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.aq-just { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--wash-2); font-size: 13.5px; }
.aq-just-t { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aq-just-m { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.aq-just .aq-st.run { animation: aq-pulse 1.4s ease-in-out infinite; }
@keyframes aq-pulse { 50% { opacity: .45; } }
@media (max-width: 860px) {
  .aq-just { flex-wrap: wrap; row-gap: 2px; }
  .aq-just-t { flex-basis: calc(100% - 90px); white-space: normal; }
  .aq-just-m { width: 100%; white-space: normal; padding-left: 74px; }
}
.flash { animation: flash 2.6s var(--ease); }
@keyframes flash { from { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--brand) 28%, transparent); } }
.nw-rec { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.nw-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.nw-acts .nw-hint { color: var(--muted); font-weight: 500; }
.td-people { margin: 14px 0 18px; }
.td-people .act-who { margin: 0; }
.td-people .chip { padding: 5px 13px; font-size: 13px; }
.td-people .n { opacity: .6; margin-left: 3px; }
.td-for { font-weight: 700; color: var(--ink); }
.chat-appr { display: none; }
@media (max-width: 860px) {
  .chat-appr { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
  .chat-appr-r { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--wash-2); box-shadow: var(--shadow); font-size: 13.5px; }
}
