/* Olaia Labs — SME Automation Assessment
   Ported from the standalone demo; layout and structure unchanged.
   Palette remapped to the site tokens (deep ink / warm ivory / aged gold),
   see src/styles/tokens/colors.css for the source values. */

:root {
  --ink: #131D25;
  --muted: #57606A;
  --forest: #131D25;
  --forest-soft: #27343F;
  --gold: #B99A5B;
  --gold-soft: #E4D6B6;
  --bone: #F4F0E8;
  --panel: #FBF9F4;
  --card-tint: #F7F3EA;
  --line: #D8D5CD;
  --success: #47604C;
  --warning: #7A6539;
  --danger: #8A4A34;
  --focus-ring: #7A6539;
  --shadow: 0 18px 45px rgba(19, 29, 37, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  background: #ECE7DB;
  color: var(--ink);
}

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

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 390px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 42px 38px 30px;
  background:
    radial-gradient(circle at 15% 20%, rgba(185,154,91,.18), transparent 34%),
    linear-gradient(155deg, #10171E 0%, #1C2832 58%, #10171E 100%);
  color: white;
  display: flex;
  flex-direction: column;
}

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

a.brand-lockup {
  color: inherit;
  text-decoration: none;
}

/* Official Olaia Labs artwork (public/brand/) — inverse variants on the dark
   sidebar, standard variants in the printed report footer */
.brand-mark {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
}

.brand-wordmark {
  display: block;
  height: 12px;
  width: auto;
}

.brand-subtitle {
  margin-top: 6px;
  max-width: 245px;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255,255,255,.6);
}

.sidebar-copy {
  margin: auto 0;
  padding: 40px 0;
}

.eyebrow, .step-kicker, .panel-kicker {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-copy .eyebrow { color: var(--gold-soft); }

.sidebar h1 {
  margin: 17px 0 18px;
  font-family: "Playfair Display", serif;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 600;
}

.sidebar-copy p {
  margin: 0;
  line-height: 1.7;
  color: rgba(255,255,255,.75);
}

.progress-card {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255,255,255,.06);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,.8);
}

.progress-track {
  height: 7px;
  margin-top: 12px;
  background: rgba(255,255,255,.13);
  border-radius: 20px;
  overflow: hidden;
}

.progress-fill {
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 20px;
  transition: width .3s ease;
}

.sidebar-footnote {
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255,255,255,.45);
}

.main-panel {
  padding: 54px;
  min-width: 0;
}

.assessment-card,
.results-section {
  max-width: 1100px;
  margin: 0 auto;
}

.assessment-card {
  position: relative;
  background: var(--panel);
  border-radius: 24px;
  padding: 54px;
  box-shadow: var(--shadow);
}

.top-actions {
  position: absolute;
  top: 24px;
  right: 28px;
  display: flex;
  gap: 8px;
}

.ghost-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 8px;
}

.ghost-button:hover { color: var(--forest); }

.step { display: none; }
.step.active { display: block; }

.step-header {
  max-width: 680px;
  margin-bottom: 38px;
}

.step-kicker, .panel-kicker { color: var(--gold); }

.step-header h2,
.report-cover h2 {
  margin: 12px 0 12px;
  font-family: "Playfair Display", serif;
  font-size: 38px;
  line-height: 1.15;
}

.step-header h2:focus,
.report-cover h2:focus { outline: none; }

.step-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.form-grid {
  display: grid;
  gap: 24px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field > span {
  font-size: 13px;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
  transition: .2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185,154,91,.18);
  background: white;
}

textarea { resize: vertical; }

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

.question-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: var(--card-tint);
}

.question-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.rating-option { cursor: pointer; }

/* Keep radios focusable for keyboard and screen-reader users
   (visually hidden instead of display:none) */
.rating-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.rating-option input:focus-visible + span {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.rating-option span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: white;
  transition: .18s ease;
}

.rating-option input:checked + span {
  border-color: var(--forest-soft);
  background: var(--forest);
  color: white;
  font-weight: 700;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 42px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.primary-button,
.secondary-button {
  min-width: 120px;
  border-radius: 11px;
  padding: 13px 18px;
  font-weight: 700;
  border: 1px solid transparent;
}

.primary-button {
  background: var(--forest);
  color: white;
}
.primary-button:hover { background: var(--forest-soft); }
.primary-button:disabled { opacity: .6; cursor: default; }

.secondary-button {
  background: white;
  border-color: var(--line);
  color: var(--forest);
}

.hidden { display: none !important; }

.results-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}

