:root {
  --lot-ink: #eef8ff;
  --lot-muted: #a9bfd0;
  --lot-cyan: #62f5d2;
  --lot-gold: #ffd166;
  --lot-red: #ff7383;
  --lot-blue: #69a9ff;
  --lot-panel: rgba(3, 13, 32, 0.91);
  --lot-line: rgba(98, 245, 210, 0.27);
}

.lot-shell {
  position: relative;
  overflow: hidden;
  color: var(--lot-ink);
  background: linear-gradient(145deg, rgba(1, 5, 20, 0.96), rgba(3, 17, 37, 0.94));
}

.lot-shell::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(98, 245, 210, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 245, 210, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 50%);
}

.lot-shell > * { position: relative; }

.lot-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px;
  margin-bottom: 20px;
  border: 1px solid var(--lot-line);
  background: radial-gradient(circle at 85% 20%, rgba(105, 169, 255, 0.16), transparent 38%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--lot-gold);
  font: 700 0.73rem/1.2 monospace;
  letter-spacing: 0.14em;
}

.lot-hero h1 {
  margin: 0;
  color: var(--lot-cyan);
  font-size: clamp(2rem, 7vw, 3.7rem);
  line-height: 0.98;
  text-shadow: 0 0 25px rgba(98, 245, 210, 0.28);
}

.hero-copy {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--lot-muted);
  font-size: 1.05rem;
}

.lot-mark {
  display: grid;
  width: 104px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--lot-cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(98, 245, 210, 0.05), 0 0 45px rgba(98, 245, 210, 0.16);
  transform: rotate(8deg);
}

.lot-mark span { color: var(--lot-gold); font-size: 4.4rem; line-height: 1; }

.lot-panel,
.how-panel {
  padding: 24px;
  margin: 18px 0;
  border: 1px solid var(--lot-line);
  background: var(--lot-panel);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(169, 191, 208, 0.18);
}

.section-heading > div { display: flex; gap: 12px; align-items: baseline; }
.section-heading h2 { margin: 0; color: var(--lot-ink); font-size: 1.35rem; }
.step-number { color: var(--lot-gold); font: 700 0.78rem monospace; }

.trust-tag {
  padding: 5px 8px;
  color: var(--lot-blue);
  border: 1px solid rgba(105, 169, 255, 0.38);
  border-radius: 999px;
  font: 700 0.67rem monospace;
  text-transform: uppercase;
  white-space: nowrap;
}

.trust-tag.secure { color: var(--lot-cyan); border-color: rgba(98, 245, 210, 0.42); }
.trust-tag.pending { color: var(--lot-gold); border-color: rgba(255, 209, 102, 0.42); }

.lot-shell label,
.field-heading label {
  display: block;
  margin: 18px 0 7px;
  color: var(--lot-ink);
  font-weight: 700;
}

.lot-shell input,
.lot-shell textarea,
.lot-shell select {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 13px;
  color: var(--lot-ink);
  border: 1px solid rgba(169, 191, 208, 0.32);
  border-radius: 3px;
  outline: none;
  background: rgba(0, 4, 14, 0.82);
  font: inherit;
}

.lot-shell textarea { resize: vertical; font-family: inherit; }
.lot-shell select { color-scheme: dark; }
.lot-shell input:focus,
.lot-shell textarea:focus,
.lot-shell select:focus { border-color: var(--lot-cyan); box-shadow: 0 0 0 3px rgba(98, 245, 210, 0.1); }

.field-heading { display: flex; align-items: baseline; justify-content: space-between; }
.field-heading small,
.field-note,
.action-note { color: var(--lot-muted); }
.field-note,
.action-note { margin: 8px 0 15px; font-size: 0.84rem; }
.optional { color: var(--lot-muted); font-size: 0.76rem; font-weight: 400; }

.choice-list { display: grid; gap: 8px; }
.choice-row { display: grid; grid-template-columns: 34px 1fr 38px; gap: 7px; align-items: center; }
.choice-number { color: var(--lot-gold); font: 700 0.76rem monospace; }

.remove-choice {
  height: 42px;
  color: var(--lot-muted);
  border: 1px solid rgba(169, 191, 208, 0.23);
  background: rgba(0, 4, 14, 0.82);
  font-size: 1.25rem;
  cursor: pointer;
}
.remove-choice:hover { color: var(--lot-red); border-color: var(--lot-red); }

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

.primary-button,
.secondary-button,
.text-button,
.file-button {
  display: inline-block;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 3px;
  font: 700 0.82rem monospace;
  cursor: pointer;
}

