/* GELP component styles. Every value reads a token from tokens.css. */
.gelp, .gelp * { box-sizing: border-box; }
.gelp { font-family: var(--font-text); color: var(--ink); -webkit-font-smoothing: antialiased; }
.gelp img { display: block; max-width: 100%; }

/* W mark */
.gelp-w { display: block; height: auto; }
.gelp-w-ink { fill: var(--ink); }
.gelp-w-gold { fill: var(--gold); }
.gelp-w.on-forest .gelp-w-ink, :is(.gelp-forest, .gelp-tile.forest) .gelp-w-ink { fill: var(--on-forest); }

/* Icons */
.gelp-icon { display: inline-block; vertical-align: middle; flex: none; }
.gelp-icon-accent { stroke: var(--icon-accent); }
:is(.gelp-forest, .gelp-tile.forest) .gelp-icon-accent { stroke: var(--gold); }

/* Type */
.gelp-display-xl, .gelp-display, .gelp-h1, .gelp-h2, .gelp-h3, .gelp-stat { font-family: var(--font-display); font-weight: 600; margin: 0; font-optical-sizing: auto; }
.gelp-display-xl { font-size: 112px; line-height: .88; letter-spacing: -0.045em; }
.gelp-display { font-size: 76px; line-height: .92; letter-spacing: -0.04em; }
.gelp-h1 { font-size: 52px; line-height: .98; letter-spacing: -0.035em; }
.gelp-h2 { font-size: 36px; line-height: 1.04; letter-spacing: -0.025em; }
.gelp-h3 { font-size: 24px; line-height: 1.15; letter-spacing: -0.015em; }
.gelp-stat { font-size: 96px; line-height: .9; letter-spacing: -0.05em; font-weight: 500; }
.gelp-body-lg { font-size: 20px; line-height: 1.5; letter-spacing: -0.005em; margin: 0; }
.gelp-body { font-size: 17px; line-height: 1.6; margin: 0; }
.gelp-small { font-size: 14px; line-height: 1.5; margin: 0; color: var(--ink-muted); }
.gelp-muted { color: var(--ink-muted); }
.gelp-label { font-family: var(--font-text); font-size: 13px; line-height: 1.3; letter-spacing: .01em; font-weight: 700; margin: 0; }
.gelp-meta { font-family: var(--font-text); font-size: 14px; line-height: 1.4; margin: 0; }
.gelp-num { color: var(--gold-text); }
:is(.gelp-forest, .gelp-tile.forest) .gelp-num { color: var(--gold); }

/* The lean: gold band behind one key phrase, skewed like the italic W */
.gelp-lean { position: relative; display: inline-block; z-index: 0; padding: 0 .1em; margin: 0 -.02em; color: var(--on-action); }
.gelp-lean::before { content: ""; position: absolute; z-index: -1; left: -.02em; right: -.02em; top: .1em; bottom: .02em; background: var(--gold); transform: skewX(-20deg); }

/* Section label: (01) Name, then a hairline rule */
.gelp-section-label { display: flex; align-items: center; gap: 12px; font-family: var(--font-text); font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.gelp-section-label .n { color: var(--gold-text); }
.gelp-section-label .rule { flex: 1; height: 1px; background: var(--hairline); }
:is(.gelp-forest, .gelp-tile.forest) .gelp-section-label .n { color: var(--gold); }
:is(.gelp-forest, .gelp-tile.forest) .gelp-section-label .rule { background: var(--forest-raised); }

/* Buttons: pills with an arrow disc */
.gelp-btn { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-text); font-size: 15px; font-weight: 600; line-height: 1; padding: 6px 22px 6px 6px; border-radius: var(--radius-pill); border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background-color 160ms cubic-bezier(.2,.7,.2,1), color 160ms; }
.gelp-btn .disc { width: 34px; height: 34px; border-radius: var(--radius-pill); display: grid; place-items: center; flex: none; transition: transform 320ms cubic-bezier(.2,.7,.2,1); }
.gelp-btn:hover .disc { transform: rotate(45deg); }
.gelp-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gelp-btn.primary { background: var(--action); color: var(--on-action); }
.gelp-btn.primary .disc { background: var(--on-action); color: var(--action); }
.gelp-btn.forest { background: var(--forest); color: var(--on-forest); }
.gelp-btn.forest .disc { background: var(--on-forest); color: var(--forest); }
.gelp-btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); padding: 14px 22px; }
:is(.gelp-forest, .gelp-tile.forest) .gelp-btn.ghost { color: var(--on-forest); border-color: var(--on-forest-muted); }
.gelp-btn .disc .gelp-icon-accent { stroke: currentColor; }

