/* Pagga DESIGN.md + appfront components/ui/system.tsx, reproduced in plain CSS.
   Sober fintech-dark · ONE accent (periwinkle) · colour only for status · silver layer on surfaces. */
500;600;700&family=Lexend:wght@400;500;600;700&family=Caveat:wght@500;600&display=swap');
:root {
  --canvas:#05050A; --surface:#0F0F1E; --surface2:#14142A; --elevated:#191934;
  --b7:rgba(255,255,255,.07); --b11:rgba(255,255,255,.11); --b6:rgba(255,255,255,.06);
  --text:#E8E6FF; --text2:#9595B8; --faint:#6B6B8A; --faint2:#45455A;
  --accent:#5854D0; --accent2:#7070E0; --accent-press:#4A46B8;
  --green:#10B981; --amber:#F59E0B; --red:#EF4444;
  --em300:#6EE7B7; --am300:#FCD34D; --rd300:#FCA5A5;
  --edge: inset 0 1px 0 0 rgba(255,255,255,.06);
}
* { box-sizing:border-box; }
html,body { margin:0; background:var(--canvas); color:var(--text); font:14px/1.5 Inter,system-ui,sans-serif; -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:none; }
.lex, h1, h2, h3 { font-family:Lexend,Inter,sans-serif; }
.num { font-variant-numeric:tabular-nums; }
svg.lucide { width:20px; height:20px; stroke-width:2; flex:none; }
.i14 svg.lucide, svg.lucide.i14 { width:14px; height:14px; } .i16 svg.lucide, svg.lucide.i16 { width:16px; height:16px; }

/* ---------- shell */
.side { position:fixed; inset:0 auto 0 0; width:240px; background:rgba(6,6,14,.97); border-right:1px solid var(--b7);
  backdrop-filter:blur(24px); display:flex; flex-direction:column; overflow-y:auto; z-index:30; }
.logo { display:flex; align-items:center; gap:12px; padding:20px 20px; margin-bottom:8px; }
.logo .mark { width:36px; height:36px; border-radius:12px; background:var(--accent); display:grid; place-items:center; }
.logo .mark img { width:18px; height:18px; }
.logo b { font:700 20px Lexend; letter-spacing:.04em; color:var(--text); }
.logo small { display:block; color:var(--faint); font-size:11px; letter-spacing:.06em; text-transform:uppercase; margin-top:-2px; }
.nav { padding:0 12px 24px; }
.nav .sec { padding:6px 8px; margin:14px 0 4px; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.1em; color:rgba(107,107,138,.8); }
.nav a { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:12px; font-size:14px; font-weight:500; color:var(--text2); margin:2px 0; }
.nav a:hover { color:var(--text); background:rgba(255,255,255,.04); }
.nav a.on { font-weight:600; background:rgba(88,84,208,.14); color:var(--text); box-shadow:inset 2px 0 0 var(--accent); }
.nav a .bdg { margin-left:auto; padding:2px 8px; border-radius:999px; font-size:10px; font-weight:700; background:rgba(88,84,208,.2); color:var(--accent2); }
.side .foot { margin-top:auto; padding:14px 20px 18px; border-top:1px solid var(--b7); }
.side .foot .lbl { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.1em; color:rgba(107,107,138,.8); }
.who { display:flex; align-items:center; gap:10px; margin:8px 0 10px; }
.av { width:32px; height:32px; border-radius:10px; background:var(--surface2); border:1px solid var(--b7); display:grid; place-items:center; font:600 12px Lexend; color:var(--text2); }
.who b { display:block; font-size:13px; } .who span { color:var(--faint); font-size:12px; }
.content { margin-left:240px; min-height:100vh; }
.banner { background:var(--surface); border-bottom:1px solid var(--b7); padding:10px 32px; display:flex; align-items:center; gap:12px; color:var(--text2); font-size:13px; }
.banner p { flex:1; margin:0; }
.top { position:sticky; top:0; z-index:20; height:64px; padding:0 32px; display:flex; align-items:center; gap:16px; border-bottom:1px solid var(--b7); }
.top:before { content:""; position:absolute; inset:0; background:rgba(5,5,10,.88); backdrop-filter:blur(40px); z-index:-1; }
.chip { display:flex; align-items:center; gap:8px; height:36px; border-radius:12px; border:1px solid var(--b7); background:rgba(255,255,255,.03); padding:0 10px; color:var(--text); font-size:14px; font-weight:500; }
.chip svg { color:var(--text2); width:16px; height:16px; }
.search { flex:1; max-width:448px; display:flex; align-items:center; gap:12px; padding:8px 16px; border-radius:12px; border:1px solid var(--b7); background:rgba(255,255,255,.03); color:var(--faint); }
.search input { flex:1; background:none; border:0; outline:0; color:var(--text); font:14px Inter; padding:0; }
.search input::placeholder { color:var(--faint); }
.kbd { padding:3px 8px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:6px; font:12px ui-monospace,Menlo,monospace; color:var(--faint); }
.top .spend { margin-left:auto; color:var(--faint); font-size:12.5px; }
main { padding:32px; max-width:1240px; position:relative; }
.backdrop { position:absolute; left:50%; transform:translateX(-50%); top:-160px; width:900px; height:420px; pointer-events:none;
  background:radial-gradient(ellipse at center, rgba(112,112,224,.10), transparent 62%); }

