.submission-page {
  background:
    radial-gradient(circle at 92% 16%, rgba(157, 48, 45, 0.07), transparent 22rem),
    var(--paper);
}

.submission-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: clamp(42px, 7vw, 94px);
  align-items: end;
  min-height: 650px;
  padding: clamp(82px, 10vw, 136px) clamp(20px, 5vw, 72px) clamp(58px, 8vw, 92px);
  color: #fff;
  background:
    linear-gradient(115deg, rgba(12, 15, 21, 0.98) 0%, rgba(22, 27, 36, 0.94) 56%, rgba(45, 25, 25, 0.90) 100%),
    url("../assets/images/hero-line.png") center / cover no-repeat;
}

.submission-hero .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

.submission-hero h1 {
  max-width: 920px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.4vw, 6.7rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.submission-hero-copy > p:not(.eyebrow) {
  max-width: 760px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1rem, 1.6vw, 1.24rem);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 38px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-proof span {
  display: inline-flex;
  gap: 9px;
  align-items: center;
}

.hero-proof b {
  color: #d98f89;
  font-family: var(--font-mono);
}

.hero-contract {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.contract-kicker {
  margin: 0;
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.48);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-contract article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
  padding: 23px 20px;
}

.hero-contract article + article {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contract-index,
.track-glyph {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  background: rgba(157, 48, 45, 0.9);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
}

.hero-contract h2 {
  margin: 0;
  font-size: 1rem;
}

.hero-contract article p {
  margin: 4px 0 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.5;
}

.hero-contract small {
  color: rgba(255, 255, 255, 0.44);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.submission-workspace,
.sentry-section,
.manifest-section,
.receipt {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 72px);
}

.workspace-intro,
.sentry-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.7fr);
  gap: 40px;
  align-items: end;
  width: min(1240px, 100%);
  margin-bottom: 36px;
}

.workspace-intro h2,
.sentry-heading h2,
.manifest-copy h2,
.receipt h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.workspace-intro > p,
.sentry-heading > p {
  margin: 0;
  color: var(--muted);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.42fr);
  gap: 24px;
  align-items: start;
  width: min(1240px, 100%);
}

.submission-form,
.admission-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 40px rgba(30, 33, 40, 0.06);
}

.form-section {
  padding: clamp(22px, 4vw, 34px);
}

.form-section + .form-section {
  border-top: 1px solid var(--line);
}

.form-section-heading {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 24px;
}

.form-section-heading > span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.form-section-heading h3 {
  margin: -5px 0 2px;
  font-size: 1.16rem;
}

.form-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.track-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.track-option {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 13px;
  align-items: center;
  min-height: 88px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.track-option:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 95, 157, 0.46);
}

.track-option.is-selected {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue), 0 7px 20px rgba(45, 95, 157, 0.08);
}

.track-option input {
  position: absolute;
  opacity: 0;
}

.track-option .track-glyph {
  color: var(--blue);
  border-color: rgba(45, 95, 157, 0.2);
  background: rgba(45, 95, 157, 0.08);
}

.track-option b,
.track-option small {
  display: block;
}

.track-option b {
  font-size: 0.9rem;
}

.track-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.track-option i {
  color: var(--muted);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.track-option.is-selected i {
  color: var(--blue);
}

.field-grid {
  display: grid;
  gap: 18px 16px;
}

.field-grid.two {
  grid-template-columns: 1fr 1fr;
}

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

.field > span:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.field em {
  color: var(--accent);
  font-size: 0.59rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #d8d2c8;
  border-radius: 6px;
  outline: none;
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 95, 157, 0.1);
}

.field input.is-invalid,
.field select.is-invalid {
  border-color: var(--accent);
}

.field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-right: 48px;
}

.input-suffix > span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  transform: translateY(-50%);
}

.capability-set {
  display: grid;
  gap: 9px;
}

.capability-set[hidden] {
  display: none;
}

.capability-check,
.attestation {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #e1dbd1;
  border-radius: 7px;
  background: #fffdf9;
  cursor: pointer;
}

.capability-check input,
.attestation input {
  position: absolute;
  opacity: 0;
}

.capability-check > span,
.attestation > span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border: 1px solid #b7afa3;
  border-radius: 4px;
  background: #fff;
}

.capability-check > span::after,
.attestation > span::after {
  color: #fff;
  content: "✓";
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0;
}

.capability-check:has(input:checked),
.attestation:has(input:checked) {
  border-color: rgba(47, 116, 89, 0.42);
  background: rgba(47, 116, 89, 0.045);
}

.capability-check input:checked + span,
.attestation input:checked + span {
  border-color: var(--green);
  background: var(--green);
}

.capability-check input:checked + span::after,
.attestation input:checked + span::after {
  opacity: 1;
}

.capability-check b,
.attestation b {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.55;
}

.attestation {
  margin-top: 18px;
  border-style: dashed;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 24px 34px;
  border-top: 1px solid var(--line);
  background: #f4f0e9;
}

.preflight-button {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.submit-button:disabled {
  color: #8a8f95;
  border-color: #d6d3ce;
  background: #e7e4de;
  cursor: not-allowed;
  transform: none;
}

.form-actions p {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.form-actions p.error {
  color: var(--accent);
}

.admission-panel {
  position: sticky;
  top: 88px;
  overflow: hidden;
}

.admission-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 24px 22px 18px;
}

.panel-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admission-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.risk-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #d8d2c8;
  border-radius: 999px;
  color: var(--muted);
  background: #f4f0e9;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
}

