:root {
  --l2l-navy: #0b2545;
  --l2l-navy-2: #12365f;
  --l2l-gold: #c8a24b;
  --l2l-cream: #faf8f4;
  --l2l-paper: #ffffff;
  --l2l-ink: #18202a;
  --l2l-muted: #665f54;
  --l2l-border: #e4dfd5;
  --l2l-green: #18794e;
  --l2l-amber: #9a6700;
  --l2l-red: #b42318;
  --l2l-shadow: 0 18px 50px rgba(11, 37, 69, 0.1);
  --l2l-radius: 20px;
}

* { box-sizing: border-box; }
body.transaction-page { background: var(--l2l-cream); color: var(--l2l-ink); }
.transaction-page a { color: var(--l2l-navy); }
.transaction-page button, .transaction-page input, .transaction-page select, .transaction-page textarea { font: inherit; }

.tx-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.tx-nav { background: rgba(250, 248, 244, 0.96); border-bottom: 1px solid var(--l2l-border); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.tx-nav-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tx-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; color: var(--l2l-navy); letter-spacing: -0.02em; }
.tx-brand-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--l2l-gold); box-shadow: 0 0 0 5px rgba(200, 162, 75, 0.15); }
.tx-nav-actions { display: flex; align-items: center; gap: 16px; }
.tx-nav-link { font-size: 0.9rem; font-weight: 650; text-decoration: none; }

.tx-hero { padding: 64px 0 34px; }
.tx-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 44px; align-items: end; }
.tx-eyebrow { color: var(--l2l-amber); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.tx-hero h1 { color: var(--l2l-navy); font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.35rem, 5vw, 4.6rem); line-height: 0.98; letter-spacing: -0.045em; margin: 12px 0 20px; max-width: 820px; }
.tx-lede { font-size: clamp(1rem, 1.8vw, 1.2rem); line-height: 1.7; color: var(--l2l-muted); max-width: 720px; }
.tx-assurance { background: var(--l2l-navy); color: #fff; border-radius: var(--l2l-radius); padding: 24px; box-shadow: var(--l2l-shadow); }
.tx-assurance strong { color: #f6d989; display: block; margin-bottom: 8px; }
.tx-assurance p { margin: 0; color: rgba(255,255,255,.8); line-height: 1.55; font-size: .92rem; }

.tx-progress { display: grid; grid-template-columns: repeat(4, 1fr); margin: 20px 0 42px; border: 1px solid var(--l2l-border); border-radius: 16px; background: var(--l2l-paper); overflow: hidden; }
.tx-progress-step { padding: 16px; display: flex; align-items: center; gap: 10px; border-right: 1px solid var(--l2l-border); color: var(--l2l-muted); font-size: .86rem; }
.tx-progress-step:last-child { border-right: 0; }
.tx-progress-step span { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #f0ece4; color: var(--l2l-navy); font-weight: 800; }
.tx-progress-step.active { color: var(--l2l-navy); font-weight: 750; }
.tx-progress-step.active span { background: var(--l2l-gold); }

.tx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; padding-bottom: 80px; }
.tx-card { background: var(--l2l-paper); border: 1px solid var(--l2l-border); border-radius: var(--l2l-radius); box-shadow: 0 8px 30px rgba(11,37,69,.055); }
.tx-card-body { padding: clamp(22px, 4vw, 38px); }
.tx-card h2, .tx-card h3 { color: var(--l2l-navy); margin-top: 0; }
.tx-card h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
.tx-section { padding: 28px 0; border-top: 1px solid var(--l2l-border); }
.tx-section:first-child { padding-top: 0; border-top: 0; }
.tx-section-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }
.tx-section-head p { color: var(--l2l-muted); font-size: .9rem; margin: 5px 0 0; }

.tx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tx-grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.tx-field { display: grid; gap: 7px; }
.tx-field + .tx-field { margin-top: 16px; }
.tx-grid-2 .tx-field + .tx-field, .tx-grid-3 .tx-field + .tx-field { margin-top: 0; }
.tx-field label, .tx-label { color: var(--l2l-navy); font-size: .86rem; font-weight: 750; }
.tx-hint { color: var(--l2l-muted); font-size: .76rem; line-height: 1.4; }
.tx-input, .tx-select, .tx-textarea { width: 100%; min-height: 48px; border: 1.5px solid var(--l2l-border); border-radius: 12px; padding: 12px 14px; background: #fff; color: var(--l2l-ink); transition: border-color .18s, box-shadow .18s; }
.tx-textarea { min-height: 110px; resize: vertical; }
.tx-input:focus, .tx-select:focus, .tx-textarea:focus { outline: none; border-color: var(--l2l-gold); box-shadow: 0 0 0 4px rgba(200,162,75,.14); }
.tx-input[aria-invalid="true"], .tx-select[aria-invalid="true"], .tx-textarea[aria-invalid="true"] { border-color: var(--l2l-red); }

.tx-item { border: 1px solid var(--l2l-border); border-radius: 16px; padding: 20px; background: #fdfcf9; }
.tx-item + .tx-item { margin-top: 14px; }
.tx-item-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tx-item-number { font-weight: 800; color: var(--l2l-navy); }
.tx-text-button { border: 0; background: none; color: var(--l2l-red); font-size: .82rem; font-weight: 700; cursor: pointer; padding: 6px; }

.tx-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tx-choice { position: relative; }
.tx-choice input { position: absolute; opacity: 0; pointer-events: none; }
.tx-choice label { display: block; min-height: 100%; border: 1.5px solid var(--l2l-border); border-radius: 14px; padding: 16px; cursor: pointer; }
.tx-choice label strong { display: block; color: var(--l2l-navy); margin-bottom: 5px; }
.tx-choice label span { color: var(--l2l-muted); font-size: .82rem; line-height: 1.45; }
.tx-choice input:checked + label { border-color: var(--l2l-gold); background: rgba(200,162,75,.08); box-shadow: inset 0 0 0 1px var(--l2l-gold); }
.tx-choice input:focus-visible + label { outline: 3px solid rgba(200,162,75,.35); outline-offset: 2px; }

.tx-check { display: flex; gap: 11px; align-items: flex-start; color: var(--l2l-muted); font-size: .86rem; line-height: 1.5; }
.tx-check input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--l2l-navy); }
.tx-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.tx-button { border: 0; min-height: 48px; border-radius: 999px; padding: 12px 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 800; cursor: pointer; transition: transform .15s, box-shadow .15s, opacity .15s; }
.tx-button:hover { transform: translateY(-1px); }
.tx-button:focus-visible { outline: 3px solid rgba(200,162,75,.45); outline-offset: 3px; }
.tx-button:disabled { opacity: .55; cursor: wait; transform: none; }
.tx-button-primary { background: var(--l2l-navy); color: #fff !important; box-shadow: 0 8px 20px rgba(11,37,69,.18); }
.tx-button-gold { background: var(--l2l-gold); color: var(--l2l-navy) !important; }
.tx-button-soft { background: #f0ece4; color: var(--l2l-navy) !important; }
.tx-button-small { min-height: 38px; padding: 8px 14px; font-size: .82rem; }

.tx-side { position: sticky; top: 96px; }
.tx-side-card { padding: 24px; }
.tx-side-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 16px; }
.tx-side-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--l2l-muted); font-size: .86rem; line-height: 1.5; }
.tx-side-list b { color: var(--l2l-navy); display: block; }
.tx-side-list span:first-child { width: 26px; height: 26px; border-radius: 50%; background: rgba(200,162,75,.16); display: grid; place-items: center; color: var(--l2l-amber); font-weight: 800; }

