/* Northwest Clear Outreach: NWC's palette inverted, kept minimal. */
:root {
  --ink: #0B0F14;
  --muted: #5B6370;
  --faint: #9AA1AB;
  --line: #E6E8EB;
  --field: #D4D8DD;
  --bg: #FFFFFF;
  --good: #15803D;
  --bad: #B42318;
  --warn: #B45309;
  --mark: #1F9A53;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
a:hover { color: var(--muted); }
h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.good { color: var(--good); font-weight: 600; }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
       padding: 14px 32px; border-bottom: 1px solid var(--line); }
.top-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 36px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand img { width: 26px; height: 26px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.nav a { text-decoration: none; color: var(--muted); padding: 10px 0; border-bottom: 1px solid transparent; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.nav .count { color: var(--good); font-weight: 600; }
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; font-size: 13px; color: var(--muted); }

/* Layout */
.main { max-width: 1120px; margin: 0 auto; padding: 40px 32px 80px; display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.between { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.center { align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split > .wide { flex: 999 1 520px; min-width: 0; }
.split > .side { flex: 1 1 280px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }

/* Messages */
.flash { padding: 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.flash.error { color: var(--bad); }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px;
       border: 1px solid var(--field); background: var(--bg); color: var(--ink); border-radius: 6px;
       font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.btn.primary:hover { background: #2A3038; }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
form.inline { display: inline; }
input[type=text], input[type=email], input[type=search], input[type=number], input[type=date], input[type=time],
input[type=password], input[type=file], select, textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--field); border-radius: 6px;
  min-height: 40px; padding: 0 12px; width: 100%; max-width: 100%;
}
textarea { padding: 10px 12px; line-height: 1.6; resize: vertical; }
input[type=file] { padding: 8px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); }
label.field { display: flex; flex-direction: column; gap: 6px; }
label.field > span:first-child { font-size: 13px; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 8px; }
.helptext, .field .help { font-size: 12px; color: var(--muted); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--bad); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; }
.form-grid .full { grid-column: 1 / -1; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 20px; border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat .n { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .n .of { color: var(--faint); font-weight: 400; }

/* Lists */
.list { display: flex; flex-direction: column; }
.list > .item { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.list.ruled { border-top: 1px solid var(--ink); }
.item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.item-head .name { font-weight: 600; }
.queue-row { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.queue-row .when { width: 96px; flex: none; color: var(--muted); }
.empty { padding: 20px 0; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--ink); }
td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th:last-child, td:last-child { padding-right: 0; }
.table-wide { min-width: 820px; }
.table-mid { min-width: 560px; }
tr.group th { border-bottom: 0; padding-top: 24px; padding-bottom: 6px; color: var(--ink); font-size: 14px; font-weight: 600; }
td.indent { padding-left: 16px; }

/* Tabs and chips */
.tabs { display: flex; flex-wrap: wrap; gap: 0 28px; border-bottom: 1px solid var(--line); }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; color: var(--muted);
          font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.tabs .c { color: var(--faint); font-weight: 400; margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--field);
        border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--ink); }
.chip .c { color: var(--muted); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.chip[aria-current="true"] .c { color: #C9CDD2; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.filters .grow { flex: 1 1 260px; }
.filters label.field { min-width: 160px; }

/* Thread */
.msg { padding: 20px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.msg:first-child { border-top-color: var(--ink); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.out .body { color: var(--muted); }
dl.facts { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 12px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* Sequences */
.seq-nav { flex: 1 1 220px; display: flex; flex-direction: column; }
.seq-nav a { text-decoration: none; padding: 12px 0; border-top: 1px solid var(--line); }
.seq-nav a:first-of-type { border-top-color: var(--ink); }
.seq-nav a[aria-current="true"] { font-weight: 600; }
.seq-nav .meta { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.steps a { min-height: 44px; }
.steps a[aria-current="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.preview { border: 1px solid var(--line); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.preview .body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Checks */
.checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.checks li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checks .label { width: 160px; flex: none; font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-right: 8px; vertical-align: middle; }
.dot.ok { background: var(--good); }
.dot.no { background: var(--bad); }

/* Login / public */
.narrow { max-width: 420px; margin: 0 auto; padding: 80px 24px; display: flex; flex-direction: column; gap: 24px; }
.narrow .brand { justify-content: flex-start; }

@media (max-width: 640px) {
  .top, .main { padding-left: 16px; padding-right: 16px; }
  .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .checks li { flex-direction: column; gap: 4px; }
}

/* Utilities */
select.w-auto, .w-auto { width: auto; }
.mb { margin-bottom: 16px; }
.mt { margin-top: 16px; align-self: flex-start; }
.seq-nav a.btn { padding: 0 14px; border: 1px solid var(--field); }
