:root {
  --paper: #f7f4ed;
  --surface: #fffdfa;
  --surface-strong: #ffffff;
  --ink: #142326;
  --muted: #637174;
  --line: #d9ddd6;
  --teal: #0b7770;
  --teal-dark: #07534f;
  --mint: #dcefeb;
  --coral: #d45d4c;
  --coral-soft: #f8dfd9;
  --gold: #bc842d;
  --green: #207a4a;
  --red: #a83a35;
  --shadow: 0 18px 55px rgba(20, 35, 38, 0.12);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(220, 239, 235, 0.62), rgba(247, 244, 237, 0) 360px),
    var(--paper);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(255, 253, 250, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

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

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.topbar-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 0.88rem;
  white-space: nowrap;
}

.pill svg,
.btn svg,
.snapshot-list svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.job-page {
  width: calc(100% - 40px);
  max-width: 1420px;
  margin: 28px auto;
}

.job-hero {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 28px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--shadow);
}

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

.job-copy h1 {
  font-size: clamp(2.3rem, 5vw, 5.25rem);
  max-width: 11ch;
}

.job-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.time-estimate {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.time-estimate span {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-height: 58px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--teal-dark);
  font-size: 0.92rem;
  font-weight: 750;
}

.time-estimate svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.job-visual {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.job-visual img {
  width: 100%;
  min-height: 420px;
  object-fit: cover;
}

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

.job-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.job-card.exclusion {
  border-color: rgba(168, 58, 53, 0.32);
  background: linear-gradient(180deg, #fffdfa, var(--coral-soft));
}

.icon-list {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.icon-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
}

.icon-list svg {
  width: 19px;
  height: 19px;
  color: var(--teal);
  margin-top: 2px;
  flex: 0 0 auto;
}

.exclusion .icon-list svg {
  color: var(--red);
}

.process-band {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.process-band .eyebrow,
.process-band h2 {
  color: #fff;
}

.process-steps {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

.process-steps li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.app-shell {
  width: calc(100% - 40px);
  max-width: 1420px;
  margin: 28px auto;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}

.visual-wrap {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.visual-wrap img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.role-snapshot,
.score-note,
.workspace {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--shadow);
}

.role-snapshot,
.score-note {
  padding: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1,
h2 {
  margin-bottom: 12px;
  line-height: 1.08;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.85rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.lead {
  color: var(--muted);
  max-width: 820px;
  margin-bottom: 22px;
}

.snapshot-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.snapshot-list li {
  display: flex;
  gap: 10px;
  color: var(--muted);
  align-items: flex-start;
}

.snapshot-list svg {
  color: var(--teal);
  margin-top: 2px;
}

.step-nav {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.step-nav ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-nav li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.step-nav li:last-child {
  border-bottom: 0;
}

.step-nav .step-index {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.step-nav li.is-current {
  color: var(--ink);
  background: var(--mint);
}

.step-nav li.is-current .step-index {
  background: var(--teal);
  color: #fff;
}

.step-nav li.is-done .step-index {
  background: var(--green);
  color: #fff;
}

.score-note p {
  color: var(--muted);
  margin-bottom: 0;
}

.workspace {
  min-height: 760px;
  padding: 24px;
}

.progress-wrap {
  height: 8px;
  border-radius: 999px;
  background: #e8e7df;
  overflow: hidden;
  margin-bottom: 26px;
}

#progressBar {
  display: block;
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  transition: width 180ms ease;
}

.step-panel {
  display: none;
}

.step-panel.is-active {
  display: block;
  animation: fadeIn 160ms ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field span,
.choice-group legend {
  color: var(--ink);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd3cd;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  min-height: 46px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(11, 119, 112, 0.18);
  border-color: var(--teal);
}

input[type="range"] {
  padding: 0;
  accent-color: var(--teal);
}

.choice-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
  background: var(--surface-strong);
}

.choice-group.compact {
  display: grid;
  gap: 10px;
}

.choice-group.question {
  display: grid;
  gap: 10px;
}

.choice-group legend {
  padding: 0 6px;
}

.choice-group label,
.confirmation-box label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
}

.choice-group input[type="checkbox"],
.choice-group input[type="radio"],
.confirmation-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--teal);
}

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

.check-grid.seven {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.typing-test {
  display: grid;
  gap: 14px;
}

.typing-source {
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: var(--mint);
  padding: 16px;
  font-weight: 720;
}

.typing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.confirmation-box {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 18px;
}

.form-actions,
.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
}

.btn.primary {
  color: #fff;
  background: var(--teal);
}

.btn.primary:hover {
  background: var(--teal-dark);
}

.btn.compact {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 0.88rem;
}

.btn.secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.btn.secondary:hover {
  border-color: var(--teal);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.result-view {
  animation: fadeIn 160ms ease;
}

.result-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.score-badge {
  display: grid;
  place-items: center;
  min-width: 132px;
  min-height: 132px;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  text-align: center;
}

.score-badge strong {
  font-size: 2rem;
  line-height: 1;
}

.score-badge span {
  font-size: 0.78rem;
  font-weight: 800;
}

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

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.status-chip.good {
  color: #fff;
  background: var(--green);
}

.status-chip.warn {
  color: #fff;
  background: var(--gold);
}

.status-chip.bad {
  color: #fff;
  background: var(--red);
}

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

.result-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-strong);
}

.result-block.full {
  grid-column: 1 / -1;
}

.result-block ul {
  margin: 0;
  padding-left: 20px;
}

.result-block li + li {
  margin-top: 7px;
}

.score-lines {
  display: grid;
  gap: 12px;
}

.score-line {
  display: grid;
  gap: 6px;
}

.score-line-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.score-meter {
  height: 8px;
  border-radius: 999px;
  background: #ecebe5;
  overflow: hidden;
}

.score-meter span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.answer-preview {
  white-space: pre-wrap;
  padding: 12px;
  border-radius: var(--radius);
  background: #f3f1eb;
  color: var(--ink);
  max-height: 220px;
  overflow: auto;
}

.page-footer {
  width: calc(100% - 40px);
  max-width: 1420px;
  margin: 12px auto 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.is-invalid-group {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(168, 58, 53, 0.12);
}

@media (max-width: 1040px) {
  .job-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .job-copy h1 {
    max-width: 14ch;
  }

  .job-visual img {
    min-height: 280px;
    aspect-ratio: 16 / 7;
  }

  .process-band {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .workspace {
    order: 1;
  }

  .side-panel {
    order: 2;
    position: static;
  }

  .visual-wrap img {
    aspect-ratio: 16 / 7;
  }

  .step-nav ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-nav li {
    border-right: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .topbar,
  .page-footer {
    flex-direction: column;
  }

  .app-shell,
  .job-page,
  .page-footer {
    width: calc(100% - 24px);
  }

  .job-hero,
  .job-card,
  .process-band {
    padding: 18px;
  }

  .job-copy h1 {
    font-size: 2.1rem;
    max-width: none;
  }

  .job-actions {
    align-items: stretch;
  }

  .time-estimate {
    grid-template-columns: 1fr;
  }

  .time-estimate span {
    min-height: auto;
  }

  .job-grid,
  .process-steps {
    display: grid;
    grid-template-columns: 1fr;
    columns: auto;
  }

  .job-visual img {
    min-height: 220px;
  }

  .workspace {
    padding: 18px;
    min-height: auto;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.48rem;
  }

  .field-grid.two,
  .result-grid,
  .result-header {
    grid-template-columns: 1fr;
  }

  .check-grid,
  .check-grid.seven,
  .step-nav ol {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .result-actions {
    justify-content: stretch;
  }

  .btn {
    width: 100%;
  }

  .score-badge {
    width: 118px;
    min-width: 118px;
    min-height: 118px;
  }
}