.tx-notice { border-radius: 14px; padding: 15px 16px; font-size: .88rem; line-height: 1.55; }
.tx-notice-info { background: #eef5fb; color: #234b70; border: 1px solid #d4e5f3; }
.tx-notice-success { background: #edf8f2; color: #16623e; border: 1px solid #ccebdc; }
.tx-notice-warning { background: #fff7e5; color: #7a5000; border: 1px solid #f2deb1; }
.tx-notice-error { background: #fff0ee; color: #982b20; border: 1px solid #f3ccc6; }
.tx-error { color: var(--l2l-red); font-size: .84rem; margin-top: 12px; }
[hidden] { display: none !important; }

.tx-summary { display: grid; gap: 12px; margin: 20px 0; }
.tx-summary-row { display: flex; justify-content: space-between; gap: 20px; color: var(--l2l-muted); font-size: .9rem; }
.tx-summary-row strong { color: var(--l2l-navy); text-align: right; }
.tx-summary-total { border-top: 1px solid var(--l2l-border); padding-top: 14px; font-size: 1.05rem; }
.tx-summary-total strong { font-size: 1.28rem; }
.tx-contract-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 22px; }
.tx-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px; font-size: .74rem; font-weight: 800; background: #f0ece4; color: var(--l2l-navy); }
.tx-pill-green { background: #e4f4eb; color: var(--l2l-green); }
.tx-pill-gold { background: #f8edcf; color: #765000; }

.tx-timeline { position: relative; display: grid; gap: 0; margin-top: 28px; }
.tx-event { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding-bottom: 28px; }
.tx-event:last-child { padding-bottom: 0; }
.tx-event::after { content: ""; position: absolute; left: 20px; top: 40px; bottom: 0; width: 2px; background: var(--l2l-border); }
.tx-event:last-child::after { display: none; }
.tx-event-marker { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #e8f3ee; color: var(--l2l-green); border: 4px solid var(--l2l-paper); box-shadow: 0 0 0 1px #cde3d7; font-weight: 900; z-index: 1; }
.tx-event-title { color: var(--l2l-navy); font-weight: 800; }
.tx-event-time { color: var(--l2l-muted); font-size: .76rem; margin-top: 3px; }
.tx-event-message { color: var(--l2l-muted); font-size: .9rem; line-height: 1.6; margin-top: 8px; }
.tx-event-next { margin-top: 10px; border-left: 3px solid var(--l2l-gold); padding-left: 12px; font-size: .82rem; color: var(--l2l-navy); }

.tx-order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.tx-order-number { color: var(--l2l-muted); font-size: .84rem; }
.tx-status { color: var(--l2l-navy); font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 5px 0 0; }

.tx-admin-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: calc(100vh - 73px); }
.tx-admin-list { border-right: 1px solid var(--l2l-border); background: #fff; padding: 20px; overflow: auto; }
.tx-admin-detail { padding: 28px; overflow: auto; }
.tx-order-row { width: 100%; text-align: left; border: 1px solid var(--l2l-border); background: #fff; border-radius: 14px; padding: 15px; cursor: pointer; margin-top: 10px; }
.tx-order-row:hover, .tx-order-row[aria-current="true"] { border-color: var(--l2l-gold); background: #fffdf7; }
.tx-order-row strong { display: flex; justify-content: space-between; gap: 10px; color: var(--l2l-navy); }
.tx-order-row span { display: block; color: var(--l2l-muted); margin-top: 5px; font-size: .8rem; }
.tx-admin-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tx-admin-panel { padding: 22px; }
.tx-data-list { display: grid; gap: 8px; margin: 0; }
.tx-data-list div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--l2l-border); }
.tx-data-list dt { color: var(--l2l-muted); font-size: .8rem; }
.tx-data-list dd { margin: 0; color: var(--l2l-navy); font-weight: 650; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .tx-hero-grid, .tx-layout { grid-template-columns: 1fr; }
  .tx-side { position: static; }
  .tx-admin-layout { grid-template-columns: 1fr; }
  .tx-admin-list { border-right: 0; border-bottom: 1px solid var(--l2l-border); max-height: 420px; }
  .tx-admin-panels { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  .tx-shell { width: min(100% - 22px, 1120px); }
  .tx-nav-inner { min-height: 62px; }
  .tx-nav-link.secondary { display: none; }
  .tx-hero { padding-top: 38px; }
  .tx-assurance { padding: 18px; }
  .tx-progress { grid-template-columns: repeat(4, minmax(64px, 1fr)); }
  .tx-progress-step { display: grid; justify-items: center; text-align: center; padding: 11px 6px; font-size: .67rem; }
  .tx-grid-2, .tx-grid-3, .tx-choice-grid { grid-template-columns: 1fr; }
  .tx-card-body { padding: 20px; }
  .tx-section-head { display: block; }
  .tx-button { width: 100%; }
  .tx-summary-row { align-items: start; }
  .tx-admin-detail { padding: 18px 12px 50px; }
  .tx-data-list div { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.tx-link-button { background: none; border: 0; padding: 12px 0; min-height: 44px; color: var(--l2l-navy); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; text-align: left; }
.tx-link-button:disabled { opacity: .55; cursor: wait; }
.tx-bank-choice { margin-top: 18px; }
.tx-bank-choice summary { cursor: pointer; font-weight: 750; color: var(--l2l-navy); padding: 12px 0; }

/* Customer forms (PR 4a): one card, the heading first, the boxes close together. */
.tx-form-shell { max-width: 720px; padding: 18px 0 64px; }
.tx-card-body > h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); margin: 0 0 6px; }
.tx-card-body > h1 + .tx-lede { margin: 0 0 8px; }
.tx-form-shell form > .tx-field, .tx-form-shell form > .tx-actions, .tx-form-shell form > button, #deliverBlock .tx-field, .tx-item .tx-grid-2 { margin-top: 14px; }
.tx-fieldset { margin: 14px 0 0; padding: 0; border: 0; }
.tx-note { margin-top: 14px; }
.tx-note summary { cursor: pointer; font-weight: 750; color: var(--l2l-navy); padding: 8px 0; }
.tx-choice-grid.tx-inline, .tx-item .tx-grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
/* The one other way in, under a form's main button: as clear as on home. */
.tx-alt { margin: 18px 0 0; font-size: 1rem; font-weight: 700; text-align: center; }
.tx-alt a { color: var(--l2l-navy); text-decoration: underline; text-underline-offset: 3px; }
.tx-track-line { color: var(--l2l-muted); line-height: 1.6; margin-top: 8px; }
