:root {
  --navy: #17365d;
  --blue: #1f4e78;
  --light-blue: #d9eaf7;
  --light-green: #e2f0d9;
  --light-gold: #fff2cc;
  --light-orange: #fce4d6;
  --line: #c9c9c9;
  --text: #1f1f1f;
  --muted: #666;
  --positive: #e2f0d9;
  --negative: #f4cccc;
  --neutral: #fff2cc;
}
* { box-sizing: border-box; }
body { margin:0; font-family: Arial, Helvetica, sans-serif; color:var(--text); background:#f4f6f8; }
.site-header { background:var(--navy); color:white; padding:1.2rem 1rem; text-align:center; }
.site-header h1 { margin:0; font-size:clamp(1.55rem,4vw,2.4rem); }
.brand-home-link{color:inherit;text-decoration:none}.brand-home-link:hover,.brand-home-link:focus-visible{text-decoration:underline;text-underline-offset:.16em}
.seller-financing-education{grid-column:1/-1;min-width:0;border:1px solid #b8cbe0;border-radius:10px;background:#f3f8fd;padding:1rem;margin:.35rem 0}.seller-financing-education h3{margin:0 0 .35rem;color:var(--navy)}.seller-financing-education>p{margin:.3rem 0 .8rem;line-height:1.4}.seller-financing-three-way{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem}.seller-financing-preset-actions{margin-bottom:.55rem}.seller-financing-preset{background:#6f7881;color:#fff;border-color:#6f7881;min-height:2.8rem;padding:.5rem .25rem;font-size:.76rem}.seller-financing-preset:hover{background:#5e6770;border-color:#5e6770}.seller-financing-preset.active{background:var(--navy);color:#fff;border-color:var(--navy);box-shadow:0 0 0 3px rgba(23,74,126,.18)}.seller-financing-amount-row{align-items:start;margin-bottom:.55rem}.seller-financing-amount-row .field{margin:0;min-width:0}.seller-financing-amount-row input{width:100%;min-width:0;text-align:center;font-weight:700;padding:.55rem .2rem}.seller-financing-amount-row input:disabled{background:#e3e7eb;color:#3e4852}.seller-financing-comparison-grid article{min-width:0;text-align:center;background:#fff;border:1px solid #ccd8e5;border-radius:8px;padding:.55rem .2rem}.seller-financing-comparison-grid small{display:block;font-size:.68rem}.seller-financing-comparison-grid strong{display:block;font-size:clamp(.88rem,3.7vw,1.15rem);color:var(--navy);margin:.15rem 0}.seller-financing-tradeoff{font-weight:700;color:#263f5c}@media(max-width:340px){.seller-financing-three-way{gap:.25rem}.seller-financing-preset{font-size:.68rem}.seller-financing-comparison-grid strong{font-size:.8rem}}
.seller-financing-graph-section{margin:1rem 0 1.4rem}.seller-financing-graph-section>p{line-height:1.45}.seller-financing-graph-empty{border:1px dashed #9aabbd;background:#f7f9fb;border-radius:8px;padding:1rem;color:#536579}.seller-financing-graph-legend{display:flex;flex-wrap:wrap;gap:1rem;margin:.5rem 0;font-weight:700}.seller-financing-graph-legend span:before{content:"";display:inline-block;width:1.1rem;height:.22rem;margin-right:.35rem;vertical-align:middle;border-radius:2px}.seller-financing-graph-legend .balance:before{background:#174a7e}.seller-financing-graph-legend .principal:before{background:#4e8b3a}.seller-financing-graph-legend .interest:before{background:#d97820}.seller-financing-graph{display:block;width:100%;height:auto;border:1px solid #d4dde7;border-radius:8px;background:#fff}.seller-financing-year-table{margin-top:.8rem}@media print{.seller-financing-graph-section{break-inside:avoid}.seller-financing-graph{max-height:3.6in}}
.educational-rate-lessons{margin:1rem 0 1.35rem;border:1px solid #c8d5e3;border-radius:10px;overflow:hidden}.educational-rate-lessons .section-title{margin:0}.educational-rate-warning{margin:0;padding:.8rem 1rem;background:#fff8dc;border-bottom:1px solid #eadca2;line-height:1.4}.educational-rate-tabs{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;padding:.8rem;background:#f3f6f9}.educational-rate-tab{min-height:3.1rem}.educational-rate-tab.active{background:var(--navy);color:#fff;border-color:var(--navy)}.educational-rate-card{margin:0;padding:1rem 1.1rem}.educational-rate-card.positive{border-left:6px solid #4e8b3a}.educational-rate-card.negative{border-left:6px solid #b63d32;background:#fff8f7}.educational-rate-card h3{margin:.1rem 0 .7rem}.educational-rate-inputs,.educational-rate-results{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem}.educational-rate-inputs span,.educational-rate-results div{border:1px solid #d5dee7;border-radius:7px;background:#fff;padding:.65rem}.educational-rate-inputs span{font-size:.83rem}.educational-rate-inputs strong,.educational-rate-results span,.educational-rate-results strong{display:block}.educational-rate-results{grid-template-columns:1fr 1fr;margin:.7rem 0}.educational-rate-results span{font-size:.82rem;color:#5a6878}.educational-rate-results strong{font-size:1.35rem;color:var(--navy);margin-top:.15rem}.educational-rate-card.negative .educational-rate-results strong{color:#9a251e}.educational-rate-lessons>.metric-subtitle{display:block;padding:0 1rem 1rem;line-height:1.35}@media(max-width:720px){.educational-rate-tabs,.educational-rate-inputs,.educational-rate-results{grid-template-columns:1fr}}
.buyer-lead-gate{margin-top:1.2rem;border-top:4px solid var(--navy);padding-top:1.2rem}.buyer-lead-gate h3{font-size:1.5rem;margin:.35rem 0}.buyer-contact-consent{display:flex;align-items:flex-start;gap:.65rem;margin:1rem 0;font-weight:600;line-height:1.4}.buyer-contact-consent input{width:auto;margin-top:.2rem}.buyer-lead-privacy{background:#f3f6f9;border:1px solid #d6e0ea;border-radius:8px;padding:.8rem;line-height:1.4}.buyer-lead-actions{display:flex;flex-wrap:wrap;gap:.65rem;margin-top:1rem}
.buyer-remember-device{display:flex;align-items:flex-start;gap:.65rem;margin:.8rem 0 .2rem;font-weight:700;line-height:1.35}.buyer-remember-device input{width:auto;margin-top:.15rem}.buyer-remember-warning{display:block;margin:0 0 .6rem 1.75rem;color:#667489}.buyer-lead-gate #forgetRememberedBuyer{margin:.15rem 0 .7rem}
.site-header p { margin:.35rem 0 0; opacity:.86; }
.layout { display:grid; grid-template-columns:minmax(300px,420px) minmax(0,1fr); gap:1rem; max-width:1500px; margin:1rem auto; padding:0 1rem 2rem; }
.panel { background:white; border:1px solid #d7dde3; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,.05); }
.inputs { padding:1rem; position:sticky; top:.5rem; align-self:start; max-height:calc(100vh - 1rem); overflow:auto; }
.results { padding:1rem; }
fieldset { border:1px solid var(--line); border-radius:8px; margin:0 0 1rem; padding:.85rem; }
legend { font-weight:700; color:var(--navy); padding:0 .35rem; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:.65rem .75rem; }
.field { display:flex; flex-direction:column; gap:.2rem; }
.field.full { grid-column:1/-1; }
label { font-size:.8rem; font-weight:700; color:#34495e; }
input, select { width:100%; padding:.55rem .6rem; border:1px solid #aeb8c2; border-radius:6px; font:inherit; background:white; }
input:disabled, select:disabled { background:#eee; color:#888; }
.checkbox { flex-direction:row; align-items:center; gap:.5rem; }
.checkbox input { width:auto; }
.actions { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.75rem; }
button { border:0; border-radius:6px; padding:.65rem .9rem; font-weight:700; cursor:pointer; background:var(--blue); color:white; }
button.secondary { background:#6c757d; }
button.light { background:#eef3f8; color:var(--navy); border:1px solid #b7c7d8; }
.error { background:#f4cccc; border:1px solid #c00000; color:#800000; padding:.75rem; border-radius:6px; margin-bottom:1rem; }
.report-meta { display:flex; justify-content:space-between; gap:1rem; font-size:.78rem; color:var(--muted); margin-bottom:.75rem; }
.hero-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.75rem; }
.hero { border:2px solid var(--blue); border-radius:7px; padding:1rem; text-align:center; background:var(--light-blue); }
.hero.planned { background:var(--light-green); border-color:#70ad47; }
.hero.break-even { background:var(--light-gold); border-color:#d6b656; }
.hero h2 { margin:0; font-size:clamp(1rem,2.2vw,1.25rem); }
.hero-period { margin:.15rem 0 .05rem; font-size:clamp(.78rem,1.5vw,.95rem); font-style:italic; color:var(--muted); }
.metric-subtitle { font-size:.78em; font-style:italic; color:var(--muted); font-weight:400; }

.hero .number { font-size:clamp(2rem,5vw,3rem); font-weight:800; color:var(--navy); margin:.35rem 0; }
.hero.break-even .number { font-size:clamp(1.55rem,3.6vw,2.35rem); }
.hero p { margin:0; color:var(--muted); font-size:.85rem; }
.callout { background:var(--light-gold); border:1px solid #d6b656; padding:.8rem; margin:.8rem 0; border-radius:6px; font-weight:700; }
.status-banner { padding:.65rem; border-radius:6px; font-weight:700; text-align:center; margin:.75rem 0; }
.status-banner.positive { background:var(--positive); color:#27632a; }
.status-banner.negative { background:var(--negative); color:#8a1111; }
.status-banner.neutral { background:var(--neutral); }
.section-title { background:var(--navy); color:white; padding:.5rem .7rem; margin:1rem 0 0; font-size:1.1rem; }
.result-table { width:100%; border-collapse:collapse; }
.result-table th, .result-table td { border:1px solid var(--line); padding:.52rem .58rem; vertical-align:top; }
.result-table th { background:var(--blue); color:white; text-align:left; }
.result-table td.num { text-align:right; font-variant-numeric:tabular-nums; }
.result-table tr.emphasis td { background:#f3f6fa; font-weight:400; }
.result-table tr.key-financial td, .result-table tr.key-financial td.num { font-weight:700; }
.cash-grid { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.cash-card { text-align:center; padding:1rem; border:2px solid #c65911; background:var(--light-orange); border-radius:7px; }
.cash-card.new { border-color:var(--blue); background:var(--light-blue); }
.cash-card .number { font-size:2.2rem; font-weight:800; color:var(--navy); }
.cta { background:var(--light-gold); border:1px solid #d6b656; padding:.8rem; text-align:center; font-weight:700; margin:.75rem 0; border-radius:6px; }
.disclaimer { font-size:.75rem; color:var(--muted); background:#f7f7f7; border:1px solid var(--line); padding:.75rem; margin-top:1rem; }
.report-footer { font-size:.72rem; color:var(--muted); display:flex; justify-content:space-between; border-top:1px solid var(--line); padding-top:.45rem; margin-top:1.2rem; }
@media (max-width: 980px) {
  .layout { grid-template-columns:1fr; }
  .inputs { position:static; max-height:none; }
}
@media (max-width: 620px) {
  .form-grid, .hero-grid, .cash-grid { grid-template-columns:1fr; }
  .layout { padding:0 .5rem 1rem; }
  .panel { border-radius:0; }
  .result-table { font-size:.82rem; }
  .report-meta { flex-direction:column; gap:.2rem; }
}
@media print {
  @page { size: letter; margin:.45in; }
  body { background:white; }
  .site-header, .inputs, .screen-actions, #errorBox { display:none !important; }
  .layout { display:block; max-width:none; margin:0; padding:0; }
  .results { border:0; box-shadow:none; padding:0; }
  .panel { border:0; box-shadow:none; }
  .page-break { break-before:page; }
  .hero, .cash-card, .callout, .cta, .section-title, .result-table th { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .report-footer { position:fixed; bottom:0; left:0; right:0; }
}

.prepared-line{font-size:.9rem;margin:.55rem 0;color:#555}.rate-note{font-size:.78rem;font-style:italic;color:#666;margin:.35rem 0 .8rem}.rate-table td,.rate-table th{padding:.45rem .55rem}
@media print{.report-footer{position:fixed;bottom:.25in;left:.35in;right:.35in;background:white}.prepared-line{margin-top:.35rem}}

.site-return { display:inline-block; margin-top:.45rem; color:white; font-size:.82rem; text-decoration:underline; }
.seller-guidance { grid-column:1/-1; background:var(--light-gold); border:1px solid #d6b656; border-radius:6px; padding:.75rem; margin:.15rem 0 .8rem; color:#6f5300; font-size:.8rem; line-height:1.35; }
.seller-terms-notice { background:var(--light-gold); border:1px solid #d6b656; padding:.65rem .75rem; font-weight:700; color:#6f5300; }
.report-footer > span:first-child { line-height:1.4; }
@media print { .site-return { display:none; } .seller-guidance { break-inside:avoid; } }

.seller-page-intro { margin:.75rem 0; line-height:1.45; color:#444; }
.seller-subtitle { margin:1rem 0 0; padding:.45rem .65rem; background:#eef3f8; color:var(--navy); font-size:1rem; }
.seller-terms-table th:nth-child(1){width:34%}.seller-terms-table th:nth-child(2){width:22%}.seller-terms-table th:nth-child(3){width:44%}
.structures-table th:first-child{width:32%}
.seller-page-break { margin-top:1.25rem; border-top:2px solid #e2e7ec; }
@media print { .seller-page-break { border:0; margin:0; } .seller-terms-table, .structures-table, .seller-terms-notice, .seller-page-intro { break-inside:avoid; } }

/* Prototype 16: refined table proportions, percentage inputs, and decision-state styling */
.rate-table col.col-rate-label { width: 50%; }
.rate-table col.col-rate-assumption { width: 25%; }
.rate-table col.col-rate-newva { width: 25%; }
.core-findings-table col.col-core-label { width: 50%; }
.core-findings-table col.col-core-life { width: 25%; }
.core-findings-table col.col-core-planned { width: 25%; }
.benefit-components-table col.col-component-label { width: 50%; }
.benefit-components-table col.col-component-life { width: 25%; }
.benefit-components-table col.col-component-planned { width: 25%; }
.rate-table th:nth-child(n+2), .core-findings-table th:nth-child(n+2), .benefit-components-table th:nth-child(n+2) { text-align:right; }
[data-money-input="true"], [data-percent-input="true"] { font-variant-numeric: tabular-nums; }
.paired-field { align-self:stretch; }
.paired-field input { margin-top:auto; }
.grey-zone-negative { color:#c00000; font-weight:700; }
@media (max-width: 620px) {
  .rate-table col.col-rate-label, .core-findings-table col.col-core-label, .benefit-components-table col.col-component-label { width: 50%; }
  .rate-table col.col-rate-assumption, .rate-table col.col-rate-newva,
  .core-findings-table col.col-core-life, .core-findings-table col.col-core-planned,
  .benefit-components-table col.col-component-life, .benefit-components-table col.col-component-planned { width: 25%; }
}

/* Prototype 19: funding-fee pair uses one-line labels and the same grid geometry as the row above. */
.funding-fee-field { min-width:0; align-self:start; }
.funding-fee-field label {
  display:block;
  white-space:nowrap;
  min-height:0;
  line-height:1.2;
  margin:0;
}
.funding-fee-field input {
  display:block;
  width:100%;
  min-width:0;
  margin-top:.2rem;
  box-sizing:border-box;
}

/* Prototype 21 - Seller Entry / Role Separation */
.tm { font-size:.42em; vertical-align:super; line-height:0; margin-left:.08em; }
.entry-nav { max-width:1500px; margin:1rem auto 0; padding:0 1rem; display:grid; grid-template-columns:repeat(3,1fr); gap:.75rem; }
.entry-mode { background:white; border:1px solid #ccd5df; border-radius:8px; padding:.75rem 1rem; display:flex; flex-direction:column; gap:.15rem; color:#55606c; }
.entry-mode.active { border:2px solid var(--blue); background:var(--light-blue); color:var(--navy); }
.entry-mode.future { opacity:.72; }
.entry-mode span { font-size:.78rem; }
.seller-layout { display:grid; grid-template-columns:minmax(360px,620px) minmax(380px,1fr); gap:1rem; max-width:1500px; margin:1rem auto; padding:0 1rem 2rem; align-items:start; }
.seller-form-panel { padding:1rem; }
.seller-preview-panel { padding:1rem; position:sticky; top:.5rem; }
.seller-intro h2, .seller-preview-panel h2 { margin:.1rem 0 .4rem; color:var(--navy); }
.seller-intro p, .preview-note, .fieldset-note { color:var(--muted); line-height:1.45; font-size:.84rem; }
.subsection-heading { grid-column:1/-1; color:var(--navy); font-size:.95rem; margin:.85rem 0 .55rem; border-bottom:1px solid #d8e0e8; padding-bottom:.35rem; }
.offering-status { display:inline-block; background:var(--light-green); color:#27632a; border:1px solid #70ad47; border-radius:999px; padding:.3rem .55rem; font-size:.7rem; font-weight:700; letter-spacing:.04em; }
.offering-id-box { margin:.7rem 0; padding:.65rem .75rem; background:#f5f7fa; border:1px solid #d8e0e8; border-radius:6px; display:flex; justify-content:space-between; gap:1rem; font-size:.82rem; }
.preview-property { color:#555; margin-bottom:.8rem; }
.preview-kpis { display:grid; grid-template-columns:1fr 1fr; gap:.65rem; }
.preview-kpis article { border:1px solid #cad5e0; border-radius:7px; padding:.75rem; background:#fbfcfd; }
.preview-kpis span { display:block; font-size:.73rem; color:var(--muted); margin-bottom:.25rem; }
.preview-kpis strong { color:var(--navy); font-size:1.05rem; }
.seller-value-table td:first-child { width:46%; }
.seller-no-financing { padding:.85rem; border:1px solid #c9c9c9; background:#f7f7f7; color:#555; }
.seller-legal-note { margin-top:1rem; padding:.8rem; background:#f7f7f7; border:1px solid var(--line); color:#666; font-size:.76rem; line-height:1.45; }
.button-link { display:inline-flex; align-items:center; text-decoration:none; border-radius:6px; padding:.65rem .9rem; font-weight:700; }
.button-link.light { background:#eef3f8; color:var(--navy); border:1px solid #b7c7d8; }
input[readonly] { background:#f1f3f5; color:#555; }
@media (max-width:980px) { .seller-layout { grid-template-columns:1fr; } .seller-preview-panel { position:static; } .entry-nav { grid-template-columns:1fr; } }
@media (max-width:620px) { .seller-layout { padding:0 .5rem 1rem; } .preview-kpis { grid-template-columns:1fr; } }
.listing-choice { display:flex; align-items:center; gap:.45rem; padding:.6rem .7rem; border:1px solid #b7c7d8; border-radius:6px; background:#f7fafc; font-weight:700; }
.actions select { min-width:210px; padding:.65rem .6rem; border:1px solid #b7c7d8; border-radius:6px; background:white; }

/* Prototype 25: locked seller-side model defaults */
.locked-default input[readonly]{background:#eef3f8;color:#334155;cursor:not-allowed;border-color:#cbd5e1;}
.locked-default small{display:block;margin-top:4px;color:#64748b;font-size:.72rem;line-height:1.25;}


/* Prototype 26 role navigation */
.admin-role-nav {
  display:flex; gap:.6rem; flex-wrap:wrap; justify-content:center; margin:.8rem auto 0;
}
.admin-role-nav a {
  display:inline-block; padding:.55rem .9rem; border-radius:8px; text-decoration:none;
  font-weight:700; border:1px solid rgba(255,255,255,.55); color:#fff; background:rgba(255,255,255,.10);
}
.admin-role-nav a.active { background:#fff; color:#173a5e; }
.admin-preview-banner {
  position:sticky; top:0; z-index:1000; padding:.55rem 1rem; text-align:center;
  font-weight:800; letter-spacing:.04em; background:#fff3cd; color:#5d4500; border-bottom:2px solid #d6a800;
}
.admin-preview-banner a { margin-left:1rem; color:#173a5e; font-weight:800; }
.role-view-label { font-size:.82rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; opacity:.88; margin-top:.35rem; }

.info-tip{font-size:.78em;color:#64748b;cursor:help;vertical-align:top;margin-left:2px;}


/* Prototype 29 Buyer View */
.buyer-guidance{grid-column:1/-1;min-width:0;background:#eef6ff;border:1px solid #b9d7f3;border-radius:8px;padding:.8rem 1rem;color:#16324f}
.system-assumption-field input,.locked-input,input[readonly]{background:#eef1f4!important;color:#4b5563!important;border-color:#cbd2d9!important;cursor:not-allowed}
.system-assumption-field small{display:block;margin-top:.3rem;color:#5f6b76;line-height:1.3}
.info-dot{cursor:help;font-size:.9em}
.field-group{grid-column:1/-1;border:1px solid #d8dee5;border-radius:8px;padding:.75rem;background:#fafbfc}
.readonly-display{background:#eef1f4;border:1px solid #cbd2d9;border-radius:6px;padding:.62rem .7rem;font-weight:700;color:#334155}
.principal-balance-field{grid-template-rows:auto 2.65rem auto!important}
.principal-balance-field>label{align-self:start!important;min-height:3.2rem;display:flex;align-items:flex-end}
.principal-balance-field>small{position:static!important;margin-top:.35rem;line-height:1.3}
.illustrative-preview-kpis{margin-top:.35rem}

/* Prototype 30 buyer-role clarity */
.offering-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem .8rem;margin-top:.7rem}.offering-summary-grid>div{border:1px solid #d9dee5;background:#f6f7f9;border-radius:8px;padding:.6rem .7rem}.offering-summary-grid span{display:block;font-size:.72rem;color:#606975;text-transform:uppercase;letter-spacing:.03em;margin-bottom:.18rem}.offering-summary-grid strong{display:block;font-size:.92rem;color:#182331}.listed-offering-fieldset{background:#fbfcfd}.entry-nav .entry-mode.active strong{font-size:1rem}@media(max-width:720px){.offering-summary-grid{grid-template-columns:1fr}}

.entry-nav a.entry-mode{text-decoration:none;cursor:pointer}.entry-nav a.entry-mode:hover{border-color:var(--blue);background:#f4f8fc}
.cash-breakdown{margin-top:10px;font-size:.78rem;line-height:1.45;color:#4b5563;border-top:1px solid #e5e7eb;padding-top:8px}

/* Prototype 35: keep paired two-column controls aligned even when labels/helper text wrap differently. */
@media (min-width: 721px) {
  .form-grid > .field.align-pair { display:grid; grid-template-rows:minmax(2.35rem, auto) 2.65rem auto; align-content:start; }
  .form-grid > .field.align-pair > label { align-self:end; }
  .form-grid > .field.align-pair > input,
  .form-grid > .field.align-pair > select { height:2.65rem; box-sizing:border-box; }
}

.principal-balance-review{border:1px solid #d4a72c;border-radius:6px;padding:10px;background:#fff8df;margin-top:2px}
.compact-guidance{margin-top:8px;margin-bottom:0}

/* Ensure conditional UI sections actually disappear when hidden. */
[hidden]{display:none !important;}

/* Prototype 46 - Admin control center */
.admin-control-center{border:2px solid #203a66;background:#f6f8fc}
.admin-readout{min-height:42px;padding:10px 12px;border:1px solid #c9d2df;border-radius:8px;background:#fff;font-weight:600;color:#203a66;box-sizing:border-box}
.admin-load-actions{margin-top:10px}
.admin-control-center .status{margin-top:10px;padding:9px 11px;background:#eef3fb;border-radius:7px;font-size:.92rem}


/* Prototype 47 Admin routing and property header */
.admin-view-strong{margin-top:.8rem;padding:.55rem .8rem;border:2px solid currentColor;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.admin-role-nav{margin-top:.65rem}
.admin-role-nav a{display:inline-block;margin:.2rem .25rem;padding:.55rem .8rem;border:1px solid currentColor;border-radius:.45rem;text-decoration:none}
.admin-role-nav a.active{font-weight:800;box-shadow:inset 0 0 0 2px currentColor}


/* Prototype 48: role-safe Admin preview and reversible Admin saves */
.admin-preview-banner[hidden]{display:none!important}
.admin-preview-banner:not([hidden]){
  display:flex!important; position:fixed; top:0; left:0; right:0; z-index:9999;
  min-height:48px; align-items:center; justify-content:center; gap:1rem;
  background:#b42318; color:#fff; border-bottom:3px solid #7a1710;
  font-weight:900; letter-spacing:.04em; box-shadow:0 3px 10px rgba(0,0,0,.28);
}
.admin-preview-banner .admin-return-button{
  display:inline-block; padding:.45rem .8rem; border-radius:.4rem; background:#fff; color:#8f1b13!important;
  text-decoration:none; border:2px solid #fff; font-weight:900; margin-left:.5rem;
}
body.admin-preview-mode{padding-top:48px}
.admin-revision-panel{margin-top:.9rem;padding:.85rem;border:1px solid #c8d1da;border-radius:.55rem;background:#f7f9fb;display:grid;gap:.5rem}
.admin-revision-panel select{width:100%}
.danger,.danger-outline{font-weight:800}
.danger{background:#b42318!important;color:#fff!important;border-color:#b42318!important}
.danger-outline{background:#fff!important;color:#9f2017!important;border:2px solid #b42318!important}
.admin-modal[hidden]{display:none!important}
.admin-modal{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.62);display:flex;align-items:center;justify-content:center;padding:1.25rem}
.admin-modal-card{width:min(860px,96vw);max-height:88vh;overflow:auto;background:#fff;border:4px solid #b42318;border-radius:.75rem;padding:1.15rem;box-shadow:0 15px 45px rgba(0,0,0,.4)}
.admin-modal-card h2{color:#9f2017;margin-top:0}
.admin-change-list{margin:.8rem 0 1rem;border:1px solid #d5dbe1;border-radius:.45rem;overflow:hidden}
.admin-change-row{display:grid;grid-template-columns:minmax(150px,1.1fr) minmax(150px,1fr) 32px minmax(150px,1fr);gap:.5rem;padding:.55rem .65rem;border-bottom:1px solid #e6eaee;align-items:center}
.admin-change-row:last-child{border-bottom:0}
.admin-change-row .before{color:#7b2d26;text-decoration:line-through;text-decoration-thickness:1px}
.admin-change-row .after{font-weight:800;color:#14532d}
.admin-change-head{font-weight:800;background:#f3f5f7}
@media(max-width:700px){.admin-change-row{grid-template-columns:1fr}.admin-change-row .arrow{display:none}}
@media print{.admin-preview-banner,.admin-modal,.admin-role-nav,.admin-revision-panel{display:none!important}body.admin-preview-mode{padding-top:0}}

.admin-review-only{background:#eef1f4!important;color:#606770!important;cursor:not-allowed;}
.admin-controlled-input{outline:2px solid #b7791f;outline-offset:1px;}

/* Prototype 51 admin-preview cross-role navigation */
.admin-preview-actions{display:inline-flex;gap:.55rem;align-items:center;margin-left:.75rem}
.admin-switch-button{display:inline-block;background:#fff;color:#8b0000;border:2px solid #fff;border-radius:6px;padding:.35rem .65rem;font-weight:800;text-decoration:none}
.admin-switch-button:hover{background:#ffecec;color:#680000}
@media (max-width:720px){.admin-preview-banner{flex-wrap:wrap}.admin-preview-actions{margin-left:0;width:100%;justify-content:center}}

/* Prototype 52 — simplified Admin property selector */
.admin-home-page{min-height:100vh;background:#f4f7fb}
.admin-home-header{text-align:center}
.admin-home-wrap{max-width:760px;margin:48px auto;padding:0 20px}
.admin-home-card{padding:32px}
.admin-home-card h2{margin-top:0;font-size:1.6rem}
.admin-home-help{margin-bottom:24px;color:#52606d}
.admin-property-label{display:block;font-weight:700;margin-bottom:7px}
.admin-property-search{width:100%;font-size:1.05rem;padding:13px 14px;border:1px solid #aeb8c4;border-radius:8px;background:#fff}
.admin-property-suggestions{margin-top:6px;border:1px solid #c8d0d9;border-radius:8px;background:#fff;box-shadow:0 10px 24px rgba(0,0,0,.12);overflow:hidden;max-height:360px;overflow-y:auto}
.admin-property-option{display:grid;grid-template-columns:1fr auto;gap:2px 16px;width:100%;text-align:left;padding:12px 14px;border:0;border-bottom:1px solid #e6e9ed;background:#fff;color:#17202a;cursor:pointer;border-radius:0}
.admin-property-option:hover,.admin-property-option:focus,.admin-property-option.is-active{background:#eef5ff}
.admin-property-option strong{grid-column:1;font-size:1rem}.admin-property-option span{grid-column:1;color:#52606d}.admin-property-option small{grid-column:2;grid-row:1 / span 2;align-self:center;color:#66788a}
.admin-property-empty{padding:14px;color:#66788a}
.admin-selected-property{margin:20px 0;padding:14px 16px;border-radius:8px;background:#eef3f8;min-height:24px}
.admin-home-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px}
.admin-home-actions button{font-size:1.05rem;padding:13px 18px}
.admin-home-actions button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:600px){.admin-home-actions{grid-template-columns:1fr}.admin-home-wrap{margin-top:24px}.admin-home-card{padding:22px}}

/* Prototype 53 — dominant current Admin preview view */
.admin-preview-context{font-size:.72rem;font-weight:700;letter-spacing:.12em;opacity:.78}
.admin-current-view{display:inline-block;background:#fff;color:#8b0000;padding:.48rem .95rem;border-radius:7px;font-size:1.05rem;font-weight:950;letter-spacing:.06em;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.admin-preview-banner .admin-switch-button,.admin-preview-banner .admin-return-button{background:transparent!important;color:rgba(255,255,255,.82)!important;border:1px solid rgba(255,255,255,.38)!important;padding:.28rem .52rem!important;font-size:.76rem!important;font-weight:650!important;box-shadow:none!important;opacity:.86}
.admin-preview-banner .admin-switch-button:hover,.admin-preview-banner .admin-return-button:hover{background:rgba(255,255,255,.10)!important;color:#fff!important;opacity:1}

/* Prototype 54 - public front door and lightweight onboarding */
.front-door-page{min-height:100vh;background:linear-gradient(180deg,#f4f7fb 0%,#fff 55%);color:#15243a;margin:0;font-family:Arial,Helvetica,sans-serif}
.front-door-header{text-align:center;padding:38px 20px 18px}
.front-door-brand{font-size:2rem;font-weight:800;letter-spacing:-.02em;color:#12325a}.front-door-header p{margin:8px 0 0;color:#526176;font-size:1.05rem}
.front-door-wrap{max-width:1050px;margin:0 auto;padding:22px 24px 48px}.front-door-hero{text-align:center;max-width:760px;margin:0 auto 28px}.front-door-eyebrow,.onboarding-step{font-size:.78rem;font-weight:800;letter-spacing:.12em;color:#41658f}.front-door-hero h1{font-size:2.45rem;margin:7px 0 10px;letter-spacing:-.03em}.front-door-lead{font-size:1.1rem;color:#5a6677;line-height:1.55;margin:0}
.front-door-choices{display:grid;grid-template-columns:1fr 1fr;gap:22px}.front-door-card{background:#fff;border:1px solid #d9e1eb;border-radius:16px;padding:30px;box-shadow:0 12px 30px rgba(26,48,76,.08);display:flex;flex-direction:column;min-height:315px}.front-door-card h2{font-size:1.55rem;margin:12px 0 10px}.front-door-card p{color:#5b6675;line-height:1.55;flex:1}.front-door-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#eaf1f8;color:#183f6c;font-weight:800;font-size:1.5rem}.front-door-primary{display:block;text-align:center;text-decoration:none;background:#174f86;color:#fff;padding:13px 16px;border-radius:9px;font-weight:800;margin-top:8px}.front-door-primary:hover{background:#113d69}.front-door-text-link{display:block;text-align:center;color:#526176;text-decoration:none;font-weight:700;margin-top:14px;font-size:.92rem}.front-door-text-link:hover{text-decoration:underline}.front-door-note{margin:24px auto 0;text-align:center;background:#f6f8fb;border-radius:10px;padding:15px;color:#596779;max-width:760px}.front-door-footer{text-align:center;color:#7a8594;font-size:.78rem;line-height:1.45;padding:0 24px 30px;max-width:900px;margin:0 auto}
.onboarding-page{min-height:100vh;background:#f5f7fa;margin:0;color:#17273b;font-family:Arial,Helvetica,sans-serif}.onboarding-header{background:#fff;border-bottom:1px solid #dde4ec;display:flex;align-items:center;gap:22px;padding:20px 28px}.onboarding-header h1{font-size:1.3rem;margin:0}.onboarding-header p{margin:3px 0 0;color:#667489;font-size:.9rem}.onboarding-back{color:#31597f;text-decoration:none;font-weight:700}.onboarding-wrap{max-width:820px;margin:34px auto;padding:0 20px}.onboarding-card{background:#fff;border:1px solid #dce3eb;border-radius:14px;box-shadow:0 10px 28px rgba(30,50,72,.07);padding:32px}.onboarding-card h2{font-size:2rem;margin:7px 0 8px}.onboarding-card>p{color:#607085;line-height:1.5;margin:0 0 26px}.onboarding-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.onboarding-grid .full{grid-column:1/-1}.optional-label{font-weight:400;color:#7d8997;font-size:.85em}.onboarding-actions{margin-top:24px}.onboarding-actions button{width:100%;padding:14px 18px;font-size:1rem}.onboarding-empty{margin-top:16px;padding:14px;border-radius:8px;background:#f5f7fa;color:#5d6978;line-height:1.45}
@media(max-width:720px){.front-door-choices{grid-template-columns:1fr}.front-door-hero h1{font-size:2rem}.front-door-card{min-height:0}.onboarding-grid{grid-template-columns:1fr}.onboarding-grid .full{grid-column:auto}.onboarding-card{padding:24px}.onboarding-header{padding:16px}}

/* Buyer entry and saved-scenario routing */
.front-door-secondary{display:block;text-align:center;text-decoration:none;background:#fff;color:#174f86;border:2px solid #174f86;padding:11px 14px;border-radius:9px;font-weight:800;margin-top:12px}
.front-door-secondary:hover{background:#eef5fb}
.no-match-panel{border:1px solid #d7dee8}
.no-match-panel strong{display:block;color:#253b55}
.no-match-panel p{margin:.4rem 0 .8rem}
.saved-scenario-choices,.research-request{margin-top:22px;padding:20px;border:1px solid #ccd8e6;border-radius:10px;background:#f8fafc}
.saved-scenario-choices h3,.research-request h3{margin:.2rem 0 .4rem;color:#183f6c}
.saved-scenario-choices>p{margin:.3rem 0 1rem;color:#607085}
.saved-scenario-option{width:100%;display:flex;justify-content:space-between;gap:18px;text-align:left;background:#fff;color:#20344f;border:1px solid #cbd6e2;border-radius:8px;padding:12px 14px;margin-top:8px}
.saved-scenario-option:hover,.saved-scenario-option:focus{border-color:#174f86;background:#eef5fb}
.saved-scenario-option span{color:#64748b;font-weight:400}
.research-request-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}
.compact-button{padding:8px 11px}
.form-requirement{font-size:.82rem;color:#5e6c7c;line-height:1.45}
.research-delivery-note{display:block;margin-top:10px;color:#5e6c7c;line-height:1.4}
.research-request form>button[type="submit"]{width:100%;padding:13px 16px}
@media(max-width:620px){.saved-scenario-option{display:block}.saved-scenario-option span{display:block;margin-top:4px}.research-request-heading{display:block}.research-request-heading .compact-button{margin-top:10px}}

/* Prototype 55: five-step seller journey */
.seller-step-progress{position:sticky;top:0;z-index:20;margin:0 0 18px;border-radius:14px;overflow:hidden;background:linear-gradient(180deg,#b22234 0 14%,#fff 14% 28%,#b22234 28% 42%,#fff 42% 56%,#b22234 56% 70%,#fff 70% 84%,#b22234 84%);box-shadow:0 4px 14px rgba(0,0,0,.14);border:1px solid #d7dce4}
.seller-step-progress-inner{background:linear-gradient(90deg,rgba(60,59,110,.93) 0 34%,rgba(255,255,255,.80) 34%);padding:12px 16px;display:flex;gap:12px;align-items:center;justify-content:space-between;min-height:68px}
.seller-step-list{display:flex;gap:8px;flex-wrap:wrap}.seller-step-chip{font-size:.78rem;font-weight:700;padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.84);color:#24324a;border:1px solid rgba(0,0,0,.08)}.seller-step-chip.active{background:#fff;color:#8b1525;box-shadow:0 0 0 2px rgba(255,255,255,.45)}
.service-message{font-weight:900;font-size:1.2rem;letter-spacing:.02em;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5);white-space:nowrap}.service-message.complete{font-size:1.35rem}
.seller-step-page[hidden]{display:none!important}.step-nav{display:flex;justify-content:space-between;gap:10px;margin-top:18px}.step-nav .right{margin-left:auto}.sandbox-welcome,.seller-done-pause{padding:18px;border-radius:12px;background:#f5f8fc;border:1px solid #cdd8e8;margin:12px 0 18px}.sandbox-warning{font-weight:800;color:#7c2430}.fireworks{position:fixed;inset:0;pointer-events:none;z-index:9999;overflow:hidden}.spark{position:absolute;font-size:28px;animation:spark 1.6s ease-out forwards}@keyframes spark{0%{transform:translate(0,0) scale(.4);opacity:1}100%{transform:translate(var(--x),var(--y)) scale(1.4);opacity:0}}
@media(max-width:800px){.seller-step-progress-inner{align-items:flex-start;flex-direction:column}.service-message{white-space:normal}.seller-step-list{gap:5px}}
/* Prototype 56: keep navigation steps separate from the flag appreciation bar. */
.seller-step-list-standalone{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px;padding:0;background:none}
.seller-step-list-standalone .seller-step-chip{background:#f5f7fa;border:1px solid #cbd3df;color:#17385e;box-shadow:none}
.seller-step-list-standalone .seller-step-chip.active{background:#e7f0fa;border-color:#245781;color:#143d68;box-shadow:inset 0 0 0 1px #245781}
.seller-step-progress{position:sticky;top:0;z-index:20;margin:0 0 18px;border-radius:12px;overflow:hidden;background:repeating-linear-gradient(180deg,#b22234 0 8px,#fff 8px 16px);box-shadow:0 4px 14px rgba(0,0,0,.14);border:1px solid #d7dce4}
.seller-step-progress-inner{background:linear-gradient(90deg,rgba(60,59,110,.94) 0 26%,rgba(255,255,255,.58) 26%);padding:10px 16px;display:flex;align-items:center;justify-content:flex-end;min-height:48px}
.service-message{font-size:1.4rem;font-weight:900;letter-spacing:.02em;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.7);min-height:1.4em}
@media(max-width:800px){.seller-step-list-standalone{gap:6px}.seller-step-progress-inner{min-height:44px;justify-content:center}.service-message{font-size:1.15rem;text-align:center}}
.sandbox-finish{width:100%;margin:8px 0 4px;color:#173b63}.quiet-action{background:transparent!important;color:#4f6275!important;border:1px solid #c7d2dc!important;box-shadow:none!important}.quiet-action:hover{background:#f5f7f9!important}.step-nav .sandbox-finish+button{margin-left:auto}

.seller-step-chip.complete{background:#edf7ef!important;border-color:#8db69a!important;color:#245d35!important}.seller-exit-page{padding-top:8px}.seller-exit-card{padding:20px;border:1px solid #ccd6e2;border-radius:14px;background:#fff;margin:0 0 18px}.seller-exit-card label{display:block;font-weight:700;margin:14px 0}.seller-exit-card textarea,.seller-exit-card select{display:block;width:100%;margin-top:6px}.exit-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.service-celebration{position:fixed;inset:0;z-index:9998;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(255,255,255,.94);pointer-events:none;animation:celebrateFade 4.8s forwards}.waving-flag{font-size:min(28vw,190px);transform-origin:center;animation:flagWave .55s ease-in-out infinite alternate}.service-thanks{font-size:clamp(2rem,6vw,4.8rem);font-weight:900;text-align:center;color:#17385e;text-shadow:0 2px 0 #fff;margin-top:16px}.service-celebration.settled{animation:celebrateFade 2.2s forwards}@keyframes flagWave{from{transform:rotate(-4deg) skewY(-2deg) scaleX(.96)}to{transform:rotate(4deg) skewY(2deg) scaleX(1.04)}}@keyframes celebrateFade{0%,72%{opacity:1}100%{opacity:0;visibility:hidden}}

.seller-step-chip.clickable{cursor:pointer;transition:transform .12s ease,box-shadow .12s ease}.seller-step-chip.clickable:hover{transform:translateY(-1px);box-shadow:0 2px 7px rgba(20,61,104,.18)}.seller-step-chip.clickable:focus{outline:2px solid #245781;outline-offset:2px}.seller-step-chip[aria-disabled="true"]{cursor:default;opacity:.72}

/* Prototype 62: returning seller and validation cleanup */
.returning-seller-card{margin-top:20px}
.returning-seller-controls{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:10px;align-items:end}
.returning-seller-controls label{grid-column:1/-1;font-weight:700}
.returning-seller-controls select{min-height:44px;padding:9px 11px;border:1px solid #aab4c2;border-radius:8px;background:#fff}
.returning-seller-controls button:disabled{opacity:.45;cursor:not-allowed}
@media (max-width:640px){.returning-seller-controls{grid-template-columns:1fr}.returning-seller-controls label{grid-column:auto}}

/* Prototype 63: compact step navigation and Sandbox focus */
.chip-return-note{font-size:.78rem;font-weight:700;color:#5c6878;margin:2px 0 5px}
.seller-step-list-standalone{flex-wrap:nowrap;gap:5px}
.seller-step-list-standalone .seller-step-chip{font-size:.69rem;padding:5px 7px;white-space:nowrap}
.seller-step-page[data-step="5"] .form-grid>.field{align-self:start}
.seller-step-page[data-step="5"] .form-grid>.field>label{min-height:2.35em;display:flex;align-items:flex-end}
.seller-step-page[data-step="5"] .form-grid>.field>input,.seller-step-page[data-step="5"] .form-grid>.field>select{height:2.65rem;box-sizing:border-box}
@media(max-width:620px){.seller-step-list-standalone{flex-wrap:wrap}.seller-step-list-standalone .seller-step-chip{font-size:.68rem}}
.saved-rate-control{display:flex;align-items:center;justify-content:flex-end;gap:.75rem;margin:.45rem 0 .8rem;font-size:.9rem}.saved-rate-control button{padding:.45rem .75rem;font-size:.85rem}

/* Prototype 67: Buyer Sandbox */
.buyer-sandbox-fieldset{border-color:#a9b9cc;background:linear-gradient(180deg,#fbfdff 0%,#f6f9fc 100%)}
.buyer-sandbox-welcome{margin-bottom:1rem}
.buyer-sandbox-fieldset #buyerSellerOfferingSelect{font-weight:700}
.buyer-sandbox-fieldset #refreshBuyerRateButton{width:auto;margin:.15rem 0 .2rem}
@media (max-width:700px){.buyer-sandbox-fieldset #refreshBuyerRateButton{width:100%}}

/* Buyer education step */
.education-page-wrap{width:min(960px,calc(100% - 2rem));margin:1.5rem auto 3rem}
.education-page-wrap>.onboarding-card{margin-bottom:1rem}
.education-page-lessons{background:#fff;margin:1rem 0;border-radius:12px}
.education-intro h2,.education-next-card h2{margin:.35rem 0 .6rem}
.education-page-actions{display:flex;justify-content:flex-end;gap:.65rem}
.education-page-actions.top-actions{margin-top:.8rem}
.education-page-actions button{min-width:220px}
@media(max-width:600px){.education-page-actions{display:block}.education-page-actions button{width:100%;min-width:0}}
.database-publish-panel{margin-top:1.25rem;padding:1rem;border:1px solid #b9c9d9;border-radius:10px;background:#f7fbff}.database-publish-panel h3{margin:.1rem 0 .5rem;color:var(--navy)}.database-publish-panel label{display:block;font-weight:700;margin:.7rem 0 .25rem}.database-publish-panel input{width:100%;box-sizing:border-box;margin-bottom:.65rem}.database-publish-panel button{width:100%}
.buyer-lead-review-table{margin-top:.75rem}.buyer-lead-review-scroll{overflow-x:auto}.buyer-lead-review-table table{width:100%;border-collapse:collapse;font-size:.88rem;background:#fff}.buyer-lead-review-table th,.buyer-lead-review-table td{padding:.6rem;border:1px solid #c9d5e1;text-align:left;vertical-align:top}.buyer-lead-review-table th{background:var(--navy);color:#fff}.buyer-lead-review-table small{color:#52606d}
