/**
 * The Wicked — Reveal List (tw-reveal-list).
 * A master list of rows plus a linked detail pane, from design-reference/studio-v04.html
 * (the belief list L483-501 and the proof list L575-598 — one abstraction, two payloads).
 *
 * ── TWO BEHAVIOURS THAT ARE CORRECT, NOT DEFECTS ──────────────────────────────
 * 1. THE PANE BOX IS AS TALL AS ITS TALLEST PANEL. Every panel is rendered
 *    server-side into ONE grid cell (`grid-area:1/1`) and cross-faded on opacity.
 *    That is the point: the page does not jump when the reader changes rows, at
 *    any width, with no JS height pinning. Do not `display:none` an inactive
 *    panel — it would collapse the shared cell and reintroduce the jump.
 * 2. ON A PHONE A TAP SCROLLS NOTHING BY ITSELF, because the pane sits below the
 *    list once stacked. Mitigated only by the narrow scrollIntoView nudge in
 *    widget-reveal-list.js, which fires on a pointer activation, only when the
 *    list is actually stacked, and only when the pane is fully off-screen.
 *
 * ── THREE OWNERS OF `grid-template-columns`, ONE BAND EACH ────────────────────
 *   Desktop    `list_ratio`  — the control's own declaration, (0,4,0), un-mediated.
 *   768-1024   `stack_at` at the Tablet tab — (0,5,0) via `.tw-rl.tw-rl`, inside
 *              Elementor's `@media(max-width:1024px)`. No default at any breakpoint.
 *   <=767      THIS FILE, by setting `--tw-rl-tracks` — see the block at the end.
 * A stylesheet rule can never OUT-RANK a control's declaration; it can always
 * change what that declaration READS. That is why the composed track list lives
 * inside `var(--tw-rl-tracks, …)` and why the fallback below must stay in sync
 * with `list_ratio`'s default (0.82fr). PROJECT-NOTES §6a.
 *
 * ── TWO PROPERTIES THIS FILE SHARES WITH A CONTROL (0.4.3) ────────────────────
 *   `order`    — NOTHING here declares it, at any width. `pane_first` owns it
 *                outright, and that is deliberate: putting the pane above the
 *                list at <=767 must NOT become a fourth owner of
 *                `grid-template-columns` (see the three above).
 *   `row-gap`  — this file's `row-gap:48px` on .tw-rl owns desktop and tablet.
 *                `stack_gap` (no default at any breakpoint) writes the same
 *                property at (0,4,0) only on instances that set it, and the
 *                page sets it at Mobile only. `row-gap`, never the `gap`
 *                shorthand: that would flatten the column gap's clamp().
 *
 * ── A NOTE ON THE DUPLICATED DEFAULTS IN THIS FILE ────────────────────────────
 * Several declarations here repeat a control's default value (the panel fade
 * duration, the statement/body max-widths, the media aspect ratio). Those are
 * graceful-degradation fallbacks, not live rules — the control compiles at
 * (0,4,0) and wins. They are safe ONLY because no media query in this file tries
 * to change the same property. Where one would have (the active dash width at
 * <=767), the property is owned by the control at both breakpoints instead and
 * there is no rule here at all. Never add a media query for a property a control
 * already writes without re-reading PROJECT-NOTES §6a first.
 */

.tw-rl {
	display: grid;
	/* Fallback MUST match list_ratio's default. */
	grid-template-columns: var(--tw-rl-tracks, minmax(0, .82fr) minmax(0, 1fr));
	column-gap: clamp(48px, 6vw, 96px);   /* DESIGN-GUIDELINES §4, the recurring grid */
	row-gap: 48px;                        /* only observed once stacked */
	align-items: start;
	width: 100%;
}

.tw-rl__list { min-width: 0; }

/* Longhands, never the `border` shorthand: a shorthand built from a var that
   fails to resolve computes to `none` and vanishes silently (PROJECT-NOTES §6b). */
.tw-rl__rows {
	border-top-width: 1px;
	border-top-style: solid;
	border-top-color: var(--e-global-color-cdc1318, rgba(255, 255, 255, .09));
}

