/**
 * Homepage 02: Results ("Receipts").
 * Desktop: design C board + gate-3 overrides (revenue tooltip, row order, tan "+").
 * Phone: design E receipt that prints on scroll (assets/js/home/02-results.js).
 * Desktop and phone share class names, so every rule sits in its own media query.
 */

/* ---------- Desktop (1024px and up) ---------- */

@media (min-width: 1024px) {
	.gs-home .gh-02 {
		box-sizing: border-box;
		min-height: 880px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 160px 0;
		background: var(--surface-bg);
		border-top: 1px solid var(--outline-low-em);
	}

	.gs-home .gh-02 .s02c-grid { display: grid; grid-template-columns: clamp(340px, 40vw, 420px) minmax(0, 1fr); column-gap: clamp(48px, 6vw, 84px); align-items: stretch; }
	.gs-home .gh-02 .s02c-head { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 100%; }
	.gs-home .gh-02 .s02c-h2 { margin-top: 20px; max-width: 420px; }
	.gs-home .gh-02 h2.disp { font-size: 44px; line-height: 1.15; }
	.gs-home .gh-02 p.s02c-intro { margin-top: 16px; max-width: 400px; font-size: 18px; line-height: 28px; text-wrap: pretty; }
	.gs-home .gh-02 .s02c-meta { padding-top: 20px; border-top: 1px solid var(--outline-low-em); }
	.gs-home .gh-02 .s02c-client { font-size: 15px; font-weight: 500; line-height: 23px; color: var(--text-high-em); }
	.gs-home .gh-02 .s02c-note { margin-top: 10px; font-size: 13px; line-height: 20px; color: var(--text-med-em); max-width: 400px; }

	.gs-home .gh-02 .s02c-board { background: var(--card-bg); border: 1px solid var(--outline-high-em); border-radius: var(--radius-20); padding: 4px 32px 8px; }
	.gs-home .gh-02 .s02c-table { width: 100%; border-collapse: collapse; }
	.gs-home .gh-02 .s02c-table th,
	.gs-home .gh-02 .s02c-table td { padding: 0; vertical-align: middle; }
	.gs-home .gh-02 .s02c-table thead th { height: 52px; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-med-em); border-bottom: 1px solid var(--outline-low-em); }
	.gs-home .gh-02 .s02c-table thead th:first-child { text-align: left; }
	.gs-home .gh-02 .s02c-table thead th:last-child { text-align: right; }
	.gs-home .gh-02 .s02c-table tbody tr + tr th,
	.gs-home .gh-02 .s02c-table tbody tr + tr td { border-top: 1px solid var(--outline-low-em); }
	.gs-home .gh-02 .s02c-table tbody th { height: 62px; text-align: left; font-size: 17px; font-weight: 500; line-height: 24px; color: var(--text-med-em); }
	.gs-home .gh-02 .s02c-table tbody td { text-align: right; white-space: nowrap; }
	.gs-home .gh-02 .s02c-fig { font-size: 34px; line-height: 1; }
	.gs-home .gh-02 .s02c-lead th,
	.gs-home .gh-02 .s02c-lead td { height: 104px; }
	.gs-home .gh-02 .s02c-lead th { font-size: 19px; line-height: 26px; color: var(--text-high-em); }
	.gs-home .gh-02 .s02c-lead .s02c-fig { font-size: 56px; }
	/* gate 3: "In revenue" is the last row, its label 20px below the line above it */
	.gs-home .gh-02 .s02c-table tbody tr.s02c-lead th { vertical-align: top; padding-top: 18.5px; box-sizing: border-box; }
	.gs-home .gh-02 .s02c-plus { color: var(--brand-tan); }

	/* gate 3: revenue note in an info tooltip next to "In revenue" */
	.gs-home .gh-02 .s02c-tipw { position: relative; display: inline-flex; align-items: center; vertical-align: middle; margin-left: 6px; }
	.gs-home .gh-02 .s02c-info { width: 28px; height: 28px; padding: 0; margin: -4px; border: 0; border-radius: 50%; background: none; display: flex; align-items: center; justify-content: center; color: var(--text-med-em); cursor: help; transition: color .2s ease; }
	.gs-home .gh-02 .s02c-info svg { width: 16px; height: 16px; display: block; }
	.gs-home .gh-02 .s02c-info:hover,
	.gs-home .gh-02 .s02c-info:focus-visible { color: var(--text-high-em); }
	.gs-home .gh-02 .s02c-info:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 50%; }
	.gs-home .gh-02 .s02c-pop { position: absolute; left: 50%; bottom: calc(100% + 12px); width: 300px; box-sizing: border-box; padding: 12px 16px; background: var(--page-bg); border: 1px solid var(--outline-low-em); border-radius: var(--radius-12); box-shadow: var(--elevation-e3); font-size: 14px; font-weight: 400; line-height: 20px; letter-spacing: 0; text-transform: none; color: var(--text-high-em); text-align: left; white-space: normal; opacity: 0; visibility: hidden; transform: translate(-112px, 4px); transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 5; pointer-events: none; }
	.gs-home .gh-02 .s02c-pop::after { content: ""; position: absolute; left: 112px; bottom: -6px; width: 10px; height: 10px; background: var(--page-bg); border-right: 1px solid var(--outline-low-em); border-bottom: 1px solid var(--outline-low-em); transform: translateX(-50%) rotate(45deg); }
	.gs-home .gh-02 .s02c-tipw:hover .s02c-pop,
	.gs-home .gh-02 .s02c-info:focus-visible + .s02c-pop { opacity: 1; visibility: visible; transform: translate(-112px, 0); }
	/* Esc dismisses it until the pointer leaves or focus moves (set by the script) */
	.gs-home .gh-02 .s02c-tipw[data-tip-off] .s02c-pop { opacity: 0; visibility: hidden; transform: translate(-112px, 4px); }
}