/* ---------- page header */
.kicker { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.14em; color:var(--faint); margin-bottom:8px; }
h1 { font-size:34px; line-height:1; font-weight:600; letter-spacing:-.02em; margin:0; color:var(--text); }
h1.sm { font-size:28px; }
.subtitle { color:var(--text2); font-size:16px; margin-top:8px; max-width:780px; }
.phead { display:flex; align-items:flex-end; gap:16px; margin-bottom:24px; flex-wrap:wrap; } .phead .grow { flex:1; min-width:280px; }
.sechead { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.12em; color:var(--faint); margin:28px 0 12px; display:flex; align-items:center; gap:8px; }
.sechead a { margin-left:auto; text-transform:none; letter-spacing:0; font-weight:400; font-size:12.5px; }
.sechead a:hover { color:var(--text); }

/* ---------- surfaces */
.surface { background:var(--surface); border:1px solid var(--b7); box-shadow:var(--edge); border-radius:16px; }
.pad { padding:20px; } .pad6 { padding:24px; } .pad7 { padding:28px; }
.row { position:relative; overflow:hidden; display:flex; align-items:center; gap:20px; padding:18px 20px; border-radius:16px;
  background:var(--surface); border:1px solid var(--b7); box-shadow:var(--edge); margin-bottom:10px; transition:background .15s, border-color .15s; }
