/* Inner pages: the same system as the Peak. A head with the page's living picture, then sections in one column. */
.pic canvas { mix-blend-mode: screen; }
.big { display: flex; flex-direction: column; align-items: flex-end; }
.big b { font: 800 56px/1 var(--display); font-variation-settings: "SHRP" 100; color: var(--cream); }
.big span { font-size: 16px; color: var(--lav-text); }
.big.bump b { animation: bump 0.6s ease-out; }
@keyframes bump { 0% { color: var(--cream); } 30% { color: var(--apricot); } 100% { color: var(--cream); } }
.tbl tbody tr.enter { animation: enter 0.7s cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { background: rgba(254, 229, 200, 0.22); transform: translateY(-8px); opacity: 0; } to { background: transparent; transform: none; opacity: 1; } }

/* the pot meter under the lead */
.meter { margin-top: var(--s4); height: 14px; border-radius: 999px; background: var(--navy); border: 1px solid var(--line); overflow: hidden; max-width: 420px; }
.meter i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); background: linear-gradient(90deg, var(--apricot), var(--mauve)); border-radius: inherit; transition: width 1s cubic-bezier(.2,.8,.2,1); }

/* the calculator, with its mini scene */
.calc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s5); align-items: center; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.fields label { display: flex; flex-direction: column; gap: var(--s1); font-size: 16px; font-weight: 600; color: var(--lav-text); }
.fields input { min-height: 52px; padding: 0 var(--s2); border-radius: 12px; border: 1px solid var(--lav); background: var(--night); color: var(--cream); font: 600 20px var(--text); font-feature-settings: "tnum" 1; }
.fields input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.out { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.out div { display: flex; flex-direction: column; padding: var(--s2) var(--s3); border-radius: 12px; background: rgba(2, 10, 34, 0.6); border: 1px solid rgba(128, 114, 190, 0.22); }
.out b { font: 700 28px/1.15 var(--text); color: var(--cream); white-space: nowrap; }
.out span { font-size: 16px; color: var(--lav-text); }
.formula { grid-column: 1 / -1; margin: 0; padding: var(--s2) var(--s3); border-left: 3px solid var(--apricot); background: rgba(2, 10, 34, 0.5); border-radius: 0 12px 12px 0; font-size: 17px; line-height: 1.7; }
.formula span { color: var(--lav-text); }
.mini { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 320px; }
.mini-peak { position: relative; width: min(100%, 300px); }
.mini-peak img { width: 100%; }
.mini-peak .lit { position: absolute; inset: 0; filter: sepia(1) saturate(2.4) hue-rotate(-18deg) brightness(1.55); clip-path: inset(100% 0 0 0); transition: clip-path 0.5s cubic-bezier(.2,.8,.2,1); }
.mini-row { display: flex; gap: 6px; min-height: 52px; margin-bottom: var(--s2); flex-wrap: wrap; justify-content: center; max-width: 320px; }
.mini-row img { height: 44px; width: auto; animation: rise 0.5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { transform: translateY(40%) scaleY(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } .mini { min-height: 260px; } }
@media (max-width: 560px) { .fields, .out { grid-template-columns: 1fr; } }

/* network */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.stats .plate { display: flex; flex-direction: column; gap: 4px; }
.stats b { font: 800 40px/1.1 var(--display); font-variation-settings: "SHRP" 100; color: var(--cream); white-space: nowrap; }
.stats span { font-size: 16px; color: var(--lav-text); }
.stats .bar { display: block; height: 8px; margin-top: var(--s1); border-radius: 999px; background: var(--night); overflow: hidden; }
.stats .bar i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); background: var(--cyan); border-radius: inherit; }
.stats .plate.pulse { animation: pulse 1.2s ease-out; }
@keyframes pulse { 0% { border-color: var(--line); } 25% { border-color: var(--cyan); box-shadow: 0 0 24px rgba(89, 237, 251, 0.25); } 100% { border-color: var(--line); } }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }
.cmp { display: flex; flex-direction: column; gap: var(--s4); }
.cmp .row { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; }
.cmp .row > span { font-weight: 700; }
.cmp .bars { display: flex; flex-direction: column; gap: var(--s1); }
.cmp .bars > div { display: flex; align-items: center; gap: var(--s2); }
.cmp .bars i { display: block; height: 14px; width: calc(var(--w) * 0.6); flex: none; border-radius: 999px; background: rgba(138, 143, 168, 0.55); }
.cmp .bars .glow i { background: linear-gradient(90deg, var(--apricot), var(--cream)); box-shadow: 0 0 12px rgba(237, 152, 110, 0.6); }
.cmp em { font-style: normal; font-size: 17px; color: var(--lav-text); }
.cmp .glow em { color: var(--cream); }
.fine { margin: var(--s3) 0 0; font-size: 16px; color: var(--lav-text); max-width: 80ch; }
@media (max-width: 720px) { .cmp .row { grid-template-columns: 1fr; gap: var(--s1); } .cmp .bars i { max-width: 40%; } }