/* --- one row --------------------------------------------------------------
   The TRACK LIST is a static stylesheet var driven by the root modifier
   classes. No control writes `grid-template-columns` on .tw-rl__row, so the
   stylesheet owns this property outright — unlike .tw-rl, where list_ratio
   does. Do not add a control for it without re-reading PROJECT-NOTES §6a.

   Rows are real <button type="button"> elements: Enter and Space activation,
   a focus ring and AT semantics for free. The reference hand-rolled all of
   that on a <div role="button">; this does not copy it. */
.tw-rl__row {
	display: grid;
	grid-template-columns: var(--tw-rl-row-tracks, 36px minmax(0, 1fr));
	column-gap: var(--tw-rl-row-gap, 0px);
	align-items: center;
	width: 100%;
	min-height: 44px;                    /* §8 hit-target floor — guards row_padding:0 */
	margin: 0;
	padding: 24px 8px;                   /* row_padding overrides the y */
	appearance: none;
	background: none;
	border: 0;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: var(--e-global-color-cdc1318, rgba(255, 255, 255, .09));
	font: inherit;
	color: inherit;
	/* ⛔ NOT DECORATION — THIS UNDOES A THEME RESET. Hello Elementor's reset.css
	   ships `[type=button],[type=submit],button{ … white-space:nowrap}`, and this
	   row IS a real <button type="button">. Without this line `nowrap` inherits
	   into .tw-rl__title and the title can never wrap AT ANY WIDTH: measured on
	   654, every row of section 5 painted 318-324px past its own grid track and
	   directly on top of the meta text at 2277, and 164px of sideways page scroll
	   at 390. It is invisible to getBoundingClientRect() — the span reports its
	   TRACK, not its ink. The other five properties above (font/background/border/
	   color/text-align) cancel the same reset; this one was missed.
	   ⚠️ The ROW's meta span keeps its own `nowrap` (see .tw-rl__meta) — that one
	   is in the reference and is wanted. */
	white-space: normal;
	text-align: left;
	cursor: pointer;
	transition: background .3s ease;     /* §6 standard */
}

.tw-rl--indexed             { --tw-rl-row-tracks: 36px 42px minmax(0, 1fr); }
.tw-rl--meta                { --tw-rl-row-tracks: 36px minmax(0, 1fr) auto; --tw-rl-row-gap: 16px; }
.tw-rl--indexed.tw-rl--meta { --tw-rl-row-tracks: 36px 42px minmax(0, 1fr) auto; --tw-rl-row-gap: 16px; }

/* (0,3,0) ON PURPOSE. Hello Elementor paints every <button> pink on hover and
   focus; shared.css cancels that with `.tw-scope button:hover{background:none}`
   at (0,2,1). Our row WANTS a hover tint, so this must out-rank the reset. An
   unprefixed `.tw-rl__row:hover` is (0,1,1) and would lose — silently, with the
   tint simply absent. (row_hover_bg's own declaration is (0,5,0) and wins over
   both; this is the fallback.) */
.tw-rl .tw-rl__row:hover { background: rgba(177, 128, 81, .05); }

/* outline-offset is NEGATIVE, not the guidelines' +3px: §8's ring is specified
   for inset elements, and on a full-width row with a bottom hairline an outset
   ring overlaps the neighbouring row. Deliberate adaptation. Never removed. */
