/* Northern Lights — "See your home lit" designer (design.html). Uses tokens from styles.css. */
.ds-page { background: var(--navy); color: #fff; overflow-x: hidden; }
.ds-page .top { position: relative; color: #fff; }
.ds-page .nav a { color: #fff; }

/* Intro */
.ds-intro { max-width: var(--wrap); margin: 0 auto; padding: 6px 28px 18px; }
.ds-intro h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 900; line-height: .92; margin: 0 0 .25em; text-shadow: 0 0 36px rgba(255,196,107,.3); }
.ds-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; color: var(--ice); }
.ds-steps li { display: flex; align-items: center; gap: 8px; }
.ds-steps b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bulb); color: var(--navy); font-size: .85rem; box-shadow: 0 0 14px rgba(255,196,107,.55); }

/* Layout */
.ds-app { max-width: var(--wrap); margin: 0 auto; padding: 0 28px 72px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.ds-stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 240px; background: #050C22; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
.ds-stage canvas { display: block; max-width: 100%; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.is-edit .ds-stage canvas { cursor: crosshair; }
.ds-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ice); font-weight: 600; }
.ds-loading[hidden] { display: none; }
.ds-toast { position: absolute; z-index: 2; left: 50%; top: 10px; transform: translateX(-50%); max-width: calc(100% - 24px); width: max-content; margin: 0; padding: 9px 16px; border-radius: 999px; background: rgba(10,26,51,.92); color: #fff; font-weight: 600; font-size: .92rem; line-height: 1.3; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); border: 1px solid rgba(255,196,107,.45); pointer-events: none; }
.ds-toast[hidden] { display: none; }

/* Start: one big button */
.ds-start { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 26px 24px; background: var(--navy-2); border-radius: 18px; }
.is-edit .ds-start { display: none; }
.ds-add { position: relative; gap: 10px; width: 100%; min-height: 64px; font-size: 1.15rem; cursor: pointer; }
.ds-add svg { width: 24px; height: 24px; flex: none; }
.ds-add:focus-within { outline: 3px solid #fff; outline-offset: 3px; }
.ds-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.ds-link { align-self: center; background: none; border: 0; color: #fff; font: 600 1rem var(--body); text-decoration: underline; text-underline-offset: 4px; padding: 10px 12px; cursor: pointer; min-height: 44px; }
.ds-link:hover { color: var(--bulb); }
.ds-privacy { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--ice); font-size: .95rem; }
.ds-privacy svg { width: 18px; height: 18px; flex: none; color: var(--aurora); }
.ds-tip { margin: 0; color: var(--ice); font-size: .88rem; opacity: .8; }

/* Dock (side panel on desktop, bottom sheet on phones) */
.ds-dock { background: var(--navy-2); border-radius: 18px; padding: 16px; display: none; }
.is-edit .ds-dock { display: block; }
.ds-hint { margin: 0 0 10px; font-size: .95rem; line-height: 1.35; color: var(--ice); min-height: 2.7em; }
.ds-row-a { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.has-send .ds-ctx { order: -1; flex: 1 1 100%; display: grid; grid-template-columns: 1fr 1fr; }
.has-send .ds-send { grid-column: 1 / -1; order: -1; }
.ds-ctx { flex: 1; display: flex; gap: 8px; min-width: 0; }
.ds-ctx > * { flex: 1; min-width: 0; }
.ds-ctx [hidden] { display: none; }
.ds-flip, .ds-send { min-height: 52px; padding: 0 14px; white-space: nowrap; }
.ds-flip.is-first { animation: ds-glow 1.8s ease-in-out infinite; }
@keyframes ds-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,196,107,.0); } 50% { box-shadow: 0 0 26px 4px rgba(255,196,107,.65); } }
.ds-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 2px solid rgba(255,255,255,.5); background: transparent; color: #fff; font: 700 .98rem var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; position: relative; }
.ds-btn:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.ds-btn:disabled { opacity: .4; cursor: default; }
.ds-btn-strong { border-color: var(--bulb); color: var(--bulb); min-height: 52px; }
.ds-danger { border-color: rgba(255,120,120,.6); color: #FFB3B3; margin-top: 10px; }
.ds-icon-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.ds-icon-btn svg { width: 22px; height: 22px; }
.ds-icon-btn[hidden] { display: none; }
.ds-icon-btn:disabled { opacity: .35; cursor: default; }

/* Light switch: the homepage wall plate, small */
.ds-switch { flex: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 2px 6px 2px 2px; background: none; border: 0; border-radius: 12px; color: #fff; font: 700 .9rem var(--body); cursor: pointer; }
.ds-plate { width: 32px; height: 50px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(160deg, #FFFFFF, #E4E9EE 70%, #D3DAE1); box-shadow: 0 1px 0 #fff inset, 0 6px 14px rgba(0,0,0,.35); transition: box-shadow .4s; }
.ds-slot { position: relative; width: 14px; height: 30px; border-radius: 4px; background: #C9D1D9; box-shadow: inset 0 1px 3px rgba(0,0,0,.3); }
.ds-rocker { position: absolute; left: 2px; right: 2px; top: 15px; height: 13px; border-radius: 3px; background: linear-gradient(180deg, #FFFFFF, #E9EDF1); box-shadow: 0 2px 3px rgba(0,0,0,.3); transition: top .18s cubic-bezier(.3,1.6,.6,1); }
.ds-switch[aria-checked="true"] .ds-rocker { top: 2px; box-shadow: 0 -2px 3px rgba(0,0,0,.2); }
.ds-switch[aria-checked="true"] .ds-plate { box-shadow: 0 1px 0 #fff inset, 0 0 18px rgba(255,196,107,.75); }
.ds-switch[aria-checked="true"] .ds-switch-label { color: var(--bulb); }

/* Tabs: phones only */
.ds-tabs { display: none; }
.ds-h { font-size: 1.5rem; margin: 22px 0 10px; }
.ds-sub { margin: -4px 0 10px; color: var(--ice); font-size: .88rem; }

.ds-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ds-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 62px; padding: 6px 2px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: #fff; font: 600 .8rem/1.1 var(--body); cursor: pointer; }
.ds-tool svg { width: 24px; height: 24px; }
.ds-tool:hover { border-color: rgba(255,255,255,.45); }
.ds-tool[aria-pressed="true"] { border-color: var(--bulb); background: rgba(255,196,107,.16); color: var(--bulb); }

.ds-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-swatch { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 64px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.18); background: #081530; color: #fff; font: 600 .82rem/1.15 var(--body); text-align: left; cursor: pointer; }
.ds-swatch-art svg { width: 72px; height: 24px; display: block; }
.ds-swatch { position: relative; }
.ds-swatch[aria-checked="true"] { border-color: var(--bulb); background: rgba(255,196,107,.18); box-shadow: 0 0 0 2px var(--bulb) inset, 0 0 18px rgba(255,196,107,.35); }
.ds-swatch[aria-checked="true"]::after { content: ''; position: absolute; top: 6px; right: 8px; width: 6px; height: 11px; border: solid var(--bulb); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.ds-perm-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(181,140,255,.14); border-left: 3px solid #B58CFF; color: #fff; font-size: .88rem; line-height: 1.35; }
.ds-perm-note[hidden] { display: none; }
.ds-swatch:disabled { opacity: .3; cursor: not-allowed; }
.ds-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ds-presets[hidden] { display: none; }
.ds-presets button { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; font: 600 .85rem var(--body); cursor: pointer; }
.ds-presets button[aria-checked="true"] { background: #fff; color: var(--navy); }
.ds-presets i { width: 22px; height: 8px; border-radius: 4px; display: inline-block; }
.ds-check { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; font-size: .95rem; min-height: 44px; cursor: pointer; }
.ds-check[hidden] { display: none; }
.ds-check input { width: 22px; height: 22px; accent-color: var(--bulb); }

.ds-range { display: grid; gap: 4px; margin-bottom: 12px; font-weight: 600; font-size: .95rem; }
.ds-range[hidden] { display: none; }
.ds-range input { width: 100%; min-height: 36px; accent-color: var(--bulb); }
.ds-more-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-file-btn { cursor: pointer; }
.ds-file-btn:focus-within { outline: 3px solid var(--bulb); outline-offset: 3px; }

.ds-foot { padding-bottom: 40px; }
.ds-noscript { text-align: center; padding: 20px; color: #fff; }

@media (min-width: 861px) { .is-edit .ds-stage { position: sticky; top: 12px; } }

/* Phones: canvas full width, tools in a bottom sheet */
@media (max-width: 860px) {
  .ds-page .top { padding: 10px 16px; }
  .ds-intro { padding: 4px 16px 14px; }
  .ds-intro h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .ds-steps { font-size: .92rem; gap: 6px 14px; }
  .is-edit .ds-intro { display: none; }
  .ds-app { display: block; padding: 0; }
  .ds-stage { border-radius: 0; min-height: 200px; box-shadow: none; }
  .is-edit .ds-main { padding-bottom: 0; }
  .ds-toast { font-size: .84rem; padding: 7px 14px; }
  .ds-start { border-radius: 0; background: transparent; padding: 18px 16px 30px; }
  .ds-dock { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; max-height: 58vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px 18px 0 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 30px rgba(0,0,0,.4); background: #0E2040; }
  .is-edit .ds-foot { display: none; }
  .ds-hint { font-size: .86rem; min-height: 0; margin-bottom: 8px; }
  .ds-tabs { display: flex; gap: 4px; margin: 10px 0 8px; padding: 3px; background: rgba(0,0,0,.25); border-radius: 999px; }
  .ds-tabs button { flex: 1; min-height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--ice); font: 700 .9rem var(--body); cursor: pointer; }
  .ds-tabs button[aria-selected="true"] { background: #fff; color: var(--navy); }
  .ds-panel { display: none; }
  .ds-panel.is-active { display: block; }
  .ds-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
  .ds-sub { margin: 0 0 8px; font-size: .82rem; }
  .ds-tool { min-height: 56px; font-size: .74rem; }
  .ds-swatches { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ds-swatch { flex-direction: row; align-items: center; min-height: 52px; gap: 8px; }
  .ds-swatch-art svg { width: 60px; height: 20px; }
}
@media (max-width: 400px) {
  .ds-switch { gap: 6px; font-size: .8rem; }
  .ds-flip, .ds-send { font-size: .95rem; padding: 0 10px; }
  .ds-btn { padding: 0 12px; font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-rocker, .ds-plate { transition: none; }
  .ds-flip.is-first { animation: none; }
}

/* ---- Instant quote sheet ---- */
.ds-quote-btn { white-space: nowrap; }
.qt { position: fixed; inset: 0; z-index: 70; display: grid; place-items: end center; background: rgba(4,12,30,.62); padding: 0; }
.qt[hidden] { display: none; }
.qt-open { overflow: hidden; }
.qt-card { position: relative; width: min(720px, 100%); max-height: 92svh; overflow-y: auto; background: #fff; color: var(--ink); border-radius: 22px 22px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0,0,0,.4); }
@media (min-width: 760px) { .qt { place-items: center; padding: 20px; } .qt-card { border-radius: 22px; padding: 32px; } }
.qt-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #EEF2F6; color: var(--navy); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.qt h2 { font-size: clamp(2rem, 7vw, 2.6rem); color: var(--navy); margin: 0 44px .2em 0; }
.qt-lede { color: var(--muted); margin-bottom: 16px; }
.qt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qt-grid label, .qt-width legend { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.qt-wide { grid-column: 1 / -1; }
.qt-opt { font-weight: 400; font-style: normal; color: var(--muted); }
.qt-grid input { font: 400 1rem var(--body); padding: 12px 14px; min-height: 50px; border: 2px solid #C9D6E2; border-radius: 10px; width: 100%; min-width: 0; color: var(--ink); background: #fff; }
.qt-grid input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(255,196,107,.6); }
.qt-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.qt-check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 6px; font-weight: 600; cursor: pointer; }
.qt-check input { width: 22px; height: 22px; flex: none; accent-color: var(--navy); margin-top: 1px; }
.qt-check[hidden] { display: none; }
.qt-width { border: 0; padding: 0; margin: 12px 0 0; }
.qt-width[hidden] { display: none; }
.qt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.qt-chips label { position: relative; }
.qt-chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.qt-chips span { display: inline-block; padding: 10px 14px; border-radius: 999px; border: 2px solid #D5DEE6; font-weight: 600; font-size: .92rem; }
.qt-chips input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.qt-chips input:focus-visible + span { outline: 3px solid var(--bulb); outline-offset: 2px; }
.qt-err { background: #FFF1F0; color: #9B1C1C; border-radius: 10px; padding: 10px 14px; font-weight: 600; margin: 12px 0 0; }
.qt-err[hidden] { display: none; }
.qt-go { width: 100%; margin-top: 16px; }
.qt-fine { font-size: .85rem; color: var(--muted); text-align: center; margin: 10px 0 0; }
.qt-busy { text-align: center; padding: 50px 10px; }
.qt-busy[hidden], .qt-res[hidden], .qt-form[hidden] { display: none; }
.qt-spin { display: inline-block; width: 44px; height: 44px; border-radius: 50%; border: 4px solid #E3EAF0; border-top-color: var(--bulb-hot); animation: qt-spin .9s linear infinite; }
@keyframes qt-spin { to { transform: rotate(360deg); } }
.qt-busy p { font-weight: 700; color: var(--navy); margin-top: 14px; }
.qt-offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .qt-offers { grid-template-columns: 1fr; } }
.qt-offer { position: relative; border: 2px solid #D5DEE6; border-radius: 16px; padding: 16px; }
.qt-pick { border-color: var(--navy); box-shadow: 0 16px 36px -22px rgba(10,26,51,.6); }
.qt-flag { position: absolute; top: -12px; left: 14px; background: var(--bulb); color: var(--navy); font-weight: 700; font-size: .78rem; padding: 3px 10px; border-radius: 999px; }
.qt-offer h3 { font-size: 1.6rem; color: var(--navy); margin: 0 0 .1em; }
.qt-blurb { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }
.qt-price { font-family: var(--display); font-weight: 900; font-size: 2.4rem; line-height: 1; color: var(--navy); margin: 0 0 4px; }
.qt-price span { font: 600 .9rem var(--body); color: var(--muted); }
.qt-ref { color: #1A7F4B; font-weight: 700; font-size: .9rem; margin: 0; }
.qt-dep { font-size: .9rem; color: var(--muted); margin: 0 0 6px; }
.qt-offer summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: 6px 0; }
.qt-offer ul { list-style: none; padding: 0; margin: 4px 0 0; font-size: .88rem; }
.qt-offer li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid #EEF2F6; }
.qt-muted { color: var(--muted); }
.qt-terms { font-size: .88rem; color: var(--muted); margin: 14px 0 0; }
.qt-terms strong { color: var(--navy); }
.qt-actions { display: grid; gap: 10px; margin-top: 14px; }
.qt-actions .btn { width: 100%; }
.qt-td { display: flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 600; margin: 4px 0 6px; cursor: pointer; }
.qt-td input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.qt-want { width: 100%; margin-top: 10px; }
.qt-link { background: none; border: 0; color: var(--navy); font: 600 .95rem var(--body); text-decoration: underline; text-underline-offset: 3px; padding: 10px; min-height: 44px; cursor: pointer; }
.qt-want.is-busy { opacity: .7; pointer-events: none; }
.qt-wrap { background: var(--navy); color: #fff; border-radius: 16px; padding: 18px; margin: 0 0 14px; }
.qt-wrap[hidden], .qt-attach[hidden] { display: none; }
.qt-wrap h3 { font-size: 1.5rem; color: var(--bulb); margin: 0 0 .3em; }
.qt-wrap p { color: var(--ice); margin: 0 0 12px; font-size: .95rem; }
.qt-wrap .btn { width: 100%; }
.qt-attach { background: #FFF6E2; border: 1px solid #F5D9A6; border-radius: 12px; padding: 10px 14px; font-size: .92rem; margin: 0 0 12px; }
.qt-front { font-weight: 700; color: var(--navy); font-size: .95rem; margin: 0 0 14px; }
.qt-grid { margin-top: 14px; }
.qt-form .consent { margin-top: 14px; color: var(--ink); }
.qt-form .consent input { accent-color: var(--navy); }
/* Get my price: its own full-width row so it never squeezes Flip the switch */
.ds-quote-btn { display: flex; width: 100%; margin-top: 10px; min-height: 52px; }
.ds-quote-btn[hidden] { display: none; }
.ds-remove { border-color: rgba(255,120,120,.7); color: #FFB3B3; }
.qt-exact { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; margin: 12px 0 2px; }
.qt-exact-row { display: flex; align-items: center; gap: 10px; }
.qt-exact-row input { font: 400 1rem var(--body); padding: 12px 14px; min-height: 50px; border: 2px solid #C9D6E2; border-radius: 10px; width: 120px; color: var(--ink); background: #fff; }
.qt-exact-row input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(255,196,107,.6); }
.qt-exact-row b { font-weight: 600; color: var(--muted); font-size: .92rem; }
.qt-exact small { font-weight: 400; color: var(--muted); font-size: .85rem; }
/* Top row: buttons keep their full label and wrap to a second line when space runs out */
.ds-ctx { flex-wrap: wrap; }
.ds-ctx > * { flex: 1 1 auto; min-width: fit-content; }
