/* The staff screen in Crawford Mulholland's look (T25), after the demo the firm approved
   (2026-11-19). Served from this app only: no font host, no outside address. The two brand
   fonts ship in static/fonts/ (OFL.txt beside them) and load from there; they are named
   first and the fallbacks are close system fonts. Contrast: every text colour below is 4.5:1 or better on its background. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
}
:root {
  --charcoal: #44424a; --charcoal-2: #56555a; --ink: #2e2d33; --text: #44424a;
  --muted: #6b6a70;
  --yellow: #f8dc00; --yellow-dark: #e2c600; --orange: #f5a000; --orange-dark: #ef8f00;
  --star: #b06800;
  --bg: #f2f2f2; --card: #ffffff; --line: #e3e3e6; --soft: #f7f7f8;
  --red: #c4373b; --red-ink: #7d2427; --red-soft: #fdecec;
  --amber-ink: #5f4700; --amber-soft: #fff6d6; --client-soft: #fff7c2;
  --green: #26683f; --green-soft: #e7f4e9; --blue-ink: #3d4a6b; --blue-soft: #eef1f7;
  --radius: 6px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --head-font: Montserrat, "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --body-font: "Source Sans 3", "Source Sans Pro", "Segoe UI", "Helvetica Neue", Arial,
               system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 var(--body-font);
       overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--head-font); color: var(--ink); margin: 0 0 .6rem; line-height: 1.3; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--charcoal); text-decoration-color: var(--yellow-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
button, select, input, textarea { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
      white-space: nowrap; }

/* Header: charcoal with the logo and the yellow rule */
header.top { background: var(--charcoal); color: #fff; border-bottom: 4px solid var(--yellow); }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex;
             align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.brand { display: block; line-height: 0; }
.logo { height: 46px; width: auto; display: block; }
.top .app-name { font-family: var(--head-font); font-weight: 600; font-size: 15px;
                 color: #e6e6e8;
                 border-left: 1px solid #6a696f; padding-left: 16px; }
.top .spacer { flex: 1; }
.top form { margin: 0; }
.top .search { display: flex; gap: 6px; align-items: center; }
.top .search label { margin: 0; }
.top .search input { border: 0; border-radius: var(--radius); padding: 7px 10px; width: 220px;
                     max-width: 44vw; color: var(--ink); }
.top .signout { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #e6e6e8; }
.role { background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 12px;
        padding: 1px 8px; border-radius: 10px; }
.top button { background: transparent; color: #fff; border-color: #8a898f; padding: 4px 10px;
              font-size: 14px; }
.top button:hover { background: var(--charcoal-2); border-color: #fff; }

/* The queue tabs */
.tabs-bar { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line);
           margin: 14px 0 0; }
nav.tabs a { display: inline-block; padding: 9px 12px; color: var(--muted); font-weight: 600;
             text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
nav.tabs a.none { font-weight: 400; }
nav.tabs a:hover { color: var(--ink); border-bottom-color: var(--line); }
nav.tabs a.on, nav.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--yellow); }
nav.tabs a.ask-tab { color: var(--ink); }
nav.tabs a.ask-tab[data-tab="client-replied"] { background: var(--client-soft);
                                                 border-radius: var(--radius) var(--radius) 0 0; }

main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 60px; }

/* Open alerts */
.banner { max-width: 1208px; margin: 16px auto 0; background: var(--red-soft);
          border: 1px solid #f1c4c5; border-left: 5px solid var(--red); border-radius: var(--radius);
          padding: 10px 14px; color: var(--red-ink); }
.banner h2 { font-size: 14px; color: var(--red-ink); margin-bottom: 4px; }
.banner ul { margin: 0; padding-left: 18px; }
@media (max-width: 1240px) { .banner { margin: 16px 16px 0; } }

/* Cards: each block of the page sits on white */
.case-head, .flags, .actions, .fields, .unplaced, .adviser-note, .client-notes, .ask-panel, .ask-answers,
.ask-email, .ask-items, .ask-wording, .ask-preview, .ask-copied, .sheet-section, .stage,
.queue-card, .gaps, .signin-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; margin: 0 0 16px;
}
.case-head { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; justify-content: start;
             gap: 2px 36px; padding: 12px 20px; }
