/* ==========================================================================
   app-ai.css — ADDITIVE to app-ui.css (v3 kit, round 3b, 2026-11-26).
   The AI screens and the v5 worked-example elements the kit did not draw:
   the title-block reader (source chips, the crop popover), set intake, Ask the
   project (answer, record chips, footer, suggestions), Before you issue, What
   changed, the per-recipient notes, Still pointing at Rev C, tender parity, the
   Client message draft and its translation toggle, the billing card, the public
   (signed-out) file view. Built from app-ui.css tokens only, scoped under .app,
   every class prefixed a-. Load AFTER app-ui.css. Nothing here restyles an
   existing kit class.
   ========================================================================== */

/* ---- source chip: "From title block" (brand-subtle, the app's provenance tone) ---- */
.app .a-src { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--radius-sm); background: hsl(var(--brand-subtle)); color: hsl(var(--brand-ink)); padding: 1px 6px 1px 5px; font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.app .a-src .a-i { width: 12px; height: 12px; color: hsl(var(--brand)); }
.app .a-src.is-hot { box-shadow: 0 0 0 2px hsl(var(--brand-ring) / .35); }

/* ---- field list (one column, label left): the draft metadata card ---- */
.app .a-fl { display: grid; grid-template-columns: 100px minmax(0, 1fr); column-gap: 10px; }
.app .a-fl > dt, .app .a-fl > dd { margin: 0; padding: 7px 0; border-top: 1px solid hsl(var(--ink-100)); font-size: 13px; line-height: 18px; }
.app .a-fl > dt:first-of-type, .app .a-fl > dt:first-of-type + dd { border-top: 0; }
.app .a-fl > dt { color: hsl(var(--ink-500)); font-size: 12px; }
.app .a-fl > dd { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; color: hsl(var(--foreground)); }
.app .a-fl > dd > .a-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .a-fl > dd .a-tick { width: 15px; height: 15px; color: hsl(var(--tone-positive-strong)); }
.app .a-fl > dd.is-empty .a-v { flex: 1; height: 26px; border-radius: var(--radius-sm); border: 1px dashed hsl(var(--ink-400)); background: hsl(var(--background)); }
.app .a-fl.is-roomy > dt, .app .a-fl.is-roomy > dd { padding: 9px 0; }
/* fill animation hooks (the site toggles .is-wait on a <dd>): a quiet placeholder bar, never a shimmer */
.app .a-fl > dd.is-wait > * { visibility: hidden; }
.app .a-fl > dd.is-wait { position: relative; }
.app .a-fl > dd.is-wait::after { content: ''; position: absolute; left: 0; top: 50%; width: 46%; height: 8px; margin-top: -4px; border-radius: 4px; background: hsl(var(--ink-100)); }

/* ---- popover: a raised card (the app's shadow-raised) ---- */
.app .a-pop { position: absolute; z-index: 5; border-radius: var(--radius); background: hsl(var(--background)); box-shadow: var(--shadow-raised), 0 18px 40px -18px rgba(16,24,32,.30); padding: 8px; }
.app .a-pop::before { content: ''; position: absolute; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); box-shadow: 1px -1px 0 hsl(var(--ink-200)); right: -5px; top: 22px; }

/* ---- side sheet (upload-sheet.tsx) ---- */
.app .a-sheet { background: hsl(var(--background)); min-height: 100%; display: flex; flex-direction: column; }
.app .a-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid hsl(var(--ink-200)); }
.app .a-sheet-body { padding: 16px 20px; }
.app .a-sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid hsl(var(--ink-200)); margin-top: auto; }
.app .a-radio { width: 16px; height: 16px; border-radius: 99px; border: 1px solid hsl(var(--ink-400)); display: inline-grid; place-items: center; flex-shrink: 0; background: #fff; }
.app .a-radio.is-on { border-color: hsl(var(--brand)); }
.app .a-radio.is-on::after { content: ''; width: 8px; height: 8px; border-radius: 99px; background: hsl(var(--brand)); }
.app .a-warn { display: flex; align-items: flex-start; gap: 8px; border-radius: 8px; background: hsl(var(--tone-attention-subtle)); color: hsl(var(--tone-attention-strong)); padding: 8px 12px; font-size: 13px; line-height: 18px; }
.app .a-warn .a-i { margin-top: 1px; color: hsl(var(--tone-attention-strong)); }

/* ---- Ask the project ---- */
.app .a-ask { border-radius: var(--radius); background: hsl(var(--card)); box-shadow: var(--shadow-card); }
.app .a-ask-top { padding: 14px 16px 12px; }
.app .a-ask-label { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 600; color: hsl(var(--ink-600)); margin-bottom: 8px; }
.app .a-ask-label .a-i { width: 14px; height: 14px; color: hsl(var(--brand)); }
.app .a-ask-q { flex: 1; min-width: 0; }
.app .a-ask-q > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.app .a-caret { display: inline-block; width: 1px; height: 15px; margin-left: 1px; background: hsl(var(--foreground)); vertical-align: -3px; }
.app .a-ask-ans { border-top: 1px solid hsl(var(--ink-100)); padding: 14px 16px; }
.app .a-ask-ans > p { margin: 0; font-size: 14px; line-height: 21px; color: hsl(var(--foreground)); }
.app .a-ask-recs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.app .a-rec { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px; background: hsl(var(--background)); box-shadow: inset 0 0 0 1px hsl(var(--ink-200)); font-size: 12px; line-height: 16px; font-weight: 500; color: hsl(var(--ink-800)); white-space: nowrap; }
.app .a-rec .a-i { width: 13px; height: 13px; color: hsl(var(--ink-500)); }
.app .a-rec .a-rec-go { width: 12px; height: 12px; color: hsl(var(--ink-400)); margin-left: -1px; }
.app .a-rec.is-hot { box-shadow: inset 0 0 0 1px hsl(var(--brand)); background: hsl(var(--brand-subtle)); color: hsl(var(--brand-ink)); }
.app .a-rec.is-hot .a-i { color: hsl(var(--brand)); }
.app .a-ask-foot { display: flex; align-items: center; gap: 6px; padding: 9px 16px; border-top: 1px solid hsl(var(--ink-100)); background: hsl(var(--ink-50)); border-radius: 0 0 var(--radius) var(--radius); font-size: 12px; line-height: 16px; color: hsl(var(--ink-500)); }
.app .a-ask-foot .a-i { width: 13px; height: 13px; color: hsl(var(--ink-400)); }
.app .a-ask-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 14px; border-top: 1px solid hsl(var(--ink-100)); }
.app .a-ask-sugg .a-pill { height: 26px; font-size: 12px; }
.app .a-thinking { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: hsl(var(--ink-500)); }
.app .a-thinking i { width: 6px; height: 6px; border-radius: 99px; background: hsl(var(--ink-300)); }

