/* Styles for the case screen (step 5). Tokens only, no raw colors. Reuses the m- kit: timeline, approval envelope, gate list, MCP trace, calendar. */

.cf-status { margin: 2px 0 10px; }
.cf-sec { margin-top: 30px; }
.cf-h { font: 600 clamp(17px, 1rem + 0.4vw, 20px)/1.3 var(--sans); letter-spacing: -0.01em; margin: 0 0 6px; }
.cf-h3 { font: 600 15.5px/1.35 var(--sans); letter-spacing: -0.005em; margin: 0; }
.cf-h3:focus, #cf-sent-t:focus, #cf-gate-t:focus { outline: none; }
.cf-sub { color: var(--soft); max-width: 52em; margin: 0 0 14px; }
.cf-sub .m-tool { font-size: 13px; }

/* The file: facts beside the timeline. */
.cf-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@container (min-width: 900px) {
  .cf-top { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}
.cf-facts { margin: 0; gap: 8px 14px; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); font-size: 13.5px; }
.cf-facts dd { overflow-wrap: anywhere; }
.cf-timeline .m-step-s .m-clause-id { margin: 2px 4px 0 0; }
/* The text wraps inside its own item, so the ◆ stays beside its first line instead of standing alone. */
.cf-timeline .m-due { max-width: 100%; flex-wrap: nowrap; align-items: baseline; }
.m-timeline .is-now .m-step-t { font-weight: 600; }

/* The documents: three cards side by side when there is room. */
.cf-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; align-items: start; }
.cf-doc { display: grid; gap: 4px; min-width: 0; }
.cf-read { margin: 2px 0 6px; font-size: 12.5px; color: var(--soft); }
.cf-read .m-tool { font-size: 12.5px; }
.cf-fields { display: grid; gap: 0; }
.cf-fields li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 9px 0; border-top: 1px solid var(--hair); min-width: 0; }
.cf-k { font: 500 11.5px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.cf-v { font-weight: 500; overflow-wrap: anywhere; }
/* The line the field was read from: what a reviewer checks the value against. */
.quote { display: block; margin-top: 3px; padding-left: 10px; border-left: 2px solid var(--edge); color: var(--soft); font: 400 12.5px/1.5 var(--mono); overflow-wrap: anywhere; }
.quote::before { content: "\201C"; }
.quote::after { content: "\201D"; }

/* Eligibility results. */
.cf-rules { display: grid; gap: 10px; }
.cf-rule { display: grid; gap: 6px; padding: 14px 16px; background: var(--m-1); border: 1px solid var(--hair); border-radius: 12px; min-width: 0; }
.cf-rule-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.cf-q { font-weight: 500; }
.cf-cl { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-subrules { display: grid; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--hair); color: var(--white); max-width: none; }
ul.cf-subrules li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; font-size: 13px; }
ul.cf-subrules li > span { color: var(--soft); }

/* The letter and the gate: the letter beside the gate on a wide screen, the gate under the letter on a narrow one. */
.cf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@container (min-width: 960px) {
  .cf-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}
.cf-side { display: grid; gap: 12px; min-width: 0; }
.cf-draft { display: grid; gap: 10px; justify-items: start; }
.cf-gate-top, .cf-top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.cf-verdict { margin: 4px 0 10px; }
.cf-checks .cf-ck { display: block; min-width: 0; }
.cf-checks .cf-ck b { font-weight: 600; }
.cf-checks .cf-ck small { display: block; margin-top: 2px; color: var(--soft); font-size: 12.5px; line-height: 1.45; }
.cf-checks li { align-items: start; }
.cf-checks li > i { margin-top: 1px; }
.cf-checks li > span:last-child { padding-top: 2px; }
.cf-checks .is-held .cf-ck small { color: var(--white); }
.cf-fix .m-sources span { color: var(--white); }
.cf-fix .m-meta dd, .cf-applied .m-sub { overflow-wrap: anywhere; }
.cf-fix .m-meta { gap: 6px 12px; }
.cf-applied, .cf-approve, .cf-sent { display: grid; gap: 8px; }
.cf-sent p b { font-size: 15.5px; }
.cf-sent .m-actions, .cf-approve .m-actions, .cf-fix .m-actions { margin-top: 2px; }

/* The letter itself: white paper in the dark window. Pink only as a mark beside the three required statements. */
.cf-paper p[data-statement] { padding-left: 10px; border-left: 3px solid var(--pink); }
.cf-lh { color: var(--ink-2); }
.cf-legend { padding-top: 2px; }
.cf-env .m-env-meta dd .m-pill { margin-left: 4px; vertical-align: middle; white-space: normal; }

/* The MCP trace of the email, below the letter. */
.cf-trace { margin-top: 22px; }
.cf-trace .mcp-trace { margin-top: 4px; }
.cf-trace .m-gates li > span:last-child { text-align: right; max-width: 15ch; overflow-wrap: anywhere; }
.cf-trace .m-code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* The calendar: as many columns as there are days with an entry. */
@container (min-width: 701px) {
  .cf-cal .m-cal { grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); }
}
.cf-cal .m-ev.is-event { border-style: solid; border-color: var(--soft); }
.cf-cal .m-ev span { margin-top: 2px; }
.cf-cal .m-cal { align-items: start; }
/* A §4 pill with its plain-text remainder beside it, kept together as one item. */
.cf-pc { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
