/* The project's record (ew2/web/records.js). House palette only; never blue. */
.rc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.rc-tile { background: #F2F4F3; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; color: #123E35; }
.rc-tile strong { font-size: 1.4rem; }
.rc-tile.red { background: #FBECEA; color: #9D2B25; }
.rc-tile.amber { background: #FFF4DC; color: #8A5A00; }
.rc-chart { max-width: 100%; height: auto; margin: 4px 0 8px; }
.rc-row { display: flex; gap: 8px; }
.rc-row input { flex: 1; min-width: 0; }
.rc-scroll { overflow-x: auto; }
.rc-log { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rc-log th, .rc-log td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid #D9DED9; }
.rc-log td:first-child { white-space: nowrap; }
.rc-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 12px; }
.rc-chron textarea { width: 100%; box-sizing: border-box; }
.rc-events li, .rc-owed li { padding: 8px 0; }
.rc-answer { border-left: 3px solid #C4F578; padding-left: 10px; margin: 8px 0; }
@media (max-width: 600px) { .rc-log td:nth-child(3), .rc-log th:nth-child(3) { display: none; } .rc-row { flex-direction: column; } }

/* Records in the main menu (ew2/web/recordsview.js; Han, 25 October 2026): Log and Timeline. The word is always
   printed beside its colour. Readable at 375 px: the columns stack, wide tables and the timeline scroll in their box. */
.rv { max-width: 1400px; }
.rv-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rv-head h1 { margin: 0 0 4px; }
.rv-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rv-tools select { max-width: 260px; }
.rv-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.rv-chip-find { flex: 1 1 220px; min-width: 0; max-width: 100%; font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--sheet); color: var(--ink); }
.rv-chips .chip[aria-pressed="true"] { background: #123E35; color: #fff; border-color: #123E35; }
.rv-chips > .chip.chip.chip { margin: 0; }  /* (beats ds.css's ":is(.chip ...) + :is(.chip ...)" margin) every row of chips starts at the same edge (super-user walk, 1 November 2026, item 58) */
.rv-chips { align-items: flex-start; justify-content: flex-start; }
.rv-chips > .chip { max-width: 100%; min-width: 0; overflow-wrap: anywhere; white-space: normal; text-align: left; }  /* a long name with no space breaks inside its chip, never past the screen (super-user walk, 11 November 2026) */
.rv-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.rv-f { display: flex; flex-direction: column; gap: 2px; font-size: .82rem; color: #5B6560; min-width: 0; }
.rv-f select, .rv-f input { width: 100%; min-width: 0; box-sizing: border-box; }
/* The filters and the choices on Records are drawn as every other field in the app, not as the browser's own. */
.rv-tools select, .rv-f select, .rv-f input, .rc-opt select, .rc-add select { font: inherit; color: var(--ink); background: var(--sheet); padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); min-height: 40px; font-size: .95rem; }
@media (pointer: coarse), (max-width: 640px) { .rv-tools select, .rv-f select, .rv-f input, .rc-opt select, .rc-add select { min-height: 44px; font-size: 16px; } }
.rv-showing { font-size: .88rem; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip.static { display: inline-block; padding: 2px 8px; border-radius: 12px; background: #F2F4F3; border: 1px solid #D9DED9; font-size: .8rem; color: #123E35; }
span.chip.static { min-height: 0; }  /* a label, not a button: on a phone the 44 px of a tap target left an empty line under its words (Records, seen 1 December 2026) */
.rv-st { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 650; }
.rv-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #8FA39A; }
.rv-green { color: #1F6B3A; } .rv-green .rv-dot { background: #1F6B3A; }
.rv-amber { color: #8A5A00; } .rv-amber .rv-dot { background: #B97A00; }
.rv-red { color: #9D2B25; } .rv-red .rv-dot { background: #9D2B25; }
.rv-grey { color: #5B6560; } .rv-grey .rv-dot { background: #8FA39A; }
/* The events beside the log only where the log's five columns fit beside them; otherwise above it, as a short list
   that scrolls (live walk, 30 November 2026: on a 1,280 px screen the log was squeezed to 670 px, each row ran to
   850 px tall and the Reply column, with what is overdue, was off the screen). */
.rv-grid { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; container-type: inline-size; }
.rv-grid > .rv-events { flex: 1 1 240px; min-width: 0; }
.rv-grid > .rv-main { flex: 999 1 820px; }
@container (max-width: 1077px) { .rv-events ul { max-height: 232px; overflow-y: auto; padding-right: 4px; } }
.rv-events ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rv-ev { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid #D9DED9; border-radius: 8px; background: #fff; font: inherit; cursor: pointer; color: #123E35; }
.rv-ev[aria-pressed="true"] { border-color: #123E35; box-shadow: inset 3px 0 0 #C4F578; }
.rv-main { min-width: 0; }
.rv-log { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 820px; }
.rv-log th:nth-child(2) { width: 34%; } .rv-log th:nth-child(3) { width: 15%; } .rv-log th:nth-child(5) { width: 16%; }
.rv-log th, .rv-log td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid #D9DED9; }
.rv-log td strong, .rv-line, .rv-log td .hint { display: block; }
.rv-line { color: #123E35; margin: 2px 0; }
.rv-date { white-space: nowrap; }
.rv-here { background: #F6FBEA; }
.rv-linked, .rv-reply { display: flex; flex-direction: column; gap: 4px; }
.rv-lks { display: flex; gap: 4px; flex-wrap: wrap; }
.rv-prop { border-style: dashed; background: #FFF4DC; color: #8A5A00; }
.rv-pk { background: #fff; }
.rv-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.rv-types { font-size: .85rem; }
.rv-tl-scroll { overflow-x: auto; border: 1px solid #D9DED9; border-radius: 8px; background: #fff; }
.rv-tl { display: block; width: 100%; min-width: 760px; height: auto; font-family: inherit; }
.rv-tl-row { cursor: pointer; outline: none; }
.rv-tl-row:focus rect:first-child { stroke: #123E35; }
.rv-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 10px 0; font-size: .82rem; color: #123E35; }
.rv-legend li { display: inline-flex; align-items: center; gap: 6px; }
.rv-key { width: 11px; height: 11px; border-radius: 50%; display: inline-block; border: 1px solid #123E35; }
.rv-win { border-radius: 2px; width: 18px; background: rgba(196, 245, 120, .45); border-style: dashed; }
.rv-evl { border-radius: 0; width: 3px; height: 14px; background: #123E35; }
.rv-dia { border-radius: 1px; transform: rotate(45deg); border: 0; }
.rv-today { border-radius: 0; width: 2px; height: 14px; background: #9D2B25; border: 0; }
.rv-facts { border: 1px solid #D9DED9; border-radius: 8px; padding: 12px 16px; margin: 12px 0; background: #fff; }
.rv-facts h3, .rv-facts h4 { margin: 8px 0 4px; }
.rv-askbox { border-left: 3px solid #C4F578; padding: 4px 0 4px 12px; margin: 10px 0; }
/* The Dashboard's actions from the records, each with its status word and one button. */
.rv-acts .rv-act { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #D9DED9; }
.rv-act-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-act .btn { flex: none; }
.dn-recs { margin: 14px 0; }
/* The project's Records tab: the Excel export in three steps. */
.rc-step { min-width: 0; max-width: 100%; box-sizing: border-box; border: 1px solid #D9DED9; border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.rc-step legend { font-weight: 650; padding: 0 4px; }
.rc-opt { overflow-wrap: anywhere; min-width: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 4px 0; }
.rc-opt select, .rc-opt input[type="text"] { max-width: 100%; min-width: 0; flex: 1 1 12rem; }  /* a long event name never widens the page (live walk, 2 November 2026) */
.rc-sheets { font-size: .88rem; }
@media (max-width: 600px) {
  .rv-acts .rv-act { flex-direction: column; align-items: stretch; }
  .rv-tools { width: 100%; } .rv-tools select { max-width: 100%; flex: 1 1 100%; }
  .rv-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The registers' reason line (registersCard, ew2/web/app.js) keeps its margin. */
.rg-why { margin: 8px 12px 0; }
/* The submittal register in the Registers hub (submittalsCard, ew2/web/app.js) */
.sm-card .sm-chart { margin: 8px 0 12px; }
.sm-card .sm-chart img { display: block; max-width: 100%; height: auto; border: 1px solid #D9DED9; border-radius: 8px; background: #fff; }
.sm-card .sm-sub { display: block; }
/* A date read two ways, ticked in place on the Dashboard (rvTickDate) */
.rd-choices { border: 0; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.rd-choices legend { font-weight: 650; margin-bottom: 4px; }
.rd-choice { display: flex; gap: 8px; align-items: center; }
.claim-approach { margin: 14px 0; }
.claim-approach .rv-chips { flex-wrap: wrap; }
.sm-card .sm-st .rv-st { white-space: nowrap; }
.rd-yesno { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* On a phone the records log is one card a record, each value under its own label, never a table that scrolls sideways
   and hides half of itself (super-user sweep, 2 November 2026: 462 px hidden at 390 px). */
@media (max-width: 640px) {
  .rc-scroll { overflow-x: visible; }
  table.rv-log, table.rv-log tbody, table.rv-log tr, table.rv-log td { display: block; width: auto; min-width: 0; }
  table.rv-log thead { display: none; }
  table.rv-log tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.rv-log td { padding: 2px 0; border: 0; }
  table.rv-log td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--ink-2); }
  table.rv-log td.rv-date::before { display: none; }
}
/* Records > Event threads (ew2/web/eventthreads.js; Han, 4 November 2026, 21:39 KSA): one card per event, the steps
   left to right in date order; on a phone (and up to 820 px) the steps stack. The house palette, the word always kept:
   ours ink, theirs lime, a gap red dashed, our next deadline amber, their next duty faded. Names wrap; nothing is cut. */
.et { min-width: 0; }
.et-filters { margin: 10px 0 4px; }
.et-legend .rv-key { border-radius: 2px; }
.et-key-us { background: #123E35; } .et-key-them { background: #C4F578; } .et-key-gap { background: #fff; border: 2px dashed #9D2B25; } .et-key-next { background: #B97A00; border-color: #B97A00; }
.et-card { border: 1px solid #D9DED9; border-radius: 12px; background: #fff; padding: 14px 16px 14px 26px; margin: 0 0 12px; min-width: 0; }
.et-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.et-title { min-width: 0; flex: 1 1 auto; }
.et-title h3 { margin: 0; font-size: 1.05rem; color: #123E35; overflow-wrap: anywhere; }
.et-meta { margin: 2px 0 0; color: #5B6560; font-size: .86rem; overflow-wrap: anywhere; }
.et-badge { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; border-radius: 12px; padding: 3px 10px; white-space: nowrap; }
.et-badge.et-red { background: #FBECEA; color: #9D2B25; } .et-badge.et-red .rv-dot { background: #9D2B25; }
.et-badge.et-amber { background: #FFF4DC; color: #8A5A00; } .et-badge.et-amber .rv-dot { background: #B97A00; }
.et-badge.et-green { background: #E6F2EA; color: #1F6B3A; } .et-badge.et-green .rv-dot { background: #1F6B3A; }
/* Left to right, then on to the next row: a long thread wraps inside the card, never past it (walk, 4 November 2026). */
.et-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: stretch; }
.et-step { position: relative; flex: 1 0 180px; max-width: 320px; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 10px 14px;
  background: #FAFBF8; border-radius: 8px; border-left: 3px solid #D9DED9; font-size: .84rem; }
.et-step + .et-step::before { content: "→"; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); color: #5B6560; }
.et-side-us { border-left-color: #123E35; } .et-side-them { border-left-color: #C4F578; }
.et-who { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5B6560; overflow-wrap: anywhere; }
.et-what { font-weight: 650; color: #123E35; overflow-wrap: anywhere; }
.et-ref, .et-when, .et-basis, .et-also { color: #5B6560; overflow-wrap: anywhere; }
.et-also { font-size: 12px; font-style: italic; }
.et-just { outline: 3px solid #C4F578; outline-offset: 2px; }
.et-link-note { flex: 0 1 220px; color: #5B6560; font-size: 13px; overflow-wrap: anywhere; }
.et-link { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.et-link .rv-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.et-link select { max-width: 100%; width: 100%; min-height: 44px; font-size: 16px; padding: 8px 10px; }
.et-link .btn { align-self: flex-start; }
.et-link-rec { overflow-wrap: anywhere; }
.et-gap { border: 2px dashed #9D2B25; border-left: 2px dashed #9D2B25; background: #FFF6F5; }
.et-gap .et-what { color: #9D2B25; }
.et-next.et-side-us { border-left-color: #B97A00; background: #FFFAF0; }
.et-next.et-side-them { opacity: .78; }
.et-check { color: #9D2B25; font-weight: 650; overflow-wrap: anywhere; }
.et-checks { border-left: 3px solid #9D2B25; padding: 4px 0 4px 12px; margin: 8px 0 12px; }
.et-draft { align-self: flex-start; margin-top: 4px; }
.et-more { display: block; margin: 0 0 8px; }
.et-loose { border: 1px solid #D9DED9; border-radius: 12px; background: #fff; padding: 14px 16px; margin: 0 0 12px; }
.et-loose h3 { margin: 0 0 6px; font-size: 1.05rem; }
.et-loose-list { list-style: none; margin: 0; padding: 0; }
.et-loose-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #EEF1EE; }
.et-loose-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.et-loose-list .btn { flex: none; }
@media (max-width: 820px) {
  .et-steps { flex-direction: column; flex-wrap: nowrap; gap: 18px; }
  .et-step { flex: 0 0 auto; max-width: none; }
  .et-step + .et-step::before { content: "↓"; left: 14px; top: -17px; transform: none; line-height: 1; }
}
@media (max-width: 600px) {
  .et-head { flex-direction: column; }
  .et-loose-list li { flex-direction: column; align-items: stretch; }
}
.et-owed { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 0 1 260px; }
@media (max-width: 600px) { .et-owed { flex: 1 1 auto; } .et-link-note { flex: none; } }
