/* Replies: inbox by due time, the composer, the paste box and the LinkedIn export drop zone. Single column on a phone. */
.replies-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: var(--s5); align-items: start; }
.replies-main, .replies-side { min-width: 0; }
.replies-strip .stat { min-width: 132px; flex: 1; }
.replies-hints { margin: 0 0 var(--s4); padding: 0; list-style: none; font-size: var(--t-sm); color: var(--muted); }
.replies-hints li { padding: 4px 0 4px var(--s3); border-left: 2px solid var(--line-2); margin-bottom: 4px; }
.replies-hints a { color: var(--blue); text-decoration: none; }
.section-head { display: flex; align-items: baseline; gap: var(--s2); margin: var(--s5) 0 var(--s3); }
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-size: var(--t-md); }
.section-head .count { font-family: var(--font-mono); color: var(--muted-2); font-size: var(--t-xs); }

/* inbox cards */
.reply-card { padding: var(--s4); }
.reply-card.open { border-color: var(--line-3); }
.reply-head { display: flex; gap: var(--s3); align-items: flex-start; cursor: pointer; min-height: 32px; }
.reply-who { min-width: 0; flex: 1; }
.reply-who .name { font-weight: 600; display: block; }
.reply-meta { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.reply-meta .conf { color: var(--muted); font-size: var(--t-xs); }
.due { font-family: var(--font-mono); font-size: var(--t-xs); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.due.amber { color: var(--accent); }
.due.red { color: var(--red); font-weight: 600; }
.reply-snippet { color: var(--text-2); font-size: var(--t-sm); margin-top: var(--s2); line-height: 1.5; }
.reply-card.open .reply-snippet { display: none; }

/* composer */
.composer { margin-top: var(--s3); border-top: 1px solid var(--line); padding-top: var(--s4); }
.composer .block { margin-bottom: var(--s4); }
.composer .label { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.inbound { background: var(--bg); border: 1px solid var(--line); border-left: 2px solid var(--line-3); border-radius: var(--radius); padding: var(--s3); white-space: pre-wrap; font-size: var(--t-sm); line-height: 1.55; word-break: break-word; }
.inbound .k { display: block; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted-2); margin-bottom: 4px; white-space: normal; }
.class-row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; font-size: var(--t-sm); }
.class-row .summary { flex-basis: 100%; color: var(--text-2); line-height: 1.5; }
.class-row .src { color: var(--muted-2); font-size: var(--t-xs); }
.objection p { margin: 0 0 var(--s2); font-size: var(--t-sm); line-height: 1.55; }
.objection .says { color: var(--muted); font-style: italic; }
.thread { font-size: var(--t-sm); }
.thread summary { cursor: pointer; color: var(--muted); min-height: 32px; display: flex; align-items: center; list-style: none; }
.thread summary::before { content: '+'; font-family: var(--font-mono); margin-right: 8px; color: var(--muted-2); }
.thread[open] summary::before { content: '\2212'; }
.thread .msg { padding: 6px 0 6px var(--s3); border-left: 2px solid var(--line); margin: 6px 0; white-space: pre-wrap; line-height: 1.5; }
.thread .msg.out { border-left-color: var(--accent-line); }
.thread .msg .k { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted-2); display: block; }
.draft textarea { width: 100%; min-height: 150px; resize: vertical; font-family: var(--font-mono); font-size: var(--t-sm); line-height: 1.55; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); }
.draft textarea:focus { border-color: var(--accent); outline: none; }
.draft-status { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin: 6px 0; font-size: var(--t-xs); color: var(--muted); }
.lint-list { margin: 4px 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--accent); line-height: 1.6; }
.facts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.facts .fact { font-size: var(--t-xs); color: var(--muted); border: 1px solid var(--line); border-radius: 2px; padding: 1px 6px; }
.kit label { display: flex; gap: var(--s2); align-items: center; min-height: 32px; font-size: var(--t-sm); cursor: pointer; }
.kit input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.kit .hint { font-size: var(--t-xs); color: var(--muted-2); margin-top: 2px; }
.composer-actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-top: var(--s3); }
.composer-actions .gate { font-size: var(--t-xs); color: var(--muted); flex-basis: 100%; }
.composer-actions .vanity { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--text-2); }
.phone-line { font-size: var(--t-sm); color: var(--muted); }
.phone-line .num { color: var(--text); }
.draft-empty { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; font-size: var(--t-sm); color: var(--muted); }

/* unmatched senders */
.unmatched-row { display: flex; gap: var(--s3); align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.unmatched-row:last-child { border-bottom: 0; }
.unmatched-row .who { flex: 1; min-width: 200px; }
.unmatched-row .who strong { display: block; }
.unmatched-row .who a { color: var(--blue); font-size: var(--t-xs); text-decoration: none; word-break: break-all; }
.unmatched-row .snippet { color: var(--muted); font-size: var(--t-sm); display: block; margin-top: 2px; }
.link-ctl { position: relative; min-width: 220px; flex: 1; }
.link-ctl input, .person-search input { width: 100%; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); border-radius: var(--radius); font-size: var(--t-sm); outline: none; }
.link-ctl input:focus, .person-search input:focus { border-color: var(--accent); }
.person-search { position: relative; }
.person-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-sm); max-height: 240px; overflow-y: auto; }
.person-results button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; min-height: 32px; cursor: pointer; color: var(--text); font-size: var(--t-sm); }
.person-results button:last-child { border-bottom: 0; }
.person-results button:hover { background: var(--surface-3); }
.person-results button .sub { display: block; }
.person-results .none { padding: 8px 10px; color: var(--muted); font-size: var(--t-sm); }
.person-picked { display: inline-flex; gap: var(--s2); align-items: center; min-height: 32px; padding: 4px 6px 4px 10px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--radius); font-size: var(--t-sm); }
.person-picked .sub { color: var(--muted); }

/* side tools */
.side-card h3 { margin-bottom: var(--s3); }
.side-card .field { margin-bottom: var(--s3); }
.side-card .field textarea { min-height: 110px; resize: vertical; font-size: var(--t-sm); line-height: 1.5; }
.side-card .field input[type="datetime-local"], .side-card .field select { min-height: 36px; font-family: var(--font-mono); font-size: var(--t-sm); }
.side-card .field select { font-family: var(--font-body); }
.side-card p.sub { margin: 0 0 var(--s3); line-height: 1.5; }
.drop-zone { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: var(--s4); text-align: center; color: var(--muted); font-size: var(--t-sm); display: flex; flex-direction: column; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.drop-zone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.drop-zone .file-name { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-2); }
.import-result { margin-top: var(--s3); border-top: 1px solid var(--line); padding-top: var(--s3); }
.import-result .line { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-2); word-break: break-word; line-height: 1.6; }
.import-result .line.ok { color: var(--green); }
.import-actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); }

@media (max-width: 900px) {
  .replies-layout { grid-template-columns: 1fr; }
  .replies-strip .stat { min-width: calc(50% - var(--s2)); }
  .reply-head { flex-direction: column; gap: var(--s2); }
  .reply-meta { justify-content: flex-start; }
  .composer-actions .btn { flex: 1; min-width: 120px; }
  .unmatched-row .who { min-width: 0; flex-basis: 100%; }
}
