/* Soft Matter Lab theme: Monogrid Pasticcino-inspired, soft and warm. Fonts: Bricolage Grotesque, Instrument Sans, Space Mono. */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,800&family=Instrument+Sans:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap");
:root {
  --field: #ffd9c9;
  --signal: #ff5c8a;
  --flare: #ffe066;
  --ice: #b9e7a5;
  --display: "Bricolage Grotesque", sans-serif;
  --body: "Instrument Sans", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --berry: #c2185b; --cocoa: #3b1522; --cream: #fff4ea; --pista: #b9e7a5; --butter: #ffe066;
}
/* Fraunces SOFT/WONK axes removed; display is now Bricolage Grotesque. */
.grain { opacity: .35; mix-blend-mode: multiply; }

/* pastel zones get cocoa ink */
.hero, .teachers, footer { --ink: #3b1522; --mute: rgba(59, 21, 34, .78); --dim: rgba(59, 21, 34, .55); color: var(--ink); }

/* hud: cream pills that read over peach and over the dark rooms */
.hud-mark { color: var(--cocoa) !important; background: var(--cream); border-radius: 999px; padding: .35rem .8rem; font-family: var(--display) !important; font-weight: 700 !important; letter-spacing: 0 !important; }
.hud-mark span { color: var(--berry) !important; font-style: italic; }
.hud-pills a, .enter { background: var(--cream) !important; color: var(--cocoa) !important; border-color: rgba(59, 21, 34, .2) !important; }
.hud-pills a:hover, .enter:hover { background: var(--berry) !important; color: var(--cream) !important; }
.hud-live { color: var(--cocoa) !important; background: var(--butter); border-radius: 999px; padding: .35rem .75rem; }

/* hero: big soft serif, drifting pastry blobs */
.hero::before, .hero::after { animation: blob 14s ease-in-out infinite alternate; }
.hero::before { width: 40vw !important; height: 40vw !important; right: -6vw !important; top: -10vw !important; background: var(--pista) !important; border-radius: 42% 58% 63% 37% / 45% 40% 60% 55% !important; }
.hero::after { width: 30vw !important; height: 30vw !important; left: -8vw !important; bottom: -8vw !important; background: var(--butter) !important; border-radius: 60% 40% 35% 65% / 55% 60% 40% 45% !important; animation-delay: -5s; }
.hero .hero-copy::before { content: ""; position: absolute; z-index: -1; width: 18vw; height: 18vw; left: 46%; top: 8%; background: #ff9fbe; border-radius: 50% 50% 46% 54% / 60% 44% 56% 40%; animation: blob 11s ease-in-out infinite alternate; }
@keyframes blob { 0% { transform: translate(0,0) rotate(0deg) scale(1); } 50% { transform: translate(2vw,-1.5vw) rotate(25deg) scale(1.06); } 100% { transform: translate(-1.5vw,2vw) rotate(-15deg) scale(.95); } }
.hero-kicker { color: var(--berry) !important; }
.hero h1 { font-weight: 800 !important; font-size: clamp(4.4rem, 10.5vw, 9.6rem) !important; line-height: .84 !important; letter-spacing: -0.04em !important; color: var(--cocoa); }
.hero h1 em { color: var(--berry) !important; font-style: italic !important; font-weight: 600; }
.hero h1 .line-c { font-size: .5em !important; font-weight: 400; font-style: italic; }
.hero-meta span { color: var(--cocoa) !important; background: rgba(255, 244, 234, .7) !important; border-color: rgba(59, 21, 34, .2) !important; }
.field-notes strong { color: var(--cocoa) !important; font-family: var(--display); font-weight: 700; }
.field-notes b { color: var(--berry) !important; }
.field-notes em { color: var(--mute) !important; }

/* specimen rooms: inset like windows in the peach page */
@media (min-width: 861px) { .specimen .stage { margin: 14px; min-height: calc(100svh - 28px); border-radius: 30px; overflow: hidden; } }
.specimen-title { font-weight: 700 !important; letter-spacing: -0.02em !important; }
.sheet { border-radius: 30px !important; background: rgba(40, 14, 24, .72) !important; border-color: rgba(255, 159, 190, .45) !important; }
.chip[aria-pressed="true"], .chip:hover { background: var(--butter) !important; color: var(--cocoa) !important; }
.ghost-index { -webkit-text-stroke: 1.5px rgba(255, 210, 225, .8) !important; }

/* teachers + footer on peach */
.teachers h2 { color: var(--cocoa); font-weight: 800 !important; letter-spacing: -0.03em !important; }
.teachers h2 em { color: var(--berry) !important; font-style: italic; }
.teach-card { background: var(--cream) !important; border: 0 !important; border-radius: 28px !important; box-shadow: 0 10px 0 rgba(194, 24, 91, .18); }
.teach-card h3 { color: var(--berry) !important; }
footer a { color: var(--berry) !important; }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after, .hero .hero-copy::before { animation: none; } }
@media (max-width: 760px) { .hero .hero-copy::before { width: 34vw; height: 34vw; } }
.hud-mark { white-space: nowrap; }
.hero { padding-top: 7.5rem !important; }
.hero h1 .line-c { display: block; margin-top: .12em; }
.hud-pills { background: transparent !important; box-shadow: none !important; }

/* ================= specimen rooms + teacher notes ================= */
.teach-card { padding: 1.3rem 1.5rem 1.4rem !important; }
.teachers .lede { color: var(--mute) !important; }
.view-label, .pane-tag { background: var(--cream) !important; color: var(--cocoa) !important; border: 0 !important; font-weight: 500; }
.specimen-num { color: var(--butter) !important; text-shadow: 0 2px 10px rgba(40, 14, 24, .7) !important; }
.specimen-title { color: var(--cream); }
.sheet .notice { color: var(--butter) !important; }
.sheet .definition { color: var(--cream) !important; }
.world strong, .mistakes strong, .try strong { color: #ff9fbe !important; }
.chip { border-radius: 999px !important; border-color: rgba(255, 159, 190, .55) !important; }
.ctrl input[type="range"] { accent-color: #ff9fbe; }
.ctrl input[type="range"]::-webkit-slider-thumb { background: var(--butter) !important; }
.ctrl output { color: var(--butter) !important; }
footer { border-top: 0 !important; }

/* ================= phones: rooms stack above their placards on the peach page ================= */
@media (max-width: 860px) {
  .specimen .stage { margin: 8px 8px 0; border-radius: 22px; overflow: hidden; }
  .specimen .placard { --ink: #3b1522; --mute: rgba(59, 21, 34, .78); --dim: rgba(59, 21, 34, .55); }
  .specimen-title { color: var(--cocoa) !important; text-shadow: none !important; }
  .specimen-num { color: var(--berry) !important; text-shadow: none !important; }
  .placard > .placard-stack > .definition, .placard-stack > p { color: var(--cocoa); text-shadow: none !important; }
  .sheet { --ink: #fff4ea; --mute: rgba(255, 244, 234, .8); color: #fff4ea; max-height: none !important; overflow: visible !important; padding: 1rem 1.1rem 1.1rem !important; }
  .chip { min-height: 40px; }
  .hud-pills a { min-height: 36px; display: inline-flex; align-items: center; }
}

/* ================= desktop: title + definition sit on the same glass as the sheet, so pale rooms never wash them out ================= */
@media (min-width: 861px) {
  .specimen .placard-stack { background: rgba(59, 21, 34, .74); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 26px; padding: 1.1rem 1.2rem 1.2rem; box-shadow: 0 18px 50px rgba(59, 21, 34, .28); }
  .specimen .placard-stack > .specimen-title, .specimen .placard-stack > .definition { text-shadow: none !important; }
  .specimen.anchor-br .placard-stack > .specimen-title { margin-left: 0; }
  .specimen.anchor-bl .view-label { left: auto; right: 1rem; }
  .specimen .placard-stack > .sheet { background: rgba(255, 244, 234, .06) !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .specimen .placard-stack .sheet-copy::after { content: "scroll for more \2193"; position: sticky; bottom: 0; display: block; margin-top: 6px; padding: 16px 0 2px; background: linear-gradient(rgba(64, 30, 42, 0), rgba(64, 30, 42, .95) 60%); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--flare, #ffd166); text-align: right; pointer-events: none; }
  .specimen .placard-stack .sheet-copy.at-end::after { display: none; }
}
@media (min-width: 861px) and (max-height: 900px) {
  .specimen .placard-stack > .specimen-title { font-size: clamp(1.8rem, 3vw, 2.6rem) !important; }
  .specimen .placard-stack > .definition { font-size: 15.5px; }
}

/* sliders: same thin line, but a finger-sized hit area and thumb */
.ctrl input[type="range"] { height: 30px !important; background: linear-gradient(rgba(255, 244, 234, .45), rgba(255, 244, 234, .45)) center / 100% 2px no-repeat !important; touch-action: pan-y; cursor: pointer; }
.ctrl input[type="range"]::-moz-range-track { height: 2px; background: rgba(255, 244, 234, .45); }
@media (pointer: coarse), (max-width: 860px) {
  .ctrl input[type="range"]::-webkit-slider-thumb { width: 24px; height: 24px; }
  .ctrl input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; }
}

/* never let a wide row pan the page sideways on phones */
html { overflow-x: clip; }
