/* Adjourn — Co-op Sales Compliance
   Design language: cool neutral canvas, white surfaces, hairline borders,
   one sans family, 2–4px radii. Semantic status colors are the only color:
   blue = statutory action, green = granted/received, red = denied/outstanding,
   amber = waiting on the other party. Square status swatches throughout. */

:root {
  --canvas: #F7F8FA;
  --surface: #FFFFFF;
  --panel: #F8FAFC;
  --hover: #F4F6F8;

  --ink: #1B1F27;
  --text: #414852;
  --muted-c: #5B6572;
  --faint-c: #7D8794;

  --line: #E3E6EA;
  --line-soft: #EDF0F3;
  --ctrl: #C9D0D8;

  --blue: #185ABD;
  --blue-hover: #12489C;
  --blue-tint: #EDF3FB;
  --blue-line: #C9DAF2;

  --green: #107C41;
  --green-tint: #E9F3ED;

  --red: #B42318;
  --red-tint: #FBEDEB;
  --red-line: #E7C3BE;

  --amber: #9A6700;
  --amber-tint: #FFF6E0;

  --sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius-ctrl: 3px;
  --radius-card: 4px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-modal: 0 16px 48px rgba(15, 20, 30, .18), 0 2px 8px rgba(15, 20, 30, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
::selection { background: rgba(24, 90, 189, .14); }

button { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* --- layout --- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.page { padding: 24px 0 90px; }
.narrow-640 { max-width: 640px; }
.narrow-680 { max-width: 680px; }
.narrow-720 { max-width: 720px; }
.narrow-760 { max-width: 760px; }
.narrow-800 { max-width: 800px; }
.narrow-1000 { max-width: 1000px; }

/* --- header --- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-group { display: flex; align-items: baseline; gap: 10px; }
.brand { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.brand-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--faint-c);
  letter-spacing: .05em;
  text-transform: uppercase;
  border-left: 1px solid var(--line);
  padding-left: 10px;
}
.header-right { display: flex; align-items: center; gap: 14px; }
.header-context { font-size: 12.5px; color: var(--faint-c); }
.header-user { font-size: 12.5px; font-weight: 500; color: var(--text); }
.inline-form { display: inline; }

/* --- typography --- */
.display { font-weight: 600; letter-spacing: -0.012em; color: var(--ink); }
.page-title { font-size: 22px; line-height: 1.2; margin: 0 0 4px; }
.page-title-sm { font-size: 19px; line-height: 1.25; margin: 4px 0 0; }
.page-sub { margin: 4px 0 0; color: var(--muted-c); font-size: 13.5px; }
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--faint-c);
}
.ref-line { font-size: 11.5px; font-weight: 500; color: var(--faint-c); letter-spacing: .04em; }
.muted { color: var(--muted-c); font-size: 13.5px; line-height: 1.6; }
.small { font-size: 12.5px; color: var(--faint-c); }
.hint { font-size: 12px; color: var(--faint-c); line-height: 1.5; }
.block { display: block; }
.pre-wrap { white-space: pre-wrap; }
.log-viewer { overflow: auto; max-height: 70vh; margin-top: 16px; }
.log-table { width: 100%; border-collapse: collapse; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.log-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); color: var(--faint-c); text-align: left; text-transform: uppercase; letter-spacing: .05em; }
.log-table th, .log-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.log-table tbody tr:last-child td { border-bottom: 0; }
.log-date, .log-level { white-space: nowrap; }
.log-level { font-weight: 700; }
.log-level-error, .log-level-fatal, .log-level-panic { color: var(--red); }
.log-message { min-width: 240px; overflow-wrap: anywhere; }
.log-values { min-width: 220px; overflow-wrap: anywhere; }
.log-values > span { display: block; }
.log-values b { color: var(--faint-c); font-weight: 600; }
.spaced { margin-top: 12px; }
.spaced-t { margin-top: 4px; }
.spaced-b { margin-bottom: 8px; }

