/* p-ifl-construction: cluster file for the construction and home services industry flow pages (prefix icn-),
   spec homepage/tools/INDUSTRY-75-SPEC.md §2 + "Cluster construction build notes". Loads after p-indflow.
   Holds: amber-on-navy tokens, the hero "job clipboard on a blueprint grid" (each page draws its own trade object),
   signature interactive 1 "Change-order ripple" (.icn-rip) and 2 "Weather/delay shuffle" (.icn-shuf).
   No three.js, no WebGL, no 3D. Everything readable without JS; reduced motion gets end states at once. */

/* ---------- tokens ---------- */
body.pg {
  --ifl-accent: #FFB81C;
  --ifl-accent-ink: #0B3556;
  --ifl-accent-on: #FFD36B;
  --ifl-tint: #FFF6E0;
  --ifl-band: linear-gradient(135deg, #061A2E 0%, #0B2F4F 58%, #0A3A63 100%);
  --ifl-band-ink: #FFC94A;
  --icn-amber: #FFB81C;
  --icn-amber-ink: #7A4F00;
  --icn-navy: #082238;
  --icn-bp: #0D3A5E;
  --icn-bp-line: rgba(160, 205, 240, .16);
  --icn-bp-line2: rgba(160, 205, 240, .3);
}
.ifl-cast__av { background: #FFF1CC; color: #7A4F00; }
/* keep map sample cards inside the 340px laptop budget (spec §1.2): cap the drawing height, it stays centred */
.ifl-scr--map .ifl-map { max-height: 118px; }

/* ---------- hero: job clipboard on a blueprint grid ---------- */
.icn-hero .ifl-hero__art { --ifl-art-ratio: 5 / 4; }
.icn-art { display: block; width: 100%; height: 100%; border-radius: 22px; box-shadow: 0 40px 70px -46px rgba(8, 34, 56, .7); }
.icn-art text { font-family: var(--f-body); }
.icn-art .icn-t-h { font: 700 15px/1 var(--f-display); fill: var(--icn-navy); }
.icn-art .icn-t-s { font-size: 11.5px; fill: #475569; }
.icn-art .icn-t-k { font: 700 10.5px/1 var(--f-body); letter-spacing: .08em; fill: #475569; }
.icn-art .icn-t-v { font: 600 12.5px/1 var(--f-body); fill: var(--icn-navy); }
.icn-art .icn-t-dim { font: 600 10px/1 var(--f-body); fill: #BFE0F7; letter-spacing: .04em; }
.icn-art .icn-t-chip { font: 700 10.5px/1 var(--f-body); fill: #7A4F00; }
.icn-art .icn-t-ok { font: 700 10.5px/1 var(--f-body); fill: #1F6A37; }
.icn-bp__bg { fill: var(--icn-bp); }
.icn-bp__minor { stroke: var(--icn-bp-line); stroke-width: 1; }
.icn-bp__major { stroke: var(--icn-bp-line2); stroke-width: 1; }
.icn-obj { fill: none; stroke: #CFE8FA; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icn-obj--thin { stroke-width: 1.2; stroke: #9CC9EA; }
.icn-obj--dim { stroke: #FFC94A; stroke-width: 1.2; stroke-dasharray: 4 4; }
.icn-obj--fill { fill: rgba(207, 232, 250, .08); }
.icn-clip__board { fill: #B98A4E; }
.icn-clip__paper { fill: #fff; }
.icn-clip__clamp { fill: #8E9AA8; }
.icn-clip__line { stroke: #E2E8F0; stroke-width: 1; }
.icn-clip__chip { fill: #FFF1CC; }
.icn-clip__ok { fill: #DCF3E4; }
.icn-clip__tick { fill: none; stroke: #1F6A37; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icn-clip { transform-box: fill-box; transform-origin: 50% 0; }
/* the drawing traces itself once (laptop and phone), never with reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .icn-art .icn-draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: icn-draw 1.6s cubic-bezier(.5, 0, .2, 1) .25s forwards; }
  .icn-art .icn-draw--2 { animation-delay: .7s; }
  .icn-art .icn-clip { animation: icn-swing 1.2s cubic-bezier(.3, 1.4, .5, 1) .1s both; }
  .icn-art .icn-stamp { opacity: 0; animation: icn-fade .4s ease 1.9s forwards; }
}
@keyframes icn-draw { to { stroke-dashoffset: 0; } }
@keyframes icn-swing { from { transform: rotate(-6deg) translateY(-10px); } to { transform: rotate(0) translateY(0); } }
@keyframes icn-fade { to { opacity: 1; } }

/* ---------- shared interactive shell ---------- */
.icn-box { margin-top: clamp(24px, 3vw, 36px); border: 1px solid var(--ifl-line); border-radius: 20px; background: #fff; box-shadow: var(--ifl-shadow); padding: clamp(16px, 2.4vw, 28px); }
.icn-box__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 14px; }
.icn-box__bar img { flex: none; }
.icn-box__bar b { font: 700 15px/1.2 var(--f-display); color: var(--ifl-ink); }
.icn-box__bar .ifl-sample { margin-left: auto; }
.icn-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.icn-pill { min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--ifl-line); background: #fff; color: var(--ifl-ink); font: 600 14.5px/1.2 var(--f-body); cursor: pointer; }
.icn-pill:hover { border-color: var(--icn-amber); }
.icn-pill[aria-pressed="true"] { background: var(--icn-navy); border-color: var(--icn-navy); color: #FFD36B; }
.icn-pill:focus-visible, .icn-btn:focus-visible, .icn-shuf__day:focus-visible { outline: 3px solid var(--ifl-accent-ink); outline-offset: 2px; }
.icn-btn { min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 0; background: var(--icn-amber); color: var(--icn-navy); font: 700 15px/1.2 var(--f-body); cursor: pointer; }
.icn-btn:hover { background: #F0A400; }
.icn-btn--ghost { background: transparent; border: 1.5px solid var(--ifl-line); color: var(--ifl-ink); }
.icn-btn--ghost:hover { background: var(--ifl-paper); }
.icn-hint { margin: 10px 0 0; font: 500 14px/1.5 var(--f-body); color: var(--ifl-muted); }

/* ---------- interactive 2: weather / delay shuffle (.icn-shuf) ---------- */
.icn-shuf__ctl { display: grid; gap: 12px; }
.icn-shuf__ctl p { margin: 0; font: 600 14px/1.4 var(--f-body); color: var(--ifl-ink); }
.icn-shuf__weeks { display: none; gap: 8px; margin: 14px 0 0; }
.icn-shuf__grid { display: none; }
.icn-shuf.is-js .icn-shuf__grid { display: grid; grid-template-columns: minmax(96px, 128px) repeat(var(--days, 10), minmax(0, 1fr)); gap: 4px; margin-top: 16px; }
.icn-shuf.is-js .icn-shuf__list { display: none; }
.icn-shuf__corner { font: 700 12px/1.3 var(--f-body); color: var(--ifl-muted); align-self: end; padding: 0 0 6px; }
.icn-shuf__day { min-height: 44px; padding: 6px 2px; border-radius: 10px; border: 1.5px dashed #CBD5E1; background: var(--ifl-paper); color: var(--ifl-ink); font: 700 12.5px/1.2 var(--f-body); cursor: pointer; text-align: center; }
.icn-shuf__day small { display: block; font-weight: 600; font-size: 11px; color: var(--ifl-muted); }
.icn-shuf__day:hover { border-color: var(--icn-amber); }
.icn-shuf__day.is-hit { border-style: solid; border-color: #C2410C; background: #FDE2DC; color: #9A2E12; }
.icn-shuf__day.is-hit small { color: #9A2E12; }
.icn-shuf__row { display: block; align-self: center; padding: 6px 8px 6px 0; font: 700 12.5px/1.25 var(--f-body); color: var(--ifl-ink); }
.icn-shuf__row small { display: block; font-weight: 500; color: var(--ifl-muted); }
.icn-shuf__cell { min-height: 64px; padding: 3px; border-radius: 8px; background: #F8FAFC; border: 1px solid #EEF2F6; display: grid; align-content: start; gap: 3px; }
.icn-shuf__cell.is-hit { background: repeating-linear-gradient(135deg, #FFF6E0 0 6px, #FFEBC2 6px 12px); border-color: #F5C26B; }
.icn-shuf__fill { display: block; padding: 3px 4px; border-radius: 5px; background: #9A2E12; color: #fff; font: 700 10.5px/1.2 var(--f-body); }
.icn-job { display: block; padding: 4px 5px; border-radius: 6px; background: #E8F1F8; border-left: 3px solid var(--icn-navy); color: var(--ifl-ink); font: 600 11px/1.25 var(--f-body); overflow-wrap: break-word; hyphens: auto; }
.icn-job--install { background: #FFF1CC; border-left-color: #B7791F; }
.icn-job.is-moved { background: #fff; border: 1.5px dashed #C2410C; border-left-width: 3px; }
.icn-job.is-moved::before { content: "Moved"; display: block; font: 700 9.5px/1.2 var(--f-body); color: #9A2E12; letter-spacing: .04em; text-transform: uppercase; }
@media (prefers-reduced-motion: no-preference) {
  .icn-job.is-moved { animation: icn-pop .45s cubic-bezier(.3, 1.5, .5, 1); }
}
@keyframes icn-pop { from { transform: scale(.85); opacity: .2; } to { transform: none; opacity: 1; } }
.icn-shuf__over { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #FDE2DC; color: #9A2E12; font: 600 13.5px/1.45 var(--f-body); }
.icn-shuf__over[hidden] { display: none; }
.icn-shuf__out { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.icn-shuf__sum { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--icn-navy); color: #E2E8F0; font: 500 14.5px/1.5 var(--f-body); }
.icn-shuf__sum b { color: #FFD36B; font: 700 22px/1.2 var(--f-display); display: block; }
.icn-shuf__texts { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.icn-shuf__texts li { padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #DDF3FB; color: #0A3A5C; font: 500 13.5px/1.45 var(--f-body); }
.icn-shuf__texts li b { display: block; font-size: 12px; color: #0A5C85; }
.icn-shuf__texts li.is-empty { background: var(--ifl-paper); color: var(--ifl-muted); border-radius: 14px; }
.icn-shuf__list { margin: 16px 0 0; padding: 0 0 0 18px; display: grid; gap: 4px; font-size: 15px; }
@media (max-width: 899px) {
  .icn-shuf.is-js .icn-shuf__weeks { display: flex; }
  .icn-shuf.is-js .icn-shuf__grid { grid-template-columns: minmax(78px, 96px) repeat(5, minmax(0, 1fr)); }
  .icn-shuf.is-js [data-week]:not(.is-week) { display: none; }
  .icn-shuf__out { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .icn-shuf.is-js .icn-shuf__grid { grid-template-columns: 52px repeat(5, minmax(0, 1fr)); gap: 3px; }
  .icn-shuf__corner { font-size: 10.5px; }
  .icn-shuf__row { font-size: 11px; padding-right: 2px; }
  .icn-shuf__row small { font-size: 10px; }
  .icn-job { font-size: 10.5px; padding: 3px 3px 3px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .icn-shuf__cell { min-width: 0; }
  .icn-job__k { display: none; }
  .icn-job.is-moved::before { content: "Moved"; font-size: 8.5px; letter-spacing: 0; }
  .icn-shuf__fill { font-size: 9.5px; padding: 2px 3px; }
  .icn-shuf__day { font-size: 11.5px; }
}

/* ---------- interactive 1: change-order ripple (.icn-rip) ---------- */
.icn-rip__chain { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--nodes, 5), minmax(0, 1fr)); gap: 12px; counter-reset: icnrip; }
.icn-rip__node { position: relative; padding: 14px 14px 16px; border-radius: 16px; border: 1.5px solid var(--ifl-line); background: #F8FAFC; transition: border-color .3s, background-color .3s, box-shadow .3s; }
.icn-rip__node::after { content: ""; position: absolute; top: 50%; right: -12px; width: 12px; height: 2px; background: #CBD5E1; }
.icn-rip__node:last-child::after { display: none; }
.icn-rip__app { display: flex; align-items: center; gap: 6px; font: 700 12px/1.2 var(--f-body); color: var(--ifl-muted); }
.icn-rip__node h3 { margin: 8px 0 4px; font: 700 15.5px/1.25 var(--f-display); color: var(--ifl-ink); }
.icn-rip__node p { margin: 0; font: 500 13.5px/1.45 var(--f-body); color: var(--ifl-body); }
.icn-rip__node .ifl-tag { margin-top: 8px; }
.icn-rip__status { display: block; margin-top: 8px; }
.icn-rip.is-js .icn-rip__node .icn-rip__status .ifl-tag--ok { display: none; }
.icn-rip.is-js .icn-rip__node.is-on .icn-rip__status .ifl-tag--ok { display: inline-block; }
.icn-rip.is-js .icn-rip__node.is-on .icn-rip__status .ifl-tag--wait { display: none; }
.icn-rip:not(.is-js) .icn-rip__status .ifl-tag--wait { display: none; }
.icn-rip.is-js .icn-rip__node.is-on { border-color: var(--icn-amber); background: #FFFBF0; box-shadow: 0 16px 30px -24px rgba(122, 79, 0, .7); }
.icn-rip.is-js .icn-rip__node.is-on::after { background: var(--icn-amber); }
.icn-rip [data-for] { display: block; }
.icn-rip.is-js [data-for]:not(.is-pick) { display: none; }
.icn-rip:not(.is-js) [data-for]::before { content: attr(data-for-label) ": "; font-weight: 700; }
.icn-rip__go { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.icn-rip:not(.is-js) .icn-rip__go, .icn-rip:not(.is-js) .icn-pills { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .icn-rip.is-js .icn-rip__node.is-on { animation: icn-pop .4s cubic-bezier(.3, 1.5, .5, 1); }
}
@media (max-width: 899px) {
  .icn-rip__chain { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .icn-rip__node::after { top: auto; bottom: -10px; left: 26px; right: auto; width: 2px; height: 10px; }
}

/* ---------- small cluster parts ---------- */
.icn-boundary { margin-top: 18px; }
