:root {
  --ink: #132033;
  --muted: #586274;
  --soft: #f7f2ea;
  --surface: #fbf8f2;
  --white: #ffffff;
  --line: #e5dccd;
  --gold: #a87322;
  --gold-soft: #f7ead4;
  --navy: #0d1d32;
  --green: #2f6f55;
  --red: #9f3f35;
  --amber: #9a6a16;
  --blue: #315f85;
  --shadow: 0 18px 44px rgba(32, 38, 46, 0.09);
  --tight-shadow: 0 10px 24px rgba(32, 38, 46, 0.08);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0)),
    var(--soft);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

main,
.view,
.panel,
.portal-card,
.record-card,
.record-card > div,
.section-heading,
.panel-heading,
.topbar,
.topbar-actions,
.button-row {
  min-width: 0;
}

img,
video,
iframe {
  max-width: 100%;
}

body.auth-locked .app-shell {
  display: none;
}

body.auth-unlocked .auth-gate {
  display: none;
}

body.member-access .full-service-section {
  display: none;
}

body:not(.member-access) .member-section {
  display: none;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.12;
  letter-spacing: 0;
}

p,
label,
li {
  line-height: 1.55;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--navy);
}

.auth-card {
  width: min(100%, 520px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-form,
.diagnostic-form {
  display: grid;
  gap: 18px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-message {
  min-height: 22px;
  margin: 16px 0 0;
  color: #245c89;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.loading-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.loading-status p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid #eadfce;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100vh;
  padding: 30px 22px;
  background: var(--navy);
  color: var(--white);
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(168, 115, 34, 0.5);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

.brand-lockup h1 {
  margin: 0;
  font-size: 21px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  text-align: left;
  overflow-wrap: anywhere;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--gold);
}

.sidebar-footer {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-weight: 800;
  text-decoration: underline;
}

main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 234, 0.94);
  backdrop-filter: blur(14px);
}

.topbar h2 {
  margin: 0;
  font-size: 28px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view {
  display: none;
  max-width: 1180px;
  padding: 34px;
}

.view.is-active {
  display: block;
}

.hero-panel,
.panel,
.guide-card,
.score-card,
.action-card,
.conversion-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(19, 32, 51, 0.02);
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.hero-panel h3 {
  max-width: 850px;
  margin-bottom: 14px;
  font-size: 34px;
}

.hero-panel p {
  max-width: 850px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.guide-grid,
.score-grid,
.form-grid {
  display: grid;
  gap: 18px;
}

.guide-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.guide-card,
.score-card,
.panel,
.action-card,
.conversion-panel {
  padding: 24px;
}

.guide-card h4,
.action-card h4 {
  margin-bottom: 10px;
  font-size: 20px;
}

.guide-card p,
.action-card p,
.section-heading p,
.lead-copy,
.panel-heading p {
  color: var(--muted);
}

.step-number {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading h3,
.panel-heading h3 {
  margin-bottom: 8px;
  font-size: 26px;
}

.panel-heading {
  margin-bottom: 16px;
}

.panel-heading h3 {
  margin-bottom: 0;
  font-size: 22px;
}

.score-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.score-card {
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--gold);
}

.score-card span {
  display: block;
  font-size: 36px;
  font-weight: 900;
}

.score-card p {
  margin: 6px 0 12px;
  color: var(--muted);
}

.signal-label,
.action-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ede7df;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  color: #465368;
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input,
select {
  min-height: 48px;
  padding: 10px 12px;
}

textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #cfc1ad;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  background: var(--white);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(168, 115, 34, 0.24);
  outline-offset: 2px;
}

.primary-action,
.secondary-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-weight: 900;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.25;
}

.portal-form.is-busy button[type="submit"]::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-action {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--white);
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.compact-button-row {
  gap: 8px;
  margin-top: 10px;
}

.primary-action:hover,
.secondary-action:hover {
  box-shadow: var(--tight-shadow);
  transform: translateY(-1px);
}

.compact-action {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.muted-pill {
  background: #ede7df;
  color: var(--muted);
}

.status-missing {
  background: #ede7df;
  color: var(--muted);
}

.status-weak {
  background: #f6dfd9;
  color: var(--red);
}

.status-review {
  background: var(--gold-soft);
  color: var(--amber);
}

.status-clear {
  background: #e4efe9;
  color: var(--green);
}

.status-strong {
  background: #e3edf5;
  color: var(--blue);
}

.question-list {
  display: grid;
  gap: 14px;
}

.question-row {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.28fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.question-row:hover {
  border-color: #d3c6b7;
  background: #fffdf8;
}

.intake-panel {
  display: grid;
  gap: 18px;
}

.intake-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede7df;
}

.intake-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 180ms ease;
}

.intake-step-body {
  display: grid;
  gap: 18px;
}

.intake-card,
.branch-section,
.optional-panel,
.summary-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.intake-card,
.branch-section,
.summary-box {
  padding: 18px;
}

.intake-card h4,
.branch-section h4 {
  margin-bottom: 8px;
  font-size: 20px;
}

.intake-card p,
.field-help,
.intake-question small {
  color: var(--muted);
}

.plain-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.field-help {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.intake-question {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.intake-question span {
  display: grid;
  gap: 6px;
}

.intake-question small {
  font-size: 13px;
  line-height: 1.45;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.checkbox-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

.checkbox-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.check-card input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.check-card span {
  font-size: 15px;
  line-height: 1.4;
}

.optional-panel {
  padding: 0;
}

.optional-panel summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--ink);
  font-weight: 900;
}

.optional-panel .question-list {
  padding: 0 18px 18px;
}

.summary-box {
  max-height: 520px;
  overflow: auto;
  background: var(--white);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

.confirmation-card {
  background: #fffaf2;
}

.form-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e4b3aa;
  border-radius: var(--radius);
  background: #f6dfd9;
  color: var(--red);
  font-weight: 800;
}

.intake-actions {
  justify-content: flex-end;
}

.question-row span {
  color: var(--ink);
  font-size: 16px;
}

.insight-list,
.action-list {
  display: grid;
  gap: 12px;
}

.insight-item,
.action-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.insight-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.insight-item strong,
.action-card strong {
  display: block;
  margin-bottom: 5px;
}

.insight-item span,
.action-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.action-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 900;
}

.instruction-card,
.helper-note,
.section-guidance,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf2;
  color: var(--muted);
  line-height: 1.55;
}

