:root {
  color-scheme: light;
  --ink: #152126;
  --muted: #607078;
  --line: #d9e1e3;
  --panel: #ffffff;
  --soft: #eef4f3;
  --bg: #f6f8f5;
  --green: #1f8a70;
  --teal: #0f6b7b;
  --blue: #3656a7;
  --red: #b54747;
  --amber: #ad7418;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  padding: 0 14px;
  cursor: pointer;
}

button.secondary {
  background: #e6eded;
  color: var(--ink);
}

button.warning {
  background: var(--amber);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.loading {
  min-height: 80vh;
  display: grid;
  place-items: center;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0 20px;
}

.view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

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

.mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 14px;
}

.muted {
  color: var(--muted);
}

.hero-note {
  max-width: 900px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 440px);
}

.login-hero {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(120deg, rgba(31, 138, 112, 0.18), transparent 42%),
    linear-gradient(200deg, rgba(54, 86, 167, 0.14), transparent 52%),
    #eaf1ed;
}

.login-copy {
  max-width: 720px;
}

.login-copy p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 32px;
  background: white;
  border-left: 1px solid var(--line);
}

.form-box {
  width: 100%;
  display: grid;
  gap: 14px;
}

.demo-creds {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.panel,
.metric,
.table-wrap,
.coach,
.architecture {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 16px;
}

.metric {
  padding: 16px;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric strong {
  display: block;
  font-size: 26px;
  margin-top: 10px;
}

.metric small {
  color: var(--muted);
  line-height: 1.45;
}

.status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pilot-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pilot-map article {
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.pilot-map p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.client-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(31, 138, 112, 0.14), transparent 50%),
    linear-gradient(245deg, rgba(54, 86, 167, 0.12), transparent 54%),
    white;
}

.client-hero h1 {
  max-width: 860px;
}

.client-hero p {
  max-width: 760px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.score-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid rgba(21, 33, 38, 0.14);
  border-radius: 8px;
  background: #152126;
  color: white;
}

.score-card span {
  color: #b9c7c9;
}

.score-card strong {
  font-size: 72px;
  line-height: 0.95;
}

.score-card p {
  color: #d7e2e0;
  font-size: 14px;
  line-height: 1.45;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.focus-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.focus-card.primary {
  border-color: rgba(31, 138, 112, 0.45);
  background: #f1faf5;
}

.focus-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.focus-card strong {
  display: block;
  margin: 12px 0;
  font-size: 30px;
}

.focus-card p {
  color: var(--muted);
  line-height: 1.45;
}

.client-coach {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 0;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.coach-prompt {
  padding: 18px;
}

.coach-prompt h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.client-answer {
  min-height: 230px;
}

.next-actions {
  margin-top: 20px;
}

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

.action-list article {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.action-list p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.source-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f3;
}

.source-strip p {
  margin-top: 6px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
}

.pill.good {
  background: #dff3ea;
  color: #13694e;
}

.pill.warn {
  background: #fff0d7;
  color: #80500e;
}

.pill.bad {
  background: #ffe2df;
  color: #8d2d2d;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
}

.coach {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  overflow: hidden;
}

.coach-form,
.coach-answer {
  padding: 16px;
}

.coach-answer {
  border-left: 1px solid var(--line);
  background: #fbfcfb;
  white-space: pre-wrap;
  line-height: 1.55;
}

.flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 10px;
}

.flow-step {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.flow-step strong {
  display: block;
  margin-bottom: 8px;
}

.error {
  color: var(--red);
}

@media (max-width: 920px) {
  .login {
    grid-template-columns: 1fr;
  }

  .login-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .coach,
  .client-hero,
  .client-grid,
  .client-coach,
  .action-list,
  .pilot-map,
  .flow {
    grid-template-columns: 1fr;
  }

  .source-strip,
  .view-tabs {
    width: 100%;
  }

  .source-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .coach-answer {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