a.row:hover, .row.hov:hover { background:var(--surface2); border-color:var(--b11); }
.row .rule { position:absolute; left:0; top:14px; bottom:14px; width:3px; border-radius:999px; background:rgba(255,255,255,.2); }
.rule.ok, .ok > .rule { background:#34D399; } .rule.warn { background:#FBBF24; } .rule.bad { background:#F87171; } .rule.accent { background:var(--accent2); }
.ico { width:44px; height:44px; border-radius:12px; border:1px solid; display:grid; place-items:center; flex:none; }
.ico.ok { color:var(--em300); background:rgba(16,185,129,.1); border-color:rgba(16,185,129,.2); }
.ico.warn { color:var(--am300); background:rgba(245,158,11,.1); border-color:rgba(245,158,11,.2); }
.ico.bad { color:var(--rd300); background:rgba(239,68,68,.1); border-color:rgba(239,68,68,.2); }
.ico.neutral { color:#9CA3AF; background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.1); }
.ico.accent { color:var(--accent2); background:rgba(88,84,208,.12); border-color:rgba(88,84,208,.3); }
.row .body { flex:1; min-width:0; }
.row .t { font:600 15px Lexend; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row .t.wrap { white-space:normal; }
.row .m { margin-top:4px; display:flex; flex-wrap:wrap; gap:6px 8px; font-size:13px; color:var(--faint); align-items:center; }
.row .m .sep { color:var(--faint2); }
.row .right { display:flex; align-items:center; gap:12px; flex:none; }
.pill { display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.04em;
  padding:4px 10px; border-radius:6px; border:1px solid; white-space:nowrap; }
.pill svg.lucide { width:12px; height:12px; }
.pill.ok { color:var(--em300); background:rgba(16,185,129,.1); border-color:rgba(16,185,129,.25); }
.pill.warn { color:var(--am300); background:rgba(245,158,11,.1); border-color:rgba(245,158,11,.25); }
.pill.bad { color:var(--rd300); background:rgba(239,68,68,.1); border-color:rgba(239,68,68,.25); }
.pill.neutral { color:#9CA3AF; background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.1); }
.pill.accent { color:#A5A3F0; background:rgba(88,84,208,.12); border-color:rgba(88,84,208,.35); }
.type { font-size:11px; font-weight:500; padding:2px 8px; border-radius:6px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); color:var(--text2); }
.tiles { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:0 0 8px; }
.tile { padding:20px; border-radius:16px; background:var(--surface); border:1px solid var(--b7); box-shadow:var(--edge); display:block; }
a.tile:hover { background:var(--surface2); border-color:var(--b11); }
.tile .l { display:flex; align-items:center; gap:8px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--faint); }
.dot { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,.2); flex:none; }
.dot.ok { background:#34D399; } .dot.warn { background:#FBBF24; } .dot.bad { background:#F87171; } .dot.accent { background:var(--accent2); }
.tile .v { margin-top:14px; font:600 32px/1 Lexend; letter-spacing:-.02em; font-variant-numeric:tabular-nums; color:var(--text); }
.tile .c { margin-top:6px; font-size:12px; color:var(--faint); }
.silver { font-family:Lexend; font-weight:600; letter-spacing:-.035em; font-variant-numeric:tabular-nums; line-height:1;
  background:linear-gradient(176deg,#FFFFFF 0%,#EAECF4 34%,#C4C8D6 66%,#E8E6FF 100%); -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.06)); }
.silver .cents { font-size:.4em; color:var(--faint2); -webkit-text-fill-color:var(--faint2); }

/* ---------- buttons, inputs */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:10px; font:500 14px Inter; min-height:40px; padding:8px 16px;
  cursor:pointer; border:1px solid transparent; transition:background .15s, border-color .15s, color .15s; white-space:nowrap; }
.btn svg.lucide { width:16px; height:16px; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.btn:focus-visible { outline:2px solid rgba(112,112,224,.6); outline-offset:2px; }
.btn.primary { background:var(--accent); color:#fff; box-shadow:inset 0 1px 0 0 rgba(255,255,255,.12); }
.btn.primary:hover { background:var(--accent2); } .btn.primary:active { background:var(--accent-press); }
.btn.secondary, .btn:not(.primary):not(.ghost):not(.danger) { background:rgba(255,255,255,.05); color:var(--text); border-color:rgba(255,255,255,.09); }
.btn.secondary:hover, .btn:not(.primary):not(.ghost):not(.danger):hover { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.14); }
.btn.ghost { background:none; color:var(--text2); } .btn.ghost:hover { color:var(--text); background:rgba(255,255,255,.05); }
.btn.danger { background:rgba(239,68,68,.1); color:#F87171; border-color:rgba(239,68,68,.25); } .btn.danger:hover { background:rgba(239,68,68,.15); }
.btn.sm { min-height:36px; padding:6px 12px; font-size:13px; border-radius:8px; }
.btn.lg { min-height:48px; padding:10px 24px; font-size:15px; border-radius:12px; }
.btn.block { width:100%; }
.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
label.f { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--faint); margin-bottom:6px; }
input[type=text], input:not([type]), input[type=file], select, textarea { height:44px; padding:0 14px; border-radius:12px; background:var(--surface2);
  border:1px solid var(--b7); color:var(--text); font:14px Inter; outline:0; }
input:focus, select:focus, textarea:focus { border-color:var(--accent); }
input[type=file] { padding:10px 12px; height:auto; }
textarea { height:auto; min-height:150px; width:100%; padding:12px 14px; line-height:1.55; }
input[type=checkbox] { accent-color:var(--accent); width:16px; height:16px; }

/* ---------- misc */
.flash { position:relative; overflow:hidden; border-radius:12px; padding:14px 16px 14px 18px; margin-bottom:18px; background:var(--surface);
  border:1px solid var(--b7); box-shadow:var(--edge); color:var(--text); }
.flash:before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--green); }
.flash.err:before { background:var(--red); }
.grid-main { display:grid; grid-template-columns:minmax(0,1fr) 400px; gap:32px; align-items:start; }
.grid-doc { display:grid; grid-template-columns:minmax(0,2fr) minmax(320px,1fr); gap:24px; align-items:start; }
.sticky { position:sticky; top:84px; }
.list { list-style:none; margin:0; padding:0; } .list li { position:relative; display:flex; align-items:center; gap:12px; padding:12px 12px 12px 16px; min-height:60px; }
.list li + li { border-top:1px solid var(--b6); }
.list li .rule { position:absolute; left:0; top:12px; bottom:12px; width:3px; border-radius:999px; }
.list .tt { font-size:14px; font-weight:500; color:var(--text); } .list .mm { font-size:12.5px; color:var(--faint); margin-top:2px; font-variant-numeric:tabular-nums; }
.list .mm b { color:var(--text2); font-weight:500; }
.ev { font-size:13px; color:var(--text2); margin:8px 0; line-height:1.5; } .ev b { color:var(--text); font-weight:500; } .ev q { font-style:italic; color:var(--text2); }
a.pagelink { color:var(--accent2); } a.pagelink:hover { color:var(--text); }
details.more { margin:-4px 0 12px; } details.more > summary { cursor:pointer; color:var(--faint); font-size:13px; padding:4px 4px; list-style:none; display:inline-flex; gap:6px; align-items:center; }
details.more > summary::-webkit-details-marker { display:none; } details.more > summary:hover { color:var(--text); }
.panel { background:var(--surface2); border:1px solid var(--b7); border-radius:12px; padding:16px; margin:6px 0 12px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th { text-align:left; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--faint); padding:12px 16px; background:rgba(255,255,255,.02); border-bottom:1px solid var(--b6); }
td { padding:14px 16px; border-bottom:1px solid var(--b6); vertical-align:top; } tr:last-child td { border-bottom:0; } td.r, th.r { text-align:right; }
.faint { color:var(--faint); font-size:12.5px; } .muted { color:var(--text2); } .mono { font-family:ui-monospace,Menlo,monospace; font-size:12px; }
.spinner { width:16px; height:16px; border:2px solid var(--b11); border-top-color:var(--accent2); border-radius:50%; display:inline-block; animation:spin .8s linear infinite; vertical-align:-3px; }
@keyframes spin { to { transform:rotate(360deg); } }
.bar { height:140px; display:flex; align-items:flex-end; gap:12px; margin-top:24px; }
.bar div { flex:1; background:linear-gradient(to top, rgba(112,112,224,.25), var(--accent2)); border-radius:6px 6px 0 0; min-height:2px; position:relative; }
.bar div span { position:absolute; bottom:-22px; left:0; right:0; text-align:center; color:var(--faint); font-size:11px; }
.bar div em { position:absolute; top:-20px; left:0; right:0; text-align:center; color:var(--text2); font-size:11px; font-style:normal; }
.off { opacity:.45; } .off .t { text-decoration:line-through; }

/* ---------- AI suggestions (Pagga chat chips + contract suggestion cards) */
.sugg { display:flex; flex-direction:column; gap:8px; }
.sugg form, .sugg a.s { display:block; }
.s-card { width:100%; text-align:left; display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border-radius:12px; background:var(--canvas);
  border:1px solid var(--b7); color:var(--text); cursor:pointer; font:14px Inter; }
.s-card:hover { border-color:rgba(88,84,208,.5); background:#08081a; }
.s-card svg.lucide { color:var(--accent2); width:16px; height:16px; margin-top:2px; }
.s-card .w { font-size:12px; color:var(--faint); margin-top:2px; } .s-card .go { margin-left:auto; color:var(--faint); font-size:12px; white-space:nowrap; }
.s-card:hover .go { color:var(--accent2); }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chips button, .chips a { display:inline-flex; align-items:center; gap:8px; border-radius:10px; padding:8px 12px; font:500 13px Inter; cursor:pointer;
  background:rgba(255,255,255,.04); color:var(--text); border:1px solid var(--b7); }
.chips > :first-child { background:var(--accent); border-color:var(--accent); color:#fff; }
.chips span.n { font-size:11px; opacity:.7; font-variant-numeric:tabular-nums; }

/* ---------- agents strip + tiles */
.agents { width:100%; display:flex; align-items:center; gap:12px; border-radius:16px; border:1px solid var(--b7); background:var(--surface); box-shadow:var(--edge);
  padding:10px 16px; min-height:44px; font-size:13px; color:var(--text2); }
.agents .dots { display:flex; gap:4px; } .agents .dots i { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,.2); }
.agents .dots i.ok { background:#34D399; } .agents .dots i.warn { background:#FBBF24; }
.agrid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; }
.agent { display:flex; flex-direction:column; padding:14px 16px; background:var(--surface); border:1px solid var(--b7); border-left:3px solid rgba(255,255,255,.12);
  border-radius:14px; box-shadow:var(--edge); }
.agent.warn { border-left-color:var(--amber); }
.agent .n { display:flex; align-items:center; gap:8px; font:600 14px Lexend; } .agent .n .todo { margin-left:auto; font:600 10px Inter; text-transform:uppercase; color:var(--amber); background:rgba(245,158,11,.1); padding:2px 6px; border-radius:6px; }
.agent .h { font-size:13px; color:var(--text); margin-top:6px; } .agent .d { font-size:12px; color:var(--text2); margin-top:2px; } .agent.warn .d { color:var(--amber); }
.agent .f { font-size:11px; color:var(--faint); margin-top:10px; } .agent .f b { text-transform:uppercase; letter-spacing:.04em; font-weight:600; }

/* ---------- e-signature: roster, dialog, branded document */
.roster .hd { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.roster .hd .k { font:500 11px Lexend; text-transform:uppercase; letter-spacing:.14em; color:var(--faint); }
.roster .hd .c { font-size:12px; font-weight:500; color:#FBBF24; } .roster .hd .c.done { color:#34D399; }
.rail { display:flex; gap:4px; margin-bottom:12px; } .rail i { height:4px; flex:1; border-radius:999px; background:rgba(255,255,255,.1); } .rail i.on { background:rgba(16,185,129,.7); }
.signer { display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:8px; background:rgba(255,255,255,.03); border:1px solid var(--b6); margin-bottom:6px; }
.signer svg.lucide { width:14px; height:14px; } .signer .ok { color:#34D399; } .signer .wait { color:#FBBF24; }
.signer .nm { font-size:12px; color:var(--text); } .signer .nm em { font-style:normal; color:var(--faint); }
.signer .rl { font-size:11px; color:var(--faint); } .signer .st { margin-left:auto; font-size:11px; color:rgba(52,211,153,.8); white-space:nowrap; } .signer .st.wait { color:rgba(251,191,36,.8); }
.statebox { display:flex; gap:12px; align-items:flex-start; margin-bottom:16px; }
.circle { width:40px; height:40px; border-radius:50%; display:grid; place-items:center; flex:none; }
.circle.ok { background:rgba(16,185,129,.12); color:#34D399; } .circle.warn { background:rgba(245,158,11,.12); color:#FBBF24; } .circle.accent { background:rgba(88,84,208,.15); color:var(--accent2); }
.statebox h3 { margin:0; font:600 16px Lexend; } .statebox p { margin:4px 0 0; font-size:13px; color:var(--text2); }
dialog.modal { border:1px solid var(--b7); border-radius:18px; background:var(--surface); color:var(--text); padding:0; width:min(512px, 92vw);
  box-shadow:0 24px 64px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); }
dialog.modal::backdrop { background:rgba(0,0,0,.7); }
.modal .mh { padding:20px 20px 6px; } .modal .mh h3 { margin:0; font:600 17px Lexend; } .modal .mh p { margin:4px 0 0; font-size:13px; color:var(--text2); }
.modal .mb { padding:14px 20px; } .modal .mf { padding:12px 20px 20px; border-top:1px solid var(--b6); display:flex; justify-content:flex-end; gap:8px; }
.seg { display:inline-flex; border:1px solid rgba(255,255,255,.08); border-radius:8px; padding:2px; margin:12px 0 10px; }
.seg button { background:none; border:0; color:var(--text2); font:500 13px Inter; padding:6px 12px; border-radius:6px; cursor:pointer; display:inline-flex; gap:6px; align-items:center; }
.seg button.on { background:rgba(255,255,255,.08); color:var(--text); }
.sigprev { border-radius:12px; background:#fff; padding:12px; min-height:96px; display:flex; align-items:center; justify-content:center; color:#111827; font:500 34px Caveat, cursive; }
.sigprev canvas { width:100%; height:96px; touch-action:none; cursor:crosshair; }
.consent { display:flex; gap:10px; align-items:flex-start; font-size:13px; color:var(--text2); margin-top:12px; }
.caveat { font-family:Caveat, cursive; }

.paper { max-width:850px; background:#fff; color:#1F2937; border-radius:12px; overflow:hidden; box-shadow:0 20px 60px -15px rgba(0,0,0,.7); }
.paper .stripe { height:6px; background:var(--accent); }
.paper .in { padding:48px 56px; }
.paper .lh { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.paper .lh img { width:36px; height:36px; } .paper .ent { font:600 18px Lexend; color:#111827; margin-top:6px; } .paper .addr { font-size:11px; color:#6B7280; }
.paper .corner { text-align:right; } .paper .corner .k { font-size:11px; text-transform:uppercase; letter-spacing:.14em; color:#9CA3AF; } .paper .corner .v { color:#374151; font-size:13px; }
.paper hr { border:0; height:1px; background:#E5E7EB; margin:28px 0; }
.paper .dk { font-size:11px; text-transform:uppercase; letter-spacing:.16em; color:var(--accent); font-weight:600; }
.paper h2 { font:600 30px Lexend; letter-spacing:-.02em; color:#111827; margin:6px 0 10px; }
.paper .pm { display:flex; gap:24px; flex-wrap:wrap; font-size:13px; color:#374151; } .paper .pm span { color:#9CA3AF; text-transform:uppercase; font-size:11px; letter-spacing:.06em; margin-right:6px; }
.paper .bd { font-size:15px; color:#1F2937; line-height:1.65; }
.paper h4 { font-size:13px; text-transform:uppercase; letter-spacing:.08em; color:#111827; margin:26px 0 8px; }
.paper table { font-size:13px; } .paper th { background:#F9FAFB; color:#6B7280; border-bottom:1px solid #E5E7EB; padding:8px 10px; } .paper td { border-bottom:1px solid #F3F4F6; padding:8px 10px; color:#1F2937; }
.paper .tag { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; padding:2px 7px; border-radius:5px; border:1px solid; }
.paper .tag.ok { color:#047857; border-color:#04785755; } .paper .tag.warn { color:#B45309; border-color:#B4530955; } .paper .tag.bad { color:#B91C1C; border-color:#B91C1C55; } .paper .tag.neutral { color:#6B7280; border-color:#D1D5DB; }
.paper .sigs { margin-top:48px; padding-top:28px; border-top:1px solid #E5E7EB; }
.paper .slots { display:grid; grid-template-columns:1fr 1fr; gap:36px; margin-top:16px; }
.paper .slot .area { height:64px; display:flex; align-items:flex-end; font:500 40px/1 Caveat, cursive; color:#111827; }
.paper .slot .area.empty { font:500 13px Inter; color:#B45309; background:#FFFBEB; border:1px dashed #FCD34D; border-radius:6px; align-items:center; justify-content:center; height:56px; margin-bottom:8px; }
.paper .slot .line { border-top:1px solid #9CA3AF; padding-top:4px; font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:#9CA3AF; }
.paper .slot .fields { display:grid; grid-template-columns:1fr 1fr; gap:10px 16px; margin-top:12px; }
.paper .slot .fields div { border-bottom:1px solid #E5E7EB; padding-bottom:2px; font-size:14px; font-weight:500; color:#111827; }
.paper .slot .fields div span { display:block; font-size:10px; font-weight:400; text-transform:uppercase; letter-spacing:.06em; color:#9CA3AF; }
.paper .proof { margin-top:28px; border:1px solid var(--accent); background:#F6F6FC; border-radius:8px; padding:16px; }
.paper .proof .k { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.1em; color:var(--accent); margin-bottom:8px; }
.paper .proof div { font:11px ui-monospace,Menlo,monospace; color:#374151; margin:3px 0; word-break:break-all; }
.paper .foot { font-size:10.5px; color:#9CA3AF; margin-top:28px; }

/* floating AI */
.ai-fab { position:fixed; right:24px; bottom:24px; width:56px; height:56px; border-radius:50%; background:var(--accent); display:grid; place-items:center;
  box-shadow:0 8px 32px rgba(88,84,208,.35); border:0; cursor:pointer; z-index:40; } .ai-fab:hover { background:var(--accent2); } .ai-fab img { width:24px; height:24px; }
.ai-panel { position:fixed; right:24px; bottom:92px; width:400px; max-height:600px; display:none; flex-direction:column; background:var(--surface);
  border:1px solid #23233A; border-radius:16px; overflow:hidden; z-index:40; box-shadow:0 24px 64px rgba(0,0,0,.6); }
.ai-panel.open { display:flex; }
.ai-panel .hd { background:var(--surface2); border-bottom:1px solid #23233A; padding:16px; } .ai-panel .hd b { font:600 15px Lexend; } .ai-panel .hd div { font-size:12px; color:var(--faint); }
.ai-panel .msgs { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; min-height:220px; }
.bub { padding:10px 16px; border-radius:16px; font-size:14px; max-width:88%; white-space:pre-wrap; }
.bub.u { align-self:flex-end; background:var(--accent); color:#fff; border-bottom-right-radius:6px; }
.bub.a { align-self:flex-start; background:var(--surface2); border:1px solid var(--b7); border-bottom-left-radius:6px; }
.ai-panel form { display:flex; gap:8px; padding:12px; border-top:1px solid #23233A; } .ai-panel form input { flex:1; }

@media (max-width: 1100px) { .grid-main, .grid-doc { grid-template-columns:1fr; } .tiles { grid-template-columns:1fr 1fr; } }
@media (max-width: 800px) { .side { position:static; width:auto; } .content { margin-left:0; } main { padding:20px 16px; } .top { padding:0 16px; } .paper .in { padding:28px 22px; } .paper .slots { grid-template-columns:1fr; } }

/* ---------- compatibility: older page markup rendered with the Pagga components */
.card { background:var(--surface); border:1px solid var(--b7); box-shadow:var(--edge); border-radius:16px; padding:20px; }
.sub { color:var(--text2); font-size:15px; margin:8px 0 22px; max-width:780px; }
h2 { font:600 11px Inter; text-transform:uppercase; letter-spacing:.12em; color:var(--faint); margin:28px 0 12px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; } .grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.row .grow { flex:1; min-width:0; }
.row.ok { box-shadow:var(--edge), inset 3px 0 0 #34D399; } .row.warn { box-shadow:var(--edge), inset 3px 0 0 #FBBF24; }
.row.bad { box-shadow:var(--edge), inset 3px 0 0 #F87171; } .row.accent { box-shadow:var(--edge), inset 3px 0 0 var(--accent2); }
.row.neutral { box-shadow:var(--edge), inset 3px 0 0 rgba(255,255,255,.2); }
.rec { position:relative; background:var(--surface); border:1px solid var(--b7); border-radius:16px; padding:20px 22px; box-shadow:var(--edge); margin:4px 0 10px; }
.rec.ok { box-shadow:var(--edge), inset 3px 0 0 #34D399; } .rec.warn { box-shadow:var(--edge), inset 3px 0 0 #FBBF24; } .rec.bad { box-shadow:var(--edge), inset 3px 0 0 #F87171; }
.rec .t { font:600 18px Lexend; margin-top:10px; } .rec .m { color:var(--text2); margin-top:4px; font-size:13px; }
.toggle-off { opacity:.45; } .toggle-off .t { text-decoration:line-through; }
pre { font-family:ui-monospace,Menlo,monospace; }
.label { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.12em; color:var(--faint); }
.top .search input { height:auto; padding:0; border:0; background:none; border-radius:0; }
.paper h2 { text-transform:none; letter-spacing:-.02em; font:600 30px Lexend; color:#111827; margin:6px 0 10px; }
.ev .mono, .mono { word-break:break-all; }

[hidden] { display:none !important; }
