:root {
  --bg: #07080b;
  --surface: #0d0f14;
  --text: #e9eef5;
  --muted: #7a8899;
  --border: #1a2230;
  --accent: #7dd3fc;
  --accent2: rgba(125, 211, 252, 0.1);
  --green: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at top, rgba(125,211,252,0.06), transparent 60%), var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* Header */
.hdr {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.brand {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.hdr h1 {
  font-size: 24px;
  font-weight: 600;
}

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.card.intro p:last-child { margin-bottom: 16px; }

/* Flow steps */
.flow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent2);
  border: 1px solid rgba(125,211,252,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.flow-step .num {
  background: var(--accent);
  color: var(--bg);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.arrow {
  color: var(--muted);
  font-size: 14px;
}

/* Lanes */
.lanes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lane {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.lane-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.lane-letter {
  background: var(--accent);
  color: var(--bg);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.lane strong {
  font-size: 15px;
}

.lane p {
  font-size: 13px;
  margin-bottom: 10px;
}

.tag {
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

/* Rules */
.rules ul {
  list-style: none;
  margin: 0 0 12px 0;
}

.rules li {
  font-size: 13px;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules li::before {
  content: "✓";
  color: var(--green);
  font-size: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent);
  background: var(--accent2);
}

.btn.primary {
  background: var(--accent2);
  border-color: rgba(125,211,252,0.3);
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.btn.accept { color: var(--green); }
.btn.reject { color: var(--bad); }

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Calculator */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.calc-input label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-row input {
  flex: 1;
  min-width: 0;
}

.input-row .unit {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

input, textarea, select {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Results */
.results {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.result-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.result-row:last-child { margin-bottom: 0; }

.result-row.highlight {
  background: var(--accent2);
  border-radius: 8px;
  padding: 12px;
  margin: -4px -4px 12px -4px;
}

.result-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.result-value {
  font-size: 18px;
  font-weight: 700;
}

.result-value.accent {
  color: var(--green);
}

.insight {
  font-size: 13px;
  color: var(--muted);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.insight strong { color: var(--green); }
.insight span { color: var(--text); font-weight: 600; }

/* Uses grid */
.uses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.use {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.use strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.use .muted {
  font-size: 11px;
}

/* Integration */
.integration {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.int-item {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.int-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.int-item p {
  font-size: 13px;
  margin: 0;
}

/* Form */
.field {
  margin-bottom: 14px;
}

.field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field.inline {
  display: inline-flex;
  flex-direction: column;
  margin-right: 12px;
}

.field.inline select {
  width: auto;
  min-width: 120px;
}

.hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.status {
  font-size: 13px;
  color: var(--green);
}

/* Lane tabs */
.lane-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.lane-tab {
  flex: 1;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lane-tab:hover { color: var(--text); }

.lane-tab.on {
  background: var(--accent2);
  border-color: rgba(125,211,252,0.3);
  color: var(--accent);
}

.lane-prompt {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}

.lane-prompt strong { color: var(--text); }

.hidden { display: none; }

/* Notice */
.notice {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.2);
}

.notice p {
  margin-bottom: 6px;
}

/* Submissions list */
.sub-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-item {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.sub-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.sub-date {
  font-size: 12px;
  color: var(--muted);
}

.sub-body {
  font-size: 13px;
  margin-bottom: 8px;
}

.sub-int {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.sub-actions {
  display: flex;
  gap: 8px;
}

.count {
  font-size: 12px;
  color: var(--muted);
  font-weight: normal;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

/* Question mark tooltips */
.q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255,255,255,0.02);
}

.q:hover {
  background: var(--accent2);
  border-color: var(--accent);
  color: var(--accent);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal.on { display: flex; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-box h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.modal-box p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.modal-box hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

.modal-box .btn {
  margin-top: 12px;
}

/* Navigation */
.nav-links {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover { color: var(--accent); }

/* Footer */
footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
}

/* CTA */
.cta {
  text-align: center;
}

.cta h2 { justify-content: center; }
.cta p { text-align: center; }
.cta .btn-row { justify-content: center; }

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

@media (max-width: 600px) {
  .result-row { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .flow { flex-direction: column; align-items: stretch; }
  .arrow { display: none; }
}


.equation { margin: 12px 0 18px; padding: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.02); border-radius: 12px; overflow-x: auto; }
.equation code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 14px; color: var(--text); white-space: nowrap; }
.select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.small { font-size: 12px; }
.hint { margin-top: 6px; font-size: 12px; }


/* Optional email acknowledgement */
.checkline{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:10px;
  color: var(--muted);
  font-size: 13px;
}
.checkline input{ margin-top:3px; }