.primary-button {
  color: #00150f;
  border: 1px solid var(--lot-cyan);
  background: var(--lot-cyan);
  box-shadow: 0 0 18px rgba(98, 245, 210, 0.15);
}
.primary-button:hover { background: #a0ffe9; }
.primary-button:disabled,
.secondary-button:disabled { cursor: wait; opacity: 0.5; }

.secondary-button,
.file-button {
  color: var(--lot-cyan);
  border: 1px solid rgba(98, 245, 210, 0.42);
  background: rgba(98, 245, 210, 0.05);
}
.secondary-button:hover,
.file-button:hover { background: rgba(98, 245, 210, 0.13); }
.text-button { color: var(--lot-muted); border: 0; background: transparent; }
.text-button:hover { color: var(--lot-ink); }
#add-choice { margin: 9px 0 0 41px; }
#lock-proposal { width: 100%; padding: 14px; margin-top: 18px; }

.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.file-button { margin: 0; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.locked-question { margin: 0 0 14px; color: var(--lot-gold); font-size: 1.2rem; }
.locked-choices { display: grid; gap: 7px; padding-left: 30px; }
.locked-choices li { padding: 7px 10px; border-left: 2px solid var(--lot-blue); background: rgba(105, 169, 255, 0.06); }
.locked-choices li::marker { color: var(--lot-blue); font-family: monospace; }

.receipt-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 10px 12px; margin: 16px 0; background: rgba(255, 209, 102, 0.06); }
.receipt-row span { color: var(--lot-muted); }
.receipt-row strong { overflow-wrap: anywhere; color: var(--lot-gold); }

.fingerprint-block { padding: 13px; margin: 18px 0; border: 1px dashed rgba(98, 245, 210, 0.42); background: rgba(0, 0, 0, 0.31); }
.fingerprint-block span { display: block; margin-bottom: 7px; color: var(--lot-muted); font: 0.72rem monospace; text-transform: uppercase; }
.fingerprint-block code { display: block; color: var(--lot-cyan); font-size: 0.83rem; overflow-wrap: anywhere; }

.beacon-clock { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.beacon-clock > div { padding: 15px; border: 1px solid rgba(169, 191, 208, 0.18); background: rgba(0, 4, 14, 0.58); }
.beacon-clock small { display: block; margin-bottom: 5px; color: var(--lot-muted); font: 0.67rem monospace; }
.beacon-clock strong { color: var(--lot-blue); font: 700 1.15rem monospace; }
.beacon-clock .countdown-wrap strong { color: var(--lot-gold); }

.status-line { min-height: 1.3em; color: var(--lot-muted); font-size: 0.85rem; }
.status-line.loading { color: var(--lot-gold); }
.success-text { color: var(--lot-cyan); }
.error-text { color: var(--lot-red); }

.manual-fallback,
.transcript-details { margin-top: 18px; border-top: 1px solid rgba(169, 191, 208, 0.16); }
.manual-fallback summary,
.transcript-details summary,
.how-panel summary { padding: 14px 0 5px; color: var(--lot-blue); cursor: pointer; }

.result-panel { position: relative; overflow: hidden; text-align: center; }
.result-panel .section-heading { text-align: left; }
.result-choice {
  position: relative;
  margin: 38px auto 12px;
  color: var(--lot-gold);
  font-size: clamp(2rem, 8vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
  transform: scale(0.82);
  opacity: 0;
}
.result-panel.revealed .result-choice { animation: reveal-choice 650ms cubic-bezier(.2,.9,.25,1.25) forwards; }
@keyframes reveal-choice { to { opacity: 1; transform: scale(1); } }
.result-proof { position: relative; color: var(--lot-muted); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 20px; text-align: left; }
.check-item { display: grid; min-width: 0; grid-template-columns: 25px minmax(0, 1fr); gap: 8px; padding: 10px; background: rgba(0, 4, 14, 0.54); }
.check-item > span { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; font-weight: 900; }
.check-item > div { min-width: 0; }
.check-item.pass > span { color: #00150f; background: var(--lot-cyan); }
.check-item.fail > span { color: #240006; background: var(--lot-red); }
.check-item strong,
.check-item small { display: block; overflow-wrap: anywhere; }
.check-item strong { color: var(--lot-ink); font-size: 0.78rem; }
.check-item small { color: var(--lot-muted); font: 0.65rem monospace; }

.transcript-details pre { max-height: 460px; overflow: auto; padding: 14px; color: var(--lot-cyan); background: #000711; text-align: left; font-size: 0.7rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.verifier-panel > p { color: var(--lot-muted); }
.verify-summary { padding: 12px; margin-top: 16px; border: 1px solid; font: 700 0.82rem monospace; }
.verify-summary.valid { color: var(--lot-cyan); border-color: var(--lot-cyan); background: rgba(98, 245, 210, 0.07); }
.verify-summary.invalid { color: var(--lot-red); border-color: var(--lot-red); background: rgba(255, 115, 131, 0.07); }

.how-panel { color: var(--lot-muted); }
.how-panel summary { padding: 0; color: var(--lot-gold); font-weight: 700; }
.how-copy { padding-top: 5px; }
.lot-verse { margin: 28px 8px 5px; padding: 16px 20px; color: var(--lot-muted); border-left: 2px solid var(--lot-gold); font-style: italic; }
.lot-verse cite { display: block; margin-top: 7px; color: var(--lot-gold); font-size: 0.78rem; }

.notice { padding: 12px; border: 1px solid; }
.notice.error { color: var(--lot-red); border-color: var(--lot-red); background: rgba(255, 115, 131, 0.08); }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .result-panel.revealed .result-choice { animation: none; opacity: 1; transform: none; }
  * { scroll-behavior: auto !important; }
}

@media (max-width: 680px) {
  .lot-hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .lot-mark { display: none; }
  .lot-panel,
  .how-panel { padding: 18px 14px; }
  .timing-grid,
  .beacon-clock,
  .check-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; }
  .section-heading > div { display: block; }
  .step-number { display: block; margin-bottom: 4px; }
  .field-heading { display: block; }
  .field-heading small { display: block; margin: -4px 0 8px; }
  .button-row > button,
  .button-row > .file-button { width: 100%; text-align: center; }
  .receipt-row { grid-template-columns: 1fr; gap: 3px; }
}
