:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #65726d;
  --line: #d9e2dc;
  --panel: #ffffff;
  --soft: #eef5f1;
  --wash: #f7faf8;
  --deep: #0f4f43;
  --green: #1a8f68;
  --gold: #c48a2c;
  --blue: #295f8f;
  --danger: #9b2c2c;
  --shadow: 0 18px 50px rgba(20, 47, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(26, 143, 104, 0.12), transparent 28%),
    linear-gradient(140deg, #f8fbf8 0%, #edf6f1 48%, #f8f4ec 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 16px clamp(18px, 5vw, 58px);
  border-bottom: 1px solid rgba(15, 79, 67, 0.12);
  background: rgba(248, 251, 248, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 132px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(15, 79, 67, 0.16);
  background: linear-gradient(135deg, #f8fffb, #e8f3ef);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.prism-logo span {
  position: absolute;
  display: block;
}

.prism-shape {
  left: 34px;
  top: 10px;
  width: 25px;
  height: 35px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(41, 95, 143, 0.2)),
    linear-gradient(45deg, rgba(196, 138, 44, 0.34), rgba(26, 143, 104, 0.34));
  border: 1px solid rgba(15, 79, 67, 0.36);
}

.beam {
  height: 4px;
  border-radius: 999px;
  transform-origin: left center;
}

.beam-input {
  left: 7px;
  top: 27px;
  width: 30px;
  background: var(--blue);
}

.beam-high {
  left: 57px;
  top: 19px;
  width: 30px;
  background: var(--danger);
  transform: rotate(-18deg);
}

.beam-low {
  left: 57px;
  top: 35px;
  width: 30px;
  background: var(--green);
  transform: rotate(18deg);
}

.risk-dot {
  left: 84px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.risk-dot-high {
  top: 13px;
  background: var(--danger);
}

.risk-dot-low {
  bottom: 13px;
  background: var(--green);
}

.risk-label {
  right: 7px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.risk-label-high {
  top: 6px;
  color: var(--danger);
}

.risk-label-low {
  bottom: 6px;
  color: var(--green);
}

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

.brand small {
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

nav a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

nav a:hover {
  color: var(--deep);
}

.page-section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 74px 0;
}

.hero {
  display: grid;
  min-height: calc(100vh - 72px);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding-top: 42px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(58px, 9vw, 118px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 21px;
}

.lead {
  max-width: 720px;
  color: #31433b;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.45;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-action,
.secondary-action,
button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-action,
.primary-button {
  background: var(--deep);
  color: #fff;
}

.secondary-action,
button:not(.primary-button) {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--deep);
}

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

.compact {
  min-height: 38px;
}

.quick-facts {
  display: grid;
  max-width: 650px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.quick-facts div,
.input-panel,
.results-panel,
.lab-card,
.notice,
.method-notes {
  border: 1px solid rgba(15, 79, 67, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.quick-facts div {
  padding: 15px;
}

.quick-facts span {
  display: block;
  color: var(--deep);
  font-size: 25px;
  font-weight: 800;
}

.quick-facts small {
  color: var(--muted);
}

.hero-visual {
  margin: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  border: 1px solid rgba(15, 79, 67, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-visual figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 24px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.notice,
.method-notes {
  margin-bottom: 20px;
  padding: 18px 20px;
  color: #334740;
  line-height: 1.55;
}

.notice strong {
  color: var(--deep);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

.input-panel,
.results-panel,
.lab-card {
  padding: 20px;
}

.panel-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-heading h3 {
  margin: 0;
}

.field-help {
  color: var(--muted);
  line-height: 1.5;
}

textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfb;
  color: var(--ink);
  font: 13px/1.5 "SFMono-Regular", Consolas, monospace;
}

textarea:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(26, 143, 104, 0.26);
  outline-offset: 2px;
}

.gene-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.gene-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--wash);
  color: var(--deep);
  font-size: 13px;
  font-weight: 700;
}

.status {
  margin-bottom: 14px;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.summary-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--wash);
}

.summary-grid strong {
  display: block;
  color: var(--deep);
  font-size: 23px;
}

.summary-grid span {
  color: var(--muted);
  font-size: 13px;
}

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

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

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

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

.risk-high {
  color: var(--danger);
  font-weight: 800;
}

.risk-low {
  color: var(--green);
  font-weight: 800;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.about-grid p,
.lab-card p {
  color: #334740;
  font-size: 18px;
  line-height: 1.58;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px clamp(18px, 5vw, 58px);
  border-top: 1px solid rgba(15, 79, 67, 0.12);
  color: var(--muted);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .tool-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .quick-facts,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .page-section {
    width: min(100% - 28px, 1180px);
    padding: 52px 0;
  }

  textarea {
    min-height: 300px;
  }

}
