:root {
  --coral: #FF7E5F;
  --coral-deep: #E85A3C;
  --peach: #FEB47B;
  --cream: #FFF5EB;
  --cream-deep: #FFE5D0;
  --sky: #86C5DA;
  --ink: #2D3E5F;
  --ink-soft: #5A6B85;
  --sage: #A8C8B0;
  --muted: #8A8580;
  --border: rgba(45, 62, 95, 0.1);
  --error: #C13B2A;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
}

a { color: var(--coral-deep); }
a:hover { color: var(--coral); }

.site-header {
  padding: 16px 32px;
  background: var(--cream-deep);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--coral-deep);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.nav-user { color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.nav-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-link:hover { color: var(--coral-deep); }

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.role-founder { background: var(--peach); color: var(--ink); border-color: var(--peach); }
.role-owner   { background: var(--sky); color: var(--ink); border-color: var(--sky); }
.role-employee{ background: var(--sage); color: var(--ink); border-color: var(--sage); }
.role-solo    { background: var(--cream-deep); color: var(--ink); }

.inline-form { display: inline; margin: 0; }
.btn-link {
  background: none; border: none; color: var(--ink-soft);
  font: inherit; font-weight: 600; cursor: pointer; padding: 0;
}
.btn-link:hover { color: var(--coral-deep); }

.container {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h2 { font-size: 20px; margin: 0 0 12px; font-weight: 600; }

.hero { text-align: left; }
.hero-logo {
  width: 160px;
  height: 160px;
  display: block;
  margin: 0 0 24px;
}
.hero h1 {
  font-size: 56px;
  color: var(--coral-deep);
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 20px;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.lede { font-size: 17px; color: var(--ink-soft); margin: 0 0 24px; }
.hint { font-size: 14px; color: var(--muted); margin-top: 24px; }
.muted { color: var(--muted); font-size: 14px; }

.cta-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

.btn-primary {
  display: inline-block;
  background: var(--coral);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: var(--coral-deep); color: white; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.btn-secondary:hover { border-color: var(--coral); color: var(--coral-deep); }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
}

.form { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 600; font-size: 14px; color: var(--ink); }
.form-required { color: var(--coral-deep); margin-left: 2px; }
.form-hint { font-size: 13px; color: var(--muted); margin-top: 2px; }

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field textarea,
.form-field select {
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 126, 95, 0.15);
}
.form-field textarea { resize: vertical; min-height: 80px; }

.form-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.form-checkbox {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; font-size: 14px; background: var(--cream);
}
.form-checkbox:has(input:checked) { background: var(--cream-deep); border-color: var(--coral); }
.form-checkbox input { margin: 0; }

.form-error {
  background: #FDE8E4;
  border: 1px solid var(--error);
  color: var(--error);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.form-foot {
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.welcome h1 { color: var(--coral-deep); font-size: 40px; }

.dashboard h1 { font-size: 28px; margin-bottom: 4px; }

.inline-form-row { display: flex; gap: 8px; align-items: center; margin: 12px 0 16px; flex-wrap: wrap; }
.inline-form-row select, .inline-form-row input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.inline-form-row input[type=number] { width: 80px; }
.static-field {
  padding: 8px 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.codes-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 14px;
}
.codes-table th, .codes-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.codes-table th {
  background: var(--cream);
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.codes-table code {
  background: var(--cream-deep);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 13px;
}

.placeholder h1 { font-size: 32px; color: var(--ink); margin: 0 0 12px; }
.placeholder p { color: var(--ink-soft); font-size: 16px; }

.site-footer {
  padding: 24px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.console-nav {
  display: flex;
  gap: 4px;
  margin: -24px 0 24px;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--border);
}
.console-nav a {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.console-nav a:hover { color: var(--coral-deep); }
.console-nav a.active {
  color: var(--coral-deep);
  border-bottom-color: var(--coral);
  background: var(--cream-deep);
}

.console h1 { font-size: 28px; margin: 0 0 8px; }
.console-section {
  margin: 32px 0;
  padding-bottom: 4px;
}
.console-section h2 {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 24px 0 32px;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat-detail {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stat-warn .stat-value { color: var(--error); }
.stat-muted { color: var(--muted); font-size: 18px; font-weight: 600; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table th {
  background: var(--cream);
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table tbody tr:hover { background: var(--cream); }
.data-table code {
  background: var(--cream-deep);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 12px;
}

.breadcrumb {
  font-size: 13px;
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--coral-deep); }

.def-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 14px;
}
.def-list dt {
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: capitalize;
}
.def-list dt:before { content: ""; }
.def-list dt::first-letter { text-transform: uppercase; }
.def-list dd { margin: 0; color: var(--ink); }


/* =========================================================
   Role views (Owner / Employee / Founder / Solo)
   ========================================================= */

.role-page { max-width: 880px; margin: 0 auto; }

.role-header { margin-bottom: 32px; }
.role-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.role-page h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.role-subtitle { color: var(--ink-soft); font-size: 16px; font-style: italic; }

.briefing-headline {
  background: linear-gradient(135deg, white 0%, var(--cream-deep) 100%);
  border-radius: 14px;
  padding: 28px 36px;
  margin: 0 0 20px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.05);
  border-left: 5px solid var(--coral);
}
.briefing-eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.briefing-headline-body {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.briefing-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
}
.briefing-card {
  background: white;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border-top: 3px solid var(--coral);
}
.briefing-sage { border-top-color: var(--sage); }
.briefing-peach { border-top-color: var(--peach); }
.briefing-coral { border-top-color: var(--coral); }
.briefing-card .briefing-eyebrow { font-size: 9px; }
.briefing-card .briefing-sage { color: var(--sage); }
.briefing-body { font-size: 14px; color: var(--ink); line-height: 1.55; }

@media (max-width: 720px) {
  .briefing-three { grid-template-columns: 1fr; }
}

.section-title {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 6px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.section-sub {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 16px;
  font-size: 13px;
}

.team-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.team-card {
  background: white;
  border-radius: 10px;
  padding: 18px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border-left: 3px solid var(--coral);
}
.team-card-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 4px; }
.team-first { font-family: Georgia, serif; font-size: 16px; font-weight: 700; color: var(--ink); }
.team-role { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.team-summary { font-size: 14px; color: var(--ink-soft); line-height: 1.5; font-style: italic; }

.empty-card {
  background: white;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border-left: 4px solid var(--sky);
  margin-bottom: 24px;
}
.empty-card-warm { border-left-color: var(--peach); }
.empty-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.empty-body { color: var(--ink); line-height: 1.6; font-size: 15px; }
.empty-steps {
  margin: 14px 0 0 0;
  padding-left: 22px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.placeholder-section { margin: 24px 0; }
.placeholder-card {
  background: var(--cream);
  border: 1px dashed rgba(45, 62, 95, 0.15);
  border-radius: 10px;
  padding: 20px 24px;
}
.placeholder-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.placeholder-body { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }

.privacy-badge-fixed {
  position: fixed;
  top: 76px;
  right: 24px;
  background: white;
  border: 1px solid var(--sage);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  z-index: 50;
}
.privacy-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(168, 200, 176, 0.25);
}

.employer-note {
  background: var(--cream-deep);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
}
.employer-eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.employer-body { font-size: 14px; color: var(--ink); line-height: 1.5; }

.mi-cta {
  background: var(--cream-deep);
  border-radius: 10px;
  padding: 22px 26px;
  margin-top: 24px;
}
.mi-cta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mi-cta-body { font-size: 14px; color: var(--ink); line-height: 1.55; }


/* =========================================================
   Mosaic Intelligence chat widget (floating, bottom-right)
   ========================================================= */

#mi-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 10px 20px 10px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(45, 62, 95, 0.32);
  z-index: 100;
  user-select: none;
  transition: transform 0.15s, background 0.15s;
}
#mi-launcher:hover { background: #1d2c47; transform: translateY(-2px); }
#mi-launcher img {
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  padding: 3px;
}

#mi-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 80px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.mi-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--cream-deep);
  border-bottom: 1px solid var(--border);
}
.mi-mark { width: 32px; height: 32px; }
.mi-title { font-weight: 700; color: var(--ink); font-size: 15px; }
.mi-sub { font-size: 11px; color: var(--ink-soft); letter-spacing: 0.06em; }
.mi-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 8px;
}
.mi-close:hover { color: var(--coral-deep); }

.mi-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--cream);
}
.mi-msg { display: flex; }
.mi-msg-user { justify-content: flex-end; }
.mi-msg-assistant { justify-content: flex-start; }
.mi-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}
.mi-msg-user .mi-bubble {
  background: var(--coral);
  color: white;
  border-bottom-right-radius: 4px;
}
.mi-msg-assistant .mi-bubble {
  background: white;
  color: var(--ink);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.mi-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid var(--border);
}
.mi-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  background: var(--cream);
}
.mi-form input:focus {
  outline: none;
  border-color: var(--coral);
  background: white;
}
.mi-form button {
  background: var(--coral);
  color: white;
  border: none;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.mi-form button:hover { background: var(--coral-deep); }
.mi-form input:disabled { opacity: 0.6; }