/* ---- dialog (components/ui/dialog.tsx): a scrim over the page, a raised panel ---- */
.app .a-scrim { position: relative; }
.app .a-scrim::before { content: ''; position: absolute; inset: 0; background: hsl(205 15% 12% / .32); z-index: 1; }
.app .a-dialog { position: absolute; z-index: 2; border-radius: var(--radius-lg); background: hsl(var(--background)); box-shadow: 0 24px 60px -16px rgba(16,24,32,.35), 0 0 0 1px hsl(var(--ink-200)); overflow: hidden; }
.app .a-dialog-head { padding: 18px 20px 4px; }
.app .a-dialog-title { font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.app .a-dialog-body { padding: 12px 20px 16px; }
.app .a-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid hsl(var(--ink-100)); background: hsl(var(--ink-50)); }
.app .a-field + .a-field { margin-top: 14px; }
.app .a-field > .a-label { display: block; font-size: 13px; line-height: 18px; margin-bottom: 6px; }

/* ---- Before you issue ---- */
.app .a-chk { list-style: none; margin: 0; padding: 0; }
.app .a-chk > li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-top: 1px solid hsl(var(--ink-100)); font-size: 13px; line-height: 18px; color: hsl(var(--ink-800)); }
.app .a-chk > li:first-child { border-top: 0; }
.app .a-chk > li .a-i { width: 16px; height: 16px; margin-top: 1px; }
.app .a-chk .is-ok .a-i { color: hsl(var(--tone-positive-strong)); }
.app .a-chk .is-note .a-i { color: hsl(var(--tone-attention-strong)); }
.app .a-chk .is-sheet .a-i { color: hsl(var(--ink-400)); }
.app .a-chk .a-ok { color: hsl(var(--tone-positive-strong)); font-weight: 600; }
.app .a-chk-split { border-top: 1px dashed hsl(var(--ink-200)) !important; }
.app .a-panel { border-radius: var(--radius); background: hsl(var(--ink-50)); box-shadow: inset 0 0 0 1px hsl(var(--ink-200)); padding: 12px 14px; }
.app .a-panel-title { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: hsl(var(--foreground)); margin-bottom: 4px; }
.app .a-panel-title .a-i { width: 14px; height: 14px; color: hsl(var(--brand)); }

/* ---- What changed ---- */
.app .a-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; font-weight: 500; color: hsl(var(--ink-800)); }
.app .a-switch > i { position: relative; width: 30px; height: 18px; border-radius: 99px; background: hsl(var(--ink-300)); }
.app .a-switch > i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,32,.25); }
.app .a-switch.is-on > i { background: hsl(var(--brand)); }
.app .a-switch.is-on > i::after { left: 14px; }
.app .a-num { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 99px; background: hsl(var(--ink-800)); color: #fff; font-size: 11px; line-height: 1; font-weight: 600; flex-shrink: 0; }
.app .a-cmp { list-style: none; margin: 0; padding: 0; }
.app .a-cmp > li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; border-top: 1px solid hsl(var(--ink-100)); font-size: 13px; line-height: 18px; }
.app .a-cmp > li:first-child { border-top: 0; }
.app .a-cmp-foot { margin-top: 6px; padding-top: 9px; border-top: 1px solid hsl(var(--ink-200)); font-size: 12px; line-height: 16px; color: hsl(var(--ink-600)); }