.risk-pill.allow { color: var(--green); border-color: rgba(47, 116, 89, 0.3); background: rgba(47, 116, 89, 0.08); }
.risk-pill.challenge { color: var(--gold); border-color: rgba(154, 116, 48, 0.3); background: rgba(154, 116, 48, 0.08); }
.risk-pill.block { color: var(--accent); border-color: rgba(157, 48, 45, 0.3); background: rgba(157, 48, 45, 0.08); }

.gate-progress {
  height: 3px;
  background: #e7e2d9;
}

.gate-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 260ms ease;
}

.gate-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gate-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 11px;
  align-items: start;
  padding: 14px 20px;
  border-top: 1px solid #ebe6de;
}

.gate-mark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--muted);
  border: 1px solid #d8d2c8;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
}

.gate-list b,
.gate-list small {
  display: block;
}

.gate-list b {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.gate-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.gate-list strong {
  margin-top: 3px;
  color: #93979d;
  font-size: 0.59rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gate-list li.pass .gate-mark {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.gate-list li.pass .gate-mark {
  font-size: 0;
}

.gate-list li.pass .gate-mark::after {
  content: "✓";
  font-size: 0.72rem;
}

.gate-list li.pass strong { color: var(--green); }
.gate-list li.fail .gate-mark { color: #fff; border-color: var(--accent); background: var(--accent); }
.gate-list li.fail strong { color: var(--accent); }

.server-boundary {
  margin: 18px;
  padding: 15px;
  border: 1px dashed #c8bda9;
  border-radius: 7px;
  background: #f5f0e7;
}

.server-boundary span {
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.server-boundary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.5;
}

.sentry-section {
  color: #fff;
  background: #171b22;
}

.sentry-section .eyebrow,
.sentry-heading h2 {
  color: #fff;
}

.sentry-heading > p {
  color: rgba(255, 255, 255, 0.6);
}

.sentry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(1240px, 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.sentry-grid article {
  min-height: 230px;
  padding: 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sentry-grid article > span {
  color: #d98f89;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sentry-grid h3 {
  margin: 38px 0 10px;
  font-size: 1.06rem;
}

.sentry-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.8rem;
  line-height: 1.6;
}

.sentry-grid code {
  display: inline-block;
  margin-top: 17px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.67rem;
}

.decision-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1240px, 100%);
  margin-top: 24px;
  overflow: hidden;
  border-radius: 8px;
}

.decision-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px 12px;
  padding: 16px 18px;
  color: #fff;
}

.decision-strip b {
  grid-row: 1 / 3;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.decision-strip span {
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.decision-strip small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.65rem;
}

.decision-strip .allow { background: #2f7459; }
.decision-strip .challenge { background: #84672c; }
.decision-strip .quarantine { background: #8a4927; }
.decision-strip .reject { background: #8e2a28; }

.manifest-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(440px, 1fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
}

.manifest-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--muted);
}

.manifest-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.manifest-section .button:not(.primary) {
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}

.manifest-preview {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #313946;
  border-radius: 9px;
  background: #181d25;
  box-shadow: var(--shadow);
}

.manifest-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 15px;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #202630;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.manifest-bar button {
  padding: 5px 8px;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 4px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.manifest-preview pre {
  min-height: 360px;
  max-height: 480px;
  margin: 0;
  padding: 22px;
  overflow: auto;
  color: #c8d5e6;
  font-size: 0.74rem;
  line-height: 1.7;
}

.receipt {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 22px;
  margin: 0 clamp(20px, 5vw, 72px) clamp(60px, 8vw, 100px);
  padding: 30px;
  border: 1px solid rgba(47, 116, 89, 0.34);
  border-radius: 9px;
  background: rgba(47, 116, 89, 0.07);
}

.receipt[hidden] {
  display: none;
}

.receipt-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  border-radius: 50%;
  background: var(--green);
  font-size: 1.5rem;
  font-weight: 900;
}

.receipt .eyebrow {
  margin-bottom: 6px;
  color: var(--green);
}

.receipt h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.receipt p:not(.eyebrow) {
  margin: 10px 0 2px;
  color: var(--ink-soft);
}

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

@media (max-width: 980px) {
  .submission-hero,
  .workspace-grid,
  .manifest-section {
    grid-template-columns: 1fr;
  }

  .submission-hero {
    min-height: auto;
  }

  .hero-contract {
    max-width: 650px;
  }

  .admission-panel {
    position: static;
  }

  .sentry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .workspace-intro,
  .sentry-heading,
  .field-grid.two,
  .track-picker,
  .sentry-grid,
  .decision-strip {
    grid-template-columns: 1fr;
  }

  .workspace-intro,
  .sentry-heading {
    gap: 18px;
  }

  .field-wide {
    grid-column: auto;
  }

  .form-actions {
    padding: 20px;
  }

  .form-actions .button {
    width: 100%;
  }

  .manifest-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .manifest-preview pre {
    min-height: 300px;
    font-size: 0.68rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  .track-option,
  .gate-progress span {
    transition: none;
  }
}
