/* ==========================================================================
   Labor Intelligence Works — case workspace
   Composition, proportions and density follow the approved reference
   (docs/design/dashboard_overview_for_grievance_response.png.pdf). Colour and
   type come from liw-brand.css, which is the brand token layer.
   ========================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--liw-body-font);
  color: var(--liw-charcoal);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.ws { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }

/* ---------------------------------------------------------------- sidebar */
.ws-side {
  background: var(--liw-navy);
  background-image: linear-gradient(180deg, #0A1E3D 0%, #0A1E3D 62%, #0C2549 100%);
  color: #fff; display: flex; flex-direction: column; position: sticky; top: 0;
  height: 100vh;
}
.ws-brand { padding: 30px 24px 22px; }
.ws-brand-row { display: flex; align-items: center; gap: 13px; }
/* No plate, no card, no padding box: the mark sits directly on the navy. */
.ws-brand-row img { width: 68px; height: 68px; display: block; flex: none;
  object-fit: contain; }
.ws-brand-name {
  font-family: var(--liw-heading-font); font-weight: 700; font-size: 24px;
  line-height: 1.1; color: #fff; letter-spacing: -.015em;
}
.ws-brand-tag {
  margin-top: 14px; font-size: 13px; line-height: 1.4; color: #8FA8C8;
  max-width: 210px;
}
.ws-nav { padding: 6px 12px; flex: 1; overflow-y: auto; }
.ws-nav a {
  display: flex; align-items: center; gap: 13px; padding: 11px 13px; margin: 2px 0;
  border-radius: 7px; color: #D6E1F0; text-decoration: none; font-size: 14px;
}
.ws-nav a svg { width: 18px; height: 18px; flex: none; opacity: .92; }
.ws-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.ws-nav a.on {
  background: linear-gradient(90deg, rgba(30,79,174,.55), rgba(30,79,174,.28));
  color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--liw-light-blue);
}
.ws-util { padding: 10px 12px 22px; border-top: 1px solid rgba(255,255,255,.10); }
.ws-util a { display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  color: #B9CBE4; text-decoration: none; font-size: 13.5px; border-radius: 7px; }
.ws-util a:hover { background: rgba(255,255,255,.06); color: #fff; }
.ws-util a svg { width: 17px; height: 17px; opacity: .9; }

/* ----------------------------------------------------------------- header */
.ws-main { min-width: 0; display: flex; flex-direction: column; }
/* Sidebar links jump to these three sections. Without the offset a card lands
   flush against the viewport edge and reads as "nothing happened"; the brief
   ring confirms which section the click actually reached. */
#chronology, #work-products, #exports { scroll-margin-top: 18px; }
#chronology:target, #work-products:target, #exports:target {
  box-shadow: 0 0 0 2px var(--liw-light-blue); }
.ws-head { padding: 20px 28px 0; }
.ws-head-row { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.ws-title {
  font-family: var(--liw-heading-font); font-size: 27px; font-weight: 700;
  color: var(--liw-navy); margin: 0; letter-spacing: -.015em;
}
.ws-sub { margin-top: 5px; font-size: 12.5px; color: var(--liw-muted); }
.ws-spacer { flex: 1 1 60px; }
.ws-search {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--liw-border);
  border-radius: 9px; padding: 8px 12px; min-width: 260px; color: var(--liw-muted);
}
.ws-search input { border: 0; outline: 0; font: inherit; font-size: 13.5px; width: 100%;
  background: transparent; color: var(--liw-charcoal); }
.ws-who { display: flex; align-items: center; gap: 10px; }
.ws-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--liw-sky);
  color: var(--liw-navy); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13.5px; font-family: var(--liw-heading-font);
}
.ws-who b { display: block; font-size: 14px; color: var(--liw-navy);
  font-family: var(--liw-heading-font); }
.ws-who span { font-size: 11.5px; color: var(--liw-muted); }
.ws-powered { text-align: right; margin-top: 6px; font-size: 12px; color: var(--liw-muted); }
.ws-powered b { color: var(--liw-royal); font-family: var(--liw-heading-font); }

/* ------------------------------------------------------------------ grids */
.ws-body { padding: 16px 28px 26px; display: grid; gap: 18px; }
.ws-row1 { display: grid; grid-template-columns: 1.28fr 1.04fr .84fr 1.08fr; gap: 18px; }
.ws-row2 { display: grid; grid-template-columns: minmax(0,1fr) 326px; gap: 18px;
  align-items: start; }
.ws-col { display: grid; gap: 18px; align-content: start; }

