/* Ask Acter. Every class starts with ak- so nothing here touches the rest of the app.
   Black and white with depth, from the app's own tokens, so light and dark follow Settings > Appearance.
   No accent color: the person's words are ink, Acter's answers are paper sheets, and the one moving thing is the work line
   (each lookup into the company's data, like a ticket moving station to station). Red only when something failed.
   2026-11-28: benchmarked on ChatGPT and Claude: chats on the left, one reading column, the composer docked at the bottom. */
:root {
  --ak-sh-1: 0 1px 2px rgba(16, 24, 40, .06);
  --ak-sh-2: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 22px -10px rgba(16, 24, 40, .16), 0 26px 48px -30px rgba(16, 24, 40, .24);
  --ak-sh-box: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 30px -12px rgba(16, 24, 40, .20), 0 36px 60px -40px rgba(16, 24, 40, .28);
  --ak-sh-pop: 0 2px 6px rgba(16, 24, 40, .08), 0 22px 48px -14px rgba(16, 24, 40, .30);
  --ak-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ak-col: 760px;
}
:root[data-theme="dark"] {
  --ak-sh-1: 0 1px 0 rgba(0, 0, 0, .35);
  --ak-sh-2: 0 1px 2px rgba(0, 0, 0, .45), 0 12px 26px -12px rgba(0, 0, 0, .7);
  --ak-sh-box: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 36px -14px rgba(0, 0, 0, .8);
  --ak-sh-pop: 0 2px 6px rgba(0, 0, 0, .45), 0 24px 50px -12px rgba(0, 0, 0, .75);
}

/* ---- frame: chats on the left, the top bar and the conversation beside them ---- */
main.ak { position: relative; height: 100vh; height: 100dvh; min-height: 520px; overflow: hidden; container: ak / inline-size; background: var(--bg); color: var(--text); }
.ak-grid { position: relative; height: 100%; display: grid; grid-template-columns: 272px minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr);
  grid-template-areas: "side top" "side talk"; transition: grid-template-columns .2s ease; }
.ak-side-shut .ak-grid { grid-template-columns: 0 minmax(0, 1fr); }
.ak [hidden], .ak-pop[hidden] { display: none !important; }
.ak-grow { flex: 1 1 auto; min-width: 0; }
.ak-status { margin: 0; top: 0; left: 0; }
.ak-scrim { display: none; }

