/* GENERATED by build-css.mjs — edit the per-pattern files, not this. */

/* ── _base.css ─────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════════
   @agency/patterns — shared surface
   Every rule below reads the HOST page's tokens with a fallback, so one
   implementation inherits ten different palettes. That claim used to be
   marketing on the catalog page; these var() chains are what make it true.
   Patterns own STRUCTURE. The host owns colour, type and spacing scale.
   ═══════════════════════════════════════════════════════════════════════ */
[data-pattern] { --p-line: var(--line, #282C31); --p-ink: var(--ink, #ECEDEE);
  --p-mute: var(--ink-mute, var(--ink-3, #7E858B)); --p-accent: var(--accent, var(--go, #6BC2A8));
  --p-surface: var(--surface, var(--panel, #17191C)); --p-radius: var(--radius, 3px); }
[data-pattern] :focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }

/* ── controls.css ─────────────────────────────────── */
/* Shared control vocabulary — buttons that toggle, used by filterable and
   estimator. aria-pressed is the styling hook AND the accessible state, so
   they cannot drift apart the way a parallel .is-active class does. */
.p-opts { display: flex; flex-wrap: wrap; gap: .35rem; }
.p-opts button { font: inherit; font-size: .78rem; padding: .4rem .65rem; cursor: pointer;
  background: none; border: 1px solid var(--p-line); color: var(--p-mute);
  border-radius: var(--p-radius); transition: border-color .2s, color .2s; }
.p-opts button:hover { border-color: var(--p-accent); color: var(--p-ink); }
.p-opts button[aria-pressed="true"] { border-color: var(--p-accent); color: var(--p-accent);
  background: color-mix(in oklab, var(--p-accent), transparent 92%); }
.p-swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.p-swatches button { width: 2.4rem; height: 2.4rem; padding: 0; cursor: pointer;
  border: 1px solid var(--p-line); border-radius: var(--p-radius); }
.p-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ground, #101113), 0 0 0 4px var(--p-accent); }
.p-err { color: var(--danger, #E0796C); font-size: .82rem; margin: .3rem 0 0; min-height: 1.1rem; }
[aria-invalid="true"] { border-color: var(--danger, #E0796C) !important; }

/* ── a11y.css ─────────────────────────────────── */
/* ── accessibility utilities ───────────────────────────────────────
   The package had no visually-hidden utility at all, which is why three
   patterns were writing results to the screen with nothing announced.

   Clip, never `hidden` or `display:none`. A live region that is display:none
   when the update lands does not announce, and one that is un-hidden and
   populated in the same task usually does not either — the assistive tech
   never sees a mutation to a region it was already observing. */
.p-vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* iOS zooms the viewport when a focused input computes under 16px, and then
   the user is stranded at that zoom. max() keeps it structural rather than a
   lint rule, and holds regardless of what the host sets --font-size to. */
[data-pattern] input,
[data-pattern] select,
[data-pattern] textarea { font-size: max(16px, 1rem); }

/* ── before-after.css ─────────────────────────────────── */
/* before-after — reads the host page's tokens, with fallbacks so it also works
   on a page that defines none. This is what makes one implementation usable in
   the neutral catalog and in ten different client palettes. */
.p-ba { position: relative; overflow: hidden; --p-ba-x: 50%;
        background: var(--surface, #0b0c0e); }
.p-ba__base { display: block; width: 100%; height: auto; }
.p-ba__clip { position: absolute; inset: 0;
              clip-path: inset(0 calc(100% - var(--p-ba-x)) 0 0); }
.p-ba__clip img { width: 100%; height: 100%; object-fit: cover; }

.p-ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
               -webkit-appearance: none; appearance: none; background: transparent;
               cursor: ew-resize; outline: none; }
.p-ba__range::-webkit-slider-thumb { -webkit-appearance: none; width: 1px; height: 1px; opacity: 0; }
.p-ba__range::-moz-range-thumb { width: 1px; height: 1px; opacity: 0; border: 0; }
.p-ba__range::-webkit-slider-runnable-track { background: transparent; }

.p-ba__handle { position: absolute; top: 0; bottom: 0; left: var(--p-ba-x);
                width: 2px; margin-left: -1px; background: #fff; pointer-events: none;
                box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.p-ba__handle::before { content: ""; position: absolute; top: 50%; left: 50%;
                width: 2.7rem; height: 2.7rem; margin: -1.35rem 0 0 -1.35rem;
                border-radius: 50%; background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,.5); }
.p-ba__handle::after { content: "↔"; position: absolute; top: 50%; left: 50%;
                transform: translate(-50%, -50%); color: #111; font-size: 1.05rem; line-height: 1; }
.p-ba__range:focus-visible ~ .p-ba__handle::before {
  box-shadow: 0 0 0 3px var(--accent, #6BC2A8), 0 2px 16px rgba(0,0,0,.5); }

.p-ba__tag { position: absolute; bottom: .85rem; z-index: 1;
             font-family: var(--font-utility, ui-monospace, monospace);
             font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
             color: #fff; background: rgba(10,12,14,.75); padding: .3rem .55rem;
             pointer-events: none; }
.p-ba__tag--l { left: .85rem; }
.p-ba__tag--r { right: .85rem; }

/* The hint nudge animates rather than jumping, so it reads as an invitation
   rather than a glitch. Only applied while untouched; the class is dropped the
   moment the visitor takes over. */
.p-ba--hint .p-ba__clip { transition: clip-path .9s cubic-bezier(.16,1,.3,1); }
.p-ba--hint .p-ba__handle { transition: left .9s cubic-bezier(.16,1,.3,1); }
@media (prefers-reduced-motion: reduce) {
  .p-ba--hint .p-ba__clip, .p-ba--hint .p-ba__handle { transition: none; }
}

/* ── disclosure.css ─────────────────────────────────── */
[data-pattern="disclosure"] details { border-bottom: 1px solid var(--p-line); }
[data-pattern="disclosure"] summary { cursor: pointer; padding: 1rem 0; list-style: none;
  font-size: 1.05rem; }
[data-pattern="disclosure"] summary::-webkit-details-marker { display: none; }
[data-pattern="disclosure"] summary::after { content: "+"; float: right; color: var(--p-accent); }
[data-pattern="disclosure"] details[open] summary::after { content: "–"; }
[data-pattern="disclosure"] details > :not(summary) { padding-bottom: 1rem; margin: 0; }

/* ── estimator.css ─────────────────────────────────── */
.p-est__row { display: flex; justify-content: space-between; gap: 1rem; padding: .18rem 0;
  font-size: .82rem; color: var(--p-mute); font-variant-numeric: tabular-nums; }
.p-est__row--total { color: var(--p-ink); font-size: 1rem; border-top: 1px solid var(--p-line);
  margin-top: .5rem; padding-top: .6rem; }
.p-est__min { font-size: .78rem; color: var(--warn, #E0A64A); margin-top: .5rem; }

/* ── financing.css ─────────────────────────────────── */
[data-pattern="financing"] [data-part="monthly"] { font-family: var(--font-utility, ui-monospace, monospace);
  font-size: clamp(2rem, 1.2rem + 3vw, 3rem); line-height: 1; color: var(--p-accent);
  font-variant-numeric: lining-nums tabular-nums; }
[data-pattern="financing"] [data-part="monthly"] small { font-size: .9rem; color: var(--p-mute); letter-spacing: .06em; }
[data-pattern="financing"] [data-part="warning"] { margin-top: .9rem; padding: .8rem 1rem; font-size: .84rem;
  color: var(--p-mute); border-left: 3px solid var(--warn, #E0A64A);
  background: color-mix(in oklab, var(--warn, #E0A64A), transparent 94%); }
[data-part="warning"] b { display: block; margin-bottom: .2rem; color: var(--warn, #E0A64A); }
[data-part="warning"][data-kind="plain"] { border-color: var(--p-line); background: var(--p-surface); }
[data-part="warning"][data-kind="plain"] b { color: var(--p-ink); }

/* ── floor-plan.css ─────────────────────────────────── */
/* floor-plan — architectural drawing conventions, themed from host tokens.

   Line weight IS the convention. A plan reads correctly because walls are
   heavier than fixtures and fixtures are heavier than dimensions; flatten that
   hierarchy and it stops looking like a drawing no matter how accurate the
   geometry is. */
.p-fp { display: grid; gap: 1.4rem; }
@media (min-width: 56rem) { .p-fp { grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; } }

.fp__svg { width: 100%; height: auto; display: block; overflow: visible; }

/* poché — the solid wall fill that makes it read as a plan, not a diagram */
.fp__poche { fill: var(--ink, #ECEDEE); fill-opacity: .92; }
/* Solid, not dashed. Dashed in plan means "above the cut plane" or "hidden";
   a dashed terrace reads as an overhead canopy. It is an exterior slab, so it
   gets a thin continuous object line. */
.fp__slab  { fill: var(--surface, #17191C); stroke: var(--ink-mute, #7E858B);
             stroke-width: 1; }
.fp__rail  { stroke: var(--ink-mute, #7E858B); stroke-width: 2.5; fill: none; }

/* Line weight carries the meaning. NKBA Universal Drawing Standards: "a wall
   line should be thicker than a door swing line, and the casing of a window
   should be thicker than the glazing in the window." NCS plotting widths run
   Wide 0.50 for cut objects, Medium 0.35 for object lines, Thin 0.25 for
   objects seen at a distance, Fine 0.18 for hatch. */
.fp__glazing path { stroke: var(--ink, #ECEDEE); stroke-width: .7; fill: none; }
.fp__glazing .fp__casing { stroke-width: 1.4; }
.fp__door path    { stroke: var(--ink, #ECEDEE); stroke-width: 1.4; fill: none; }
/* The swing arc is a thin SOLID line, not a dashed one — a dashed line means
   "hidden / above the cut plane" and the swing is neither. Drawing it dashed
   was our invention; it reads as an annotation instead of geometry. */
.fp__door .fp__arc { stroke-width: .7; opacity: .85; }
.fp__slide path   { stroke: var(--ink, #ECEDEE); stroke-width: 2.2; fill: none; }

.fp__fix * { fill: none; stroke: var(--ink-mute, #7E858B); stroke-width: 1.1; }

/* hit areas sit above the drawing and stay invisible until wanted */
.fp__room { fill: transparent; stroke: none; cursor: pointer;
            transition: fill .18s ease; outline: none; }
.fp__room:hover { fill: color-mix(in oklab, var(--accent, #6BC2A8), transparent 90%); }
.fp__room[aria-pressed="true"] { fill: color-mix(in oklab, var(--accent, #6BC2A8), transparent 80%); }
.fp__room:focus-visible { stroke: var(--accent, #6BC2A8); stroke-width: 2.5; stroke-dasharray: 4 3; }

.fp__labels text { fill: var(--ink, #ECEDEE); font-size: 11px; letter-spacing: .1em;
  text-anchor: middle; dominant-baseline: middle;
  font-family: var(--font-utility, ui-monospace, monospace); pointer-events: none; }
.fp__labels .fp__area { fill: var(--ink-mute, #7E858B); font-size: 9px; letter-spacing: .12em; }
.fp__labels .fp__lbl--tight { font-size: 9px; letter-spacing: .08em; }

.fp__dim path { stroke: var(--ink-mute, #7E858B); stroke-width: .8; fill: none; opacity: .8; }
.fp__dim .fp__tick { stroke-width: 1.1; }
.fp__dim text { fill: var(--ink-mute, #7E858B); font-size: 9.5px; text-anchor: middle;
  dominant-baseline: middle; font-family: var(--font-utility, ui-monospace, monospace);
  letter-spacing: .06em; }

.fp__north circle { fill: none; stroke: var(--ink-mute, #7E858B); stroke-width: 1; }
.fp__north .fp__needle { fill: var(--accent, #6BC2A8); stroke: none; }
.fp__north text { fill: var(--ink-mute, #7E858B); font-size: 9px; text-anchor: middle;
  font-family: var(--font-utility, ui-monospace, monospace); letter-spacing: .1em; }

.fp__scale rect { stroke: var(--ink-mute, #7E858B); stroke-width: .8; }
.fp__scale .fp__scale--on  { fill: var(--ink-mute, #7E858B); }
.fp__scale .fp__scale--off { fill: none; }
.fp__scale text { fill: var(--ink-mute, #7E858B); font-size: 9px; text-anchor: middle;
  font-family: var(--font-utility, ui-monospace, monospace); }


@media (prefers-reduced-motion: reduce) { .fp__room { transition: none; } }

/* ── tags, abbreviations and the key ───────────────────────────────
   Door marks (NCS 01 42 00-025) and window type marks (01 42 00-080) point
   at schedules. This is how a plan explains itself — not by captioning its
   own geometry, which is why the first legend here ("WALL", "WINDOW",
   "FIXTURE") was wrong in kind rather than merely in wording. */
.fp__mark rect, .fp__mark path { fill: var(--ground, #101113); stroke: var(--ink, #ECEDEE); stroke-width: 1; }
.fp__mark text { fill: var(--ink, #ECEDEE); font-size: 8px; text-anchor: middle;
  dominant-baseline: middle; font-family: var(--font-utility, ui-monospace, monospace); letter-spacing: .02em; }
.fp__abbr text { fill: var(--ink-mute, #7E858B); font-size: 7.5px; text-anchor: middle;
  dominant-baseline: middle; font-family: var(--font-utility, ui-monospace, monospace); letter-spacing: .08em; }

.fp__key { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line, #282C31);
  display: grid; gap: .55rem; }
.fp__key dl { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: 0;
  font-family: var(--font-utility, ui-monospace, monospace); font-size: .62rem;
  letter-spacing: .06em; color: var(--ink-mute, #7E858B); }
.fp__key dt { color: var(--ink, #ECEDEE); }
.fp__key dt::after { content: ""; }
.fp__key dd { margin: 0 .6rem 0 0; }
.fp__key p { font-family: var(--font-utility, ui-monospace, monospace); font-size: .62rem;
  letter-spacing: .06em; color: var(--ink-mute, #7E858B); margin: 0; text-transform: uppercase; }
.fp__key .fp__scalenote { color: var(--ink, #ECEDEE); }

/* ── v3 additions ─────────────────────────────────────────────────── */

/* Above the ~4'-0" cut plane: wall cabinets, the hood, shelf & rod. NKBA
   describes this as thin dark long dashes; NCS 01 42 00-005 and the VA
   legend's "FEATURES ABOVE LINE INDICATOR" agree. This is the ONE line type
   a reader cannot infer from the drawing, which is why it is the only line
   type the key carries. */
.fp__over * { fill: none; stroke: var(--ink-mute, #7E858B); stroke-width: .8;
              stroke-dasharray: 5 2.5; }

/* Common circulation. The unit previously had no entrance from it at all —
   its only exterior door opened onto the private terrace, which reads as a
   detached house rather than an apartment. */
.fp__breeze { fill: none; stroke: var(--ink-mute, #7E858B); stroke-width: .8; stroke-dasharray: 6 4; }
.fp__extlbl { fill: var(--ink-mute, #7E858B); font-size: 9px; letter-spacing: .16em;
  text-anchor: middle; dominant-baseline: middle;
  font-family: var(--font-utility, ui-monospace, monospace); }

.fp__curb  { stroke: var(--ink-mute, #7E858B); stroke-width: 1.4; }
.fp__arrow { stroke: var(--ink-mute, #7E858B); stroke-width: .8; fill: none; }
.fp__drain { fill: none; stroke: var(--ink-mute, #7E858B); stroke-width: 1; }
.fp__slope { fill: var(--ink-mute, #7E858B); font-size: 7.5px; letter-spacing: .12em;
  text-anchor: middle; font-family: var(--font-utility, ui-monospace, monospace); }

.fp__ext { stroke: var(--ink-mute, #7E858B); stroke-width: .6; fill: none; opacity: .7; }

.fp__block .fp__title { fill: var(--ink, #ECEDEE); font-size: 12px; letter-spacing: .14em;
  font-family: var(--font-utility, ui-monospace, monospace); }
.fp__block .fp__sub { fill: var(--ink-mute, #7E858B); font-size: 10px; letter-spacing: .1em;
  font-family: var(--font-utility, ui-monospace, monospace); }
.fp__notes text { fill: var(--ink-mute, #7E858B); font-size: 7.5px; letter-spacing: .1em;
  text-anchor: end; font-family: var(--font-utility, ui-monospace, monospace); }

/* Key swatches. Only three rows carry a graphic, and each keys something a
   reader genuinely cannot infer: the two tag shapes and the overhead dash. */
.fp__key__row { display: flex; align-items: center; gap: .5rem; }
.fp__key svg { flex: none; overflow: visible; }
.fp__key .k-mark { fill: var(--ground, #101113); stroke: var(--ink, #ECEDEE); stroke-width: 1; }
.fp__key .k-mtext { fill: var(--ink, #ECEDEE); font-size: 7px; text-anchor: middle;
  dominant-baseline: middle; font-family: var(--font-utility, ui-monospace, monospace); }
.fp__key .k-over { stroke: var(--ink-mute, #7E858B); stroke-width: .8; stroke-dasharray: 5 2.5; fill: none; }

/* ── lightbox.css ─────────────────────────────────── */
.p-lb { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%;
  background: rgba(8,9,10,.94); color: #fff; }
.p-lb::backdrop { background: rgba(8,9,10,.8); }
.p-lb__fig { margin: 0; height: 100%; display: grid; place-content: center; gap: .8rem; padding: 3.5rem; }
.p-lb__img { max-width: min(92vw, 1400px); max-height: 80vh; width: auto; height: auto; object-fit: contain; }
.p-lb__cap { font-family: var(--font-utility, ui-monospace, monospace); font-size: .78rem;
  text-align: center; opacity: .75; }
.p-lb__x, .p-lb__nav { position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 1.6rem; line-height: 1; padding: .8rem; opacity: .7; }
.p-lb__x:hover, .p-lb__nav:hover { opacity: 1; }
.p-lb__x { top: .6rem; right: .8rem; font-size: 1.2rem; }
.p-lb__nav { top: 50%; transform: translateY(-50%); font-size: 2.6rem; }
.p-lb__nav--p { left: .4rem; }
.p-lb__nav--n { right: .4rem; }

/* ── lookup.css ─────────────────────────────────── */
.p-lookup { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.p-lookup input { font: inherit; font-family: var(--font-utility, ui-monospace, monospace);
  font-size: 1rem; letter-spacing: .2em; width: 7.5rem; padding: .55rem .7rem;
  background: var(--ground, #0B0C0E); border: 1px solid var(--p-line);
  color: var(--p-ink); border-radius: var(--p-radius); }
[data-part="result"] { margin-top: 1.1rem; padding: .9rem 1.1rem; font-size: .9rem;
  border-left: 3px solid var(--p-line); background: var(--p-surface); }
[data-part="result"][data-zone="in"]   { border-color: var(--go, #6BC2A8); }
[data-part="result"][data-zone="edge"] { border-color: var(--warn, #E0A64A); }
[data-part="result"][data-zone="out"]  { border-color: var(--stop, #E0796C); }
[data-part="result"] b { display: block; color: var(--p-ink); margin-bottom: .25rem; }
[data-part="result"] dl { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; margin: .6rem 0 0;
  font-family: var(--font-utility, ui-monospace, monospace); font-size: .72rem; }
[data-part="result"] dt { color: var(--p-mute); }
[data-part="result"] dd { margin: 0; color: var(--p-ink); }

/* ── scheduler.css ─────────────────────────────────── */
[data-pattern="scheduler"] [data-part="days"] { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; }
.p-sched__day { flex: none; width: 4.4rem; padding: .55rem .3rem; font: inherit; cursor: pointer;
  text-align: center; background: none; border: 1px solid var(--p-line);
  border-radius: var(--p-radius); color: var(--p-mute); }
.p-sched__day:hover:not(:disabled) { border-color: var(--p-accent); color: var(--p-ink); }
.p-sched__day[aria-pressed="true"] { border-color: var(--p-accent); color: var(--p-accent);
  background: color-mix(in oklab, var(--p-accent), transparent 92%); }
.p-sched__day:disabled { opacity: .35; cursor: not-allowed; }
.p-sched__dow { display: block; font-family: var(--font-utility, ui-monospace, monospace);
  font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }
.p-sched__num { display: block; font-size: 1.1rem; line-height: 1.3; }
.p-sched__n { display: block; font-family: var(--font-utility, ui-monospace, monospace);
  font-size: .58rem; color: var(--p-mute); }
[data-pattern="scheduler"] [data-part="slots"] { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.p-sched__slot { font: inherit; font-family: var(--font-utility, ui-monospace, monospace);
  font-size: .8rem; padding: .45rem .7rem; cursor: pointer; background: none;
  border: 1px solid var(--p-line); color: var(--p-mute); border-radius: 2px; }
.p-sched__slot:hover { border-color: var(--p-accent); color: var(--p-accent); }
.p-sched__slot[aria-pressed="true"] { background: var(--p-accent); color: var(--accent-ink, #0B0C0E); border-color: var(--p-accent); }
[data-pattern="scheduler"] [data-part="hold"] { margin-top: 1rem; padding: .8rem 1rem; font-size: .88rem;
  border-left: 3px solid var(--p-accent); background: var(--p-surface); }
[data-pattern="scheduler"] [data-part="hold"] b { color: var(--p-ink); }
.p-sched__clock { font-family: var(--font-utility, ui-monospace, monospace); color: var(--p-accent); }
[data-part="hold"][data-expired="1"] { border-color: var(--stop, #E0796C); }
[data-part="hold"][data-expired="1"] .p-sched__clock { color: var(--stop, #E0796C); }

/* ── sticky-cta.css ─────────────────────────────────── */
[data-pattern="sticky-cta"] { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  transform: translateY(110%); transition: transform .35s var(--ease-brand, cubic-bezier(.16,1,.3,1));
  background: var(--p-surface); border-top: 1px solid var(--p-line);
  padding: .7rem clamp(1rem, 4vw, 2rem); display: flex; gap: 1rem;
  align-items: center; justify-content: space-between; }
[data-pattern="sticky-cta"][data-shown] { transform: none; }
@media (prefers-reduced-motion: reduce) { [data-pattern="sticky-cta"] { transition: none; } }