/* ------------------------------------------------------------------ cards */
.card {
  background: #fff; border: 1px solid #E4E9F2; border-radius: 11px; padding: 16px 18px;
  display: flex; flex-direction: column;
}
.card-h { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.card-h h3 {
  margin: 0; font-family: var(--liw-heading-font); font-size: 12.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--liw-navy);
}
.card-h .ico {
  width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center;
  justify-content: center; background: var(--liw-royal); color: #fff; flex: none;
}
.card-h .ico.plain { background: transparent; color: var(--liw-royal); width: auto; }
.card-h .grow { flex: 1; }
.card-foot { margin-top: auto; padding-top: 10px; }
.card-link {
  color: var(--liw-royal); text-decoration: none; font-size: 13px; font-weight: 600;
}
.card-link:hover { text-decoration: underline; }

/* ---- case overview ---- */
.ov { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 16px; }
.ov .k { font-size: 11px; color: var(--liw-muted); margin-bottom: 2px; }
.ov .v { font-size: 13.5px; font-weight: 700; color: var(--liw-navy);
  font-family: var(--liw-heading-font); line-height: 1.28; }

/* ---- pills ---- */
.pill {
  display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px;
  font-weight: 600; background: #DCF5E6; color: #12734A;
}
.pill.blue { background: var(--liw-sky); color: var(--liw-royal); }
.pill.grey { background: #EEF1F6; color: var(--liw-muted); }

/* ---- case process ---- */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 9px; padding: 3px 0;
  font-size: 13px; color: var(--liw-navy); }