/* ---- per-recipient notes ---- */
.app .a-rnote + .a-rnote { margin-top: 12px; }
.app .a-rnote .a-textarea { min-height: 0; font-size: 13px; line-height: 19px; background: #fff; display: block; }
.app .a-rnote .a-textarea b { font-weight: 600; }
.app .a-textarea.is-focus { border-color: hsl(var(--brand)); box-shadow: 0 0 0 3px hsl(var(--brand-ring) / .18); }

/* ---- Still pointing at Rev C ---- */
.app .a-still { border-radius: var(--radius); background: hsl(var(--tone-attention-subtle) / .55); box-shadow: inset 0 0 0 1px hsl(var(--tone-attention-strong) / .22); padding: 14px 16px; }
.app .a-still-title { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: hsl(var(--ink-900)); }
.app .a-still-title .a-i { width: 16px; height: 16px; margin-top: 2px; color: hsl(var(--tone-attention-strong)); }
.app .a-still ul { list-style: none; margin: 8px 0 0 24px; padding: 0; }
.app .a-still li { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 13px; line-height: 18px; color: hsl(var(--brand-ink)); }
.app .a-still li .a-i { width: 14px; height: 14px; margin-top: 2px; color: hsl(var(--brand)); }

/* ---- tender parity ---- */
.app .a-par > li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid hsl(var(--ink-100)); font-size: 13px; line-height: 18px; }
.app .a-par > li:first-child { border-top: 0; }
.app .a-par .is-sum { display: block; color: hsl(var(--ink-700)); }
.app .a-selfline { display: flex; align-items: flex-start; gap: 8px; border-radius: 8px; background: hsl(var(--brand-subtle)); padding: 10px 12px; font-size: 13px; line-height: 19px; color: hsl(var(--brand-ink)); }
.app .a-selfline .a-i { width: 15px; height: 15px; margin-top: 2px; color: hsl(var(--brand)); }

/* ---- Client message draft + translation ---- */
.app .a-draft { border-radius: var(--radius-sm); border: 1px solid hsl(var(--input)); background: #fff; padding: 10px 12px; font-size: 13px; line-height: 20px; color: hsl(var(--foreground)); }
.app .a-draft-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 16px; color: hsl(var(--ink-500)); }
.app .a-msg { border-radius: 8px; background: hsl(var(--ink-50)); padding: 10px 12px; font-size: 13px; line-height: 20px; color: hsl(var(--ink-800)); }
.app .a-lang { font-family: Manrope, 'Kohinoor Devanagari', 'Noto Sans Devanagari', 'Nirmala UI', system-ui, sans-serif; }
.app .a-preview { border-radius: var(--radius); background: hsl(var(--canvas)); box-shadow: inset 0 0 0 1px hsl(var(--ink-200)); padding: 12px; }

/* ---- billing card row ---- */
.app .a-bill { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid hsl(var(--ink-100)); font-size: 14px; line-height: 20px; }
.app .a-bill b { font-weight: 600; }