.instruction-card {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
}

.instruction-card strong,
.helper-note strong,
.section-guidance strong {
  color: var(--ink);
}

.helper-note,
.section-guidance,
.empty-state {
  padding: 14px 16px;
}

.empty-state {
  margin-bottom: 18px;
  background: var(--white);
  text-align: center;
}

.conversion-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  background: #fffaf2;
  box-shadow: var(--tight-shadow);
}

.conversion-panel h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

.conversion-panel p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.portal-card,
.portal-form,
.record-list,
.admin-section-stack {
  display: grid;
  gap: 14px;
}

.portal-card {
  align-content: start;
}

.hospitality-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  background: #fffaf2;
  box-shadow: var(--tight-shadow);
}

.hospitality-panel h3 {
  margin-bottom: 8px;
}

.hospitality-panel p {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--muted);
}

.hospitality-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.start-path-panel {
  margin-bottom: 18px;
}

.path-list {
  display: grid;
  gap: 10px;
}

.path-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.path-step.is-current {
  border-color: rgba(168, 115, 34, 0.55);
  background: #fffaf2;
  box-shadow: inset 4px 0 0 var(--gold);
}

.path-step.is-complete {
  background: #f3f8f5;
}

.path-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--amber);
  font-weight: 900;
}

.path-step.is-complete .path-number {
  background: #e4efe9;
  color: var(--green);
}

.path-step strong,
.path-step p {
  margin: 0;
}

.path-step p {
  color: var(--muted);
}

.subsection-title {
  margin: 4px 0 -4px;
  font-size: 15px;
  color: var(--ink);
}

.portal-card-wide {
  grid-column: 1 / -1;
}

.readiness-list {
  display: grid;
  gap: 12px;
}

