/* The product window (inc/product-window.php): one view with four tabs on the home page, or one
 * view on its own (.mini) beside text on an inner page. The tabs are radio inputs, so it works
 * without a script. Everything inside the window is sized in em from one font size tied to the
 * stage width. Every rule is scoped under .pv or .stage2, so the window's short class names
 * (.v, .btn, .tag, .note, .tr) never reach other content. */
:where(.pv, .stage2), :where(.pv, .stage2) *, :where(.pv, .stage2) *::before, :where(.pv, .stage2) *::after { box-sizing: border-box; }
.pv { margin-top: 48px; }
.pv > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pv .tabs { display: flex; gap: 8px; }
.pv .tabs label { padding: 11px 18px; border-radius: 999px; font-size: 15px; line-height: 1; background: rgb(14 19 17 / 0.05); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
.pv .tabs label:hover { background: rgb(14 19 17 / 0.09); }
#pv1:checked ~ .tabs [for=pv1], #pv2:checked ~ .tabs [for=pv2], #pv3:checked ~ .tabs [for=pv3], #pv4:checked ~ .tabs [for=pv4] { background: var(--pine); color: #fff; }
#pv1:focus-visible ~ .tabs [for=pv1], #pv2:focus-visible ~ .tabs [for=pv2], #pv3:focus-visible ~ .tabs [for=pv3], #pv4:focus-visible ~ .tabs [for=pv4] { outline: 2px solid var(--pine-line); outline-offset: 3px; }
.stage2 { position: relative; margin-top: 24px; aspect-ratio: 16 / 8.4; overflow: clip; background: #EFEFEC; container-type: inline-size; }
.stage2 > picture, .stage2 > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage2 .app { position: absolute; left: 10%; right: 10%; top: 9%; bottom: 9%; display: grid; grid-template-rows: auto 1fr; overflow: clip; background: #fff; border-radius: 0.9em; font-size: clamp(8px, 0.98cqw, 15px); line-height: 1.4; color: var(--ink);
	box-shadow: 0 0 0 1px rgb(14 19 17 / 0.06), 0 2em 4em -2em rgb(14 19 17 / 0.3), 0 7em 12em -5em rgb(14 19 17 / 0.34); }
.stage2 .a-top { display: flex; align-items: center; gap: 1.4em; height: 3.8em; padding: 0 1.4em; border-bottom: 1px solid rgb(14 19 17 / 0.07); }
.stage2 .a-brand { display: flex; align-items: center; gap: 0.6em; font-weight: 600; letter-spacing: -0.01em; }
.stage2 .a-brand img { display: block; width: auto; height: 1.5em; }
.stage2 .a-search { flex: 1; max-width: 34em; margin: 0 auto; padding: 0.62em 1em; border-radius: 0.7em; background: #F3F3F1; color: var(--ink-3); }
.stage2 .a-av { width: 2.2em; height: 2.2em; border-radius: 50%; display: grid; place-items: center; background: var(--pine); color: #fff; font-size: 0.85em; }
.stage2 .a-body { display: grid; grid-template-columns: 14.5em 1fr; min-height: 0; }
.stage2 .a-side { display: flex; flex-direction: column; gap: 0.2em; padding: 1.2em 0.9em; background: #F7F7F5; border-right: 1px solid rgb(14 19 17 / 0.06); }
.stage2 .a-side span { padding: 0.62em 0.85em; border-radius: 0.6em; color: var(--ink-2); }
.stage2 .a-side .a-new { margin-bottom: 0.8em; background: var(--pine); color: #fff; text-align: center; font-weight: 500; }
.stage2 .a-side .a-foot { margin-top: auto; font-size: 0.85em; color: var(--ink-3); }
#pv1:checked ~ .stage2 .s1, #pv2:checked ~ .stage2 .s2, #pv3:checked ~ .stage2 .s3, #pv4:checked ~ .stage2 .s4 { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgb(14 19 17 / 0.07), 0 0.2em 0.5em -0.2em rgb(14 19 17 / 0.16); }
.stage2 .a-main { position: relative; padding: 1.9em 2.1em; min-height: 0; overflow: clip; }
.stage2 .v { display: none; height: 100%; gap: 1.6em 2em; align-content: start; }
#pv1:checked ~ .stage2 .v1, #pv2:checked ~ .stage2 .v2, #pv3:checked ~ .stage2 .v3, #pv4:checked ~ .stage2 .v4 { display: grid; }
@media (prefers-reduced-motion: no-preference) { .stage2 .v { animation: sy-pv-in 0.5s var(--ease) both; } @keyframes sy-pv-in { from { opacity: 0; translate: 0 0.6em; } } }
.stage2 .v-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; }
.stage2 .v-head b { display: block; font-size: 1.45em; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.stage2 .v-head small { display: block; margin-top: 0.3em; font-size: 0.95em; color: var(--ink-3); }
.stage2 .btn { padding: 0.55em 1.05em; border-radius: 999px; border: 1px solid rgb(14 19 17 / 0.15); font-size: 0.92em; white-space: nowrap; }
.stage2 .btn.dark { background: var(--pine); border-color: var(--pine); color: #fff; }
.stage2 .tag { padding: 0.4em 0.85em; border-radius: 999px; font-size: 0.85em; white-space: nowrap; background: #FBF1DD; color: #7A5200; }
.stage2 .kv2 { display: flex; justify-content: space-between; gap: 1em; padding: 0.78em 0; border-top: 1px solid rgb(14 19 17 / 0.07); font-size: 0.95em; }
.stage2 .kv2 em { font-style: normal; color: var(--ink-3); }
/* Regulatory Packs */
.stage2 .v1 { grid-template-columns: 1.55fr 1fr; }
.stage2 .v1 .v-head, .stage2 .v1-grid { grid-column: 1; }
.stage2 .v1-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9em; }
.stage2 .pk { position: relative; display: grid; gap: 0.25em; padding: 1.1em 1.2em; border-radius: 0.8em; border: 1px solid rgb(14 19 17 / 0.09); }
.stage2 .pk b { font-size: 1.08em; font-weight: 500; }
.stage2 .pk small { font-size: 0.88em; color: var(--ink-3); }
.stage2 .pk em { position: absolute; top: 1.15em; right: 1.2em; font-style: normal; font-size: 0.82em; color: var(--ink-3); }
.stage2 .pk em.ok { color: var(--pine-line); }
.stage2 .pk.on { border-color: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.stage2 .pk.mine { background: #F7F7F5; border-style: dashed; }
.stage2 .v1-detail { grid-column: 2; grid-row: 1 / 3; align-self: start; padding: 1.4em; border-radius: 0.9em; background: #F7F7F5; }
.stage2 .v1-detail > b { font-size: 1.2em; font-weight: 500; }
.stage2 .v1-detail > small { display: block; margin-top: 0.2em; font-size: 0.88em; color: var(--ink-3); }
.stage2 .seg { margin-top: 1em; display: flex; gap: 0.3em; padding: 0.25em; border-radius: 0.7em; background: rgb(14 19 17 / 0.05); }
.stage2 .seg span { flex: 1; text-align: center; padding: 0.45em; border-radius: 0.5em; font-size: 0.88em; color: var(--ink-3); }
.stage2 .seg .on { background: #fff; color: var(--ink); box-shadow: 0 0.1em 0.3em rgb(14 19 17 / 0.1); }
.stage2 .v1-detail ul { list-style: none; margin: 1.1em 0 0; padding: 0; }
.stage2 .v1-detail li { display: flex; gap: 0.8em; padding: 0.8em 0; border-top: 1px solid rgb(14 19 17 / 0.07); font-size: 0.95em; }
.stage2 .v1-detail li i { flex: none; width: 1.05em; height: 1.05em; margin-top: 0.18em; border-radius: 0.3em; border: 1.5px solid var(--pine-line); }
/* Operators */
.stage2 .v2 { grid-template-columns: 1.6fr 1fr; }
.stage2 .v2 .v-head { grid-column: 1 / 3; }
.stage2 .v2-rec { display: flex; flex-direction: column; border: 1px solid rgb(14 19 17 / 0.09); border-radius: 0.9em; overflow: clip; }
.stage2 .rec-h { display: flex; gap: 0.9em; align-items: center; padding: 1.1em 1.3em; border-bottom: 1px solid rgb(14 19 17 / 0.07); }
.stage2 .ava { width: 2.5em; height: 2.5em; border-radius: 0.6em; display: grid; place-items: center; background: #E6EFEB; color: var(--pine-line); font-weight: 600; font-size: 0.9em; flex: none; }
.stage2 .rec-h b { display: block; font-weight: 500; }
.stage2 .rec-h small { font-size: 0.88em; color: var(--ink-3); }
.stage2 .chg { display: grid; grid-template-columns: 8.5em auto auto 1fr; gap: 0.8em; align-items: center; padding: 1em 1.3em; border-bottom: 1px solid rgb(14 19 17 / 0.06); }
.stage2 .chg em { font-style: normal; color: var(--ink-3); }
.stage2 .chg s { color: var(--ink-3); }
.stage2 .chg span { color: var(--ink-3); }
.stage2 .chg b { justify-self: start; padding: 0.15em 0.55em; border-radius: 0.4em; background: #E3F0EA; color: var(--pine); font-weight: 500; }
.stage2 .chg .w { grid-column: 2 / 5; }
.stage2 .bar { display: flex; align-items: center; gap: 0.7em; padding: 1em 1.3em; background: #F7F7F5; }
.stage2 .bar small { flex: 1; font-size: 0.9em; color: var(--ink-3); }
.stage2 .v2-why { align-self: start; padding: 1.4em; border-radius: 0.9em; background: #F7F7F5; }
.stage2 .v2-why > b { display: block; margin-bottom: 0.6em; font-weight: 500; }
/* Guided work */
.stage2 .v3 { grid-template-columns: 1fr 1.9fr; }
.stage2 .v3-steps { display: flex; flex-direction: column; }
.stage2 .v3-steps > small { margin-bottom: 0.5em; font-size: 0.9em; color: var(--ink-3); }
.stage2 .st { display: flex; align-items: center; gap: 0.8em; padding: 0.7em 0; color: var(--ink-3); }
.stage2 .st i { width: 1.85em; height: 1.85em; border-radius: 50%; display: grid; place-items: center; flex: none; font-style: normal; font-size: 0.82em; border: 1px solid rgb(14 19 17 / 0.22); }
.stage2 .st.done i { background: var(--ink-3); border-color: var(--ink-3); }
.stage2 .st.now { color: var(--ink); font-weight: 500; }
.stage2 .st.now i { border-color: var(--ink); }
.stage2 .o { margin: 0 0 0.5em 2.3em; padding: 0.8em 1em; border-radius: 0.7em; border: 1px solid rgb(14 19 17 / 0.12); font-size: 0.95em; }
.stage2 .o.on { border-color: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.stage2 .o small { display: block; font-size: 0.86em; color: var(--ink-3); }
.stage2 .v3-doc { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1em 1.4em; align-content: start; }
.stage2 .doc-h { grid-column: 1 / 3; display: flex; justify-content: space-between; align-items: baseline; gap: 1em; padding-bottom: 0.9em; border-bottom: 1px solid rgb(14 19 17 / 0.07); }
.stage2 .doc-h b { font-weight: 500; }
.stage2 .doc-h small { font-size: 0.88em; color: var(--ink-3); }
.stage2 .doc { display: flex; flex-direction: column; gap: 0.78em; padding-top: 0.5em; }
.stage2 .doc i { display: block; height: 0.5em; border-radius: 0.25em; background: rgb(14 19 17 / 0.09); }
.stage2 .doc i.h { height: 0.72em; background: rgb(14 19 17 / 0.2); margin: 0.5em 0 0.15em; }
.stage2 .doc i.a { background: rgb(46 140 105 / 0.34); }
.stage2 .doc i.g { background: rgb(201 145 32 / 0.38); }
.stage2 .notes { display: flex; flex-direction: column; gap: 0.8em; padding-top: 0.5em; }
.stage2 .note { padding: 0.9em 1em; border-radius: 0.7em; background: #F7F7F5; font-size: 0.92em; border-left: 0.25em solid var(--pine-line); }
.stage2 .note b { display: block; margin-bottom: 0.2em; font-size: 0.9em; font-weight: 500; color: var(--pine-line); }
.stage2 .note.gap { border-left-color: #C99120; }
.stage2 .note.gap b { color: #7A5200; }
.stage2 .note.ask { border-left-color: var(--ink-3); }
.stage2 .note.ask b { color: var(--ink-2); }
/* Decision records */
.stage2 .v4 { grid-template-columns: 1.75fr 1fr; }
.stage2 .v4 .v-head, .stage2 .tbl { grid-column: 1; }
.stage2 .tbl { font-size: 0.92em; }
.stage2 .tr { display: grid; grid-template-columns: 3.6em 1.7fr 1.1fr 1.1fr 1fr; gap: 1em; padding: 0.85em 0.8em; border-top: 1px solid rgb(14 19 17 / 0.07); }
.stage2 .tr.th { border-top: 0; padding-top: 0; font-size: 0.92em; color: var(--ink-3); }
.stage2 .tr.on { background: #F0F5F2; border-radius: 0.6em; border-top-color: transparent; }
.stage2 .tr.on + .tr { border-top-color: transparent; }
.stage2 .tr span:first-child { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stage2 .v4-card { grid-column: 2; grid-row: 1 / 3; align-self: start; padding: 1.4em; border-radius: 0.9em; background: #fff; box-shadow: 0 0 0 1px rgb(14 19 17 / 0.08), 0 1.2em 2.4em -1.2em rgb(14 19 17 / 0.28); }
.stage2 .v4-card .ttl { display: flex; align-items: center; gap: 0.6em; margin-bottom: 0.7em; font-size: 1.1em; font-weight: 500; }
.stage2 .v4-card .ttl svg { width: 1.3em; height: 1.3em; }
.stage2 .v4-card .btn { display: block; margin-top: 1em; text-align: center; }
/* The words under the view change with the tab. */
.pv .pv-text { margin-top: 32px; }
.pv .pv-text > div { display: none; grid-template-columns: 5fr 7fr; gap: 64px; align-items: baseline; }
#pv1:checked ~ .pv-text .d1, #pv2:checked ~ .pv-text .d2, #pv3:checked ~ .pv-text .d3, #pv4:checked ~ .pv-text .d4 { display: grid; }
.pv .pv-text h3 { margin: 0; font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; }
.pv .pv-text p { margin: 0; font-size: 17px; color: var(--ink-2); max-width: 50ch; }
/* The window rises and settles as it scrolls into view. The stage clips (never hides) its
 * overflow, so the view() timeline keeps the page as its scroller. */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.stage2 { perspective: 1800px; }
		.stage2 .app { transform-origin: 50% 100%; animation: sy-pv-lift linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
		@keyframes sy-pv-lift { from { transform: translateY(9%) rotateX(16deg) scale(0.93); } to { transform: none; } }
	}
}
@media (max-width: 900px) {
	/* Product view on a phone: the tabs wrap onto a second row so every tab stays in view (a
	 * sideways strip with a hidden scrollbar hid the last tab); the window drops its sidebar and
	 * side panels and uses a readable fixed size instead of scaling with the stage. */
	.pv { margin-top: 32px; }
	.pv .tabs { flex-wrap: wrap; }
	.pv .tabs label { padding: 10px 14px; font-size: 14px; }
	.stage2 { aspect-ratio: auto; margin: 16px calc(var(--gutter) * -1) 0; padding: 32px 14px 0; }
	.stage2 > picture img { object-position: 50% 30%; }
	.stage2 .app { position: relative; inset: auto; height: 500px; font-size: 12.5px; border-radius: 14px 14px 0 0; }
	.stage2 .a-search { display: none; }
	.stage2 .a-av { margin-left: auto; }
	.stage2 .a-body { grid-template-columns: 1fr; }
	.stage2 .a-side, .stage2 .v1-detail, .stage2 .v2-why, .stage2 .v4-card, .stage2 .doc { display: none; }
	.stage2 .a-main { padding: 1.4em 1.2em; }
	.stage2 .v1, .stage2 .v2, .stage2 .v3, .stage2 .v4, .stage2 .v3-doc { grid-template-columns: 1fr; }
	.stage2 .v2 .v-head, .stage2 .doc-h { grid-column: 1; }
	.stage2 .v-head .btn { display: none; }
	.stage2 .v1-grid { grid-template-columns: 1fr; gap: 0.6em; }
	.stage2 .pk { padding: 0.85em 1em; }
	.stage2 .chg { grid-template-columns: 7em auto auto 1fr; padding: 0.9em 1em; }
	.stage2 .bar { flex-wrap: wrap; }
	.stage2 .bar small { flex-basis: 100%; }
	.stage2 .v3 { gap: 1em; }
	.stage2 .v3-steps .st:nth-last-child(-n+2) { display: none; }
	.stage2 .tr { grid-template-columns: 3.2em 1.6fr 1fr; padding: 0.8em 0.5em; }
	.stage2 .tr span:nth-child(3), .stage2 .tr span:nth-child(4) { display: none; }
	.pv .pv-text { margin-top: 22px; }
	.pv .pv-text > div { grid-template-columns: 1fr; gap: 10px; }
	.pv .pv-text h3 { font-size: 24px; }
	.pv .pv-text p { font-size: 16px; }
}

/* One view on its own, beside text on an inner page: no tabs, no sidebar, a larger type size.
 * Markup: <div class="stage2 mini" aria-hidden="true"> backdrop picture, then .app holding
 * synainesi_product_top() and .a-body > .a-main > synainesi_product_view( 'vN' ). */
.mini.stage2 { margin-top: 0; aspect-ratio: 4 / 3; border-radius: 4px; }
.mini.stage2 .app { left: 7%; right: 7%; top: 8%; bottom: 8%; font-size: clamp(9px, 1.65cqw, 14px); }
.mini.stage2 .a-body { grid-template-columns: 1fr; }
.mini.stage2 .a-side, .mini.stage2 .a-search { display: none; }
.mini.stage2 .a-av { margin-left: auto; }
.mini.stage2 .v { display: grid; }
.mini.stage2 .v1 { grid-template-columns: 1fr; }
.mini.stage2 .v1-detail { display: none; }
.mini.stage2 .v2 { grid-template-columns: 1fr; }
.mini.stage2 .v2-why { display: none; }
.mini.stage2 .v3 { grid-template-columns: 1fr 1.6fr; }
.mini.stage2 .v3-doc { grid-template-columns: 1fr; }
.mini.stage2 .notes { display: none; }
.mini.stage2 .v4 { grid-template-columns: 1fr; }
.mini.stage2 .v4-card { display: none; }
.mini.stage2 .tr { grid-template-columns: 3.6em 1.7fr 1.1fr 1fr; }
.mini.stage2 .tr span:nth-child(4) { display: none; }
/* Models: the organisation's approved list. */
.stage2 .vm { display: grid; gap: 1.2em; align-content: start; }
.stage2 .mrow { display: grid; grid-template-columns: 2.4em 1fr auto; gap: 0.9em; align-items: center; padding: 0.95em 1.1em; border-radius: 0.8em; border: 1px solid rgb(14 19 17 / 0.09); }
.stage2 .mrow .ava { width: 2.4em; height: 2.4em; }
.stage2 .mrow b { display: block; font-weight: 500; }
.stage2 .mrow small { color: var(--ink-3); font-size: 0.88em; }
.stage2 .mrow em { font-style: normal; font-size: 0.85em; color: var(--pine-line); }
.stage2 .mrow.off { background: #F7F7F5; }
.stage2 .mrow.off em { color: var(--ink-3); }
@media (max-width: 960px) {
	.mini.stage2 { aspect-ratio: auto; padding: 24px 12px 0; margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
	.mini.stage2 .app { position: relative; inset: auto; height: auto; min-height: 340px; font-size: 12.5px; border-radius: 14px 14px 0 0; }
	.mini.stage2 .v3 { grid-template-columns: 1fr; }
	.mini.stage2 .v3-doc { display: none; }
}