/* ---- public file view (signed out; public-file-view-page.tsx) ---- */
.app .a-pub-banner { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; background: hsl(var(--ink-800)); color: #fff; font-size: 11px; line-height: 15px; font-weight: 600; letter-spacing: .02em; text-align: center; }
.app .a-pub-sheet { position: relative; background: #fff; overflow: hidden; }
.app .a-pub-wm { position: absolute; inset: -40% -60%; display: flex; flex-direction: column; justify-content: space-around; transform: rotate(-28deg); pointer-events: none; }
.app .a-pub-wm span { white-space: nowrap; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .08em; color: hsl(var(--destructive) / .38); }
.app .a-gone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 40px 20px; }
.app .a-gone .a-i { width: 28px; height: 28px; color: hsl(var(--ink-400)); }

/* ---- activity log (the full Activity page row) ---- */
.app .a-act > li { display: grid; grid-template-columns: 136px 150px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 16px; border-top: 1px solid hsl(var(--ink-100)); font-size: 13px; line-height: 18px; }
.app .a-act > li:first-child { border-top: 0; }

/* ---- hero: the three-frame window (frames stacked; the site switches .is-on) ---- */
.app .a-hf-stack { position: relative; }
.app .a-hf { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .38s cubic-bezier(.2,.7,.2,1), visibility 0s linear .38s; }
.app .a-hf.is-on { opacity: 1; visibility: visible; transition: opacity .38s cubic-bezier(.2,.7,.2,1); }
.app .a-hf-stack > .a-hf:first-child { position: relative; }
.app .a-row-new td { background: hsl(var(--brand-subtle)); transition: background 1.2s ease; }
.app .a-fade-r { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }

/* fluid card windows: a single card that reflows to its column like the app's own responsive card (never cropped) */
.app.a-window.is-fluid .a-viewport > .a-screen { width: 100%; min-width: 0; margin-left: 0; }


/* ==========================================================================
   Round 3b gate repair (paper v5): additions only.
   ========================================================================== */
/* An empty field reads an italic "Not set", never a blank box (key-value.tsx). */
.app .a-fl > dd.is-empty .a-v { display: flex; align-items: center; padding: 0 8px; }
.app .a-fl > dd.is-empty .a-v .is-unset { font-style: italic; color: hsl(var(--ink-500)); }
/* The hero window is 380px wide: a value wraps rather than being cut, and the source chip drops under it when it must. */
.app.a-hero-win .a-fl > dd { flex-wrap: wrap; row-gap: 3px; }
.app.a-hero-win .a-fl > dd > .a-v { white-space: normal; overflow: visible; text-overflow: clip; }
/* While the answer is being written the answer area shows a skeleton, never a blank. */
.app .a-ask-ans { position: relative; }
.app .a-skel { display: none; }
.app .a-ask-ans.is-pending > :not(.a-skel):not(.a-think) { visibility: hidden; }
.app .a-ask-ans.is-pending > .a-skel { display: grid; gap: 8px; position: absolute; left: 16px; right: 16px; top: 18px; justify-items: start; }
.app .a-skel i { display: block; height: 10px; width: 100%; border-radius: 5px; background: hsl(var(--ink-100)); }
.app .a-skel i:nth-child(1) { width: 88%; margin-bottom: 4px; }
.app .a-skel i:nth-child(n+2) { height: 26px; border-radius: 999px; }
.app .a-skel i:nth-child(2) { width: 46%; } .app .a-skel i:nth-child(3) { width: 62%; } .app .a-skel i:nth-child(4) { width: 56%; } .app .a-skel i:nth-child(5) { width: 64%; }
/* On a phone-width window the address pill takes the room the dots leave, so a short path is never cut. */
@container awin (max-width: 600px) {
  .app .a-chrome-url { flex: 1 1 auto; }
}
/* A narrow window drops its dots (decoration), and a very narrow one the lock too, before it would cut the address. */
@container awin (max-width: 300px) {
  .app .a-chrome-dots { display: none; }
}
@container awin (max-width: 230px) {
  .app .a-chrome-url .a-i { display: none; }
  .app .a-chrome-url { padding: 0 4px; }
}


/* ==========================================================================
   v6 (paper): the windows composed for their width, the strip, the close, the handover list.
   Additions only; app-ui.css untouched.
   ========================================================================== */
.app .a-pill.a-pill-sm { height: 28px; padding: 0 10px; font-size: 12px; }
/* hero frame 2, ungrouped: titles wrap, the status chip never does */
.app .a-hreg td { white-space: normal; vertical-align: middle; padding-top: 7px; padding-bottom: 7px; height: auto; }
.app .a-hreg td:nth-child(2) { color: hsl(var(--foreground)); }
.app .a-hreg th:first-child, .app .a-hreg td:first-child { padding-left: 12px; }
.app .a-hreg th, .app .a-hreg td { padding-left: 8px; padding-right: 8px; }
.app .a-hreg .a-badge { white-space: nowrap; }
/* the anchor's answer reads at a glance */
.app .a-ask.is-lg .a-ask-ans > p { font-size: 16px; line-height: 24px; font-weight: 500; }
.app .a-ask.is-lg .a-ask-q { height: 40px; font-size: 14px; }
.app .a-ask.is-lg .a-ask-ans { padding: 18px 16px; }
/* the slim Ask strip: the question beside its answer */
.app.a-strip { display: block; margin: 0; }
.app .a-ask.is-strip { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); box-shadow: 0 1px 2px rgba(16,24,32,.06), 0 0 0 1px hsl(var(--ink-200)), 0 18px 40px -26px rgba(16,24,32,.3); }
.app .a-ask.is-strip .a-ask-top { padding: 16px 18px; border-right: 1px solid hsl(var(--ink-100)); }
.app .a-ask.is-strip .a-ask-ans { border-top: 0; padding: 16px 18px; }
.app .a-ask.is-strip .a-ask-foot { grid-column: 1 / -1; }
/* handover file list */
.app .a-hand { list-style: none; margin: 0; padding: 4px 16px 6px; }
.app .a-hand > li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid hsl(var(--ink-100)); font-size: 12.5px; line-height: 16px; color: hsl(var(--ink-800)); }
.app .a-hand > li:first-child { border-top: 0; }
.app .a-hand-foot { padding: 8px 16px 12px; border-top: 1px solid hsl(var(--ink-100)); }
/* the activity crop reflows to its card */
@container awin (max-width: 520px) {
  .app .a-act > li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .app .a-act > li > :nth-child(1) { grid-column: 2; grid-row: 1; text-align: right; }
  .app .a-act > li > :nth-child(2) { grid-column: 1; grid-row: 1; }
  .app .a-act > li > :nth-child(3) { grid-column: 1 / -1; color: hsl(var(--ink-700)); }
}
@container awin (max-width: 480px) { .app .a-ask.is-strip { grid-template-columns: minmax(0, 1fr); } .app .a-ask.is-strip .a-ask-top { border-right: 0; } .app .a-ask.is-strip .a-ask-ans { border-top: 1px solid hsl(var(--ink-100)); } }