.report-cover,
.score-card,
.report-panel {
  background: var(--panel);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.report-cover {
  padding: 38px 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.report-cover .eyebrow { color: var(--gold); }
.report-cover h2 { margin-bottom: 8px; }
.report-cover p { margin: 0; color: var(--muted); }
.report-date { color: var(--muted); font-size: 13px; }

.score-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

/* Public teaser state: readiness score + email gate side by side */
.score-grid.score-grid--teaser { grid-template-columns: 1.3fr 2fr; }

.score-card { padding: 28px; }
.primary-score {
  background: linear-gradient(145deg, #131D25 0%, #27343F 100%);
  color: white;
}

.score-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
}
.primary-score .score-label { color: rgba(255,255,255,.66); }

.score-value {
  font-size: 66px;
  line-height: 1;
  font-weight: 700;
  margin: 14px 0 8px;
}
.score-value small { font-size: 23px; color: rgba(255,255,255,.45); }
.score-status {
  display: inline-block;
  border-radius: 30px;
  padding: 6px 10px;
  background: rgba(255,255,255,.12);
  font-size: 12px;
  font-weight: 700;
}
.score-card p { margin: 14px 0 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.primary-score p { color: rgba(255,255,255,.7); }
.metric-value { margin-top: 22px; font-size: 34px; font-weight: 700; color: var(--forest); }

.report-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.report-panel { padding: 30px; }
.full-width-panel { margin-bottom: 18px; }
.panel-heading { display: flex; justify-content: space-between; margin-bottom: 24px; }
.panel-heading h3 { margin: 7px 0 0; font-size: 22px; }

.dimension-bars { display: grid; gap: 18px; }
.dimension-row { display: grid; gap: 8px; }
.dimension-meta { display: flex; justify-content: space-between; font-size: 13px; }
.dimension-meta strong { color: var(--forest); }
.dimension-track { height: 10px; background: #ECE7DB; border-radius: 20px; overflow: hidden; }
.dimension-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--gold), var(--forest-soft)); }

.priority-workflow h4 { margin: 14px 0 10px; font-size: 24px; }
.priority-workflow p { color: var(--muted); line-height: 1.65; }
.priority-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--gold-soft);
  color: #7A6539;
  font-size: 11px;
  font-weight: 700;
}
.benefit-list { display: grid; gap: 10px; margin-top: 20px; }
.benefit-item { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.benefit-item::before { content: "✓"; color: var(--success); font-weight: 800; }

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 15px;
}
.opportunity-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: var(--card-tint);
}
.opportunity-rank { color: var(--gold); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.opportunity-card h4 { margin: 9px 0 8px; font-size: 17px; }
.opportunity-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.opportunity-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.tag { border-radius: 18px; padding: 5px 8px; font-size: 10px; background: #DDE2D7; color: #41493D; font-weight: 700; }

.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.roadmap-step { position: relative; padding-left: 20px; border-left: 2px solid var(--gold-soft); }
.roadmap-step span { color: var(--gold); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.roadmap-step h4 { margin: 8px 0; }
.roadmap-step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.risk-list { display: grid; gap: 12px; }
.risk-item { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.risk-item:last-child { border-bottom: 0; }
.risk-level { font-size: 12px; font-weight: 700; }
.risk-level.medium { color: var(--warning); }
.risk-level.high { color: var(--danger); }
.risk-level.low { color: var(--success); }
.risk-item p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 13px; }

.report-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.report-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.report-footer-brand .brand-mark { width: 34px; height: 34px; }
.report-footer-brand .brand-wordmark { height: 10px; margin-bottom: 5px; }

/* Email gate (public page only) */
.gate-card { padding: 28px; display: flex; flex-direction: column; }
.gate-card h3 {
  margin: 12px 0 10px;
  font-family: "Playfair Display", serif;
  font-size: 26px;
  line-height: 1.2;
}
.gate-card > p { margin: 0 0 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.gate-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gate-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.gate-list li::before { content: "✓"; color: var(--success); font-weight: 800; }
.gate-form { display: flex; gap: 10px; margin-top: 20px; }
.gate-form input[type="email"] { flex: 1; min-width: 0; background: white; }
.gate-form .primary-button { flex: 0 0 auto; }
.gate-note { margin: 12px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
.gate-error { margin: 12px 0 0; font-size: 12px; color: var(--danger); }

/* Website-submission loader (internal page only) */
.intake-box {
  max-width: 1100px;
  margin: 0 auto 18px;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 22px;
}
.intake-box > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin-bottom: 10px;
}
.intake-row { display: flex; gap: 10px; }
.intake-row input { flex: 1; min-width: 0; padding: 11px 12px; font-size: 13px; background: white; }
.intake-row .secondary-button { flex: 0 0 auto; min-width: 90px; }
.intake-status { margin: 10px 0 0; font-size: 12px; color: var(--success); }
.intake-status.error { color: var(--danger); }

.noscript-note {
  max-width: 1100px;
  margin: 0 auto 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 1050px) {
  .page-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; padding: 28px; }
  .sidebar-copy { margin: 40px 0; padding: 0; }
  .sidebar h1 { font-size: 36px; }
  .main-panel { padding: 28px; }
}

@media (max-width: 760px) {
  .main-panel { padding: 16px; }
  .assessment-card { padding: 28px 20px; border-radius: 18px; }
  .top-actions { position: static; justify-content: flex-end; margin-bottom: 24px; }
  .two-column, .score-grid, .report-grid, .opportunity-grid, .roadmap { grid-template-columns: 1fr; }
  .score-grid.score-grid--teaser { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .step-header h2, .report-cover h2 { font-size: 30px; }
  .report-cover { align-items: flex-start; flex-direction: column; gap: 18px; padding: 28px; }
  .risk-item { grid-template-columns: 1fr; gap: 6px; }
  .gate-form { flex-direction: column; }
}

@media print {
  body { background: white; }
  .sidebar, .no-print, .assessment-card, .intake-box, .gate-card { display: none !important; }
  .page-shell { display: block; }
  .main-panel { padding: 0; }
  .results-section { max-width: none; }
  .report-cover, .score-card, .report-panel { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .report-grid, .score-grid { gap: 10px; }
  .score-grid.score-grid--teaser { grid-template-columns: 1.3fr 1fr 1fr; }
  .full-width-panel { break-inside: avoid; }
}

/* Commercial and operating cost model (internal page only) */
.financial-panel { overflow: hidden; }
.financial-heading { align-items: flex-start; gap: 20px; }
.assumption-badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 20px;
  background: var(--gold-soft);
  color: #7A6539;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.financial-intro {
  max-width: 850px;
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.cost-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #F2EDE1;
  margin-bottom: 20px;
}
.compact-field { gap: 7px; }
.compact-field > span { font-size: 11px; }
.compact-field input,
.compact-field select { padding: 11px 12px; font-size: 13px; background: white; }
.cost-summary-grid,
.value-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 13px;
}
.cost-summary-card,
.value-summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px;
  background: var(--card-tint);
}
.cost-summary-card span,
.value-summary-card span {
  display: block;
  min-height: 30px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  line-height: 1.4;
}
.cost-summary-card strong,
.value-summary-card strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--forest);
  font-size: 25px;
  line-height: 1.1;
}
.cost-summary-card small,
.value-summary-card small {
  display: block;
  min-height: 30px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.featured-value {
  border-color: var(--forest-soft);
  background: linear-gradient(145deg, #131D25 0%, #27343F 100%);
}
.featured-value span,
.featured-value small { color: rgba(255,255,255,.68); }
.featured-value strong { color: white; }
.value-negative strong { color: var(--danger); }
.featured-value.value-negative { background: linear-gradient(145deg, #713A2A 0%, #8A4A34 100%); border-color: #713A2A; }
.cost-breakdown-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.cost-breakdown-column {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.cost-breakdown-column h4 { margin: 0 0 14px; font-size: 15px; }
.cost-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid #ECE7DB;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.cost-line strong { flex: 0 0 auto; color: var(--ink); }
.cost-line:last-child { border-bottom: 0; }
.total-line { padding-top: 13px; color: var(--ink); font-weight: 700; }
.total-line strong { color: var(--forest); font-size: 15px; }
.model-cost-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: #F0E9DA;
  color: #5C4F33;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .cost-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-summary-grid, .value-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .financial-heading { flex-direction: column; }
  .cost-config-grid,
  .cost-summary-grid,
  .value-summary-grid,
  .cost-breakdown-wrap { grid-template-columns: 1fr; }
}

@media print {
  .cost-config-grid { grid-template-columns: repeat(3, 1fr); padding: 12px; gap: 8px; }
  .compact-field input, .compact-field select { border: 0; padding: 4px 0; appearance: none; }
  .cost-summary-grid, .value-summary-grid { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .cost-summary-card, .value-summary-card { padding: 12px; }
  .cost-summary-card strong, .value-summary-card strong { font-size: 19px; }
  .cost-breakdown-wrap { gap: 8px; }
  .cost-breakdown-column { padding: 13px; }
}
