/* LexSys base theme: thin custom layer on top of Spectre.css */

/* ---------- header navbar ---------- */
header.navbar{background:#1e2a44;padding:.5rem 1.2rem;min-height:3rem}
header.navbar .navbar-brand{color:#cfe0ff;font-weight:700;font-size:1.15rem;text-decoration:none}
header.navbar .menu{background:transparent;border:0;box-shadow:none;padding:0;margin:0;
 display:flex;flex-wrap:wrap;align-items:center}
header.navbar .menu .menu-item{border:0;padding:0}
header.navbar .menu .menu-item a{color:#cfe0ff;padding:.25rem .6rem;border-radius:4px}
header.navbar .menu .menu-item a:hover{background:#2a3b5f}
.user{display:flex;align-items:center;gap:.4rem;color:#cfe0ff;white-space:nowrap}
.user form{display:inline;margin:0}
.user .logout{color:#cfe0ff}

/* ---------- content ---------- */
main.container,.container.page-body{margin:1.5rem auto;max-width:1200px;padding:0 1rem}
.page-title{margin-bottom:.8rem}
.block-text{white-space:normal}
footer.footer{margin-top:2rem;color:#758094;font-size:.85rem}

/* ---------- aliases kept for older markup (modules, errors) ---------- */
.err{color:#b32d2d}
.ok{color:#1a8a4a}
.hidden{display:none}
table.tbl{border-collapse:collapse;width:100%}
.tbl th,.tbl td{border:1px solid #d5dbe5;padding:.4rem .6rem;text-align:left;vertical-align:top}
.tbl th{background:#eef2f8}
.empty p{margin:0}

/* ---------- admin nav ---------- */
ul.nav.admin-nav{display:flex;flex-wrap:wrap;gap:.15rem;margin-bottom:1rem}
.admin-nav .nav-item{margin:0}
.admin-nav .nav-item a{padding:.2rem .5rem;border-radius:4px;color:#2563eb}
.admin-nav .nav-item a:hover{background:#eef2f8}

/* ---------- modal ----------
   A modal is full screen by default. What goes into one is a record, a search,
   a designer - wider than a column and taller than a screenful - and a box
   clipped at 640px makes a person scroll sideways to read their own data. The
   container is a flex column clipped to the viewport, the body takes what is
   left and carries the scrollbar, the footer keeps the close button in reach.
   Something short - a question, a form of four fields - asks for the narrow box
   of before with .modal-small. */
.modal .modal-container{max-width:min(100vw,100%);max-height:100vh;width:100%;overflow:hidden}
.modal .modal-container.modal-small{max-width:min(94vw,640px);width:auto}
.modal-container .modal-header{border-bottom:1px solid #e5e9f0}
.modal-container .modal-header h2{font-size:1rem;margin:0}
.modal-container .modal-body{flex:1 1 auto;min-height:0;overflow:auto}
.modal .modal-container.modal-small .modal-body{max-height:70vh}
.modal-container .modal-footer{border-top:1px solid #e5e9f0;padding:.6rem .8rem}
.modal-container .modal-body label>span{display:block;font-size:.85rem;color:#546079}
/* inline variant used by the single item editor page (/admin/edit/{id}) */
.modal.static{position:static;display:block;padding:0;overflow:visible}
.modal.static .modal-container{max-height:none;box-shadow:none;width:100%}
.modal.static .modal-body{max-height:none;overflow:visible}

/* ---------- admin lexList ---------- */
.lex-bar{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap;margin:.6rem 0}
.lex-bar .q{flex:1;min-width:140px}
.perbox{font-size:.85rem;color:#758094}
.lex-pager{margin:.6rem 0;font-size:.9rem}

/* ---------------------------------------------------- the list control */
/* One block for the four controls every list wears: the chooser of columns,
 * the columns a reader asked to leave out, the rows of a page he is not on,
 * and the line a fold of rows opens from. */
.lex-cols{position:relative;display:inline-flex}
.lex-cols-panel{position:absolute;z-index:30;top:100%;left:0;min-width:220px;
  max-height:60vh;overflow:auto;background:#fff;border:1px solid #d7dde5;
  border-radius:4px;padding:.5rem .6rem;box-shadow:0 4px 12px rgba(48,55,66,.12)}
.lex-cols-note{font-size:.8rem;color:#758094;margin:0 0 .4rem}
.lex-cols-list{list-style:none;margin:0;padding:0}
.lex-cols-list li{display:flex;align-items:center;gap:.2rem;padding:0.05rem 0}
.lex-cols-list li .check{flex:1;margin:0}
.lex-cols-list .btn{padding:0 .25rem;line-height:1;font-size:.9rem}
.lex-cols-reset{margin-top:.4rem}
/* a column the reader left out, and a row of a page he is not on: hidden by
 * the sheet and not by the engine, so both are put back by the same click
 * that took them away, and a screen reader is told which way it went */
.lex-col-off,.lex-row-off,.lex-folded{display:none}
.lex-fold>td{background:#f4f6f9;font-size:.85rem}
.lex-fold .lex-fold-open{padding:0 .2rem;line-height:1}
.lex-bar-static{gap:.6rem}
.lex-count{font-size:.85rem;color:#758094}
p.empty{color:#758094;font-style:italic}

/* ---------- calendar (spectre calendar component) ---------- */
.calendar{position:relative}
.calendar .calendar-nav{justify-content:center;gap:.5rem}
.calendar-nav .flex-t{flex:1;text-align:center}
.calendar-event{display:block;margin-top:2px;padding:0 3px;border-radius:3px;color:#fff;
 font-size:.6rem;cursor:pointer;overflow:hidden;white-space:nowrap;text-decoration:none}
.cal-hint{font-size:.8rem;color:#758094;text-align:center;margin:.4rem 0}


/* ---------- row editors inside forms (rows.js) ---------- */
.rowlist{display:flex;flex-direction:column;gap:.3rem;list-style:none;margin:0;padding:0}
.rowlist>li{list-style:none}
.rowlist ul{list-style:none;margin:0;padding:0}
/* a row that gathers rows is indented by the list it gathers, so the shape of
 * a form reads out of the place its rows stand in */
.rowlist ul ul{margin-left:1.4rem;padding-left:.4rem;border-left:2px solid #d7dbea}
.mrow,.brow,.frow{display:flex;gap:.3rem;align-items:center;flex-wrap:wrap}
.mrow .form-input,.frow .form-input{flex:1;min-width:0}
.frow .fname,.frow .flabel{flex:1 1 110px}
.frow .ftpl{flex:1 1 150px}
.frow .fopts{flex:2 1 160px;font-family:monospace;font-size:.85rem}
.frow.set{background:#f4f6fb;border-radius:4px}
.frow.set>.flabel{font-weight:600}
.handle{cursor:grab;color:#828c9e;font-weight:700;padding:0 .2rem;user-select:none}
.handle:active{cursor:grabbing}
.kid:disabled,.dup:disabled{opacity:.4;cursor:not-allowed}
/* what nestedSortable draws while a row is on the move */
.placeholder{border:1px dashed #888c9e;background:#eef1f8 !important}
.mjs-nestedSortable-error{background:#fbe3e4;border:1px solid #e09090}
.mjs-nestedSortable-branch>.kids{display:block}
.mjs-nestedSortable-collapsed>.kids{display:none}
.chk{display:flex;align-items:center;gap:.25rem;white-space:nowrap}
.chk span{display:inline !important}

/* the lists a module adds to the engine (lists.js): a row of a list is one
 * line of controls, or one line that says what it holds when the fields are
 * too many to sit in a line and are edited behind `edit...` */
.drow{display:flex;gap:.3rem;align-items:center;flex-wrap:wrap;
     padding:.15rem .25rem;border:1px solid #e5e9f0;border-radius:4px;background:#fafbfe}
.drow .dtext{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.drow .linput,.drow .lsel{flex:1 1 110px;min-width:0}
.drow .ltext{flex:2 1 160px;min-width:0}
.drow .dup,.drow .rm,.drow .dedit,.drow .dpick{flex:0 0 auto}
/* the name a picked id is known by, read in place of the uuid it stands for */
.lpick{color:#546079;font-size:.85rem}
.list-slot>fieldset{margin:.2rem 0 .5rem}
.list-slot .addList{margin-top:.2rem}

/* ---------- link boxes in the item editor (admin.js) ----------
 * a box is one pick and the rows it hangs: the word typed narrows the shelf,
 * the row picked is hung where the server says it hung, and the reason a row
 * could not be hung is said in the line under the boxes. */
.linkboxes .linkbox{border:1px solid #d7dbea;border-radius:4px;padding:.4rem .5rem;margin:.4rem 0}
.linkboxes .boxhead{display:flex;gap:.3rem;align-items:center;flex-wrap:wrap;margin:0 0 .3rem}
.linkboxes .boxtitle{font-weight:600;min-width:4.5rem}
.linkboxes .linkFilter{flex:1 1 140px;min-width:0}
.linkboxes .linkSel{flex:1 1 190px;min-width:0}
.lrow,.srow,.nrow{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}
.lrow code,.srow code,.nrow code{background:#f4f6fb;padding:0 .3rem;border-radius:3px}
.lrow.is-blank,.srow.is-blank,.nrow.is-blank{opacity:.55;font-style:italic}
.lkind,.semail,.nkind,.nends{color:#758094;font-size:.85rem}
/* a link row is a relationship, so its two ends are the thing to read: they
 * keep their own line when the box is too narrow to hold them in one */
.nends{flex:1 1 100%}
.boxhint{font-size:.8rem;color:#758094;margin:.2rem 0 0}
.linknote{font-size:.85rem;color:#9a3b3b;margin:.3rem 0}
.linkboxes>p .linknote{color:#758094}
.actions{white-space:nowrap}
.upstatus{color:#2563eb}

/* ---------- login ---------- */
.container.login{max-width:460px}

/* ---------- module views (notes/projects/persons) ---------- */
.notes-app .kanbar{display:flex;gap:.8rem;overflow-x:auto}
.notes-col{flex:1 1 200px;min-width:200px;background:#eef2f8;border-radius:6px;padding:.5rem}
.notes-col h4{margin:.2rem 0;text-transform:capitalize}
.ncard{background:#fff;border-left:4px solid #2563eb;border-radius:4px;padding:.4rem .6rem;
 margin:.4rem 0;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.ncard .ncard-actions{display:flex;gap:.4rem;align-items:center;margin-top:.3rem}
.ncard-actions input[type=submit]{background:#b32d2d;color:#fff;border:0;border-radius:3px;
 padding:.15rem .4rem;cursor:pointer}
.ncard label span{display:block;font-size:.85rem;color:#546079}
.ncard input,.ncard textarea,select{width:100%}
/* the note dialog wears the shared Spectre shell now (.modal above); only
   its field styles remain here */
.notes-modal-box label{display:block;margin:.4rem 0}
.notes-modal-box input,.notes-modal-box textarea{width:100%}
.pcard{display:inline-block;width:190px;background:#fff;border:1px solid #d5dbe5;border-radius:6px;
 padding:.6rem;margin:.3rem}
.person dl{display:grid;grid-template-columns:140px 1fr;gap:.25rem .5rem}
.person dt{color:#546079;font-weight:600}
.person dd{margin:0}
.proj-card{display:inline-block;width:230px;background:#fff;border:1px solid #d5dbe5;
 border-radius:6px;padding:.6rem .6rem .4rem;margin:.3rem;vertical-align:top}
.proj-card h4{margin:0}
.proj-bar{height:6px;background:#e5e9f0;border-radius:3px;margin:.3rem 0}
.proj-bar i{display:block;height:100%;background:#2fae60;border-radius:3px}
.pbadge{display:inline-block;background:#e5e9f0;border-radius:10px;padding:0 .5rem;font-size:.8rem}
.projects-view a.sel{font-weight:700;text-decoration:underline}

/* ---------- shared button-ish classes for module views ---------- */
button.danger,.btn-delete{background:#b32d2d;color:#fff}
button.edit,button.mv,button.unlink{background:transparent}
.timeline{margin:.5rem 0;padding-left:1.2rem}
/* the plot container holds the plain list until Plotly replaces it */
.tl-wrap{position:relative;margin:.5rem 0}
.tl-wrap .jsplot{width:100%}
.tl-wrap .modebar{display:none}
.prog{display:inline-block;width:60px;height:6px;background:#e5e9f0;border-radius:3px}
.prog>span{display:block;height:100%;background:#2fae60;border-radius:3px}
.gallery{display:flex;flex-wrap:wrap;gap:.5rem}
.filecard{width:180px;border:1px solid #d5dbe5;border-radius:6px;padding:.4rem;background:#fff}
.filecard img{max-width:100%}
.tags{display:flex;gap:.3rem;flex-wrap:wrap}
.badge{background:#e5e9f0;border-radius:10px;padding:0 .5rem;font-size:.8rem}
.view-bar{display:flex;gap:.6rem;margin-bottom:.8rem}

/* ---------- calendar (modules/calendar: month, planner, months, timeline, sankey) ---------- */
.calendar{position:relative;margin:.4rem 0}
/* the views the reader chooses between, and the bar that steps through them */
.cal-views{display:flex;flex-wrap:wrap;gap:.4rem;justify-content:center;margin-bottom:.5rem}
.cal-views .btn.on{background:#2563eb;border-color:#2563eb;color:#fff}
.cal-bar{display:flex;align-items:center;justify-content:center;gap:.6rem;flex-wrap:wrap;margin-bottom:.4rem}
.cal-bar .cal-title{min-width:11rem;text-align:center;font-size:1.05rem}
.cal-months{display:flex;gap:.5rem;align-items:center}
.cal-months label{display:flex;flex-direction:column;font-size:.75rem;color:#546079}
.cal-months .form-input{width:4.5rem}
.cal-filters{display:flex;flex-wrap:wrap;gap:.8rem;align-items:flex-start;justify-content:center;margin:.3rem 0 .6rem}
.cal-switches{display:flex;flex-wrap:wrap;gap:.8rem}
.cal-filters label{display:flex;align-items:center;gap:.3rem;font-size:.9rem;cursor:pointer}
/* the searchable multiselects stand directly under the switch they narrow */
.cal-under{width:100%;margin:.3rem 0 .5rem;padding:.4rem .5rem;border:1px solid #dfe4ee;border-radius:6px;background:#fafbfe}
.cal-ms-label{display:block;font-size:.72rem;color:#546079;margin-bottom:.2rem;text-transform:uppercase;letter-spacing:.04em}
.cal-ms .cal-ms-q{width:100%;font-size:.85rem}
.cal-ms-tools{display:flex;gap:.5rem;align-items:center;font-size:.8rem;color:#546079;margin:.2rem 0}
.cal-ms-list{max-height:10rem;overflow:auto;border:1px solid #dfe4ee;border-radius:4px;background:#fff;padding:.2rem .3rem}
.cal-ms-item{display:flex;gap:.3rem;align-items:center;font-size:.82rem;padding:.05rem .1rem;cursor:pointer}
.cal-ms-note{color:#758094}
.cal-only{display:flex;flex-direction:column;font-size:.8rem;color:#546079}
.cal-hint{width:100%;text-align:center;font-size:.75rem;color:#758094}
/* a span past its end while the item is not closed: red, in every view */
.cal-ev.cal-alert,.cal-ev.cal-alert a{background:#c0392b;color:#fff;font-weight:600}
li.cal-alert,li.cal-alert b,li.cal-alert a{color:#c0392b;font-weight:600}
.cal-dot{display:inline-block;width:.7rem;height:.7rem;border-radius:50%}
/* the legend carries its count inside the colour, so it is a pill and not a dot */
.cal-legend .cal-dot{width:auto;height:auto;padding:.1rem .45rem;border-radius:3px;color:#fff;font-size:.8rem}
.cal-legend .cal-dot.cal-alert{background:#c0392b}
.dot-event{background:#2563eb}.dot-project{background:#f59e0b}.dot-note{background:#16a34a}
table.cal-table{width:100%;border-collapse:collapse;table-layout:fixed}
.cal-table th{font-size:.8rem;color:#546079;padding:.25rem .4rem;text-align:left;border-bottom:1px solid #d5dbe5}
.cal-table td.cal-day{border:1px solid #dfe4ee;vertical-align:top;height:4.6rem;padding:.2rem .3rem}
.cal-day.cal-off{background:#f6f7fa;color:#aab2c2}
.cal-day.cal-today{background:#eef5ff}
.cal-day.cal-today .cal-num{font-weight:700;color:#2563eb}
.cal-num{display:block;font-size:.85rem;color:#546079}
.cal-items{display:block;margin-top:.2rem}
.cal-ev{display:block;margin:.1rem 0;padding:0 .25rem;border-radius:3px;color:#fff;font-size:.72rem;
 overflow:hidden;white-space:nowrap;text-decoration:none;cursor:pointer}
/* only the chips a click can open are pointers: a link chip that no dialog
   answers (data-event absent) is read as what it is, a link and nothing more */
.cal-ev:not(.cal-event[data-event]){cursor:default}
.cal-more{font-size:.72rem;color:#546079}
.cal-legend{display:flex;flex-wrap:wrap;gap:.8rem;margin:.5rem 0;font-size:.85rem}
.cal-empty{text-align:center;color:#758094;font-style:italic;margin:.4rem 0}
/* the planner: days across the top, the hours of the day down the side */
.cal-planner{overflow:auto}
.cal-planner-t td.cal-day{height:1.9rem;min-width:5.6rem;font-size:.7rem;padding:.1rem .2rem}
.cal-planner-t th.cal-hour{position:sticky;left:0;background:#fff;font-size:.7rem;color:#546079;white-space:nowrap;z-index:1}
.cal-planner-t tr.cal-allday td.cal-day{height:2.8rem;background:#f6f7fa}
/* several months one after another */
.cal-month{margin-bottom:1.4rem}
.cal-table caption{caption-side:top;text-align:left;font-size:.95rem;color:#546079;padding-bottom:.25rem}
.lex-chart{overflow:auto}

.cal-dialog .form-group{margin-bottom:.5rem}
.cal-dialog .form-label{display:block;font-size:.85rem;color:#546079}
.cal-dialog .form-control{width:100%}

/* ---------- case files (portalquery.just.ro) ---------- */
.casefiles-block{display:flex;flex-wrap:wrap;gap:.5rem}
.cf-card{width:250px;border:1px solid #d5dbe5;border-radius:6px;padding:.4rem .5rem;background:#fff}
.cf-card p{margin:.2rem 0;font-size:.85rem;color:#546079}
.cf-card .cf-court{color:#546079}
.cf-subject{margin:.2rem 0;color:#546079;font-size:.85rem}
main.casefile h1 .cf-old{color:#758094;font-size:.8rem}
.cf-fields{width:auto}
.cf-fields th{color:#546079;padding-right:.6rem;font-weight:600;text-align:left}
.cf-fields td{padding:.1rem .6rem .1rem 0;text-align:left}
.cf-notes{margin:.6rem 0;padding:.4rem .6rem;background:#eef2f8;border-radius:6px}
/* who holds a case file and who has reached it: a box of its own on the page,
 * because the answer is about the office and not about the portal */
.cf-holders{margin:.6rem 0;padding:.4rem .6rem;border:1px solid #d5dbe5;border-radius:6px;background:#fbfcfe}
.cf-holders h2{font-size:.95rem;margin:0 0 .3rem}
.cf-holders-lead{margin:.3rem 0;font-weight:600;color:#546079;font-size:.85rem}
.cf-holders-list{margin:0 0 .3rem;padding-left:1.1rem;font-size:.9rem}
.cf-perm{color:#758094}
.cf-watchers{width:auto;font-size:.85rem}
.cf-watchers th,.cf-watchers td{padding:.1rem .5rem;text-align:left}
.cf-watched{color:#758094}
/* the three words the search panel answers for a stored record: a record you
 * hold, one you may only read, and one the database hides, are three presses */
.cf-access{font-weight:600}
tr.cf-hidden td{color:#98a2b6}
tr.cf-hidden a{pointer-events:none;text-decoration:none}
.cf-skipped{margin-top:.4rem}
.cf-skipped th,.cf-skipped td{padding:.1rem .5rem;text-align:left;font-size:.85rem}
/* letting go of a record and handing it over live beside the names, where the
 * question is asked, not in a management section a person has to go looking for */
.cf-holder-acts{margin-top:.4rem;display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.cf-hand{display:inline-flex;gap:.4rem;align-items:center}
.cf-hand label{display:inline-flex;gap:.3rem;align-items:center}
.cf-hand .form-input{max-width:14rem}
/* the notes of a case file: each one says whose it is and how far it is
 * shared, which is the thing a field of the record could never say */
.cf-notesbox{margin:.6rem 0;padding:.4rem .6rem;border:1px solid #d5dbe5;border-radius:6px;background:#fff}
.cf-notesbox h2{font-size:.95rem;margin:0 0 .3rem}
.cf-note{border-top:1px solid #eef1f6;padding:.3rem 0;margin:.2rem 0}
.cf-note:first-child{border-top:0}
.cf-note-head{font-size:.85rem;color:#546079}
.cf-note-body{margin:.2rem 0}
.cf-note-foot{margin-top:.2rem}
.cf-badge-office{background:#dcead8;color:#204829}
.cf-noteForm label{display:block;margin:.2rem 0}
.cf-noteForm .form-input{max-width:36rem}
/* the sentence that says what a field takes, put on the page where a person
 * is about to fill it in rather than left in the schema for them to find */
.cf-note{font-size:.85rem;color:#546079;background:#f4f6fb;border-left:3px solid #b9c4dd;
  padding:.35rem .6rem;margin:.4rem 0}
.cf-note code{background:#e8edf7;padding:0 .2rem;border-radius:3px}
.cf-cron td{vertical-align:top}
.cf-rows{width:100%;border-collapse:collapse}
.cf-rows th{border-bottom:1px solid #d5dbe5;padding:.2rem .4rem;text-align:left;font-size:.85rem}
.cf-rows td{border-bottom:1px solid #dfe4ee;padding:.2rem .4rem;vertical-align:top}
.cf-edit{margin-top:1rem;border-top:1px solid #d5dbe5;padding-top:.5rem}
.cf-edit form{display:inline-block;margin-right:.6rem}
section.cf-search{border:1px solid #d5dbe5;border-radius:6px;padding:.6rem .8rem;margin-bottom:1rem}
section.cf-search form{display:flex;flex-wrap:wrap;gap:.5rem;align-items:flex-end}
section.cf-search label{display:flex;flex-direction:column;font-size:.85rem;color:#546079}
section.cf-search .form-input,section.cf-search .form-select{min-width:11rem}
.cf-results{width:100%;border-collapse:collapse}
.cf-results th{border-bottom:1px solid #d5dbe5;padding:.2rem .4rem;text-align:left;font-size:.85rem}
.cf-results td{border-bottom:1px solid #dfe4ee;padding:.2rem .4rem;vertical-align:top}
.cf-msg{color:#546079;font-style:italic}
.cf-dump{max-height:32rem;overflow:auto;background:#f4f6fb;border:1px solid #d5dbe5;border-radius:6px;padding:.5rem .7rem;white-space:pre-wrap;word-break:break-word;font-size:.75rem;line-height:1.35}
.cf-form{display:flex;flex-wrap:wrap;gap:.5rem;align-items:flex-end;margin-bottom:.6rem}
.cf-form label{display:flex;flex-direction:column;font-size:.85rem;color:#546079}
.cf-form .form-input{min-width:18rem}
.cf-links{margin:.4rem 0 .8rem;padding:.4rem .6rem;border:1px solid #d5dbe5;border-radius:6px}
.cf-links h5{margin:.2rem 0;font-size:.85rem;color:#546079}
.cf-linked{list-style:none;margin:.2rem 0;padding:0}
.cf-linked li{display:flex;align-items:center;gap:.4rem;padding:.1rem 0;font-size:.9rem}
.cf-linked .cf-sch{color:#758094;font-size:.75rem;text-transform:lowercase}
.cf-linked .cf-unlink{margin-left:auto}
.cf-linkForm{display:flex;flex-wrap:wrap;gap:.5rem;align-items:flex-end}
.cf-linkForm label{display:flex;flex-direction:column;font-size:.85rem;color:#546079}
.cf-linkForm .form-select{min-width:12rem}
.cf-attached{list-style:none;margin:.2rem 0;padding:0}
.cf-attached li{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;padding:.1rem 0;font-size:.9rem}
.cf-attached>li>ul{list-style:none;width:100%;margin:.1rem 0;padding-left:1rem}
.cf-attached .cf-sch{color:#758094;font-size:.75rem;text-transform:lowercase}
.cf-attached .cf-detach{margin-left:auto}
.cf-sch-parents,.cf-sch-children{border-radius:3px;padding:0 .3rem;font-weight:700}
.cf-sch-parents{background:#e8ecf7;color:#3b4b7a}
.cf-sch-children{background:#eaf3ec;color:#2f5c3f}
/* charts module */
.lex-chart { position: relative; max-width: 100%; overflow-x: auto; }
/* Once a drawer has drawn, the plain list it stands in is the same data said
 * twice over: it stays in the page for a reader without javascript, and goes
 * quiet for the one who is looking at the bars. */
.lex-chart-drawn > .timeline { display: none; }
.chart-page h1 { margin-bottom: .5rem; }
.chart-manage { margin-top: .5rem; }
.chart-grid .chart-card { display: inline-block; margin: 0 1rem 1rem 0; padding: .75rem; border: 1px solid #ddd; border-radius: 4px; }

/* ---------------------------------------------------- the table builder */

.tbl-tabs { margin-bottom: .75rem; }
.tbl-tab.is-active { background: #2559a8; color: #fff; }
.tbl-panel { border: 1px solid #d7dde5; border-radius: 4px; padding: .75rem; }
.tbl-note { min-height: 1.25rem; margin: .5rem 0; font-weight: 600; }
.tbl-grid th.tbl-corner, .tbl-grid td.tbl-rowhead { background: #f4f7fb; }
.tbl-grid td input, .tbl-grid th input { width: 100%; min-width: 5rem; }
.tbl-grid td.tbl-rowhead { min-width: 12rem; }
.tbl-grid .tbl-label { font-weight: 700; }
.tbl-colhead { display: flex; gap: .5rem; font-weight: 600; margin-top: .5rem; }
.tbl-dyn-col { display: flex; gap: .5rem; align-items: center; }
.tbl-colbtns, .tbl-rowbtns { white-space: nowrap; }
.table-block { overflow-x: auto; margin: .5rem 0 1rem; }
.table-block table th, .table-block table td { border-bottom: 1px solid #e0e6ee; padding: .25rem .5rem; }
.table-block table th { background: #f4f7fb; }
.table-block td.num, .table-block th.num { text-align: right; }
.table-block td.table-rowhead, .table-block th.table-rowhead { background: #f4f7fb; }
.table-block-title { margin-bottom: .25rem; }
.table-cards .table-card { display: inline-block; margin: 0 1rem 1rem 0; padding: .75rem;
  border: 1px solid #ddd; border-radius: 4px; }
.table-cards .table-card small { display: block; color: #80879a; }
.chart-wizard fieldset { margin-bottom: 1rem; border: 1px solid #ccc; border-radius: 4px; padding: .75rem; }
.chart-wizard legend { font-weight: 700; padding: 0 .4rem; }
.chart-wizard label { display: inline-block; margin: .25rem .75rem .25rem 0; min-width: 14rem; }
.chart-wizard label > span { display: block; font-size: .8rem; color: #666; }
.chart-wizard .form-input, .chart-wizard .form-select { width: 100%; max-width: 24rem; }
.tbl-edit { border-collapse: collapse; margin-bottom: .5rem; }
.tbl-edit th, .tbl-edit td { border: 1px solid #ccc; padding: .25rem; vertical-align: top; }
.tbl-edit input, .tbl-edit select { max-width: 10rem; }
.tbl-edit .rmCol, .tbl-edit .rmRow { margin-left: .25rem; }
#chartPreview { margin-top: .5rem; }
#chartPreview .vis-network { outline: none; }
/* admin row: the nav holds a third of the width, the page the other nine, and
   the whole of it when the nav is hidden away; the button that brings it back
   lives in the main menu of the header, never inside the hidden nav */
.admin-grid { display: flex; flex-wrap: wrap; align-items: flex-start; width: 100%; }
.admin-side { width: 25%; min-width: 11rem; padding-right: .6rem; }
.admin-body { width: 75%; }
.admin-side.closed { display: none; }
.admin-side.closed + .admin-body { width: 100%; }
.admin-nav-toggle { padding: 0; height: auto; line-height: 1.2; }
.frow { margin-bottom: .25rem; }
.frow input { margin-right: .25rem; }

/* ---------------- sortable table headers (sort.js) ---------------- */
/* A header cell that sorts reads as a button: it lifts on the hover that asks
   for it, keeps the arrow that says which way its rows run, and never grows
   into a heading that would hide the arrow behind a bigger font. */
th.cf-sort { cursor: pointer; white-space: nowrap; }
th.cf-sort:hover { background: #f4f6fb; color: #1a3c6e; }
th.cf-sort:focus-visible { outline: 2px solid #2559a8; outline-offset: 1px; }
th.cf-sort .cf-sort-mark { margin-left: .35em; font-size: .85em; opacity: .65; }
th.cf-sort[aria-sort="none"] .cf-sort-mark { opacity: .35; }
th.cf-sort[aria-sort="ascending"],
th.cf-sort[aria-sort="descending"] { background: #eaf0fa; color: #1a3c6e; }
th.cf-sort[aria-sort="ascending"] .cf-sort-mark,
th.cf-sort[aria-sort="descending"] .cf-sort-mark { opacity: 1; }

/* ---------------- the report box of a stored interrogation run ----------------
   The four buttons of a query row write their answer above the grid, so the
   portal that answered is read before the rows it wrote settle beside it. */
.qrun-out { margin: .5rem 0 1rem; padding: .6rem .8rem; border: 1px solid #d5dbe5;
    border-radius: 6px; background: #f7f9fd; max-height: 26rem; overflow: auto; }
.qrun-out h3 { margin: 0 0 .3rem; font-size: 1rem; }
.qrun-out p { margin: .2rem 0; }
.qrun-out table { width: 100%; border-collapse: collapse; }
.qrun-out th { border-bottom: 1px solid #d5dbe5; padding: .2rem .4rem;
    text-align: left; font-size: .85rem; }
.qrun-out td { border-bottom: 1px solid #dfe4ee; padding: .2rem .4rem; vertical-align: top; }
.qrun-out ul { margin: .2rem 0; padding-left: 1.2rem; }
.qrun-out code { font-size: .8rem; }
button.qrun:disabled { opacity: .55; cursor: wait; }

/* ---------------- the cron page of the case files module ----------------
   The crontab line is written to be copied whole, so it wraps without breaking
   the page; the actions table carries a form in its last cell, which is why
   the buttons of that cell sit inline rather than on their own line. */
section.cf-croninstall { border: 1px solid #d5dbe5; border-radius: 6px;
    padding: .6rem .8rem; margin-bottom: 1rem; }
p.cf-cronline { margin: .2rem 0; }
p.cf-cronline code { display: block; background: #f4f6fb; border: 1px solid #d5dbe5;
    border-radius: 6px; padding: .5rem .7rem; word-break: break-all;
    font-size: .8rem; line-height: 1.4; }
table.cf-cron { width: 100%; border-collapse: collapse; }
table.cf-cron th { border-bottom: 1px solid #d5dbe5; padding: .2rem .4rem;
    text-align: left; font-size: .85rem; }
table.cf-cron td { border-bottom: 1px solid #dfe4ee; padding: .2rem .4rem;
    vertical-align: middle; }
form.cf-inline { display: inline; margin: 0; }

/* ---------------- the bulk bar over the stored grid ----------------
   The bar carries the count of the ticks beside the verbs it takes, so a
   button never looks like it was taken when nothing stands under it. */
div.cf-bulk { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
    border: 1px solid #d5dbe5; border-radius: 6px; padding: .5rem .7rem;
    margin-bottom: .6rem; background: #f7f9fd; }
div.cf-bulk .cf-bulkcount { font-weight: 600; color: #546079; }
div.cf-bulk p { margin: .2rem 0; width: 100%; }
td.cf-tickcell { text-align: center; width: 1.6rem; }
td.cf-tickcell input, th .cf-all { margin: 0; }
.text-error { color: #b3372f; }

/* ---------- tasks: the board, the tree, the workload, the detail ----------
   One family for the three views of the tasks page and the card of a single
   task: a row that carries a bar of progress, a designee, an estimate. */
.tasks-app{position:relative}
.tasks-bar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.6rem}
.tasks-bar .tasks-count{font-weight:600;color:#546079}
.tasks-app form.tasks-new{display:flex;flex-wrap:wrap;gap:.4rem;margin:.5rem 0;
    padding:.5rem;border:1px solid #d5dbe5;border-radius:6px;background:#f7f9fd}
.tasks-app form.tasks-new label{display:flex;flex-direction:column;gap:.2rem;min-width:8rem}
.tasks-app form.tasks-new label>span{font-size:.8rem;color:#546079}
.tasks-app form.tasks-new input,.tasks-app form.tasks-new select{width:100%;box-sizing:border-box}
.task-cols{display:flex;flex-wrap:wrap;gap:.6rem;align-items:flex-start}
.task-col{flex:1 1 10rem;min-width:9rem;border:1px solid #d5dbe5;border-radius:6px;
    background:#fbfcfe;padding:.4rem}
.task-col>h3{margin:.1rem .2rem .4rem;font-size:.85rem;text-transform:capitalize}
.task-col>h3 .n{color:#8a94a8;font-weight:400}
.task-row{border-left:4px solid #2fae60;border-radius:4px;background:#fff;
    padding:.3rem .4rem;margin:0 0 .3rem;box-shadow:0 1px 1px rgba(0,0,0,.05)}
.task-row.summary{background:#f2f5fb;border-left-color:#64748d}
.task-row .t-top{display:flex;flex-wrap:wrap;gap:.35rem;align-items:baseline}
.task-row .t-title{font-weight:600}
.task-row .t-sum{font-size:.78rem;color:#546079}
.task-row .t-meta{font-size:.78rem;color:#546079;margin-top:.15rem}
.task-row .t-bar{height:4px;background:#e3e8f2;border-radius:2px;margin-top:.25rem}
.task-row .t-bar i{display:block;height:4px;background:#2fae60;border-radius:2px}
.task-row .t-ctl{display:flex;flex-wrap:wrap;gap:.25rem;margin-top:.3rem}
.task-row .t-ctl button{font-size:.75rem;padding:.1rem .35rem}
.task-row .t-ctl .mv{min-width:2rem}
.task-row.lvl1{margin-left:1rem}.task-row.lvl2{margin-left:2rem}
.task-row.lvl3{margin-left:3rem}.task-row.lvl4{margin-left:4rem}
/* the tree: nested lists, the way the row lists of the builders are, with a
   handle on the row that drags it */
ul.tree-list{list-style:none;margin:0;padding:0}
li.tree-node{position:relative;margin:0 0 .3rem}
li.tree-node>.t-handle{display:inline-block;cursor:grab;color:#8a94a8;
    font-size:1rem;line-height:1;padding:0 .35rem 0 0;user-select:none}
li.tree-node>.t-handle:active{cursor:grabbing}
ul.tree-list ul.tree-list{margin-left:1rem;padding-left:.6rem;
    border-left:1px solid #e3e8f2}
.mjs-nestedSortable-error{background:#fbe3e4;border:1px solid #e09090}
.mjs-nestedSortable-branch>ul.tree-list{display:block}
.mjs-nestedSortable-collapsed>ul.tree-list{display:none}
.task-held{color:#b3372f}
.task-empty{color:#8a94a8;padding:.4rem}
.task-warn{color:#b3372f;font-weight:600}
/* the workload: one row per designee, the capacity read beside the plan */
table.task-work{width:100%;border-collapse:collapse}
table.task-work th{border-bottom:1px solid #d5dbe5;text-align:left;padding:.2rem .4rem;font-size:.85rem}
table.task-work td{border-bottom:1px solid #dfe4ee;padding:.2rem .4rem;vertical-align:top}
/* the plan a project borrows from the module that keeps it: the phases and
   their numbers, the milestones the plan is measured by, the capacity of the
   hands the work was given to. */
section.pplan{margin:1rem 0;border:1px solid #d5dbe5;border-radius:6px;padding:.6rem .8rem;
    background:#fbfcfe}
section.pplan>h2{margin:0 0 .4rem;font-size:1.05rem}
.pplan-sum{margin:.2rem 0 .5rem;font-size:.9rem;color:#546079}
.pplan-bar{display:inline-block;width:6rem;height:6px;background:#e3e8f2;border-radius:3px;
    vertical-align:middle}
.pplan-bar i{display:block;height:100%;background:#2fae60;border-radius:3px}
.pplan-tree .task-row{background:#fff}
.pplan-mile{list-style:none;margin:.4rem 0;padding:0}
.pplan-mile li{padding:.1rem 0;font-size:.9rem}
.pplan-mile li.done{color:#8a94a8;text-decoration:line-through}
.pplan-links{margin:.5rem 0 0}
/* the subtasks of a task, and the verbs beside them */
section.task-kids{margin-top:.6rem}
section.task-kids .task-row{background:#fff}
section.task-actions{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.8rem}
/* the detail page */
main.task-detail dl.task-fields{display:grid;grid-template-columns:8rem 1fr;gap:.1rem .6rem}
main.task-detail dl.task-fields dt{color:#546079;font-size:.85rem}
main.task-detail dl.task-fields dd{margin:0}
main.task-detail .task-desc{margin:.5rem 0}
main.task-detail .task-roll{margin:.4rem 0;font-size:.9rem}
section.task-deps{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:.6rem}
section.task-deps>div{flex:1 1 16rem;border:1px solid #d5dbe5;border-radius:6px;padding:.4rem .6rem}
section.task-deps h3{margin:.1rem 0 .3rem;font-size:.9rem}
section.task-deps ul{list-style:none;margin:0;padding:0}
section.task-deps li{display:flex;flex-wrap:wrap;gap:.3rem;align-items:center;padding:.15rem 0}
section.task-deps li button{font-size:.75rem;padding:.1rem .3rem}
form.task-newchild{display:flex;flex-wrap:wrap;gap:.4rem;align-items:flex-end;margin-top:.5rem}
form.task-newchild label{display:flex;flex-direction:column;gap:.2rem}
form.task-newchild label>span{font-size:.8rem;color:#546079}
/* the dialog the board opens for a new or an edited task */
/* the task dialog wears the shared Spectre shell now (.modal above); only
   its field styles remain here */
.task-dialog form .t-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem .6rem}
.task-dialog form .t-grid label{display:flex;flex-direction:column;gap:.2rem}
.task-dialog form .t-grid label>span{font-size:.8rem;color:#546079}
.task-dialog form .t-grid label.wide{grid-column:1 / -1}
.task-dialog form .t-grid input,.task-dialog form .t-grid select,
.task-dialog form .t-grid textarea{width:100%;box-sizing:border-box}
.task-dialog form .t-act{display:flex;gap:.4rem;margin-top:.6rem}
@media (max-width:560px){.task-dialog form .t-grid{grid-template-columns:1fr}}
/* the search item form: the criteria, the searchable selects, the answer */
.search-form{border:1px solid #d5dbe5;border-radius:6px;padding:.6rem .8rem;margin-bottom:1rem}
.search-form .search-criteria{display:flex;flex-wrap:wrap;gap:.4rem .8rem}
.search-form .search-crit{display:flex;flex-direction:column;gap:.2rem;flex:1 1 14rem;position:relative}
.search-form .search-crit>label{font-size:.85rem;color:#546079}
.search-form .search-crit input[type=date]{flex:1 1 8rem;min-width:0}
.search-form .search-multi-filter{margin-bottom:.15rem}
.search-form .search-multi-select{max-height:9rem;overflow-y:auto}
.search-form .search-multi-select option[hidden]{display:none}
.search-form .search-multi-count{font-size:.75rem;color:#546079}
.search-form .search-buttons{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin-top:.4rem}
.search-form .search-attach{display:flex;flex-wrap:wrap;gap:.3rem;align-items:center}
.search-form .search-attach select{max-width:8rem}
.search-form .search-note{font-size:.85rem;color:#546079;margin:.3rem 0}
.search-table td,.search-table th{vertical-align:middle}
/* a row the box that opened the pick already holds: seen, greyed, not picked twice */
.search-table tr.search-held td{color:#828c9e;background:#f4f6fb}
.search-table tr.search-held .search-check{opacity:.4}
.search-modal{position:fixed;inset:0;z-index:900;background:rgba(15,23,42,.55);
    display:flex;align-items:center;justify-content:center;padding:1rem}
.search-modal form{background:#fff;border-radius:8px;padding:1rem;max-width:min(94vw,34rem);width:100%}
.search-modal form .search-modal-act{display:flex;gap:.4rem;margin-top:.6rem}

/* ---------- versions and diff (themes/base/js/diff.js, core/Diff.php) ---------- */
/* the two windows: as wide as the screen lets, because two versions of a case
 * file side by side need the room of two pages, not of one */
.lex-diff-modal .modal-container.lex-diff-box{max-width:min(98vw,1400px);width:100%}
.lex-diff-box .modal-body{max-height:78vh;display:flex;flex-direction:column;gap:.4rem}
.lex-diff-bar{display:flex;flex-wrap:wrap;gap:.6rem;align-items:flex-end}
.lex-diff-bar label{display:flex;flex-direction:column;font-size:.78rem;color:#546079}
.lex-diff-bar .form-select{min-width:12rem;font-size:.8rem}
.lex-diff-sum{font-size:.8rem;color:#546079;margin-left:auto}
.lex-diff{border:1px solid #d5dbe5;border-radius:6px;overflow:auto;background:#fff}
/* the two column headers, standing over the two windows */
.lex-diff-head{display:grid;grid-template-columns:1fr 1fr;gap:0;position:sticky;top:0;
 background:#eef2f8;border-bottom:1px solid #d5dbe5;font-size:.78rem;color:#546079}
.lex-diff-head span{padding:.25rem .5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.lex-diff-row{display:grid;grid-template-columns:1fr 1fr;gap:0;border-bottom:1px solid #f0f3f8}
.lex-diff-pane{padding:.15rem .5rem;font-size:.8rem;overflow:hidden}
.lex-diff-pane .lex-diff-label{display:block;font-size:.72rem;color:#758094;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lex-diff-pane .lex-diff-value{display:block;white-space:pre-wrap;word-break:break-word}
/* the empty half of a row keeps the shape of the grid without pretending to say something */
.lex-diff-insert .lex-diff-left,.lex-diff-delete .lex-diff-right{background:#f6f7fa}
.lex-diff-delete .lex-diff-left{background:#fdecea}
.lex-diff-delete .lex-diff-left .lex-diff-value{color:#8e2b23}
.lex-diff-insert .lex-diff-right{background:#eafaef}
.lex-diff-insert .lex-diff-right .lex-diff-value{color:#1b6b3a}
/* a replaced line: both halves coloured, the words that moved marked inside */
.lex-diff-replace .lex-diff-left{background:#fdecea}
.lex-diff-replace .lex-diff-right{background:#eafaef}
.lex-diff-value ins{background:#b7e4c7;text-decoration:none;padding:0 1px}
.lex-diff-value del{background:#f7c8c0;text-decoration:line-through;padding:0 1px}
.lex-diff-row.lex-diff-equal:hover .lex-diff-pane{background:#f9fbfd}

/* ------------------------------------------------------------------ page designer */

/* the switch between the two ways of looking at a page, and the line that says
 * what the way you are in lets you do */
.muted{font-size:.78rem;color:#546079}
.designer-bar{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;margin:0 0 .4rem}
/* the slot groups of a page in the designer: one column per slot, a card that
 * is dropped into one of them renders into it afterwards */
.designer fieldset{position:relative}
.bslot{display:inline-block;vertical-align:top;min-width:14rem;max-width:31rem;
 margin:.2rem .5rem .2rem 0;padding:.3rem .4rem;border:1px dashed #ccd3e0;border-radius:6px}
.bslot-head{display:block;font-size:.74rem;font-weight:600;color:#546079;margin-bottom:.25rem}
/* the group a card is being dragged over: the place it will land is not a
 * fact a person should have to guess from where the mouse happens to be */
.bslot:hover{border-color:#2559a8;background:#f7faff}
/* the slot select of a card is kept for the payload and hidden from the eye:
 * in the grouped view the group says the slot, and two words for one fact is
 * one word too many */
.bcard>.slot{display:none}

/* a placement of a page, drawn as something you can tell apart: the kind, the
 * words it answers to, and what it will put on the page */
.bcard{background:#fff;border:1px solid #ccd3e0;border-radius:6px;padding:.4rem .5rem;
 gap:.45rem;align-items:flex-start;flex-wrap:wrap}
.bcard:hover{border-color:#8fa3c4}
.bcard .bcard-icon{flex:0 0 1.2rem;text-align:center;color:#2559a8;font-size:1rem;line-height:1.5}
.bcard .bcard-main{flex:1 1 12rem;display:flex;flex-direction:column;min-width:0}
.bcard .blab{background:none;border:0;padding:0;font-weight:600;color:#1d2a44;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bcard .bcard-kind,.bcard .bcard-sum{font-size:.74rem;color:#6b7689;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bcard .slot{flex:0 0 auto;font-size:.75rem;max-width:6.5rem}
.bcard .bcard-edit,.bcard .dup,.bcard .rm{flex:0 0 auto}
/* the editor of a block opens under the card it belongs to, full width of it */
.bcard .bcard-body{flex:1 0 100%;margin-top:.4rem;padding-top:.4rem;border-top:1px dashed #ccd3e0}
/* the drawing of the block, as the page will show it: a frame of its own, so
 * it is never mistaken for a part of the editor standing around it */
.bcard .bcard-preview-box{flex:1 0 100%;margin-top:.4rem;padding-top:.4rem;
 border-top:1px dashed #ccd3e0}
.bcard-preview-cap{font-size:.72rem;color:#758094;margin:0 0 .2rem}
.bcard-preview-page{background:#fff;border:1px solid #d5dbe5;border-radius:4px;
 padding:.4rem .5rem;font-size:.82rem;overflow:auto;max-height:18rem}
.bcard-preview-page h1,.bcard-preview-page h2,.bcard-preview-page h3,
.bcard-preview-page h4,.bcard-preview-page h5,.bcard-preview-page h6{margin:.2rem 0 .3rem}
.bcard-preview-page img{max-width:100%}
.bcard .bcard-body label{display:flex;flex-direction:column;gap:.15rem;margin:0 0 .4rem}
/* the palette: the kinds a page may be built from, filed under what they are for */
.bpalette{display:flex;flex-wrap:wrap;gap:.3rem .5rem;align-items:center;margin-top:.5rem;
 padding:.4rem .5rem;background:#f6f8fb;border:1px dashed #ccd3e0;border-radius:6px}
.bpalette-head{font-size:.78rem;font-weight:600;color:#546079}
.bpalette-group{display:inline-flex;flex-wrap:wrap;gap:.3rem;align-items:center;margin-right:.5rem}
.bpalette-item{font-size:.75rem;padding:.1rem .4rem;border:1px solid #ccd3e0;background:#fff;
 border-radius:4px;cursor:pointer}
.bpalette-item:hover{border-color:#2559a8;color:#2559a8}

/* --------------------------------------------------------------- documents */
/* The page of one paper (modules/docs): the fields as they read on the paper,
 * and a date that has gone by said in the colour a reader notices without
 * having to think about it. */
.doc h1 .kind { font-weight: 400; color: #758094; }
.doc .doc-fields { max-width: 38rem; }
.doc .doc-fields th:first-child { width: 11rem; color: #546079; font-weight: 600; }
.doc-files { margin: .2rem 0 .8rem; padding-left: 1.2rem; }
.past { color: #b5202a; font-weight: 600; }
.docs-list .toolbar { display: flex; gap: .4rem; align-items: center; margin: .4rem 0 .8rem; }
.docs-list .toolbar input { flex: 1 1 auto; max-width: 18rem; }