.ak-top { grid-area: top; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 18px; min-width: 0; z-index: 30; border-bottom: 1px solid transparent; transition: border-color .15s; }
.ak:has(.ak-scroll.ak-scrolled) .ak-top { border-bottom-color: var(--line); }
.ak-title { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; margin-right: 4px; }
.ak .ak-side-toggle, .ak .ak-new-top { display: none; }
.ak-side-shut .ak-side-toggle, .ak-side-shut .ak-new-top { display: inline-flex; }
.ak-usage { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px;
  background: none; font: inherit; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.ak-usage:hover, .ak-usage[aria-expanded="true"] { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.ak-usage.ak-over { color: var(--red); font-weight: 600; }

/* ---- buttons ---- */
.ak-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none; flex: none; }
.ak-btn:hover { border-color: var(--text); color: var(--text); }
.ak-btn.ak-primary { background: var(--text); border-color: var(--text); color: var(--surface); }
.ak-btn.ak-primary:hover { opacity: .88; }
.ak-btn.ak-danger { background: var(--red); border-color: var(--red); color: #fff; }
.ak-btn:disabled { opacity: .5; cursor: default; }
.ak-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; flex: none; }
.ak-icon-btn:hover, .ak-icon-btn[aria-expanded="true"] { background: var(--subtle); color: var(--text); }
.ak-mini { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.ak-mini:hover { background: var(--line); color: var(--text); }
.ak-kbd { margin-left: auto; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-size: 11px; color: var(--faint); line-height: 18px; }

/* ---- conversation ---- */
.ak-talk { grid-area: talk; position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ak-scroll { flex: 1 1 auto; overflow-y: auto; padding: 20px 24px 40px; scroll-padding-bottom: 40px; overscroll-behavior: contain; }
.ak-log { max-width: var(--ak-col); margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.ak-dockwrap { position: relative; }
.ak-dock { position: relative; padding: 0 24px 14px; }
.ak-dock::before { content: ""; position: absolute; left: 0; right: 0; top: -32px; height: 32px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.ak-dock:empty { display: none; }
.ak-dock .ak-composer { max-width: var(--ak-col); margin: 0 auto; }
.ak-jump { position: absolute; left: 50%; top: -50px; z-index: 6; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 11px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: var(--ak-sh-pop);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; animation: ak-in .16s ease-out both; }
.ak-jump:hover { border-color: var(--text); }

/* the person's words: ink. Copy and Edit under them on hover (always on touch) */
.ak-me { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ak-bubble { max-width: min(82%, 600px); padding: 10px 15px; border-radius: 16px 16px 4px 16px; background: var(--text); color: var(--surface);
  font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--ak-sh-1); }
.ak-me-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.ak-me:hover .ak-me-acts, .ak-me:focus-within .ak-me-acts { opacity: 1; }
.ak-edit { width: min(100%, 640px); display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--text);
  border-radius: 14px; box-shadow: var(--ak-sh-box); }
.ak-edit .ak-input { min-height: 48px; }
.ak-edit-note { margin: 0; font-size: 12px; color: var(--muted); }
.ak-edit-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* Acter's answers: a paper sheet with the eye beside it */
.ak-acter { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.ak-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--ak-sh-1);
  display: flex; align-items: center; justify-content: center; color: var(--text); }
.ak-body { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; box-shadow: var(--ak-sh-2); padding: 14px 18px 8px; }
.ak-working .ak-body { padding-bottom: 14px; }
.ak-err .ak-body { box-shadow: inset 3px 0 0 var(--red), var(--ak-sh-1); padding-bottom: 10px; }
.ak-partial { opacity: .72; }
.ak-errline { display: flex; align-items: baseline; gap: 9px; margin: 0; font-size: 14.5px; color: var(--text-2); }
.ak-errdot { width: 8px; height: 8px; border-radius: 2px; background: var(--red); flex: none; transform: translateY(-1px); }
.ak-muted { color: var(--muted); }

/* the work line: what Acter is reading right now, then a receipt of everything it checked */
.ak-liveline { display: flex; align-items: center; gap: 10px; min-height: 24px; font-size: 14px; }
.ak-liveline-t { font-weight: 600; color: var(--text); background: linear-gradient(90deg, var(--muted) 0%, var(--text) 40%, var(--text) 60%, var(--muted) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: ak-sheen 1.8s linear infinite; }
.ak-liveline-n { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ak-pulse { width: 10px; height: 10px; border-radius: 2.5px; background: var(--text); animation: ak-pulse 1.4s ease-out infinite; flex: none; }
.ak-receipt-dots { display: inline-flex; gap: 3px; flex: none; }
.ak-receipt-dots i { width: 6px; height: 6px; border-radius: 1.5px; background: var(--text); }
.ak-receipt-dots i.ak-dot-now { background: transparent; border: 1.5px solid var(--text); animation: ak-pulse 1.4s ease-out infinite; }
@keyframes ak-sheen { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes ak-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--text) 35%, transparent); } 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes ak-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ak-jump { animation-name: ak-in-x; }
@keyframes ak-in-x { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }

.ak-receipt { margin: -2px 0 10px; font-size: 12.5px; color: var(--muted); }
.ak-receipt summary, .ak-receipt.ak-flat { display: flex; align-items: center; gap: 8px; list-style: none; }
.ak-receipt summary { cursor: pointer; width: fit-content; border-radius: 5px; padding: 1px 2px; margin: -1px -2px; }
.ak-receipt summary::-webkit-details-marker { display: none; }
.ak-receipt summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin-left: 1px; transition: transform .15s; }
.ak-receipt[open] summary::after { transform: rotate(45deg); }
.ak-receipt summary:hover { color: var(--text); }
.ak-receipt[open] summary { margin-bottom: 8px; }
.ak-trail { position: relative; list-style: none; margin: 0 0 12px; padding: 0 0 10px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.ak-trail::before { content: ""; position: absolute; left: 5px; top: 13px; bottom: 23px; width: 2px; background: var(--line-strong); }
.ak-trail li { position: relative; display: flex; align-items: center; gap: 12px; min-height: 26px; }
.ak-node { position: relative; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--text); background: var(--text); flex: none; z-index: 1; }
.ak-step { font-size: 13px; color: var(--text-2); min-width: 0; }
.ak-ms { margin-left: auto; padding-left: 12px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* answer text: a reading column. Headings, lists, quotes, code, tables, links and record chips */
.ak-answer { font-size: 15px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.ak-answer > :first-child { margin-top: 0; }
.ak-answer p { margin: 0 0 10px; }
.ak-answer > :last-child { margin-bottom: 4px; }
.ak-answer .ak-h { margin: 18px 0 6px; font-size: 16px; font-weight: 650; letter-spacing: -0.005em; line-height: 1.35; }
.ak-answer h4.ak-h { font-size: 15px; margin-top: 14px; }
.ak-list { margin: 0 0 10px; padding-left: 22px; }
.ak-list .ak-list { margin: 2px 0 4px; }
.ak-list li { margin: 3px 0; padding-left: 2px; }
.ak-list li::marker { color: var(--muted); }
.ak-quote { margin: 0 0 10px; padding: 2px 0 2px 14px; border-left: 3px solid var(--line-strong); color: var(--text-2); }
.ak-hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.ak-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.ak-link:hover { text-decoration-color: var(--text); }
.ak-code { font-family: var(--ak-mono); font-size: .86em; background: var(--subtle); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.ak-codeblock { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--subtle); overflow: hidden; }
.ak-codehead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 4px 3px 12px; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted); }
.ak-pre { margin: 0; padding: 12px 14px; overflow-x: auto; font-family: var(--ak-mono); font-size: 13px; line-height: 1.55; white-space: pre; tab-size: 2; }
.ak-pre:focus-visible { outline-offset: -2px; }
.ak-tablebox { margin: 4px 0 12px; }
.ak-table-wrap { overflow: auto; max-height: min(60vh, 480px); border: 1px solid var(--line); border-radius: 8px; overscroll-behavior-x: contain; }
.ak-table-wrap:focus-visible { outline-offset: 1px; }
/* as wide as its cells need (short values never break), at least the sheet's width; long text wraps at 320 px; wider scrolls sideways */
.ak-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13.5px; line-height: 1.45; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
.ak-table th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 600; color: var(--text-2); background: var(--subtle); padding: 7px 12px;
  box-shadow: inset 0 -1px 0 var(--line-strong); white-space: nowrap; }
.ak-table td { max-width: 320px; padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ak-table tbody tr:last-child td { border-bottom: 0; }
.ak-table tbody tr:hover td { background: color-mix(in srgb, var(--subtle) 70%, transparent); }
.ak-table .ak-num { text-align: right; white-space: nowrap; }
.ak-table .ak-mid { text-align: center; }
.ak-tabletools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0 0 2px; font-size: 12px; color: var(--muted); }
.ak-keep { white-space: nowrap; }
.ak-ref { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; margin: 0 1px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--subtle);
  color: var(--text); font: inherit; font-size: 13px; font-weight: 600; line-height: 1; text-decoration: none; vertical-align: 1px; cursor: pointer; white-space: nowrap; }