/* rules */
.acts { display: flex; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: var(--s2); }
.steps li { counter-increment: s; position: relative; padding: var(--s3) var(--s4) var(--s3) 88px; border-radius: var(--r); background: var(--plate); border: 1px solid var(--line); transition: border-color 0.2s, background 0.2s; }
.steps li::before { content: counter(s); position: absolute; left: var(--s4); top: var(--s3); font: 800 34px/1 var(--display); color: var(--apricot); }
.steps li:hover, .steps li:focus-visible, .steps li.on { border-color: var(--apricot); background: rgba(237, 152, 110, 0.08); }
.steps b { color: var(--cream); }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); align-items: start; }
.cols h3 { margin: 0 0 var(--s1); font: 800 24px/1.2 var(--display); }
.cols p { margin: 0; color: var(--lav-text); }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .steps li { padding: var(--s3) var(--s3) var(--s3) 68px; } .steps li::before { left: var(--s3); font-size: 28px; } }

/* 404 */
.lost { position: relative; min-height: calc(100svh - 124px); display: flex; align-items: center; overflow: hidden; }
.lost .bg { position: absolute; inset: 0; }
.lost .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.lost .wrap { position: relative; }
.lost h1 { margin: 0; font: 800 clamp(56px, 8vw, 120px)/0.95 var(--display); font-variation-settings: "SHRP" 100; }
.lost p { margin: var(--s3) 0 var(--s4); font-size: 20px; color: var(--lav-text); max-width: 30ch; }
@media (max-width: 720px) { .lost .bg img { object-position: 78% 50%; opacity: 0.55; } }

/* inner page heads: at most 480 px tall */
.phead .wrap { max-height: 480px; }
.cmp .src, .facts a { color: var(--lav-text); font-size: 16px; }
.cmp .src:hover, .facts a:hover { color: var(--cream); }
.cmp em b { color: var(--apricot); }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.facts li { padding: var(--s2) var(--s3); border-radius: 12px; background: var(--plate); border: 1px solid var(--line); }
.facts b { color: var(--cream); }
.tbl tfoot td { height: 54px; padding: 0 20px; border-top: 1px solid var(--line); font-weight: 700; color: var(--cream); }
.mini-mark { display: inline-block; vertical-align: -3px; margin-left: 8px; width: 22px; height: auto; }
.summit-row td { background: rgba(254, 229, 200, 0.04); }

/* the pot bar: a flash at the end of a Summit before it drops back */
.meter.flash { animation: mflash 0.9s ease-out; }
@keyframes mflash { 0% { box-shadow: 0 0 0 rgba(254, 229, 200, 0); } 30% { box-shadow: 0 0 26px rgba(254, 229, 200, 0.9); border-color: var(--cream); } 100% { box-shadow: 0 0 0 rgba(254, 229, 200, 0); } }
.meter { position: relative; }
.meter i { width: calc(var(--v, 0) * 100%); }
/* the calculator's mini peak: the tip flashes when the input reaches a full SOL */
.mini-peak.burst::after { content: ""; position: absolute; left: 50%; top: 0; width: 60%; aspect-ratio: 1; transform: translate(-50%, -45%); background: radial-gradient(circle, rgba(254, 229, 200, 0.95), rgba(225, 157, 175, 0.4) 35%, transparent 70%); animation: burst 1s ease-out forwards; pointer-events: none; }
@keyframes burst { from { opacity: 0; transform: translate(-50%, -45%) scale(0.4); } 30% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -45%) scale(1.4); } }

/* Rules: the steps at the left, the picture held at the right while they scroll by */
.rules-top { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s5); align-items: start; padding-top: var(--s4); padding-bottom: 0; }
.rules-text h1 { margin: 0; font: 800 76px/0.98 var(--display); font-variation-settings: "SHRP" 100; letter-spacing: -0.02em; }
.rules-text .lead { margin: var(--s3) 0 0; font-size: 20px; color: var(--lav-text); }
.rules-text .lead b { color: var(--cream); }
.steps-h { margin: var(--s6) 0 0; font: 800 44px/1.05 var(--display); font-variation-settings: "SHRP" 100; }
.steps-p { margin: var(--s1) 0 var(--s4); color: var(--lav-text); }
.rules-pic { position: sticky; top: 120px; }
.rules-pic .pic { justify-self: stretch; width: 100%; }
.rules-pic .pic img { max-height: none; width: 100%; }
.steps li { transition: border-color 0.2s, background 0.2s, opacity 0.5s ease-out, transform 0.5s cubic-bezier(.2,.8,.2,1); }
.steps li.pre { opacity: 0; transform: translateY(24px); }
@media (max-width: 900px) {
  .rules-top { grid-template-columns: 1fr; }
  .rules-pic { position: relative; top: auto; order: -1; }
  .rules-text h1 { font-size: 56px; }
  .cmp .row { grid-template-columns: 1fr; }
}
