svg.i { width: 16px; height: 16px; flex: none; }
.rail a svg { width: 15px; height: 15px; color: var(--muted); }
.tbl-docs td:nth-child(2) { white-space: normal; min-width: 250px; }
.tbl-docs td { padding-top: 10px; padding-bottom: 10px; }
/* Milestone 1 additions — forms, lists, boards, calendar, viewer, panels */
mark { background: #FFF1B8; color: inherit; border-radius: 3px; padding: 0 2px; }
.req { color: var(--cta); font-style: normal; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; color: var(--body); }
.input { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.input svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.input.ph { color: var(--muted); }
.input.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tonal); }
.input.textarea { min-height: 112px; align-items: flex-start; padding: 10px 12px; line-height: 1.5; }
.input.locked { background: var(--sunken); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span2 { grid-column: span 2; }
.help { font-size: 12px; color: var(--muted); }
.toggle { width: 36px; height: 20px; border-radius: 999px; background: #D9D9D9; position: relative; display: inline-block; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 18px; }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #C4C4C4; display: inline-block; vertical-align: middle; flex: none; }
.radio.on { border: 5px solid var(--accent); }
.chk { flex: none; }
.chk.on { background: var(--accent); border-color: var(--accent); position: relative; }
.chk.on::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: 14px; }
.banner.warn { background: #FFF8E6; border-color: #F2D48A; color: #6B4700; }
.banner.info { background: var(--accent-tonal); border-color: #BBDDFB; color: var(--accent-deep); }
.banner.ok { background: #E6F5EE; border-color: #B7E1CB; color: #0F6B47; }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.banner .b-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.banner b { font-weight: 600; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row b { color: var(--ink); font-weight: 600; }
.row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.row.sel { background: var(--accent-tonal); margin: 0 -24px; padding-left: 24px; padding-right: 24px; border-bottom-color: transparent; border-radius: 0; }
.ico-sq { width: 36px; height: 36px; border-radius: 10px; background: var(--sunken); display: grid; place-items: center; color: var(--body); flex: none; }
.ico-sq svg { width: 16px; height: 16px; }
.ico-sq.blue { background: var(--accent-tonal); color: var(--accent-deep); }
.ico-sq.red { background: #FBEAEA; color: #8E1C22; }
.ico-sq.green { background: #E6F5EE; color: #0F6B47; }
.ico-sq.amber { background: #FFF4DB; color: #8A5A00; }
.group-h { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 0 4px; }
.group-h:first-child { padding-top: 0; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: start; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.hstack { display: flex; align-items: center; gap: 8px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .ink { color: var(--ink); } .strong { font-weight: 600; color: var(--ink); }
.tight { padding-top: 4px !important; }
.flush { padding: 0 !important; }
.tree a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--body); }
.tree a svg { width: 15px; height: 15px; color: var(--muted); }
.tree a.on { background: var(--accent-tonal); color: var(--accent-deep); font-weight: 600; }
.tree a.on svg { color: var(--accent-deep); }
.tree a .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.tree .sub a { padding-left: 30px; }
.board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: start; }
.colm { background: var(--sunken); border-radius: 14px; padding: 10px; }
.colm h3 { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.colm h3 .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; font-size: 13px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.kcard b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.kcard .m { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.kcard .m .avatar { width: 22px; height: 22px; font-size: 10px; margin-left: auto; }
.kcard.drag { transform: rotate(-1.5deg); box-shadow: 0 12px 28px rgba(16,24,40,.14); border-color: var(--accent); }
.colm .drop { border: 1.5px dashed var(--accent); border-radius: 12px; height: 72px; margin-bottom: 8px; background: var(--accent-tonal); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-grid .dow { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sunken); }
.cal-cell { min-height: 128px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; font-size: 12px; }
.cal-cell .d { font-weight: 600; color: var(--body); margin-bottom: 6px; }
.cal-cell.off .d { color: #BDBDBD; }
.cal-cell.today .d { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; }
.ev { display: block; font-size: 11px; font-weight: 600; padding: 3px 6px; border-radius: 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.h { background: #FBEAEA; color: #8E1C22; }
.ev.d { background: var(--accent-tonal); color: var(--accent-deep); }
.ev.r { background: #FFF4DB; color: #8A5A00; }
.ev.c { background: var(--sunken); color: var(--body); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.stepper { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stepper .st { display: flex; align-items: center; gap: 8px; }
.stepper .st i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); font-style: normal; font-size: 12px; }
.stepper .st i svg { width: 12px; height: 12px; }
.stepper .st.done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper .st.now { color: var(--ink); } .stepper .st.now i { border-color: var(--ink); color: var(--ink); }
.stepper .ln { width: 40px; height: 1px; background: var(--line); }
.pdf { background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(16,24,40,.08); width: 600px; margin: 0 auto; padding: 48px 56px; min-height: 780px; }
.pdf h4 { font-size: 15px; color: #111; margin: 0 0 4px; font-weight: 700; }
.pdf .meta { font-size: 11px; color: #777; margin-bottom: 18px; }
.pdf p { font-size: 12.5px; line-height: 1.7; color: #333; margin: 0 0 12px; }
.pdf .stamp { position: absolute; right: 16px; top: 12px; font-size: 10px; font-weight: 700; color: #8E1C22; border: 1px solid #8E1C22; padding: 1px 6px; border-radius: 4px; }
.thumbs { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.thumb { width: 56px; height: 74px; border: 1px solid var(--line); border-radius: 4px; background: #fff; display: grid; place-items: end center; font-size: 10px; color: var(--muted); padding-bottom: 4px; }
.thumb.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tonal); }
.bubble { border-radius: 14px; padding: 14px 16px; font-size: 14px; line-height: 1.55; }
.bubble.q { background: var(--sunken); color: var(--ink); align-self: flex-end; max-width: 85%; }
.bubble.a { border: 1px solid var(--line); background: var(--surface); }
.bubble.a p { margin: 0 0 10px; } .bubble.a p:last-child { margin: 0; }
.cite { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--accent-deep); background: var(--accent-tonal); border-radius: 6px; padding: 1px 6px; vertical-align: 1px; white-space: nowrap; }
.cite.ok { background: #E6F5EE; color: #0F6B47; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.16); }
.panel { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 440px; background: var(--surface); border-radius: 18px; box-shadow: 0 24px 64px rgba(16,24,40,.18); display: flex; flex-direction: column; overflow: hidden; }
.panel .card-h { padding-top: 24px; }
.panel .card-b { overflow: hidden; }
.ring { width: 56px; height: 56px; border-radius: 50%; background: conic-gradient(var(--accent) var(--v), var(--sunken) 0); display: grid; place-items: center; flex: none; }
.ring i { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--body); }
.dot.amber { background: #FFB000; } .dot.grey { background: #BDBDBD; } .dot.red { background: #B42318; }
.int-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 176px; }
.int-card .lg { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; letter-spacing: .02em; }
.int-card h3 { font-size: 15px; font-weight: 600; color: var(--ink); }
.int-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.code { display: flex; gap: 8px; }
.code span { width: 44px; height: 52px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; font-size: 22px; font-weight: 600; color: var(--ink); }
.code span.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tonal); }
.auth { min-height: 1180px; display: grid; place-items: center; background: var(--bg); position: relative; overflow: hidden; }
.auth-card { width: 440px; padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 12px 40px rgba(16,24,40,.06); position: relative; }
.auth .wave { position: absolute; left: -2%; right: -2%; bottom: -60px; width: 104%; opacity: .95; }
.agent { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 172px; }
.agent h3 { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.agent p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.agent .foot { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.agent .foot .spacer { flex: 1; }
.lesson-video { aspect-ratio: 16/9; border-radius: 14px; background: linear-gradient(135deg, #E3F1FF, #F1F1F1); display: grid; place-items: center; position: relative; }
.lesson-video .play { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(16,24,40,.12); color: var(--ink); }
.lesson-video .play svg { width: 24px; height: 24px; margin-left: 3px; }
.progress-bar { height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl { position: relative; padding: 0 0 18px; font-size: 14px; }
.tl::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl.k-call::before { border-color: #1FA971; } .tl.k-text::before { border-color: #FFB000; } .tl.k-sys::before { border-color: #BDBDBD; }
.tl b { color: var(--ink); font-weight: 600; }
.tl .by { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tl .quote { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--sunken); font-size: 13px; color: var(--body); }
.field-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: #FFF1B8; font-size: 12px; font-weight: 600; color: #6B4700; }
.field-pill.done { background: #E6F5EE; color: #0F6B47; }
.doc-preview { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 32px 36px; font-size: 12px; line-height: 1.8; color: #333; min-height: 560px; box-shadow: 0 8px 24px rgba(16,24,40,.06); }
.doc-preview h4 { font-size: 13px; font-weight: 700; color: #111; margin: 0 0 12px; text-align: center; }
.ai-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--accent-deep); }
.ai-badge svg { width: 12px; height: 12px; }
.result h3 { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.result .snip { font-size: 13px; color: var(--body); margin-top: 4px; line-height: 1.5; }
.result .path { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rail a { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--body); }
.rail a .n { margin-left: auto; color: var(--muted); font-size: 12px; }
.q-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--body); }
.q-nav a i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; border: 1.5px solid var(--line); color: var(--muted); }
.q-nav a.done i { background: #E6F5EE; border-color: #B7E1CB; color: #0F6B47; }
.q-nav a.on { background: var(--accent-tonal); color: var(--accent-deep); font-weight: 600; }
.q-nav a.on i { border-color: var(--accent); color: var(--accent-deep); }

.matter-desc { margin: 0 24px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); }
.matter-desc .md-h { display: flex; align-items: center; margin-bottom: 6px; }
.matter-desc .md-l { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.matter-desc .md-l svg { width: 14px; height: 14px; }
.matter-desc .md-e { margin-left: auto; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; }
.matter-desc .md-e .link { display: inline-flex; align-items: center; gap: 4px; }
.matter-desc .md-e .link svg { width: 13px; height: 13px; }
.matter-desc .md-b { font-size: 14px; line-height: 1.55; color: var(--ink); }
.alt-contact { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.alt-contact .ac-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.alt-contact .ac-t { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.alt-contact .ac-t svg { width: 16px; height: 16px; color: var(--muted); }