.tw-rl .tw-rl__row:focus-visible {
	outline: 2px solid var(--tw-tan-hi, #c9a074);
	outline-offset: -2px;
}

/* The dash's INACTIVE width is owned here; its ACTIVE width is owned entirely by
   the `dash_length` control (desktop 24px, mobile 20px, via a mobile_default).
   There is deliberately no `.is-active` width rule in this file at any width —
   the control compiles at (0,4,0) and one here could never apply. */
.tw-rl__dash {
	display: block;
	height: 1px;
	width: 0;
	background: var(--e-global-color-accent, #B18051);
	transition: width .3s ease;
}

.tw-rl__num {
	font-family: var(--e-global-typography-text-font-family, 'Inter', sans-serif);
	font-size: 12px;
	letter-spacing: .14em;
	font-variant-numeric: tabular-nums;
	color: var(--e-global-color-eda52f2, #86837c);
	transition: color .3s ease;
}

/* `min-width:0` + `overflow-wrap` are the second half of the white-space fix on
   .tw-rl__row, not extras. A grid item's automatic minimum size is min-content,
   so even with wrapping allowed the item can still push past a `minmax(0,1fr)`
   track when one word is longer than the track; min-width:0 removes that floor
   and overflow-wrap breaks the word instead. Together they make "the title
   overflows its track" unreachable for any string an editor can type. */
.tw-rl__title {
	font-family: var(--e-global-typography-secondary-font-family, 'Cormorant Garamond', serif);
	font-weight: 600;
	font-size: 1.5rem;
	line-height: 1.15;
	min-width: 0;
	overflow-wrap: break-word;
	color: var(--e-global-color-0c2c23a, #9d9a92);
	transition: color .3s ease;
}

.tw-rl__meta {
	font-family: var(--e-global-typography-text-font-family, 'Inter', sans-serif);
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--e-global-color-eda52f2, #86837c);
}

.tw-rl__foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 8px 0;
}

.tw-rl__counter,
.tw-rl__hint {
	font-family: var(--e-global-typography-text-font-family, 'Inter', sans-serif);
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--e-global-color-eda52f2, #86837c);
}

.tw-rl__counter { font-variant-numeric: tabular-nums; }

/* --- the pane: every panel in ONE cell ------------------------------------ */
.tw-rl__pane {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	min-width: 0;
}

.tw-rl__panel {
	grid-area: 1 / 1;
	opacity: 0;
	pointer-events: none;
	/* Longhands, not the `transition` shorthand — a shorthand re-sets duration and
	   would silently cancel the reduced-motion block at the end of this file. */
	transition-property: opacity;
	transition-timing-function: ease;
	transition-duration: 450ms;          /* fade_speed overrides */
}

.tw-rl__panel.is-active {
	opacity: 1;
	pointer-events: auto;
}

.tw-rl__statement {
	margin: 0;
	font-family: var(--tw-font-display);
	font-weight: 500;
	font-style: italic;
	font-size: clamp(1.75rem, 3.2vw, 2.6rem);
	line-height: 1.32;
	letter-spacing: -.01em;
	color: var(--e-global-color-secondary, #e9e6df);
	max-width: 560px;
}

.tw-rl__body {
	margin: 28px 0 0;
	font-family: var(--tw-font-body);
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--e-global-color-0c2c23a, #9d9a92);
	max-width: 440px;
}

.tw-rl__media {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 9;
	background: #0c0c0e;
	overflow: hidden;
}

/* Elementor forces `.elementor img{height:auto;max-width:100%}` at (0,1,1), so
   this is prefixed to (0,2,0) (PROJECT-NOTES §6b). */
.tw-rl .tw-rl__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	/* Carries the linked image's hover brightness below. Longhands, never the
	   `transition` shorthand: a shorthand re-sets duration and would silently
	   cancel the reduced-motion block at the end of this file (§6b). */
	transition-property: filter;
	transition-duration: .3s;
	transition-timing-function: ease;
}

/* ---- The optional per-row image link (0.4.45) ----------------------------
   THE ANCHOR FILLS THE WELL rather than hugging the <img>. The image is the
   only in-flow content of an aspect-ratio box, so an inline anchor around it
   would leave the well's own surface — the `media_bg` colour, visible while
   the image loads and behind anything that does not fill it — unclickable.
   ⚠️ IT SITS UNDER THE TICK AND THE CAPTION AND STILL RECEIVES THEIR CLICKS.
   Both are position:absolute overlays carrying `pointer-events: none` (see
   their rules below), so every click on the visible image reaches this anchor.
   Both also come AFTER it in document order, so they still PAINT on top: no
   z-index is needed here and adding one would only start a fight.
   ⚠️ NO CONTROL WRITES ANY PROPERTY IN THIS BLOCK. The two controls on this
   subtree write `aspect-ratio` and `background-color`, both on .tw-rl__media
   (§6a), so nothing here is out-ranked at (0,4,0). */
.tw-rl__link {
	position: absolute;
	inset: 0;
	display: block;
}

/* The house treatment of a project card image is tw-work-grid's `brighten` —
   the one hover effect that widget ships switched ON, `filter: brightness(1.1)`
   (widget-work-grid.css). Applied to the PHOTOGRAPH and not to the well, so the
   bronze tick and the caption keep their own colour, which is that file's stated
   reason for the same choice.
   ⚠️ Deliberately not gated behind `@media (hover: hover)`, matching
   tw-work-grid: a sticky :hover after a tap is harmless where a missing
   affordance on a hybrid device is not. */
.tw-rl .tw-rl__link:hover .tw-rl__img,
.tw-rl .tw-rl__link:focus-visible .tw-rl__img {
	filter: brightness(1.1);
}

/* ⛔ THE RING IS INSET, AND IT HAS TO BE. .tw-rl__media is `overflow: hidden`,
   so a positive outline-offset on a child filling it is CLIPPED AWAY ENTIRELY —
   a focus indicator that exists in the cascade and paints nothing. Same shape,
   and the same class of reason, as .tw-rl__row:focus-visible above. */
.tw-rl .tw-rl__link:focus-visible {
	outline: 2px solid var(--tw-tan-hi, #c9a074);
	outline-offset: -2px;
}

/* DESIGN-GUIDELINES §5.8, verbatim. Longhands so an unresolved var cannot take
   the whole border with it. */
.tw-rl__tick {
	position: absolute;
	top: 26px;
	left: 26px;
	width: 20px;
	height: 20px;
	border-top-width: 1px;
	border-top-style: solid;
	border-top-color: var(--e-global-color-accent, #B18051);
	border-left-width: 1px;
	border-left-style: solid;
	border-left-color: var(--e-global-color-accent, #B18051);
	pointer-events: none;
}

/* ⛔ THE FIVE `inherit`s UNDO A THEME RESET — this element is a <figcaption> and
   Hello Elementor's reset.css ships
   `figcaption{color:#333;font-size:16px;font-style:italic;font-weight:400;line-height:1.4}`.
   All five are INHERITED properties, so they reach both caption spans below
   whether or not those spans declare them. Measured on 654 before this block:
   both spans rendered ITALIC when nothing asked for it, and `line-height:1.4`
   leaked into .tw-rl__cap-meta as 15.4px on an 11px font. The reference's caption
   is a plain <div> and is upright (studio-v04.html L593-595). Resetting here, at
   the element the theme actually targets, is the fix; adding `font-style:normal`
   to each span would leave the next span anyone adds broken again.
   ⚠️ `inherit` and not literal values: the point is to make this box transparent
   to the cascade so the widget's own rules and the kit are what decide. */
.tw-rl__cap {
	color: inherit;
	font-size: inherit;
	font-style: inherit;
	font-weight: inherit;
	line-height: inherit;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px 24px;
	pointer-events: none;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	background: linear-gradient(0deg, rgba(8, 8, 10, .85) 0%, rgba(8, 8, 10, 0) 100%);
}

.tw-rl__cap-name {
	font-family: var(--e-global-typography-secondary-font-family, 'Cormorant Garamond', serif);
	font-weight: 600;
	font-size: 1.25rem;
	line-height: 1.2;
	min-width: 0;
	overflow-wrap: break-word;
	color: var(--e-global-color-secondary, #e9e6df);
}

/* ⚠️ NO `white-space: nowrap` HERE, AND ITS REMOVAL IS DELIBERATE (0.4.2).
   It used to carry one, and three things were wrong with it. The reference does
   not: only the ROW's category span is nowrap (studio-v04.html L582); the
   caption's is not (L595). It was HIDING CONTENT — the caption sits inside
   .tw-rl__media, which is `overflow:hidden`, so at 390 the meta was clipped
   mid-word with 200px of text unreachable, and at 600 it escaped its own
   figcaption by 26px. And `normal` does not force a wrap, it only permits one:
   at every width where the caption row has room the render is byte-identical to
   nowrap, which the before/after ink measurements at 2277/1440/1024/768 confirm.
   The row meta (.tw-rl__meta) keeps its nowrap — different element, and there
   the reference asks for it.
   ⚠️ `line-height: normal` IS PART OF THE SAME REPAIR, and it is stated rather
   than inherited. The theme was leaking 1.4 (15.4px on 11px); removing that leak
   left this span inheriting the KIT's body line-height, 1.7 — looser still, and
   now visible because the meta may take two lines. The reference declares no
   line-height on this span and its body declares none either (studio-v04.html
   L431), so `normal` is the reference value. Stating it here also makes the span
   independent of whatever line-height an ancestor happens to carry. */
.tw-rl__cap-meta {
	font-family: var(--e-global-typography-text-font-family, 'Inter', sans-serif);
	font-size: 11px;
	line-height: normal;
	letter-spacing: .2em;
	text-transform: uppercase;
	min-width: 0;
	overflow-wrap: break-word;
	color: var(--e-global-color-0c2c23a, #9d9a92);
}

/* --- <=767: this file owns the split outright -----------------------------
   `width:100%` is not decoration. A widget is a stretch-sized flex item of
   `.e-con-inner`, so anything inside it that derives size from width (the
   media well's aspect-ratio, here) resolves against MAX-CONTENT. The same
   declaration on `.elementor-widget-container` does nothing. The page must
   also set `flex_align_items: stretch` on the parent container — both are
   needed (PROJECT-NOTES §6b).
   ⚠️ THE `auto` META TRACK IN THIS QUERY IS THE DESIGN'S, NOT A FALLBACK. An
   earlier version of this block dropped the meta onto its own row with
   `grid-row:2`; design-reference/studio-mobile-v02.html L599 keeps it INLINE on
   the row (`28px minmax(0,1fr) auto; gap:0 12px`) and the row meta's own
   `nowrap` is what makes that safe. Do not "restore" the dropped row on seeing
   a narrow title — .tw-rl__title wraps (min-width:0 + overflow-wrap) instead.
   ⚠️ `row-gap` in this band belongs to the `stack_gap` control on instances
   that set it; the file's own `row-gap:48px` still owns desktop and tablet. */
@media (max-width: 767px) {
	.tw-rl {
		--tw-rl-tracks: minmax(0, 1fr);
		width: 100%;
	}

	.tw-rl--indexed             { --tw-rl-row-tracks: 28px 36px minmax(0, 1fr); }
	.tw-rl--meta                { --tw-rl-row-tracks: 28px minmax(0, 1fr) auto; --tw-rl-row-gap: 12px; }
	.tw-rl--indexed.tw-rl--meta { --tw-rl-row-tracks: 28px 36px minmax(0, 1fr) auto; --tw-rl-row-gap: 12px; }

	/* The mobile design's own pair (L591); the desktop 26/26/20/20 above is
	   DESIGN-GUIDELINES §5.8 verbatim and is untouched. */
	.tw-rl__tick { top: 18px; left: 18px; width: 16px; height: 16px; }
}

/* --- LAST IN THE FILE, root-prefixed, !important --------------------------
   Prefixing reaches (0,2,0), which beats other rules in this file — but
   `fade_speed` writes `transition-duration` at (0,4,0) and no stylesheet
   specificity can reach it. `!important` is unavoidable, exactly as in
   tw-work-accordion. ⚠️ Do NOT restate a `transition:` shorthand anywhere
   after this block: a shorthand re-sets duration and cancels it silently.
   The dash's FINAL width still communicates the selection, so zeroing the
   growth loses no information. */
@media (prefers-reduced-motion: reduce) {
	.tw-rl .tw-rl__panel,
	.tw-rl .tw-rl__row,
	.tw-rl .tw-rl__img,
	.tw-rl .tw-rl__dash { transition-duration: 0s !important; }
}
