/* ==========================================================================
   Corrie — ski & mountain resort theme
   Tokens come from theme.json (--wp--preset--*). Modern CSS throughout:
   nesting, light-dark(), oklch/color-mix, container queries, :has(),
   scroll-driven animations, @starting-style popovers, view transitions.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
	color-scheme: light dark;
	--snow: var(--wp--preset--color--snow, #f5f7fa);
	--frost: var(--wp--preset--color--frost, #e7edf4);
	--ink: var(--wp--preset--color--ink, #0c1626);
	--slate: var(--wp--preset--color--slate, #40506a);
	--signal: var(--wp--preset--color--signal, #ff5a1f);
	--g: var(--wp--preset--color--green, #1f9d55);
	--b: var(--wp--preset--color--blue, #1a6ce6);
	--r: var(--wp--preset--color--red, #de2f34);
	--k: var(--wp--preset--color--black, #111);
	--bg: light-dark(var(--snow), #08111e);
	--bg-2: light-dark(var(--frost), #0f1b2d);
	--card: light-dark(#ffffff, #12203a);
	--text: light-dark(var(--ink), #e8eef7);
	--muted: light-dark(var(--slate), #9fb0c8);
	--line: light-dark(color-mix(in oklch, var(--ink) 12%, transparent), color-mix(in oklch, #e8eef7 14%, transparent));
	--f-display: var(--wp--preset--font-family--display, "Big Shoulders Display", sans-serif);
	--f-body: var(--wp--preset--font-family--body, "Albert Sans", system-ui, sans-serif);
	--f-mono: var(--wp--preset--font-family--mono, "JetBrains Mono", monospace);
	--gutter: clamp(1rem, 4vw, 3rem);
	--wrap: 1320px;
	--radius: 16px;
	--ease: cubic-bezier(.2, .7, .1, 1);
	--ease-out: cubic-bezier(.16, 1, .3, 1);
	interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 6px; }
.screen-reader-text, .crr-skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.crr-skip:focus { position: fixed; top: 1rem; left: 1rem; z-index: 999; padding: .7rem 1rem; background: var(--ink); color: #fff; border-radius: 10px; }

.crr-wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.crr-blocks > .alignwide, .crr-blocks > .crr-section { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.crr-blocks > .alignfull { width: 100%; }
.crr-kicker { font: 600 .74rem/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .7rem; }
.crr-h1 { font: 800 clamp(3rem, 7vw, 6.4rem)/.9 var(--f-display); text-transform: uppercase; letter-spacing: .005em; }
.crr-h2 { font: 800 clamp(2.4rem, 5vw, 4.4rem)/.9 var(--f-display); text-transform: uppercase; letter-spacing: .005em; }
.crr-h3 { font: 800 1.8rem/1 var(--f-display); text-transform: uppercase; margin-bottom: 1rem; }
.crr-lede { font-size: 1.2rem; color: var(--muted); max-width: 56ch; margin-top: 1rem; }
.crr-small { font-size: .86rem; color: var(--muted); }
.crr-mono { font-family: var(--f-mono); }
.crr-link { font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }

.crr-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .9em 1.5em; border-radius: 999px; border: 0; font: 700 1rem/1 var(--f-body); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background .25s, box-shadow .25s; }
.crr-btn:active { transform: scale(.97); }
.crr-btn--signal { background: var(--signal); color: #fff; box-shadow: 0 10px 30px -10px color-mix(in oklch, var(--signal) 70%, transparent); &:hover { background: color-mix(in oklch, var(--signal) 85%, black); } }
.crr-btn--glass { background: color-mix(in srgb, #fff 16%, transparent); color: #fff; backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 40%, transparent); &:hover { background: color-mix(in srgb, #fff 26%, transparent); } }
.crr-btn--small { padding: .65em 1.1em; font-size: .9rem; }
.crr-btn--block { width: 100%; }

/* ---------- Header ---------- */
.crr-header { position: fixed; inset: 0 0 auto; z-index: 50; color: #fff; transition: background .35s, color .35s, box-shadow .35s; view-transition-name: header;
	&.is-scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--text); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 var(--line); }
}
body:not(:has(.crr-hero)) .crr-header { color: var(--text); }
.crr-header__inner { width: min(100% - 2 * var(--gutter), 1500px); margin-inline: auto; min-height: 74px; display: flex; align-items: center; gap: 2rem; }
.crr-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.crr-brand__mark { width: 40px; height: 28px; fill: currentColor; }
.crr-brand__snow { fill: none; stroke: color-mix(in srgb, var(--signal) 90%, white); stroke-width: 1.6; }
.crr-brand__name { font: 800 1.6rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.crr-brand__logo { max-height: 44px; width: auto; }
.crr-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
.crr-nav__list a { text-decoration: none; font-weight: 600; font-size: .96rem; position: relative;
	&::after { content: ""; position: absolute; inset: auto 0 -6px; height: 2px; background: var(--signal); scale: 0 1; transform-origin: right; transition: scale .35s var(--ease-out); }
	&:hover::after { scale: 1 1; transform-origin: left; }
}
.crr-header__actions { display: flex; gap: .8rem; align-items: center; }
.crr-header__menu, .crr-nav__close { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.crr-header__menu span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; }
@media (min-width: 980px) { .crr-nav[popover] { display: block; position: static; inset: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible; } }
@media (max-width: 979px) {
	.crr-header__menu { display: block; }
	.crr-nav[popover] { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 6rem var(--gutter) 2rem; background: var(--ink); color: #fff;
		transition: opacity .3s, translate .4s var(--ease-out), display .4s allow-discrete, overlay .4s allow-discrete;
		@starting-style { opacity: 0; translate: 0 -12px; }
		&:not(:popover-open) { opacity: 0; translate: 0 -12px; }
	}
	.crr-nav__close { display: block; position: absolute; top: 1rem; right: var(--gutter); color: #fff; font-size: 2.2rem; line-height: 1; }
	.crr-nav__list { flex-direction: column; gap: .4rem; }
	.crr-nav__list a { font: 800 3rem/1.05 var(--f-display); text-transform: uppercase; }
}

/* ---------- Hero: the live mountain ---------- */
.crr-hero { position: relative; min-height: 100svh; color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto; isolation: isolate; overflow: clip; background: #0c1626; }
.crr-hero__stage { position: absolute; inset: 0; z-index: -1; }
.crr-hero__poster, .crr-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.crr-hero__canvas { opacity: 0; transition: opacity 1.2s var(--ease); cursor: grab; touch-action: pan-y; &:active { cursor: grabbing; } }
.crr-hero.is-live .crr-hero__canvas { opacity: 1; }
.crr-hero__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(6 12 24 / .55) 0%, rgb(6 12 24 / 0) 22%), linear-gradient(90deg, rgb(6 12 24 / .62) 0%, rgb(6 12 24 / .18) 38%, rgb(6 12 24 / 0) 60%), linear-gradient(0deg, rgb(6 12 24 / .7) 0%, rgb(6 12 24 / 0) 30%); }
.crr-hero__labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.crr-label { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; cursor: pointer; padding: .28em .6em .3em; border-radius: 6px; font: 700 .72rem/1 var(--f-body); color: #fff; background: rgb(12 22 38 / .78); backdrop-filter: blur(6px); white-space: nowrap; transition: opacity .3s, background .2s; box-shadow: 0 4px 12px rgb(0 0 0 / .25);
	&::before { content: ""; display: inline-block; width: .62em; height: .62em; margin-right: .4em; border-radius: 2px; background: var(--dc, #fff); vertical-align: 0; }
	&::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 2px; height: 5px; background: rgb(12 22 38 / .78); }
	&.is-green { --dc: var(--g); } &.is-blue { --dc: var(--b); } &.is-red { --dc: var(--r); } &.is-black { --dc: #fff; }
	&.is-black::before { background: #111; box-shadow: 0 0 0 1.5px #fff; transform: rotate(45deg) scale(.85); }
	&.crr-label--lift { background: rgb(255 90 31 / .9); font-size: .66rem; } &.crr-label--lift::before { display: none; }
	&.is-closed { opacity: .55; text-decoration: line-through; }
	&.is-hl { background: #fff; color: var(--ink); z-index: 2; }
	&.is-hidden { opacity: 0; pointer-events: none; }
}
.crr-hero__copy { grid-column: 1; grid-row: 1; align-self: center; padding: 120px var(--gutter) 2rem; max-width: 46rem; pointer-events: none; & > * { pointer-events: auto; } }
.crr-hero .crr-kicker { color: rgb(255 255 255 / .8); }
.crr-hero__title { font: 900 clamp(3.2rem, 6.4vw, 6.8rem)/.86 var(--f-display); max-width: 9.5ch; text-transform: uppercase; letter-spacing: -.005em; margin-bottom: 1.2rem; text-shadow: 0 2px 30px rgb(0 0 0 / .25); animation: crr-in 1s .2s var(--ease-out) both; }
.crr-hero__text { font-size: 1.15rem; max-width: 40ch; color: rgb(255 255 255 / .9); animation: crr-in 1s .4s var(--ease-out) both; }
.crr-ctas { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; animation: crr-in 1s .55s var(--ease-out) both; }
@keyframes crr-in { from { opacity: 0; translate: 0 18px; filter: blur(8px); } }
.crr-hero__controls { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: 0 var(--gutter) 1rem; }
.crr-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--card) 14%, transparent); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22);
	& button { border: 0; background: none; padding: .5em .95em; border-radius: 999px; font: 600 .84rem/1 var(--f-body); cursor: pointer; color: inherit; transition: background .2s, color .2s; }
	& button:hover { background: rgb(255 255 255 / .12); }
	& button.is-on { background: #fff; color: var(--ink); }
}
.crr-section .crr-seg { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); & button:hover { background: var(--line); } & button.is-on { background: var(--ink); color: #fff; } }
.crr-diff { display: inline-flex; align-items: center; gap: .45em; &::before { content: ""; width: .7em; height: .7em; border-radius: 2px; background: currentColor; } }
.crr-diff--all::before { display: none; }
.crr-diff--green::before { background: var(--g); } .crr-diff--blue::before { background: var(--b); } .crr-diff--red::before { background: var(--r); } .crr-diff--black::before { background: #111; transform: rotate(45deg) scale(.85); box-shadow: 0 0 0 1.5px #fff; }
.crr-switch { display: inline-flex; align-items: center; gap: .5rem; font: 600 .86rem var(--f-body); cursor: pointer; padding: .45em .9em .45em .5em; border-radius: 999px; background: color-mix(in srgb, var(--card) 14%, transparent); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); backdrop-filter: blur(12px);
	& input { appearance: none; width: 2.1em; height: 1.2em; border-radius: 999px; background: rgb(255 255 255 / .3); position: relative; margin: 0; cursor: pointer; transition: background .2s; }
	& input::after { content: ""; position: absolute; top: .15em; left: .15em; width: .9em; height: .9em; border-radius: 50%; background: #fff; transition: translate .25s var(--ease-out); }
	& input:checked { background: var(--signal); } & input:checked::after { translate: .9em 0; }
}
.crr-section .crr-switch { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); & input { background: var(--line); } }
.crr-hero__strip { grid-column: 1 / -1; grid-row: 3; margin: 0; display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid rgb(255 255 255 / .2); background: rgb(6 12 24 / .45); backdrop-filter: blur(14px);
	& > div { padding: .9rem var(--gutter) 1rem; border-right: 1px solid rgb(255 255 255 / .14); }
	& dt { font: 600 .66rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .65); }
	& dd { margin: .15rem 0 0; font: 800 1.9rem/1 var(--f-display); }
}
.crr-hero__aval dd { display: flex; align-items: center; gap: .3em; &::before { content: ""; width: .5em; height: .5em; border-radius: 2px; background: var(--aval); } }
.crr-hero__live { margin-left: auto; border-right: 0 !important; display: flex; align-items: center; & dd { font: 600 .74rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: .5em; color: rgb(255 255 255 / .8); } }
.crr-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa6b8; }
.crr-hero.is-live .crr-dot { background: #3ddc84; box-shadow: 0 0 0 0 #3ddc84; animation: crr-pulse 2.4s infinite; }
@keyframes crr-pulse { 70% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- Sections ---------- */
.crr-section { padding-block: clamp(3rem, 5.5vw, 5rem); }
.crr-section--flush { padding-top: 0; }
.crr-head { margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.crr-head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; }
.crr-card { padding: 1.6rem; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line); }

/* Conditions */
.crr-cond__grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 1rem; }
.crr-depth { position: relative; min-height: 280px; padding: 1.5rem; border-radius: var(--radius); background: linear-gradient(180deg, #16325c, #0c1626); color: #fff; overflow: clip; }
.crr-depth__art { position: absolute; inset: auto 0 0 0; width: 100%; height: 70%; }
.crr-depth__mtn { fill: url(#none); fill: rgb(255 255 255 / .1); }
.crr-depth__line { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 2 5; opacity: .6; }
.crr-depth__pt { fill: var(--signal); }
.crr-depth__base, .crr-depth__top { position: absolute; display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 .25rem; }
.crr-depth__base { left: 1.5rem; bottom: 1.4rem; } .crr-depth__top { right: 1.5rem; top: 1.4rem; text-align: right; justify-items: end; }
.crr-big { font: 900 4.6rem/.85 var(--f-display); }
.crr-unit { font: 700 1.2rem var(--f-display); opacity: .8; }
.crr-depth .crr-small { grid-column: 1 / -1; color: rgb(255 255 255 / .75); }
.crr-facts { display: grid; gap: 0; margin: 0; padding: .4rem 1.4rem; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line);
	& div { padding: .9rem 0; border-bottom: 1px solid var(--line); } & div:last-child { border-bottom: 0; }
	& dt { font: 600 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
	& dd { margin: .25rem 0 0; font: 800 1.6rem/1.05 var(--f-display); & small { font: 600 .8rem var(--f-body); color: var(--muted); } }
}
.crr-aval { padding: 1.5rem; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line), inset 6px 0 0 var(--aval); display: grid; align-content: start; gap: .6rem; }
.crr-aval__level { margin: 0; font: 900 2.6rem/1 var(--f-display); text-transform: uppercase; display: flex; align-items: center; gap: .3em; }
.crr-aval__n { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 8px; background: var(--aval); color: #111; }
.crr-aval__scale { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; & li { flex: 1; height: 10px; border-radius: 3px; background: var(--c); opacity: .35; font-size: 0; } & li.is-on { opacity: 1; outline: 2px solid var(--text); outline-offset: 1px; } }
.crr-aval__text { color: var(--muted); margin: 0; font-size: .95rem; }
.crr-cond__lower { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; margin-top: 1rem; }
.crr-forecast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.crr-fc { padding: 1.2rem; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line); display: grid; gap: .3rem; & p { margin: 0; } }
.crr-fc__day { font: 600 .74rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.crr-fc__icon { width: 42px; height: 42px; color: var(--b); }
.crr-fc--sun .crr-fc__icon { color: #f2a400; }
.crr-fc__temp { font: 800 1.7rem var(--f-display); }
.crr-fc__snow { font-size: .9rem; color: var(--muted); }
.crr-patrol { margin: 0; padding: 1.4rem; border-radius: var(--radius); background: var(--bg-2); border-left: 4px solid var(--signal); & p:last-child { margin: 0; } }

/* Lift board */
.crr-lifts__count { margin: 0; font-weight: 600; & strong { font: 900 3rem/1 var(--f-display); color: var(--g); margin-right: .2rem; } }
.crr-tablewrap { overflow-x: auto; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); background: var(--card); }
.crr-board { width: 100%; border-collapse: collapse; min-width: 720px;
	& th, & td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--line); }
	& thead th { font: 600 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
	& tbody th { font: 800 1.35rem/1.1 var(--f-display); text-transform: uppercase; & small { display: block; font: 500 .8rem var(--f-body); text-transform: none; color: var(--muted); margin-top: .2rem; } }
	& tr:last-child > * { border-bottom: 0; }
}
.crr-lift-ico { display: inline-block; width: 1.1em; height: .8em; margin-right: .5em; vertical-align: .05em; border-radius: 3px; background: currentColor; opacity: .5; }
.crr-pill { display: inline-flex; align-items: center; gap: .4em; padding: .35em .8em; border-radius: 999px; font: 700 .82rem var(--f-body); background: var(--bg-2); &::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; } }
tr.is-open .crr-pill { color: #128043; background: color-mix(in oklch, #1f9d55 14%, transparent); }
tr.is-hold .crr-pill { color: #a35b00; background: color-mix(in oklch, #f2a400 18%, transparent); }
tr.is-closed .crr-pill { color: #b4232a; background: color-mix(in oklch, #de2f34 12%, transparent); }
tr.is-closed th { opacity: .6; }

/* Trail map */
.crr-map__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.5rem; align-items: start; }
.crr-map__figure { margin: 0; }
.crr-map__canvas { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: clip; box-shadow: 0 0 0 1px var(--line); background: #e9eef3; & img { width: 100%; height: 100%; object-fit: cover; } }
.crr-map__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.crr-map__run { cursor: pointer; --c: var(--b);
	& .crr-map__halo { fill: none; stroke: #fff; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
	& .crr-map__line { fill: none; stroke: var(--c); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .2s; }
	&.is-hl .crr-map__line { stroke-width: 11; } &.is-hl .crr-map__halo { stroke-width: 18; opacity: 1; }
	&.is-closed .crr-map__line { stroke-dasharray: 12 12; opacity: .7; }
}
.crr-map__canvas[data-filter="green"] .crr-map__run:not(.crr-map__run--green),
.crr-map__canvas[data-filter="blue"] .crr-map__run:not(.crr-map__run--blue),
.crr-map__canvas[data-filter="red"] .crr-map__run:not(.crr-map__run--red),
.crr-map__canvas[data-filter="black"] .crr-map__run:not(.crr-map__run--black),
.crr-map__canvas.is-open-only .crr-map__run.is-closed { opacity: .12; }
.crr-map__run--green { --c: var(--g); } .crr-map__run--red { --c: var(--r); } .crr-map__run--black { --c: #111; }
.crr-map__liftlabel { font: 700 17px var(--f-body); fill: #0c1626; paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; pointer-events: none; }
.crr-map__lift { & line { stroke: #111; stroke-width: 2.5; } & circle { fill: var(--signal); stroke: #fff; stroke-width: 2; } & text { font: 700 17px var(--f-body); fill: #0c1626; paint-order: stroke; stroke: #fff; stroke-width: 4px; } &.is-closed { opacity: .4; } &.is-hold line { stroke-dasharray: 6 6; } }
.crr-map__legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .9rem; font-size: .84rem; color: var(--muted); }
.crr-legend { display: inline-flex; align-items: center; gap: .4em; &::before { content: ""; width: 1.4em; height: 4px; border-radius: 2px; background: currentColor; } }
.crr-legend--green::before { background: var(--g); } .crr-legend--blue::before { background: var(--b); } .crr-legend--red::before { background: var(--r); } .crr-legend--black::before { background: #111; } .crr-legend--lift::before { background: var(--signal); height: 2px; } .crr-legend--closed::before { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.crr-map__side { display: grid; gap: 1rem; }
.crr-runs { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; max-height: 640px; overflow: auto; }
.crr-runs li[hidden] { display: none; }
.crr-run { width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "m n s" "m t s"; align-items: center; gap: .1rem .8rem; padding: .8rem 1rem; text-align: left; border: 0; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .2s, translate .2s;
	&:hover, &.is-hl { box-shadow: 0 0 0 2px var(--c, var(--b)); translate: 4px 0; }
	&.is-closed .crr-run__name { text-decoration: line-through; opacity: .6; }
}
.crr-run--green { --c: var(--g); } .crr-run--blue { --c: var(--b); } .crr-run--red { --c: var(--r); } .crr-run--black { --c: #111; }
.crr-run__mark { grid-area: m; width: 14px; height: 14px; border-radius: 3px; background: var(--c); }
.crr-run--black .crr-run__mark { transform: rotate(45deg) scale(.85); box-shadow: 0 0 0 2px var(--card), 0 0 0 3px #111; }
.crr-run__name { grid-area: n; font: 800 1.3rem/1.05 var(--f-display); text-transform: uppercase; }
.crr-run__meta { grid-area: t; font-size: .82rem; color: var(--muted); }
.crr-run__status { grid-area: s; font: 600 .74rem var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: right; }

/* Passes */
.crr-passes { background: linear-gradient(180deg, transparent, var(--bg-2)); border-radius: calc(var(--radius) * 2); }
.crr-passes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.crr-pricetable { width: 100%; border-collapse: collapse; margin-top: 1.4rem; font-variant-numeric: tabular-nums; font-size: .9rem;
	& th, & td { padding: .55rem .4rem; border-bottom: 1px solid var(--line); text-align: right; } & th[scope=row] { text-align: left; font-weight: 700; } & thead th { font: 600 .7rem var(--f-mono); color: var(--muted); }
}
.crr-calc { position: sticky; top: 100px; padding: 1.8rem; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -40px rgb(12 22 38 / .5); display: grid; gap: 1.2rem; }
.crr-calc__days { display: grid; gap: .6rem; font-weight: 600; & strong { font: 900 1.6rem var(--f-display); margin-left: .3rem; } & input { width: 100%; accent-color: var(--signal); } }
.crr-calc__people { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; & li { display: grid; grid-template-columns: 1fr auto 5.5rem; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); } }
.crr-calc__who { display: grid; & small { color: var(--muted); font-size: .82rem; } }
.crr-stepper { display: inline-flex; align-items: center; gap: .4rem; & button { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 0; background: var(--bg-2); font: 700 1.2rem/1 var(--f-body); cursor: pointer; &:hover { background: var(--line); } } & output { min-width: 1.6ch; text-align: center; font: 800 1.4rem var(--f-display); } }
.crr-calc__line { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.crr-calc__total { padding-top: 1rem; border-top: 2px solid var(--text); & p { margin: 0; display: flex; justify-content: space-between; align-items: baseline; } & strong { font: 900 3.4rem/1 var(--f-display); color: var(--signal); } }
.crr-calc__per { color: var(--muted); font-size: .9rem; justify-content: flex-end !important; gap: .3rem; }
.crr-calc .crr-switch { justify-self: start; }

/* Lessons */
.crr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.crr-lesson { container-type: inline-size; &[hidden] { display: none; } }
.crr-lesson__link { position: relative; display: grid; gap: .5rem; height: 100%; padding: 1.6rem; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line); text-decoration: none; transition: translate .35s var(--ease-out), box-shadow .3s; overflow: clip;
	&::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--lc, var(--b)); }
	&:hover { translate: 0 -4px; box-shadow: 0 0 0 1px var(--lc, var(--b)), 0 24px 40px -28px rgb(12 22 38 / .5); }
}
.crr-lesson--first { --lc: var(--g); } .crr-lesson--improver { --lc: var(--b); } .crr-lesson--confident { --lc: var(--r); } .crr-lesson--expert { --lc: #111; }
.crr-lesson__level { font: 600 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lc, var(--muted)); }
.crr-lesson__title { font: 800 2rem/1 var(--f-display); text-transform: uppercase; }
.crr-lesson__text { color: var(--muted); margin: 0; }
.crr-lesson__facts { margin: .6rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; & dt { font: 600 .64rem var(--f-mono); text-transform: uppercase; color: var(--muted); } & dd { margin: 0; font-weight: 700; font-size: .92rem; } }
@container (max-width: 300px) { .crr-lesson__facts { grid-template-columns: 1fr 1fr; } }
.crr-lesson__go { position: absolute; right: 1.4rem; top: 1.3rem; font-size: 1.4rem; transition: translate .3s var(--ease-out); }
.crr-lesson__link:hover .crr-lesson__go { translate: 4px 0; }

/* Journal */
.crr-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.crr-post__link { display: grid; gap: .5rem; text-decoration: none; }
.crr-post__cover { aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: clip; margin-bottom: .4rem; & img, & svg { width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ease-out); } }
.crr-post__link:hover .crr-post__cover > * { scale: 1.04; }
.crr-ridge__sky { fill: hsl(var(--h) 45% 28%); }
.crr-ridge__far { fill: hsl(var(--h) 30% 82%); }
.crr-ridge__near { fill: #fff; }
.crr-post__meta { font: 600 .7rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.crr-post__title { font: 800 1.8rem/1 var(--f-display); text-transform: uppercase; }
.crr-post__excerpt { color: var(--muted); margin: 0; }

@supports (animation-timeline: view()) {
	.crr-lesson, .crr-post, .crr-fc, .crr-board tbody tr { animation: crr-up linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
	@keyframes crr-up { from { opacity: 0; translate: 0 28px; } }
}
.no-st :is(.crr-lesson, .crr-post, .crr-fc):not(.is-in) { opacity: 0; translate: 0 20px; }
.no-st :is(.crr-lesson, .crr-post, .crr-fc) { transition: opacity .6s, translate .6s var(--ease-out); }

/* ---------- Inner pages ---------- */
.crr-pagehead { padding-block: calc(74px + clamp(2.5rem, 6vw, 5rem)) clamp(2rem, 4vw, 3rem); }
.crr-crumbs { margin-bottom: 1rem; font: 600 .72rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
	& ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; } & li + li::before { content: "/"; margin-right: .4rem; opacity: .4; } & a { color: var(--muted); text-decoration: none; &:hover { color: var(--text); } }
}
.crr-prose { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; font-size: 1.12rem;
	& > * + * { margin-top: 1.1em; } & h2 { font: 800 2.4rem/1 var(--f-display); text-transform: uppercase; margin-top: 1.6em; } & h3 { font: 800 1.6rem var(--f-display); text-transform: uppercase; }
	& a { color: var(--b); } & ul { padding-left: 1.2rem; } & blockquote { margin-inline: 0; padding-left: 1.2rem; border-left: 4px solid var(--signal); font-size: 1.3rem; }
}
.crr-prose--left { margin: 0; width: 100%; }
.crr-article__cover { margin-block: 0 3rem; & > * { width: 100%; border-radius: var(--radius); aspect-ratio: 2 / 1; object-fit: cover; } }
.crr-article__foot { padding-block: 2rem 5rem; }
.crr-pn { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-weight: 700; & a { text-decoration: none; } }
.crr-progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 60; background: var(--signal); transform-origin: left; scale: 0 1; animation: crr-grow linear both; animation-timeline: scroll(root); }
@keyframes crr-grow { to { scale: 1 1; } }
@supports not (animation-timeline: scroll()) { .crr-progress { display: none; } }
.crr-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.crr-chip { padding: .5em 1em; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; font-weight: 600; font-size: .92rem; &[aria-current] { background: var(--ink); color: #fff; box-shadow: none; } }
.crr-lessonpage__head { display: grid; grid-template-columns: 1.3fr .8fr; gap: 2.5rem; align-items: end; }
.crr-facts--card { padding: .4rem 1.4rem; & dd { font-size: 1.25rem; } }
.crr-lessonpage__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); padding-bottom: 5rem; align-items: start; }
.crr-lessonpage__form { position: sticky; top: 96px; }
.crr-ticks { list-style: none; padding: 0 !important; & li { padding-left: 1.8rem; position: relative; margin-bottom: .5rem; } & li::before { content: "✓"; position: absolute; left: 0; color: var(--g); font-weight: 900; } }
.crr-form { display: grid; gap: 1rem; }
.crr-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; }
.crr-field { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; & input, & select, & textarea { width: 100%; padding: .8rem .9rem; border-radius: 10px; border: 1px solid color-mix(in oklch, var(--text) 22%, transparent); background: var(--bg); font-weight: 400; font-size: 1rem; &:focus { outline: none; border-color: var(--b); box-shadow: 0 0 0 3px color-mix(in oklch, var(--b) 25%, transparent); } &[aria-invalid="true"] { border-color: var(--r); } } }
.crr-field__err { color: var(--r); font-size: .85rem; }
.crr-form__alert { margin: 0; padding: .9rem 1rem; border-radius: 10px; background: color-mix(in oklch, var(--r) 14%, transparent); color: var(--r); font-weight: 700; }
.crr-check { display: flex; gap: .6rem; align-items: start; font-size: .92rem; & input { margin-top: .25rem; accent-color: var(--signal); width: 1.1rem; height: 1.1rem; } }
.crr-hp { position: absolute; left: -9999px; }
.crr-request__done { &:focus { outline: none; } }
.crr-steps__list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; counter-reset: s;
	& li { counter-increment: s; padding: 1.4rem; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line); } & li::before { content: counter(s); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--signal); color: #fff; font: 900 1.2rem var(--f-display); margin-bottom: .8rem; } & strong { display: block; font: 800 1.4rem var(--f-display); text-transform: uppercase; }
}
.crr-404__sign { font: 900 clamp(6rem, 18vw, 12rem)/.8 var(--f-display); color: var(--r); margin: 0 0 1rem; }
.search-form { display: flex; gap: .5rem; max-width: 520px; margin-top: 2rem; & label { flex: 1; } }
.search-field { width: 100%; padding: .8rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.search-submit { padding: .8rem 1.3rem; border-radius: 999px; border: 0; background: var(--ink); color: #fff; cursor: pointer; }
.nav-links { display: flex; gap: .5rem; margin-top: 2.5rem; } .page-numbers { padding: .5em .9em; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; &.current { background: var(--ink); color: #fff; } }

/* ---------- Footer ---------- */
.crr-footer { background: var(--ink); color: #dfe7f2; padding-top: clamp(4rem, 8vw, 6rem); --muted: #93a3bb; --line: rgb(255 255 255 / .14); }
.crr-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 2.5rem; padding-bottom: 3rem; & address { font-style: normal; } & a { text-decoration: none; &:hover { text-decoration: underline; } } }
.crr-footer__name { font: 900 3rem/.9 var(--f-display); text-transform: uppercase; color: #fff; margin-bottom: .6rem; }
.crr-footer__tag { color: var(--muted); }
.crr-footer__alt { font: 600 .8rem var(--f-mono); color: var(--signal); }
.crr-footer__menu { list-style: none; padding: 0; margin: 1rem 0 0; }
.crr-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.4rem 2rem; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); & p { margin: 0; max-width: 70ch; } }

::view-transition-group(header) { animation: none; }

/* ---------- Responsive ---------- */
body:has(> .kln-store-tag) .crr-hero__strip { padding-bottom: 3.6rem; }
@media (max-width: 1100px) {
	.crr-cond__grid { grid-template-columns: 1fr 1fr; } .crr-depth { grid-column: 1 / -1; }
	.crr-cond__lower, .crr-passes__grid, .crr-map__grid, .crr-lessonpage__head, .crr-lessonpage__grid { grid-template-columns: 1fr; }
	.crr-calc, .crr-lessonpage__form { position: static; }
	.crr-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
	.crr-hero { grid-template-columns: 1fr; }
	.crr-hero__copy { padding-top: 104px; }
	.crr-hero__shade { background: linear-gradient(180deg, rgb(6 12 24 / .65) 0%, rgb(6 12 24 / .25) 45%, rgb(6 12 24 / .75) 100%); }
	.crr-hero__strip > div { flex: 1 1 33%; padding: .7rem 1rem; } .crr-hero__strip dd { font-size: 1.5rem; } .crr-hero__live { flex-basis: 100% !important; padding-block: .55rem !important; } .crr-hero__strip .crr-hero__live dd { font-size: .7rem; }
	/* Phones: the copy covers most of the frame, so only the run being looked at keeps its label. */
	.crr-label:not(.is-hl) { opacity: 0; pointer-events: none; }
	.crr-hero__text { font-size: 1.02rem; }
	.crr-cond__grid, .crr-forecast { grid-template-columns: 1fr; }
	.crr-footer__grid { grid-template-columns: 1fr; }
	.crr-header .crr-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.crr-lesson, .crr-post, .crr-fc, .crr-board tbody tr { animation: none !important; }
	@view-transition { navigation: none; }
}

.crr-field :is(input, select) { min-height: 3.1rem; }