.case-head dt { font-family: var(--head-font); font-size: 12px; font-weight: 600;
                color: var(--muted); padding-top: 3px; }
.case-head dd { margin: 0; font-weight: 600; color: var(--ink); }
ol.gaps { padding-left: 2.2rem; }
.gaps li { padding: 4px 0; }

/* Which case this is: it stays in view while the answers scroll past */
.crumb { margin: -8px 0 8px; }
.case-strip { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center;
              gap: 2px 20px; background: var(--charcoal); color: #fff; padding: 12px 16px; margin: 0 0 18px;
              border-radius: var(--radius); border-left: 6px solid var(--yellow); }
.case-strip p { margin: 0; }
.case-names { font-family: var(--head-font); font-weight: 700; font-size: 19px; line-height: 1.3; }
.case-strip .person, .case-strip .person + .person { color: #fff; display: inline; font-weight: 700; }
.case-names .and { font-weight: 600; color: #cfcfd3; }
.case-num, .case-adviser { color: #e6e6e8; }
.case-num strong { color: #fff; }
.case-strip .case-state { margin: 0 0 0 auto; } .case-strip dd { margin: 0 0 0 .4em; }
.case-strip .badge { white-space: normal; } .state-plain { color: #e6e6e8; }
/* the marked tab shows the page's name; the heading is there for a screen reader */
h1.page-name { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); }
.case-strip dt { color: #e6e6e8; } .case-strip dt, .case-strip dd { display: inline; }
html { scroll-padding-top: 84px; }

/* The one next thing, first on the case page */
.next-step { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--red);
             border-radius: var(--radius); padding: 16px 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.next-step.ready { border-left-color: var(--yellow-dark); }
.next-step.reader { border-left-color: #8a96b5; }
.next-step.finished { border-left-color: #7fb08f; }
.next-step h2 { font-size: 20px; margin: 0 0 4px; }
.next-step p:last-child, .next-step ul:last-child { margin-bottom: 0; }
.next-step p { max-width: 46rem; } .next-step ul { margin: 0 0 .75rem; padding-left: 1.2rem; max-width: 46rem; }
.page-help { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
             margin: 0 0 16px; }
.page-help p { margin: 0; max-width: 46rem; color: var(--text); }
.must-notice { background: var(--red-soft); border-color: #f1c4c5; color: var(--red-ink); }

/* The case's own tabs */
nav.case-nav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line);
               margin: 0 0 16px; }
nav.case-nav a { padding: 8px 12px; color: var(--muted); font-weight: 600; text-decoration: none;
                 border-bottom: 3px solid transparent; margin-bottom: -2px; }
nav.case-nav a.on { color: var(--ink); border-bottom-color: var(--yellow); }
nav.case-nav a:hover { color: var(--ink); border-bottom-color: var(--yellow); }

/* Buttons */
button, a.button {
  display: inline-block; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 14px; cursor: pointer; font-weight: 600; line-height: 1.2;
  background: var(--card); color: var(--ink); text-decoration: none;
}
button:hover, a.button:hover { border-color: var(--charcoal-2); }
button.primary, a.button.primary, a.button.ask-open {
  background: var(--yellow); border-color: var(--yellow-dark); color: var(--ink);
}
button.primary:hover, a.button.primary:hover, a.button.ask-open:hover {
  background: var(--orange); border-color: var(--orange-dark); color: var(--ink);
}
button.dark { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
button.dark:hover { background: var(--ink); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.copy { padding: 4px 10px; font-size: 14px; }
.unplaced-text { white-space: pre-wrap; }
.copy-failed { margin: 8px 0 0; max-width: 420px; }
.copy-failed p { margin: 0 0 6px; padding: 8px 10px; border-radius: var(--radius); font-size: 14px;
  background: var(--red-soft); color: var(--red-ink); }
.copy-failed textarea { width: 100%; min-height: 64px; }

/* Forms */
label { display: block; margin: .25rem 0; }
input[type=text], input[type=email], input[type=password], select, textarea {
  border: 1px solid #bab9bf; border-radius: 4px; padding: 6px 8px; background: #fff;
  color: var(--ink); max-width: 100%;
}
form.action, form.decide, form.change { display: inline-flex; flex-wrap: wrap; gap: 6px;
  align-items: center; margin: .25rem .5rem .25rem 0; }
form.decide label, form.action label { margin: 0; }
.actions form.action { display: flex; }

/* Tables */
.table-wrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { font-family: var(--head-font); font-size: 14px; font-weight: 600; color: var(--muted); text-align: left; padding: 10px 12px;
     border-bottom: 1px solid var(--line); background: var(--soft); vertical-align: top;
     white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffbe0; }
.sheet-row th.label { text-transform: none; letter-spacing: 0; font-family: var(--body-font);
                      font-size: 15px; font-weight: 400; background: transparent; width: 40%; }
.sheet-block h3 { margin-top: 12px; }
.sheet-section h2 { border-bottom: 2px solid var(--yellow); padding-bottom: 6px; }

/* The groups as tabs: plain radio buttons, so they work with no script and from the keyboard */
.group-tabs { border: 0; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.group-tabs input { position: absolute; opacity: 0; }
.group-tabs label { margin: 0; padding: 9px 16px; border: 1px solid #bab9bf; border-radius: 22px; cursor: pointer;
                    background: var(--card); color: var(--ink); font-weight: 600; }
.group-tabs label span { font-variant-numeric: tabular-nums; margin-left: 4px; font-weight: 400; }
.group-tabs label:hover { border-color: var(--charcoal); }
.group-tabs input:checked + label { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.group-tabs input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.queue-group.unless-chosen { display: none; }
main:has(#show-needs:checked) .queue-group:not(.g-needs), main:has(#show-ready:checked) .queue-group:not(.g-ready),
main:has(#show-waiting:checked) .queue-group:not(.g-waiting), main:has(#show-done:checked) .queue-group:not(.g-done) {
  display: none; }
main:has(#show-waiting:checked) .queue-group.g-waiting { display: block; }
.more-states { flex: 1 1 auto; }
.more-states summary { cursor: pointer; padding: 9px 12px; color: var(--muted); }
.more-states[open] { flex-basis: 100%; }

/* The queue: one block for each group, its colour down the left edge */
.queue-group { margin: 0 0 28px; }
.queue-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 0 0 8px; }
.queue-group-head h2 { font-size: 18px; margin: 0; }
.queue-group-head p { margin: 0; color: var(--muted); }
.group-count { display: inline-block; min-width: 28px; padding: 0 8px; border-radius: 14px; margin-left: 4px;
               text-align: center; font-size: 15px; background: #e3e3e6; color: var(--ink); }
.g-needs .group-count { background: var(--red-soft); color: var(--red-ink); }
.g-ready .group-count { background: var(--yellow); color: var(--ink); }
.queue-group .queue-card { padding: 0; margin: 0; border-left: 5px solid #cacacf; }
.g-needs .queue-card { border-left-color: var(--red); }
.g-ready .queue-card { border-left-color: var(--yellow-dark); }
.g-done .queue-card { border-left-color: #7fb08f; }
.queue th { text-transform: none; letter-spacing: 0; font-family: var(--body-font); font-size: 14px; }
.queue td:first-child { white-space: nowrap; }
table.queue { table-layout: fixed; }
.queue th:nth-child(1) { width: 13%; } .queue th:nth-child(2) { width: 20%; }
.queue th:nth-child(3) { width: 12%; } .queue th:nth-child(4) { width: 15%; }
.queue th:nth-child(6) { width: 14%; } .queue th:nth-child(7) { width: 8%; }
.deletion-dates { margin: 0 0 12px; max-width: 46rem; } .deletion-dates summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
.case-no { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.queue .when { display: block; color: var(--ink); }
.person { display: block; color: var(--ink); font-weight: 600; }
.person + .person { font-weight: 400; }
.g-needs .todo { color: var(--ink); font-weight: 600; }
.open-flags span { display: block; white-space: nowrap; font-size: 14px; }
.open-flags .n-must { color: var(--red-ink); font-weight: 700; }
.open-flags .n-info { color: var(--muted); }
.group-empty { margin: 0; padding: 12px 16px; background: var(--card); border: 1px dashed #cacacf;
               border-radius: var(--radius); color: var(--muted); }
.queue-key { color: var(--muted); font-size: 14px; max-width: 46rem; }
.queue .open a.button { padding: 6px 12px; }

/* The answers, in the form's own sections */
.section-help { color: var(--muted); max-width: 46rem; }
tr.field-section th { font-size: 16px; color: var(--ink); background: var(--card); text-transform: none;
                      letter-spacing: 0; padding: 22px 12px 8px; border-bottom: 2px solid var(--charcoal); }
.fields thead th { text-transform: none; letter-spacing: 0; font-family: var(--body-font); font-size: 14px; }
.fields td { padding: 8px 12px; border-bottom-color: #eeeef0; }
.fields .field-name span:not([hidden]):not(.client-star) { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.fields .field-name .client-star { display: inline; }
.fields tr.first .where:not([hidden]) { color: var(--ink); font-weight: 700; }
.fields .field-name .goes-to:not([hidden]) { color: var(--ink); }
.fields tr.first td { border-top: 1px solid #cacacf; }
.fields .field-name { color: var(--ink); font-weight: 600; }
.fields tr.differs .value { font-weight: 700; color: var(--ink); }
.fields tr.has-flag td { background: #fffbe8; }
.fields tr.has-flag .field-name { box-shadow: inset 4px 0 0 var(--orange); }
form.change { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; }
form.change input[type=text] { flex: 1 1 auto; width: 100%; min-width: 0; }
form.change button { flex: none; padding: 6px 10px; }

/* What Confirm would send */
.send-preview { border: 1px solid var(--line); border-left: 5px solid var(--yellow-dark); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 14px; max-width: 60rem; }
.send-preview h3 { margin: 0 0 8px; } .send-preview p { margin: 8px 0 0; }
.send-preview dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; }
.send-preview dt { color: var(--muted); } .send-preview dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.sent-value { font-weight: 600; white-space: pre-wrap; }

/* State badges */
.state, .badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 9px;
         border-radius: 12px; white-space: nowrap; background: #eeeeee; color: #55545a; }
.s-received { background: var(--blue-soft); color: var(--blue-ink); }
.s-to-check { background: var(--amber-soft); color: var(--amber-ink); }
.s-waiting-on-client { background: #e9f3f6; color: #1f5f73; }
.s-client-replied { background: var(--yellow); color: var(--ink); }
.s-confirmed { background: #e8f0f9; color: #24508a; }
.s-needs-a-person { background: var(--red-soft); color: var(--red-ink); }
.s-sent-back { background: #eeeeee; color: #55545a; }
.s-needs-decision { background: var(--red-soft); color: var(--red-ink); }
.s-ready { background: var(--yellow); color: var(--ink); }
.s-done { background: var(--green-soft); color: var(--green); }

/* Flags */
.flags ul { list-style: none; padding: 0; margin: 0; }
li.flag { border: 1px solid var(--line); border-left: 4px solid #8a96b5; border-radius: var(--radius);
          padding: 10px 12px; margin-bottom: 10px; background: var(--card); }
.flag[data-severity="blocking"] { border-left-color: var(--red); }
.flag[data-severity="blocking"] strong { color: var(--red-ink); }
.flag[data-severity="gap"] { border-left-color: var(--orange); }
.flag[data-severity="no lead"] { border-left-color: #7a5bb0; }
.flag strong { color: var(--ink); }
.decided { display: inline-block; font-size: 14px; color: var(--green); font-weight: 600; }
.flag-wrong, .flag-fix, li.flag .decided { margin: 4px 0; }
.flag-fix, .flag-where, .gap-question { color: var(--muted); }
.flag-severity { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px;
                 border-radius: 4px; margin-left: 4px; background: var(--soft); color: var(--text); }
.sev-blocking { background: var(--red-soft); color: var(--red-ink); }
.sev-gap { background: var(--amber-soft); color: var(--amber-ink); }
.status-line, .mark-line { background: var(--green-soft); color: var(--green); font-weight: 600;
  border: 1px solid #bfdcc6; border-radius: var(--radius); padding: 10px 12px; }
form.send-back h3 { flex-basis: 100%; margin: 0; font-size: 15px; }
.flag-on-field { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px;
                 border-radius: 4px; margin: 2px 4px 2px 0; background: var(--amber-soft);
                 color: var(--amber-ink); }

.flag-group { margin: 0 0 18px; } .flag-group:last-child { margin: 0; }
.flag-group h3 { margin: 0; font-size: 16px; }
.flag-group h3 .group-count { font-family: var(--body-font); font-size: 14px; }
.fg-must h3 .group-count { background: var(--red-soft); color: var(--red-ink); }
.fg-check h3 .group-count { background: var(--amber-soft); color: var(--amber-ink); }
.flag-group-help { color: var(--muted); margin: 2px 0 8px; max-width: 46rem; }
.flag-head { margin: 0 0 4px; font-family: var(--body-font); font-size: 17px; line-height: 1.35; font-weight: 400; }
.flag-say { display: grid; grid-template-columns: 92px minmax(0, 44rem); gap: 0 12px; }
.flag-label { color: var(--muted); font-weight: 600; padding-top: 4px; }
.flag .flag-fix { color: var(--ink); }
.flags ul.flag-figures { margin: 6px 0 8px 104px; padding-left: 0; }
.flag form.decide { display: grid; gap: 10px; max-width: 36rem; margin: 10px 0 4px 104px;
                    padding: 14px 16px; background: var(--soft); border-radius: var(--radius); }
.flag form.decide label { font-weight: 600; color: var(--ink); }
.flag form.decide select, .flag form.decide input[type=text] { display: block; width: 100%; margin-top: 4px;
                    font-weight: 400; }
.flag form.decide button { justify-self: start; }
.flag.is-decided { background: var(--soft); border-left-color: #7fb08f; }

/* Actions, last on the page: what Confirm does, beside it */
.confirm-says { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.confirm-says h3 { margin: 0 0 2px; }
.confirm-says ul, .confirm-reasons ul { margin: 0 0 12px; padding-left: 1.2rem; max-width: 38rem; }
.confirm-says li { margin: 0 0 4px; }
form[data-action="confirm"] button { font-size: 18px; padding: 12px 36px; }
.actions form.action { padding: 14px 0; margin: 0; border-top: 1px solid var(--line); align-items: end; }
.actions h2 + form.action { border-top: 0; }
.actions .action-help { flex-basis: 100%; margin: 0; color: var(--muted); }
.actions form.action label select, .actions form.action label input { display: block; margin-top: 2px; }

/* Notices */
.notice { border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; font-size: 15px;
          background: var(--soft); border: 1px solid var(--line); color: var(--text); }
.replied-notice { background: var(--amber-soft); border-color: #f0dc8c; color: var(--amber-ink);
                  border-left: 5px solid var(--yellow-dark); }
.ask-rematch { background: var(--amber-soft); border-color: #f0dc8c; color: var(--amber-ink); }
.ask-off, .ask-send-off { color: var(--muted); }
.ask-copy-once { background: var(--red-soft); border-color: #f1c4c5; color: var(--red-ink); }
.ask-send-outcome { font-weight: 600; }
.ask-send-outcome.warning, .lead-outcome[role=alert] { background: var(--red-soft);
  border: 1px solid #f1c4c5; border-radius: var(--radius); padding: 10px 12px; color: var(--red-ink); }
.error, .reason { color: var(--red-ink); background: var(--red-soft); border: 1px solid #f1c4c5;
                  border-radius: var(--radius); padding: 8px 12px; }
.deleted { font-weight: 700; color: var(--ink); background: var(--soft); border: 1px solid var(--line);
           border-radius: var(--radius); padding: 8px 12px; }
.provisional, .when, .kind, .missing { color: var(--muted); }

/* The client's answers: starred in orange on pale yellow */
.client-star { color: var(--star); font-weight: 700; font-size: 1.1em; }
tr.client-answer td, tr.pending-answer td { background: var(--client-soft); }
.fields .field-name .source[data-source="client"]:not([hidden]), .source[data-source="client"] { color: #8a5a00; font-weight: 600; }
.ask-answers h2 { background: var(--client-soft); border-left: 5px solid var(--yellow-dark);
                  padding: 6px 10px; border-radius: 4px; }
.ask-answered { background: var(--amber-soft); border: 1px solid #f0dc8c; border-radius: var(--radius);
                padding: 10px 12px; color: var(--amber-ink); }
.client-notes ul { list-style: none; padding: 0; margin: 0; }
.client-note { padding: 6px 0; border-bottom: 1px solid var(--line); }
.ask-was { color: var(--muted); font-size: .9em; }
.ask-not-ready { color: var(--muted); font-style: italic; }
.ask-row { display: inline-block; font-size: 13px; }
.source, .goes-to { font-size: 14px; }
.quote { color: var(--muted); }

/* Ask the client: the dialog page */
.ask-list { list-style: none; padding-left: 0; margin: 0 0 10px; }
.ask-list li { padding: 4px 8px; border-radius: 4px; }
.ask-list li:hover { background: var(--soft); }
.ask-item input { width: 17px; height: 17px; accent-color: var(--charcoal); vertical-align: -3px;
                  margin-right: 6px; }
.ask-from { font-size: 12px; font-weight: 700; color: var(--amber-ink); background: var(--amber-soft);
            border-radius: 4px; padding: 0 6px; margin-left: 6px; }
.ask-more summary { cursor: pointer; font-weight: 600; color: var(--charcoal); margin: 6px 0; }
.ask-preview-text, .ask-message, .original-text, .adviser-note-text {
  white-space: pre-wrap; background: var(--soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; font-size: 14px; margin: 0 0 10px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ask-link, .key, .uri { background: var(--soft); border: 1px dashed #c9c9c9; border-radius: var(--radius);
                        padding: 10px 12px; word-break: break-all; }
.ask-wording textarea, .ask-own input, .ask-email textarea { width: 100%; max-width: 40rem; display: block; }
.ask-actions form, .ask-actions a.button { display: inline-block; margin: .25rem .5rem .25rem 0; }
.ask-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.ask-review button { margin: 10px 8px 0 0; }

/* The case log */
.stage h2 { text-transform: capitalize; }

/* Sign-in pages: a white card with the logo */
.signin-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.signin-logo { height: 58px; width: auto; display: block; margin: 0 0 18px; }
.signin-card label { font-weight: 600; margin: 16px 0 6px; }
.signin-card input[type=text], .signin-card input[type=email], .signin-card input[type=password] {
  display: block; width: 100%; border-radius: var(--radius); padding: 10px; margin-top: 6px; }
.signin-card button { width: 100%; margin-top: 16px; }
.lockline { font-size: 15px; color: var(--muted); margin: 18px 0 0; }

.signin-card .help, .signin-card .steps { font-size: 15px; }
.signin-card .steps { padding-left: 1.3rem; margin: 0 0 12px; } .signin-card .steps li { margin: 0 0 8px; }
.signin-card .key { font-size: 18px; font-weight: 700; color: var(--ink); margin: 6px 0 0; word-spacing: .2em; }
.uri-box { margin: 0 0 12px; font-size: 15px; } .uri-box summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.signin-card a.button { display: block; text-align: center; }

.sheet-row td.value { color: var(--ink); font-weight: 600; white-space: pre-wrap; }
.sheet-row td:nth-child(3) { width: 90px; } .sheet-row td.mark { width: 180px; color: var(--muted); font-size: 14px; }
.copy-left { margin: 0 0 14px; } .section-left { font-size: 14px; font-weight: 400; color: var(--muted); }
.sheet-row { break-inside: avoid; }
.sheet-section tr:last-child th { border-bottom: 0; }
/* What a client wrote can be one long word: it breaks where it stands, and widens nothing */
.person, .case-names, .people, .replied-notice, .deletion-dates td, .fields td, .fields .original, .fields .value,
.quote, .sheet-row .value, .unplaced-label, .unplaced-text, .unplaced-item, .client-note, .flag-figures, .ask-answers td,
.ask-asked-item, .ask-email label, .original-text, .ask-message, .ask-preview-text, .adviser-note-text { overflow-wrap: anywhere; }
.case-names, .flag-figures { min-width: 0; } th.unplaced-label { white-space: normal; }
.deletion-dates th, .ask-answers th, p.state { white-space: normal; }
@media (max-width: 640px) { .ask-answers th, .ask-answers td { padding-left: 6px; padding-right: 6px; } }
@media (min-width: 901px) {
  table.answers { table-layout: fixed; }
  table.answers thead th:nth-child(1) { width: 25%; } table.answers thead th:nth-child(4) { width: 13%; }
  table.answers thead th:nth-child(2), table.answers thead th:nth-child(3) { width: 19%; }
  table.answers thead th:nth-child(5) { width: 24%; } table.answers td { overflow-wrap: anywhere; }
}
.add-answer { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: end; max-width: 60rem; }
.add-answer select, .add-answer input { display: block; margin-top: 2px; }
.fields h3 { margin-top: 24px; }
p.empty { color: var(--muted); margin: 0; }
.case-strip :focus-visible, header.top :focus-visible { outline-color: var(--yellow); }
tr.field :target, tr.field:focus-within td { background: #fffbe0; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* A narrow screen: each line of a wide table becomes its own block, every answer named */
@media (max-width: 900px) {
  .queue thead, .fields thead { position: absolute; width: 1px; height: 1px; overflow: hidden;
                                clip: rect(0 0 0 0); }
  .case-head { display: grid; grid-template: none; grid-auto-flow: row; gap: 2px 14px;
               grid-template-columns: max-content minmax(0, 1fr); justify-content: stretch; }
  .queue, .queue tbody, .queue tr, .queue td,
  .fields table, .fields tbody, .fields tr, .fields td, .fields tr.field-section th { display: block; width: 100%; }
  .fields .table-wrap, .queue-card.table-wrap { overflow: visible; }
  .queue tr, .fields tr.field { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .queue td, .fields tr.field td { border: 0; padding: 2px 0; background: transparent; }
  .fields tr.first td { border-top: 0; }
  .queue td[data-label]::before, .fields td[data-label]::before {
    content: attr(data-label) ": "; color: var(--muted); font-weight: 400; }
  .queue td.people::before { content: none; }
  .queue td:first-child::before { content: none; }
  .case-no, .queue .when, .open-flags span { display: inline; margin-right: 10px; }
  .queue .open a.button { display: block; text-align: center; padding: 12px; margin-top: 6px; }
  .fields tr.has-flag { box-shadow: inset 4px 0 0 var(--orange); background: #fffbe8; }
  .fields tr.has-flag .field-name { box-shadow: none; }
  .fields td.field-flags:empty { display: none; }
  .fields .field-name { font-size: 17px; }
  .confirm-says { grid-template-columns: minmax(0, 1fr); }
  .flag-say { grid-template-columns: minmax(0, 1fr); }
  .flag form.decide, .flags ul.flag-figures { margin-left: 0; }
  .sheet-section table, .sheet-section tbody, .sheet-row, .sheet-row th, .sheet-row td,
  .sheet-row td.mark { display: block; width: 100%; }
  .sheet-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0;
               border-bottom: 1px solid var(--line); }
  .sheet-row th.label { grid-column: 1 / -1; padding: 0; border: 0; color: var(--muted); width: auto;
                        white-space: normal; }
  .sheet-row td { border: 0; padding: 2px 0; width: auto; }
  .sheet-row td.mark { grid-column: 1 / -1; width: auto; }
  .sheet-row td.mark:empty { display: none; }
  input[type=text], input[type=email], input[type=password], select, textarea { min-height: 44px; }
  button, a.button { min-height: 44px; }
  button.copy { padding: 8px 14px; }
  nav.case-nav a, nav.tabs a { padding: 11px 10px; }
  .page-help .button { width: 100%; text-align: center; }
  .add-answer select, .add-answer input[type=text], form.action select, form.action input[type=text] { width: 100%; }
  .actions form.action label { flex-basis: 100%; }
}

@media (max-width: 640px) {
  .top-inner { gap: 8px 12px; }
  .top .search { order: 3; flex: 1 1 100%; } .top .search label { flex: 1; }
  .top .search input[type=text] { width: 100%; max-width: none; }
  nav.tabs { flex-wrap: nowrap; overflow-x: auto; } nav.tabs a { white-space: nowrap; }
  nav.tabs a.none { display: none; }
  .case-strip { margin-left: -12px; margin-right: -12px; border-radius: 0; padding: 8px 12px; gap: 0 12px; }
  .case-names { font-size: 16px; flex-basis: 100%; } .case-num, .case-adviser { font-size: 14px; }
  .next-step { padding: 10px 14px; }
  nav.case-nav { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 10px; } nav.case-nav a { white-space: nowrap; padding: 8px; }
  .crumb { margin: -12px 0 4px; font-size: 15px; } .case-strip { margin-bottom: 4px; }
  .case-strip .case-state { margin-left: 0; font-size: 14px; } .case-strip .badge { font-size: 12px; }
  .flags { padding: 10px 12px; } .flags > h2 { margin-bottom: 0; } .flag-group-help { margin: 0 0 4px; font-size: 15px; }
  .top .app-name { display: none; }
  .logo { height: 38px; }
  h1 { font-size: 20px; }
  main { padding: 16px 12px 48px; }
  .signin-card { margin: 16px auto; padding: 20px; }
}

/* ---- added by the practice kit, never by the app: the bar on every practice page ---- */
/* The app's name strip stays at the top while a case scrolls: it stops under the bar, and what is
   tabbed or jumped to stops under both. --pk-bar: the bar's height, --pk-strip: the strip's. */
:root { --pk-bar: 40px; --pk-strip: 84px; }
html { scroll-padding-top: calc(var(--pk-bar) + var(--pk-strip)); }
body::before {
  content: "PRACTICE COPY. Every case here is made up. Never type anything about a real client. Nothing here goes into Smartr365.";
  display: grid; align-content: center; position: sticky; top: 0; z-index: 2147483647;
  box-sizing: border-box; min-height: var(--pk-bar);
  padding: 8px 12px; background: #8a0f14; color: #fff;
  font: 700 16px/1.4 Arial, sans-serif; text-align: center;
}
.case-strip { top: var(--pk-bar); }
@media (max-width: 1099px) {
  :root { --pk-bar: 62px; }
}
@media (max-width: 759px) {
  :root { --pk-bar: 60px; --pk-strip: 108px; }
  body::before { font-size: 14px; }
}
@media (max-width: 559px) {
  :root { --pk-bar: 80px; --pk-strip: 124px; }
}
@media (max-width: 359px) {
  :root { --pk-bar: 100px; }
}
@media print {
  body::before { position: static; background: #fff; color: #000; border: 3px solid #000; }
  .case-strip { position: static; }
}
