/* The requests board and the request slideover (mockups/intake/requests.html).
   Loads after design-system.css and app.css, which own the board chrome and
   the slideover frame. Only what this page adds: column widths, the document
   strip in the pane, the email card and the photo frame, and the field rows by
   confidence. Nothing below 11px outside .paper. */

  /* ── the board ────────────────────────────────────────────────────────── */
  .board { table-layout: fixed; }
  .board th, .board td { white-space: nowrap; }
  .board col.c-received { width: 110px; }
  .board col.c-from     { width: 190px; }
  .board col.c-place    { width: 130px; }
  .board col.c-service  { width: 110px; }
  .board col.c-load     { width: 160px; }
  .board col.c-route    { width: 150px; }
  .board col.c-vd       { width: 82px; }
  .board th.c, .board td.c { text-align: center; }
  /* A section's verdict as three bars, like a priority glyph: three lit when
     every field is sure, two when something needs a Confirm, one when a
     question is open. */
  .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; vertical-align: middle; }
  .bars i { display: block; width: 3px; border-radius: 1px; background: color-mix(in srgb, var(--color-text-tertiary) 35%, transparent); }
  .bars i:nth-child(1) { height: 5px; }
  .bars i:nth-child(2) { height: 8px; }
  .bars i:nth-child(3) { height: 12px; }
  .bars.l1 i:nth-child(1), .bars.l2 i:nth-child(-n+2), .bars.l3 i { background: var(--color-text-secondary); }
  .bars.l3 i { background: var(--color-text-primary); }
  .board td .bars { height: 13px; }
  .board tbody tr { cursor: pointer; }
  .board tbody tr:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
  .over-by { color: var(--color-status-progress); font-variant-numeric: tabular-nums; }
  .tag.ok { background: color-mix(in srgb, var(--color-status-done) 12%, transparent); color: var(--color-status-done); }
  .tag.ok .pip { background: var(--color-status-done); }
  .pill.ok { background: color-mix(in srgb, var(--color-status-done) 14%, transparent); color: var(--color-status-done); }
  .pill.warn { background: color-mix(in srgb, var(--color-status-progress) 14%, transparent); color: var(--color-status-progress); }

  /* ── the slideover ────────────────────────────────────────────────────── */
  .over { width: min(1280px, calc(100vw - 120px)); }
  .over .over-head .why { font-size: 12px; color: var(--color-text-tertiary); }
  .over .over-head .links a { text-decoration: none; }
  .over .over-body { grid-template-columns: minmax(0, 1fr) 500px; }

  /* The pane: the sticky line says where it came from and holds the strip
     that switches which document is shown. The thread is first. */
  .doc .from { display: flex; flex-direction: column; gap: 8px; }
  .docstrip { display: flex; flex-wrap: wrap; gap: 6px; }
  .dchip { height: 24px; padding: 0 10px; border-radius: var(--radius-full); border: 1px solid var(--color-border-default); background: transparent; color: var(--color-text-secondary); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
  .dchip:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
  .dchip[aria-pressed="true"] { background: var(--color-bg-active); color: var(--color-text-primary); border-color: var(--color-border-strong); }
  .dchip .n { font-size: 11px; color: var(--color-text-tertiary); }
  .doc .docs { padding: 16px; display: flex; flex-direction: column; gap: 14px; align-items: center; }

  .mailcard { width: 100%; max-width: 680px; border: 1px solid var(--color-border-default); border-radius: var(--radius-lg); background: var(--color-bg-elevated); padding: 12px 14px; }
  .mailcard .mh { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-bottom: 8px; }
  .mailcard .who { font-size: 12px; font-weight: 600; color: var(--color-text-primary); }
  .mailcard .tm { font-size: 11px; color: var(--color-text-tertiary); text-align: right; }
  .mailcard .tm .later { color: var(--color-status-progress); }
  .mailcard .subj { grid-column: 1 / -1; font-size: 12px; color: var(--color-text-secondary); }
  .mailcard .mb { font-size: 13px; line-height: 1.55; color: var(--color-text-primary); }
  .mailcard .mb .quoted { display: block; margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--color-border-default); color: var(--color-text-secondary); font-size: 12px; }
  .mailcard .atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  .mailcard .att { font-size: 11px; padding: 2px 8px; border-radius: var(--radius-full); background: var(--color-bg-active); color: var(--color-text-secondary); }
  .doc mark { background: color-mix(in srgb, var(--color-accent) 18%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
  .paper mark { background: #fff3b0; }
  .doc .flash { animation: markflash 1.2s ease-out; }
  @keyframes markflash { 0% { background: var(--color-accent); color: var(--color-primary-foreground); box-shadow: 0 0 0 3px var(--color-accent); } 100% { } }

  .paper.req { width: 100%; max-width: 680px; min-height: 0; padding: 26px 30px; }
  .paper.req .lh h3 { font-size: 13px; letter-spacing: .08em; }
  .paper.req table.facts2 { margin-top: 12px; }
  .paper.req table.facts2 th { width: 120px; text-align: left; font-size: 10px; letter-spacing: .08em; color: #5a5a63; border-bottom: 1px solid #e4e4e0; padding: 6px 0; text-transform: uppercase; font-weight: 600; vertical-align: top; }
  .paper.req table.facts2 td { padding: 6px 0; font-size: 11px; border-bottom: 1px solid #e4e4e0; }
  .paper.req .hand { margin-top: 14px; font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; font-size: 13px; color: #1d3f8f; transform: rotate(-1.5deg); }

  /* A real document: the PDF or the images, then the lines Winch read from it. */
  .realdoc { width: 100%; max-width: 680px; }
  .realdoc .dh { display: flex; gap: 10px; align-items: baseline; font-size: 12px; color: var(--color-text-secondary); margin-bottom: 8px; }
  .realdoc .dh b { color: var(--color-text-primary); font-weight: 600; }
  .realdoc .dh .pg { margin-left: auto; font-size: 11px; color: var(--color-text-tertiary); }
  .realdoc iframe.pdf { width: 100%; height: 820px; border: 1px solid var(--color-border-default); border-radius: var(--radius-lg); background: #fff; display: block; }
  .realdoc img, .photo.real img { width: 100%; display: block; border-radius: var(--radius-lg); border: 1px solid var(--color-border-default); background: #111; }
  .realdoc img + img, .photo.real img + img { margin-top: 10px; }
  .read { margin-top: 10px; border: 1px solid var(--color-border-default); border-radius: var(--radius-lg); background: var(--color-bg-elevated); padding: 10px 12px; }
  .read .rt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-tertiary); margin-bottom: 4px; }
  .read table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .read th { text-align: left; font-weight: 500; color: var(--color-text-tertiary); width: 110px; padding: 3px 8px 3px 0; vertical-align: top; white-space: nowrap; }
  .read td { padding: 3px 0; color: var(--color-text-primary); }
  .read .nt { margin-top: 6px; font-size: 12px; color: var(--color-text-secondary); }

  .photo { width: 100%; max-width: 680px; margin: 0; }
  .photo .frame { height: 300px; border-radius: var(--radius-lg); border: 1px dashed var(--color-border-strong); background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--color-border-subtle) 60%, transparent) 10px 11px); display: grid; place-items: center; color: var(--color-text-tertiary); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
  .photo figcaption { font-size: 12px; color: var(--color-text-secondary); margin-top: 8px; line-height: 1.5; }

  /* ── the right column: v1's form, one card per section ──────────────── */
  .rail-r { display: flex; flex-direction: column; gap: 10px; }
  .rail-r > * { flex: none; }
  .card.sec { padding: 0; border-left: 3px solid var(--color-border-strong); overflow: hidden; }
  .card.sec.ok { border-left-color: var(--color-status-done); }
  .card.sec.confirm { border-left-color: var(--color-status-progress); }
  .card.sec.ask { border-left-color: var(--color-accent); }
  .card.sec.plain { border-left-color: var(--color-border-default); }
  /* The header is a band: its own background, a rule beneath it, the name set
     heavier and larger than anything in the body. */
  .shead { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px 8px 14px; cursor: pointer; user-select: none; background: color-mix(in srgb, var(--color-bg-active) 70%, var(--color-bg-elevated)); border-bottom: 1px solid var(--color-border-default); }
  .shead:hover { background: var(--color-bg-active); }
  .sec:not(.open) .shead { border-bottom-color: transparent; }
  .sec.ok .shead { background: color-mix(in srgb, var(--color-status-done) 6%, var(--color-bg-elevated)); }
  .sec.confirm .shead { background: color-mix(in srgb, var(--color-status-progress) 8%, var(--color-bg-elevated)); }
  .sec.ask .shead { background: color-mix(in srgb, var(--color-accent) 8%, var(--color-bg-elevated)); }
  .plain .shead { cursor: default; }
  .plain .shead:hover { background: none; }
  .shead .nm { font-size: 14px; font-weight: 650; letter-spacing: -.01em; color: var(--color-text-primary); white-space: nowrap; }
  .shead .why { font-size: 11px; color: var(--color-text-secondary); white-space: nowrap; padding: 1px 7px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--color-text-tertiary) 14%, transparent); }
  .shead .why:empty { display: none; }
  .shead .sum { flex: 1; min-width: 0; font-size: 12px; color: var(--color-text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
  .sec.open .shead .sum { visibility: hidden; }
  .shead .srcs { font: inherit; font-size: 11px; color: var(--color-text-tertiary); background: none; border: 0; cursor: pointer; padding: 0; white-space: nowrap; }
  .shead .srcs:hover { color: var(--color-text-accent); }
  .shead .caret { width: 7px; height: 7px; border-right: 1.5px solid var(--color-text-tertiary); border-bottom: 1.5px solid var(--color-text-tertiary); transform: rotate(-45deg); margin: 0 2px 0 4px; transition: transform .15s; }
  .sec.open .shead .caret { transform: rotate(45deg); margin-bottom: 4px; }
  .plain .shead .caret { display: none; }
  .sec:not(.open) .sbody { display: none; }
  .sbody .fields .fr:first-child { border-top: 0; }
  .sbody .sure { padding: 12px 14px 14px; }
  .sbody .fields + .sure { border-top: 1px solid var(--color-border-subtle); }
  .sbody .sure:empty, .sbody .sure:has(.cells:empty) { display: none; }
  .sbody .kvl { border-top: 1px solid var(--color-border-subtle); }
  /* What Winch was sure of: a compact grid, sources hidden until asked for. */
  .cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
  .cells .cell { min-width: 0; padding: 0; background: none; border: 0; }
  .cells .cell .v .chip { margin-left: 8px; }
  .cells .cell .k { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 1px; }
  .cells .cell .v { font-size: 13px; color: var(--color-text-primary); line-height: 1.35; }
  .cells .cell .v .none { color: var(--color-text-tertiary); }
  .place { display: block; font-size: 12px; color: var(--color-text-secondary); }
  .fr .v .place { flex-basis: 100%; }
  .contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
  .contact .co { font-size: 15px; font-weight: 600; color: var(--color-text-primary); line-height: 1.3; }
  .contact .kind { font-size: 12px; color: var(--color-text-tertiary); margin-top: 2px; }
  .prog { display: inline-block; font-size: 11px; line-height: 18px; padding: 0 7px; margin-left: 6px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--color-accent) 14%, transparent); color: var(--color-text-accent); white-space: nowrap; vertical-align: 1px; }
  .contact .prog { margin: 4px 0 0; }
  .fr .k .prog { text-transform: none; letter-spacing: 0; }
  .contact .who { font-size: 13px; font-weight: 500; color: var(--color-text-primary); }
  .contact .line { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; overflow-wrap: anywhere; }
  .secwrap:not(.show-src) .sure .s { display: none; }
  .sure .s { margin-left: 4px; }
  .card.fields { padding: 2px 0; }
  /* An attention row: the label over the value, like a cell, but the value
     set larger and heavier than anything that is already sure. */
  .fr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 3px 12px; align-items: start; padding: 10px 14px 11px; border-top: 1px solid var(--color-border-subtle); font-size: 13px; }
  .fr:first-child { border-top: 0; }
  .fr .k { grid-column: 1; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-tertiary); display: flex; align-items: center; }
  .fr .v { grid-column: 1; color: var(--color-text-primary); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
  .fr .v .t { min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
  .fr.low .v .t, .fr .lst { font-size: 13px; font-weight: 500; }
  .fr .act { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .fr .choice { height: 28px; padding: 0 11px; font-size: 13px; }
  .fr .choice .t { font-size: 13px; font-weight: 600; }
  .fr.ask .t.part { font-size: 14px; font-weight: 500; }
  /* A source is an icon; hover says where. */
  .s { display: inline-flex; align-items: center; color: var(--color-text-tertiary); text-decoration: none; vertical-align: -1px; margin-left: 2px; }
  .s:hover { color: var(--color-text-accent); }
  .s svg { display: block; }
  .info { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; margin-left: 5px; border-radius: 50%; border: 1px solid var(--color-border-strong); color: var(--color-text-tertiary); font-size: 9px; font-style: italic; font-family: Georgia, serif; vertical-align: 1px; cursor: help; }
  .info:hover { color: var(--color-text-primary); border-color: var(--color-text-secondary); }
  .choices { display: inline-flex; gap: 4px; flex-wrap: wrap; flex: 1 1 0; min-width: 0; }
  .choice { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--radius-full); border: 1px solid var(--color-border-default); background: transparent; color: var(--color-text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
  .choice:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
  .choice.on { border-color: var(--color-status-progress); color: var(--color-text-primary); background: color-mix(in srgb, var(--color-status-progress) 14%, transparent); }
  .choice .s { color: inherit; opacity: .7; }
  .fr .s.you { border: 0; }
  .fr .hint { flex-basis: 100%; font-size: 11px; color: var(--color-status-progress); }
  .fr .alt { flex-basis: 100%; font-size: 11px; color: var(--color-text-secondary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .fr .act { display: flex; gap: 4px; }
  .fr .mini { height: 26px; padding: 0 10px; font-size: 12px; }
  .fr.medium { background: color-mix(in srgb, var(--color-status-progress) 6%, transparent); }
  .fr.medium .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--color-status-progress); align-self: center; }
  .fr.low .v { color: var(--color-text-secondary); }
  .fr .k:empty, .cells .cell .k:empty { display: none; }
  .fr .k > .sug:first-child { margin-left: 0; }
  .fr .sug { font-size: 10px; letter-spacing: .08em; color: var(--color-text-tertiary); padding: 0 5px; margin-left: 8px; border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); line-height: 15px; }
  .fr .k .s { margin-left: 6px; }
  .fr .none { color: var(--color-text-tertiary); }
  .fr.ask .t.part { color: var(--color-text-secondary); }
  /* A list field: Special Requirements, Other Services, Special Equipment. */
  .lst { margin: 0; padding-left: 16px; flex-basis: 100%; }
  .lst li { margin: 1px 0; }
  .cells .cell.wide { grid-column: 1 / -1; }
  .cells .cell .lst { padding-left: 14px; }
  .fr .edit.multi { height: auto; min-height: 60px; padding: 4px 6px; resize: vertical; font-size: 12px; line-height: 1.4; }
  .fr .chip, .cells .chip { font-size: 11px; padding: 1px 7px; border-radius: var(--radius-full); background: var(--color-bg-active); color: var(--color-text-secondary); white-space: nowrap; }
  .cells .chip.dim { color: var(--color-text-tertiary); font-size: 11px; vertical-align: 1px; }
  .fr .tick { font-size: 11px; color: var(--color-status-done); white-space: nowrap; }
  .fr .edit { font: inherit; font-size: 12px; width: 100%; height: 24px; padding: 0 6px; border-radius: var(--radius-sm); border: 1px solid var(--color-accent); background: var(--color-bg-base); color: var(--color-text-primary); }
  .mini { height: 22px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--color-border-default); background: transparent; color: var(--color-text-secondary); font-size: 11px; cursor: pointer; white-space: nowrap; }
  .mini:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
  .mini.primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-primary-foreground); }
  .mini.primary:hover { background: var(--color-accent-hover); }
  .mini.ghost { opacity: 0; }
  .fr:hover .mini.ghost { opacity: 1; }

  .kvl { padding: 4px 0; }
  .kvl > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; border-top: 1px solid var(--color-border-subtle); font-size: 12px; }
  .kvl > div:first-child { border-top: 0; }
  .kvl .k { color: var(--color-text-tertiary); }
  .kvl .v { color: var(--color-text-primary); text-align: right; }
  .kvl .v b { font-weight: 600; }

  /* Winch's draft reply, the last card in the thread. Structured: a heading
     per part, label/value rows for the services and the load, the questions
     as a list, one line for what is next. */
  .mailcard.draft { border-style: dashed; border-color: color-mix(in srgb, var(--color-accent) 55%, transparent); background: color-mix(in srgb, var(--color-accent) 5%, var(--color-bg-elevated)); }
  .mailcard.draft .who { color: var(--color-text-accent); }
  .mailcard.draft.flash { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 45%, transparent); transition: box-shadow .2s; }
  .reply .mb { font-size: 13px; }
  /* The letter is for the customer; the QB sees the questions. */
  .draft .mh { margin-bottom: 0; }
  .draft .letter { margin-top: 10px; padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--color-accent) 40%, transparent); }
  /* The letter itself: a head with the number and the subject, numbered
     steps for the job, a strip of facts for the load, numbered questions,
     one line for what comes next, a sign-off. */
  .letter .lt-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
  .letter .lt-no { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--color-text-primary); }
  .letter .lt-sub { font-size: 12px; color: var(--color-text-secondary); }
  .letter .lt-addr { margin: 10px 0 4px; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--color-border-subtle); background: color-mix(in srgb, var(--color-bg-base) 60%, transparent); line-height: 1.45; }
  .letter .lt-addr .k { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 2px; }
  .letter .lt-addr .nm { font-weight: 600; }
  .letter .lt-addr .nt { margin-top: 4px; font-size: 12px; color: var(--color-text-secondary); }
  .letter h4 { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--color-text-primary); text-transform: none; letter-spacing: 0; }
  .letter ol { margin: 0; padding-left: 22px; }
  .letter ol li { margin: 3px 0; padding-left: 2px; line-height: 1.45; }
  .letter ol li::marker { color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
  .letter .steps li b { font-weight: 600; margin-right: 6px; }
  .letter .plan + .plan { margin-top: 8px; }
  .letter .plan .pn { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); margin: 2px 0 3px; }
  .letter .steps li span { color: var(--color-text-primary); }
  .letter .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 10px 12px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-bg-base) 60%, transparent); border: 1px solid var(--color-border-subtle); }
  .letter .fact .k { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 1px; }
  .letter .fact .v { font-size: 13px; color: var(--color-text-primary); }
  .letter .qs2 li { background: color-mix(in srgb, var(--color-accent) 12%, transparent); border-radius: 3px; padding: 2px 6px; width: fit-content; }
  .letter .lt-next { display: flex; gap: 10px; align-items: baseline; margin-top: 14px; padding: 8px 12px; border-left: 3px solid var(--color-accent); background: color-mix(in srgb, var(--color-accent) 8%, transparent); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
  .letter .lt-next b { font-weight: 600; white-space: nowrap; }
  .letter .lt-sign { margin-top: 12px; font-size: 11px; color: var(--color-text-tertiary); }
  .reply p { margin: 0 0 6px; color: var(--color-text-primary); line-height: 1.5; }
  .reply ul { margin: 0; padding-left: 16px; color: var(--color-text-primary); }
  .reply ul li { margin: 2px 0; }
  .reply .rh { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-tertiary); margin: 10px 0 3px; }
  .reply table.rt { border-collapse: collapse; width: 100%; font-size: 13px; }
  .reply table.rt th { text-align: left; font-weight: 500; color: var(--color-text-secondary); width: 90px; padding: 2px 8px 2px 0; vertical-align: top; white-space: nowrap; }
  .reply table.rt td { padding: 2px 0; color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
  .dchip.draftchip { border-style: dashed; margin-left: 4px; }

  .over .over-foot { gap: 8px; align-items: center; flex-wrap: wrap; }
  .over .over-foot .foot-note { font-size: 12px; color: var(--color-text-tertiary); margin-left: auto; }
  .over .over-foot .auto { font-size: 12px; color: var(--color-status-done); margin-right: auto; }
  .over .over-foot .done { flex-basis: 100%; border-top: 0; padding: 6px 0 0; background: none; }
  .top .lnk { margin-left: 8px; }
  /* The board summary row is sticky and stacked; the slideover must sit above it. */
  .scrim { z-index: 55; }
  .over { z-index: 60; }