/* --- cards & panels --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 20px 24px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
}
.list-card { overflow: hidden; }
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.baseline-split { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.baseline-row { display: flex; align-items: baseline; gap: 9px; }

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-ctrl);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-block { display: flex; width: 100%; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #30363F; border-color: #30363F; }
.btn-accent { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-accent:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--ctrl); color: var(--ink); }
.btn-outline:hover { background: var(--hover); color: var(--ink); }
.btn-danger-outline { background: var(--surface); border-color: var(--red-line); color: var(--red); }
.btn-danger-outline:hover { background: var(--red-tint); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.text-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-c);
  cursor: pointer;
}
.text-link:hover { color: var(--ink); }
.text-link.plain { font-weight: 400; }
.text-link.accent { color: var(--blue); }
.text-link.accent:hover { color: var(--blue-hover); }
.text-link.danger { font-weight: 400; font-size: 12.5px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.text-link.danger:hover { color: var(--red); }

/* --- segmented toggle --- */
.toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: #EEF1F4;
  border-radius: var(--radius-card);
  width: fit-content;
}
.toggle-btn {
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-ctrl);
  background: transparent;
  color: var(--muted-c);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.toggle-btn:hover { color: var(--ink); }
.toggle-btn.is-active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

/* --- filter chips --- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-select { display: flex; align-items: center; gap: 8px; }
.filter-select .field-label { margin: 0; }
.select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 180px;
  padding: 5px 30px 5px 10px;
  border: 1px solid var(--ctrl);
  border-radius: var(--radius-ctrl);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235B6572' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.select:hover { background-color: var(--hover); }
.select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24, 90, 189, .12);
}
.building-tabs { margin: 4px 0 20px; }

/* --- page head --- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}
/* Variant for heads that sit directly under the building nav: the title must
   land at the same y-offset as the standalone titles on the sibling tabs. */
.page-head.under-nav { align-items: flex-start; }
.page-head.under-nav .page-title-sm { margin: 0; }

/* --- list rows (all applications) --- */
.list-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 20px;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.list-row:first-child { border-top: none; }
.list-row:hover { background: var(--hover); color: inherit; }
.list-row-main { flex: 1; min-width: 0; }
.list-row-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.list-row-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.list-row-status { flex: none; width: 210px; font-size: 13px; color: var(--text); }
.list-row-action { flex: none; width: 190px; }
.list-row-chevron { flex: none; color: #B9C0C8; font-size: 15px; }
.file-row { cursor: default; }
/* User admin rows are a grid so the name, role, and action columns line up
   across rows. The email sits on its own grid row under the name, so a long or
   wrapping address never shifts the controls off the name input's baseline. */
.user-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 165px auto auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
}
.user-row > * { grid-row: 1; }
.user-row .user-name-input { grid-column: 1; width: 100%; }
.user-row .user-email { grid-column: 1; grid-row: 2; }
.user-row .select { width: 100%; }
.user-email { margin-top: 3px; overflow-wrap: anywhere; }
.tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-c);
  background: #F1F3F5;
  border-radius: 2px;
  padding: 2px 6px;
}

/* --- status pills (square swatch + tint) --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: currentColor;
  flex: none;
}
.pill-dark { color: var(--blue); font-weight: 600; }
.pill-wait { color: var(--faint-c); }
.pill-done { color: var(--green); }
.pill-fail { color: var(--red); }

/* --- table-like listing --- */
.cols-apps { display: grid; grid-template-columns: 2fr .9fr .9fr 2fr 1.6fr; gap: 0 18px; }
.cols-allapps { display: grid; grid-template-columns: 1.8fr .9fr 1.2fr .7fr 1.8fr 1.7fr; gap: 0 18px; }
.cols-myapps { display: grid; grid-template-columns: 2fr .9fr .6fr 1.3fr 1.5fr; gap: 0 18px; }
.table-head {
  padding: 10px 18px;
  background: #FAFBFC;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--faint-c);
}
.table-row {
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  align-items: start;
}
.table-row:first-of-type { border-top: none; }
.table-row:hover { background: var(--hover); color: inherit; }
.cell { font-size: 13.5px; color: var(--text); }