/* ---- a window narrower than its screen reflows instead of being cropped (main.js sets .is-flow; phones by media alone) ---- */
.app.is-flow .a-viewport > .a-screen { width: 100%; min-width: 0; margin: 0; }
.app.is-flow .a-viewport { max-height: none; overflow: hidden; }
.app.is-flow .a-scrim { height: auto !important; display: grid; }
.app.is-flow .a-scrim > * { grid-area: 1 / 1; min-width: 0; }
.app.is-flow .a-dialog { position: relative; left: auto !important; top: auto !important; width: auto !important; margin: 40px 6% 32px; align-self: start; }
@container awin (max-width: 1000px) { .app.is-flow .a-search { display: none; } }
@container awin (max-width: 860px) {
  .app.is-flow .a-account-who { display: none; }
  .app.is-flow .a-content { padding: 20px 24px; }
  .app.is-flow .a-detail { grid-template-columns: minmax(0, 1fr) 260px !important; }
}
@container awin (max-width: 760px) {
  .app.is-flow .a-detail, .app.is-flow .a-dlg-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .app.is-flow .a-rail { display: none; }
}

/* ---- phones: every window is composed for the column (one column, nothing cropped, the answer whole) ---- */
@media (max-width: 640px) {
  .app.a-window .a-viewport > .a-screen { width: 100%; min-width: 0; margin: 0 !important; }
  .app.a-window .a-viewport { max-height: none; overflow: hidden; }
  /* phones: no window is capped or faded; each ends on its last whole card (trailing cards carry .a-ph-hide) */
  .app.a-window .a-viewport[data-cut] { max-height: none; overflow: hidden; }
  .app.a-window .a-viewport[data-cut]::after { display: none; }
  @container awin (max-width: 600px) {
    .app .a-top { padding: 0 14px; gap: 10px; }
    .app .a-top .a-nav, .app .a-top .a-vsep, .app .a-top .a-switcher, .app .a-top .a-search, .app .a-account-who, .app .a-account > .a-i { display: none; }
    .app .a-rail { display: none; }
    .app .a-content { padding: 16px; }
    .app .a-screen > main { padding: 16px !important; }
    .app .a-detail, .app .a-dlg-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
    .app .a-ph-title { font-size: 20px; line-height: 26px; }
    .app .a-ph-hide, .app .a-pop { display: none !important; }
    .app .a-row.a-between, .app .a-sc-head, .app .a-lr-main { flex-wrap: wrap; }
    .app .a-scrim { height: auto !important; display: grid; }
    .app .a-scrim > * { grid-area: 1 / 1; min-width: 0; }
    .app .a-dialog { position: relative; left: auto !important; top: auto !important; width: auto !important; margin: 28px 10px 18px; align-self: start; }
    .app .a-dialog-body { padding: 10px 14px 14px; }
    .app .a-dialog-head { padding: 14px 14px 2px; }
    /* Ask: the question wraps in its box; record chips wrap their text */
    .app .a-ask-q { height: auto; min-height: 34px; padding-top: 7px; padding-bottom: 7px; align-items: flex-start; }
    .app .a-ask-q > span:last-child { white-space: normal; overflow: visible; }
    .app .a-rec { height: auto; min-height: 26px; padding-top: 4px; padding-bottom: 4px; white-space: normal; text-align: left; }
    .app .a-ask.is-lg .a-ask-ans > p { font-size: 15px; line-height: 22px; }
    /* the register as rows: number, title, revision; status under them */
    .app .a-table:not(.a-hreg) { display: block; }
    .app .a-table:not(.a-hreg) colgroup, .app .a-table:not(.a-hreg) thead { display: none; }
    .app .a-table:not(.a-hreg) tbody { display: block; }
    .app .a-table:not(.a-hreg) tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; align-items: center; padding: 10px 14px; border-top: 1px solid hsl(var(--ink-100)); }
    .app .a-table:not(.a-hreg) tbody td { display: block; height: auto; padding: 0 !important; border: 0; }
    .app .a-table:not(.a-hreg) tr.a-band { display: block; background: hsl(var(--ink-50)); }
    .app .a-table:not(.a-hreg) td:nth-child(4) { grid-column: 1 / 3; } .app .a-table:not(.a-hreg) td:nth-child(5) { text-align: right; }
    .app .a-table:not(.a-hreg) td:nth-child(6) { display: none; }
    .app .a-table:not(.a-hreg) td .a-trunc { white-space: normal; }
    /* issue sheet: drawing numbers only, the columns tighten */
    .app .a-is .is-row .a-trunc { display: none; }
    .app .a-is .is-hd, .app .a-is .is-row, .app .a-is .is-ft { padding-left: 10px; padding-right: 6px; }
    .app .a-is-to { white-space: normal; }
    /* compare: the drawing above its list, at the column's width */
    .app .a-card-sec > div[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
    .app .a-canvas { height: auto !important; padding: 8px; }
    .app .a-canvas svg { width: 100%; height: auto; }
    /* the client's header: the four places on their own line */
    .app .a-top:has(.a-nav) .a-row.a-gap-3 > .a-nav { display: flex; }
    .app .a-act > li { padding: 10px 14px; }
    .app .a-is .is-row { min-width: 0; }
    .app .a-par-first > div:last-child { order: -1; }
    .app .a-is .is-col { width: 44px; min-width: 40px; }
    .app .a-fl > dd { flex-wrap: wrap; row-gap: 3px; }
    .app .a-fl > dd > .a-v { white-space: normal; overflow: visible; text-overflow: clip; }
    .app .a-top:has(> .a-row > .a-nav) { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 0; }
    .app .a-top:has(> .a-row > .a-nav) > .a-row { display: contents; }
    .app .a-top:has(> .a-row > .a-nav) .a-nav { order: 3; flex-basis: 100%; flex-wrap: wrap; }
    .app .a-top:has(> .a-row > .a-nav) .a-account { order: 2; margin-left: auto; }
    .app .a-top:has(> .a-row > .a-nav) .a-navitem { height: 40px; padding: 0 8px; }
  }
  @container awin (max-width: 420px) {
    .app .a-is-to { display: none; }
    .app .a-is .is-col { padding-left: 0; padding-right: 0; }
  }
}
/* the slim strip has no browser frame: it is its own width container */
.app.a-strip { container-type: inline-size; container-name: awin; }
/* the still panel's header wraps whole: drawing number, then status and rev tag */
.app .a-still-hd { flex-wrap: wrap; row-gap: 6px; }
.app .a-still-hd .a-mono, .app .a-still-hd .a-revtag { white-space: nowrap; }
/* the narrowest phones: the issue sheet keeps every transmittal column on screen */
@media (max-width: 640px) {
  @container awin (max-width: 330px) {
    .app .a-is .is-col { width: 34px; min-width: 34px; }
    .app .a-is .is-row, .app .a-is .is-hd, .app .a-is .is-ft { padding-left: 8px; padding-right: 6px; }
    .app .a-is .is-hd { letter-spacing: 0; }
  }
}
.app .a-hreg th { white-space: nowrap; }
/* the hero register in a narrow window: status sits under the title, so no column is squeezed to nothing */
@container awin (max-width: 440px) {
  .app .a-hreg, .app .a-hreg thead, .app .a-hreg tbody { display: block; }
  .app .a-hreg colgroup, .app .a-hreg th:nth-child(4) { display: none; }
  .app .a-hreg tr { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; align-items: center; }
  .app .a-hreg td, .app .a-hreg th { display: block; height: auto; }
  .app .a-hreg th { padding-top: 9px; padding-bottom: 9px; }
  .app .a-hreg td:nth-child(1) { grid-row: 1 / span 2; }
  .app .a-hreg td:nth-child(2), .app .a-hreg th:nth-child(2) { grid-column: 2; grid-row: 1; padding-bottom: 2px; }
  .app .a-hreg td:nth-child(3), .app .a-hreg th:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; text-align: center; }
  .app .a-hreg td:nth-child(4) { grid-column: 2; grid-row: 2; padding-top: 2px; }
  .app .a-hreg tbody tr { border-top: 1px solid hsl(var(--ink-100)); }
  .app .a-hreg tbody td { border: 0; }
}
/* a reflowing issue sheet fits its card: the drawing column gives up its 240 px minimum, day columns narrow */
@container awin (max-width: 760px) {
  .app.is-flow .a-is .is-row { min-width: 0; }
  .app.is-flow .a-is .is-col { width: 52px; min-width: 48px; }
}