/* Tiles */
.gelp-tile { border-radius: var(--radius-tile); overflow: hidden; position: relative; background: var(--tile); }
.gelp-tile.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(.2,.7,.2,1); }
.gelp-tile.photo:hover img { transform: scale(1.04); }
.gelp-tile.forest { background: var(--forest); color: var(--on-forest); }
.gelp-tile.gold { background: var(--gold); color: var(--on-action); }
.gelp-chip { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.gelp-chip b { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.gelp-chip span { font-family: var(--font-text); font-size: 12px; color: var(--ink-muted); }

/* Program bar */
.gelp-programbar { display: flex; align-items: center; gap: 20px; }
.gelp-programbar .gelp-w { width: 96px; }
.gelp-programbar .divider { width: 1px; align-self: stretch; min-height: 44px; background: var(--gold); }
.gelp-programbar .name { font-family: var(--font-text); font-size: 12px; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

/* Forest band */
.gelp-forest, .gelp-tile.forest { background: var(--forest); color: var(--on-forest); }
:is(.gelp-forest, .gelp-tile.forest) .gelp-muted, :is(.gelp-forest, .gelp-tile.forest) .gelp-small { color: var(--on-forest-muted); }

/* Week patch: rectangle with the top-right corner cut at the 21.5° slant */
.gelp-patch { --w: 220px; width: var(--w); padding: 18px 18px 16px; display: grid; gap: 22px; clip-path: polygon(0 0, calc(100% - 56px) 0, 100% 22px, 100% 100%, 0 100%); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.gelp-patch .code { font-family: var(--font-text); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.gelp-patch .title { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.05; letter-spacing: -0.02em; }
.gelp-patch.forest { background: var(--forest); color: var(--on-forest); }
.gelp-patch.forest .code { color: var(--gold); }
.gelp-patch.gold { background: var(--gold); color: var(--on-action); }
.gelp-patch.gold .gelp-icon-accent { stroke: var(--on-action); }
.gelp-patch.tile { background: var(--tile); color: var(--ink); }
.gelp-patch.tile .code { color: var(--gold-text); }

/* Motion: The Cast */
@keyframes gelp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes gelp-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes gelp-settle { from { opacity: 0; letter-spacing: .5em; } to { opacity: 1; letter-spacing: .14em; } }
@keyframes gelp-band { from { transform: skewX(-20deg) scaleX(0); } to { transform: skewX(-20deg) scaleX(1); } }
@keyframes gelp-fall { 0% { opacity: 0; transform: skewX(18deg) scaleY(2.4); animation-timing-function: cubic-bezier(.55,0,.85,.45); } 10% { opacity: 1; } 42% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(.2,.6,.35,1); } 58% { transform: skewX(-4deg) scaleY(.84); animation-timing-function: cubic-bezier(.4,0,.6,1); } 76% { transform: skewX(1deg) scaleY(1.04); } 90% { transform: scaleY(.98); } 100% { opacity: 1; transform: none; } }
/* The Cast: the W and the name stay still; the gold shadow drops from the W's foot, lands with one bounce and settles. 1.8s on web; add .gelp-cast-long for video (3s) */
.gelp-cast .gelp-w-gold { transform-box: fill-box; transform-origin: 11% 100%; animation: gelp-fall 1800ms linear 300ms both; }
.gelp-cast-long .gelp-w-gold { animation-duration: 3000ms; animation-delay: 400ms; }
.gelp-reveal .gelp-lean::before { transform-origin: left center; animation: gelp-band 700ms cubic-bezier(.6,0,.2,1) 300ms both; }
@media (prefers-reduced-motion: reduce) {
  .gelp-cast .gelp-w-gold, .gelp-reveal .gelp-lean::before { animation: none; }
}

/* Section header: arrow disc + lowercase name in the text sans, number on the right */
.gelp-section-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--hairline); font-family: var(--font-text); }
.gelp-section-head .name { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.gelp-section-head .name .disc { width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--forest); color: var(--gold); display: grid; place-items: center; }
.gelp-section-head .count { font-size: 22px; font-weight: 500; color: var(--ink-muted); }

/* Traits: physics box */
.gelp-traits-box { position: relative; height: 640px; border-radius: 24px; background: var(--forest); overflow: hidden; touch-action: none; user-select: none; }
.gelp-traits-box .hint { position: absolute; left: 20px; top: 16px; font-family: var(--font-text); font-size: 13px; color: var(--on-forest-muted); }
.gelp-trait-pill { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 24px 0 5px; border-radius: var(--radius-pill); background: #ffffff; color: #04140b; font-family: var(--font-text); font-size: 21px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; cursor: grab; will-change: transform; visibility: hidden; }
.gelp-traits-box .ball { position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--gold); visibility: hidden; }
.gelp-trait-pill i, .gelp-trait-card .k i, .gelp-traits-list .row i, .gelp-traits-legend i { font-style: normal; border-radius: var(--radius-pill); display: grid; place-items: center; font-family: var(--font-text); font-weight: 700; }
.gelp-trait-pill i { min-width: 50px; height: 50px; font-size: 15px; }
.gelp-trait-pill:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gelp-trait-pill.on { background: var(--gold); }
.gelp-trait-pill.on i { background: var(--forest) !important; color: var(--gold) !important; box-shadow: none !important; }
.t-g i, i.t-g { background: var(--gold); color: #04140b; }
.t-m i, i.t-m { background: var(--forest); color: var(--gold); }
.t-w i, i.t-w { background: #b5cbbd; color: #04140b; }
.t-p i, i.t-p { background: var(--tile); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--forest); }
.gelp-traits-box.static { display: flex; flex-wrap: wrap; align-content: flex-end; gap: 10px; padding: 24px; }
.gelp-traits-box.static .gelp-trait-pill { position: static; visibility: visible; cursor: pointer; }
.gelp-traits-box.static .ball { display: none; }

/* Traits: single card revealed on first press */
.gelp-trait-card { padding: 22px; border-radius: var(--radius-tile); background: var(--surface); display: grid; gap: 8px; max-width: 520px; font-family: var(--font-text); }
.gelp-trait-card[hidden] { display: none; }
.gelp-trait-card .k { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.gelp-trait-card .k i { width: 32px; height: 32px; font-size: 12px; }
.gelp-trait-card b { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; }
.gelp-trait-card p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-muted); }

/* Traits: full list */
.gelp-traits-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; font-family: var(--font-text); }
.gelp-traits-list .grp { display: grid; gap: 8px; align-content: start; }
.gelp-traits-list .gl { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.gelp-traits-list .row { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: 12px; transition: background-color 250ms; }
.gelp-traits-list .row i { width: 30px; height: 30px; font-size: 12px; }
.gelp-traits-list .row b { font-size: 16px; letter-spacing: -0.01em; }
.gelp-traits-list .row p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.gelp-traits-list .row.on { background: var(--surface); }
.gelp-traits-legend { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--font-text); font-size: 14px; font-weight: 600; color: var(--ink-muted); }
.gelp-traits-legend span { display: flex; align-items: center; gap: 8px; } .gelp-traits-legend i { width: 14px; height: 14px; }
.gelp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gelp-trait-pill.t-p i { background: #e7ebe5; color: #04140b; box-shadow: inset 0 0 0 1.5px #002211; }
[data-theme="dark"] i.t-m { box-shadow: inset 0 0 0 1.5px var(--gold); }
[data-theme="dark"] i.t-p { box-shadow: inset 0 0 0 1.5px var(--on-forest-muted); }
