/* Shared component styles inherit the existing workspace theme. */
.member-workspace,.member-dialog {
 --bg:var(--ui-bg);--surface:var(--ui-surface);--soft:var(--ui-soft);
 --ink:var(--ui-ink);--muted:var(--ui-muted);--line:var(--ui-line);--field:var(--ui-field-line);
 --accent:var(--ui-accent);--on-accent:var(--ui-on-accent);--accent-soft:var(--ui-accent-soft);
 --danger:var(--ui-red);--danger-soft:var(--ui-red-soft);--warning:var(--ui-amber);--warning-soft:var(--ui-amber-soft);
 --focus:var(--ui-accent);--shadow:var(--ui-shadow);min-width:0;color:var(--ink);overflow-wrap:anywhere;
}
.member-workspace { margin-block:1rem; }
.member-dialog { color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:1.25rem;width:min(42rem,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);overflow:auto; }
.member-dialog::backdrop {background:var(--ui-overlay);}

@scope (.member-workspace, .member-dialog) {
* { box-sizing:border-box; } body { margin:0; min-width:0; } [hidden] { display:none !important; } h1,h2,h3,p { margin:0 0 1rem; } h1 { font-size:1.875rem; line-height:1.3; letter-spacing:-.025em; } h2 { font-size:1.3rem; line-height:1.4; } h3 { font-size:1.05rem; } p:last-child { margin-bottom:0; } a { color:var(--accent); text-underline-offset:3px; overflow-wrap:anywhere; } button,input,select,textarea { font:inherit; } button,.button { min-width:44px; min-height:44px; padding:.6rem 1rem; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--ink); cursor:pointer; line-height:1.45; text-align:center; overflow-wrap:anywhere; } button:hover,.button:hover { background:var(--soft); } button:disabled { cursor:wait; opacity:.65; } .primary { color:var(--on-accent); background:var(--accent); border-color:var(--accent); font-weight:600; } .primary:hover { filter:brightness(.95); background:var(--accent); } .danger { color:var(--danger); border-color:var(--danger); } .plain { border-color:transparent; background:transparent; } .button { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; } :focus-visible { outline:3px solid var(--focus); outline-offset:3px; } input,select,textarea { display:block; width:100%; min-width:0; min-height:44px; color:var(--ink); background:var(--surface); border:1px solid var(--field); border-radius:8px; padding:.65rem .75rem; } textarea { resize:vertical; min-height:12rem; line-height:1.7; } input[type=checkbox] { display:inline-block; width:1.35rem; height:1.35rem; min-height:0; accent-color:var(--accent); flex-shrink:0; } input[type=file] { max-width:100%; padding:.5rem; } label { display:block; font-weight:600; } label input,label select,label textarea { margin-top:.35rem; font-weight:400; } label.check { display:flex; align-items:flex-start; gap:.65rem; font-weight:400; padding:.5rem 0; min-height:44px; } .check input { margin-top:.25rem; } fieldset { border:1px solid var(--line); border-radius:10px; padding:1rem; min-width:0; } legend { font-weight:600; padding:0 .4rem; } small,.meta { font-size:.875rem; color:var(--muted); } .muted { color:var(--muted); } .eyebrow { font-size:.875rem; color:var(--accent); font-weight:700; letter-spacing:.08em; margin-bottom:.5rem; } .stack { display:grid; gap:1rem; } .row { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem; } .row.between { justify-content:space-between; } .grow { flex:1 1 12rem; min-width:0; } .grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr)); gap:1rem; } .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; } .wide { grid-column:1/-1; } .card { border:1px solid var(--line); border-radius:14px; padding:1.5rem; background:var(--surface); min-width:0; } .soft { background:var(--soft); } .reading { max-width:52rem; } .prose { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; } .hint,.notice { padding:.9rem 1rem; border:1px solid var(--line); border-radius:9px; background:var(--soft); overflow-wrap:anywhere; } .notice { margin-bottom:1rem; } .notice.error { background:var(--danger-soft); color:var(--danger); border-color:var(--danger); } .hint.warning { background:var(--warning-soft); color:var(--warning); } .empty { padding:2.5rem 1rem; text-align:center; border:1px dashed var(--line); border-radius:12px; } .empty h2 { margin-bottom:.5rem; } .status { display:inline-flex; align-items:center; border-radius:6px; padding:.15rem .5rem; font-size:.875rem; background:var(--accent-soft); color:var(--accent); font-weight:600; vertical-align:middle; } .status.pending,.status.queued,.status.processing { color:var(--warning); background:var(--warning-soft); } .status.failed,.status.rejected,.status.disabled,.status.withdrawn { color:var(--danger); background:var(--danger-soft); } .skip-link { position:fixed; z-index:100; left:1rem; top:-5rem; background:var(--surface); padding:1rem; border-radius:8px; } .skip-link:focus { top:1rem; } .initial { max-width:44rem; margin:10vh auto; padding:2rem; } .auth { max-width:32rem; margin:6vh auto; padding:1.25rem; } .auth .card { box-shadow:var(--shadow); padding:2rem; } .auth-brand { font-weight:700; margin-bottom:2rem; color:var(--accent); } .brand-mark { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; flex:0 0 42px; background:var(--accent); color:var(--on-accent); border-radius:12px; margin-right:.7rem; font-size:1.4rem; font-weight:700; } .shell { display:grid; grid-template-columns:14.5rem minmax(0,1fr); min-height:100dvh; } .sidebar { display:flex; flex-direction:column; gap:2rem; padding:1.75rem 1rem; border-right:1px solid var(--line); background:var(--surface); position:sticky; top:0; height:100dvh; overflow:auto; } .brand { display:flex; align-items:center; padding:0 .5rem; line-height:1.4; font-weight:700; } .brand small { display:block; margin-top:.25rem; font-weight:400; } .navigation { display:grid; gap:.5rem; } .navigation button { text-align:left; padding:.8rem 1rem; border-color:transparent; display:flex; gap:.8rem; align-items:center; } .navigation button[aria-current=page] { background:var(--accent-soft); color:var(--accent); font-weight:700; } .nav-icon { width:1.4rem; text-align:center; flex-shrink:0; } .sidebar-footer { margin-top:auto; padding:1rem .5rem 0; border-top:1px solid var(--line); overflow-wrap:anywhere; } .workspace { min-width:0; } .topbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; background:var(--surface); padding:1rem clamp(1rem,3vw,2.5rem); border-bottom:1px solid var(--line); } .topbar-title { display:flex; align-items:center; gap:.7rem; min-width:0; } .mobile-menu { display:none; } .content { padding:clamp(1rem,3vw,2.5rem); max-width:100rem; margin:0 auto; } .page-head { margin-bottom:1.5rem; display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:1rem; } .page-head p { color:var(--muted); margin-bottom:0; max-width:50rem; } .page-head h1 { margin-bottom:.5rem; } .workspace-footer { padding:1rem 2rem; font-size:.875rem; color:var(--muted); } .metric { display:block; font-size:2rem; font-weight:650; line-height:1.2; margin:.5rem 0; } .list { display:grid; gap:.75rem; } .list-item { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; border:1px solid var(--line); border-radius:10px; padding:1rem; min-width:0; flex-wrap:wrap; } .list-item h3 { margin:0 0 .4rem; overflow-wrap:anywhere; } .list-item .info { flex:1 1 13rem; min-width:0; } .list-item p { margin:.25rem 0 0; } .crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem; margin:0 0 1rem; padding:0; list-style:none; font-size:.875rem; } .crumbs li { display:flex; align-items:center; gap:.25rem; min-width:0; } .crumbs li:not(:last-child)::after { content:"/"; color:var(--muted); } .crumbs button { font-size:1rem; padding:.4rem .6rem; } .knowledge-layout { display:grid; grid-template-columns:minmax(13rem,19rem) minmax(0,1fr); gap:1rem; align-items:start; } .knowledge-tree { padding:1rem; } .tree-list { list-style:none; margin:0; padding-left:0; } .tree-list .tree-list { padding-left:1rem; border-left:1px solid var(--line); margin-left:.75rem; } .tree-line { display:flex; gap:.2rem; align-items:stretch; margin:.15rem 0; } .tree-line button { text-align:left; flex:1; border:0; background:transparent; padding:.45rem .6rem; } .tree-line button.selected { background:var(--accent-soft); color:var(--accent); font-weight:600; } .tree-line .tree-fold { flex:0 0 44px; text-align:center; padding:.3rem; } .editor textarea { min-height:18rem; } .editor-actions { display:flex; flex-wrap:wrap; gap:.6rem; padding-top:1rem; border-top:1px solid var(--line); } .mobile-back { display:none; } details { border:1px solid var(--line); border-radius:10px; padding:.4rem 1rem; } summary { cursor:pointer; min-height:44px; padding:.5rem 0; font-weight:600; } details[open] > summary { margin-bottom:.5rem; } dialog { color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:1.5rem; width:min(40rem,calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); overflow:auto; box-shadow:var(--shadow); } dialog::backdrop { background:#10231abc; } .dialog-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; margin-bottom:1rem; } .dialog-head h2 { margin:0; } .dialog-actions { display:flex; flex-wrap:wrap; gap:.75rem; justify-content:flex-end; margin-top:1.5rem; } .dialog-close { padding:.4rem; flex:0 0 44px; } .drawer { margin:0 auto 0 0; height:100dvh; max-height:100dvh; border-radius:0 16px 16px 0; width:min(20rem,calc(100vw - 2rem)); } .selection-list { display:grid; gap:.5rem; max-height:24rem; overflow:auto; padding:.25rem; } .selection-list .check { border:1px solid var(--line); border-radius:8px; padding:.7rem; } .selection-list .check:has(input:checked) { background:var(--accent-soft); } .separator { border:0; border-top:1px solid var(--line); margin:1.5rem 0; } .sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:900px) { .shell { grid-template-columns:1fr; } .sidebar { display:none; } .mobile-menu { display:inline-flex; align-items:center; justify-content:center; } .topbar { padding:.75rem 1rem; } .knowledge-layout { grid-template-columns:1fr; } .knowledge-layout[data-mobile=tree] .editor { display:none; } .knowledge-layout[data-mobile=editor] .knowledge-tree { display:none; } .mobile-back { display:inline-flex; } }
@media (max-width:540px) { .content { padding:1rem; } .card { padding:1rem; } .auth { margin:1.5rem auto; padding:.75rem; } .auth .card { padding:1.25rem; } .form-grid { grid-template-columns:minmax(0,1fr); } .topbar-title { flex:1 1 10rem; } .top-actions { gap:.4rem; } .topbar .theme-label { display:none; } h1 { font-size:1.65rem; } .list-item { padding:.9rem; } .dialog-actions > button { flex:1 1 7rem; } .editor-actions > button { flex:1 1 8rem; } .page-head { gap:.75rem; } .workspace-footer { padding:1rem; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; } }

.mt-space { margin-top:1rem; } .mt-section { margin-top:1.5rem; } .mb-space { margin-bottom:1rem; }
.snapshot-item { border:1px solid var(--line); border-radius:10px; padding:1rem; overflow-wrap:anywhere; }
/* Bound visual indentation while preserving full semantic tree and breadcrumbs. */
.tree-list[data-depth="5"] .tree-list { padding-left:.25rem; margin-left:.15rem; }
.tree-line { min-width:0; } .tree-line button { min-width:0; overflow-wrap:anywhere; }
body { overflow-wrap:anywhere; }
@media (max-width:900px) { .tree-list .tree-list { padding-left:.2rem; margin-left:0; } }

/* Keep native date/select minimum content from widening single-column grids at enlarged text sizes. */
.stack,.list { grid-template-columns:minmax(0,1fr); }
.form-grid > *,label { min-width:0; }
input,select,textarea,button,.button { max-width:100%; }

/* The administration portal uses the same accessible theme, spacing and controls. */
.admin-identity { padding:1rem; background:var(--accent-soft); border-radius:10px; overflow-wrap:anywhere; }
.permission-summary { border-left:4px solid var(--accent); padding:1rem; background:var(--soft); border-radius:0 8px 8px 0; }
.snapshot-item { border:1px solid var(--line); border-radius:10px; padding:1rem; }
.snapshot-item .prose { max-height:28rem; overflow:auto; }
.binding-documents { padding:.5rem 0 .5rem 1rem; border-left:2px solid var(--line); margin-left:.6rem; }
.invitation-link { display:block; padding:.75rem; border:1px solid var(--field); border-radius:8px; overflow-wrap:anywhere; user-select:all; }
.audit-label { font-size:.875rem; color:var(--muted); }

/* Existing shell rules must not prevent component reflow or text enlargement. */
.row,.row > * { min-width:0;max-width:100%; }
button,.button { white-space:normal; }
label,.muted { font-size:1rem; }
}