/* the fade at a cropped panel's foot is as tall as the blank space above the crop (main.js sets --fade; none when it would cross text) */
.app .a-viewport[data-cut]::after { height: var(--fade, 56px); }
.app .a-viewport[data-nofade]::after { display: none; }

/* a reflowed window is never cropped, so it has no fade (static.html, with no script, starts every window reflowed) */
.app.is-flow .a-viewport[data-cut]::after { display: none; }


/* ==========================================================================
   G1 (paper v7): the windows drawn faithfully for the width they are shown at.
   routes/app-shell.tsx, components/rail.tsx, components/layout-rail.ts, components/ui/sheet.tsx.
   Below 1024 px the real app has no project switcher and no search box, below 1280 no account text and no "Collapse menu"; the
   content has 24 px padding and detail pages stack. From 768 px (md) the section nav is the 60 px icon rail, below it a tab bar;
   below 640 px (sm) the header is the icon, Home, Hub, a bell and the avatar. The markup carries both forms; the window's own
   width picks one (container queries), so the same window is right at every column.
   ========================================================================== */
.app .a-top-c { padding: 0 24px; gap: 16px; }
.app .a-top-c .a-top-l { gap: 16px; }
.app .a-top-c .a-lk { display: flex; align-items: center; flex-shrink: 0; }
.app .a-top-c .a-mark { display: none; height: 24px; width: 24px; flex-shrink: 0; }
.app .a-vsep-c { width: 1px; height: 24px; background: hsl(var(--border)); flex-shrink: 0; }
.app .a-nav-c { display: flex; align-items: center; gap: 4px; font-size: 13px; line-height: 18px; min-width: 0; }
.app .a-top-c .a-bell { display: none; width: 18px; height: 18px; color: inherit; }
.app .a-top-r { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.app .a-hsearch { width: 40px; height: 40px; color: hsl(var(--ink-700)); }
.app .a-hsearch .a-i { width: 20px; height: 20px; }
.app .a-ctop .a-ctop-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app .a-ctop .a-nav-scroll { overflow: hidden; }
/* v7: a tab bar that runs past the window's edge ends on a WHOLE tab: the tabs that do not fit wrap onto a second line the bar clips, so no word is ever cut */
.app .a-nav-scroll { flex-wrap: wrap; align-content: flex-start; height: 56px; row-gap: 8px; }
@container awin (max-width: 639px) {
  .app .a-top-c { gap: 8px; }
  .app .a-top-c .a-top-l { gap: 12px; }
  .app .a-top-c .a-lockup, .app .a-top-c .a-vsep-c, .app .a-top-c .a-nlabel, .app .a-top-c .a-hsearch { display: none; }
  .app .a-top-c .a-mark, .app .a-top-c .a-bell { display: block; }
}
/* the shell: a column below md (header, tab bar, page); from md the icon rail beside the page */
.app .a-shell-c { flex-direction: column; }
.app .a-shell-c > .a-rail-c { display: none; }
.app .a-shell-c .a-content { padding: 24px; }
.app .a-tabbar { position: relative; margin: 24px 24px 0; border-bottom: 1px solid hsl(var(--ink-200)); overflow: hidden; font-size: 13px; line-height: 18px; }
.app .a-tabbar-in { display: flex; flex-wrap: wrap; gap: 4px 8px; width: auto; height: 35px; }
.app .a-tab-c { position: relative; display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 500; color: hsl(var(--ink-500)); white-space: nowrap; }
.app .a-tab-c.is-active { color: hsl(var(--foreground)); border-bottom-color: hsl(var(--brand)); }
.app .a-tab-fig { margin-left: auto; font-size: 11px; line-height: 14px; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: hsl(var(--ink-500)); }
@container awin (min-width: 768px) {
  .app .a-shell-c { flex-direction: row; }
  .app .a-shell-c > .a-rail-c { display: flex; }
  .app .a-shell-c > .a-tabbar { display: none; }
}
/* a window flows (is-flow) or is a phone: this shell is already built for its width, so the older reflow rules stand down */
.app .a-shell-c .a-rail-c { min-height: 0; }
.app .a-cutonly { display: block; }
.app.is-flow .a-cutonly { display: none; }
@media (max-width: 640px) { .app .a-cutonly { display: none; } }

/* the 480 px right sheet over a dimmed page (components/ui/sheet.tsx): drawn in the window's own grid so the window is as tall as the sheet or the page, whichever is taller */
.app .a-scrim-sheet { position: relative; display: grid; }
.app .a-scrim-sheet > * { grid-area: 1 / 1; min-width: 0; }
.app .a-scrim-sheet::before { content: ''; position: absolute; inset: 0; background: hsl(205 15% 12% / .32); z-index: 1; }
.app .a-sheetp { position: relative; z-index: 2; justify-self: end; align-self: stretch; width: min(480px, 100%); display: flex; flex-direction: column; background: hsl(var(--background)); box-shadow: -1px 0 0 hsl(var(--ink-200)), -24px 0 60px -20px rgba(16,24,32,.28); }
.app .a-sheetp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid hsl(var(--ink-100)); }
.app .a-sheetp-title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.015em; color: hsl(var(--foreground)); }
.app .a-sheetp-desc { margin-top: 4px; font-size: 13px; line-height: 18px; color: hsl(var(--ink-500)); }
.app .a-sheetp-x { flex-shrink: 0; margin: 2px -4px 0 0; padding: 4px; color: hsl(var(--ink-500)); }
.app .a-sheetp-body { flex: 1; padding: 20px 24px; }
.app .a-sheetp-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px; border-top: 1px solid hsl(var(--ink-100)); }
.app .a-mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@container awin (max-width: 639px) { .app .a-mgrid { grid-template-columns: minmax(0, 1fr); } }
.app .a-mf-lab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-bottom: 6px; font-size: 13px; line-height: 20px; font-weight: 500; color: hsl(var(--foreground)); }
.app .a-req { margin-left: 2px; color: hsl(var(--destructive)); }
.app .a-mf .a-input { width: 100%; box-sizing: border-box; }
.app .a-mf .a-tick { width: 15px; height: 15px; color: hsl(var(--tone-positive-strong)); }
.app .a-mf-save { margin-top: 16px; }
/* the title-block crop popover sits beside the sheet, on the dimmed page; it needs the room of a 768 px window */
.app .a-scrim-sheet > .a-pop-l { position: absolute; z-index: 5; }
@container awin (max-width: 767px) { .app .a-scrim-sheet > .a-pop-l { display: none; } }

