/* Miss Molecule™ classroom tools — cream, plum, teal, gold, coral.
   Mobile-first. Text must wrap, never clip. No third-party requests. */

@font-face {
  font-family: "Luckiest Guy";
  src: url("../fonts/LuckiestGuy-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #F7F0E1;
  --paper: #FFFCF7;
  --plum: #2F1B4A;
  --navy: #002858;
  --teal: #1A8A92;
  --teal-deep: #146F76;
  --teal-logo: #00A0A8;
  --coral: #FF6B5A;
  --coral-deep: #E25546;
  --gold: #E8C56B;
  --sunny: #FFD84A;
  --sage: #7BBF8A;
  --lilac: #C9A0E8;
  --pink: #F44777;
  --sky: #7EC8D4;
  --soft-black: #222222;
  --shadow: 0 10px 28px rgba(47, 27, 74, 0.12);
  --shadow-sm: 0 4px 14px rgba(47, 27, 74, 0.1);
  --radius: 1.5rem;
  --radius-sm: 1rem;
  --font-display: "Luckiest Guy", "Trebuchet MS", "Gill Sans", sans-serif;
  --font-body: "Nunito", "Segoe UI", "Trebuchet MS", sans-serif;
  --max: 72rem;
  --header-h: 4.5rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Author display rules must not un-hide [hidden] */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 6.25rem; }

#game, #timer-panel, #idea-card, #quiz, .panel, .hero, h1 {
  scroll-margin-top: 6.25rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--teal-deep);
  font-weight: 700;
  overflow-wrap: anywhere;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--plum);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 0.6rem; }

.tm {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.55em;
  vertical-align: super;
  letter-spacing: 0;
  line-height: 1;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 240, 225, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 4px solid var(--plum);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--plum);
  min-width: 0;
}

.brand-link img {
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 3.25rem;
  border-radius: 50%;
}

.brand-text {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.4vw, 1.45rem);
  line-height: 1.15;
  font-weight: 400;
  overflow-wrap: break-word;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--plum);
  border-radius: 0.85rem;
  background: var(--sunny);
  color: var(--plum);
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}

.site-nav {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 1rem 1rem;
  max-width: var(--max);
  margin: 0 auto;
}

.site-nav.open { display: flex; }

.site-nav a {
  text-decoration: none;
  color: var(--plum);
  font-weight: 800;
  padding: 0.7rem 0.85rem;
  border-radius: 0.8rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--sunny);
}

.site-nav a.nav-shop {
  background: var(--plum);
  color: var(--cream);
  text-align: centre;
  text-align: center;
}

@media (min-width: 860px) {
  .menu-toggle { display: none; }
  .header-inner { padding: 0.55rem 1.5rem; }
  .site-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.5rem 0 0;
    gap: 0.15rem;
    margin: 0;
  }
  .site-header .header-wrap {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .site-nav a { padding: 0.45rem 0.7rem; font-size: 0.98rem; }
}

.header-wrap { width: 100%; }

/* ----- Layout ----- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  position: relative;
}

@media (min-width: 720px) {
  .wrap { padding: 2rem 1.5rem 4rem; }
}

.hero {
  position: relative;
  padding: 1.25rem 0 1.5rem;
}

.kicker {
  display: inline-block;
  background: var(--plum);
  color: var(--sunny);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin: 0 0 0.9rem;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  color: var(--plum);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.85rem, 6.2vw, 3.35rem);
  margin: 0 0 0.7rem;
}

h2 {
  font-size: clamp(1.45rem, 3.8vw, 2.1rem);
  margin: 0 0 0.7rem;
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin: 0 0 0.5rem;
}

.lede {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  max-width: 42rem;
  margin: 0 0 1.4rem;
}

/* Decorative flat shapes — never cover text (pointer-events none, sit in margins) */
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.blob-a { width: 9rem; height: 9rem; background: var(--gold); top: -1.5rem; right: -2rem; opacity: 0.55; }
.blob-b { width: 6rem; height: 6rem; background: var(--coral); bottom: 0; left: -1.5rem; opacity: 0.4; }
.blob-c { width: 5rem; height: 5rem; background: var(--sky); top: 40%; right: 8%; opacity: 0.45; }

