/* Legal Instruments — product mock components
   Mirrors the attorney workspace / client portal design system (Pacheco Workspace design.md):
   ivory canvas, navy structure, gold action + AI. Hairline-only depth inside mocks. */
.mk { container-type: inline-size; position: relative; width: 100%; background: #FDFBF4; color: #262420; border: 1px solid #F0EBDE; border-radius: 12px; overflow: hidden; font-family: 'Inter', system-ui, sans-serif; font-size: 11.5px; line-height: 1.4; text-align: left; -webkit-font-smoothing: antialiased; box-shadow: 0 1px 2px rgba(15,23,42,0.03); }
.mk *, .mk *::before, .mk *::after { box-sizing: border-box; min-width: 0; }
.mk-serif { font-family: 'EB Garamond', Georgia, serif; font-weight: 500; color: #14306B; letter-spacing: -0.005em; }
.mk-h { font-family: 'EB Garamond', Georgia, serif; font-weight: 500; font-size: 17px; line-height: 1.15; color: #14306B; }
.mk-lbl { font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #8C8268; }
.mk-muted { color: #8C8268; }
.mk-sec { color: #5C564A; }
.mk-faint { color: #ABA28C; }
.mk-num { font-variant-numeric: tabular-nums; }
.mk-split { display: grid; grid-template-columns: 132px minmax(0, 1fr); }
.mk-side { background: #FAF7EE; border-right: 1px solid #F0EBDE; padding: 10px 8px; display: flex; flex-direction: column; gap: 1px; }
.mk-brand { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; }
.mk-brand .mk-serif { font-size: 14px; }
.mk-nav { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 7px; font-size: 10.5px; font-weight: 500; color: #33302A; }
.mk-nav svg { width: 11px; height: 11px; flex: none; stroke: currentColor; }
.mk-nav.on { background: #E5EBF7; color: #1E3A8A; }
.mk-nav .mk-cnt { margin-left: auto; background: #F7EFD9; color: #9C7430; font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 999px; }
.mk-nav .mk-chev { margin-left: auto; width: 9px; height: 9px; }
.mk-matter { display: grid; grid-template-columns: 11px 1fr; gap: 6px; padding: 4px 7px; align-items: start; }
.mk-matter b { display: block; font-weight: 500; font-size: 10px; color: #33302A; }
.mk-matter span { display: block; font-size: 8.5px; color: #8C8268; }
.mk-user { margin-top: auto; display: flex; align-items: center; gap: 7px; padding: 6px 6px 2px; border-top: 1px solid #F0EBDE; }
.mk-av { width: 20px; height: 20px; border-radius: 50%; background: #1E3A8A; color: #fff; font-size: 8px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mk-av.gold { background: #F7EFD9; color: #9C7430; }
.mk-av.ok { background: #E9F4EC; color: #15803D; }
.mk-main { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.mk-card { background: #fff; border: 1px solid #F0EBDE; border-radius: 10px; padding: 9px 11px; }
.mk-card.list { padding: 0 11px; }
.mk-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #F5F1E6; }
.mk-row:last-child { border-bottom: 0; }
.mk-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 8.5px; font-weight: 600; white-space: nowrap; line-height: 1.3; background: #F2EDE1; color: #5C564A; }
.mk-chip.ok { background: #E9F4EC; color: #15803D; }
.mk-chip.gold { background: #F7EFD9; color: #9C7430; }
.mk-chip.navy { background: #E5EBF7; color: #1E3A8A; }
.mk-chip.danger { background: #FBEAEA; color: #C0392B; }
.mk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 10px; border-radius: 8px; font-size: 9.5px; font-weight: 600; white-space: nowrap; background: #1E3A8A; color: #fff; border: 1px solid #1E3A8A; line-height: 1.3; }
.mk-btn.gold { background: linear-gradient(180deg, #D8B166, #B58A35); border-color: #B58A35; color: #fff; }
.mk-btn.ghost { background: #fff; color: #1E3A8A; border-color: #EBE4D3; }
.mk-btn.ai { background: #fff; color: #9C7430; border-color: #EBE4D3; }
.mk-btn.danger { background: #fff; color: #C0392B; border-color: #EBE4D3; }
.mk-btn.sm { padding: 3px 7px; font-size: 8.5px; }
.mk-tw { width: 13px; height: 11px; flex: none; }
.mk-tw path { transform-box: fill-box; transform-origin: center; animation: mkTw 2.6s ease-in-out infinite; }
.mk-tw path + path { animation-delay: .7s; }
@keyframes mkTw { 0%,100% { transform: scale(.9); opacity: .78; } 50% { transform: scale(1.06); opacity: 1; } }
.mk-input { background: #fff; border: 1px solid #EBE4D3; border-radius: 12px; padding: 9px 11px 8px; }
.mk-input .ph { font-size: 11px; color: #ABA28C; }
.mk-input .bar { display: flex; align-items: center; gap: 8px; margin-top: 9px; color: #5C564A; }
.mk-input .bar svg { width: 11px; height: 11px; }
.mk-scope { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border: 1px solid #EBE4D3; border-radius: 999px; font-size: 9px; color: #5C564A; }
.mk-send { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(180deg, #D8B166, #B58A35); display: inline-flex; align-items: center; justify-content: center; }
.mk-send svg { width: 10px; height: 10px; stroke: #fff; }
.mk-dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mk-dash .mk-serif { font-size: 14px; display: block; margin-top: 2px; }
.mk-bubble { display: block; width: fit-content; max-width: 88%; padding: 7px 10px; font-size: 10.5px; line-height: 1.45; }
.mk-bubble.user { margin-left: auto; background: #1E3A8A; color: #fff; border-radius: 12px 12px 4px 12px; }
.mk-bubble.ai { background: #fff; border: 1px solid #F0EBDE; border-radius: 12px 12px 12px 4px; color: #33302A; }
.mk-stages { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-stage { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 8px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.mk-stage::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.mk-stage.read { background: #E5EBF7; color: #1E3A8A; }
.mk-stage.think { background: #F2EDE1; color: #5C564A; }
.mk-stage.draft { background: #F7EFD9; color: #9C7430; }
.mk-stage.done { background: #E9F4EC; color: #15803D; }
.mk-widget { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; background: #fff; border: 1px solid #F0EBDE; border-radius: 10px; padding: 8px 10px; }
.mk-widget .ic { width: 24px; height: 24px; border-radius: 6px; background: #F7EFD9; display: inline-flex; align-items: center; justify-content: center; }
.mk-widget .ic svg { width: 12px; height: 12px; stroke: #9C7430; }
.mk-widget b { display: block; font-weight: 600; font-size: 10.5px; color: #262420; }
.mk-widget span { display: block; font-size: 9px; color: #8C8268; }
.mk-tabs { display: flex; gap: 4px; border-bottom: 1px solid #F0EBDE; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.mk-tab { flex: none; padding: 5px 6px; font-size: 9.5px; font-weight: 500; color: #5C564A; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mk-tab.on { color: #1E3A8A; border-color: #1E3A8A; font-weight: 600; }
.mk-pilltabs { display: inline-flex; gap: 2px; background: #F2EDE1; border-radius: 999px; padding: 2px; }
.mk-pilltabs span { padding: 2px 8px; border-radius: 999px; font-size: 9px; font-weight: 600; color: #5C564A; }
.mk-pilltabs span.on { background: #1E3A8A; color: #fff; }
.mk-toggle { width: 26px; height: 15px; border-radius: 999px; background: #1E3A8A; position: relative; flex: none; }
.mk-toggle::after { content: ""; position: absolute; top: 2px; left: 13px; width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.mk-toggle.off { background: #DFD8C4; } .mk-toggle.off::after { left: 2px; }
.mk-field { border: 1px solid #EBE4D3; border-radius: 8px; padding: 6px 9px; font-size: 10.5px; color: #262420; background: #fff; }
.mk-letter { background: #fff; border: 1px solid #E7DFCB; border-radius: 4px; padding: 14px 16px; font-family: Georgia, 'Times New Roman', serif; font-size: 9.5px; line-height: 1.7; color: #262420; }
.mk-letter .t { font-family: 'EB Garamond', Georgia, serif; font-variant: small-caps; font-weight: 600; font-size: 12px; text-align: center; color: #14306B; letter-spacing: 0.04em; margin-bottom: 6px; }
.mk-letter h6 { font-family: 'EB Garamond', Georgia, serif; font-size: 10.5px; font-weight: 600; margin: 6px 0 2px; color: #262420; }
.mk-letter p { margin: 0 0 4px; }
.mk-var { display: inline-block; background: #F7EFD9; color: #9C7430; border-radius: 4px; padding: 0 4px; font-family: 'Inter', system-ui, sans-serif; font-size: 8.5px; font-weight: 600; line-height: 1.6; vertical-align: baseline; }
.mk-ins { background: #E9F4EC; color: #15803D; text-decoration: underline; text-decoration-color: rgba(21,128,61,0.4); }
.mk-del { background: #FBEAEA; color: #C0392B; text-decoration: line-through; }
.mk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.mk-tool { width: 18px; height: 18px; border: 1px solid #EBE4D3; border-radius: 5px; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 600; color: #33302A; }
.mk-tool.navy { background: #1E3A8A; border-color: #1E3A8A; }
.mk-check { width: 12px; height: 12px; border-radius: 50%; background: #E9F4EC; color: #15803D; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mk-check svg { width: 8px; height: 8px; stroke: #15803D; }
.mk-ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #DFD8C4; flex: none; }
.mk-ring.cur { border-color: #C9992F; box-shadow: 0 0 0 3px #F7EFD9; }
.mk-cb { width: 11px; height: 11px; border-radius: 3px; border: 1px solid #DFD8C4; background: #fff; flex: none; }
.mk-cb.on { background: #1E3A8A; border-color: #1E3A8A; }
.mk-cal { display: grid; grid-template-columns: 30px repeat(3, minmax(0, 1fr)); font-size: 8.5px; }
.mk-cal > div { border-bottom: 1px solid #F5F1E6; border-right: 1px solid #F5F1E6; min-height: 22px; padding: 2px 3px; position: relative; }
.mk-cal .hd { background: #FBF8F0; font-weight: 600; color: #5C564A; text-transform: uppercase; letter-spacing: 0.04em; font-size: 8px; }
.mk-cal .hr { color: #ABA28C; font-size: 7.5px; text-align: right; padding-right: 4px; }
.mk-ev { position: absolute; left: 2px; right: 2px; top: 2px; border-left: 2px solid #1E3A8A; background: #E5EBF7; color: #1E3A8A; border-radius: 3px; padding: 2px 4px; font-size: 7.5px; font-weight: 600; line-height: 1.25; }
.mk-ev.gold { border-color: #C9992F; background: #F7EFD9; color: #9C7430; }
.mk-ev.tall { height: calc(200% - 4px); }
.mk-datebox { width: 30px; border: 1px solid #F0EBDE; border-radius: 6px; text-align: center; overflow: hidden; flex: none; }
.mk-datebox i { display: block; font-style: normal; background: #FBEAEA; color: #C0392B; font-size: 7px; font-weight: 700; letter-spacing: 0.06em; }
.mk-datebox b { display: block; font-family: 'EB Garamond', Georgia, serif; font-size: 14px; line-height: 1.15; color: #14306B; }
.mk-sign { border: 1.5px dashed #C9992F; background: #FDF8EA; color: #9C7430; border-radius: 6px; padding: 8px; text-align: center; font-family: 'Inter', system-ui, sans-serif; font-size: 9px; font-weight: 600; }
.mk-script { font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: 18px; color: #14306B; }
.mk-drop { border: 1.5px dashed #DFD8C4; border-radius: 10px; padding: 12px; text-align: center; color: #8C8268; font-size: 9.5px; background: #fff; }
.mk-drop b { display: block; color: #33302A; font-weight: 600; font-size: 10.5px; margin-bottom: 1px; }
.mk-modal { background: #fff; border: 1px solid #F0EBDE; border-radius: 12px; box-shadow: 0 12px 32px -8px rgba(15,23,42,0.16); overflow: hidden; }
.mk-hdr { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mk-hdr > * { min-width: 0; }
.mk-hdr > :last-child { flex: none; }
.mk-hdr .mk-h { font-size: 16px; }
.mk-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.mk-progress { height: 4px; border-radius: 999px; background: #F2EDE1; overflow: hidden; }
.mk-progress i { display: block; height: 100%; background: linear-gradient(90deg, #B58A35, #D8B166); border-radius: 999px; }
.mk-notice { display: flex; align-items: center; gap: 8px; background: #FBF8F0; border: 1px solid #F0EBDE; border-radius: 10px; padding: 7px 10px; font-size: 9.5px; color: #33302A; }
.mk-inbox { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 7px; align-items: start; padding: 7px 8px; border-radius: 8px; }
.mk-inbox.on { background: #F2EDE1; }
.mk-inbox b { display: block; font-size: 10px; font-weight: 600; color: #262420; }
.mk-inbox span { display: block; font-size: 8.5px; color: #5C564A; line-height: 1.3; }
.mk-inbox b, .mk-inbox span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-inbox em { font-style: normal; font-size: 8px; color: #ABA28C; white-space: nowrap; }
.mk-dot { width: 5px; height: 5px; border-radius: 50%; background: #1E3A8A; display: inline-block; }
.mk-logo { width: 22px; height: 22px; border-radius: 6px; background: #FBF8F0; border: 1px solid #F0EBDE; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mk-logo img { width: 13px; height: 13px; display: block; object-fit: contain; }
.mk-brandbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #F0EBDE; background: #FDFBF4; }
.mk-lang { display: inline-flex; border: 1px solid #EBE4D3; border-radius: 999px; padding: 1px; }
.mk-lang span { padding: 1px 7px; border-radius: 999px; font-size: 8px; font-weight: 700; color: #5C564A; }
.mk-lang span.on { background: #1E3A8A; color: #fff; }
.mk-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mk-slot { border: 1px solid #EBE4D3; border-radius: 8px; padding: 6px 4px; text-align: center; font-size: 9.5px; font-weight: 500; color: #262420; background: #fff; }
.mk-slot.on { border: 1.5px solid #C9992F; background: #F7EFD9; color: #9C7430; font-weight: 700; }
.mk-slot small { display: block; font-size: 7.5px; color: #8C8268; font-weight: 500; }
.mk-kv { display: grid; grid-template-columns: 44px 1fr; gap: 4px 8px; font-size: 10px; }
.mk-kv dt { color: #8C8268; } .mk-kv dd { margin: 0; color: #262420; }
.mk-kv dd.link { color: #1E3A8A; }
.mk-act { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; background: #fff; border: 1px solid #F0EBDE; border-left: 3px solid #C9992F; border-radius: 10px; padding: 8px 10px; }
.mk-act .ic { width: 24px; height: 24px; border-radius: 6px; background: #F7EFD9; display: inline-flex; align-items: center; justify-content: center; }
.mk-act .ic svg { width: 12px; height: 12px; stroke: #9C7430; }
.mk-act b { display: block; font-size: 10.5px; font-weight: 600; color: #262420; }
.mk-act span { display: block; font-size: 9px; color: #5C564A; }
.mk-step { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: start; padding: 5px 0; }
.mk-step b { display: block; font-size: 10px; font-weight: 600; color: #262420; }
.mk-step.done b { color: #15803D; }
.mk-step.todo b { color: #8C8268; font-weight: 500; }
.mk-step span { display: block; font-size: 8.5px; color: #8C8268; }
.mk-step.cur { background: #FBF8F0; border-radius: 6px; padding: 5px 6px; margin: 0 -6px; }
@container (max-width: 460px) { .mk-split { grid-template-columns: 1fr; } .mk-side { display: none; } .mk-hide-sm { display: none !important; } }
@container (max-width: 380px) { .mk-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-two { grid-template-columns: 1fr !important; } }
@container (max-width: 300px) { .mk-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.mk-comms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.mk-cm-list { border-right: 1px solid #F0EBDE; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; background: #FDFBF4; }
.mk-cm-conv { padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
@container (max-width: 420px) { .mk-comms { grid-template-columns: 1fr; } .mk-cm-list { border-right: 0; border-bottom: 1px solid #F0EBDE; } .mk-cm-list .mk-inbox:nth-child(n+5) { display: none; } }

/* hero-size variant: the index hero renders the mock at ~0.8 scale, so type runs larger */
.mk-hero { font-size: 13px; }
.mk-hero .mk-side { padding: 12px 10px; gap: 2px; }
.mk-hero .mk-brand img { height: 17px !important; }
.mk-hero .mk-nav { font-size: 12.5px; padding: 6px 8px; gap: 8px; }
.mk-hero .mk-nav svg { width: 13px; height: 13px; }
.mk-hero .mk-nav .mk-cnt { font-size: 10px; }
.mk-hero .mk-matter b { font-size: 11.5px; } .mk-hero .mk-matter span { font-size: 9.5px; }
.mk-hero .mk-lbl { font-size: 10px; }
.mk-hero .mk-dash .mk-serif { font-size: 17px; }
.mk-hero .mk-bubble { font-size: 12.5px; padding: 8px 12px; }
.mk-hero .mk-stage { font-size: 9px; padding: 3px 8px; }
.mk-hero .mk-widget b { font-size: 12.5px; } .mk-hero .mk-widget span { font-size: 10.5px; }
.mk-hero .mk-widget .ic { width: 28px; height: 28px; } .mk-hero .mk-widget .ic svg { width: 14px; height: 14px; }
.mk-hero .mk-btn.sm { font-size: 10px; padding: 4px 9px; }
.mk-hero .mk-input .ph { font-size: 12.5px; }
.mk-hero .mk-input .bar svg { width: 13px; height: 13px; }
.mk-hero .mk-scope { font-size: 10.5px; }
.mk-hero .mk-user b { font-size: 11.5px !important; } .mk-hero .mk-user .mk-muted { font-size: 9.5px !important; }
.mk-hero .mk-av { width: 24px; height: 24px; font-size: 9px; }

@container (max-width: 460px) { .mk-two-wide { grid-template-columns: 1fr !important; } }