/* hero frame 3: while the answer is written the answer area shows the app's own status line (ai-query-bar.tsx THINKING_MESSAGES), never a blank or a placeholder bar */
.app .a-think { display: none; }
.app .a-ask-ans.is-pending > .a-think { display: block; position: absolute; left: 16px; right: 16px; top: 14px; font-size: 13px; line-height: 21px; color: hsl(var(--ink-500)); }
.app .a-ask-ans.is-pending { min-height: 56px; }
/* in the hero the answer area holds only the status line while it is written (no reserved blank under it); the window grows to the
   answer when it lands, on the same .38 s transition as a frame change */
.app.a-hero-win .a-ask-ans.is-pending > :not(.a-think) { display: none; }
.app.a-hero-win .a-ask-ans.is-pending > .a-think { position: static; }
/* the project title block (features/projects/overview/title-block.tsx): eyebrow and name */
.app .a-tb { padding: 2px 2px 14px; }
.app .a-tb-eyebrow { font-size: 11px; line-height: 14px; letter-spacing: .06em; font-weight: 700; text-transform: uppercase; color: hsl(var(--ink-500)); }
.app .a-tb-name { margin-top: 4px; font-size: 20px; line-height: 26px; letter-spacing: -.02em; font-weight: 600; color: hsl(var(--foreground)); }
/* the register's search (SearchInput, "Drawing number or title") */
.app .a-hreg-search { width: 100%; box-sizing: border-box; margin-bottom: 10px; }
/* review: the round toggle (review-detail-page.tsx: rounded-sm border px-3 py-1 text-xs font-medium) */
.app .a-rtog { border-radius: var(--radius-sm); border: 1px solid hsl(var(--ink-200)); padding: 4px 12px; font-size: 12px; line-height: 16px; font-weight: 500; color: hsl(var(--ink-600)); }
.app .a-rtog.is-on { border-color: hsl(var(--brand)); background: hsl(var(--brand-subtle)); color: hsl(var(--brand-ink)); }
.app .a-mb-3 { margin-bottom: 12px; }
/* the Client's page body (client-shell.tsx main) and the recipient rows in a 250 px card */
.app .a-cmain { padding: 24px; }
.app .a-rcp .a-lr, .app .a-rcp > li { padding-top: 10px; padding-bottom: 10px; }
.app .a-sheet-base { display: flex; flex-direction: column; }
.app .a-sheet-base > .a-shell { flex: 1; }
/* rule-transmittal: a 190 to 250 px card keeps the … menu on the title row and every word whole */
@container awin (max-width: 300px) {
  .app .a-rtw { padding: 10px !important; }
  .app .a-rtw .a-rtw-t { flex-wrap: nowrap; }
  .app .a-rcp > li { gap: 8px; padding-left: 0; padding-right: 0; }
  .app .a-rcp > li > .a-i { display: none; }
  .app .a-rtw .a-sc-body { padding-left: 12px; padding-right: 12px; }
}
/* review: the drawing's lower strip (the page is scrolled past the top of the preview) */
.app .a-pvstrip { height: 70px; overflow: hidden; text-align: center; border-radius: var(--radius-sm); background: hsl(var(--ink-50)); }
.app .a-pvstrip > div { display: inline-block; }
.app .a-ctop-l { flex: 0 0 auto; }
/* handover: a narrow card lists one entry per line, so no path is broken inside a word */
@container awin (max-width: 470px) { .app .a-hkv .a-kv { grid-template-columns: minmax(0, 1fr) !important; } }
/* a G1 window narrower than 600 px that is drawn 1:1 (a wide column) is whole, never the phone crop */
.app.a-g1 .a-viewport { max-height: none; overflow: hidden; }
.app.a-g1 .a-viewport > .a-screen { width: 100%; min-width: 0; margin: 0; }

