@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   Domani Preneed — Design System
   ============================================================ */

:root {
  --bg:        #fafaf7;
  --surface:   #ffffff;
  --surface-2: #f5f3ec;
  --border:    #e7e3d8;
  --border-2:  #cdc6b3;
  --ink:       #1a1f2c;
  --ink-2:     #525866;
  --muted:     #8d92a0;
  --navy:      #13243d;
  --navy-2:    #1f3556;
  --amber:     #b78c5e;
  --amber-2:   #9c7546;
  --success:   #0e7c61;
  --warning:   #a07215;
  --danger:    #a13a2a;
  --info:      #2f5d8e;

  --radius-card: 10px;
  --radius-btn:  8px;
  --shadow-card: 0 1px 0 rgba(20,30,55,.04), 0 8px 24px -12px rgba(20,30,55,.10);

  --font-sans:  'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ----------------------------------------------------------
   Base
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

a {
  color: var(--navy-2);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--amber-2); }

p { margin: 0 0 12px 0; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

img { max-width: 100%; display: block; }

/* ----------------------------------------------------------
   Typography
   ---------------------------------------------------------- */
.font-serif { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.02em; }
.font-sans  { font-family: var(--font-sans); }

.h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 8px 0;
}
.h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px 0;
}
.h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 6px 0;
}
.h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 4px 0;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-2);
}

