.sq-dialog[hidden] { display: none !important; }
.sq-dialog { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; font-family: Inter, Arial, Helvetica, sans-serif; }
.sq-backdrop { position: absolute; inset: 0; background: rgba(10, 29, 47, .72); }
.sq-panel { position: relative; width: min(100%, 640px); max-height: min(92dvh, 850px); overflow: auto; overscroll-behavior: contain; border-radius: 10px; background: #fff; color: #192e41; box-shadow: 0 24px 70px rgba(4, 18, 33, .35); }
.sq-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 26px 14px; background: #fff; border-bottom: 1px solid #e7eef3; }
.sq-eyebrow { color: #287ca9; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
.sq-title { margin: 4px 0 3px; font-family: 'Instrument Serif', Georgia, serif; font-size: clamp(32px, 5vw, 40px); line-height: 1.05; font-weight: 400; }
.sq-subtitle { margin: 0; color: #526575; font-size: 15px; line-height: 1.45; }
.sq-close { flex: none; width: 44px; height: 44px; border: 1px solid #d9e4eb; border-radius: 7px; color: #1b344a; background: #f7fafc; font-size: 26px; line-height: 1; cursor: pointer; }
.sq-form { padding: 19px 26px 26px; }
.sq-group { margin: 0 0 20px; padding: 0; border: 0; }
.sq-group legend, .sq-label { display: block; margin-bottom: 9px; color: #192e41; font-size: 16px; font-weight: 700; }
.sq-helper { display: block; margin-top: -5px; margin-bottom: 10px; color: #5a6b78; font-size: 13px; }
.sq-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.sq-option { position: relative; display: block; cursor: pointer; }
.sq-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sq-option span { display: flex; align-items: center; min-height: 52px; padding: 10px 13px; border: 2px solid #d6e3e9; border-radius: 8px; background: #fff; color: #263e51; font-size: 15px; font-weight: 600; line-height: 1.25; transition: border-color .15s, background .15s; }
.sq-option input:checked + span { border-color: #2679a6; background: #e9f5fb; color: #164b6b; }
.sq-option input:focus-visible + span { outline: 3px solid #e8b346; outline-offset: 2px; }
.sq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 16px; }
.sq-field { display: block; min-width: 0; }
.sq-field span { display: block; margin-bottom: 7px; color: #192e41; font-size: 15px; font-weight: 700; }
.sq-field input, .sq-field select, .sq-field textarea { display: block; width: 100%; min-height: 50px; box-sizing: border-box; padding: 11px 12px; border: 1.5px solid #b7c9d3; border-radius: 8px; background: #fff; color: #152c3e; font: inherit; font-size: 16px; }
.sq-field textarea { min-height: 76px; resize: vertical; }
.sq-field input:focus, .sq-field select:focus, .sq-field textarea:focus { outline: 3px solid #d6ecf6; border-color: #2679a6; }
.sq-optional { color: #637682; font-size: 13px; font-weight: 400; }
.sq-error { margin: 0 0 12px; color: #a52330; font-size: 14px; font-weight: 700; }
.sq-submit, .sq-contact-card button { display: block; width: 100%; min-height: 54px; padding: 11px 20px; border: 0; border-radius: 8px; background: #2175a4; color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.sq-city { margin-bottom: 15px; }
.sq-extra { margin-bottom: 18px; border-top: 1px solid #e2e9ed; border-bottom: 1px solid #e2e9ed; }
.sq-extra summary { min-height: 50px; display: flex; align-items: center; gap: 5px; color: #1a5f82; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.sq-extra summary::-webkit-details-marker { display: none; }
.sq-extra summary::after { content: '+'; margin-left: auto; font-size: 23px; font-weight: 400; line-height: 1; }
.sq-extra[open] summary::after { content: '−'; }
.sq-extra summary span { color: #596e7b; font-weight: 400; }
.sq-extra summary:focus-visible { outline: 3px solid #e8b346; outline-offset: -3px; }
.sq-extra-fields { display: grid; gap: 15px; padding: 0 0 17px; }
.sq-submit:hover, .sq-contact-card button:hover { background: #165e88; }
.sq-submit:disabled { opacity: .65; cursor: wait; }
.sq-note { margin: 11px 0 0; color: #637682; text-align: center; font-size: 13px; }
.sq-success { padding: 32px 26px 38px; text-align: center; }
.sq-success h3 { margin: 0 0 10px; font: normal 30px Georgia, serif; }
.sq-success p { margin: 0 0 22px; color: #526575; line-height: 1.5; }
.sq-success button { padding: 12px 26px; border: 1px solid #bed3e0; border-radius: 10px; background: #edf7fb; color: #155c83; font-size: 16px; font-weight: 700; cursor: pointer; }
.sq-enhanced main form[name="contact"] { display: none !important; }
.sq-contact-card { border: 1px solid #d7e5eb; border-radius: 16px; padding: 28px; background: #f5fafc; }
.sq-contact-card h2 { margin: 0 0 8px; font: normal 27px Georgia, serif; color: #192e41; }
.sq-contact-card p { margin: 0 0 20px; color: #526575; font-size: 16px; line-height: 1.5; }
.sq-contact-card a { display: block; margin-top: 16px; color: #17638b; text-align: center; font-size: 16px; font-weight: 700; }
@media (max-width: 600px) {
  .sq-dialog { align-items: end; padding: 0; }
  .sq-panel { width: 100%; max-height: 96dvh; border-radius: 10px 10px 0 0; }
  .sq-head { padding: 19px 18px 13px; }
  .sq-form { padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); }
  .sq-grid { grid-template-columns: 1fr; }
  .sq-contact-card { padding: 20px; }
}
@media (prefers-reduced-motion: no-preference) { .sq-panel { animation: sq-enter .18s ease-out; } @keyframes sq-enter { from { opacity: .7; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } }

.sq-general { padding: 26px; border: 1px solid #d8e4ea; border-radius: 12px; background: #fff; box-shadow: 0 14px 36px rgba(19, 45, 62, .04); }
.sq-general h2 { margin: 0 0 8px; color: #192e41; font: normal 30px/1.2 Georgia, serif; }
.sq-general > p { margin: 0 0 22px; color: #526575; font: 16px/1.6 Arial, sans-serif; }
.sq-general .sq-field { margin-bottom: 16px; }
.sq-general .sq-submit { max-width: 270px; }
.sq-general .sq-success { padding: 25px 0; text-align: left; }
@media(max-width:600px) { .sq-general { padding: 20px; } .sq-general .sq-submit { max-width: none; } }

/* A quieter, easier-to-scan quote sheet. */
.sq-dialog { padding: 22px; }
.sq-backdrop { background: rgba(6, 24, 38, .76); backdrop-filter: blur(3px); }
.sq-panel { width: min(100%, 680px); max-height: min(92dvh, 900px); border: 1px solid rgba(255,255,255,.3); border-radius: 12px; box-shadow: 0 32px 90px rgba(5, 22, 35, .32); }
.sq-head { padding: 26px 30px 21px; background: #f5f9fb; border-bottom: 1px solid #dde8ee; }
.sq-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #246b8f; font-size: 11px; letter-spacing: .11em; }
.sq-eyebrow::before { content: ''; width: 18px; height: 2px; background: #4a9bc2; }
.sq-title { margin: 8px 0 7px; font-family: Inter, Arial, sans-serif; font-size: clamp(28px, 4vw, 35px); font-weight: 650; letter-spacing: -.055em; line-height: 1.07; }
.sq-subtitle { max-width: 45ch; font-size: 14px; line-height: 1.5; }
.sq-close { width: 42px; height: 42px; background: #fff; border-color: #d2e0e8; border-radius: 6px; font-size: 25px; transition: background .15s, border-color .15s; }
.sq-close:hover { background: #eaf3f7; border-color: #9bc2d5; }
.sq-form { padding: 25px 30px 28px; }
.sq-group { margin-bottom: 24px; }
.sq-group + .sq-group { padding-top: 21px; border-top: 1px solid #e5edf1; }
.sq-group legend, .sq-label { margin-bottom: 7px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.sq-helper { margin: -2px 0 12px; font-size: 13px; }
.sq-options { gap: 9px; }
.sq-option span { min-height: 56px; padding: 12px 14px; border: 1.5px solid #cfdee6; border-radius: 6px; font-size: 15px; font-weight: 600; transition: border-color .18s, background .18s, box-shadow .18s; }
.sq-option span::after { content: ''; flex: none; width: 18px; height: 18px; margin-left: auto; border: 1.5px solid #bfd1dc; border-radius: 50%; }
.sq-option:has(input[type="checkbox"]) span::after { border-radius: 4px; }
.sq-option:hover span { border-color: #79a8c1; background: #f8fbfd; }
.sq-option input:checked + span { border-color: #237aa6; background: #eff8fc; box-shadow: inset 3px 0 #237aa6; color: #174c69; }
.sq-option input:checked + span::after { content: '✓'; display: grid; place-items: center; border-color: #237aa6; background: #237aa6; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.sq-grid { gap: 12px; }
.sq-field span { font-size: 14px; font-weight: 650; }
.sq-field input, .sq-field select, .sq-field textarea { min-height: 52px; border: 1.5px solid #bdcfd9; border-radius: 6px; background: #fcfefe; }
.sq-field input::placeholder, .sq-field textarea::placeholder { color: #71838f; }
.sq-extra { margin-top: 21px; border-color: #e1eaf0; }
.sq-extra summary { color: #195c80; }
.sq-submit { min-height: 56px; border-radius: 6px; background: #176b98; font-size: 16px; letter-spacing: -.01em; transition: background .18s, transform .18s; }
.sq-submit:hover { background: #105777; transform: translateY(-1px); }
.sq-note { margin-top: 13px; line-height: 1.5; }
.sq-note a { color: #125f88; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.sq-success h3 { font: 650 29px/1.15 Inter, Arial, sans-serif; letter-spacing: -.04em; }
.sq-success button { border-radius: 6px; }
@media (max-width: 600px) {
  .sq-dialog { align-items: end; padding: 0; }
  .sq-panel { width: 100%; max-height: 96dvh; border-radius: 12px 12px 0 0; }
  .sq-head { padding: 20px 20px 17px; }
  .sq-title { font-size: 29px; }
  .sq-subtitle { font-size: 13px; }
  .sq-form { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
  .sq-option span { min-height: 58px; padding: 10px 11px; font-size: 14px; }
  .sq-option span::after { width: 16px; height: 16px; }
  .sq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) { .sq-options { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sq-submit, .sq-option span { transition: none; } .sq-submit:hover { transform: none; } }

.sq-address { margin: 0 0 17px; }
.sq-address input { scroll-margin-top: 95px; }

/* Phone-sized quote sheets keep every choice easy to read and tap. */
@media (max-width: 600px) {
  .sq-panel { max-height: calc(100dvh - 10px); scroll-padding-top: 125px; }
  .sq-head { gap: 9px; }
  .sq-subtitle { font-size: 15px; line-height: 1.45; }
  .sq-close { width: 46px; height: 46px; }
  .sq-group legend { font-size: 17px; }
  .sq-helper, .sq-note { font-size: 14px; }
  .sq-option span { min-height: 68px; font-size: 15px; line-height: 1.3; }
  .sq-field span { font-size: 15px; }
  .sq-field input, .sq-field select, .sq-field textarea { min-height: 54px; font-size: 16px; }
  .sq-field input, .sq-field select, .sq-field textarea { scroll-margin-top: 130px; }
  .sq-submit { min-height: 58px; }
}
@media (max-width: 380px) {
  .sq-head { padding: 17px 16px 15px; }
  .sq-form { padding-right: 16px; padding-left: 16px; }
  .sq-options { grid-template-columns: 1fr; }
  .sq-option span { min-height: 54px; }
}
@media (max-width: 600px) and (max-height: 620px) {
  .sq-head { padding-top: 12px; padding-bottom: 11px; }
  .sq-eyebrow { display: none; }
  .sq-title { margin-top: 0; font-size: 25px; }
}
