/* Brand Ledger (/sdr) on MindFold OS: what the shared isy.css does not cover. Loaded after /ds/isy.css. */
[hidden]{display:none !important}   /* a class that sets display must never show what app.js hid */
.isy button,.isy input,.isy select,.isy textarea{font-family:inherit}

/* every select draws its own chevron, inset from the right edge (mid grey reads on light and dark grounds) */
.isy select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237A8794' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;background-size:12px 8px;padding-right:40px}
.isy-select.is-small{min-height:var(--mf-pill-short);height:var(--mf-pill-short);padding-left:12px;font-size:var(--mf-text-body)}

/* header */
.os-head .sub{font-variant-numeric:tabular-nums}
.os-live[data-f]::before{background:var(--dot)}
.os-live{max-width:46ch;overflow:hidden;text-overflow:ellipsis}
.isy-who{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* count tiles */
.ledger-counts{padding-bottom:var(--mf-space-30)}
.ledger-counts .isy-tiles{margin-bottom:var(--mf-space-10)}
.ledger-counts details{margin-top:14px}
.isy-tile{min-height:44px}
.isy-tile.is-small{min-height:32px;position:relative}
.isy-tile.is-small::after{content:"";position:absolute;inset:-6px -4px}   /* 44 px tap area, drawn size as the mockup */
.isy-tile:focus-visible{outline:var(--mf-focus-width-web) solid var(--mf-focus);outline-offset:var(--mf-focus-gap)}
.isy-tile.is-loading{cursor:default}
#stats[aria-busy=true] .isy-tile .n{opacity:.55}

/* toolbar: search, three dropdowns and the switch share one height and one centre line */
.ledger-bar{margin-bottom:var(--mf-space-20)}
.ledger-bar .mf-search{box-sizing:border-box;height:46px;padding:0 18px}
.ledger-bar .isy-select{flex:0 1 auto;width:auto;min-width:150px;max-width:240px}
.ledger-bar .mf-switch{min-height:46px;padding:0 4px;white-space:nowrap}
.ledger-bar .mf-switch:focus-visible{outline:var(--mf-focus-width-web) solid var(--mf-focus);outline-offset:var(--mf-focus-gap);border-radius:var(--mf-radius-field)}
.ledger-banner,.ledger-filters{display:flex;flex-wrap:wrap;gap:var(--mf-form-label) var(--mf-space-10);align-items:center;margin:0 0 var(--mf-space-20);font-size:var(--mf-text-body);line-height:var(--mf-leading-body)}
.ledger-banner{padding:8px 8px 8px 16px;border-radius:var(--mf-radius-pill);background:var(--c-working-bg);color:var(--c-working-fg)}
.ledger-banner .mf-pill{background:var(--mf-surface-0)}
.ledger-filters{color:var(--mf-ink-muted)}
.ledger-bulk{margin-bottom:var(--mf-space-20)}
.ledger-bulk .mf-pill{background:var(--mf-surface-0)}
.isy .ledger-bulkcap{margin:0 0 var(--mf-space-20);padding:8px 16px;border-radius:var(--mf-radius-pill);background:var(--c-attention-bg);color:var(--c-attention-fg);font-size:var(--mf-text-body);line-height:var(--mf-leading-body)}
/* Option B: the preview / progress / results panel for a bulk change */
.ledger-batch{display:flex;flex-direction:column;gap:var(--mf-space-20);margin:0 0 var(--mf-space-20);padding:var(--mf-space-20) 24px 24px;border-radius:var(--mf-radius-panel-lg);background:var(--mf-surface-0);box-shadow:inset 0 0 0 1px var(--mf-line)}
.ledger-batch h3{margin:4px 0 0;font:600 var(--mf-text-display)/var(--mf-leading-display) var(--mf-font-sans)}
.ledger-batch-list{list-style:none;margin:0;padding:0;font-size:var(--mf-text-body);line-height:var(--mf-leading-body)}
.ledger-batch-list li{display:grid;grid-template-columns:minmax(160px,220px) 1fr minmax(240px,380px);gap:var(--mf-space-10);align-items:center;padding:10px 0;border-top:1px solid var(--mf-line)}
.ledger-batch-list .nm{font-weight:500;overflow-wrap:anywhere}
.ledger-batch-list .ch{color:var(--mf-ink)}
.ledger-batch-list .why{display:block;margin-top:2px;color:var(--mf-ink-muted)}
.ledger-batch-list li[data-state=refused] .why{color:var(--c-blocked-fg)}
.ledger-batch-list .now{display:block;margin-bottom:2px;color:var(--mf-ink-muted)}
.ledger-batch-list .rs{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.ledger-batch h3:focus{outline:none}
.ledger-batch h3:focus-visible{outline:var(--mf-focus-width-web) solid var(--mf-focus);outline-offset:var(--mf-focus-gap);border-radius:var(--mf-radius-field)}
/* 44 px targets: the bar's and the card's pills, and each checkbox through the label around it */
.ledger-bulk .mf-pill,.ledger-batch .mf-pill{position:relative}
.ledger-bulk .mf-pill::after,.ledger-batch .mf-pill::after{content:"";position:absolute;inset:-4px 0}
.ledger-table .selhit{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;margin:-12px -6px -12px -8px;cursor:pointer}
.ledger-table thead .selhit{margin:-10px -6px -10px -8px}
.ledger-table .selhit:has(input:disabled){cursor:default}
.ledger-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
@media (max-width:900px){.ledger-batch-list li{grid-template-columns:1fr}}

/* the table: a real table so columns line up and cellOf reads by header; the look of the mockup's grid rows */
.ledger-scroll{overflow-x:auto;max-width:100%}
.ledger-table{border-collapse:collapse;width:100%;font-size:var(--mf-text-body);line-height:var(--mf-leading-body)}
.ledger-scroll.full .ledger-table{width:max-content;min-width:100%}
.ledger-table th{position:sticky;top:0;z-index:2;background:var(--mf-surface-0);padding:0 6px 10px;text-align:left;vertical-align:bottom;white-space:nowrap;font:500 var(--mf-text-caption)/var(--mf-leading-caption) var(--mf-font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--mf-ink-muted);cursor:pointer;user-select:none}
.ledger-table th.sorted::after{content:" ▾";color:var(--mf-ink)}
.ledger-table th.sorted.asc::after{content:" ▴"}
.ledger-table td{padding:12px 6px;border-top:1px solid var(--mf-line);vertical-align:middle;white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}
.ledger-table td.isy-mail{max-width:170px}
.ledger-table td.url{max-width:150px}
.ledger-table td.b{max-width:132px}
.ledger-table th:first-child,.ledger-table td:first-child{padding-left:8px}
.ledger-table th:last-child,.ledger-table td:last-child{padding-right:8px}
.ledger-table .selcol{width:32px}
.ledger-table input[type=checkbox]{width:var(--mf-check-web);height:var(--mf-check-web);accent-color:var(--mf-action);margin:0;vertical-align:middle}
.ledger-table tbody tr{position:relative}
.ledger-table tbody tr:hover td{background:var(--mf-surface-1)}
.ledger-table tbody tr.is-open td{background:var(--mf-surface-1)}
.ledger-table tbody tr.is-open td:first-child{box-shadow:inset var(--mf-focus-width-web) 0 0 var(--mf-focus)}
.ledger-table tbody tr.is-off td{color:var(--mf-ink-muted)}
/* the whole row is the tap target: the Display name button stretches over it; links and the checkbox sit above */
.ledger-table .isy-open{position:static;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.ledger-table .isy-open::after{content:"";position:absolute;inset:0}
.ledger-table .isy-open:focus-visible{outline:none}
.ledger-table .isy-open:focus-visible::after{box-shadow:inset 0 0 0 var(--mf-focus-width-web) var(--mf-focus);border-radius:var(--mf-radius-field)}
.ledger-table td a,.ledger-table td input,.ledger-table td .flag{position:relative;z-index:1}
.ledger-table td a{text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--mf-line)}
.ledger-table td a:hover{text-decoration-color:currentColor}
.ledger-table .col-full{display:none}
.ledger-scroll.full .col-full{display:table-cell}
.ledger-table .num{text-align:right;font-variant-numeric:tabular-nums}
.ledger-table .dim,.ledger-dbody .dim{color:var(--mf-ink-muted)}
.ledger-table .was{display:block;font-size:var(--mf-text-caption);color:var(--mf-ink-muted)}
.ledger-table tr.skelrow td{background:none}
.inf{margin-left:4px;font:500 10px/1 var(--mf-font-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--c-attention-fg)}
.flag{color:var(--c-attention-fg)}
.flag.ok{color:var(--c-ready-fg)}

/* loading placeholders: never a row of zeros */
.skel{display:inline-block;height:12px;width:70%;max-width:160px;border-radius:4px;vertical-align:middle;background:linear-gradient(90deg,var(--mf-surface-1) 25%,var(--mf-line) 50%,var(--mf-surface-1) 75%);background-size:200% 100%;animation:skel 1.2s linear infinite}
.isy-tile .n .skel{height:22px;width:42px}
.isy-tile.is-small .n .skel{height:16px;width:28px}
@keyframes skel{from{background-position:200% 0}to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.skel{animation:none}}
.ledger-empty{padding:var(--mf-space-40) var(--mf-space-20) var(--mf-space-10);color:var(--mf-ink-muted);font-size:var(--mf-text-body)}
.ledger-empty.err{color:var(--c-blocked-fg)}
.ledger-empty-acts{justify-content:center;padding-bottom:var(--mf-space-20)}
.ledger-about{margin-top:var(--mf-space-30)}

/* drawer over a dimmed list. The scrim only dims: a click on a dimmed row still moves to that lead, and a
   click anywhere else outside the drawer closes it (app.js), so the list stays one tap away */
.ledger-scrim{pointer-events:none}
.ledger-drawer{gap:var(--mf-space-20)}
.ledger-drawer h3{overflow-wrap:anywhere}
.ledger-meta{margin-top:8px}
.ledger-meta .mf-mono{overflow-wrap:anywhere}
.ledger-dbody{display:flex;flex-direction:column;gap:var(--mf-space-20)}
.ledger-dbody .isy-group:first-child{border-top:0;padding-top:0}
.ledger-dbody .mf-field .mf-label.is-plain{letter-spacing:0;text-transform:none;font:500 var(--mf-text-body)/var(--mf-leading-body) var(--mf-font-sans);color:var(--mf-ink)}
.ledger-dbody .mf-input{box-sizing:border-box}
.ledger-dbody .isy-textarea{min-height:70px;font-family:var(--mf-font-sans)}
.ledger-dbody .mf-hint .flag{display:block;margin-top:4px}
.ledger-dbody .isy-note,.ledger-dbody .hint{font-size:var(--mf-text-body);line-height:var(--mf-leading-body);color:var(--mf-ink-muted)}
.ledger-dbody .hint ul{margin:6px 0 0;padding-left:18px}
.ledger-dbody .isy-kv a{text-decoration:underline;text-underline-offset:3px}
.ledger-dbody details{border-top:1px solid var(--mf-line)}
.ledger-dbody .isy-fold{display:flex;flex-direction:column;gap:var(--mf-form-label)}
.contact .who{min-width:0}
.contact .nm{font-weight:500}
.contact .tt,.contact .em,.contact .sc{color:var(--mf-ink-muted);font-size:var(--mf-text-body);overflow-wrap:anywhere}
.contact .sc{margin-top:2px}
.contact .em .emv{color:var(--mf-ink)}
.contact .acts .mf-pill{background:var(--mf-surface-2)}
.contact.primary .nm{font-weight:600}
.ack{grid-column:1/-1;display:block;padding:10px 12px;border-radius:var(--mf-radius-field);background:var(--c-attention-bg);color:var(--c-attention-fg);font-size:var(--mf-text-body);line-height:var(--mf-leading-body)}
.ack .mf-pill{background:var(--mf-surface-0);margin:8px 6px 0 0;vertical-align:middle}
.contact .confirmprim-hint{grid-column:1/-1}
.prospect-row{display:flex;flex-wrap:wrap;gap:var(--mf-space-20);align-items:center}
.prospect-row label{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:var(--mf-text-body)}
.prospect-row input{width:var(--mf-check-web);height:var(--mf-check-web);accent-color:var(--mf-action);margin:0}
.ledger-dbody .reasonrow{display:flex;flex-direction:column;gap:var(--mf-form-label)}
.ledger-dbody .reasonrow .isy-select{width:100%}
.isy-link.emedit{font-size:var(--mf-text-body);min-height:24px}

/* toast: one dark pill at the bottom; an error one is red and stays longer */
.ledger-toast{position:fixed;left:0;right:0;bottom:24px;z-index:40;display:flex;justify-content:center;padding:0 16px;pointer-events:none}
.ledger-toast .mf-toast{max-width:min(640px,100%);opacity:0;transition:opacity .2s}
.ledger-toast .mf-toast:empty{padding:0}
.ledger-toast .mf-toast.show{opacity:1}
.ledger-toast .mf-toast.bad{background:var(--c-blocked-fg);color:#fff;font-weight:600}
@media (prefers-reduced-motion:reduce){.ledger-toast .mf-toast{transition:none}}

/* sign-in gate */
.gate{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px;background:var(--mf-surface-1)}
.gate-card{box-sizing:border-box;width:min(440px,100%);display:flex;flex-direction:column;gap:12px;padding:28px;border-radius:var(--mf-radius-panel-lg);background:var(--mf-surface-0);box-shadow:var(--mf-elevation-2)}
.gate-card h2{margin:0;font:600 var(--mf-text-display)/var(--mf-leading-display) var(--mf-font-sans)}
.gate-form{display:flex;flex-direction:column;gap:8px}
.gate-form .mf-input{box-sizing:border-box}
.gate-or{text-align:center;font-size:var(--mf-text-caption)}
.gate-msg{min-height:1.2em;font-size:var(--mf-text-body);color:var(--mf-ink-muted)}
.gate-msg.ok{color:var(--c-ready-fg)} .gate-msg.bad{color:var(--c-blocked-fg)}
.gate-foot{font-size:var(--mf-text-caption)}
.gate-foot a{text-decoration:underline;text-underline-offset:3px}

.isy .mf-pill:focus-visible,.isy-link:focus-visible,.isy a:focus-visible,.isy input[type=checkbox]:focus-visible,.isy input[type=radio]:focus-visible{outline:var(--mf-focus-width-web) solid var(--mf-focus);outline-offset:var(--mf-focus-gap)}

@media (max-width:900px){
  .ledger-bar .mf-search{flex:1 1 100%;max-width:none}
  .ledger-bar .isy-select{flex:1 1 150px;max-width:none}
}