.ak-ref:hover { border-color: var(--text); }
/* the soft caret while words arrive */
.ak-caret { display: inline-block; width: .5em; height: 1.05em; margin-left: 2px; vertical-align: -0.17em; border-radius: 1.5px; background: var(--text);
  opacity: .55; animation: ak-blink 1.05s ease-in-out infinite; }
.ak-pre .ak-caret { height: 1em; }
@keyframes ak-blink { 0%, 100% { opacity: .6; } 50% { opacity: .12; } }

/* what the answer was built from, and what to ask next */
.ak-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 2px; }
.ak-sources-l { font-size: 12px; color: var(--muted); margin-right: 2px; }
.ak-srcs { display: contents; list-style: none; }
.ak-src { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--subtle);
  font-size: 12px; color: var(--text-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-sugg { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ak-sugg-chip { min-height: 34px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text-2); box-shadow: var(--ak-sh-1);
  font: inherit; font-size: 13.5px; line-height: 1.35; text-align: left; cursor: pointer; max-width: 100%; animation: ak-in .2s ease-out both; }
.ak-sugg-chip:nth-child(2) { animation-delay: .05s; }
.ak-sugg-chip:nth-child(3) { animation-delay: .1s; }
.ak-sugg-chip:hover { border-color: var(--text); color: var(--text); }

/* cards: a document to download, a workflow draft */
.ak-cards { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.ak-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--subtle); }
.ak-card-ic { width: 40px; height: 40px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--ak-sh-1); color: var(--text);
  display: flex; align-items: center; justify-content: center; flex: none; }