.compact-readiness {
  margin-bottom: 8px;
}

.status-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.status-check {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.status-check span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-check strong {
  color: var(--ink);
}

.status-check small {
  color: var(--muted);
  line-height: 1.4;
}

.status-check.is-complete span {
  background: #e4efe9;
  color: var(--green);
}

.status-check.is-waiting span {
  background: var(--gold-soft);
  color: var(--amber);
}

.community-admin-panel {
  margin-bottom: 18px;
}

.support-repair-card {
  margin-bottom: 18px;
  background: #fffaf2;
}

.support-trigger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}

.support-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.support-tier {
  gap: 12px;
  min-width: 0;
}

.tier-featured {
  border-color: rgba(168, 115, 34, 0.55);
  box-shadow: inset 4px 0 0 var(--gold), var(--tight-shadow);
}

.tier-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.price-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.admin-followup-panel {
  margin-top: 18px;
}

.opportunity-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.opportunity-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.opportunity-card .compact-action {
  max-width: 100%;
  white-space: normal;
}

.community-post .status-pill {
  align-self: flex-start;
}

.record-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.record-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.record-card strong,
.record-card span,
.record-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.record-card strong {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 16px;
}

.record-card span,
.record-card p,
.record-card small {
  color: var(--muted);
}

.record-card p {
  margin: 8px 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.danger-action {
  border: 1px solid rgba(138, 47, 47, 0.38);
  background: transparent;
  color: #8a2f2f;
}

.danger-action:hover,
.danger-action:focus-visible {
  border-color: #8a2f2f;
  background: rgba(138, 47, 47, 0.08);
}

.job-status {
  min-height: 26px;
  padding: 5px 9px;
  font-size: 11px;
}

.status-interested {
  background: #e3edf5;
  color: var(--blue);
}

.status-new {
  background: #ede7df;
  color: var(--muted);
}

.status-applied,
.status-interview {
  background: var(--gold-soft);
  color: var(--amber);
}

.status-offer {
  background: #e4efe9;
  color: var(--green);
}

.status-denied,
.status-not-interested {
  background: #f6dfd9;
  color: var(--red);
}

.status-archived {
  background: #ede7df;
  color: var(--muted);
}

.status-open {
  background: #e3edf5;
  color: var(--blue);
}

.status-in-progress,
.status-waiting-on-kate {
  background: var(--gold-soft);
  color: var(--amber);
}

.status-completed {
  background: #e4efe9;
  color: var(--green);
}

.status-high {
  background: #f6dfd9;
  color: var(--red);
}

.status-medium {
  background: var(--gold-soft);
  color: var(--amber);
}

.status-low {
  background: #e4efe9;
  color: var(--green);
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.compact-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-stat {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(19, 32, 51, 0.02);
}

.dashboard-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-stat strong {
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.1;
}

.dashboard-stat small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

#clientDashboard.view {
  max-width: 1320px;
  padding: 24px;
}

#clientDashboard .hero-panel {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
  padding: 22px;
  box-shadow: var(--tight-shadow);
}

#clientDashboard .hero-panel h3 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: 28px;
}

#clientDashboard .hero-panel p {
  max-width: 820px;
  font-size: 15px;
}

#clientDashboard .start-path-panel {
  margin-bottom: 14px;
  padding: 18px;
}

.question-spine-panel {
  margin-bottom: 14px;
}

.question-spine-grid,
.decision-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 10px;
}

.question-spine-grid article,
.decision-strip article {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.question-spine-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 26px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.question-spine-grid strong,
.decision-strip strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.question-spine-grid p,
.decision-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.decision-strip {
  margin-bottom: 12px;
}

.decision-strip article {
  background: #fffaf2;
}

#clientDashboard .panel-heading {
  gap: 14px;
  margin-bottom: 4px;
}

#clientDashboard .panel-heading h3 {
  font-size: 20px;
}

#clientDashboard .panel-heading p,
#clientDashboard .section-note {
  font-size: 14px;
  line-height: 1.45;
}

#clientDashboard .portal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

#clientDashboard .portal-card,
#clientDashboard .portal-form,
#clientDashboard .record-list,
#clientDashboard .readiness-list {
  gap: 10px;
}

