@scope (.installer-portal) {
:scope {
    --ink:#211e19;
    --gold:#f5c34b;
    --paper:#fff;
    --wash:#f7f5f0;
    --line:#dfdbd2;
    --muted:#5f584d;
    --accent:#70401c;
    --success:#24553c;
    --radius:10px;
  }
  *, *::before, *::after { box-sizing:border-box }

  :scope { margin:0; background:var(--wash); color:var(--ink); font:16px/1.45 system-ui,-apple-system,'Segoe UI',sans-serif }
  h1,h2,h3,p,figure,dl { margin:0 }
  h1,h2,h3 { line-height:1.14; letter-spacing:-.035em }
  h1 { font-size:clamp(1.85rem,5vw,2.65rem) }
  h2 { font-size:1.2rem }
  h3 { font-size:1.06rem }
  a { color:var(--accent); font-weight:700; text-underline-offset:.2em }
  img { display:block; width:100%; height:auto }
  button,input,select,textarea { font:inherit }
  button { cursor:pointer }
  button:disabled { cursor:default; opacity:.55 }
  :focus-visible { outline:3px solid #906329; outline-offset:2px }
  .wrap { width:min(100% - 32px,960px); margin-inline:auto }
  .mast { background:#211e19; color:white }
  .brandrow { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:52px }
  .brand { font-weight:850; font-size:1.18rem; letter-spacing:-.055em; color:white; text-decoration:none; white-space:nowrap }
  .brand span { color:var(--gold) }
  .mast small { color:#e0d8c9; font-size:.75rem }
  .mode { border-top:1px solid #484237 }
  .mode .wrap { display:grid; grid-template-columns:repeat(2,1fr) }
  .mode button { min-height:44px; border:0; border-bottom:3px solid transparent; background:none; color:#eee9df; font-size:.88rem; font-weight:750 }
  .mode button[aria-current=page] { border-color:var(--gold); color:var(--gold) }
  #screen { min-height:60vh }
  .page { padding-block:18px 36px }
  .page.compact { max-width:660px }
  .intro { display:grid; gap:7px; margin-bottom:18px }
  .back { margin-top:-5px; margin-bottom:3px }
  .muted { color:var(--muted) }
  .small { font-size:.875rem }
  .section { margin-top:22px }
  .stack,.grid { display:grid; gap:12px }
  .roomy { gap:20px }
  .two { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .mobile-stack { grid-template-columns:1fr }
  .full { grid-column:1/-1 }
  .section-head,.action-row,.links { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px }
  .section-head { justify-content:space-between }
  .btn,.text-btn {
    display:inline-flex; align-items:center; justify-content:center; min-height:44px;
    font-weight:730; text-align:center; text-decoration:none;
  }
  .btn { border:1px solid #b6ad9d; border-radius:7px; background:var(--paper); color:var(--ink); padding:9px 13px }
  .btn.primary { background:var(--gold); border-color:#d7a736 }
  .btn.dark { color:white; background:var(--ink); border-color:var(--ink) }
  .btn:hover:not(:disabled) { filter:brightness(.96) }
  .text-btn { border:0; background:none; padding:0 2px; color:var(--accent); text-decoration:underline; text-underline-offset:.2em }
  .links a { display:inline-flex; align-items:center; min-height:44px }
  .form-submit,.home-actions .btn { width:100% }
  .home-actions { display:grid; gap:8px }
  .landing { display:grid; gap:24px }
  .landing-hero { display:grid; gap:12px; padding-block:8px 20px; border-bottom:1px solid var(--line) }
  .landing-hero p { max-width:60ch }
  .landing-basics { display:grid; gap:6px; margin:0; padding-inline-start:1.25em; font-size:clamp(1.125rem,1.5vw,1.375rem); line-height:1.4 }
  .landing-basics li::marker { color:var(--accent) }
  .landing-underline { text-decoration:underline; text-underline-offset:.15em }
  .landing-hero .home-actions { max-width:28rem }
  .landing-owner,.step-action { color:#000 }
  .landing-story,.contact-timing { color:#7a1f2b }
  .installer-promise { font-size:clamp(1.125rem,1.5vw,1.375rem) }
  .landing-section { display:grid; gap:12px }
  .landing-steps { display:grid; gap:0; margin:0; padding:0; list-style:none }
  .landing-steps li { display:grid; grid-template-columns:2rem minmax(0,1fr); align-content:start; align-items:start; gap:4px 10px; border-top:1px solid var(--line); padding:12px 0 }
  .landing-steps li p { grid-column:2 }
  .landing-step-number { grid-row:span 2; display:grid; place-items:center; width:2rem; height:2rem; border-radius:50%; background:var(--gold); font-size:.9rem; font-weight:800 }
  .landing-steps h3 { align-self:center; padding-top:3px }
  .responsibility-grid { display:grid; gap:8px }
  .responsibility-grid .panel { display:grid; gap:6px; align-content:start }
  .quote-checklist { display:grid; gap:7px; padding-left:1.25rem; margin:0 }
  .quote-checklist li::marker { color:var(--accent) }
  .quote-guidance { color:#000; font-size:1.125rem; line-height:1.4 }
  .panel { min-width:0; padding:14px; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper) }
  .note { padding:11px 13px; border-left:3px solid #b78d31; background:#fff7e4 }
  .note.success { border-color:var(--success); background:#edf5ed; color:#203d2b }
  .form-section { display:grid; gap:12px }
  .form-section + .form-section { padding-top:16px; border-top:1px solid var(--line) }
  .field-with-help { position:relative; display:grid; gap:6px; min-width:0 }
  .field-with-help > .field { margin-inline-end:50px }
  .field-help > summary { display:flex; align-items:center; gap:6px; width:fit-content; min-height:44px; color:var(--accent); font-size:.875rem; font-weight:700; cursor:pointer; list-style:none }
  .field-help > summary::-webkit-details-marker { display:none }
  .field-help > summary span { display:inline-grid; place-items:center; width:24px; height:24px; border:1px solid var(--line); border-radius:50%; background:var(--wash) }
  .field-help[open] > summary span { border-color:var(--accent); background:var(--green-tint,#fff4dc) }
  .field-with-help > .field-help > summary { position:absolute; top:1.55rem; inset-inline-end:0; justify-content:center; width:44px }
  .field-help p { padding:8px 10px; border-left:2px solid var(--accent); background:var(--wash); color:var(--muted); font-size:.875rem }
  .county-fieldset { display:grid; gap:10px; padding-top:12px; border-top:1px solid var(--line) }
  .selected-counties { display:flex; flex-wrap:wrap; align-content:start; gap:6px; max-height:150px; overflow:auto; padding:6px; border:1px solid var(--line); border-radius:7px }
  .county-chip { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:4px 9px 4px 11px; border:1px solid var(--line); border-radius:6px; background:var(--wash); color:var(--ink); font-size:.875rem }
  .county-chip:hover { border-color:var(--accent) }
  .county-chip .remove-mark { color:var(--accent); font-size:1.15rem }
  .county-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr)); gap:0 12px; max-height:220px; overflow:auto; margin-top:6px; padding:0 4px }
  label.field { display:grid; gap:5px; align-content:start; min-width:0; font-size:.9rem; font-weight:710 }
  input:not([type=checkbox]),select,textarea {
    width:100%; min-width:0; min-height:46px; padding:8px 9px;
    border:1px solid #ada597; border-radius:6px; color:var(--ink); background:white; font-size:16px;
  }
  textarea { min-height:84px; resize:vertical }
  form [aria-invalid="true"] { border-color:#a12622 }
  form label:has(> [aria-invalid="true"]), form [aria-invalid="true"] > legend { color:#96231f }
  form input[type="checkbox"][aria-invalid="true"] { outline:2px solid #a12622; outline-offset:2px }
  .field-error { color:#96231f; font-size:.875rem; font-weight:650 }
  .note[data-installer-error] { border-color:#a12622; color:#96231f; background:#fff2f1 }
  fieldset { margin:0; min-width:0; border:0; padding:0 }
  legend { margin-bottom:4px; padding:0; font-weight:780 }
  .choices { display:grid; gap:0 }
  label.check { display:flex; align-items:center; gap:9px; min-height:44px; padding:6px 2px; cursor:pointer }
  label.check input { width:19px; height:19px; accent-color:#714a16; flex:none; margin:0 }
  .measurement-opt-in, .measurement-opt-in label.check { color:#000; font-weight:700 }
  .measurement-opt-in p { margin:0 0 0 30px }
  .scope-list > .check { border-bottom:1px solid var(--line) }
  .scope-list > .check:last-child { border-bottom:0 }
  .sub-options { margin:3px 0 6px; padding:9px 10px 6px; background:var(--wash); border-radius:7px }
  .sub-options .choices { gap:0 8px }
  .sub-options .check { font-size:.87rem }
  #step-count { padding:7px 0 10px }
  .record {
    display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%;
    min-height:55px; padding:9px 1px; border:0; background:none; color:var(--ink); text-align:left;
  }
  .record strong,.record .small { display:block }
  .record .chevron { color:var(--accent); flex:none; font-size:1.3rem }
  .records > * + * { border-top:1px solid var(--line) }
  .product-main-photo { width:100%; aspect-ratio:4/3; object-fit:contain; background:#ece8e1; }
  .product-photos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px; }
  .product-tile { position:relative; display:block; min-width:0; border:0; padding:0; background:white; color:var(--ink); text-align:left; }
  .product-tile img { width:100%; aspect-ratio:4/3; object-fit:cover; }
  .product-tile span { position:absolute; inset:auto 4px 4px; background:var(--paper); padding:5px 7px; font-size:.78rem; font-weight:750; }
  .real-houses-link span { background:var(--gold); }
  .product-price { color:var(--accent); font-size:1.9rem; }
  details.row > summary { min-height:44px; display:flex; align-items:center; gap:8px; cursor:pointer; font-weight:720; list-style:none }
  details.row > summary::-webkit-details-marker { display:none }
  details.row > summary::after { content:'+'; margin-left:auto; font-size:1.15rem; color:var(--accent) }
  details.row[open] > summary::after { content:'−' }
  .row-content { padding-bottom:8px }
  .pairs { padding-block:6px }
  .pairs div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:8px; padding:4px 0; font-size:.875rem }
  .pairs dt { color:var(--muted) }
  .pairs dd { margin:0; font-weight:700; overflow-wrap:anywhere }
  .installer { display:grid; gap:5px; align-content:start }
  .completed-jobs { color:#7a1f2b }
  .installer > .check { border-top:1px solid var(--line); color:#7a1f2b; font-weight:730 }
  .installer:has(input:checked) { border-color:#a87926 }
  .installer .action-row .btn { flex:1 1 auto }
  .installer-details { border-top:1px solid var(--line); padding-top:10px }
  .installer-details h3 { margin-bottom:4px; font-size:.95rem }
  .installer-contacts { align-items:start }
  .installer-contact { display:grid; gap:12px; box-shadow:0 2px 5px #211e1909 }
  .installer-contact-heading { display:grid; justify-items:start; gap:6px; padding-bottom:10px; border-bottom:1px solid var(--line) }
  .installer-contact-heading h3 { font-size:1.12rem; line-height:1.25 }
  .installer-contact-actions { display:grid; gap:2px; min-width:0 }
  .installer-contact .contact-call { justify-content:flex-start }
  .installer-contact .contact-email { display:flex; align-items:center; min-height:44px; font-size:.875rem; overflow-wrap:anywhere }
  .installer-contact .links { gap:2px 10px; border-top:1px solid var(--line) }
  .installer-contact .links a { font-size:.8rem }
  .installer-contact .pill.attention { color:#6b4517; background:#fff2d4 }
  .contact-portfolio { display:grid; grid-template-columns:76px minmax(0,1fr); align-items:center; gap:10px; padding:6px; border:1px solid var(--line); border-radius:7px; background:var(--wash); color:var(--ink); text-align:left; font-size:.875rem; font-weight:730 }
  .contact-portfolio:hover { border-color:var(--accent) }
  .contact-portfolio img { width:76px; height:52px; object-fit:cover; border-radius:4px }
  .next-checklists > .panel { align-content:start }
  .pill { display:inline-block; width:fit-content; padding:3px 7px; border-radius:4px; background:#eeeae1; font-size:.78rem; font-weight:750 }
  .pill.green { color:#254c37; background:#e8f1e9 }
  .sticky {
    position:sticky; bottom:0; z-index:2; display:flex; align-items:center; gap:8px;
    padding:9px 0 max(9px,env(safe-area-inset-bottom)); background:var(--wash);
  }
  .sticky .btn { flex:none }
  .quote-sharing { flex:1; color:#000 }
  .pair-photos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px }
  .pair-photos.single-photo { grid-template-columns:minmax(0,1fr) }
  .pair-photos button { padding:0; overflow:hidden; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:white; text-align:left; font-weight:700 }
  .pair-photos img { aspect-ratio:1.7; object-fit:cover }
  .pair-photos.installed-views { align-items:start }
  .pair-photos.installed-views img { aspect-ratio:auto; object-fit:contain }
  .pair-photos span { display:block; padding:5px 8px }
  .workspace-nav { display:flex; flex-wrap:wrap; gap:2px 12px; border-bottom:1px solid var(--line); margin-bottom:14px }
  .workspace-nav button { min-height:44px; padding:0 4px; background:none; border:0; border-bottom:2px solid transparent; color:var(--muted); font-size:.875rem; font-weight:750 }
  .workspace-nav button[aria-current=page] { color:var(--ink); border-bottom-color:#a77528 }
  .workspace-nav + * { margin-top:0 }
  .workspace-title { align-items:baseline }
  .section-title { margin-bottom:9px }
  .inline-actions { display:flex; flex-wrap:wrap; gap:8px }
  .inline-actions > * { flex:1 1 auto }
  .performance { padding:8px 12px }
  .count { flex:none; min-width:1.5em; text-align:center; font-weight:760; color:var(--muted) }
  footer { color:#ded8cd; background:var(--ink); padding:16px 0; font-size:.8rem }
  footer .wrap { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 12px }
  dialog { width:min(560px,100% - 24px); max-height:90dvh; overflow:auto; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); color:var(--ink); padding:14px; box-shadow:0 12px 48px #211e194d }
  dialog > div { display:grid; gap:10px }
  dialog::backdrop { background:#211e19a6 }
  dialog img { max-height:70dvh; object-fit:contain }
  dialog ul { margin-block:0; padding-left:22px }
  dialog .section-head { flex-wrap:nowrap }
  [hidden] { display:none !important }
  .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0 }
  @media (width < 550px) {
    #landing-title { font-size:clamp(1.125rem,6.4vw,1.75rem) }
    .landing-basics { font-size:1rem; text-wrap:pretty }
  }
  @media (min-width:550px) {
    .wrap { width:min(100% - 48px,960px) }
    .page { padding-block:24px 45px }
    .panel { padding:16px }
    .home-actions { grid-template-columns:repeat(2,minmax(0,1fr)) }
    .responsibility-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
    .mobile-stack { grid-template-columns:repeat(2,minmax(0,1fr)) }
    .form-submit { width:auto; justify-self:start }
    .mode .wrap { grid-template-columns:repeat(2,110px) }
    .product-photos { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .workspace-nav { gap:4px 20px }
  }
  @media (min-width:800px) {
    .three { grid-template-columns:repeat(3,minmax(0,1fr)) }
    .split { grid-template-columns:minmax(0,3fr) minmax(0,2fr); align-items:start }
    .landing { gap:30px }
    .landing-hero { padding-block:16px 24px }
    .landing-hero p { max-width:none }
    .landing-steps { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px }
  }
  .beta-note { background:var(--wash); border-bottom:1px solid var(--line); padding:8px 0; color:var(--ink); font-size:.875rem }
  .workspace-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px }
  .workspace-toolbar .workspace-nav { flex:1 1 14rem; margin:0 }
  .workspace-toolbar > .btn { flex:none }
  .workspace-card,.workspace-photos figure { min-width:0; margin:0 }
  .workspace-card h3,.workspace-root .pairs dd { overflow-wrap:anywhere }
  .workspace-job-flooring { overflow-wrap:anywhere }
  .flooring-matches { display:grid; gap:5px; max-height:14rem; overflow-y:auto; padding:3px }
  .flooring-matches .btn { justify-content:flex-start; text-align:left; white-space:normal }
  .workspace-photos img { max-height:24rem; object-fit:contain; background:var(--wash) }
  .workspace-root .note > .text-btn { color:inherit; font-weight:700; text-decoration:underline }
  .page:has(.workspace-root) > .intro h1 {
    font-size:clamp(1.85rem, 5vw, 3.1rem); line-height:1.1; overflow-wrap:anywhere;
  }
  .workspace-activity dl {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px;
    background:var(--line); border:1px solid var(--line); border-radius:8px; overflow:hidden; margin:0;
  }
  .workspace-activity dl > div { display:flex; flex-direction:column-reverse; gap:4px; padding:12px; background:var(--card,#fff); }
  .workspace-activity dt { font-size:.875rem; }
  .workspace-activity dd { margin:0; font-weight:800; font-size:1.55rem; line-height:1.1; }
  @media (min-width:660px) {
    .workspace-activity dl { grid-template-columns:repeat(4,minmax(0,1fr)); }
  }
}