/* --- detail head & tabs --- */
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-top: 14px;
}
.detail-head .page-title-sm { margin-top: 0; }
.detail-head .btn { margin-top: 2px; }
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-top: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; white-space: nowrap; }
.tab {
  padding: 9px 12px 10px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-c);
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.is-active { border-bottom-color: var(--blue); font-weight: 600; color: var(--ink); }
.tab-panel { margin-top: 22px; }

/* --- overview: due chips --- */
.due-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.due-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: currentColor;
  flex: none;
}
.due-ok { color: var(--blue); background: var(--blue-tint); }
.due-soon { color: var(--amber); background: var(--amber-tint); }
.due-over { color: var(--red); background: var(--red-tint); }

/* --- overview: action card --- */
.eyebrow.accent { color: var(--blue); }
.action-prompt { font-size: 15px; font-weight: 600; color: var(--ink); margin: 10px 0 12px; }
.action-card .btn-row .btn { padding: 9px 16px; font-size: 14px; }
.action-votes { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.votes-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--faint-c);
  margin-bottom: 4px;
}
.vote-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--text); }
.vote-yes { color: var(--green); font-weight: 500; }
.vote-no { color: var(--red); font-weight: 500; }
.vote-pending { color: var(--faint-c); }

/* --- overview: unboxed sections & timeline --- */
.ov-section { margin-top: 32px; }
.ov-section > .eyebrow, .ov-section > .eyebrow-row { margin-bottom: 4px; }
.eyebrow-row.between { justify-content: space-between; }
.proc-list { margin-top: 10px; }
.proc-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0 8px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.proc-row:first-child { border-top: none; }
.proc-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ctrl);
  align-self: center;
}
.proc-dot.is-done { background: var(--green); }
.proc-dot.is-active { background: var(--blue); }
.proc-dot.is-failed { background: var(--red); }
.proc-name { font-weight: 500; color: var(--ink); }
.proc-name.dim { color: var(--faint-c); font-weight: 400; }
.proc-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  cursor: pointer;
}
.proc-link:hover { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
/* the tax-software "?" idiom: a quiet, always-visible glyph marking rows
   with a statutory explainer behind them */
.help-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 1px solid var(--blue-line);
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  flex: none;
  vertical-align: 1px;
}
.proc-link:hover .help-dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.action-why { margin-top: 12px; }
.action-why .text-link { font-weight: 400; font-size: 12.5px; }
.proc-side { margin-left: auto; color: var(--muted-c); font-size: 12.5px; text-align: right; }
.proc-side .due-chip { margin-left: 4px; vertical-align: -2px; }
.proc-sub { font-size: 12px; color: var(--faint-c); margin: -4px 0 7px 18px; }
.text-late { color: var(--amber); font-weight: 500; }
.invite-row { display: flex; gap: 8px; margin-top: 12px; }
.invite-row .input { max-width: 320px; }
.invite-row .btn { flex: none; }

/* --- sections (view application) --- */
.section-card { margin-bottom: 12px; padding: 16px 20px; }
.section-title { font-size: 14.5px; }
.section-question { color: var(--muted-c); font-size: 12.5px; margin: 5px 0 10px; line-height: 1.5; }
.section-answer { font-size: 13.5px; line-height: 1.55; color: var(--text); }
.doc-list { margin-top: 10px; }
.doc-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
}
.doc-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted-c);
  background: #F1F3F5;
  border-radius: 2px;
  padding: 2px 5px;
}
.doc-link { font-size: 13px; color: var(--blue); cursor: pointer; }
.doc-link:hover { text-decoration: underline; }
.doc-name { font-size: 13px; color: var(--ink); flex: 1; min-width: 0; }
.upload-mark { font-size: 11.5px; font-weight: 600; color: var(--green); }

