/* G4-DRILL1 (the Owner 2026-10-02): a statement line opens what is under it — a window over the page with the lines, the user's classification groups and
   the accounts, and the reclassification in place. Loaded after the clarity sheet; the color sheet stays the last one. Colors come from the theme tokens. */
/* ---- the lines that open */
#statementTable tr[data-drill]{cursor:pointer}
#statementTable tr[data-drill]:hover td{background:rgba(67,201,255,.06)}
#statementTable tr[data-drill]>td:first-child{position:relative;padding-inline-end:34px}
#statementTable .statement-label .drill1-open,.drill1-open{position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:0;min-height:0;padding:0;margin:0;font:inherit;font-size:12px;line-height:1;cursor:pointer;border-radius:50%;border:1px solid var(--line,rgba(255,255,255,.18));background:transparent;box-shadow:none;color:var(--accent,#43c9ff);opacity:.4}
#statementTable tr[data-drill]:hover .drill1-open,.drill1-open:focus-visible{opacity:1}
.drill1-open:focus-visible,.drill1-close:focus-visible,.drill1-edit-btn:focus-visible{outline:2px solid var(--accent,#43c9ff);outline-offset:2px}
.drill1-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* ---- the window */
body.drill1-locked{overflow:hidden}
.drill1-backdrop{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(5,12,24,.55)}
.drill1-dialog{width:min(820px,100%);max-height:88vh;display:flex;flex-direction:column;border-radius:16px;border:1px solid var(--line,rgba(255,255,255,.16));background:var(--panel,#0f1d30);color:var(--text,inherit);box-shadow:0 18px 60px rgba(0,0,0,.35);outline:none}
.drill1-dialog>.drill1-head{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:14px 18px;border-bottom:1px solid var(--line,rgba(255,255,255,.12));text-align:start}
.drill1-dialog>.drill1-head>div{flex:1 1 55%;min-width:0}
.drill1-head h3{margin:0;font-size:17px}
.drill1-head small{color:var(--muted,#9fb0c3)}
.drill1-total{font-size:18px}
.drill1-close{font:inherit;font-size:20px;line-height:1;cursor:pointer;width:34px;height:34px;border-radius:50%;border:1px solid var(--line,rgba(255,255,255,.18));background:transparent;color:inherit;flex:none}
.drill1-body{padding:12px 18px 18px;overflow:auto}
.drill1-hint,.drill1-note{margin:0 0 10px;color:var(--muted,#9fb0c3);font-size:13px}
/* ---- the levels */
.drill1-line,.drill1-group{margin:6px 0;border-inline-start:2px solid var(--line,rgba(255,255,255,.14));padding-inline-start:10px}
.drill1-line>summary,.drill1-group>summary{display:flex;align-items:center;gap:8px;cursor:pointer;padding:6px 4px;border-radius:8px;list-style:none}
.drill1-line>summary::-webkit-details-marker,.drill1-group>summary::-webkit-details-marker{display:none}
.drill1-line>summary::before,.drill1-group>summary::before{content:'▸';color:var(--muted,#9fb0c3);transition:transform .15s ease}
.drill1-line[open]>summary::before,.drill1-group[open]>summary::before{transform:rotate(90deg)}
[dir="rtl"] .drill1-line>summary::before,[dir="rtl"] .drill1-group>summary::before{content:'◂'}
[dir="rtl"] .drill1-line[open]>summary::before,[dir="rtl"] .drill1-group[open]>summary::before{transform:rotate(-90deg)}
.drill1-line>summary:hover,.drill1-group>summary:hover{background:rgba(67,201,255,.07)}
.drill1-name{flex:1;min-width:0;font-weight:600}
.drill1-group .drill1-name{font-weight:500}
.drill1-count{color:var(--muted,#9fb0c3);font-size:12px}
.drill1-sign{display:inline-block;min-width:14px;text-align:center;font-weight:700;color:var(--accent,#43c9ff)}
/* ---- the accounts */
.drill1-accounts{list-style:none;margin:4px 0 8px;padding:0}
.drill1-acc{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:6px 8px;border-radius:8px}
.drill1-acc:nth-child(odd){background:rgba(255,255,255,.025)}
.drill1-acc-head{flex:1;min-width:200px;display:flex;flex-wrap:wrap;align-items:baseline;gap:6px}
.drill1-code{color:var(--muted,#9fb0c3);font-size:12px}
.drill1-co{font-size:11px;padding:0 6px;border-radius:6px;border:1px solid var(--line,rgba(255,255,255,.18))}
.drill1-cls{display:block;width:100%;color:var(--muted,#9fb0c3);font-size:12px}
.drill1-computed .drill1-acc-name{font-style:italic}
.drill1-edit-btn{font:inherit;font-size:12px;cursor:pointer;padding:3px 10px;border-radius:999px;border:1px solid var(--accent,#43c9ff);background:transparent;color:var(--accent,#43c9ff)}
.drill1-edit{width:100%;display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-top:6px;padding:10px;border-radius:10px;border:1px dashed var(--accent,#43c9ff)}
.drill1-edit label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted,#9fb0c3)}
.drill1-edit select{min-width:220px;max-width:100%}
.drill1-actions{display:flex;flex-wrap:wrap;gap:8px}
.drill1-msg{width:100%;margin:0;font-size:13px}
.drill1-msg p{margin:4px 0}
.drill1-warn{color:#f2bd55}
.drill1-ok{color:#3ecf8e;margin:0 0 10px}
.drill1-residual{display:flex;justify-content:space-between;gap:10px;margin:6px 0;padding:6px 8px;border-radius:8px;background:rgba(242,189,85,.08);font-size:13px}
.drill1-empty{color:var(--muted,#9fb0c3)}
@media (max-width:640px){
 .drill1-backdrop{padding:0;align-items:stretch}
 .drill1-dialog{max-height:none;height:100%;border-radius:0}
 .drill1-edit select{min-width:0;width:100%}
 .drill1-edit label{width:100%}
}
@media (prefers-reduced-motion:reduce){.drill1-line>summary::before,.drill1-group>summary::before{transition:none}}
/* G4-REV1B (the Owner 2026-10-03): the recorded adjustments of the line are named — nothing there to classify */
.drill1-adjusted{margin:6px 0;padding:6px 8px;border-radius:8px;border:1px solid rgba(62,207,142,.35);font-size:13px}
.drill1-adjusted p{margin:0 0 4px}
.drill1-adjusted ul{list-style:none;margin:0;padding:0}
.drill1-adjusted li{display:flex;justify-content:space-between;gap:10px;padding:3px 0}
.drill1-adjusted small{display:block;margin-top:4px;color:var(--muted,#9fb0c3)}
