:root {
  --ink: #17202a;
  --muted: #667085;
  --paper: #f6f3ec;
  --surface: #fffdfa;
  --line: #ded6c9;
  --teal: #176c6a;
  --blue: #285f94;
  --amber: #9c6413;
  --red: #a04444;
  --green-soft: #e5f4ef;
  --blue-soft: #e8f0f8;
  --shadow: 0 18px 45px rgba(37, 46, 58, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(23, 108, 106, 0.08), transparent 24rem),
    linear-gradient(180deg, #fbfaf6 0%, var(--paper) 100%);
  color: var(--ink);
  font-family: "Fira Sans", sans-serif;
}

button,
select,
textarea {
  font: inherit;
}

select,
button {
  cursor: pointer;
}

select {
  width: min(100%, 280px);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  caret-color: transparent;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0.7rem;
  resize: vertical;
}

label {
  display: block;
  margin: 0.6rem 0 0.35rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  letter-spacing: 0;
}

.page-shell {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 3rem;
}

.hero {
  padding: 1.25rem 0 0.9rem;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1;
}

.hero h2 {
  margin: 0.55rem 0 0;
  color: var(--blue);
  font-size: clamp(1rem, 2vw, 1.45rem);
}

.hero p {
  max-width: 850px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.28rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  font-size: 0.8rem;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 1.1rem;
}

.workflow-strip article,
.workflow-panel,
.results-panel,
.saved-panel,
.concept-panel,
.case-study {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.86);
  box-shadow: var(--shadow);
}

.workflow-strip article {
  min-height: 96px;
  padding: 0.72rem;
}

.workflow-strip span {
  display: block;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-strip strong {
  display: block;
  margin-top: 0.25rem;
  line-height: 1.2;
}

.workflow-panel,
.results-panel,
.saved-panel,
.concept-panel,
.case-study {
  margin-top: 1rem;
  padding: 1rem;
}

.workflow-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.4rem;
  align-items: start;
}

.criteria-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.8rem;
}

.criteria-box summary {
  cursor: pointer;
  font-weight: 800;
}

.criteria-columns,
.result-columns,
.compare-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

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

.candidate-panel,
.snapshot-card,
.saved-card,
.concept-grid article,
.case-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.9rem;
}

.candidate-panel {
  margin-top: 0.8rem;
}

.primary-action,
.export-menu > button,
.export-options button {
  min-height: 42px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 800;
  white-space: nowrap;
}

.primary-action {
  width: 100%;
  margin-top: 0.8rem;
}

.human-note {
  border-left: 4px solid var(--teal);
  background: var(--green-soft);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-weight: 700;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.snapshot-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.snapshot-card strong {
  display: block;
  margin-top: 0.25rem;
  line-height: 1.18;
}

.score-card strong {
  color: var(--teal);
  font-size: 2rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--teal);
  font-size: 0.82rem;
}

td textarea {
  min-width: 160px;
  min-height: 42px;
}

.status-matched {
  color: #12614a;
  font-weight: 900;
}

.status-partial {
  color: var(--amber);
  font-weight: 900;
}

.status-missing {
  color: var(--red);
  font-weight: 900;
}

.question-list article {
  border-left: 4px solid var(--blue);
  padding: 0.25rem 0 0.25rem 0.75rem;
  margin: 0.75rem 0;
}

.action-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-row .primary-action {
  width: auto;
  margin-top: 0;
  padding: 0 1rem;
}

.export-menu {
  position: relative;
}

.export-menu > button {
  padding: 0 1.2rem;
}

.export-options {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 5;
  display: grid;
  gap: 0.35rem;
  width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.45rem;
  box-shadow: var(--shadow);
}

.export-options button {
  background: white;
  color: var(--ink);
}

.success-note {
  border-left: 4px solid #12614a;
  border-radius: 8px;
  background: var(--green-soft);
  padding: 0.85rem 1rem;
  font-weight: 800;
}

.saved-list {
  display: grid;
  gap: 0.55rem;
}

.concept-grid,
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.case-grid article:last-child {
  grid-column: 1 / -1;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .workflow-strip,
  .workflow-grid,
  .snapshot-grid,
  .criteria-columns,
  .result-columns,
  .concept-grid,
  .case-grid,
  .compare-controls {
    grid-template-columns: 1fr;
  }
}