.doodle-rule {
  width: min(12rem, 60%);
  height: 10px;
  border: none;
  margin: 0 0 1.4rem;
  background:
    radial-gradient(circle at 8px 5px, var(--coral) 5px, transparent 6px),
    radial-gradient(circle at 32px 5px, var(--teal) 5px, transparent 6px),
    radial-gradient(circle at 56px 5px, var(--sunny) 5px, transparent 6px),
    radial-gradient(circle at 80px 5px, var(--plum) 5px, transparent 6px),
    radial-gradient(circle at 104px 5px, var(--coral) 5px, transparent 6px);
  background-repeat: no-repeat;
}

/* ----- Cards & tools ----- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin: 1.5rem 0 2rem;
}

@media (min-width: 700px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid.four { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .card-grid.four { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.tool-card {
  background: var(--paper);
  border: 4px solid var(--plum);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.tool-card h2,
.tool-card h3 { margin-top: 0.4rem; }

.tool-card p { margin: 0 0 0.8rem; flex: 1; }

.tool-card .chip {
  align-self: flex-start;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--plum);
}

.icon-scribble {
  width: 3.4rem;
  height: 3.4rem;
  flex: 0 0 auto;
}

.panel {
  background: var(--paper);
  border: 4px solid var(--plum);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm);
  margin: 1.25rem 0;
  min-width: 0;
}

.how-to {
  background: #E8F6F4;
  border: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1.4rem;
  margin: 2rem 0;
}

.how-to h2 { color: var(--teal-deep); }

.cta {
  background: var(--plum);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem 1.55rem;
  margin: 2rem 0;
}

.cta h2, .cta p, .cta a { color: var(--cream); }
.cta h2 { color: var(--sunny); }
.cta .url {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.btn {
  display: inline-block;
  background: var(--sunny);
  color: var(--plum);
  font-weight: 800;
  text-decoration: none;
  border: 3px solid var(--plum);
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.3;
  text-align: center;
  box-shadow: 3px 3px 0 var(--plum);
  white-space: normal;
  overflow-wrap: break-word;
  max-width: 100%;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--plum); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--plum); }

.btn-teal { background: var(--teal); color: #fff; border-color: var(--plum); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-plum { background: var(--plum); color: var(--sunny); border-color: var(--sunny); box-shadow: 3px 3px 0 var(--gold); }
.btn-ghost { background: var(--paper); }

.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 2px 2px 0 var(--plum);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0 0;
}

.disclaimer {
  font-size: 0.98rem;
  background: var(--gold);
  color: var(--plum);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-weight: 700;
  margin: 1rem 0 1.4rem;
}

/* ----- Forms / tools ----- */
label { font-weight: 800; display: block; margin: 0 0 0.35rem; }

select,
.field {
  width: 100%;
  max-width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--paper);
  border: 3px solid var(--plum);
  border-radius: 0.9rem;
  padding: 0.65rem 0.8rem;
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

@media (min-width: 700px) {
  .filters { grid-template-columns: 1fr 1fr auto; align-items: end; }
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 1rem 0;
}

@media (min-width: 560px) {
  .choice-grid.three { grid-template-columns: 1fr 1fr 1fr; }
  .choice-grid.two { grid-template-columns: 1fr 1fr; }
}

.choice {
  background: var(--paper);
  border: 3px solid var(--plum);
  border-radius: 1.1rem;
  padding: 0.9rem 0.8rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--plum);
  cursor: pointer;
  text-align: center;
  min-height: 3.4rem;
}

.choice:hover { background: var(--sunny); }

