/* screens.css — the ticket dialog, the confirmation sheet, Agents, Admin and every width — part of the signed v3 console's styles (design/ui-lab/foundry-v3 at 0af1799be),
   every selector scoped to #app so the sign-in door in style.css keeps its own rules. Split in
   two because no served file may exceed 500 lines. */
/* ── the ticket dialog ─────────────────────────────────────────────────────────────────────── */
#app dialog { border: 1px solid #e1e5ec; border-radius: 20px; padding: 0; max-width: 540px; width: calc(100% - 32px); box-shadow: 0 30px 100px #15233833; color: var(--ink); }
#app dialog::backdrop { background: #26344450; backdrop-filter: blur(6px); }
#app .ticket-dialog { max-width: 810px; width: calc(100% - 36px); max-height: 90vh; overflow-y: auto; }
#app .ticket-top { position: sticky; top: 0; z-index: 2; background: #fafbfdef; backdrop-filter: blur(15px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; font-size: 11px; color: var(--muted); gap: 12px; }
#app .ticket-top > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app .ticket-top .x { border-radius: 50%; background: #e9edf2; width: 26px; height: 26px; font-size: 18px; color: #758090; flex-shrink: 0; display: grid; place-items: center; }
#app .review { min-width: 0; display: flex; flex-direction: column; }
#app .review-content { padding: 30px 38px 20px; flex: 1; }
#app .review .tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
#app .review h2 { font-size: 27px; max-width: 600px; margin: 14px 0 12px; letter-spacing: -.85px; }
#app .review h2.raw { font-family: var(--mono); font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
#app .review .description { color: #69727e; font-size: 13px; line-height: 1.7; margin: 0 0 22px; max-width: 690px; }
#app .review .whereis { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
#app .tabs { display: flex; gap: 23px; border-bottom: 1px solid var(--line); margin: 23px 0; overflow-x: auto; }
#app .tabs a { padding: 0 0 11px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
#app .tabs a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
#app .detail-body { min-height: 225px; }
#app .detail-body h3 { font-size: 12px; margin-bottom: 14px; }
#app .proof { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 14px; font-size: 12px; line-height: 1.55; }
#app .proof .check { background: #eef6f1; border-radius: 50%; color: #3a896b; width: 18px; height: 18px; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; margin-top: 1px; }
#app .proof .check.open { background: #f3f4f7; color: #8c939c; }
#app .proof b { font-weight: 550; display: block; }
#app .proof small { color: var(--muted); font-size: 11px; display: block; }
#app .consequence { background: #f3f7fc; border-radius: 11px; padding: 15px 17px; margin-top: 22px; display: flex; gap: 12px; }
#app .consequence svg { color: #6e98c8; width: 18px; }
#app .consequence b { font-size: 11px; display: block; margin-bottom: 4px; color: #385f8a; }
#app .consequence p { font-size: 12px; color: #637589; margin: 0; line-height: 1.55; }
#app .review-footer { border-top: 1px solid var(--line); padding: 18px 32px; display: flex; gap: 10px; justify-content: space-between; align-items: center; background: #fff; position: sticky; bottom: 0; z-index: 1; flex-wrap: wrap; }
#app .review-footer small { font-size: 10px; color: var(--muted); display: block; }
#app .review-footer .refuse { flex-basis: 100%; }
#app .compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
#app .compare > div { padding: 13px; border-radius: 9px; background: #f5f6f8; min-width: 0; overflow-wrap: anywhere; }
#app .compare h4 { margin: 0 0 10px; font-size: 11px; }
#app .compare p, #app .compare li { font-size: 11px; line-height: 1.65; color: var(--muted); }
#app .compare ol { padding-left: 18px; margin: 0; }
#app .standalone-card { border: 1px solid var(--line); border-radius: 17px; background: white; max-width: 930px; margin: auto; overflow: hidden; }
#app .backlink { display: inline-block; margin-bottom: 20px; font-size: 12px; }
/* ── the confirm sheet ─────────────────────────────────────────────────────────────────────── */
#app .sheet-dialog { max-width: 560px; max-height: 90vh; overflow-y: auto; }
#app .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 30px 0; }
#app .sheet-head h2 { font-size: 22px; letter-spacing: -.5px; }
#app .sheet-x { border-radius: 50%; background: #e9edf2; width: 26px; height: 26px; font-size: 18px; color: #758090; flex-shrink: 0; display: grid; place-items: center; }
#app .sheet-body { padding: 14px 30px 24px; }
#app .sheet-lead { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 0 0 16px; }
#app .sheet-note { font-size: 12px; color: #406885; background: #f3f8fc; border-radius: 9px; padding: 10px 12px; margin: 0 0 14px; }
#app .sheet-t { font-size: 15px; margin: 0 0 12px; }
#app .sheet-rec { margin-top: 12px; }
#app .sheet-foot { border-top: 1px solid var(--line); padding: 17px 25px; display: flex; justify-content: flex-end; gap: 9px; }
#app .sheet.grave .btn-primary { background: #b4433a; border-color: #b4433a; }
#app .contract { background: #f5f6f8; border-radius: 11px; padding: 14px 16px; margin: 10px 0; }
#app .contract h3 { font-size: 12px; margin: 0 0 8px; }
#app .contract h4 { margin: 12px 0 6px; }
#app .c-line { font-size: 12px; line-height: 1.65; margin: 0 0 8px; }
#app .c-crit { margin: 0; padding-left: 20px; font-size: 12px; line-height: 1.6; }
#app .c-crit li { margin-bottom: 6px; }
#app .c-not { font-size: 11px; color: var(--muted); margin: 8px 0 0; }
#app .field { margin-top: 14px; }
#app .field label, #app .field h3 { display: block; font-size: 12px; margin-bottom: 6px; }
#app .field-why { font-size: 11px; color: var(--muted); margin: 0 0 10px; line-height: 1.6; }
#app .field textarea { width: 100%; min-height: 80px; border: 1px solid #ccd4df; border-radius: 9px; padding: 12px; resize: vertical; }
#app .field textarea.needs { border-color: #b4433a; }
#app .radios { display: grid; gap: 6px; }
#app .radio { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
#app .proj-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; font-size: 12px; align-items: center; }
#app .th-l { color: var(--muted); }
#app .th-v { font-weight: 550; }
#app .th-d { color: var(--faint); font-size: 11px; }
#app .amend { margin: 0 0 14px; }
#app .amend-h { font-weight: 550; font-size: 13px; margin: 0 0 6px; }
#app .amend p { font-size: 12px; margin: 0 0 6px; }
#app .amend-note { color: var(--muted); }
#app .plain { padding-left: 18px; font-size: 12px; margin: 0; }
/* ── the ask block (what is being asked of you) ────────────────────────────────────────────── */
#app .ask { background: #f3f7fc; border-radius: 12px; padding: 16px 18px; margin: 4px 0 18px; }
#app .ask h2 { font-size: 15px; margin: 0 0 6px; letter-spacing: -.3px; }
#app .ask-none { background: #f5f6f8; }
#app .ask-none p { font-size: 12px; color: var(--muted); margin: 0; }
#app .ask-cost { font-size: 12px; color: #637589; margin: 0 0 12px; line-height: 1.6; }
#app .ask-note { font-size: 11px; color: var(--muted); margin: 0 0 10px; }
#app .refusal { font-size: 11px; padding: 4px 0; }
/* ── the seven questions, the story, progress ──────────────────────────────────────────────── */
#app .q7 { margin-bottom: 18px; }
#app .q7 h3 { font-size: 12px; margin-bottom: 6px; }
#app .q7 p { font-size: 12px; line-height: 1.7; margin: 0; color: #4d5661; }
#app .crit { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#app .crit-i { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: start; font-size: 12px; }
#app .crit-mark { font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 5px; text-align: center; background: #eef6f1; color: #37775e; }
#app .is-open .crit-mark { background: #f3f4f7; color: #8c939c; }
#app .crit-t { margin: 0; line-height: 1.6; }
#app .crit-p { margin: 3px 0 0; }
#app .story { background: #fdf8f1; border: 1px solid #efe1cb; border-radius: 11px; padding: 14px 16px; margin: 0 0 18px; }
#app .story h3 { font-size: 12px; margin-bottom: 6px; color: #976329; }
#app .story-p { font-size: 12px; line-height: 1.7; margin: 0; }
#app .story-links { font-size: 11px; margin: 8px 0 0; }
#app .story-gen { font-size: 10px; color: var(--faint); margin: 6px 0 0; }
#app .prog-line { font-size: 12px; line-height: 1.7; margin: 0 0 8px; }
#app .prog-say { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
#app .lastnote h3 { font-size: 11px; color: var(--muted); margin: 10px 0 4px; }
/* ── the two content classes ───────────────────────────────────────────────────────────────── */
/* Record class is mono and muted wherever it appears; decide class is the body face. Nothing
   else marks the difference, so a reader learns it once. */