.text-xs   { font-size: 11px; }
.text-sm   { font-size: 12px; }
.text-base { font-size: 14px; }
.text-md   { font-size: 15px; }
.text-lg   { font-size: 17px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }
.text-3xl  { font-size: 30px; }
.text-4xl  { font-size: 36px; }
.text-5xl  { font-size: 44px; }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-ink     { color: var(--ink); }
.text-ink-2   { color: var(--ink-2); }
.text-muted   { color: var(--muted); }
.text-navy    { color: var(--navy); }
.text-amber   { color: var(--amber-2); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }
.text-info    { color: var(--info); }
.text-white   { color: #fff; }

.text-uppercase { text-transform: uppercase; letter-spacing: 0.06em; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.italic { font-style: italic; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabular { font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------
   Layout
   ---------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.container-wide {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.page {
  padding-top: 32px;
  padding-bottom: 64px;
}

.stack-1 > * + * { margin-top: 4px; }
.stack-2 > * + * { margin-top: 8px; }
.stack-3 > * + * { margin-top: 12px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-5 > * + * { margin-top: 20px; }
.stack-6 > * + * { margin-top: 24px; }
.stack-8 > * + * { margin-top: 32px; }
.stack-10 > * + * { margin-top: 40px; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row-tight { display: flex; align-items: center; gap: 6px; }
.row-loose { display: flex; align-items: center; gap: 20px; }
.row-top   { display: flex; align-items: flex-start; gap: 12px; }
.row-baseline { display: flex; align-items: baseline; gap: 8px; }
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.row-end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.row-wrap { flex-wrap: wrap; }

.col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.col-tight { display: flex; flex-direction: column; gap: 4px; }
.col-loose { display: flex; flex-direction: column; gap: 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-account { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
.grid-contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.flex-1 { flex: 1 1 auto; min-width: 0; }
.flex-auto { flex: 0 0 auto; }
.shrink-0 { flex-shrink: 0; }

.gap-0 { gap: 0; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.hidden { display: none !important; }
.relative { position: relative; }
.sticky { position: sticky; top: 80px; }

.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; align-items: center; gap: 6px; }

/* ----------------------------------------------------------
   Card
   ---------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card-pad {
  padding: 24px;
}
.card-pad-sm { padding: 16px; }
.card-pad-lg { padding: 32px; }

.card-muted {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-body { padding: 24px; }
.card-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.card-clickable {
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.card-clickable:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover {
  background: var(--surface-2);
  border-color: var(--ink-2);
}
.btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.btn:disabled,
.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--navy-2);
  border-color: var(--navy-2);
  color: #fff;
}

.btn-amber {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}
.btn-amber:hover {
  background: var(--amber-2);
  border-color: var(--amber-2);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: transparent;
}

.btn-danger {
  background: var(--surface);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn-icon:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-block { display: flex; width: 100%; }

/* ----------------------------------------------------------
   Pills
   ---------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink-2);
}
.pill::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .9;
}

.pill-success {
  background: #e7f3ee;
  color: var(--success);
  border-color: #c8e6d6;
}
.pill-warning {
  background: #f7eed8;
  color: var(--warning);
  border-color: #ead9aa;
}
.pill-danger {
  background: #f6e1dc;
  color: var(--danger);
  border-color: #e6c4bd;
}
.pill-info {
  background: #e3ecf5;
  color: var(--info);
  border-color: #c8d6e6;
}
.pill-muted {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}
.pill-neutral {
  background: #ece9df;
  color: var(--ink-2);
  border-color: var(--border);
}
.pill-amber {
  background: #f1e4d2;
  color: var(--amber-2);
  border-color: #e2cdb0;
}

.pill-no-dot::before { display: none; }

.pill-clickable { cursor: pointer; }
.pill-clickable:hover { filter: brightness(.97); }

/* ----------------------------------------------------------
   Progress
   ---------------------------------------------------------- */
.progress {
  width: 100%;
  height: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-bar {
  height: 100%;
  background: var(--navy);
  border-radius: 999px;
  transition: width .35s ease;
}
.progress-bar-amber   { background: var(--amber); }
.progress-bar-success { background: var(--success); }
.progress-bar-warning { background: var(--warning); }

.progress-lg { height: 12px; }
.progress-sm { height: 6px; }

.progress-with-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ----------------------------------------------------------
   Form controls
   ---------------------------------------------------------- */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field-help {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.field-error {
  margin-top: 4px;
  font-size: 11px;
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.input::placeholder,
.textarea::placeholder { color: var(--muted); }

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--ink-2);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(183,140,94,.18);
}

.select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%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' stroke='%238d92a0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.textarea {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.radio-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  background: var(--surface);
}
.radio-row input { accent-color: var(--navy); }

/* ----------------------------------------------------------
   Divider / kbd
   ---------------------------------------------------------- */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 16px 0;
  width: 100%;
}
.divider-vert {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 0 8px;
}

.kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  box-shadow: inset 0 -1px 0 rgba(20,30,55,.04);
}

/* ----------------------------------------------------------
   Nav bar
   ---------------------------------------------------------- */
.nav-bar {
  background: var(--navy);
  color: #fff;
  height: 56px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: #fff;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.nav-brand .nav-brand-mark {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
  align-self: center;
  margin-right: 4px;
}
.nav-brand-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-left: 6px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.78);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.nav-link:hover { color: #fff; }
.nav-link.is-active {
  color: #fff;
  border-bottom-color: var(--amber);
}
.nav-cta { margin-left: auto; }
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,.1);
  height: 28px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
}
.nav-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

/* ----------------------------------------------------------
   Stat card
   ---------------------------------------------------------- */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
}
.stat-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.stat-value {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-value-sm {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-2);
}
.stat-delta-up    { color: var(--success); }
.stat-delta-down  { color: var(--danger); }
.stat-delta-flat  { color: var(--muted); }
.stat-sublabel {
  font-size: 11px;
  color: var(--muted);
}

/* ----------------------------------------------------------
   Table / Task row
   ---------------------------------------------------------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr.row-clickable { cursor: pointer; }
.table tr.row-clickable:hover td { background: var(--surface-2); }

.task-row {
  display: grid;
  grid-template-columns: 110px 56px minmax(0,1fr) 120px 110px 110px 70px 80px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: background .12s ease;
}
.task-row:hover { background: var(--surface-2); }
.task-row:last-child { border-bottom: none; }

.task-row .task-num {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
}
.task-row .task-label {
  color: var(--ink);
  font-weight: 500;
}
.task-row .task-sub {
  color: var(--ink-2);
  font-size: 12px;
  margin-top: 2px;
}
.task-row.is-sub {
  padding-left: 48px;
  background: rgba(245,243,236,.4);
}
.task-row.is-blocked { background: #fbf3f0; }
.task-row.is-blocked:hover { background: #f6e8e3; }

.task-blocker {
  margin-top: 6px;
  font-size: 12px;
  color: var(--danger);
  font-style: italic;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.task-target-overdue { color: var(--danger); font-weight: 500; }
.task-days-warn      { color: var(--danger); font-weight: 500; }

.task-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Segmented filter */
.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 3px;
  gap: 2px;
}
.segmented-btn {
  height: 28px;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  font-family: var(--font-sans);
}
.segmented-btn:hover { color: var(--ink); }
.segmented-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(20,30,55,.06);
}

/* ----------------------------------------------------------
   Stepper (wizard)
   ---------------------------------------------------------- */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border-2);
  background: var(--surface);
  color: var(--ink-2);
  flex-shrink: 0;
  transition: all .2s ease;
}
.step-label {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
}
.step.is-active .step-circle {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.step.is-active .step-label {
  color: var(--ink);
  font-weight: 600;
}
.step.is-done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.step.is-done .step-label { color: var(--ink); }
.step-connector {
  flex: 1 1 auto;
  height: 1px;
  background: var(--border-2);
  margin: 0 14px;
  min-width: 24px;
}
.step.is-done + .step-connector { background: var(--success); }

/* ----------------------------------------------------------
   Banner / Callout
   ---------------------------------------------------------- */
.banner {
  border-radius: var(--radius-card);
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 16px;
}
.banner-amber {
  background: #f7ede0;
  border-color: #e6d3b2;
  color: var(--ink);
}
.banner-navy {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.banner-success {
  background: #e7f3ee;
  border-color: #c8e6d6;
}

.callout {
  border-left: 3px solid var(--amber);
  background: var(--surface-2);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
}
.callout-stretch {
  border-left-color: var(--amber);
  background: #f7ede0;
  color: var(--ink);
}

/* ----------------------------------------------------------
   Activity feed
   ---------------------------------------------------------- */
.activity {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.activity-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
  margin-top: 6px;
  margin-left: 10px;
}
.activity-text { color: var(--ink); }
.activity-meta { color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ----------------------------------------------------------
   Owner portal cards
   ---------------------------------------------------------- */
.owner-action {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.owner-action-due {
  font-size: 12px;
  color: var(--ink-2);
}

/* ----------------------------------------------------------
   Misc
   ---------------------------------------------------------- */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--muted);
  margin: 0 6px;
  vertical-align: middle;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  flex-shrink: 0;
}
.avatar-amber { background: var(--amber); color: #fff; border-color: var(--amber); }
.avatar-navy  { background: var(--navy);  color: #fff; border-color: var(--navy); }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 32px 0 12px 0;
}
.section-title:first-child { margin-top: 0; }

.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.detail-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .detail-key {
  color: var(--ink-2);
  font-weight: 500;
}
.detail-row .detail-val { color: var(--ink); }

/* SOP popover (mock — anchor only) */
.sop-link {
  font-size: 12px;
  color: var(--info);
  text-decoration: underline;
  text-decoration-color: rgba(47,93,142,.3);
  text-underline-offset: 2px;
  cursor: pointer;
}
.sop-link:hover { text-decoration-color: var(--info); }

/* ----------------------------------------------------------
   Scrollbar (webkit)
   ---------------------------------------------------------- */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border: 2px solid var(--bg);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ----------------------------------------------------------
   Animations
   ---------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .25s ease; }

[x-cloak] { display: none !important; }

/* ----------------------------------------------------------
   Print
   ---------------------------------------------------------- */
@media print {
  body { background: #fff; color: #000; }
  .nav-bar, .btn, .nav-cta, .sticky { display: none !important; }
  .card, .stat-card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  .container, .container-wide {
    max-width: 100%;
    padding: 0;
  }
  a { color: #000; text-decoration: underline; }
  .pill { border: 1px solid #999; }
}

/* ----------------------------------------------------------
   Responsive (graceful shrink — desktop-first)
   ---------------------------------------------------------- */
@media (max-width: 1100px) {
  .grid-account { grid-template-columns: 1fr; }
  .grid-stats   { grid-template-columns: repeat(2, 1fr); }
  .task-row {
    grid-template-columns: 80px minmax(0,1fr) 110px 80px;
  }
  .task-row > .task-cell-hide { display: none; }
}
@media (max-width: 720px) {
  .grid-3, .grid-4, .grid-contacts { grid-template-columns: 1fr; }
  .grid-stats { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

/* ============================================================
   === Page-builder compat layer ===
   Classes referenced by HTML files that were not defined above.
   Built using existing design tokens — no new variables.
   ============================================================ */

/* ---------- Generic text helpers ---------- */
.muted        { color: var(--muted); }
.text-italic  { font-style: italic; }
.display      { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; }

/* ---------- Page wrapper (portfolio + wide layouts) ---------- */
.page-wide {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding: 32px;
}

/* ---------- Nav internals (index.html / onboard.html brand block) ---------- */
.brand-mark {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #fff;
}
.brand-dot {
    color: var(--amber);
    margin: 0 2px;
}
.pill-poc {
    height: 18px;
    padding: 0 8px;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    margin-left: 8px;
}
.pill-poc::before { display: none; }

/* ---------- Hero header (portfolio) ---------- */
.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 0;
}
.hero-text { flex: 1 1 auto; min-width: 0; }
.hero-text .display,
.hero-text h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0;
}
.hero-sub {
    margin-top: 8px;
    font-size: 15px;
    color: var(--ink-2);
}
.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ---------- Stats row + stat-card extras ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-foot {
    font-size: 12px;
    color: var(--muted);
    margin-top: auto;
}
.stat-value.is-neg { color: var(--danger); }

/* ---------- Briefing teaser card (portfolio) ---------- */
.briefing-card {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    background: #fbf6ec;
    border: 1px solid #e6d3b2;
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}
.briefing-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.briefing-icon svg { width: 20px; height: 20px; }
.briefing-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.briefing-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.2;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.briefing-summary {
    margin: 0;
    font-size: 15px;
    color: var(--ink-2);
    line-height: 1.5;
}
.briefing-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--navy);
    text-decoration: none;
    white-space: nowrap;
}
.briefing-link:hover { color: var(--amber-2); }
.briefing-link svg { width: 14px; height: 14px; }

/* ---------- Accounts card + tabs (portfolio) ---------- */
.accounts-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 24px;
}
.accounts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.accounts-count {
    font-size: 12px;
    color: var(--muted);
}

.tabs {
    display: inline-flex;
    align-items: center;
    gap: 0;
}
.tab {
    height: auto;
    padding: 8px 14px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    margin-left: -1px;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tab:first-child { margin-left: 0; }
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    z-index: 1;
}

/* ---------- Accounts table ---------- */
.accounts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.accounts-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-2);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.accounts-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--ink);
    font-size: 13px;
}
.accounts-table tbody tr:last-child td { border-bottom: none; }
.accounts-table tbody tr:hover td { background: var(--surface-2); }