.ak-card-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ak-card-text strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.ak-meta { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ak-draft { flex-direction: column; align-items: stretch; gap: 12px; }
.ak-draft-head { display: flex; align-items: center; gap: 12px; }
.ak-flow { position: relative; list-style: none; margin: 0 0 0 19px; padding: 2px 0 2px 22px; border-left: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 8px; }
.ak-flow-step { position: relative; display: flex; flex-direction: column; }
.ak-flow-step::before { content: ""; position: absolute; left: -29px; top: 5px; width: 10px; height: 10px; border-radius: 2.5px; border: 2px solid var(--text); background: var(--surface); }
.ak-flow-when::before { background: var(--text); }
.ak-flow-type { font-size: 12px; color: var(--muted); }
.ak-flow-label { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.ak-draft-foot { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ak-draft-foot .ak-meta { flex: 1 1 auto; }



/* per answer: Copy, Regenerate, thumbs. On the last answer always; on older ones on hover (always on touch) */
.ak-foot { display: flex; align-items: center; gap: 2px; margin: 10px -8px 0; min-height: 28px; }
.ak-act { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.ak-act:hover { background: var(--subtle); color: var(--text); }
.ak-act-icon { height: 26px; padding: 0 6px; font-size: 12px; }
.ak-thumbs { display: inline-flex; gap: 0; }
.ak-thumb { padding: 0 7px; }
.ak-thumb.ak-on { color: var(--text); background: var(--subtle); }
.ak-acter:not(.ak-last) .ak-foot > :not(.ak-stopped):not(.ak-grow) { opacity: 0; transition: opacity .12s; }
.ak-acter:not(.ak-last):hover .ak-foot > *, .ak-acter:not(.ak-last):focus-within .ak-foot > * { opacity: 1; }
.ak-stopped { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-right: 8px; border: 1px dashed var(--line-strong); border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted); }
.ak-why { display: flex; gap: 6px; margin: 6px 0 6px; }
.ak-why .ak-btn { height: 34px; }

.ak-failed { margin: 12vh auto 0; text-align: center; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ---- empty: the composer up top, templates under it ---- */
.ak-is-empty .ak-scroll { padding-top: clamp(28px, 9vh, 110px); }
.ak-hero { display: flex; flex-direction: column; }
.ak-hero-title { font-size: 30px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.ak-hero-sub { margin: 8px 0 22px; font-size: 15px; color: var(--muted); }
.ak-hero .ak-fine { text-align: left; }
.ak-hero .ak-input { min-height: 76px; }
.ak-mode-note { margin: 14px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--text-2); max-width: 70ch; }
.ak-group-name { font-size: 13.5px; font-weight: 650; }
.ak-group-about { margin: 2px 0 10px; font-size: 12.5px; color: var(--muted); }

/* the templates under the composer: cards, the ones in use first */
.ak-gallery { margin-top: 38px; display: flex; flex-direction: column; gap: 26px; }
.ak-gallery:empty { display: none; }
.ak-tgroup-h { display: flex; align-items: baseline; gap: 8px; }
.ak-tgroup-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* template cards: the CRM Templates page's card (2026-11-23). A live picture of page one (crm-docs.js thumb, in a shadow root
   with the CRM's stylesheet), the name, what it's for, Use (the CRM's sunset) and Customize/Edit. */
.ak-tp-grid { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); gap: 16px; }
.ak-tp { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--ak-sh-1);
  overflow: hidden; transition: box-shadow .15s, transform .15s; }
.ak-tp:hover, .ak-tp:focus-within { box-shadow: var(--ak-sh-2); transform: translateY(-1px); }
.ak-tp-pic { display: flex; justify-content: center; width: 100%; height: 210px; padding: 14px 10px 0; overflow: hidden; border: 0; border-bottom: 1px solid var(--line);
  background: var(--subtle); cursor: pointer; font: inherit; }
.ak-tp-pic:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.ak-tp-paper { display: block; width: 220px; flex: none; }
/* no picture to draw (the 8:30, or before the CRM answers): a plain sheet the same size */
.ak-tp-sheet { display: flex; flex-direction: column; gap: 9px; width: 220px; height: 284px; flex: none; padding: 20px 18px; background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12); text-align: left; }
.ak-tp-sheet-no { font-size: 9px; font-weight: 700; color: #6b7280; letter-spacing: .04em; }
.ak-tp-sheet-h { font-size: 14px; font-weight: 800; color: #111; padding-bottom: 7px; border-bottom: 2px solid #111; }
.ak-tp-sheet-l { height: 6px; border-radius: 2px; background: #e5e7eb; }
.ak-tp-sheet-l:nth-child(3n) { width: 62%; }
.ak-tp-b { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 4px; min-width: 0; }
.ak-tp-b strong { font-size: 14.5px; font-weight: 650; color: var(--text); }
.ak-tp-meta { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.ak-tp-a { display: flex; gap: 6px; align-items: center; padding: 10px 14px 14px; margin-top: auto; }
.ak-tp-a > :last-child:not(:first-child) { margin-left: auto; }
.ak-tp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.ak-tp-btn:hover { background: var(--subtle); }
.ak-tp-btn:active { transform: translateY(1px); }
.ak-tp-use { background: linear-gradient(135deg, #FF8A3D 0%, #FF4F8B 52%, #7B5CFF 100%); border-color: transparent; color: #fff;
  box-shadow: 0 10px 28px rgba(255, 79, 139, .30); }
.ak-tp-use:hover { background: linear-gradient(135deg, #FF8A3D 0%, #FF4F8B 52%, #7B5CFF 100%); filter: brightness(1.06) saturate(1.05); transform: translateY(-1px); }
.ak-linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--text); text-decoration: underline; cursor: pointer; }
.ak-gallery .ak-tg-manage { align-self: flex-start; font-size: 12.5px; }
.ak-slot { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; margin: 0 1px; border: 1px dashed var(--line-strong); border-radius: 999px;
  font-size: 11.5px; color: var(--muted); vertical-align: 1px; white-space: nowrap; }
.ak-mine { margin-top: 26px; }
.ak-chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ak-chip { height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-2); cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-chip:hover { border-color: var(--text); color: var(--text); }

/* ---- composer ---- */
.ak-composer { display: flex; flex-direction: column; }
.ak-box-wrap { position: relative; }
.ak-box { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--ak-sh-box); padding: 10px 10px 8px 14px; transition: border-color .15s; }
.ak-box:focus-within { border-color: var(--text); }
.ak-input { display: block; width: 100%; min-height: 26px; max-height: 240px; resize: none; border: 0; outline: none; background: transparent; padding: 4px 4px 6px 0;
  font: inherit; font-size: 15px; line-height: 1.5; color: var(--text); }
.ak-input::placeholder { color: var(--faint); }
.ak-tools { display: flex; align-items: center; gap: 6px; }
.ak-tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ak-tool:hover, .ak-tool[aria-expanded="true"] { background: var(--subtle); color: var(--text); border-color: var(--line); }
.ak-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ak-count.ak-over { color: var(--red); font-weight: 600; }
.ak-send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--text); color: var(--surface); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none; transition: opacity .15s, transform .15s; }
.ak-send:hover { opacity: .88; }
.ak-send:active { transform: scale(.95); }
.ak-send:disabled { background: var(--line-strong); color: var(--surface); cursor: default; opacity: 1; transform: none; }
.ak-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.ak-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 3px 0 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--subtle);
  font-size: 13px; font-weight: 600; max-width: 100%; }
.ak-tag > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-tag-kind { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.ak-tag-tpl { background: var(--surface); border-color: var(--text); }
.ak-tag-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.ak-tag-x:hover { background: var(--line); color: var(--text); }
.ak-fine { margin: 8px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.ak-left { color: var(--text-2); font-weight: 600; }
.ak-note { margin: 0 0 8px; padding: 9px 12px; border: 1px solid var(--line-strong); border-left: 3px solid var(--text); border-radius: 8px; background: var(--surface);
  font-size: 13px; color: var(--text); }

/* @ list and templates */
.ak-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 40; display: flex; flex-direction: column; max-height: 340px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--ak-sh-pop); animation: ak-in .14s ease-out both; }
.ak-pop.ak-down { bottom: auto; top: calc(100% + 8px); }
.ak-pop.ak-pop-tmpl { max-height: min(460px, 60vh); }
.ak-pop-head { margin: 0; padding: 9px 12px 6px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.ak-pop-empty { margin: 0; padding: 14px 12px; font-size: 13px; color: var(--muted); }
.ak-hits { position: relative; list-style: none; margin: 0; padding: 4px; overflow-y: auto; }
.ak-hit { display: flex; align-items: baseline; gap: 10px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.ak-hit[aria-selected="true"] { background: var(--subtle); box-shadow: inset 2px 0 0 var(--line-strong); }
.ak-hit-kind { width: 62px; flex: none; font-size: 11.5px; color: var(--muted); }
.ak-hit-text { min-width: 0; display: flex; flex-direction: column; }
.ak-hit-label { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-hit-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-tg-scroll { overflow-y: auto; padding: 4px 6px 8px; }
.ak-tg-name { margin: 10px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ak-tg-list { list-style: none; margin: 0; padding: 0; }
.ak-tg-row { display: flex; align-items: center; gap: 2px; }
.ak-tg-item { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; padding: 7px 8px; border: 0; border-radius: 7px;
  background: transparent; font: inherit; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.ak-tg-item:hover { background: var(--subtle); color: var(--text); }
.ak-tg-item strong { font-weight: 600; color: var(--text); }
.ak-tg-row .ak-tg-item span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-tg-list > li > .ak-tg-item span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-tg-manage { display: inline-block; margin: 8px 8px 2px; font-size: 12.5px; font-weight: 600; color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.ak-tg-manage:hover { color: var(--text); }
.ak-pop-foot { border-top: 1px solid var(--line); padding: 6px; }
.ak-save-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--text-2); cursor: pointer; }
.ak-save-btn:hover:not(:disabled) { background: var(--subtle); color: var(--text); }
.ak-save-btn:disabled { color: var(--faint); cursor: default; }
.ak-save-form { display: flex; gap: 6px; }
.ak-field { flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; }
.ak-field:focus { outline: none; border-color: var(--text); }
.ak-offline { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  font-size: 13px; color: var(--text-2); }
.ak-send.ak-stop { background: var(--text); }
.ak-send.ak-stop:disabled { background: var(--text); }

/* ---- chats and files: the column on the left ---- */
.ak-side { grid-area: side; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; background: var(--surface); border-right: 1px solid var(--line); z-index: 20; }
.ak-side-shut .ak-side { visibility: hidden; border-right-width: 0; transition: visibility 0s .2s; }
.ak-side-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; }
.ak-side-new { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: var(--ak-sh-1); white-space: nowrap; }
.ak-side-new:hover { border-color: var(--text); }
.ak-search { display: flex; align-items: center; gap: 7px; margin: 0 10px 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle);
  color: var(--muted); cursor: text; }
.ak-search:focus-within { border-color: var(--text); background: var(--surface); }
.ak-search-in { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; }
.ak-search-in::placeholder { color: var(--faint); }
.ak-search-in::-webkit-search-cancel-button { cursor: pointer; }
.ak-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.ak-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px; border: 0; background: transparent; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--muted); cursor: pointer; }
.ak-tab:hover { color: var(--text); }
.ak-tab[aria-selected="true"] { color: var(--text); }
.ak-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; border-radius: 1px; background: var(--text); }
.ak-tab-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--line); font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ak-side-body { flex: 1 1 auto; overflow-y: auto; padding: 2px 8px 16px; overscroll-behavior: contain; }
.ak-side-group { margin: 14px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ak-side-empty { margin: 18px 8px; font-size: 13px; color: var(--muted); }
.ak-row { position: relative; display: flex; align-items: center; gap: 2px; padding: 0 2px 0 0; border-radius: 8px; }
.ak-row:hover, .ak-row.ak-menu-open { background: var(--subtle); }
.ak-row.ak-on { background: var(--subtle); box-shadow: inset 2px 0 0 var(--text); }
.ak-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; text-align: left; padding: 7px 8px; border: 0; background: transparent; font: inherit; color: var(--text); cursor: pointer; border-radius: 8px; }
.ak-row-main:disabled { cursor: default; }
.ak-row-title { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-on .ak-row-title { font-weight: 600; }
.ak-row-snip { font-size: 12px; color: var(--text-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 1px 0; }
.ak-row-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-row-ic { display: inline-flex; padding-left: 8px; color: var(--muted); }
.ak-file-row .ak-row-main { padding-left: 6px; }
.ak-row-x, .ak-row-more { opacity: 0; width: 28px; height: 28px; }
.ak-row:hover :is(.ak-row-x, .ak-row-more), .ak-row:focus-within :is(.ak-row-x, .ak-row-more), .ak-row-more[aria-expanded="true"] { opacity: 1; }
.ak-renaming { padding: 3px 2px; }
.ak-rename { height: 32px; }
.ak-menu { position: absolute; right: 2px; top: calc(100% - 2px); z-index: 60; min-width: 160px; padding: 4px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--ak-sh-pop); animation: ak-in .12s ease-out both; }
.ak-menu-i { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.ak-menu-i:hover { background: var(--subtle); }
.ak-menu-i:focus-visible { background: var(--subtle); outline: 2px solid var(--text); outline-offset: -2px; }
.ak-menu-i svg { color: var(--muted); }
.ak-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0; padding: 8px 10px; border-radius: 8px; background: var(--subtle); font-size: 13px; font-weight: 600; }
.ak-confirm span { flex: 1 1 100%; }
.ak-confirm .ak-btn { height: 30px; }

/* touch screens: no hover, so the actions always show */
@media (hover: none) {
  .ak-row-x, .ak-row-more, .ak-me-acts { opacity: 1; }
  .ak-kbd { display: none; }
  .ak-acter:not(.ak-last) .ak-foot > :not(.ak-stopped):not(.ak-grow) { opacity: 1; }
}

/* a file dragged over the chat */
.ak-drop { display: none; position: absolute; inset: 0; z-index: 90; align-items: center; justify-content: center; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.ak-dragging .ak-drop { display: flex; }
.ak-drop-sheet { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 340px; padding: 28px 34px; text-align: center; background: var(--surface);
  border: 2px dashed var(--text); border-radius: 16px; box-shadow: var(--ak-sh-pop); color: var(--text); }
.ak-drop-sheet strong { font-size: 16px; }
.ak-drop-sheet span { font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .ak *, .ak *::before, .ak *::after, .ak-pop { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ak-liveline-t { -webkit-text-fill-color: currentColor; background: none; }
  .ak-caret { opacity: .5; }
}

/* ---- narrower: the chats slide in from the left over the conversation ---- */
@container ak (max-width: 940px) {
  .ak-grid, .ak-side-shut .ak-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "talk"; }
  .ak-side, .ak-side-shut .ak-side { position: absolute; left: 0; top: 0; bottom: 0; width: min(300px, 88%); visibility: hidden; transform: translateX(-102%);
    transition: transform .22s ease, visibility 0s .22s; box-shadow: var(--ak-sh-pop); z-index: 50; border-right-width: 1px; }
  .ak-show-side .ak-side { visibility: visible; transform: none; transition: transform .22s ease; }
  .ak-show-side .ak-scrim { display: block; position: absolute; inset: 0; z-index: 45; background: rgba(10, 12, 15, .28); }
  .ak .ak-side-toggle, .ak .ak-new-top { display: inline-flex; }
  .ak-top { padding-left: 10px; }
}
@container ak (max-width: 700px) {
  .ak-tp-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .ak-top { gap: 4px; padding: 0 8px 0 6px; }
  .ak-top .ak-btn span, .ak-usage { display: none; }
  .ak-top .ak-btn { width: 34px; padding: 0; }
  .ak-scroll { padding: 14px 12px 32px; }
  .ak-dock { padding: 0 10px 10px; }
  .ak-hero-title { font-size: 25px; }
  .ak-acter { grid-template-columns: minmax(0, 1fr); }
  .ak-sugg { grid-column: 1; }
  .ak-mark { display: none; }
  .ak-body { padding: 12px 14px 8px; border-radius: 12px; }
  .ak-bubble { max-width: 88%; }
  .ak-tool-label span { display: none; }
  .ak-draft-foot { flex-direction: column; align-items: stretch; }
  .ak-fine { font-size: 11.5px; }
}

/* ---- AI use and billing (opens from "$0.21 this month"; owners). Lives on <body>, outside main.ak. ---- */
.ak-us-scrim { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px;
  background: rgba(16, 24, 40, .32); }
[data-theme="dark"] .ak-us-scrim { background: rgba(0, 0, 0, .55); }
.ak-us { width: min(640px, 100%); max-height: 84vh; overflow-y: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--ak-sh-pop); padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.ak-us-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ak-us-head h2 { font-size: 16px; font-weight: 650; }
.ak-us-seg { display: inline-flex; align-self: flex-start; padding: 3px; border-radius: 9px; background: var(--subtle); border: 1px solid var(--line); }
.ak-us-seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.ak-us-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--ak-sh-1); }
.ak-us-sum { display: flex; flex-direction: column; gap: 2px; }
.ak-us-total { margin: 0; font-size: 34px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.ak-us-sub { margin: 0; font-size: 13px; color: var(--muted); }
.ak-us-budget { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.ak-us-meter { position: relative; flex: 0 0 160px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ak-us-meter span { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; border-radius: 999px; background: var(--text-2); }
.ak-us-meter.ak-over span { background: var(--red); }
.ak-us-chart { position: relative; margin: 2px 0 0; }
.ak-us-chart svg { display: block; width: 100%; height: 200px; border-radius: 6px; }
.ak-us-grid { stroke: var(--line); stroke-width: 1; }
.ak-us-base { stroke: var(--line-strong); }
.ak-us-ytick, .ak-us-xtick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ak-us-later { opacity: .55; }
.ak-us-bar { fill: var(--text-2); }
.ak-us-bar.ak-us-now { fill: var(--muted); }
.ak-us-hover { fill: var(--subtle); }
.ak-us-hit { fill: transparent; cursor: default; }
.ak-us-budget-line { stroke: var(--text-2); stroke-width: 1; opacity: .7; }
.ak-us-budget-l { fill: var(--text-2); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.ak-us-tip { position: absolute; left: 0; top: 0; pointer-events: none; display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; min-width: 110px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--ak-sh-pop); font-size: 12px; opacity: 0; transition: opacity .1s; }
.ak-us-tip.on { opacity: 1; }
.ak-us-tip strong { font-size: 14px; }
.ak-us-dim { color: var(--muted); }
.ak-us-parts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ak-us-parts li { display: grid; grid-template-columns: 1fr auto 90px; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ak-us-parts strong { text-align: right; font-variant-numeric: tabular-nums; }
.ak-us-note { margin: 0; font-size: 12px; color: var(--muted); }
.ak-us-warn { color: var(--amber); }
.ak-us-err { margin: 0; color: var(--red); font-size: 13px; }
.ak-us-wait { margin: 0; color: var(--muted); font-size: 13px; padding: 18px 0; }
.ak-us-link { align-self: flex-start; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12.5px; color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ak-us-link:hover { color: var(--text); }
.ak-us-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ak-us-table th, .ak-us-table td { text-align: left; padding: 5px 0; border-bottom: 1px solid var(--line); }
.ak-us-table thead th { color: var(--muted); font-weight: 500; }
.ak-us-table tfoot th, .ak-us-table tfoot td { font-weight: 650; border-bottom: 0; color: var(--text); }
.ak-us-val { fill: var(--text-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ak-us-table .num { text-align: right; }
@media (max-width: 560px) { .ak-us-scrim { padding: 0; align-items: stretch; } .ak-us { max-height: none; border-radius: 0; } .ak-us-meter { flex-basis: 100px; } }

/* Upload (beside the usage meter, 2026-11-23) */
.ak-up { width: min(520px, 100%); }
.ak-up-step { display: flex; flex-direction: column; gap: 8px; }
.ak-up-lab { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ak-up-types { display: flex; flex-wrap: wrap; gap: 6px; }
.ak-up-type { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.ak-up-type:hover { border-color: var(--line-strong); color: var(--text); }
.ak-up-type[aria-checked="true"] { border-color: var(--text); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--text); }
.ak-up-type.ak-up-qr::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 2px; background: #D97706; vertical-align: 1px; }
.ak-up-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ak-up-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.ak-up-go { display: flex; justify-content: flex-end; }
.ak-up-err { margin: 0; font-size: 13px; color: var(--red); }
.ak-up-done { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ak-up-ok { margin: 0; font-size: 14px; font-weight: 600; }
.ak-up-code { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.ak-up-code strong { font-variant-numeric: tabular-nums; }
.ak-up-how { margin-left: auto; font-size: 12px; color: var(--muted); }
.ak-up-warn { margin: 0; font-size: 13px; color: var(--text-2); }
.ak-up-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ak-up-links a { text-decoration: none; }

.ak-fchips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ak-fchip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 42px; padding: 0 4px 0 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--subtle); }
.ak-fchip-ic { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--text); flex: none; }
.ak-fchip-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ak-fchip-n { font-size: 13px; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-fchip-s { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- a Style toolkit background on Ask (Riggs, 2026-11-28) ----
   The theme is painted on .content (or the whole shell), but main.ak had its own solid background on top of it, so a
   background picture, pattern or gradient never showed. When the page is themed, Ask's frame is see-through and the top
   bar sits on the page background (its text already takes the theme's checked on-bg colours). */
.vw-th-page main.ak { background: transparent; }
.vw-th-page .ak-top { background: transparent; border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); }
/* over a picture: no solid fade above the composer, and the panels let a little of it through */
.vw-th-scene .ak-dock::before { display: none; }
.vw-th-scene :is(.ak-side, .ak-body, .ak-box) {
  background-color: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
