/* Fortuna instant-quote sketcher. Uses the site's :root tokens, with fallbacks. */
.le {
  --le-ink: var(--ink, #203a32);
  --le-paper: var(--paper, #f6f4ee);
  --le-white: var(--white, #fffcf6);
  --le-gold: var(--gold, #b68b4e);
  --le-accent: var(--accent, #8a6939);
  --le-line: var(--line, #d9d9ce);
  --le-soft: var(--soft, #e9e9df);
  --le-muted: var(--muted, #53655b);
  --le-stone: #d8e4d7;
  display: grid; gap: 14px; font-family: "DM Sans", Arial, sans-serif; color: var(--le-ink);
}
.le button { font: inherit; color: inherit; cursor: pointer; }

/* shape chips */
.le-presets { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow: visible; }
.le-chip {
  position: relative;
  display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; min-height: 76px;
  background: var(--le-white); border: 1px solid var(--le-line); border-radius: 4px; font-size: 13px; font-weight: 600; line-height: 1.2;
  transition: border-color .15s, background .15s, transform .1s;
}
.le-chip:hover { z-index: 20; border-color: var(--le-ink); }
.le-chip:active { transform: translateY(1px); }
.le-chip svg { width: 44px; height: 28px; }
.le-chip polygon { fill: var(--le-stone); stroke: var(--le-ink); stroke-width: 1.5; }
.le-chip .dash { fill: none; stroke: var(--le-ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
.le-chip .pen { fill: var(--le-gold); stroke: var(--le-ink); stroke-width: 1.2; }
.le-draw[aria-pressed="true"] { background: var(--le-ink); color: var(--le-white); border-color: var(--le-ink); }
.le-draw[aria-pressed="true"] .dash { stroke: var(--le-white); }
.le-chip-tip {
  position: absolute; z-index: 30; top: calc(100% + 7px); left: 50%; width: min(240px, 78vw); padding: 9px 10px;
  transform: translate(-50%, -4px); border-radius: 4px; background: var(--le-ink); color: var(--le-white);
  box-shadow: 0 8px 24px rgba(32, 58, 50, .22); font-size: 12px; font-weight: 500; line-height: 1.4; text-align: left;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, transform .15s;
}
.le-chip-tip::before { content: ""; position: absolute; bottom: 100%; left: 50%; border: 6px solid transparent; border-bottom-color: var(--le-ink); transform: translateX(-50%); }
.le-chip:hover .le-chip-tip,.le-chip:focus-visible .le-chip-tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .le-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .le-chip { min-height: 68px; font-size: 12px; }
}

/* canvas */
.le-stage { position: relative; border: 1px solid var(--le-line); border-radius: 4px; background: #f1f3ec; overflow: hidden; }
.le-svg { display: block; width: 100%; height: clamp(320px, 52vh, 540px); touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.le-svg:focus-visible { box-shadow: inset 0 0 0 2px var(--le-gold); }
.le-svg[data-hover="body"] { cursor: grab; }
.le-svg[data-hover="ns"] { cursor: ns-resize; }
.le-svg[data-hover="ew"] { cursor: ew-resize; }
.le-svg[data-hover="label"] { cursor: text; }
.le-svg.drawing, .le-svg.drawing * { cursor: crosshair !important; }
.le-svg.dragging, .le-svg.dragging * { cursor: grabbing; }

.le-dot { fill: #b9c2b5; }
.le-hatchline { stroke: var(--le-ink); opacity: .35; }
.le-scale line { stroke: var(--le-muted); }
.le-scale text { fill: var(--le-muted); font-weight: 600; }

.le-body { fill: var(--le-stone); stroke: var(--le-ink); stroke-linejoin: round; transition: fill .15s; }
.le-piece.is-selected .le-body { fill: #c9dac7; }
.le-piece.is-bad .le-body { fill: #f1d9cf; stroke: #a5432a; }
.le-wall { stroke: var(--le-ink); stroke-linecap: square; pointer-events: none; }
.le-wallband { pointer-events: none; }
.le-hit { stroke: transparent; }
.le-hit.ns { cursor: ns-resize; }
.le-hit.ew { cursor: ew-resize; }
.le-hit.diag { cursor: move; }
.le-edge-sel { stroke: var(--le-gold); stroke-linecap: round; pointer-events: none; }
.le-grip { fill: var(--le-white); stroke: var(--le-ink); }
.le-grip.ns { cursor: ns-resize; }
.le-grip.ew { cursor: ew-resize; }
.le-tag-n { fill: var(--le-ink); font-weight: 700; }
.le-tag-a { fill: var(--le-muted); }
.le-sink-marker rect { fill: var(--le-ink); stroke: #fff; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.le-sink-marker text { fill: #fff; font-weight: 700; }
.le-svg.placing,.le-svg.placing * { cursor: pointer !important; }
.le-piece.is-placement-target .le-body { transition: fill .15s, stroke .15s; }
.le-piece.is-placement-target:hover .le-body { fill: #c4d7c2; stroke: var(--le-gold); stroke-width: 3px; vector-effect: non-scaling-stroke; }

.le-dim { cursor: text; }
.le-dim rect { fill: var(--le-white); stroke: var(--le-line); }
.le-dim text { fill: var(--le-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.le-dim.is-mine rect { stroke: var(--le-ink); }
.le-dim.is-active rect { fill: var(--le-ink); stroke: var(--le-ink); }
.le-dim.is-active text { fill: var(--le-white); }
.le-dim:hover rect { stroke: var(--le-gold); }




.le-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.le-tools button {
  width: 40px; height: 40px; border-radius: 4px; border: 1px solid var(--le-line); background: var(--le-white); font-size: 18px; line-height: 1;
  box-shadow: 0 1px 2px rgba(32, 58, 50, .08);
}
.le-tools button:hover:not(:disabled) { border-color: var(--le-ink); }
.le-tools button:disabled { opacity: .4; cursor: default; }

.le-empty {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; pointer-events: none; color: var(--le-muted);
}
.le-empty strong { font-family: "Playfair Display", Georgia, serif; font-size: 22px; color: var(--le-ink); font-weight: 600; }
.le-empty[hidden] { display: none; }

.le-toast {
  position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  background: var(--le-ink); color: var(--le-white); padding: 9px 14px; border-radius: 4px; font-size: 14px; max-width: calc(100% - 32px);
  transition: opacity .2s, transform .2s; text-align: center; z-index: 8;
}
.le-toast.show { opacity: 1; transform: translate(-50%, 0); }
.le-mode-note {
  position: absolute; z-index: 6; right: 58px; top: 10px; width: min(390px, calc(100% - 250px)); padding: 10px 12px;
  border-left: 4px solid #2f7a4f; border-radius: 3px; background: rgba(232, 242, 233, .97); color: #315747;
  box-shadow: 0 4px 16px rgba(32, 58, 50, .12); font-size: 12px; line-height: 1.4;
}
.le-mode-note b,.le-mode-note span { display: block; }
.le-mode-note b { margin-bottom: 2px; color: var(--le-ink); }

/* inspector */
.le-inspector { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--le-line); border-radius: 4px; background: var(--le-white); min-height: 58px; align-content: center; }
.le-hint { margin: 0; color: var(--le-muted); font-size: 15px; line-height: 1.45; }
.le-hint b { color: var(--le-ink); }
.le-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.le-head h4 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 22px; font-weight: 600; }
.le-head span { color: var(--le-muted); font-weight: 600; }
.le-edge { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 14px; align-items: center; }
.le-label { font-size: 14px; font-weight: 700; }
.le-len { max-width: 220px; }
.le-field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.le-input { display: flex; align-items: center; border: 1px solid #b9bfb3; background: #fff; border-radius: 3px; }
.le-input:focus-within { border-color: var(--le-gold); box-shadow: 0 0 0 2px rgba(182, 139, 78, .25); }
.le-input input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; padding: 12px; font: inherit; font-size: 18px; font-weight: 500; background: transparent; color: var(--le-ink); }
.le-input em { font-style: normal; color: var(--le-muted); padding-right: 12px; font-weight: 500; }
.le-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--le-ink); border-radius: 3px; overflow: hidden; }
.le-seg button { padding: 13px 8px; border: 0; background: #fff; font-weight: 600; font-size: 14px; }
.le-seg button + button { border-left: 1px solid var(--le-ink); }
.le-seg button[aria-checked="true"] { background: var(--le-ink); color: var(--le-white); }
.le-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.le-btn { padding: 10px 14px; border: 1px solid var(--le-line); background: #fff; border-radius: 3px; font-weight: 600; font-size: 14px; }
.le-btn:hover { border-color: var(--le-ink); }
.le-btn.ghost { justify-self: start; }
.le-btn.danger { margin-left: auto; color: #8f3a24; }
@media (max-width: 520px) { .le-edge { grid-template-columns: 1fr; gap: 6px; } .le-edge .le-label { margin-top: 6px; } .le-len { max-width: none; } }

/* totals */
.le-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--le-line); border: 1px solid var(--le-line); border-radius: 4px; overflow: hidden; }
.le-summary:empty { display: none; }
.le-summary div { background: var(--le-white); padding: 10px 14px; display: grid; gap: 2px; }
.le-summary span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--le-muted); font-weight: 600; }
.le-summary strong { font-size: 18px; }

/* drawing along a wall */
.le-draft { fill: rgba(182, 139, 78, .16); stroke: var(--le-accent); }
.le-draft-wall { fill: none; stroke: var(--le-ink); stroke-linecap: round; stroke-linejoin: round; }
.le-draft-pt { fill: var(--le-white); stroke: var(--le-ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.le-draft-pill { fill: var(--le-ink); }
.le-draft-t { fill: var(--le-white); font-weight: 700; }

/* backsplash */
.le-splashband { fill: #e8d8b9; stroke: var(--le-accent); }
.le-splash-cand { stroke: var(--le-gold); fill: none; pointer-events: none; }
.le-svg.splashing .le-hit { cursor: pointer; }
.le-svg.splashing .le-hit:hover { stroke: rgba(182, 139, 78, .35); }
.le-svg.splashing .le-body, .le-svg.splashing .le-dim { cursor: pointer; }
.le-dim.has-splash rect { fill: #f3e9d6; stroke: var(--le-accent); }
.le-dim.has-splash.is-active rect { fill: var(--le-ink); }

.le-tools-left { position: absolute; top: 10px; left: 10px; display: grid; justify-items: start; gap: 8px; }
.le-tools-left[hidden] { display: none; }
.le-pill {
  min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--le-ink); background: var(--le-white);
  font-weight: 700; font-size: 14px; box-shadow: 0 1px 2px rgba(32, 58, 50, .08);
  display: inline-flex; align-items: center; gap: 7px;
}
.le-pill[aria-pressed="true"] { background: var(--le-ink); color: var(--le-white); }
.le-pill-check {
  width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center;
  background: #2f7a4f; color: #fff; font-size: 12px; line-height: 1;
}
.le-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.le-row .le-field { width: 180px; }
.le-btn.primary { background: var(--le-ink); color: var(--le-white); border-color: var(--le-ink); margin-left: auto; }
.le-btn:disabled { opacity: .45; cursor: default; }
.le-fine { margin: 0; font-size: 13px; color: var(--le-muted); }

/* Sink and extras tools mounted by the quote flow */
.le-app-popover {
  position: absolute; z-index: 7; top: 58px; bottom: 10px; left: 174px; width: min(590px, calc(100% - 254px));
  overflow-y: auto; padding: 13px; border: 1px solid var(--le-line); border-radius: 5px; background: rgba(255, 252, 246, .985);
  box-shadow: 0 12px 34px rgba(32, 58, 50, .2); backdrop-filter: blur(5px);
}
.le-app-popover[hidden] { display: none; }
.le-popover-head { position: sticky; z-index: 3; top: -13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 3px 0 10px; border-bottom: 1px solid var(--le-line); background: var(--le-white); }
.le-popover-head h4 { margin: 0; font: 600 20px/1.2 "Playfair Display",Georgia,serif; }
.le-popover-head p { margin: 4px 0 0; color: var(--le-muted); font-size: 12px; line-height: 1.4; }
.le-popover-section { margin-top: 13px; }
.le-popover-section > h5 { margin: 0 0 7px; color: var(--le-accent); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.le-sink-picker-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.le-sink-picker-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--le-line); border-radius: 3px; background: #fff; text-align: left; }
.le-sink-picker-card:hover { border-color: var(--le-ink); }
.le-sink-picker-card img,.le-sink-picker-placeholder { display: grid; place-items: center; width: 100%; height: 62px; padding: 5px; object-fit: contain; background: #f4f3ed; color: var(--le-muted); font-size: 11px; }
.le-sink-picker-card span { display: grid; gap: 2px; padding: 7px; font-size: 12px; font-weight: 700; line-height: 1.25; }
.le-sink-picker-card small { color: var(--le-muted); font-size: 10px; font-weight: 500; }
.le-sink-picker-card strong { color: var(--le-ink); font-size: 12px; }
.le-sink-selected { display: grid; gap: 7px; margin: 12px 0 0; }
.le-sink-selected article { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--le-line); background: #f8f7f1; font-size: 12px; }
.le-sink-selected p { margin: 0; }
.le-sink-selected small { display: block; color: var(--le-muted); }
.le-sink-selected select { display: block; width: 100%; min-height: 34px; margin-top: 6px; border: 1px solid #aab4a8; background: #fff; padding: 5px 7px; font-size: 12px; }
.le-sink-selected-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.le-mini-button { min-height: 34px; padding: 6px 9px; border: 1px solid var(--le-line); border-radius: 3px; background: #fff; font-size: 11px; font-weight: 700; }
.le-mini-button.danger { color: #8f3a24; }
.le-own-sink { margin-top: 10px; }
.le-extras-list { display: grid; gap: 10px; margin-top: 13px; }
.le-extra-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(170px,220px); align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--le-line); background: #fff; }
.le-extra-card h5 { margin: 0 0 3px; font-size: 14px; }
.le-extra-card p { margin: 0; color: var(--le-muted); font-size: 11px; line-height: 1.4; }
.le-extra-card select,.le-extra-card input[type=number] { width: 100%; min-height: 40px; border: 1px solid #aab4a8; background: #fff; padding: 7px 8px; }
.le-extra-toggle { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12px; font-weight: 700; }
.le-extra-toggle input { width: 18px; height: 18px; accent-color: var(--le-ink); }

/* edge profiles */
.le-edge-popover {
  position: absolute; z-index: 7; top: 58px; bottom: 10px; left: 174px; width: min(330px, calc(100% - 254px));
  display: grid; align-content: start; gap: 10px; overflow-y: auto; padding: 13px;
  border: 1px solid var(--le-line); border-radius: 5px; background: rgba(255, 252, 246, .98);
  box-shadow: 0 12px 34px rgba(32, 58, 50, .2); backdrop-filter: blur(5px);
}
.le-edge-popover .le-profile-head { position: sticky; top: -13px; z-index: 2; padding: 3px 0 9px; background: var(--le-white); border-bottom: 1px solid var(--le-line); }
.le-edge-popover .le-profile-head h4 { font-size: 20px; }
.le-edge-popover .le-profile-head p { font-size: 12px; }
.le-profile-status { margin: 0; padding: 9px 10px; border-left: 3px solid #2f7a4f; background: #e8f2e9; color: #315747; font-size: 12px; line-height: 1.4; }
.le-edge-popover .le-profile-grid { grid-template-columns: 1fr; gap: 7px; }
.le-edge-popover .le-profile-card { grid-template-columns: 94px minmax(0, 1fr); align-items: center; padding: 7px; }
.le-edge-popover .le-profile-card svg { height: 48px; }
.le-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.le-profile-head h4 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 22px; font-weight: 600; }
.le-profile-head p { margin: 3px 0 0; color: var(--le-muted); font-size: 14px; line-height: 1.4; }
.le-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.le-profile-card {
  min-width: 0; padding: 9px; border: 1px solid var(--le-line); border-radius: 4px; background: #fff;
  display: grid; gap: 7px; text-align: left; transition: border-color .15s, box-shadow .15s, transform .1s;
}
.le-profile-card:hover { border-color: var(--le-ink); }
.le-profile-card:active { transform: translateY(1px); }
.le-profile-card[aria-checked="true"] { border-color: var(--le-ink); box-shadow: inset 0 0 0 1px var(--le-ink); background: #f0f4ec; }
.le-profile-card svg { display: block; width: 100%; height: 58px; border-radius: 3px; background: #f4f3ed; }
.le-profile-slab { fill: #d8e4d7; stroke: var(--le-ink); stroke-width: 2; stroke-linejoin: round; }
.le-profile-grain { fill: none; stroke: #9bae9e; stroke-width: 1.5; stroke-linecap: round; }
.le-profile-card > span { display: grid; gap: 1px; }
.le-profile-card b { font-size: 14px; line-height: 1.25; }
.le-profile-card small { color: var(--le-muted); font-size: 12px; font-weight: 600; }
.le-profile-card[aria-checked="true"] small { color: #2f7a4f; }

@media (max-width: 520px) {
  .le-pill { height: 40px; padding: 0 12px; font-size: 13px; }
  .le-row .le-field { width: 100%; }
  .le-row .le-btn.primary { margin-left: 0; }
  .le-summary span { letter-spacing: .02em; font-size: 11px; }
  .le-summary div { padding: 10px; }
  .le-profile-head { align-items: flex-start; }
  .le-profile-head .le-btn { flex: 0 0 auto; }
  .le-edge-popover,.le-app-popover { top: 106px; right: 10px; bottom: 10px; left: 10px; width: auto; padding: 11px; }
  .le-edge-popover .le-profile-grid { grid-template-columns: 1fr; }
  .le-edge-popover .le-profile-card { grid-template-columns: 82px minmax(0, 1fr); }
  .le-profile-card svg { height: 52px; }
  .le-mode-note { top: auto; right: 10px; bottom: 10px; left: 10px; width: auto; }
  .le-sink-picker-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .le-extra-card { grid-template-columns: 1fr; }
  .le-extra-toggle { justify-content: flex-start; }
}