/* --- resubmission change flags & version history --- */
.chg-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 2px 6px;
  vertical-align: 1px;
}
.chg-link { border: 0; font-family: inherit; cursor: pointer; }
.chg-link:hover { text-decoration: underline; }
.chg-new { color: var(--green); background: var(--green-tint); }
.chg-removed { color: var(--red); background: var(--red-tint); }
.doc-name-removed { text-decoration: line-through; color: var(--faint-c); flex: none; }
.version-banner { margin: 0 0 12px; }
.version { border-top: 1px solid var(--line-soft); padding: 8px 0; }
.version-summary { font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.version-section { margin: 8px 0 0 14px; }
.version-section > .small { margin-bottom: 2px; }
.version-section > .hint { margin: 0 0 4px; }

/* --- callouts --- */
.callout { margin-top: 12px; padding: 11px 14px; border-radius: 0 var(--radius-ctrl) var(--radius-ctrl) 0; }
.callout-accent { border-left: 2px solid var(--blue); background: var(--blue-tint); }
.callout-warn { border-left: 2px solid var(--amber); background: var(--amber-tint); }
.callout .eyebrow { margin-bottom: 4px; }
.callout-body { font-size: 13px; line-height: 1.6; color: var(--text); }
.comment-editor { margin-top: 12px; }

/* --- forms --- */
.input, .textarea {
  width: 100%;
  border: 1px solid var(--ctrl);
  border-radius: var(--radius-ctrl);
  padding: 7px 10px;
  font-size: 13.5px;
  background: var(--surface);
  font-family: var(--sans);
  color: var(--ink);
}
.input::placeholder, .textarea::placeholder { color: #9AA2AC; }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24, 90, 189, .12);
}
.input.strong { font-weight: 500; }
.textarea { line-height: 1.5; resize: vertical; min-height: 72px; }
.field-label { font-size: 12px; font-weight: 500; color: var(--muted-c); margin-bottom: 4px; }
.field-grid { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.field-grid .field { flex: 1; min-width: 200px; }
.form-footer { margin-top: 20px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.hidden-input { display: none; }

/* --- discussion --- */
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-card);
  background: #EDF1F5;
  color: var(--muted-c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
}
.comment-body { flex: 1; }
.comment-meta { font-size: 13px; }
.comment-author { font-weight: 600; color: var(--ink); }
.comment-text { font-size: 13.5px; line-height: 1.55; color: var(--text); margin-top: 3px; }
.compose { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.compose-note { height: 84px; }
.compose-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

/* --- external communication --- */
.email-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}
.email-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted-c);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.email-from { color: var(--ink); font-weight: 600; }
.email-time { flex: none; color: var(--faint-c); }
.email-content { padding: 14px 16px; }
.email-subject { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink); }
.email-body { white-space: pre-wrap; font-size: 13px; line-height: 1.6; color: var(--text); }
.compose-panel .input { margin-bottom: 10px; }
.compose-email { height: 120px; }
.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
}
.compose-panel .eyebrow { margin-bottom: 10px; }
/* registered-mail actions under a formal notice: a plain row, no box */
.mail-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 6px 0 16px;
}
.mail-strip .btn { flex: none; }
.mail-strip .btn-row { margin-left: auto; }
.mail-strip-info { display: flex; flex-direction: column; gap: 2px; }
/* one notice's print & mail actions on the overview */
.notice-print-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.notice-print-row:first-of-type { margin-top: 8px; padding-top: 0; border-top: none; }
.notice-print-row .mail-strip { margin: 6px 0 0; }
.notice-print-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.notice-print-head .muted { font-weight: 400; flex: none; }
.mail-tracking { font-weight: 600; color: var(--ink); letter-spacing: 0.4px; }
/* state + ZIP pair inside a mailing-address form */
.addr-row { display: flex; gap: 12px; }
.addr-state { flex: none; width: 64px; text-transform: uppercase; }
.empty-state { padding: 28px; text-align: center; }
.empty-title { font-size: 14.5px; margin-bottom: 5px; }