.choice.correct {
  background: var(--sage);
  color: var(--plum);
}

.choice.wrong {
  background: var(--coral);
  color: #fff;
}

.choice.missed {
  outline: 4px dashed var(--teal);
}

.progress {
  font-weight: 800;
  color: var(--teal-deep);
  margin: 0 0 0.6rem;
}

.claim {
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.45;
  margin: 0.3rem 0 0.6rem;
  overflow-wrap: break-word;
}

.explain {
  margin-top: 1rem;
  padding: 1rem 1rem 1.1rem;
  background: #FFF6D6;
  border-left: 8px solid var(--gold);
  border-radius: 0 1rem 1rem 0;
}

.explain.ok { background: #E8F6EE; border-left-color: var(--sage); }
.explain.no { background: #FDECEA; border-left-color: var(--coral); }

.muted { color: #31486a; }

.materials, .steps {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.2rem;
}

.materials li, .steps li { margin: 0.25rem 0; }

.tag {
  display: inline-block;
  background: var(--sky);
  color: var(--plum);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin: 0 0.25rem 0.35rem 0;
}

/* ----- Breathing timer ----- */
.timer-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0 1.5rem;
  min-height: 22rem;
}

.circle-wrap {
  position: relative;
  width: min(20rem, 78vw);
  height: min(20rem, 78vw);
  display: grid;
  place-items: center;
}

.circle-breath {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #B8E4E6, var(--teal) 62%, var(--teal-deep));
  border: 6px solid var(--plum);
  transform: scale(0.72);
  transition: transform 0.4s linear;
  box-shadow: 0 0 0 10px rgba(26, 138, 146, 0.15);
}

.circle-label {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0.7rem 1rem 0.85rem;
  max-width: 85%;
  background: var(--cream);
  border: 3px solid var(--plum);
  border-radius: 1.2rem;
  box-shadow: 3px 3px 0 var(--plum);
}

.circle-label .phase {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5vw, 2rem);
  color: var(--plum);
  margin: 0;
  line-height: 1.15;
}

.circle-label .count {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 4rem);
  color: var(--plum);
  margin: 0.15rem 0 0;
  line-height: 1;
}

.preset-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0.4rem 0 1rem; }

.preset {
  background: var(--paper);
  border: 3px solid var(--plum);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-weight: 800;
  font-family: var(--font-body);
  color: var(--plum);
  cursor: pointer;
  font-size: 1rem;
}

.preset[aria-pressed="true"] {
  background: var(--plum);
  color: var(--sunny);
}

.timer-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }

body.timer-full {
  background: var(--cream);
}

body.timer-full .site-header,
body.timer-full .how-to,
body.timer-full .cta,
body.timer-full .site-footer,
body.timer-full .lede,
body.timer-full .kicker,
body.timer-full .doodle-rule,
body.timer-full h1,
body.timer-full .disclaimer,
body.timer-full .preset-blurb {
  display: none;
}

body.timer-full .timer-chrome { display: block; }
body.timer-full .wrap { padding-top: 0.5rem; }
body.timer-full .timer-stage { min-height: 70vh; }

.timer-chrome { margin-bottom: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  .circle-breath { transition: none; }
  html { scroll-behavior: auto; }
}

/* ----- Footer ----- */
.site-footer {
  background: var(--plum);
  color: var(--cream);
  padding: 1.6rem 1rem 2.2rem;
  margin-top: auto;
}

.site-footer .wrap { padding-top: 0.4rem; padding-bottom: 0.4rem; }

.site-footer a { color: var(--gold); }

.footer-mark {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--sunny);
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.privacy { font-size: 0.95rem; margin: 0.6rem 0 0; max-width: 46rem; }

/* ----- 404 ----- */
.big-404 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 8rem);
  color: var(--coral);
  line-height: 0.9;
  margin: 0 0 0.4rem;
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.score-banner {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--plum);
  line-height: 1.2;
}
