/* A quiet control on the same ground as the existing composition. */
/* The held results theme sets important button styles in its cascade layers. */
@layer surface-frame {
  html[data-material] body button:is(.sf-open,.sf-dismiss) {
    background:transparent!important; border:0!important; box-shadow:none!important;
    color:#69645c!important; text-shadow:none!important; transform:none!important;
  }
  html[data-material] body button:is(.sf-open,.sf-dismiss):hover { color:#38352f!important; }
}
button.sf-open, dialog button.sf-open, #surface-frame button.sf-open {
  appearance:none; border:0; box-shadow:none; background:transparent; color:#69645c;
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  flex:none; box-sizing:border-box; pointer-events:auto; cursor:pointer; margin:0; padding:0;
  font:400 12px/1.25 Inter,system-ui,sans-serif; letter-spacing:normal; text-transform:none;
}
button.sf-mark, dialog button.sf-mark, #surface-frame button.sf-mark { width:40px; height:40px; min-height:40px; }
button.sf-mark > span { display:grid; place-items:center; box-sizing:border-box; width:14px; height:14px; border-radius:50%; border:1px solid currentColor; font:600 10px/1 Georgia,serif; }
button.sf-open:hover,dialog button.sf-open:hover { color:#38352f; }
.sf-controls { display:inline-flex; width:fit-content; align-items:center; gap:3px; pointer-events:auto; }
.sf-controls a.sf-contact {
  display:inline-flex; align-items:center; min-height:40px; margin:0; padding:0 3px 0 0;
  font:450 12px/1.4 Inter,system-ui,sans-serif; color:#524d45; letter-spacing:normal;
  text-decoration:underline; text-decoration-thickness:1px; text-decoration-color:#aaa296; text-underline-offset:3px;
}
.sf-controls a.sf-contact:hover { color:#37342e; text-decoration-color:currentColor; }
.sf-foot { position:relative; z-index:4; height:0; padding:0; margin:0; border:0; background:transparent; pointer-events:none; }
.sf-foot>.sf-controls { position:absolute; left:clamp(24px,4.8vw,74px); top:-12px; }
body[data-screen=product] .review-tools:has(.round-review) { justify-content:center; }
body.first-visit .sf-foot { width:min(1256px,calc(100% - 108px)); height:52px; margin-inline:auto; }
body.first-visit .sf-foot>.sf-controls { top:0; left:0; }
body .sf-foot:has(.sf-company-details) { width:min(1256px,calc(100% - 30px)); height:auto; margin-inline:auto; padding:0 0 12px; }
body .sf-foot:has(.sf-company-details)>.sf-controls { position:static; }
.sf-company-details { margin:4px 0 0; color:#51483c; font:400 11px/1.5 Inter,system-ui,sans-serif; }
.sf-open:focus-visible,.sf-contact:focus-visible,.sf-sheet :focus-visible { outline:2px solid #82583b; outline-offset:2px; border-radius:3px; }
#terms-link { display:inline-block; }
dialog:not(.sf-sheet)>.sf-controls { display:flex; margin:8px auto 0 0; }
/* The new row adds 48px. Keep the original content of a centered dialog
   in place, using only the space below it that its viewport limit allows. */
#surface-dialog { --sf-dialog-edge:18px; }
#review-boundary { --sf-dialog-edge:20px; }
#rate-dialog { --sf-dialog-edge:7.5vh; }
:is(#surface-dialog,#review-boundary,#rate-dialog):has(>.sf-controls) {
  translate:0 clamp(0px, calc(50dvh - 50% - var(--sf-dialog-edge)), 24px);
}
#surface-frame>.sf-controls { flex-direction:column; gap:0; margin-inline:auto; }
#surface-frame>.sf-controls .sf-contact { padding:0; }
.work-tabs>.sf-controls { margin-inline-start:auto; }
@media(max-width:760px) {
  #surface-frame>.sf-controls { flex-direction:row; gap:3px; }
}
dialog.sf-sheet {
  box-sizing:border-box; position:fixed; inset:0 auto auto 0; margin:0;
  width:min(328px,calc(100vw - 24px)); max-width:calc(100vw - 24px);
  height:auto; max-height:calc(100dvh - 24px); overflow:auto; overscroll-behavior:contain;
  padding:20px 22px; color:#403e38; background:#f5f1e8; border:1px solid #d4cec1; border-radius:12px;
  box-shadow:0 8px 28px -12px #42392c55,0 2px 5px rgb(81 71 51 / 7%);
  font:400 13px/1.45 Inter,system-ui,sans-serif; text-align:left;
}
#contact-details { width:min(236px,calc(100vw - 24px)); }
dialog.sf-sheet::backdrop { background:transparent; backdrop-filter:none; }
.sf-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
dialog.sf-sheet .sf-heading h2 { margin:0; font:550 19px/1.2 Inter,system-ui,sans-serif; letter-spacing:-.04em; color:#37362f; }
.sf-heading button.sf-dismiss { display:grid; place-items:center; min-width:36px; height:36px; min-height:0; padding:0; margin:-8px -8px -6px 0; border:0; background:none; box-shadow:none; color:#625b50; font:400 20px/1 Inter,system-ui,sans-serif; cursor:pointer; }
dialog.sf-sheet p,dialog.sf-sheet address { font:inherit; color:inherit; margin:0; }
dialog.sf-sheet p.sf-company { margin-top:12px; font-weight:600; }
dialog.sf-sheet .sf-jurisdiction { margin-top:10px; color:#655f55; font-size:11px; line-height:1.45; }
dialog.sf-sheet a { color:#51483c; text-decoration:underline; text-decoration-thickness:1px; text-decoration-color:#b2a591; text-underline-offset:3px; font:inherit; }
dialog.sf-sheet a:hover { color:#783e20; text-decoration-color:currentColor; }
dialog.sf-sheet .sf-email { display:inline-flex; align-items:center; min-height:34px; margin-top:5px; }
.sf-register { display:grid; grid-template-columns:94px minmax(0,1fr); column-gap:12px; row-gap:8px; align-items:baseline; margin:10px 0; font-size:12px; line-height:1.45; }
.sf-register dt { color:#686155; }
.sf-register dd { margin:0; }
.sf-links { display:flex; gap:18px; align-items:center; }
.sf-links a { display:inline-flex; align-items:center; min-height:32px; }
.sf-notice { border-top:1px solid #d9d2c6; margin-top:7px; padding-top:12px; }
dialog.sf-sheet .sf-notice h3 { font:550 12px/1.4 Inter,system-ui,sans-serif; letter-spacing:normal; margin:0 0 4px; }
dialog.sf-sheet .sf-notice p { color:#645e54; font-size:12px; line-height:1.5; }
@media(max-width:760px) {
  body.first-visit .sf-foot { width:calc(100% - 30px); }
}
/* A figure still being written: the same block, with the same bounds, as the
   figure that replaces it. The figure's text is hidden, and a soft bar is drawn
   across its first 4.6em only, so nothing on the card moves when it lands. */
.route .rate-pending, .route .rate-pending * { color: transparent }
.route .rate-pending { background: linear-gradient(90deg, rgb(123 108 85 / .08), rgb(123 108 85 / .16), rgb(123 108 85 / .08)) 0 0 / 4.6em 100% no-repeat; border-radius: 10px; animation: rate-pending 1.6s ease-in-out infinite alternate }
@keyframes rate-pending { to { opacity: .45 } }
@media (prefers-reduced-motion: reduce) { .route .rate-pending { animation: none } }
.motion-paused .route .rate-pending { animation: none }

/* The analysis stopped after the results began: a notice at the foot of the
   screen, outside the results, so nothing on the page moves. */
.rate-stopped { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 8000; max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 12px 18px; border-radius: 14px; background: #f3e2c4; color: #4a3b26; font: 500 14px/1.45 Inter, system-ui, sans-serif; box-shadow: 0 6px 24px rgb(74 59 38 / .14) }

body:has(.rate-stopped) .sf-foot { margin-bottom:calc(var(--sf-alert-height, 0px) + 40px); }
.rate-coming { padding: 28px 32px 32px }
.rate-coming .analysis-copy { font-size: 18px; line-height: 1.65; color: var(--m-muted); max-width: 510px; margin: 0 }
.rate-coming .analysis-status { display: flex; align-items: center; gap: 18px; margin-top: 28px; font-size: 14px }
.rate-coming .analysis-track { max-width: 480px; height: 4px; overflow: hidden; margin-top: 18px; border-radius: 8px; background: #d8d4ca; box-shadow: inset 1px 1px 2px #a29b8c66, 0 1px 0 #fffdf5b3 }
.rate-coming .analysis-track > span { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, transparent, #ce9973, transparent); animation: rate-coming-pass 4.2s ease-in-out infinite }
@keyframes rate-coming-pass { 0% { transform: translateX(-110%) } 100% { transform: translateX(345%) } }
@media (prefers-reduced-motion: reduce) { .rate-coming .analysis-track > span { animation: none; transform: translateX(70%) } }
.motion-paused .rate-coming .analysis-track > span { animation: none; transform: translateX(70%) }
@media (max-width: 600px) { .rate-coming { padding: 22px 20px 24px } .rate-coming .analysis-copy { font-size: 17px } }