.steps li .dot { width: 15px; height: 15px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center; }
.steps li.done .dot { background: #1BA55B; color: #fff; }
.steps li.now .dot { background: var(--liw-royal); }
.steps li.todo .dot { background: #D5DCE6; }
.steps li.todo { color: #9AA6B6; }
.steps li.now { color: var(--liw-royal); font-weight: 600; }
.steps li .when { margin-left: auto; font-size: 12px; color: var(--liw-muted);
  font-weight: 400; }

/* ---- review status ---- */
.rs-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rs-top .tick { width: 30px; height: 30px; border-radius: 50%; background: #1BA55B;
  color: #fff; display: flex; align-items: center; justify-content: center; }
.rs-top b { font-family: var(--liw-heading-font); font-size: 16px; color: var(--liw-navy); }
.rs-line { font-size: 12.5px; color: var(--liw-charcoal); padding: 2px 0; }
.rs-track { display: flex; align-items: center; gap: 0; margin: 12px 0 2px; }
.rs-track i { flex: 1; height: 2px; background: #1BA55B; }
.rs-track b { width: 11px; height: 11px; border-radius: 50%; background: #1BA55B;
  flex: none; }

/* ---- needs attention ---- */
.att { list-style: none; margin: 0; padding: 0; }
.att li { display: flex; gap: 9px; padding: 6px 0; font-size: 12.5px; align-items: flex-start; }
.att li em { width: 7px; height: 7px; border-radius: 50%; background: #F09330;
  margin-top: 6px; flex: none; }
.att li .due { margin-left: auto; font-size: 11.5px; color: var(--liw-muted);
  white-space: nowrap; padding-left: 10px; }

/* ---- next actions ---- */
.acts { list-style: none; margin: 0; padding: 0; }
.acts li { display: flex; gap: 10px; padding: 5px 0; font-size: 13px; align-items: flex-start; }
.acts li svg { width: 17px; height: 17px; flex: none; color: var(--liw-royal); }

/* ---- chronology ---- */
.chron-tools { display: flex; gap: 8px; align-items: center; }
.btn-s {
  border: 1px solid var(--liw-border); background: #fff; border-radius: 8px;
  padding: 6px 11px; font: inherit; font-size: 12.5px; color: var(--liw-navy);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.btn-s:hover { border-color: var(--liw-light-blue); }
.btn-s[disabled] { opacity: .5; cursor: not-allowed; }
.ev { display: grid; grid-template-columns: 78px 24px minmax(0,1fr) 236px 54px;
  gap: 0 10px; padding: 10px 0; border-top: 1px solid #EEF1F6; align-items: start; }
.ev:first-of-type { border-top: 0; }
.ev .d { font-size: 12.5px; font-weight: 700; color: var(--liw-navy); line-height: 1.28;
  font-family: var(--liw-heading-font); }
.ev .rail { position: relative; height: 100%; display: flex; justify-content: center; }
.ev .rail:before { content: ""; position: absolute; top: -13px; bottom: -13px; width: 2px;
  background: #E4E9F2; }
.ev:first-of-type .rail:before { top: 8px; }
.ev:last-of-type .rail:before { bottom: calc(100% - 8px); }
.ev .rail i { width: 9px; height: 9px; border-radius: 3px; background: var(--liw-royal);
  margin-top: 4px; position: relative; }
.ev .t { font-size: 14px; font-weight: 700; color: var(--liw-navy);
  font-family: var(--liw-heading-font); }
.ev .x { font-size: 12px; color: var(--liw-muted); margin-top: 2px; line-height: 1.4; }
.ev .meta { font-size: 11.5px; color: var(--liw-muted); }
.ev .meta .src { display: block; margin-top: 4px; }
.ev .ctl { display: flex; gap: 6px; justify-content: flex-end; color: #9AA6B6; }
.ev .ctl button { border: 0; background: none; cursor: pointer; color: inherit; padding: 2px; }
.ev.hidden-row { opacity: .45; }

/* ---- work products ---- */
.wp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.wp {
  border: 1px solid #E4E9F2; border-radius: 10px; padding: 12px 11px; background: #fff;
  display: flex; flex-direction: column; gap: 8px; min-height: 116px;
}
.wp .top { display: flex; align-items: flex-start; justify-content: space-between; }
.wp .em { width: 26px; height: 26px; border-radius: 7px; display: flex;
  align-items: center; justify-content: center; color: #fff; }
.wp .nm { font-size: 12.5px; font-weight: 700; color: var(--liw-navy); line-height: 1.22;
  font-family: var(--liw-heading-font); }
.wp .go { margin-top: auto; }

/* ---- export center ---- */
.exp-row {
  display: flex; align-items: center; gap: 11px; border: 1px solid #E4E9F2;
  border-radius: 10px; padding: 11px 12px; margin-bottom: 9px; cursor: pointer;
  background: #fff; width: 100%; text-align: left; font: inherit;
}
.exp-row:hover { border-color: var(--liw-light-blue); }
.exp-row .em { width: 34px; height: 34px; border-radius: 8px; background: var(--liw-sky);
  color: var(--liw-royal); display: flex; align-items: center; justify-content: center; }
.exp-row b { display: block; font-size: 13.5px; color: var(--liw-navy);
  font-family: var(--liw-heading-font); }
.exp-row span { font-size: 12px; color: var(--liw-muted); }
.exp-row .chev { margin-left: auto; color: #9AA6B6; }

/* ---- disclosure + footer ---- */
.ws-disc { border: 1px solid #E4E9F2; border-radius: 11px; padding: 14px 20px; }
.ws-disc > summary { cursor: pointer; font-family: var(--liw-heading-font);
  font-weight: 700; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--liw-navy); }
.ws-disc p { color: var(--liw-muted); font-size: 13px; }
.ws-foot { border-top: 1px solid #EEF1F6; padding: 18px 30px 26px; display: flex;
  justify-content: center; gap: 22px; flex-wrap: wrap; font-size: 12.5px;
  color: var(--liw-muted); }
.ws-foot a { color: var(--liw-muted); text-decoration: none; }
.ws-foot a:hover { color: var(--liw-royal); }

/* ---- notice ---- */
.notice { border: 1px solid #F0D48A; background: #FFF7E6; color: #7A5B00;
  border-radius: 9px; padding: 10px 14px; font-size: 12.5px; }

/* ---- focus ---- */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--liw-light-blue); outline-offset: 2px; border-radius: 6px;
}

/* ---- nothing runs off the right edge ------------------------------------
   A grid item defaults to min-width:auto, so one wide descendant - a long
   product name, a row of buttons - can push the whole column past the
   viewport. These let the columns shrink and the text wrap instead.        */
.ws-row1, .ws-row2, .ws-col, .card, .wp, .wp-grid { min-width: 0; }
.card > *, .wp > * { min-width: 0; }
.chron-tools, .card-h { flex-wrap: wrap; }
.wp .nm, .ev .t, .ev .x, .ev .meta, .exp-row b { overflow-wrap: break-word; }
.ws-sub, .card-h h3 { overflow-wrap: anywhere; }
.ev > * { min-width: 0; }

/* -------------------------------------------------------------- responsive
   Three tiers, and the boundaries are the point:

     desktop   >= 1100px   the approved composition, unchanged
     tablet     720-1099   narrower sidebar, still fixed and still on the left
     mobile     <  720px   sidebar becomes a top banner behind the hamburger

   The middle tier exists because a docked DevTools panel routinely leaves a
   desktop browser somewhere in the 800-1100 band. Collapsing to the banner
   there made a desktop machine look like a phone. Below 1100 the layout gets
   narrower; it does not change character until the viewport is genuinely
   phone-sized.
                                                                            */

/* ---- desktop: the composition holds all the way down to 1100 ------------ */
@media (min-width: 1100px) {
  /* The header is one row. It shrinks the search rather than wrapping it,
     which is what used to push the analyst identity onto a line of its own. */
  .ws-head-row { flex-wrap: nowrap; align-items: center; }
  .ws-search { min-width: 0; flex: 0 1 260px; }
  .ws-who { flex: none; }
  .ws-title-wrap { min-width: 0; }
}
/* The four cards stay four cards. Below 1280 the sidebar and the gaps give
   back the width instead of the row breaking in half. */
@media (min-width: 1100px) and (max-width: 1339px) {
  .ws { grid-template-columns: 236px 1fr; }
  .ws-brand { padding: 26px 18px 18px; }
  .ws-brand-row img { width: 56px; height: 56px; }
  .ws-brand-name { font-size: 21px; }
  .ws-brand-tag { font-size: 12px; max-width: 190px; }
  .ws-row1 { gap: 13px; }
  .ws-row2 { grid-template-columns: minmax(0,1fr) 292px; gap: 14px; }
  .ws-head, .ws-body, .ws-foot { padding-left: 20px; padding-right: 20px; }
  .card { padding: 14px 14px; }
  .ws-search { flex: 0 1 200px; }
  /* Seven product tiles across a ~500px column give each one 57px, which is
     narrower than the tile's own icon and padding. Four fit; seven clip. */
  .wp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ev { grid-template-columns: 74px 22px minmax(0,1fr) 150px 44px; }
  /* At 1100 the title had 324px and needed about 420, so it broke in two and
     dropped its status pill onto a second line. The spacer and the search give
     that width back; the title itself comes down four points to meet them. */
  .ws-title { font-size: 23px; }
  .ws-spacer { flex: 1 1 0; }
  .ws-search { flex: 0 1 180px; }
}
@media (min-width: 1340px) and (max-width: 1499px) {
  .ws-row2 { grid-template-columns: minmax(0,1fr) 300px; }
  .ev { grid-template-columns: 78px 24px minmax(0,1fr) 190px 54px; }
}

/* ---- tablet: narrower, but still a desktop composition ------------------ */
@media (max-width: 1099.98px) {
  .ws { grid-template-columns: 212px 1fr; }
  .ws-brand { padding: 24px 16px 16px; }
  .ws-brand-row img { width: 48px; height: 48px; }
  .ws-brand-name { font-size: 19px; }
  .ws-brand-tag { font-size: 11.5px; max-width: 170px; }
  .ws-nav a { font-size: 13px; padding: 9px 11px; gap: 10px; }
  .ws-util a { font-size: 12.5px; }
  .ws-row1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-row2 { grid-template-columns: minmax(0, 1fr); }
  .wp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-head, .ws-body, .ws-foot { padding-left: 20px; padding-right: 20px; }
  .ws-title { font-size: 23px; }
  .ws-search { min-width: 0; flex: 1 1 180px; }
  .ev { grid-template-columns: 78px 22px minmax(0,1fr) 44px; }
  .ev .meta { grid-column: 3 / 4; margin-top: 6px; }
}

/* ---- mobile: one column, sidebar folds into the banner ------------------ */
@media (max-width: 719.98px) {
  .ws { grid-template-columns: 1fr; }
  .ws-side { position: static; height: auto; }
  .ws-nav, .ws-util { display: none; }
  .ws-side.open .ws-nav, .ws-side.open .ws-util { display: block; }
  .ws-row1 { grid-template-columns: 1fr; }
  .wp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-head, .ws-body, .ws-foot { padding-left: 18px; padding-right: 18px; }
  .ws-title { font-size: 21px; }
  .ev { grid-template-columns: 70px 18px minmax(0,1fr); }
  .ev .ctl { grid-column: 3; justify-content: flex-start; margin-top: 6px; }
  .ws-search { min-width: 0; flex: 1 1 100%; }
}
/* The hamburger belongs to the banner. It must never appear beside a sidebar. */
.ws-burger { display: none; }
@media (max-width: 719.98px) {
  .ws-burger { display: inline-flex; margin-left: auto; background: none; border: 0;
    color: #fff; cursor: pointer; padding: 6px; }
  .ws-brand { display: flex; align-items: flex-start; }
}

/* ---- narrow phones: one column everywhere, nothing runs off the screen --- */
@media (max-width: 640px) {
  .ov { grid-template-columns: 1fr; }
  .ws-head-row { gap: 12px; }
  .ws-search { width: 100%; min-width: 0; order: 3; }
  .ws-who { order: 4; }
  .ws-powered { text-align: left; padding-left: 18px; }
  .rs-track { flex-wrap: wrap; gap: 6px; }
  .rs-track i { min-width: 12px; }
  .ev { grid-template-columns: 64px 16px minmax(0, 1fr); gap: 0 8px; }
  .ev .meta { grid-column: 3; margin-top: 6px; }
  .wp-grid { grid-template-columns: 1fr; }
  .card { padding: 15px 16px; }
  .ws-title { font-size: 19px; }
}

/* ---- analyst editing: modal, menu, toast, inline controls --------------- */
.liw-modal { position: fixed; inset: 0; background: rgba(10,30,61,.55); z-index: 60;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; }
.liw-modal-card { background: #fff; border-radius: 12px; width: min(760px, 100%);
  max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(10,30,61,.32); }
.liw-modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--liw-border); }
.liw-modal-h h3 { margin: 0; font-size: 16px; font-family: var(--liw-heading-font);
  color: var(--liw-navy); flex: 1; }
.liw-modal-b { padding: 18px 20px; overflow-y: auto; }
.liw-modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px;
  border-top: 1px solid var(--liw-border); flex-wrap: wrap; }
.btn-s.primary { background: var(--liw-royal); border-color: var(--liw-royal); color: #fff; }
.liw-f { display: block; margin-bottom: 13px; font-size: 13px; }
.liw-f > span { display: block; color: var(--liw-muted); margin-bottom: 4px; }
.liw-f.row { display: flex; align-items: center; gap: 8px; }
.liw-f.row > span { margin: 0; color: var(--liw-charcoal); }
.liw-f input[type=text], .liw-f input[type=date], .liw-f select, .liw-f textarea {
  width: 100%; border: 1px solid var(--liw-border); border-radius: 8px; padding: 8px 10px;
  font: inherit; font-size: 13.5px; }
.liw-editor { width: 100%; min-height: 46vh; border: 1px solid var(--liw-border);
  border-radius: 8px; padding: 14px; font: inherit; font-size: 14px; line-height: 1.6; }
.liw-editor-meta { font-size: 12px; color: var(--liw-muted); margin-bottom: 10px; }
.liw-doc-view { max-height: 56vh; overflow-y: auto; }
.liw-hist { width: 100%; border-collapse: collapse; font-size: 13px; }
.liw-hist th { text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--liw-muted); padding: 6px 8px;
  border-bottom: 1px solid var(--liw-border); }
.liw-hist td { padding: 7px 8px; border-bottom: 1px solid #EEF1F6; }
.liw-menu { position: absolute; z-index: 70; background: #fff; border: 1px solid var(--liw-border);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(10,30,61,.18); padding: 5px; width: 212px; }
.liw-menu button { display: block; width: 100%; text-align: left; border: 0; background: none;
  font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 7px; cursor: pointer;
  color: var(--liw-charcoal); }
.liw-menu button:hover { background: var(--liw-sky); color: var(--liw-navy); }
.liw-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 26px;
  background: var(--liw-navy); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; z-index: 80; box-shadow: 0 10px 28px rgba(10,30,61,.3); }
.liw-toast.bad { background: #8A2A2A; }
.step-btn, .item-btn { border: 0; background: none; font: inherit; text-align: left;
  padding: 0; cursor: pointer; color: inherit; }
.step-btn:hover, .item-btn:hover { text-decoration: underline; }
.item-btn.done { text-decoration: line-through; color: var(--liw-muted); }
.who-mini { font-size: 11px; color: var(--liw-muted); margin-left: 6px; }
.att li input[type=checkbox], .acts li input[type=checkbox] { margin-top: 2px; flex: none; }

/* ---- controls drawn to the reference, not to the browser default -------- */
.att li em { width: 7px; height: 7px; border-radius: 50%; background: #F09330;
  margin-top: 6px; flex: none; }
.att li em.done { background: #1BA55B; }
.acts .tick-btn {
  width: 18px; height: 18px; border-radius: 50%; border: 0; flex: none; margin-top: 1px;
  background: #C9D4E4; color: #fff; cursor: pointer; display: flex;
  align-items: center; justify-content: center; padding: 0;
}
.acts .tick-btn.on { background: var(--liw-royal); }
.acts .tick-btn svg { width: 11px; height: 11px; }
.att li .due { margin-left: auto; font-size: 11px; color: var(--liw-muted);
  white-space: nowrap; padding-left: 10px; }
.item-btn { font-size: inherit; line-height: 1.4; }

@media (max-width: 719.98px) {
  .ws { grid-template-columns: 1fr; }
  .ws-brand-row img { width: 54px; height: 54px; }
  .ws-brand-name { font-size: 21px; }
}

/* ---- authentication gate: no case chrome, no case content -------------- */
.ws-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--liw-navy); padding: 24px; }
.ws-gate-card { background: #fff; border-radius: 14px; padding: 38px 40px; max-width: 460px;
  text-align: center; box-shadow: 0 24px 60px rgba(10,30,61,.35); }
.ws-gate-logo { height: 74px; width: auto; display: block; margin: 0 auto 18px;
  object-fit: contain; }
.ws-gate-card h1 { font-family: var(--liw-heading-font); font-size: 20px; margin: 0 0 8px;
  color: var(--liw-navy); }
.ws-gate-card p { font-size: 14px; color: var(--liw-muted); margin: 0 0 20px; line-height: 1.55; }
.ws-gate-card .btn-s { display: inline-block; }

/* ---- state-aware status treatment -------------------------------------- --
   The approved layout is unchanged: these only change colour and the enabled
   state of controls that would otherwise open an endpoint returning 409.     */
.pill.amber { background: #FDF1DC; color: #8A5A12; }
.pill.green { background: #E4F5EC; color: #12734A; }
.tick.amber { background: #F5A623; }
.tick.blue  { background: var(--liw-royal); }
.tick.grey  { background: #98A2B3; }
.rs-track b { background: #D7DEE8; }
.rs-track i { background: #D7DEE8; }
.rs-track b.on { background: #1BA55B; }
.rs-track i.on { background: #1BA55B; }
.wp.wp-off { opacity: .72; }
.wp.wp-off .nm { color: var(--liw-muted); }
.exp-row[disabled] { opacity: .6; cursor: not-allowed; }
.exp-row[disabled]:hover { border-color: #E4E9F2; }

/* ---- where a derived value came from ------------------------------------ --
   One quiet line, so an analyst can tell their own entry from the system's.   */
.ov-src { font-size: 11px; color: var(--liw-muted); margin-top: 10px;
  letter-spacing: .02em; text-transform: uppercase; }
.acts li.act-off { opacity: .55; }
.acts li.act-off .item-btn { cursor: not-allowed; text-decoration: none; }
.acts .dot-mini { width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--liw-light-blue); margin-top: 7px; }
.acts li a.item-btn { color: var(--liw-navy); text-decoration: none; }
.acts li a.item-btn:hover { text-decoration: underline; }

/* ---- completing an incomplete review ------------------------------------ --
   Reuses the existing .liw-modal shell. Nothing about the page layout moves.  */
.cr-table { margin: 14px 0; border: 1px solid #E4E9F2; border-radius: 10px; }
.cr-row { display: flex; gap: 12px; padding: 9px 13px; border-top: 1px solid #EEF1F6;
  font-size: 13.5px; flex-wrap: wrap; }
.cr-row:first-child { border-top: 0; }
.cr-k { color: var(--liw-muted); flex: 0 0 150px; min-width: 0; }
.cr-v { flex: 1 1 180px; min-width: 0; color: var(--liw-charcoal); }
.cr-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  margin: 6px 0 12px; }
.cr-h { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--liw-muted); margin-bottom: 4px; }
.cr-cols ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.cr-confirm { display: flex; gap: 9px; align-items: flex-start; margin: 12px 0 4px;
  font-size: 13.5px; line-height: 1.45; }
.cr-confirm input { margin-top: 3px; flex: none; }
@media (max-width: 719.98px) {
  .cr-cols { grid-template-columns: minmax(0, 1fr); }
  .cr-k { flex: 1 1 100%; }
}

/* ---- exhaustive review control center ----------------------------------- --
   Uses the existing card, pill and modal vocabulary. No page layout is redefined
   and no breakpoint moves.                                                    */
.rq-sum { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.rq-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 1px solid #E4E9F2; background: #fff; border-radius: 10px; padding: 8px 14px;
  cursor: pointer; font: inherit; min-width: 92px; }
.rq-chip b { font-size: 19px; color: var(--liw-navy); font-family: var(--liw-heading-font); }
.rq-chip span { font-size: 11.5px; color: var(--liw-muted); }
.rq-chip.on { border-color: var(--liw-royal); box-shadow: inset 0 -2px 0 var(--liw-royal); }
.rq-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.rq-mine { font-size: 13px; display: flex; gap: 7px; align-items: center; }
.rq-search { flex: 1 1 220px; min-width: 0; border: 1px solid var(--liw-border);
  border-radius: 9px; padding: 8px 12px; font: inherit; font-size: 13.5px; }
.rq-row { border: 1px solid #E4E9F2; border-radius: 11px; background: #fff;
  padding: 14px 16px; margin-bottom: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.rq-row.hi { border-color: var(--liw-royal); box-shadow: 0 0 0 2px var(--liw-sky); }
.rq-row.att { border-left: 3px solid var(--liw-light-blue); }
.rq-main { flex: 1 1 320px; min-width: 0; }
.rq-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.rq-case { font-size: 15px; font-weight: 700; color: var(--liw-navy);
  font-family: var(--liw-heading-font); }
.rq-case a { color: inherit; text-decoration: none; }
.rq-case a:hover { text-decoration: underline; }
.rq-q { font-size: 13.5px; color: var(--liw-charcoal); margin: 3px 0; overflow-wrap: break-word; }
.rq-meta { font-size: 12px; color: var(--liw-muted); }
.rq-row .rq-acts { display: flex; gap: 7px; align-items: flex-start; flex-wrap: wrap; }
.rq-kids { margin: -4px 0 10px 22px; }
.rq-det { flex: 1 1 100%; margin-top: 10px; border-top: 1px solid #EEF1F6; padding-top: 10px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.rq-det .k { color: var(--liw-muted); font-size: 12px; display: inline-block; min-width: 140px; }
.rq-det .v { font-size: 12.5px; overflow-wrap: anywhere; }
.rq-empty { text-align: center; padding: 46px 20px; border: 1px dashed #D7DEE8; border-radius: 12px; }
.rq-empty h3 { margin: 0 0 14px; color: var(--liw-navy); font-size: 16px; }
.rq-empty .rq-acts { justify-content: center; display: flex; gap: 9px; flex-wrap: wrap; }
.rq-stale { background: #FDF1DC; color: #8A5A12; border-radius: 9px; padding: 9px 13px;
  font-size: 13px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap; }
.rq-page { display: flex; gap: 12px; align-items: center; justify-content: center;
  margin-top: 14px; font-size: 13px; color: var(--liw-muted); }
.rq-warn { font-size: 13px; line-height: 1.55; margin: 10px 0 0; padding-left: 18px; }
@media (max-width: 719.98px) {
  .rq-det { grid-template-columns: minmax(0, 1fr); }
  .rq-row .rq-acts { flex: 1 1 100%; }
  .rq-chip { flex: 1 1 calc(50% - 4px); min-width: 0; }
}

/* ---- 'what is running' banner on Ask DavidOS ---------------------------- */
.rb { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
  background: #EEF2F9; border: 1px solid #D3DEEE; color: #1F3A63;
  border-radius: 11px; padding: 12px 16px; margin: 0 0 16px; font-size: 13.5px; }
.rb-txt { flex: 1 1 260px; min-width: 0; line-height: 1.5; }
.rb-one { margin-top: 6px; font-size: 13px; }
.rb-q { color: #4A6491; font-size: 12.5px; overflow-wrap: break-word; }
.rb-acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 719.98px) { .rb-acts { flex: 1 1 100%; } }

.rq-slots { font-size: 13px; color: var(--liw-charcoal); background: #F4F6F9;
  border-radius: 9px; padding: 9px 13px; margin-bottom: 12px; line-height: 1.5; }

/* ---- the plain-language guide to the review groupings ------------------ --
   Sits above the counts on both surfaces. It explains the groups; the per-row
   labels still say exactly what each individual review is.                   */
.rq-guide { list-style: none; margin: 0 0 14px; padding: 0; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.rq-guide li { display: flex; flex-direction: column; gap: 1px; font-size: 13px;
  line-height: 1.45; padding-left: 13px; position: relative; }
.rq-guide li:before { content: ""; position: absolute; left: 0; top: 7px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--liw-light-blue); }
.rq-guide li b { color: var(--liw-navy); font-family: var(--liw-heading-font); }
.rq-guide li span { color: var(--liw-muted); }
.rq-note { font-size: 12px; color: var(--liw-muted); align-self: center; }
@media (max-width: 719.98px) {
  .rq-guide { grid-template-columns: minmax(0, 1fr); }
}

/* ---- generated analysis: rendered, not raw ------------------------------
   Model output is Markdown and used to reach the reader as its own source
   characters. It is rendered semantically now; these are the presentation
   rules, on the workspace tokens so an analysis reads like the rest of the
   case file rather than like a console. */
.liw-md-body { margin-top: 12px; }
.liw-md > :first-child { margin-top: 0; }
.liw-md h3, .liw-md h4, .liw-md h5, .liw-md h6 {
  font-family: var(--liw-heading-font); color: var(--liw-navy);
  margin: 16px 0 6px; line-height: 1.25; }
.liw-md h3 { font-size: 1.02rem; }
.liw-md h4 { font-size: .95rem; }
.liw-md h5, .liw-md h6 { font-size: .9rem; }
.liw-md p { margin: 0 0 10px; line-height: 1.55; }
.liw-md ul, .liw-md ol { margin: 0 0 10px; padding-left: 22px; }
.liw-md li { margin: 3px 0; line-height: 1.5; }
.liw-md hr { border: 0; border-top: 1px solid var(--liw-border); margin: 16px 0; }
.liw-md blockquote { margin: 10px 0; padding: 6px 0 6px 12px;
  border-left: 3px solid var(--liw-light-blue); color: var(--liw-muted); }
.liw-md code { background: var(--liw-gray); border: 1px solid var(--liw-border);
  border-radius: 4px; padding: 1px 5px; font-size: .88em; }
.liw-md-tablewrap { overflow-x: auto; margin: 12px 0; }
.liw-md-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.liw-md-table th, .liw-md-table td {
  border: 1px solid var(--liw-border); padding: 7px 10px; text-align: left; vertical-align: top; }
.liw-md-table th { background: var(--liw-gray); font-family: var(--liw-heading-font);
  color: var(--liw-navy); font-weight: 600; }
/* An unfilled template slot is flagged rather than dressed up as final text. */
.liw-md-ph { background: #FFF3D6; border: 1px solid #E6C26A; border-radius: 3px;
  padding: 0 4px; color: #7A5B00; font-style: normal; }

/* ---- case at a glance and governed centers (2026-09-13) ------------------
   Density pass. One compact strip answers "where is everything" at a glance,
   and the centers are disclosures over data the page already holds. Appended
   rather than edited so the pinned layout rules above keep their meaning. */
.glance { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.bk { display: flex; align-items: center; gap: 9px; padding: 8px 10px; min-width: 0;
  border: 1px solid var(--liw-border); border-radius: 9px; background: #fff;
  text-decoration: none; color: var(--liw-navy); }
.bk:hover { border-color: var(--liw-light-blue); background: #F7FAFE; }
.bk:focus-visible { outline: 2px solid var(--liw-royal); outline-offset: 2px; }
.bk-ico { width: 28px; height: 28px; border-radius: 7px; background: var(--liw-sky);
  color: var(--liw-royal); display: flex; align-items: center; justify-content: center; flex: none; }
.bk-t { display: flex; flex-direction: column; min-width: 0; }
.bk-t b { font-family: var(--liw-heading-font); font-size: 12.5px; line-height: 1.2; }
.bk-s { font-size: 11.5px; color: var(--liw-muted); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.bk-s.green { color: #12734A; }
.bk-s.amber { color: #8A5300; }
.bk-s.blue { color: var(--liw-royal); }
.ctr .ctr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 16px; margin-top: 10px; }
.ctr .ctr-grid .k { font-size: 11px; color: var(--liw-muted); }
.ctr .ctr-grid .v { font-size: 13px; font-weight: 700; color: var(--liw-navy);
  font-family: var(--liw-heading-font); line-height: 1.3; }
.ctr .ctr-note { font-size: 12.5px; color: var(--liw-muted); margin: 10px 0 0; line-height: 1.45; }
.ctr ul.ctr-note { padding-left: 18px; }
.ctr .ctr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ctr .ctr-tags span { font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--liw-sky); color: var(--liw-navy); }
#processed-center, #storage-center, #token-center { scroll-margin-top: 18px; }
.wp-compact { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--liw-muted); padding: 8px 10px;
  border: 1px dashed var(--liw-border); border-radius: 9px; }
.exp-row.exp-off { padding: 7px 10px; margin-bottom: 6px; }
.exp-row.exp-off .em { width: 26px; height: 26px; }
/* Tighter chrome, same reading type sizes. */
.ws-brand { padding: 20px 20px 14px; }
.ws-brand-row img { width: 52px; height: 52px; }
.ws-brand-name { font-size: 20px; }
.ws-head { padding: 14px 24px 0; }
.ws-title { font-size: 23px; }
.ws-body { padding: 12px 24px 22px; gap: 14px; }
.card { padding: 14px 16px; }
.card-h { margin-bottom: 8px; }
@media (max-width: 1099.98px) { .glance { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 719.98px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