/* --- audit --- */
.audit-row { display: flex; gap: 18px; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.audit-row:first-child { border-top: none; }
.audit-time { flex: none; width: 118px; font-size: 12.5px; color: var(--faint-c); padding-top: 1px; }
.audit-action { font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.audit-actor { font-size: 12.5px; color: var(--faint-c); margin-top: 2px; }

/* --- modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 31, .44);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-card);
  width: 640px;
  max-width: 100%;
  max-height: 88vh;
  overflow: auto;
  box-shadow: var(--shadow-modal);
}
.modal-head { padding: 20px 24px 14px; border-bottom: 1px solid var(--line-soft); }
.modal-title { font-size: 17px; margin: 6px 0 4px; }
.modal-subtitle { margin: 0; color: var(--muted-c); font-size: 12.5px; line-height: 1.5; }
.modal-body { padding: 16px 24px 0; }
.modal-textarea { height: 300px; font-size: 13px; line-height: 1.65; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 20px; }

/* --- applicant portal --- */
.status-card { margin-top: 18px; padding: 18px 22px; }
.status-main { flex: 1; min-width: 260px; }
.status-label { font-size: 15px; font-weight: 600; margin-top: 6px; color: var(--ink); }
.status-text { margin: 7px 0 0; max-width: 560px; font-size: 13px; }
.status-side { flex: none; text-align: right; }
.outstanding-note { font-size: 12.5px; color: var(--red); margin-top: 8px; font-weight: 600; }
.applicant-columns { display: flex; gap: 24px; margin-top: 22px; align-items: flex-start; flex-wrap: wrap; }
.req-nav { flex: none; width: 268px; display: flex; flex-direction: column; gap: 2px; }
.req-nav .eyebrow { margin-bottom: 6px; padding-left: 12px; }
.type-transfer { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.type-transfer .hint { padding: 0 2px; }
.type-import { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; max-width: 420px; }
.type-export-row { display: flex; flex-wrap: wrap; gap: 8px; }
.req-nav-item {
  text-align: left;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-ctrl);
  cursor: pointer;
}
.req-nav-item:hover { background: var(--hover); }
.req-nav-item.is-active {
  background: var(--blue-tint);
  box-shadow: inset 2px 0 0 var(--blue);
}
.req-nav-item.notices { margin-top: 10px; border-top: 1px solid var(--line-soft); border-radius: 0 0 var(--radius-ctrl) var(--radius-ctrl); padding-top: 12px; }
.req-nav-item.notices.is-active { border-top-color: transparent; }
.req-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.req-nav-label { font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.req-nav-chip { display: block; font-size: 11.5px; font-weight: 500; margin-top: 2px; }
.text-ok { color: var(--green); }
.text-bad { color: var(--red); }
.nav-dot { width: 7px; height: 7px; border-radius: 1px; flex: none; }
.nav-dot-ok { background: var(--green); }
.nav-dot-out { background: var(--amber); }
.req-panel { flex: 1; min-width: 340px; }
.req-title { font-size: 16px; margin: 0; }
.req-question { font-size: 13.5px; line-height: 1.65; color: var(--text); margin: 14px 0 0; white-space: pre-wrap; }
.req-block { margin-top: 18px; }
.req-submission { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 3px 8px;
  flex: none;
}
.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: currentColor;
  flex: none;
}
.status-chip-ok { color: var(--green); background: var(--green-tint); }
.status-chip-bad { color: var(--red); background: var(--red-tint); }
.upload-btn { margin-top: 12px; cursor: pointer; }

/* --- application setup (type list & editor) --- */
.setup-intro { margin: 8px 0 20px; max-width: 640px; font-size: 13.5px; line-height: 1.55; }
.setup-outro { margin: 14px 0 0; }
.cols-types { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.6fr; gap: 0 18px; }
.type-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-c);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.type-chip.is-coop { color: var(--blue); background: var(--blue-tint); border-color: var(--blue-tint); }
.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check-row input { margin-top: 3px; flex: none; }
.check-label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.check-row .hint { display: block; margin-top: 3px; }
.type-card { margin-top: 18px; }
/* The editor's two tabs are one form: the radios drive which panel shows,
   so both panels' fields stay in the DOM and post together on save. */
.tab-radio { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.setup-tabs { margin-top: 20px; }
.setup-tabs .tab { margin-bottom: -1px; }
.tab-count { color: var(--faint-c); font-weight: 500; margin-left: 4px; }
.setup-panel { display: none; margin-top: 22px; }
#tab-requirements:checked ~ .setup-panel-requirements,
#tab-process:checked ~ .setup-panel-process { display: block; }
#tab-requirements:checked ~ .setup-tabs .tab[for="tab-requirements"],
#tab-process:checked ~ .setup-tabs .tab[for="tab-process"] {
  border-bottom-color: var(--blue);
  font-weight: 600;
  color: var(--ink);
}
.builder-row { padding: 16px 18px; margin-bottom: 10px; }
.builder-head { display: flex; align-items: center; gap: 10px; }
.type-head { display: flex; align-items: flex-end; gap: 10px; }
.reorder { display: flex; flex-direction: column; gap: 2px; flex: none; }
.reorder-btn {
  width: 22px;
  height: 15px;
  line-height: 1;
  padding: 0;
  border: 1px solid var(--ctrl);
  background: var(--surface);
  color: var(--muted-c);
  font-size: 7px;
  cursor: pointer;
  border-radius: 2px;
}
.reorder-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn {
  width: 26px;
  height: 26px;
  margin-top: 18px;
  border: 1px solid var(--ctrl);
  background: var(--surface);
  color: var(--muted-c);
  cursor: pointer;
  border-radius: var(--radius-ctrl);
  font-size: 11px;
  flex: none;
}
.icon-btn:hover { background: var(--red-tint); border-color: var(--red-line); color: var(--red); }
.grow { flex: 1; min-width: 0; }
.builder-required { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
/* the leading label ("Board vote", "Requirement is") stays on one line */
.builder-required > .hint:first-of-type { white-space: nowrap; }
.builder-question { height: 68px; font-size: 13px; }
.builder-info { height: 52px; font-size: 13px; background: var(--panel); }
.builder-info:focus { background: var(--surface); }
.optional-mark { color: var(--faint-c); font-weight: 400; }
.attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px dashed var(--ctrl);
  border-radius: var(--radius-ctrl);
  background: var(--surface);
  color: var(--muted-c);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 6px;
}
.attach-btn:hover { background: var(--hover); color: var(--ink); }
.add-row-btn {
  background: none;
  border: 1px dashed var(--ctrl);
  border-radius: var(--radius-ctrl);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-c);
  cursor: pointer;
  width: 100%;
}
.add-row-btn:hover { background: var(--hover); color: var(--ink); }
.builder-section-head { margin: 22px 0 8px; }
.builder-row-locked { background: var(--panel); }
.step-title { font-size: 14px; font-weight: 600; }
.step-badge {
  flex: none;
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint-c);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* --- login --- */
.login-wrap { display: flex; justify-content: center; padding: 88px 0; }
.login-card { width: 400px; max-width: 100%; padding: 28px 32px 24px; }
.login-title { font-size: 19px; margin: 0 0 4px; }
.login-options { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.login-error { margin: 14px 0 0; padding: 8px 10px; font-size: 13px; color: var(--red); background: var(--red-tint); border: 1px solid var(--red-line); border-radius: 6px; }
.login-hint { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.login-demo { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }

/* ==========================================================================
   Responsive — tablet & phone
   ========================================================================== */
@media (max-width: 760px) {
  .applicant-columns { flex-direction: column; }
  .req-nav { width: 100%; }
  .req-panel { min-width: 0; width: 100%; }
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .page { padding: 16px 0 60px; }

  /* row-style listings collapse from a grid of columns into a stacked
     card: name on its own line, everything else flows as a meta line. */
  .cols-apps, .cols-allapps, .cols-myapps, .cols-types { display: block; }
  .table-head.cols-apps, .table-head.cols-allapps, .table-head.cols-myapps, .table-head.cols-types { display: none; }
  .cols-apps > *, .cols-allapps > *, .cols-myapps > *, .cols-types > * { display: inline-flex; align-items: center; vertical-align: middle; }
  .cols-apps > *:first-child, .cols-allapps > *:first-child, .cols-myapps > *:first-child, .cols-types > *:first-child { display: block; margin-bottom: 5px; }
  .cols-apps > *:nth-child(n+3)::before,
  .cols-allapps > *:nth-child(n+3)::before,
  .cols-myapps > *:nth-child(n+3)::before,
  .cols-types > *:nth-child(n+3)::before {
    content: "·";
    margin: 0 7px;
    color: var(--faint-c);
  }
  .table-row { padding: 12px 16px; }

  .detail-head { flex-wrap: wrap; align-items: flex-start; }
  .tab-panel { margin-top: 18px; }
  .ov-section { margin-top: 26px; }

  /* timeline rows: let the status drop under the name instead of squeezing */
  .proc-row { flex-wrap: wrap; row-gap: 2px; }
  .proc-side { text-align: left; }

  .mail-strip .btn-row { margin-left: 0; }
  .invite-row { flex-wrap: wrap; }
  .invite-row .input { max-width: none; }

  .list-row { flex-wrap: wrap; row-gap: 10px; }
  .list-row-main { flex-basis: 100%; }

  .user-row { grid-template-columns: 1fr 1fr; }
  .user-row .user-name-input { grid-column: 1 / -1; }
  .user-row .user-email { grid-column: 1 / -1; }

  .filter-bar { width: 100%; }
  .filter-select { width: 100%; }
  .filter-select .select { flex: 1; min-width: 0; }
}

@media (max-width: 480px) {
  body { font-size: 13.5px; }
  .container { padding: 0 14px; }
  .card-pad { padding: 16px; }
  .status-card { padding: 16px; }
  .section-card { padding: 14px 16px; }
  .login-wrap { padding: 48px 0; }

  .header-inner { height: auto; min-height: 54px; flex-wrap: wrap; padding: 8px 0; gap: 8px; }
  .brand-tag { display: none; }
  .header-right { gap: 8px; }
  .header-user { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .page-head { gap: 10px; }
  .email-head { flex-wrap: wrap; }
  .compose-footer { flex-wrap: wrap; }
  .select { min-width: 0; }

  /* the action card's choices stack into full-width tap targets */
  .action-card .btn-row { flex-direction: column; }
  .action-card .btn-row .btn { width: 100%; }
  .notice-print-head { flex-wrap: wrap; }

  .audit-row { flex-direction: column; gap: 4px; }
  .audit-time { width: auto; }

  .modal-overlay { padding: 10px; }
  .modal-head { padding: 16px 16px 12px; }
  .modal-body { padding: 12px 16px 0; }
  .modal-textarea { height: 220px; }
  .modal-actions { padding: 12px 16px 16px; flex-wrap: wrap; }
  .modal-actions .btn { flex: 1; }

  .builder-head, .type-head { flex-wrap: wrap; }

  /* the type-name field takes the full row; save/cancel drop below it as
     even tap targets instead of squeezing the input to a sliver */
  .type-head .field { flex-basis: 100%; }
  .type-head .btn { flex: 1; }
}

@media (max-width: 640px) {
  .header-context { display: none; }
}

/* --- LL58 flags & checklist --- */
.eyebrow-row { display: flex; align-items: center; gap: 10px; }
.ll58-chip {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex: none;
  padding: 1px 7px;
  border: 1px solid var(--blue-line);
  border-radius: 2px;
  background: var(--blue-tint);
  color: var(--blue);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.7;
  white-space: nowrap;
  vertical-align: 1px;
}
.text-link.inline {
  font-size: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.ll58-quote { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text); }
.ll58-fineprint { margin: 14px 0 0; font-size: 11.5px; color: var(--faint-c); line-height: 1.5; }