/* ---------- Phone (below 1024px): the receipt ---------- */

@media (max-width: 1023px) {
	.gs-home .gh-02 { width: 100%; background: var(--surface-bg); border-top: 1px solid var(--outline-low-em); padding: 112px 0; overflow: visible; overflow-x: clip; }
	.gs-home .gh-02 .w.s02c-wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 24px; }
	.gs-home .gh-02 .s02c-h2.t-2 { margin-top: 20px; max-width: 420px; font-size: 32px; line-height: 1.15; }
	.gs-home .gh-02 .s02c-intro.body { margin-top: 16px; max-width: 400px; font-size: 16px; line-height: 26px; text-wrap: pretty; }
	.gs-home .gh-02 .s02c-stage { position: relative; margin-top: 40px; }
	.gs-home .gh-02 .s02c-pin { width: 100%; max-width: 440px; }
	.gs-home .gh-02 .s02c-printer { position: relative; }
	.gs-home .gh-02 .s02c-slot { position: relative; z-index: 3; height: 64px; padding: 0 18px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #1a1c22; border: 1px solid var(--outline-high-em); border-radius: 16px; box-shadow: 0 14px 24px -14px rgba(0, 0, 0, .7); }
	.gs-home .gh-02 .s02c-cap { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-med-em); }
	.gs-home .gh-02 .s02c-cap-yr { font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .12em; color: var(--text-med-em); white-space: nowrap; }
	.gs-home .gh-02 .s02c-led { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--outline-high-em); transition: background-color .2s ease; }
	.gs-home .gh-02[data-printing] .s02c-led { background: var(--brand-primary-main); }
	.gs-home .gh-02[data-done] .s02c-led { background: var(--brand-tan); }
	.gs-home .gh-02 .s02c-slit { position: absolute; z-index: 4; left: 10px; right: 10px; bottom: 10px; height: 6px; border-radius: 3px; background: #121418; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .9); }
	.gs-home .gh-02 .s02c-feed { position: relative; z-index: 2; margin: -16px 14px 0; transition: transform .32s cubic-bezier(.32, .72, .33, 1); }
	.gs-home .gh-02[data-drag] .s02c-feed,
	.gs-home .gh-02[data-reset] .s02c-feed { transition: none; }

	.gs-home .gh-02 .s02c-paper { --cut: -16px; position: relative; padding: 26px 20px 18px; background: #20222b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .86 0 0 0 0 .66 0 0 0 0 .43 .22 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0/180px 180px; box-shadow: inset 1px 0 0 #333333, inset -1px 0 0 #333333; color: var(--text-high-em); clip-path: inset(-56px -24px var(--cut) -24px); }
	.gs-home .gh-02 .s02c-paper:focus { outline: none; }
	.gs-home .gh-02 .s02c-tail { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 48px; background: #20222b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .86 0 0 0 0 .66 0 0 0 0 .43 .22 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0/180px 180px; box-shadow: inset 1px 0 0 #333333, inset -1px 0 0 #333333; pointer-events: none; }
	.gs-home .gh-02[data-torn] .s02c-tail { visibility: hidden; }
	.gs-home .gh-02 .s02c-paper::after,
	.gs-home .gh-02 .s02c-paper::before { content: ""; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none; }
	.gs-home .gh-02 .s02c-paper::after { top: calc(100% - 1px); background: #20222b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .86 0 0 0 0 .66 0 0 0 0 .43 .22 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 100%/180px 180px; -webkit-mask: linear-gradient(135deg, #000 50%, transparent 50%) 0 0/12px 12px repeat-x, linear-gradient(225deg, #000 50%, transparent 50%) 0 0/12px 12px repeat-x; mask: linear-gradient(135deg, #000 50%, transparent 50%) 0 0/12px 12px repeat-x, linear-gradient(225deg, #000 50%, transparent 50%) 0 0/12px 12px repeat-x; }
	.gs-home .gh-02 .s02c-paper::before { bottom: calc(100% - 1px); opacity: 0; background: #20222b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .86 0 0 0 0 .66 0 0 0 0 .43 .22 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0/180px 180px; -webkit-mask: linear-gradient(45deg, #000 50%, transparent 50%) 0 0/12px 12px repeat-x, linear-gradient(315deg, #000 50%, transparent 50%) 0 0/12px 12px repeat-x; mask: linear-gradient(45deg, #000 50%, transparent 50%) 0 0/12px 12px repeat-x, linear-gradient(315deg, #000 50%, transparent 50%) 0 0/12px 12px repeat-x; }
	.gs-home .gh-02[data-torn] .s02c-feed { transform: translateY(84px) rotate(-1.2deg); }
	.gs-home .gh-02[data-torn] .s02c-paper::before { opacity: 1; }

	.gs-home .gh-02 .s02c-client { font-size: 14px; font-weight: 600; line-height: 20px; text-align: center; color: var(--text-high-em); text-wrap: balance; }
	.gs-home .gh-02 .s02c-dash { height: 0; margin: 14px 0 4px; border: 0; border-top: 1px dashed #595959; background: none; }
	.gs-home .gh-02 .s02c-items { margin: 0; }
	.gs-home .gh-02 .s02c-item { display: flex; align-items: flex-end; gap: 8px; padding: 9px 0; }
	.gs-home .gh-02 .s02c-lbl { flex: 0 1 auto; font-size: 15px; font-weight: 500; line-height: 20px; color: var(--text-med-em); }
	.gs-home .gh-02 .s02c-lead { flex: 1 1 16px; min-width: 16px; margin-bottom: 5px; }
	.gs-home .gh-02 .s02c-val { flex: none; font-size: 22px; line-height: 24px; }
	.gs-home .gh-02 .s02c-perf { position: relative; height: 24px; margin: 6px -20px 2px; }
	.gs-home .gh-02 .s02c-perf::before { content: ""; position: absolute; left: 18px; right: 18px; top: 50%; border-top: 2px dashed #595959; }
	.gs-home .gh-02 .s02c-perf::after { content: ""; position: absolute; left: -9px; right: -9px; top: 50%; height: 18px; margin-top: -9px; background: radial-gradient(circle at 9px 50%, #131419 8.5px, transparent 9px), radial-gradient(circle at calc(100% - 9px) 50%, #131419 8.5px, transparent 9px); }
	.gs-home .gh-02 .s02c-total { position: relative; padding: 10px 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
	.gs-home .gh-02 .s02c-tlbl { margin: 0; white-space: nowrap; font-size: 11px; font-weight: 700; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-high-em); }
	.gs-home .gh-02 .s02c-tfig { flex: none; margin: 0; font-size: clamp(32px, calc((100vw - 238px) / 3.3), 44px); line-height: 1; letter-spacing: -.045em; text-align: right; white-space: nowrap; transition: transform .38s cubic-bezier(.34, 1.5, .64, 1); }
	.gs-home .gh-02 .s02c-plus { color: var(--brand-tan); }
	.gs-home .gh-02 .s02c-dbl { height: 4px; margin: 14px 0 12px; border-top: 1px solid #595959; border-bottom: 1px solid #595959; }
	.gs-home .gh-02 .s02c-fine p { font-size: 12px; line-height: 18px; color: var(--text-low-em); text-align: center; text-wrap: balance; }
	.gs-home .gh-02 .s02c-nw { white-space: nowrap; }
	.gs-home .gh-02 .s02c-code { display: flex; justify-content: center; margin-top: 16px; color: var(--text-med-em); opacity: .75; }
	.gs-home .gh-02 .s02c-code svg { display: block; width: 168px; height: 20px; fill: currentColor; }

	/* info popover on the revenue row */
	.gs-home .gh-02 .s02c-trow { flex: none; display: flex; align-items: center; gap: 2px; margin: -14px 0 -14px; }
	.gs-home .gh-02 .s02c-tipw { position: relative; display: inline-flex; }
	.gs-home .gh-02 .s02c-info { flex: none; width: 44px; height: 44px; padding: 0; margin: 0 -12px 0 -8px; border: 0; border-radius: 50%; background: none; display: flex; align-items: center; justify-content: center; color: var(--text-high-em); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .2s ease; }
	.gs-home .gh-02 .s02c-info svg { width: 16px; height: 16px; display: block; }
	.gs-home .gh-02 .s02c-info[aria-expanded="true"] { color: var(--brand-tan); }
	.gs-home .gh-02 .s02c-pop { --ax: 24px; position: absolute; z-index: 6; left: 0; bottom: calc(100% + 2px); width: 100%; max-width: 340px; box-sizing: border-box; display: flex; align-items: flex-start; gap: 4px; padding: 14px 6px 14px 16px; background: #131419; border: 1px solid #595959; border-radius: 12px; box-shadow: 0 18px 32px -10px rgba(0, 0, 0, .7); opacity: 0; visibility: hidden; transform: scale(.9) translateY(6px); transform-origin: var(--ax) 100%; transition: opacity .22s ease, transform .3s cubic-bezier(.32, .72, .33, 1), visibility 0s linear .3s; }
	.gs-home .gh-02[data-pop] .s02c-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .3s cubic-bezier(.32, .72, .33, 1), visibility 0s linear 0s; }
	.gs-home .gh-02 .s02c-pop::after { content: ""; position: absolute; left: var(--ax); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: #131419; border-right: 1px solid #595959; border-bottom: 1px solid #595959; transform: rotate(45deg); }
	.gs-home .gh-02 .s02c-pop-t { flex: 1; padding-top: 2px; font-size: 14px; font-weight: 400; line-height: 20px; letter-spacing: 0; text-transform: none; color: var(--text-high-em); text-wrap: pretty; }
	.gs-home .gh-02 .s02c-x { flex: none; width: 44px; height: 44px; margin: -10px 0 -10px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-med-em); display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.gs-home .gh-02 .s02c-x svg { width: 16px; height: 16px; }
	.gs-home .gh-02 .s02c-x:hover { color: var(--text-high-em); }

	/* printing: lines stay clipped until the paper has fed past them (modes set by the script) */
	.gs-home .gh-02 .s02c-ln { transition: clip-path .3s cubic-bezier(.32, .72, .33, 1), opacity .3s ease; }
	.gs-home .gh-02[data-mode="pin"] .s02c-ln:not([data-ink]),
	.gs-home .gh-02[data-mode="flow"] .s02c-ln:not([data-ink]) { clip-path: inset(0 100% 0 0); opacity: .2; }
	.gs-home .gh-02[data-mode="static"] .s02c-ln { transition: none; }
	.gs-home .gh-02[data-mode="pin"] .s02c-total:not([data-ink]) .s02c-tfig,
	.gs-home .gh-02[data-mode="flow"] .s02c-total:not([data-ink]) .s02c-tfig { transform: scale(.92); transform-origin: 100% 100%; }
	.gs-home .gh-02 .s02c-hint { position: absolute; left: 0; right: 0; top: 92px; display: none; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-med-em); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
	.gs-home .gh-02 .s02c-hint svg { width: 16px; height: 16px; }
	.gs-home .gh-02[data-mode="pin"] .s02c-hint,
	.gs-home .gh-02[data-mode="flow"] .s02c-hint { display: flex; }
	.gs-home .gh-02[data-empty] .s02c-hint { opacity: 1; }

	/* tear off + print again */
	.gs-home .gh-02 .s02c-ctl { position: relative; height: 48px; margin-top: 26px; display: flex; justify-content: center; }
	.gs-home .gh-02 .s02c-btn { position: absolute; top: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border: 1px solid var(--outline-high-em); border-radius: 100px; background: #1a1c22; color: var(--text-high-em); font: 600 14px/20px var(--font-body); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: opacity .25s ease, transform .25s cubic-bezier(.32, .72, .33, 1), border-color .2s ease, visibility 0s linear .25s; opacity: 0; visibility: hidden; transform: translateY(-6px); }
	.gs-home .gh-02 .s02c-btn.s02c-again { left: 50%; top: 70px; z-index: 5; height: 44px; margin-left: -74px; width: 148px; padding: 0; }
	.gs-home .gh-02 .s02c-btn svg { width: 18px; height: 18px; color: var(--brand-tan); }
	.gs-home .gh-02 .s02c-btn:hover,
	.gs-home .gh-02 .s02c-btn:focus { background: #1a1c22; color: var(--text-high-em); }
	.gs-home .gh-02 .s02c-btn:hover { border-color: var(--brand-tan); }
	.gs-home .gh-02 .s02c-tear { touch-action: none; user-select: none; -webkit-user-select: none; }
	.gs-home .gh-02[data-done]:not([data-torn]) .s02c-tear,
	.gs-home .gh-02[data-torn] .s02c-again { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s cubic-bezier(.32, .72, .33, 1), border-color .2s ease, visibility 0s linear 0s; }
	.gs-home .gh-02[data-drag] .s02c-tear { transition: none; }
	.gs-home .gh-02[data-armed] .s02c-tear { border-color: var(--brand-primary-main); }
}

@media (min-width: 600px) and (max-width: 1023px) {
	.gs-home .gh-02 .s02c-pin { max-width: 420px; }
}

@media (prefers-reduced-motion: reduce) {
	.gs-home .gh-02 .s02c-feed,
	.gs-home .gh-02 .s02c-ln,
	.gs-home .gh-02 .s02c-btn { transition: none !important; }
}