/* ---- the record's verification strip (v9, owner: the tamper-evident record): one quiet line under the review's rounds ---- */
.app .a-seal { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 12px; border-radius: var(--radius); background: hsl(var(--tone-positive-subtle) / .6); box-shadow: inset 0 0 0 1px hsl(var(--tone-positive-strong) / .18); font-size: 12px; line-height: 17px; color: hsl(var(--ink-700)); }
.app .a-seal .a-i { flex: none; width: 15px; height: 15px; margin-top: 1px; color: hsl(var(--tone-positive-strong)); }
.app .a-seal b { font-weight: 600; color: hsl(var(--ink-900)); }

/* ---- v7 crops: on a phone a window shows only the panel its section is about. A cut lands on a whole card or row (the element is not drawn),
   so there is no fade and no clipped line. ---- */
@media (max-width: 640px) { .app .a-pc { display: none !important; } .app[data-kit="share-client"] .a-crumbs { display: none; } }
.app .a-xc { display: none !important; }
/* a phone crop also drops the section tab bar of a window whose section is about its page (the page header names where it is) */
@media (max-width: 640px) {
  .app[data-kit="ask-bidder"] .a-shell-c > .a-tabbar, .app[data-kit="review-v5"] .a-shell-c > .a-tabbar, .app[data-kit="still"] .a-shell-c > .a-tabbar,
  .app[data-kit="tender-parity"] .a-shell-c > .a-tabbar, .app[data-kit="hub-v5"] .a-shell-c > .a-tabbar { display: none; }
  /* ... and the app header row (brand, Home, Hub, bell, account) of a window whose panel is below it: a whole row, so nothing is cut */
  .app[data-kit="ask-bidder"] .a-top-c, .app[data-kit="review-v5"] .a-top-c, .app[data-kit="still"] .a-top-c, .app[data-kit="tender-parity"] .a-top-c,
  .app[data-kit="hub-v5"] .a-top-c, .app[data-kit="soon-thread-rfi"] .a-top-c { display: none; }
}