#clientDashboard .portal-card {
  padding: 18px;
}

#clientDashboard .portal-card-wide {
  grid-column: span 2;
}

#clientDashboard .path-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#clientDashboard .path-step {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  padding: 12px;
}

#clientDashboard .path-step .compact-action {
  grid-column: 2;
  width: fit-content;
}

#clientDashboard .path-step p {
  font-size: 14px;
  line-height: 1.4;
}

#clientDashboard .status-check-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
}

#clientDashboard .status-check {
  padding: 10px;
}

#clientDashboard .record-list {
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}

#clientDashboard .record-card {
  padding: 12px;
}

#clientDashboard .status-check strong,
#clientDashboard .status-check small,
#clientDashboard .record-card strong,
#clientDashboard .record-card span,
#clientDashboard .record-card small,
#clientDashboard .record-card p,
.client-list button,
.client-list strong,
.client-list small {
  min-width: 0;
  overflow-wrap: anywhere;
}

#clientDashboard textarea {
  min-height: 82px;
}

#clientDashboard #clientMessageForm textarea,
#clientDashboard #clientFileForm textarea {
  min-height: 68px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.client-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.client-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.client-list-item:hover,
.client-list-item.is-active {
  border-color: rgba(168, 115, 34, 0.5);
  background: #fffaf2;
  box-shadow: inset 3px 0 0 var(--gold);
}

.client-list-item span,
.client-list-item small {
  display: block;
  color: var(--muted);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

.client-list-item strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.admin-layout > .panel,
.portal-card,
.admin-section-stack,
.admin-section-stack section {
  min-width: 0;
}

.admin-section-stack section {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-section-stack h4 {
  margin-bottom: 0;
  font-size: 18px;
}

.section-note {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: 180ms ease;
  pointer-events: none;
  line-height: 1.45;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 5;
    gap: 16px;
    padding: 18px;
  }

  .primary-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    max-width: 220px;
    min-height: 40px;
    white-space: nowrap;
  }

  .score-grid,
  .guide-grid,
  .portal-grid,
  .admin-layout,
  .support-trigger-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #clientDashboard .portal-grid,
  #clientDashboard .path-list,
  #clientDashboard .status-check-grid,
  .dashboard-stat-grid,
  .compact-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .view,
  .topbar,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .topbar-actions,
  .hero-panel,
  .hospitality-panel,
  .section-heading,
  .panel-heading,
  .insight-item,
  .path-step,
  .record-card,
  .conversion-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-nav,
  .score-grid,
  .guide-grid,
  .portal-grid,
  .status-check-grid,
  .admin-layout,
  .opportunity-list,
  .support-trigger-grid,
  .form-grid,
  .question-row,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .primary-nav {
    display: flex;
  }

  #clientDashboard.view {
    padding: 18px;
  }

  #clientDashboard .portal-grid,
  #clientDashboard .path-list,
  #clientDashboard .status-check-grid,
  .dashboard-stat-grid,
  .compact-stat-grid {
    grid-template-columns: 1fr;
  }

  #clientDashboard .portal-card-wide,
  #clientDashboard .path-step .compact-action {
    grid-column: auto;
  }

  #clientDashboard .record-list {
    max-height: none;
    overflow: visible;
  }

  .record-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .record-title-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .status-pill,
  .muted-pill {
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .nav-item {
    min-height: 42px;
    font-size: 14px;
  }

  .hero-panel h3 {
    font-size: 27px;
  }

  .topbar h2 {
    font-size: 24px;
  }

  .hero-panel,
  .panel,
  .guide-card,
  .score-card,
  .action-card,
  .record-card,
  .conversion-panel,
  .auth-card {
    padding: 20px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    white-space: normal;
  }

  .opportunity-card {
    grid-template-columns: 1fr;
  }

  .hospitality-actions,
  .tier-topline {
    display: grid;
    width: 100%;
  }

  .price-pill {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .button-row {
    display: grid;
  }

  .path-step {
    grid-template-columns: 1fr;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    left: 14px;
    max-width: none;
  }
}
