.bridge-body {
  background: #0a0c11;
}

[hidden] { display: none !important; }

.bridge-hero {
  padding: 72px 0 58px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 10%, rgba(202,255,63,.12), transparent 30%),
    linear-gradient(180deg, #0d1016 0%, #0a0c11 100%);
}

.bridge-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 64px;
  align-items: end;
}

.bridge-hero h1 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: clamp(52px, 6.5vw, 84px);
}

.bridge-hero .hero-copy {
  max-width: 790px;
  margin-bottom: 0;
}

.local-boundary {
  padding: 24px;
  border: 1px solid rgba(202,255,63,.32);
  border-radius: 14px;
  background: rgba(202,255,63,.055);
  box-shadow: 0 28px 70px rgba(0,0,0,.24);
}

.local-boundary strong {
  display: block;
  margin-bottom: 8px;
  color: var(--lime);
}

.local-boundary p {
  margin-bottom: 15px;
  color: #b8beb5;
  font-size: 14px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #e7eae3;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.bridge-workspace {
  min-height: 700px;
  padding: 52px 0 92px;
  background: var(--paper);
  color: var(--paper-text);
}

.bridge-tabs {
  position: sticky;
  top: 68px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 42px;
  padding: 6px;
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  background: rgba(242,241,235,.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(14,18,11,.08);
}

.bridge-tabs button {
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5b625b;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.bridge-tabs button:hover { background: #e5e3da; color: #171a1f; }
.bridge-tabs button:focus-visible { outline: 3px solid #728f14; outline-offset: 1px; }
.bridge-tabs button[aria-selected="true"] { background: #11151b; color: #fff; }
.bridge-tabs button span {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  margin-left: 5px;
  padding: 0 6px;
  place-items: center;
  border-radius: 99px;
  background: var(--lime);
  color: #111508;
  font-size: 11px;
}

.bridge-panel { animation: panel-in .2s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } }

.panel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .55fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 36px;
}

.panel-heading .eyebrow { color: #516b00; }
.panel-heading h2 { max-width: 780px; margin-bottom: 0; font-size: clamp(38px, 4.4vw, 58px); }
.panel-heading > p { margin-bottom: 5px; color: var(--paper-muted); }

.form-output-grid {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  gap: 22px;
  align-items: start;
}

.bridge-form,
.generated-shell,
.connection-card,
.decision-card {
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  background: #fbfaf6;
  box-shadow: 0 16px 44px rgba(20,25,15,.07);
}

.bridge-form { padding: 26px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; }
.bridge-form > label,
.bridge-form .field-grid > label,
.decision-card > label {
  display: block;
  margin-bottom: 17px;
  color: #3f453f;
  font-size: 12px;
  font-weight: 850;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.bridge-form input,
.bridge-form select,
.bridge-form textarea,
.decision-card input,
.decision-card textarea {
  border-color: rgba(10,12,17,.18);
  background: #fff;
  color: var(--paper-text);
}

.bridge-form input:focus,
.bridge-form select:focus,
.bridge-form textarea:focus,
.decision-card input:focus,
.decision-card textarea:focus {
  outline-color: #789d0f;
}

.bridge-form .consent,
.decision-card .consent {
  padding: 13px;
  border: 1px solid var(--paper-line);
  border-radius: 9px;
  background: #f1f0e9;
  color: #555c55;
  line-height: 1.4;
}

.bridge-form .consent input,
.decision-card .consent input,
.decision-option input {
  accent-color: #607d00;
}

.bridge-form .form-note { color: var(--paper-muted); }
.bridge-form .form-status { min-height: 20px; margin: 14px 0 0; color: var(--paper-muted); }
.bridge-form .form-status[data-state="error"] { color: #9c2727; }
.bridge-form .form-status[data-state="success"] { color: #496100; font-weight: 800; }
.bridge-form button:disabled { cursor: progress; opacity: .72; }

.generated-shell {
  position: sticky;
  top: 140px;
  min-height: 550px;
  overflow: hidden;
}

.empty-output {
  min-height: 550px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(140deg, rgba(202,255,63,.12), transparent 45%),
    #12161d;
  color: #eef0ea;
}

.empty-output span,
.generated-kicker {
  color: #718e1b;
  font: 900 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
}

.empty-output span { color: var(--lime); }
.empty-output strong { max-width: 390px; margin: 20px 0 10px; font-size: 33px; line-height: 1.03; letter-spacing: -.045em; }
.empty-output p { max-width: 430px; margin: 0; color: #aeb5ab; }

.generated-card header {
  padding: 28px 30px 24px;
  border-bottom: 1px solid var(--paper-line);
  background: #11151b;
  color: #f5f6f1;
}

.generated-card header h3 { margin: 13px 0 8px; font-size: 30px; line-height: 1.08; }
.generated-lede { margin: 0; color: #aeb4ac; font-size: 13px; }
.generated-status {
  margin: 20px 30px 0;
  padding: 9px 11px;
  border-radius: 7px;
  font: 900 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
}
.generated-status.qualified { background: #dff59f; color: #304100; }
.generated-status.needs-work { background: #eee5c8; color: #67520a; }
.generated-facts { padding: 16px 30px 4px; }
.generated-fact { display: grid; grid-template-columns: 125px 1fr; gap: 3px 16px; padding: 13px 0; border-bottom: 1px solid var(--paper-line); }
.generated-fact span { grid-row: 1 / span 2; color: var(--paper-muted); font-size: 11px; }
.generated-fact strong { font-size: 13px; overflow-wrap: anywhere; }
.generated-fact small { color: #737a73; font-size: 10px; }
.generated-section { padding: 18px 30px 0; }
.generated-section h4 { margin: 0 0 7px; font-size: 14px; }
.generated-section ul { margin: 0; padding: 0; list-style: none; }
.generated-section li { position: relative; padding: 7px 0 7px 21px; color: #505750; font-size: 12px; }
.generated-section li::before { content: "—"; position: absolute; left: 0; color: #607d00; font-weight: 900; }
.timeline-section li::before { content: "✓"; }
.match-note { margin: 20px 30px 30px; padding: 13px 15px; border-left: 3px solid #789d0f; background: #eff2e7; color: #4d554b; font-size: 12px; }

.connection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .58fr);
  gap: 22px;
  align-items: start;
}

.connection-card { overflow: hidden; }
.synthetic-banner {
  padding: 10px 24px;
  background: #11151b;
  color: var(--lime);
  font: 900 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}
.connection-head { display: flex; justify-content: space-between; gap: 24px; padding: 24px 26px 0; }
.connection-head p { margin: 8px 0 0; color: var(--paper-muted); font-size: 11px; }
.connection-head > strong { color: #4d6500; font-size: 13px; }
.connection-card > .signal-place,
.connection-card > h3,
.connection-card > h4,
.connection-card > .check-list { margin-left: 26px; margin-right: 26px; }
.connection-card > .signal-place { color: var(--paper-muted); }
.connection-card > h3 { margin-bottom: 22px; font-size: 29px; line-height: 1.1; }
.connection-card > h3 small { display: inline; color: var(--paper-muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.decision-facts { margin: 0 26px 22px; border-top: 1px solid var(--paper-line); }
.decision-facts div { display: grid; grid-template-columns: 132px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--paper-line); }
.decision-facts span { color: var(--paper-muted); font-size: 11px; }
.decision-facts strong { font-size: 12px; }
.truth-box { margin: 22px 26px; padding: 17px; border: 1px solid #d5c787; border-radius: 10px; background: #f6f0d6; }
.truth-box strong { font-size: 12px; }
.truth-box p { margin: 5px 0 0; color: #686049; font-size: 11px; }
.connection-card > h4 { margin-top: 25px; margin-bottom: 5px; }
.check-list.compact { margin-top: 0; margin-bottom: 26px; }
.check-list.compact li { border-color: var(--paper-line); color: #4d554d; font-size: 12px; }
.check-list.compact li::before { color: #607d00; }
.check-list.compact li.gap::before { content: "!"; color: #a55b00; }

.decision-card { position: sticky; top: 140px; padding: 26px; }
.decision-card h3 { margin-bottom: 22px; font-size: 25px; }
.decision-card fieldset { margin: 0 0 20px; padding: 0; border: 0; }
.decision-card legend { margin-bottom: 10px; color: var(--paper-muted); font-size: 11px; font-weight: 850; }
.decision-option { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--paper-line); border-radius: 9px; background: #fff; cursor: pointer; }
.decision-option:has(input:checked) { border-color: #789d0f; background: #f2f8df; box-shadow: inset 3px 0 #789d0f; }
.decision-option input { flex: 0 0 auto; width: 16px; height: 16px; margin: 3px 0 0; }
.decision-option span { display: block; }
.decision-option strong { display: block; font-size: 13px; }
.decision-option small { display: block; margin-top: 2px; color: var(--paper-muted); font-size: 10px; line-height: 1.35; }
.conditionally-required { color: #6b4a00 !important; }
.decision-card .form-status { min-height: 18px; color: var(--paper-muted); }
.decision-card .form-status[data-state="error"] { color: #9c2727; }
.decision-card .form-status[data-state="success"] { color: #496100; font-weight: 800; }

.record-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.records-empty { grid-column: 1 / -1; min-height: 260px; display: grid; place-content: center; padding: 30px; border: 1px dashed var(--paper-line); border-radius: 14px; color: var(--paper-muted); text-align: center; }
.records-empty strong { color: var(--paper-text); font-size: 23px; }
.records-empty p { max-width: 480px; margin: 8px 0 0; }
.record-card { min-width: 0; overflow: hidden; border: 1px solid var(--paper-line); border-radius: 13px; background: #fbfaf6; box-shadow: 0 10px 30px rgba(20,25,15,.05); }
.record-card header { display: flex; justify-content: space-between; gap: 15px; padding: 14px 17px; background: #161a20; color: #fff; }
.record-type { color: var(--lime); font: 900 10px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .11em; }
.record-card time { color: #abb1a8; font-size: 10px; }
.record-card dl { margin: 0; padding: 8px 17px 15px; }
.record-card dl div { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--paper-line); }
.record-card dt { text-transform: capitalize; }
.record-card dd { overflow-wrap: anywhere; font-size: 11px; font-weight: 700; }

@media (max-width: 950px) {
  .bridge-hero-grid,
  .panel-heading,
  .form-output-grid,
  .connection-layout { grid-template-columns: 1fr; gap: 32px; }
  .local-boundary { max-width: 620px; }
  .generated-shell,
  .decision-card { position: static; }
  .record-list { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .bridge-hero { padding: 48px 0 42px; }
  .bridge-hero-grid { gap: 30px; }
  .bridge-hero h1 { font-size: clamp(43px, 12.4vw, 56px); }
  .bridge-workspace { padding: 28px 0 68px; }
  .bridge-tabs {
    top: 60px;
    grid-template-columns: 1fr 1fr;
    margin: 0 -2px 32px;
  }
  .bridge-tabs button { min-height: 44px; padding: 8px; font-size: 11px; }
  .panel-heading { gap: 18px; margin-bottom: 26px; }
  .panel-heading h2 { font-size: clamp(34px, 9.8vw, 44px); }
  .panel-heading > p { font-size: 14px; }
  .bridge-form,
  .decision-card { padding: 19px; }
  .field-grid { grid-template-columns: 1fr; }
  .empty-output { min-height: 390px; padding: 30px 24px; }
  .empty-output strong { font-size: 29px; }
  .generated-card header { padding: 24px 21px 21px; }
  .generated-card header h3 { font-size: 26px; }
  .generated-status { margin: 17px 21px 0; }
  .generated-facts { padding: 12px 21px 2px; }
  .generated-fact { grid-template-columns: 1fr; gap: 4px; }
  .generated-fact span { grid-row: auto; }
  .generated-section { padding: 17px 21px 0; }
  .match-note { margin: 18px 21px 24px; }
  .connection-head { align-items: flex-start; flex-direction: column; padding: 21px 21px 0; }
  .connection-card > .signal-place,
  .connection-card > h3,
  .connection-card > h4,
  .connection-card > .check-list { margin-left: 21px; margin-right: 21px; }
  .decision-facts { margin-left: 21px; margin-right: 21px; }
  .decision-facts div { grid-template-columns: 1fr; gap: 3px; }
  .truth-box { margin-left: 21px; margin-right: 21px; }
  .record-card header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .record-card dl div { grid-template-columns: 95px minmax(0, 1fr); }
}