.accounts-table .col-name      { text-align: left; }
.accounts-table .col-num       { text-align: right; font-variant-numeric: tabular-nums; }
.accounts-table .col-progress  { width: 200px; }
.accounts-table .col-status    { width: 130px; text-align: right; }

.row-link { cursor: pointer; }

.cell-name { padding-right: 12px; }
.fh-name {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: color .15s ease;
}
.fh-name:hover { color: var(--amber-2); }

/* ---------- Inline progress (table cells) ---------- */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.progress-wrap .progress { flex: 1 1 auto; }
.progress-pct {
    font-size: 12px;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* ---------- Footnote ---------- */
.footnote {
    font-size: 12px;
    color: var(--muted);
    margin-top: 16px;
}

/* === Less-fancy fonts override (sans-only display) === */
.font-serif,
.display,
.h1, .h2, .h3,
.hero-text h1,
.hero-text .display,
.briefing-title,
.stat-value,
.stat-card .value,
.stat-card .value.big,
.nav-brand,
.brand-mark,
.section h2,
.header-card h1,
.modal-head h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.h1, .hero-text h1, .header-card h1 { font-weight: 700; letter-spacing: -0.025em; }

/* === Sample data banner === */
.poc-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(19, 36, 61, 0.92);
  color: #fff;
  border-radius: 999px;
  font: 500 12px/1 var(--font-sans);
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.poc-banner .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(183,140,94,.25);
  animation: poc-pulse 2.4s ease-in-out infinite;
}
@keyframes poc-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(183,140,94,.25); }
  50%      { box-shadow: 0 0 0 6px rgba(183,140,94,.10); }
}
