:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #5f6368;
  --paper: #faf7f0;
  --surface: #ffffff;
  --line: #d9d2c3;
  --moss: #426b57;
  --clay: #a6533a;
  --sky: #496c89;
  --shadow: 0 18px 48px rgba(32, 33, 36, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(66, 107, 87, 0.14), transparent 34%),
    linear-gradient(240deg, rgba(166, 83, 58, 0.12), transparent 38%),
    var(--paper);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 52px;
}

.intro {
  max-width: 850px;
  padding: 0 0 40px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.55;
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0 30px;
}

article,
.note,
.lab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

article {
  min-height: 210px;
  padding: 24px;
}

article:nth-child(2) {
  border-top-color: var(--clay);
}

article:nth-child(3) {
  border-top-color: var(--sky);
}

h2 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  letter-spacing: 0;
}

article p,
.note p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.note {
  max-width: 760px;
  padding: 28px;
}

.lab {
  margin-top: 30px;
  padding: 28px;
}

.lab-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 18px;
  align-items: start;
  margin-bottom: 22px;
}

.lab-header .eyebrow,
.lab-header h2 {
  grid-column: 1;
}

.lab-header h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-family: Georgia, "Times New Roman", serif;
}

#lab-status {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 120px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--moss);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  background: var(--surface);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select,
textarea,
button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  letter-spacing: 0;
}

input,
select,
textarea {
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

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

button {
  grid-column: 1 / -1;
  max-width: 220px;
  padding: 0 18px;
  border-color: var(--moss);
  color: #ffffff;
  font-weight: 800;
  background: var(--moss);
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.result-panel {
  margin-top: 24px;
  padding: 24px;
  border-color: rgba(73, 108, 137, 0.42);
  background: rgba(255, 255, 255, 0.94);
}

.result-panel[hidden] {
  display: none;
}

.result-meta {
  margin-bottom: 12px;
  color: var(--sky);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-panel h3 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 4vw, 2.45rem);
  line-height: 1.05;
}

.result-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.result-lists {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.result-lists h4 {
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.result-lists ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 44px;
  }

  .unit-grid {
    grid-template-columns: 1fr;
  }

  article {
    min-height: auto;
  }

  .lab {
    padding: 20px;
  }

  .lab-header,
  .lab-form,
  .result-lists {
    grid-template-columns: 1fr;
  }

  #lab-status {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }

  button {
    max-width: none;
  }
}
