/* Tomorrow Rules — site styles. Brand tokens match the show (brand/MASTER_LOCK.md). */
:root {
  --sky: #8EC5FF; --sky-deep: #6FB0F5; --mint: #A8E6CF; --peach: #FFD3B6;
  --navy: #2B3550; --ink: #14182B; --pill: #1F2A44; --track: #3A4766;
  --teal: #2BB3A3; --green: #4CD964; --orange: #FF9F1C; --red: #FF3B30; --yellow: #FFD23F;
  --paper: #F7FBFF;
  --radius-lg: 36px; --radius-md: 22px;
  --measure: 34rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sky); color: var(--navy); font: 400 1.125rem/1.6 "Inter", system-ui, sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:focus-visible, button:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: "Fredoka", "Inter", sans-serif; font-weight: 700; line-height: 1.04; margin: 0; letter-spacing: -.01em; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 700 1.35rem/1 "Fredoka", sans-serif; color: var(--navy); }
.brand img { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--navy); background: #fff; }
.nav { display: flex; gap: 22px; font-weight: 600; font-size: 1rem; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* hero: the visitor's own health bar */
.hero { padding: 40px 0 72px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hud { display: inline-flex; align-items: center; gap: 0; position: relative; margin: 0 0 52px 40px; }
.hud .lv { position: absolute; left: -40px; top: 50%; translate: 0 -50%; z-index: 1; }
.hud .shell { background: var(--pill); border: 4px solid #fff; border-radius: 20px; padding: 12px 18px 12px 58px; width: min(440px, 76vw); }
.hud .hp { height: 30px; border-radius: 15px; background: var(--track); overflow: hidden; position: relative; }
.hud .hp i { position: absolute; inset: 0 auto 0 0; width: 94%; background: var(--green); border-radius: 15px; transition: width 1.4s cubic-bezier(.2, .8, .2, 1), background-color .6s; }
.hud .hp b { position: relative; padding-left: 14px; font: 700 1rem/30px "Fredoka", sans-serif; color: #fff; }
.hud .en { height: 10px; margin-top: 8px; border-radius: 5px; background: var(--track); overflow: hidden; }
.hud .en i { display: block; height: 100%; width: 31%; background: var(--yellow); border-radius: 5px; }
.hud .status { position: absolute; left: 50%; top: calc(100% + 10px); translate: -32% 0; background: #fff; border: 4px solid var(--pill); border-radius: 999px;
  padding: 4px 18px; font: 700 1rem/1.3 "JetBrains Mono", ui-monospace, monospace; color: var(--pill); white-space: nowrap; min-width: 7ch; text-align: center; }
.hud .status::after { content: "|"; animation: blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { font-size: clamp(3rem, 7.4vw, 6.3rem); color: var(--navy); }
.hero p { max-width: var(--measure); font-size: 1.25rem; margin: 22px 0 30px; }
.hero .art { position: relative; aspect-ratio: 1; }
.hero .art img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 6px solid var(--navy); background: #fff; }
.cta { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; text-decoration: none; font: 700 1.15rem/1 "Fredoka", sans-serif;
  padding: 18px 26px; border-radius: 999px; border: 4px solid var(--navy); }
.cta:hover { background: var(--pill); }
.cta.ghost { background: transparent; color: var(--navy); }
.cta.ghost:hover { background: #fff; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* panels */
.panel { border: 5px solid var(--navy); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 48px); margin-bottom: 36px; }
.panel.mint { background: var(--mint); } .panel.peach { background: var(--peach); } .panel.paper { background: var(--paper); }
.panel h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 14px; }
.panel > p { max-width: var(--measure); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.frame { border: 5px solid var(--navy); border-radius: var(--radius-md); overflow: hidden; background: var(--navy); }

/* the episode's rule list: these really are numbered rules, so they keep their numbers */
.rules { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; counter-reset: rule; max-width: 40rem; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; }
.rules li::before { content: counter(rule); width: 46px; height: 46px; display: grid; place-items: center; background: #fff; color: var(--pill);
  font: 700 1.4rem/1 "Fredoka", sans-serif; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); outline: 0; box-shadow: inset 0 0 0 4px var(--pill); }

/* keep / delete */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.choice a { display: block; text-decoration: none; border: 5px solid var(--navy); border-radius: var(--radius-md); padding: 22px; color: #fff; }
.choice .keep { background: #2E9E58; } .choice .del { background: #8A93A8; }
.choice strong { display: block; font: 700 2.4rem/1 "Fredoka", sans-serif; margin-bottom: 8px; }
.choice a:hover { filter: brightness(1.06); }

/* kit */
.kit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.kit div { background: #fff; border: 4px solid var(--navy); border-radius: var(--radius-md); padding: 18px 20px; }
.kit h3 { font-size: 1.35rem; margin-bottom: 6px; }
.soon { font-weight: 700; }

footer { padding: 40px 0 60px; font-size: 1rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

@media (max-width: 860px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero .art { max-width: 300px; }
  .kit, .choice { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hud .hp i { transition: none; }
  .hud .status::after { animation: none; }
}
