/* ToxIndex · SoT 2026 Early Access */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:      #0f172a;
  --ink-2:    #334155;
  --ink-3:    #64748b;
  --ink-4:    #94a3b8;
  --bg:       #f8fafc;
  --white:    #ffffff;
  --border:   #e2e8f0;
  --border-2: #f1f5f9;
  --blue:     #2563eb;
  --blue-lt:  #eff6ff;
  --green:    #059669;
  --sage:     #7c3aed;
  --r:        9px;
  --shadow-md: 0 4px 16px rgba(15,23,42,.09), 0 2px 6px rgba(15,23,42,.05);
}

html, body { height: 100%; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 14px;
}

.logo { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; flex-shrink: 0; }
.logo-tox   { color: var(--ink); }
.logo-index { color: var(--blue); }

.header-tag {
  font-size: 12px;
  color: var(--ink-4);
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

/* ── Body grid ───────────────────────────────────────────────────── */

.body-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 0;
}

/* ── Left panel ──────────────────────────────────────────────────── */

.panel-left {
  display: flex;
  flex-direction: column;
  padding: 28px 32px 32px;
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  gap: 28px;
}

/* Pitch */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}

h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
  color: var(--ink);
}
h1 em { font-style: italic; font-weight: 300; color: var(--ink-3); }

.pitch-sub {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 560px;
}

/* ── Pricing table ───────────────────────────────────────────────── */

.price-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.pt-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-2);
  background: var(--white);
}
.pt-row:last-child { border-bottom: none; }
.pt-addon { background: var(--bg); }

.pt-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.pt-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.45;
}

.pt-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: -.02em;
  text-align: right;
}

.pt-free { color: var(--green); }

/* ── Compound section ────────────────────────────────────────────── */

.compound-section {}

.compound-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.lucky-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--border-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all .1s;
  flex-shrink: 0;
}
.lucky-btn:hover { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); }
.lucky-btn:disabled { opacity: .5; cursor: not-allowed; }

.field-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }

.field-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color .12s;
  resize: none;
}
.field-input:focus { border-color: var(--blue); }
.field-input::placeholder { color: var(--ink-4); }

.compound-input { margin-bottom: 8px; }

.field-note { font-size: 11px; color: var(--ink-4); line-height: 1.45; margin-top: 6px; }
.field-note a { color: var(--ink-3); }

/* Structure row */
.structure-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.structure-img { border-radius: 4px; flex-shrink: 0; background: var(--white); object-fit: contain; }

.structure-meta { flex: 1; font-size: 11.5px; color: var(--ink-2); line-height: 1.5; min-width: 0; overflow: hidden; }
.structure-meta .sm-name { font-weight: 600; color: var(--ink); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.structure-meta .sm-formula { font-family: ui-monospace, monospace; font-size: 11px; color: var(--ink-3); }
.structure-meta .sm-cid { color: var(--ink-4); font-size: 10.5px; }

/* ── Platform strip ──────────────────────────────────────────────── */

.platform-strip { margin-top: auto; }

.platform-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-4);
  margin-bottom: 7px;
}

.platform-pills { display: flex; flex-wrap: wrap; gap: 5px; }

.svc-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: ui-monospace, monospace;
  font-weight: 500;
  background: var(--border-2);
  color: var(--ink-2);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all .1s;
}
.svc-pill:hover { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); }
.svc-sage { background: #f5f3ff; color: var(--sage); border-color: #e9d5ff; font-weight: 600; }
.svc-sage:hover { background: #ede9fe; }

/* ── Right panel ─────────────────────────────────────────────────── */

.panel-right {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
}

.order-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 20px;
  gap: 16px;
}

.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); }

/* Add section */
.add-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Report type grid */
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.rpill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  transition: all .1s;
  gap: 6px;
}
.rpill:hover { border-color: var(--blue); }
.rpill.active { border-color: var(--blue); background: var(--blue-lt); }
.rpill-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.rpill-price { font-size: 12px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.rpill.active .rpill-price { color: var(--blue); }

/* DABT row */
.dabt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  transition: border-color .1s;
  font-size: 12.5px;
}
.dabt-row:hover { border-color: var(--ink-3); }
.dabt-row input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: var(--blue); flex-shrink: 0; }
.dabt-name { font-weight: 600; color: var(--ink); flex: 1; }
.dabt-price { font-size: 12px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }

/* Add button */
.add-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--border-2);
  color: var(--ink-3);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .1s;
}
.add-btn:not(:disabled):hover { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); }
.add-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Cart */
.cart-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-2);
}

.cart-empty { font-size: 11px; color: var(--ink-4); }

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-2);
}
.cart-item:first-child { border-top: none; }

.ci-main { flex: 1; min-width: 0; }
.ci-name { font-weight: 600; color: var(--ink); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-meta { font-size: 11px; color: var(--ink-4); margin-top: 1px; }
.ci-price { font-size: 13px; font-weight: 700; color: var(--ink); flex-shrink: 0; white-space: nowrap; }
.ci-remove { background: none; border: none; color: var(--ink-4); cursor: pointer; font-size: 16px; padding: 0; line-height: 1; flex-shrink: 0; transition: color .1s; }
.ci-remove:hover { color: #dc2626; }

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.ct-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-4); }
.ct-amount { font-size: 18px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }

/* Contact */
.contact-section { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.btn-commit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  transition: all .12s;
  gap: 2px;
  margin-top: 4px;
}
.btn-commit:hover { background: #1e293b; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-commit:active { transform: none; }
.btn-commit:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-commit > span:first-child { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.btn-sub { font-size: 11px; font-weight: 400; opacity: .6; }

.commit-note {
  font-size: 11px;
  color: var(--ink-4);
  text-align: center;
  line-height: 1.5;
}

/* ── Success ─────────────────────────────────────────────────────── */

.success-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 32px;
  gap: 10px;
}
.success-check { font-size: 40px; color: var(--green); margin-bottom: 4px; }
.success-card h2 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.success-card p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.success-email  { font-weight: 600; color: var(--blue) !important; }
.success-note   { font-size: 12px !important; color: var(--ink-4) !important; }

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .body-grid { grid-template-columns: 1fr; }
  .panel-left { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 600px) {
  header { padding: 0 16px; }
  .panel-left { padding: 16px 16px 24px; }
  .order-panel { padding: 16px; }
  h1 { font-size: 24px; }
  .contact-row, .report-grid, .pt-row { grid-template-columns: 1fr; }
  .pt-row { grid-template-columns: 1fr auto; }
  .pt-desc { display: none; }
}