#app [data-class="record"] { font-family: var(--mono); color: var(--muted); font-size: 11px; letter-spacing: 0; }
#app .unwritten { white-space: pre-wrap; }
#app .unwritten-note { font-size: 11px; color: #976329; margin: 0 0 6px; }
#app .fold { border: 1px solid var(--line); border-radius: 10px; padding: 0; margin: 14px 0 0; background: #fafbfd; }
#app .fold > summary { padding: 11px 14px; font-size: 12px; list-style: none; display: flex; align-items: center; gap: 8px; }
#app .fold > summary::before { content: '›'; color: var(--faint); transition: transform .15s; display: inline-block; }
#app .fold[open] > summary::before { transform: rotate(90deg); }
#app .fold-in { padding: 4px 14px 14px; overflow-x: auto; }
#app .recpanes { display: grid; gap: 16px; }
#app .recpane h3 { font-size: 11px; margin: 0 0 6px; color: var(--muted); }
#app .recblock { display: grid; gap: 4px; }
#app .rec { display: grid; grid-template-columns: 110px 160px 1fr; gap: 10px; font-size: 11px; padding: 3px 0; border-bottom: 1px solid #eef0f3; overflow-wrap: anywhere; }
#app .rec-note { grid-template-columns: 110px 1fr; }
#app .rec-note .rec-body { grid-column: 1 / -1; margin: 0; white-space: pre-wrap; }
#app .rec-body { margin: 0; white-space: pre-wrap; }
#app .recstrip { font-size: 11px; margin: 12px 0 0; }
#app .derived { font-size: 11px; }
/* ── settings ──────────────────────────────────────────────────────────────────────────────── */
#app .set { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-top: 18px; }
#app .set h2 { font-size: 17px; margin-bottom: 6px; }
#app .set h3 { font-size: 13px; margin: 18px 0 8px; }
#app .facts-line { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--muted); margin: 0 0 16px; font-variant-numeric: tabular-nums; }
#app .set-preview { background: #f5f6f8; box-shadow: none; }
#app .set .list { margin-bottom: 0; }
#app .set-lead { font-size: 12px; color: var(--muted); margin: 0 0 14px; max-width: 720px; line-height: 1.6; }
#app .set-note { font-size: 11px; color: var(--muted); margin: 8px 0 0; }
#app .tblwrap { overflow-x: auto; }
#app table { border-collapse: collapse; width: 100%; font-size: 12px; }
#app th { text-align: left; font-size: 10px; color: var(--muted); font-weight: 600; padding: 6px 10px 8px 0; border-bottom: 1px solid var(--line); letter-spacing: .04em; text-transform: uppercase; }
#app td { padding: 10px 10px 10px 0; border-bottom: 1px solid #eef0f3; vertical-align: top; }
#app .tname { display: block; font-weight: 550; }
#app .a-what { display: block; font-size: 11px; color: var(--muted); }
#app .gstat { display: flex; gap: 10px; align-items: center; font-size: 12px; margin-bottom: 10px; }
#app .gaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
#app .gaps li { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#app .gaps li:last-child { border-bottom: 0; padding-bottom: 0; }
#app .gaps .quiet-link { font-size: 11px; display: inline-block; margin-top: 6px; }
#app .gap-h { font-size: 12px; font-weight: 550; margin: 0; }
#app .gap-b { font-size: 11px; color: var(--muted); margin: 2px 0 0; }
#app .seat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
#app .seat-h { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
#app .seat-n { font-weight: 550; }
#app .seat-r { color: var(--muted); }
#app .seat-hold { margin: 8px 0 0; padding-left: 16px; font-size: 12px; }
#app .seat-idle { font-size: 11px; color: var(--faint); margin: 6px 0 0; }
#app .notrace li { font-size: 11px; }
#app .projpick { display: flex; gap: 10px; align-items: center; }
#app .toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #263544; color: white; border-radius: 12px; box-shadow: 0 8px 35px #0002; padding: 13px 18px; display: none; align-items: center; gap: 20px; z-index: 10; font-size: 12px; max-width: 90vw; }
#app .toast p { margin: 0; }
#app .toast button { color: #9ac9ff; font-size: 12px; white-space: nowrap; }
#app .toast.show { display: flex; }
/* ── responsive ────────────────────────────────────────────────────────────────────────────── */
@media (min-width: 1500px) {
#app .content { padding-top: 48px; }
#app .review-content { padding: 32px 42px; }
#app .review h2 { font-size: 30px; }
}
@media (max-width: 1100px) {
#app .shell { grid-template-columns: 175px 1fr; }
#app .sidebar { padding: 26px 11px; }
#app .content, #app .on-board .content { padding: 28px 25px 40px; }
#app .topbar { padding: 0 25px; }
#app .review-content { padding: 24px; }
#app .review-footer { padding: 18px 24px; }
#app .review h2 { font-size: 24px; }
#app .path { gap: 10px; }
#app .pathnode { padding: 15px; }
#app h1 { font-size: 31px; }
#app .decision-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#app .goalsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#app .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#app .dash { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#app .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#app .taskcard h3 { font-size: 13px; }
#app .taskcard p { font-size: 11px; }
#app .cardbottom { font-size: 9px; }
}
@media (max-width: 850px) {
#app .shell { display: block; }
#app .sidebar { height: auto; position: static; display: flex; flex-direction: row; padding: 12px 18px; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); gap: 14px; }
#app .brand { padding: 0; font-size: 20px; }
#app .brand svg { display: none; }
#app .project, #app .navlabel, #app .sidebottom, #app .shortcut { display: none; }
#app nav#nav { display: flex; margin-left: auto; }
#app nav#nav a { padding: 8px; font-size: 12px; gap: 6px; }
#app nav#nav svg { width: 16px; }
#app .side-search { margin: 0; padding: 8px; width: auto; }
#app .side-search span { display: none; }
#app .topbar { height: 48px; }
#app .content, #app .on-board .content { padding: 25px; }
#app .review-content { padding: 22px; }
#app .review-footer { padding: 16px 22px; }
#app .headingline .quiet-link { display: none; }
#app .summaryline { gap: 17px; }
#app .path { grid-template-columns: 1fr 1fr; }
#app .pathnode:nth-child(2):after { display: none; }
#app .goalpanel { grid-template-columns: 1fr 1fr; }
#app .compare { grid-template-columns: 1fr; }
#app .ruling { flex-direction: column; gap: 3px; }
#app .thresh-row { grid-template-columns: 1fr 1fr; }
#app .proj-row { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 620px) {
#app .sidebar { padding: 10px 12px; gap: 8px; }
#app .brand { font-size: 19px; }
#app nav#nav { display: none; }
#app .side-search { margin-left: auto; }
#app .topbar { padding: 0 18px; }
#app .crumb { font-size: 10px; gap: 8px; }
#app .content, #app .on-board .content { padding: 22px 16px 90px; }
#app h1 { font-size: 27px; letter-spacing: -1px; }
#app .lead { font-size: 12px; }
#app .summaryline { gap: 12px; font-size: 10px; margin: 20px 0; }
#app .summaryline b { font-size: 15px; }
#app .block { padding: 14px; border-radius: 12px; }
#app .block-cycle .goal h2 { font-size: 18px; }
#app .headingline { align-items: flex-start; flex-wrap: wrap; }
#app .segs { display: flex; }
#app .segs a { flex: 1; justify-content: center; padding: 8px 6px; font-size: 12px; }
#app .goalsum { grid-template-columns: 1fr; gap: 8px; }
#app .dash { grid-template-columns: 1fr 1fr; gap: 8px; }
#app .points { grid-template-columns: 1fr; }
#app .cycle-acts { justify-content: flex-start; width: 100%; }
#app .cycle-bar .cycle-acts { margin-left: 0; }
#app .qrow { flex-direction: column; gap: 10px; }
#app .q-act { display: flex; flex: auto; width: 100%; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
#app .q-wait { margin-right: auto; }
#app .q-act .btn { width: auto; }
#app .pickers { display: grid; grid-template-columns: 1fr 1fr; }
#app .picker:first-child { grid-column: 1 / -1; }
#app .picker select { max-width: 100%; width: 100%; }
#app .btn { min-height: 40px; }
#app .cycle-bar .btn { flex: 1; }
#app .cycle-acts .btn { padding: 7px 10px; font-size: 11px; }
#app .cyccard { padding: 14px 16px; }
#app .facts { grid-template-columns: 1fr 1fr; }
#app .done > summary { grid-template-columns: 1fr auto; padding: 12px 16px; }
#app .done-span { grid-column: 1 / -1; text-align: left; min-width: 0; }
#app .done-body { padding: 4px 16px 16px; }
#app .rowwrap { flex-direction: column; align-items: stretch; }
#app .rowwrap .rowacts { padding: 0 16px 12px; }
#app .nextgoal { padding: 16px; }
#app .nextgoal h1 { font-size: 22px; }
#app .board-brief { align-items: flex-start; padding: 12px; font-size: 11px; flex-direction: column; gap: 5px; }
#app .board-brief .quiet-link { padding: 0; }
#app .taskcard { padding: 12px; }
#app .decision-grid { grid-template-columns: 1fr; }
#app .path, #app .goalpanel, #app .compare { grid-template-columns: 1fr; }
#app .pathnode:not(:last-child):after { display: none; }
#app .pathnode { min-height: 0; }
#app .row { padding: 14px 16px; gap: 8px; }
#app .row { flex-wrap: wrap; }
#app .row .facefoot { flex-basis: 100%; justify-content: flex-start; margin-top: 2px; }
#app .row .chevron { display: none; }
#app .sectionhead h2 { font-size: 18px; }
#app .toast { width: calc(100% - 30px); }
#app .ticket-dialog { width: 100%; max-width: 100%; max-height: 96vh; margin: auto 0 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
#app .review-content { padding: 20px; }
#app .ticket-top { padding: 12px 20px; }
#app .review h2 { font-size: 22px; }
#app .review-footer { align-items: flex-start; gap: 13px; padding: 14px 20px; }
#app .review-footer .acts { width: 100%; }
#app .tag { font-size: 9px; }
#app .tabs { gap: 18px; }
#app .crit-i { grid-template-columns: 54px 1fr; }
#app .rec, #app .rec-note { grid-template-columns: 1fr; gap: 2px; }
#app .sheet-head, #app .sheet-body { padding-left: 20px; padding-right: 20px; }
#app .set { padding: 16px; }
#app .goalhead { flex-direction: column; }
/* the access table restacks into cards: same markup, every value keeps its column's name */
#app table, #app tbody, #app tr, #app td { display: block; width: 100%; }
#app thead { display: none; }
#app tr { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
#app td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 80px 1fr; gap: 8px; align-items: baseline; }
#app td[data-label]::before { content: attr(data-label); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
#app td[data-label=""] { grid-template-columns: 1fr; }
#app td[data-label=""]::before { display: none; }
#app .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #ffffffee; backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 6; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
#app .tabbar a { flex: 1; text-align: center; font-size: 10px; color: #59616b; padding: 8px 2px; border-radius: 8px; }
#app .tabbar a[aria-current="page"] { color: #155dab; background: #dfe9f7; }
#app .tabbar .count { font-size: 9px; background: #cbdcf2; color: #215c9e; border-radius: 4px; padding: 0 4px; margin-left: 3px; }
}
@media (prefers-reduced-motion: reduce) {
#app * { transition: none !important; scroll-behavior: auto !important; }
}
/* ── Agents and Admin (14 September) ─────────────────────────────────────────────────────────── */
#app .blk { margin-top: 26px; }
#app .blk .sectionhead { margin: 0 0 12px; }
#app .blk .list { margin-bottom: 0; }
#app .acdrawer.pin.below { margin-top: 12px; }
#app .acdrawer.pin.below > summary { padding: 8px 2px; }
#app .acdrawer.pin.below .dr-t { font-size: 13px; }
#app .doorpill { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: #6b7480; background: #f0f2f5; padding: 2px 7px 2px 3px; border-radius: 4px; white-space: nowrap; outline-offset: 1px; }
#app .filterbar.tight { margin: 4px 0 14px; }
#app .doorfacts { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 20px; }
#app .field input { width: 100%; border: 1px solid #ccd4df; border-radius: 8px; padding: 9px 11px; font-size: 13px; background: #fff; }
#app .sheet-body select { border: 1px solid #ccd4df; border-radius: 7px; padding: 6px 8px; background: #fff; font-size: 12px; }
#app button.identity { width: 100%; text-align: left; cursor: pointer; border-radius: 10px; padding: 6px 6px 18px; margin: 0 -6px 16px; }
#app button.identity:hover { background: #e9edf2; }
#app button.identity b { display: block; }
#app button.identity span:last-child { font-size: 11px; color: var(--muted); }
#app .sheet-dialog.pop { max-width: 340px; margin: auto auto 24px 24px; }
#app .sheet.pop .sheet-body { padding: 22px 24px 18px; }
#app .sheet.pop .sheet-foot { padding: 12px 18px; }
#app .me { display: flex; gap: 14px; align-items: flex-start; }
#app .me .avatar.big { width: 44px; height: 44px; font-size: 15px; margin: 0; flex-shrink: 0; }
#app .me b { font-size: 14px; }
#app .me-mail { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
#app .me-roles { display: flex; gap: 5px; flex-wrap: wrap; }
@media (max-width: 700px) {
#app .sheet-dialog.pop { margin: auto; }
}
#app .headright .btn { white-space: nowrap; }
@media (max-width: 620px) {
#app .topbar { height: 44px; }
#app .topbar .crumb { display: none; }
}
/* A readable board at each width, with aligned cycle controls. */
#app .cycle-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; margin-bottom: 24px; }
#app .cycle-bar .segs { grid-column: 1; grid-row: 1; justify-self: start; }
#app .cycle-pills { grid-column: 1; grid-row: 2; }
#app .cycle-pills .tag { background: none; padding: 0; color: var(--muted); font-size: 11px; }
#app .cycle-pills .tag + .tag { border-left: 1px solid var(--line); padding-left: 10px; margin-left: 4px; border-radius: 0; }
#app .cycle-bar .cycle-acts { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin-left: 0; }
#app .block-cycle .goal { padding: 20px; margin: 0 0 20px; background: var(--bg); border-radius: 10px; }
#app .block-cycle .goal h2 { font-size: 20px; font-weight: 550; line-height: 1.45; letter-spacing: -.35px; text-wrap: pretty; }
#app .block-cycle .goal .tag { background: none; padding: 0; font-size: 11px; }
#app .lane-heading { min-height: 36px; align-items: center; }
#app .lane-heading h2 { font-size: 13px; font-weight: 600; }
#app .lane-cards { gap: 10px; }
#app .taskcard { padding: 14px; }
#app .taskcard h3 { font-size: 14px; line-height: 1.45; }
#app .taskcard p { font-size: 12px; line-height: 1.5; margin-top: 6px; }
#app .taskcard .facefoot { margin-top: 12px; padding-top: 10px; }
#app .taskcard h3.raw { font-size: 12px; }
#app .point-h { align-items: flex-start; flex-wrap: wrap; }
#app .point h3 { font-size: 13px; line-height: 1.5; }
@media (max-width: 1100px) {
#app .cycle-bar { grid-template-columns: 1fr; }
#app .cycle-bar .segs { grid-column: 1; }
#app .cycle-bar .cycle-acts { grid-column: 1; grid-row: 3; justify-content: flex-start; }
}
@media (max-width: 620px) {
#app .cycle-bar { gap: 12px; margin-bottom: 16px; }
#app .cycle-bar .segs { justify-self: stretch; }
#app .cycle-bar .segs a { flex-wrap: wrap; gap: 5px; }
#app .cycle-bar .btn { flex: 1 1 120px; }
#app .block-cycle .goal { padding: 16px; }
#app .block-cycle .goal h2 { font-size: 18px; line-height: 1.5; }
#app .taskcard h3 { -webkit-line-clamp: 3; }
}
/* Dialog reading order and shared edges, including long phone sheets. */
#app .sheet-head { position: sticky; top: 0; z-index: 2; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); background: #fff; }
#app .sheet-head h2 { font-size: 21px; line-height: 1.35; }
#app .sheet-head h2:focus { outline: none; }
#app .sheet-body { padding: 20px 24px 24px; }
#app .sheet-foot { position: sticky; bottom: 0; z-index: 2; background: #fff; padding: 16px 24px; flex-wrap: wrap; }
#app .sheet-x { width: 36px; height: 36px; background: transparent; border: 1px solid var(--line); border-radius: 8px; }
#app .sheet-body input, #app .sheet-body select { min-height: 40px; border-radius: 8px; }
#app .sheet-body select { width: 100%; }
#app .sheet-dialog { scroll-padding: 88px 0 80px; }
@media (max-width: 850px) {
#app .sidebar { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 40px); gap: 8px 12px; padding: 12px 24px; }
#app .sidebar .brand { display: none; }
#app .sidebar .project { display: flex; grid-column: 1; grid-row: 1; margin: 0; width: auto; max-width: 100%; justify-self: start; padding: 6px 10px; }
#app .sidebar .project > span:last-child { min-width: 0; }
#app .sidebar .project b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .sidebar .side-search { grid-column: 2; grid-row: 1; width: 40px; height: 40px; margin: 0; padding: 10px; }
#app .sidebar .sidebottom { display: contents; }
#app .sidebar .sidebottom button.identity { grid-column: 3; grid-row: 1; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#app .sidebar .identity > span:last-child { display: none; }
#app .sidebar .identity .avatar { margin: 0; }
#app .sidebar nav#nav { grid-column: 1 / -1; grid-row: 2; margin: 0; justify-content: space-between; gap: 8px; }
#app .sidebar nav#nav a { justify-content: center; min-height: 40px; }
}
@media (max-width: 620px) {
#app .sidebar { padding: 10px 16px; }
#app .sheet-head, #app .sheet-body, #app .sheet-foot { padding-left: 20px; padding-right: 20px; }
#app .sheet-x { width: 40px; height: 40px; }
}
@media (max-width: 850px) {

}
/* Status is one aligned ledger; counts, navigation and disclosure have separate treatments. */
#app .dash { grid-template-columns: minmax(170px, 1.2fr) repeat(4, minmax(100px, 1fr)); gap: 0; align-items: stretch; }
#app .dash .tile:nth-child(n) { grid-column: auto; grid-row: auto; }
#app .dash .tile:first-child { margin-right: 16px; align-self: start; }
#app .dash .tile-stats { background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 4px 14px; gap: 4px; }
#app .stat-details { padding: 0; border: 0; }
#app .stat-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 6px; list-style: none; padding: 0; min-height: 24px; margin-bottom: 8px; }
#app .stat-details > summary::-webkit-details-marker { display: none; }
#app .stat-details > summary h3 { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; }
#app .stat-details > summary svg { display: none; }
#app .stat-details > summary::after { content: '+'; font-size: 16px; font-weight: 400; color: var(--muted); }
#app .stat-details[open] > summary::after { content: '−'; }
#app .stat-rows { display: grid; gap: 2px; }
#app .stat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 28px; padding: 0; font-size: 12px; line-height: 1.4; color: var(--muted); border-radius: 6px; }
#app .stat-label { grid-column: 1; grid-row: 1; }
#app .stat-value { grid-column: 2; grid-row: 1; display: inline-flex; align-items: baseline; justify-content: center; min-width: 30px; padding: 2px 6px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
#app .stat-value small { display: inline; font-size: 10px; font-weight: 400; margin-left: 3px; }
#app .stat-link .stat-value { background: #f5f9ff; border: 1px solid #d7e5f6; border-radius: 6px; color: #155dab; }
#app .stat-link:hover .stat-value { background: #e4effd; border-color: #a9c6e9; }
#app .stat-link:hover .stat-label { color: var(--ink); }
#app .stat-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
#app .stat-row svg, #app .stat-divider { display: none; }
#app .dash .tile-stats .units { margin: 2px 0 8px; }
#app .dash .tile-stats .agents { margin: 2px 0 8px; }
#app .dash .tile-stats > .tl:last-child { margin-top: auto; padding-top: 4px; font-size: 10px; }
@media (max-width: 1100px) and (min-width: 741px) {
#app .dash .tile-stats { padding-left: 10px; padding-right: 10px; }
#app .stat-row { gap: 5px; font-size: 11px; }
}
@media (max-width: 740px) {
#app .dash { display: block; }
#app .dash .tile:first-child { margin: 0 0 12px; }
#app .dash .tile-stats { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 4px 14px; padding: 12px 0; border-left: 0; border-top: 1px solid var(--line); }
#app .stat-details { grid-column: 1; grid-row: 1 / span 2; }
#app .stat-details > summary { align-items: baseline; min-height: 30px; }
#app .stat-rows, #app .dash .tile-stats > .tl { grid-column: 2; }
#app .stat-row { min-height: 34px; }
#app .stat-link .stat-value { min-width: 36px; }
#app .dash .tile-stats > .tl:last-child { padding-top: 4px; margin: 0; }
}
/* One stage sequence at every width; only this viewport pans sideways. */
#app .kanban { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 12px; width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 14px; scroll-snap-type: x proximity; scroll-padding-inline: 2px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #b9c5d3 #edf0f4; }
#app .kanban:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
#app .kanban > .lane { flex: 0 0 280px; max-width: calc(100% - 24px); height: auto; max-height: clamp(320px, 62svh, 620px); padding: 12px; scroll-snap-align: start; }
#app .kanban .lane-cards { flex: auto; overflow-y: auto; overscroll-behavior-y: contain; }
/* Secondary groups read as disclosures, and account chrome reads as a menu. */
#app .screen-agents .acdrawer.pin.below { padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 10px; }
#app .screen-agents .acdrawer.pin.below > summary { min-height: 44px; padding: 10px 14px; gap: 10px; flex-wrap: nowrap; }
#app .screen-agents .acdrawer.pin.below > summary:hover { background: #f8f9fb; }
#app .screen-agents .acdrawer.pin.below .dr-t { font-size: 12px; font-weight: 500; letter-spacing: 0; flex: 1; }
#app .group-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; background: #eef1f5; border-radius: 5px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
#app .group-divider { font-size: 0; }
#app .screen-agents .acdrawer.pin.below .dr-x { margin: 0; width: 12px; text-align: center; font-size: 18px; color: var(--muted); }
#app .screen-agents .acdrawer.pin.below .dr-in { padding: 0 14px 14px; }
#app .screen-agents .acdrawer.pin.below .list { border-radius: 8px; }
#app button.identity { display: grid; grid-template-columns: 28px minmax(0, 1fr) 8px; align-items: center; gap: 8px; width: 100%; padding: 8px 4px; margin: 0 0 12px; border: 1px solid transparent; border-radius: 8px; }
#app button.identity:hover { background: #fff; border-color: var(--line); }
#app button.identity::after { content: '›'; color: var(--muted); font-size: 18px; }
#app button.identity .avatar { display: grid; place-items: center; width: 28px; height: 28px; margin: 0; font-size: 10px; line-height: 1; }
#app button.identity br { display: none; }
#app button.identity b { font-size: 12px; line-height: 1.4; margin-bottom: 2px; }
#app button.identity > span:last-child { line-height: 1.4; white-space: nowrap; font-size: 10.5px; }
#app .sheet-dialog.pop { border-radius: 12px; box-shadow: 0 12px 40px #20252b26; }
#app .sheet-dialog.pop::backdrop { background: transparent; backdrop-filter: none; }
#app .sheet.pop .sheet-body { padding: 20px; }
#app .me { gap: 12px; }
#app .me .avatar.big { display: grid; place-items: center; width: 40px; height: 40px; font-size: 13px; line-height: 1; }
#app .me > div { flex: 1; min-width: 0; }
#app .me b { font-size: 15px; line-height: 1.4; }
#app .me-mail { font-size: 12px; margin: 2px 0 10px; }
#app .me-roles { gap: 5px; }
#app .me-roles .spill { background: #eef1f5; color: var(--muted); font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; white-space: normal; }
#app .me-roles .spill:last-child { flex-basis: 100%; padding: 0; background: none; font-size: 11px; }
#app .sheet.pop .sheet-foot { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 8px; }
#app .sheet.pop .sheet-foot .btn { justify-content: flex-start; min-height: 40px; padding: 10px 12px; border: 0; background: transparent; box-shadow: none; font-size: 12px; font-weight: 500; }
#app .sheet.pop .sheet-foot .btn:hover { background: #f2f4f7; }
#app .sheet.pop .sheet-foot a::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; }
#app .sheet.pop .sheet-foot button { color: var(--muted); }
@media (max-width: 850px) {
#app button.identity::after { display: none; }
}
#app .me b:focus { outline: none; }

/* ── what the record does not hold yet ───────────────────────────────────────────────────────── */
#app .absent { color: var(--muted); font-size: 13px; padding: 14px 0; max-width: 62ch; }
#app .block .absent, #app .cyccard .absent { padding: 4px 0 10px; }
/* The refusal slot. It is EMPTY until the engine says something, and an empty red bar above a sheet
   reads as "something is wrong here" before anything is. `[hidden]` has to win over this rule,
   which it does not by default once a display is set — which is exactly how it shipped looking
   like a fault on a sheet that had none. */
#app #sheetErr { display: block; margin: 0 0 14px; padding: 11px 14px; border-radius: 10px;
  background: #fdeceb; border: 1px solid #eebbb6; color: #8f332c; font-size: 13px; white-space: pre-wrap; }
#app #sheetErr[hidden] { display: none; }
