/* Merrow & Hale intake queue: quiet, data-forward theme over Fiesta day. */
:root {
  color-scheme: light;
  --rst-bg: #f6f5f1;
  --rst-surface: #ffffff;
  --rst-surface-2: #f0efea;
  --rst-text: #1b2430;
  --rst-text-muted: #545e6b;
  --rst-line: #e2e0d9;
  --rst-line-strong: #a9aab0;
  --rst-accent: #1f3a5f;
  --rst-accent-soft: #e4eaf2;
  --rst-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rst-radius: 6px;
  --rst-radius-sm: 4px;
  --rst-depth-ambient: rgb(27 36 48 / 0.05);
  --rst-depth-contact: rgb(27 36 48 / 0.08);
  --mh-serif: Charter, "Iowan Old Style", Georgia, serif;
}

html, body { background: var(--rst-bg); color: var(--rst-text); }
body { margin: 0; font-family: var(--rst-font); }

.mh-band { background: var(--rst-accent); color: #f3f5f8; }
.mh-band__inner { display: flex; align-items: center; gap: 0.9rem; padding-block: 1.1rem; }
.mh-mark { flex: none; color: #f3f5f8; }
.mh-firm { margin: 0; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: #c9d3e0; }
.mh-title { margin: 0.1rem 0 0; font-family: var(--mh-serif); font-weight: 600; font-size: 1.5rem; line-height: 1.2; color: #ffffff; }

.mh-main { padding-top: 1.5rem; }
.mh-h2 { margin: 0; font-family: var(--mh-serif); font-size: 1.15rem; font-weight: 600; }
.mh-num, .mh-stat__n { font-variant-numeric: tabular-nums; }

.mh-stats {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--rst-line); border-radius: var(--rst-radius);
  background: var(--rst-surface); margin-bottom: 1.25rem;
}
.mh-stat { padding: 0.75rem 1rem; border-left: 1px solid var(--rst-line); }
.mh-stat:first-child { border-left: 0; }
.mh-stat__n { display: block; font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.mh-stat__l { display: block; font-size: 0.8rem; color: var(--rst-text-muted); }
.mh-stat--urgent .mh-stat__n { color: #8a1f17; }

.mh-alert {
  margin: 0 0 1.25rem; padding: 0.75rem 1rem; border-radius: var(--rst-radius);
  background: #f8e6e4; color: #7a1c15; border: 1px solid #e6c2bd;
}

.mh-panel {
  background: var(--rst-surface); border: 1px solid var(--rst-line);
  border-radius: var(--rst-radius); padding: 1rem 1.1rem 1.1rem; margin-bottom: 1.75rem;
}
.mh-form {
  display: grid; gap: 0.75rem 1rem; margin-top: 0.75rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr);
}
.mh-form .rst-field { margin: 0; min-width: 0; }
.mh-f-summary { grid-column: 1 / 3; }
.mh-f-submit { display: flex; align-items: flex-end; }
.mh-f-submit button { width: 100%; min-height: 2.75rem; }
.mh-form .rst-input { width: 100%; box-sizing: border-box; min-height: 2.75rem; }

.mh-queue-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.6rem; }
.mh-note { margin: 0; font-size: 0.85rem; color: var(--rst-text-muted); }

.mh-table-wrap { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); overflow-x: auto; }
.mh-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.mh-table th {
  text-align: left; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--rst-text-muted); background: var(--rst-surface-2);
  padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rst-line); white-space: nowrap;
}
.mh-table td { padding: 0.75rem 0.75rem; border-bottom: 1px solid var(--rst-line); vertical-align: middle; }
.mh-table tbody tr:last-child td { border-bottom: 0; }
.mh-table td.mh-num { white-space: nowrap; color: var(--rst-text-muted); }
.mh-client { font-weight: 600; min-width: 9rem; }
.mh-summary { min-width: 10rem; overflow-wrap: anywhere; }
.mh-row--declined td { color: var(--rst-text-muted); background: #faf9f6; }
.mh-row--declined .mh-client { font-weight: 400; }
.mh-row:target td { background: var(--rst-accent-soft); }

.mh-chip {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.78rem; font-weight: 600; white-space: nowrap; line-height: 1.5;
}
.mh-chip--urgent { background: #f7e3e1; color: #7f1d16; border-color: #e7c3be; }
.mh-chip--soon { background: #f6ecd6; color: #6e4300; border-color: #e6d3a9; }
.mh-chip--routine { background: #eceff3; color: #3b4757; border-color: #d6dbe2; }
.mh-status--new { background: #e4eaf2; color: #1f3a5f; border-color: #c4d0e0; }
.mh-status--triaged { background: #dcefed; color: #0d5753; border-color: #b6dbd7; }
.mh-status--assigned { background: #e3efdc; color: #2c5420; border-color: #c2dab5; }
.mh-status--declined { background: #eceef1; color: #545b66; border-color: #d6d9de; }

.mh-actions { white-space: nowrap; text-align: right; }
.mh-action-form { display: inline-flex; flex-wrap: nowrap; gap: 0.35rem; justify-content: flex-end; }

.mh-empty { padding: 1.5rem 1rem; text-align: center; color: var(--rst-text-muted); background: var(--rst-surface); border: 1px dashed var(--rst-line-strong); border-radius: var(--rst-radius); }
.mh-foot { font-size: 0.8rem; color: var(--rst-text-muted); padding-top: 0; }
.mh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

input:is([type=date], [type=time], [type=datetime-local]) { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; display: block; min-height: 2.75rem; }

@media (max-width: 760px) {
  .mh-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mh-stat:nth-child(4) { border-left: 0; }
  .mh-stat:nth-child(n+4) { border-top: 1px solid var(--rst-line); }
  .mh-form { grid-template-columns: minmax(0, 1fr); }
  .mh-f-summary { grid-column: auto; }

  .mh-table-wrap { background: transparent; border: 0; overflow: visible; }
  .mh-table, .mh-table tbody, .mh-table tr, .mh-table td { display: block; width: 100%; box-sizing: border-box; }
  .mh-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mh-table tr { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); margin-bottom: 0.75rem; padding: 0.4rem 0; }
  .mh-table td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.5rem; border: 0; padding: 0.3rem 0.9rem; }
  .mh-table td::before { content: attr(data-label); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rst-text-muted); padding-top: 0.15rem; }
  .mh-table td.mh-actions { display: block; text-align: left; white-space: normal; padding-top: 0.5rem; }
  .mh-table td.mh-actions::before { content: none; }
  .mh-action-form { justify-content: flex-start; flex-wrap: wrap; gap: 0.75rem 0.5rem; }
  .mh-table td > .mh-chip, .mh-table td > time { justify-self: start; }
  .mh-client::before { font-weight: 400; }
  .mh-summary, .mh-client { min-width: 0; }
  .mh-row--declined td { background: transparent; }
  .mh-row--declined { opacity: 0.85; }
}

/* Example mode: one-line note at the top of the showcase copy. */
.example-note { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 0.5rem 1rem; text-align: center; font-family: var(--rst-font, system-ui, sans-serif); font-size: 0.875rem; line-height: 1.4; font-weight: 400; letter-spacing: normal; text-transform: none; background: var(--rst-accent-soft); color: var(--rst-text); }
.example-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
