/* How to play page, built from the Khokho Uganda Rule Book. Uses the skin tokens so every colour theme works. */
.lp-hero { position: relative; overflow: hidden; color: #fff; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 6vw, 4.5rem); background: radial-gradient(1100px 500px at 85% -10%, rgba(77,182,232,.35), transparent 60%), var(--k-grad-dark); }
.lp-hero h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; font-size: clamp(2.3rem, 5.4vw, 4rem); margin: .4rem 0 1rem; max-width: 14ch; }
.lp-kicker { margin: 0; font-weight: 800; color: var(--k-gold); }
.lp-lead { font-size: 1.12rem; max-width: 46ch; color: rgba(255,255,255,.88); }
.lp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1.6rem 0 0; }
.lp-facts div { border-left: 3px solid var(--k-gold); padding-left: .7rem; }
.lp-facts dt { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; line-height: 1; color: #fff; }
.lp-facts dd { margin: .25rem 0 0; font-size: .8rem; color: rgba(255,255,255,.78); line-height: 1.3; }
@media (max-width: 575px) { .lp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.lp-nav { position: sticky; top: 74px; z-index: 20; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-nav .container { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding-block: .45rem; }
.lp-nav a { white-space: nowrap; padding: .45rem .95rem; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--text); text-decoration: none; }
.lp-nav a:hover, .lp-nav a:focus-visible { background: var(--k-sky-soft); color: var(--k-royal); }
.lp-nav a.on { background: var(--k-royal); color: #fff; }
.lp-tint { background: color-mix(in srgb, var(--k-sky-soft) 70%, var(--surface)); }
.lp-head { margin-bottom: 2rem; max-width: 62ch; }
.lp-head .section-text { margin-bottom: 0; }
.lp-card { height: 100%; padding: 1.6rem; border-radius: var(--k-radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--k-shadow-1); }
.lp-card h3 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .2rem; }
.lp-sub { color: var(--text); opacity: .8; margin: 0 0 1.2rem; }
.lp-ico { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 1.15rem; color: #fff; background: var(--k-grad-sky); }

/* match ribbon: the one bold element */
.lp-ribbon { display: flex; gap: 4px; padding: 6px; border-radius: 22px; background: var(--k-deep); }
.lp-ribbon button { flex: calc(var(--w) * 1) 1 0; min-width: 0; border: 0; border-radius: 16px; padding: 1.2rem .4rem; color: #fff; display: flex; flex-direction: column; align-items: center; gap: .15rem; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; font: inherit; }
.lp-ribbon button b { font-family: var(--font-display); font-weight: 800; font-size: clamp(.8rem, 2vw, 1.15rem); }
.lp-ribbon button small { font-weight: 700; opacity: .85; font-size: clamp(.65rem, 1.6vw, .85rem); }
.lp-ribbon .rb-turn { background: var(--k-royal); }
.lp-ribbon .rb-rest, .lp-ribbon .rb-int { background: rgba(255,255,255,.12); }
.lp-ribbon .rb-int { background: rgba(255,212,0,.22); }
.lp-ribbon button:hover { transform: translateY(-2px); }
.lp-ribbon button[aria-selected="true"] { background: var(--k-gold); color: #0a0a0a; box-shadow: 0 8px 22px rgba(255,212,0,.35); }
.lp-ribbon-note { margin: .9rem 0 1.4rem; padding: .9rem 1.1rem; border-left: 4px solid var(--k-gold); background: var(--surface); border-radius: 0 14px 14px 0; border-block: 1px solid var(--line); border-right: 1px solid var(--line); }
.lp-turnbar { position: relative; height: 18px; border-radius: 999px; background: var(--k-sky-mid); margin: 1.6rem 0 .3rem; }
.lp-turnbar .tb-fill { position: absolute; inset: 0 auto 0 0; width: 35.7%; border-radius: 999px; background: var(--k-royal); }
.lp-turnbar i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--k-gold); border: 2px solid #0a0a0a; }
.lp-turnbar i em { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-style: normal; font-weight: 800; font-size: .72rem; white-space: nowrap; color: var(--text); }
.lp-turnscale { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; opacity: .75; margin-bottom: 1rem; }
.lp-bullets { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; }
.lp-glance ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .9rem; }
.lp-glance li, .lp-officials li { display: flex; gap: .8rem; align-items: flex-start; }
.lp-glance small, .lp-officials small { display: block; opacity: .8; }

/* court explorer */
.lp-court { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: var(--k-shadow-3); }
.lp-court .cp-lobby { fill: var(--k-deep); } .lp-court .cp-field { fill: var(--k-sky-mid); } .lp-court .cp-free { fill: rgba(11,75,163,.28); }
[data-bs-theme="dark"] .lp-court .cp-field { fill: #14283a; }
.lp-court .cp-cross, .lp-court .cp-lane { fill: #fff; } .lp-court .cp-block { fill: var(--k-gold); stroke: #0a0a0a; stroke-width: 1.5; }
.lp-court .cp-post { fill: var(--k-gold); stroke: #0a0a0a; stroke-width: 2; }
.lp-court g { transition: opacity .25s, filter .25s; }
.lp-court.focus g { opacity: .22; } .lp-court.focus g.is-on { opacity: 1; filter: drop-shadow(0 0 6px rgba(255,212,0,.95)); }
.lp-note { font-size: .85rem; opacity: .75; margin: .8rem 0 0; }
.lp-parts { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.lp-parts button, .lp-chips button { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: .45rem .95rem; font-weight: 700; font-size: .9rem; cursor: pointer; }
.lp-parts button[aria-selected="true"], .lp-chips button.on { background: var(--k-royal); border-color: var(--k-royal); color: #fff; }
.lp-partcard { padding: 1.5rem; border-radius: var(--k-radius); background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--k-gold); box-shadow: var(--k-shadow-1); }
.lp-partcard h3 { font-size: 1.3rem; font-weight: 800; margin: 0 0 .2rem; }
.lp-size { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--k-royal); margin: 0 0 .6rem; }
[data-bs-theme="dark"] .lp-size { color: var(--k-sky); }

/* stepper */
.lp-stepper { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 1.5rem; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.lp-steps button { width: 100%; display: flex; align-items: center; gap: .7rem; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; padding: .65rem .8rem; font-weight: 700; cursor: pointer; }
.lp-steps button span { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--k-sky-soft); color: var(--k-royal); font-weight: 800; }
.lp-steps button[aria-selected="true"] { border-color: var(--k-royal); background: var(--k-royal); color: #fff; }
.lp-steps button[aria-selected="true"] span { background: var(--k-gold); color: #0a0a0a; }
.lp-stepbody { padding: 1.6rem; border-radius: var(--k-radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--k-shadow-1); display: flex; flex-direction: column; }
.lp-stepbody article[hidden] { display: none; }
.lp-stepbody h3 { font-size: 1.5rem; font-weight: 800; }
.lp-stepbody article p:last-child { font-size: 1.08rem; max-width: 60ch; }
.lp-ref { display: inline-block; margin: 0 0 .4rem; padding: .15rem .65rem; border-radius: 999px; background: var(--k-sky-soft); color: var(--k-royal); font-weight: 800; font-size: .8rem; }
.lp-stepnav { display: flex; gap: .6rem; margin-top: auto; padding-top: 1.2rem; }
@media (max-width: 767px) { .lp-stepper { grid-template-columns: 1fr; } .lp-steps { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; } }

/* rules */
.lp-rulebar { display: grid; gap: .9rem; margin-bottom: 1.6rem; }
.lp-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.lp-count { margin: 0; font-weight: 700; font-size: .9rem; opacity: .8; }
.lp-chapter { margin-bottom: 1.6rem; }
.lp-chapter[hidden] { display: none; }
.lp-chapter header { display: flex; gap: .9rem; align-items: center; margin-bottom: .8rem; }
.lp-chapter header h3 { margin: 0; font-size: 1.3rem; font-weight: 800; } .lp-chapter header p { margin: 0; opacity: .8; }
.lp-rule { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; margin-bottom: .5rem; }
.lp-rule[hidden] { display: none; }
.lp-rule summary { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; cursor: pointer; font-weight: 700; list-style: none; }
.lp-rule summary::-webkit-details-marker { display: none; }
.lp-rule summary::after { content: "+"; margin-left: auto; font-size: 1.3rem; line-height: 1; color: var(--k-royal); }
.lp-rule[open] summary::after { content: "\2212"; }
.lp-rule[open] { border-color: var(--k-sky); }
.lp-rule .rf { flex: none; min-width: 3.2rem; text-align: center; padding: .15rem .5rem; border-radius: 8px; background: var(--k-sky-soft); color: var(--k-royal); font-weight: 800; font-size: .8rem; }
.lp-rule p { margin: 0; padding: 0 1rem 1rem 5.1rem; max-width: 80ch; }
.lp-rule mark { background: var(--k-gold); color: #0a0a0a; border-radius: 3px; padding: 0 2px; }
.lp-empty { font-weight: 700; }
@media (max-width: 575px) { .lp-rule p { padding-left: 1rem; } }

/* calculators */
.lp-field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.lp-field label { font-weight: 700; } .lp-field label small { font-weight: 600; opacity: .75; margin-left: .4rem; }
.lp-field input[type="range"] { width: 100%; accent-color: var(--k-royal); }
.lp-step { display: inline-flex; align-items: stretch; width: max-content; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lp-step button { width: 44px; border: 0; background: var(--k-sky-soft); color: var(--k-royal); font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.lp-step input { width: 64px; border: 0; text-align: center; font-weight: 800; font-size: 1.1rem; background: var(--surface); color: var(--text); }
.lp-hint { font-size: .9rem; opacity: .8; }
.lp-result { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1rem 0 .6rem; }
.lp-result div { padding: .9rem 1rem; border-radius: 16px; background: var(--k-deep); color: #fff; }
.lp-result b { display: block; font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; color: var(--k-gold); line-height: 1; }
.lp-result span { font-size: .85rem; opacity: .85; }

/* quiz */
.lp-quiz { max-width: 760px; padding: 1.6rem; border-radius: var(--k-radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--k-shadow-2); }
.lq-top { display: flex; justify-content: space-between; font-weight: 800; font-size: .9rem; margin-bottom: .6rem; }
.lq-bar { height: 8px; border-radius: 999px; background: var(--k-sky-mid); overflow: hidden; margin-bottom: 1.2rem; }
.lq-bar i { display: block; height: 100%; background: var(--k-gold); transition: width .3s; }
.lq-q { font-size: 1.3rem; font-weight: 800; margin: 0 0 1rem; }
.lq-opts { display: grid; gap: .55rem; }
.lq-opts button { text-align: left; border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; padding: .8rem 1rem; font-weight: 700; cursor: pointer; }
.lq-opts button:hover:not(:disabled) { border-color: var(--k-sky); }
.lq-opts button.right { border-color: #1a9d57; background: color-mix(in srgb, #1a9d57 16%, var(--surface)); }
.lq-opts button.wrong { border-color: #d6453d; background: color-mix(in srgb, #d6453d 14%, var(--surface)); }
.lq-why { margin-top: 1rem; padding: .9rem 1rem; border-radius: 14px; background: var(--k-sky-soft); }
.lq-why b { display: block; margin-bottom: .2rem; }
.lq-actions { margin-top: 1rem; display: flex; gap: .6rem; }
.lq-score { font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--k-royal); }

/* officials and words */
.lp-officials { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .9rem; }
.lp-officials em { font-style: normal; font-weight: 800; color: var(--k-royal); margin-left: .3rem; }
.lp-words { max-height: 440px; overflow-y: auto; margin: 0; padding-right: .6rem; display: grid; gap: .6rem; }
.lp-words div { padding: .7rem .9rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.lp-words div[hidden] { display: none; }
.lp-words dt { font-weight: 800; color: var(--k-royal); } [data-bs-theme="dark"] .lp-words dt { color: var(--k-sky); }
.lp-words dd { margin: .1rem 0 0; }

@media (prefers-reduced-motion: reduce) { .lp-ribbon button, .lp-court g, .lq-bar i { transition: none; } }
