/* Denize Rodrigues — Super Agents Safety Squad
   Art direction: bright morning kitchen. Cream/sand ground, friendly blue,
   warm marigold, one gentle teal. Rounded geometric sans, generous line height,
   large tap targets. Never alarm styling. */

:root {
  --sand-50: #fffaf1;
  --sand-100: #fbf4e6;
  --sand-200: #f4e9d5;
  --sand-300: #e8d9bf;
  --ink-900: #26313d;
  --ink-700: #3c4b5c;
  --ink-500: #5d6d7f;
  --blue-700: #1f5490;
  --blue-600: #2a6cb0;
  --blue-500: #3b83c9;
  --blue-100: #dceaf7;
  --gold-600: #cf8a12;
  --gold-500: #efa62a;
  --gold-200: #fbe3b4;
  --teal-600: #2f8b81;
  --teal-500: #45a79b;
  --teal-100: #d8efeb;
  --white: #ffffff;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 6px rgba(38, 49, 61, 0.06);
  --shadow: 0 10px 30px rgba(38, 49, 61, 0.09);
  --shadow-lg: 0 22px 60px rgba(38, 49, 61, 0.13);

  --font-display: "Quicksand", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --pad: clamp(20px, 4vw, 44px);

  --dur-slow: 18s;
  --dur-mid: 9s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand-100);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.012em;
  margin: 0 0 0.5em;
  color: var(--ink-900);
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: clamp(1.18rem, 2vw, 1.45rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.05em; max-width: 68ch; }
a { color: var(--blue-700); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--blue-600); }
strong { font-weight: 800; }
small { font-size: 0.86rem; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--white);
  color: var(--blue-700);
  padding: 10px 16px;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 820px; }

section { padding: clamp(46px, 7vw, 88px) 0; }
.section-head { margin-bottom: clamp(24px, 4vw, 40px); }
.section-head p { color: var(--ink-700); font-size: 1.06rem; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.79rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin: 0 0 0.7em;
  display: block;
}

/* ------------------------------------------------ chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--white);
  color: var(--ink-700);
  white-space: nowrap;
  line-height: 1.5;
}
.chip::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.chip--spec { color: var(--blue-700); border-color: #b9d4ec; background: var(--blue-100); }
.chip--slice { color: var(--teal-600); border-color: #a9dbd3; background: var(--teal-100); }
.chip--rights { color: var(--gold-600); border-color: #f0d69d; background: var(--gold-200); }
.chip--partner { color: #8a5a2b; border-color: #e6cdae; background: #f8ecd9; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* ------------------------------------------------ header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 250, 241, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--sand-300);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 10px var(--pad);
  max-width: var(--wrap);
  margin: 0 auto;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink-900); }
.brand__mark { width: 40px; height: 40px; color: var(--blue-600); flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.brand__sub { font-size: 0.72rem; color: var(--ink-500); letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-700);
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav a:hover { background: var(--white); color: var(--blue-700); box-shadow: var(--shadow-sm); }
.nav a[aria-current="page"] { background: var(--blue-600); color: var(--white); }

.navtoggle {
  display: none;
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  color: var(--ink-900);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
}

/* ------------------------------------------------ access bar */
.accessbar {
  background: var(--blue-700);
  color: var(--white);
}
.accessbar__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px var(--pad);
  display: flex;
  align-items: center;
  gap: 12px 22px;
  flex-wrap: wrap;
  font-size: 0.87rem;
}
.accessbar__label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #cfe2f4;
}
.segset { display: inline-flex; background: rgba(255, 255, 255, 0.14); border-radius: 999px; padding: 3px; gap: 3px; }
.segset button {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.84rem;
  color: #e7f1fa;
  background: none;
  border: 0;
  padding: 7px 14px;
  min-height: 36px;
  border-radius: 999px;
  cursor: pointer;
}
.segset button[aria-pressed="true"] { background: var(--white); color: var(--blue-700); }
.segset button:hover:not([aria-pressed="true"]) { background: rgba(255, 255, 255, 0.15); }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 700; font-size: 0.87rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  width: 46px; height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  position: relative;
  transition: background 0.2s var(--ease);
  flex: 0 0 auto;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.2s var(--ease);
}
.switch input:checked + .switch__track { background: var(--gold-500); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--white); outline-offset: 3px; }

.switch--light .switch__track { background: var(--sand-300); }
.switch--light .switch input:checked + .switch__track { background: var(--teal-500); }

/* ------------------------------------------------ hero / living scene */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(40px, 6vw, 76px) 0 clamp(44px, 6vw, 84px);
  background: linear-gradient(178deg, #fff8ea 0%, #fdf0d9 38%, #f7e8d2 100%);
}
.hero--slim { padding: clamp(34px, 4.6vw, 58px) 0 clamp(34px, 4.6vw, 58px); }
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer--bg { z-index: -5; }
.layer--mid { z-index: -4; }
.layer--fore { z-index: -3; }
.layer--char { z-index: -2; }

.sunbeam {
  position: absolute;
  top: -28%; left: 52%;
  width: 62vw; height: 130%;
  background: linear-gradient(200deg, rgba(255, 236, 189, 0.95), rgba(255, 244, 214, 0) 62%);
  transform: rotate(14deg);
  filter: blur(6px);
  animation: beam var(--dur-slow) var(--ease) infinite alternate;
}
@keyframes beam {
  from { opacity: 0.55; transform: rotate(12deg) translateY(-10px); }
  to { opacity: 0.9; transform: rotate(17deg) translateY(14px); }
}
.hillrow { position: absolute; bottom: -6px; left: 0; width: 100%; }
.grain {
  position: absolute; inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(38, 49, 61, 0.09) 1px, transparent 1px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}
.floaty { position: absolute; animation: floaty var(--dur-mid) ease-in-out infinite alternate; }
@keyframes floaty {
  from { transform: translate3d(0, 0, 0) rotate(-4deg); }
  to { transform: translate3d(10px, -22px, 0) rotate(6deg); }
}
.f1 { top: 12%; left: 6%; animation-duration: 11s; }
.f2 { top: 26%; left: 78%; animation-duration: 14s; }
.f3 { top: 62%; left: 88%; animation-duration: 9s; }
.f4 { top: 70%; left: 3%; animation-duration: 13s; }
.f5 { top: 6%; left: 44%; animation-duration: 16s; }
.f6 { top: 46%; left: 66%; animation-duration: 12s; }

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
}
.hero__title { margin-bottom: 0.35em; }
.hero__lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-700); max-width: 52ch; }
.hero__cast { width: 100%; height: auto; filter: drop-shadow(0 18px 34px rgba(38, 49, 61, 0.14)); }
.cast-float { animation: castfloat 10s ease-in-out infinite alternate; transform-origin: center bottom; }
@keyframes castfloat {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

/* ------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  min-height: 50px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--blue-600); color: var(--white); box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--blue-700); color: var(--white); }
.btn--gold { background: var(--gold-500); color: #4a3208; box-shadow: var(--shadow); }
.btn--gold:hover { background: var(--gold-600); color: #fff; }
.btn--ghost { background: var(--white); color: var(--blue-700); border-color: #c7dcef; box-shadow: var(--shadow-sm); }
.btn--sm { min-height: 42px; padding: 9px 16px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* ------------------------------------------------ cards */
.card {
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 30px);
  box-shadow: var(--shadow-sm);
}
.card--soft { background: var(--sand-50); }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c7dcef; color: inherit; }
.tile__icon { width: 46px; height: 46px; color: var(--blue-600); }
.tile .chip { align-self: flex-start; }
.tile__name { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; }
.tile p { font-size: 0.97rem; color: var(--ink-700); margin: 0; }
.tile__more { font-family: var(--font-display); font-weight: 700; color: var(--blue-700); font-size: 0.93rem; margin-top: auto; }

.callout {
  border-left: 6px solid var(--teal-500);
  background: var(--teal-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
}
.callout--gold { border-left-color: var(--gold-500); background: #fdf1da; }
.callout--blue { border-left-color: var(--blue-500); background: var(--blue-100); }
.callout h3, .callout h4 { margin-bottom: 0.35em; }
.callout p:last-child { margin-bottom: 0; }

.note {
  font-size: 0.92rem;
  color: var(--ink-700);
  background: var(--sand-200);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

/* ------------------------------------------------ tabs / panels */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs button {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.93rem;
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  color: var(--ink-700);
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }
.tabs button:hover:not([aria-selected="true"]) { border-color: var(--blue-500); color: var(--blue-700); }
[role="tabpanel"][hidden], [hidden] { display: none !important; }

/* ------------------------------------------------ checklist */
.checklist { display: grid; gap: 10px; }
.check {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.check--head {
  background: var(--sand-200);
  border-color: var(--sand-300);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-700);
}
.check input[type="checkbox"] {
  width: 24px; height: 24px;
  accent-color: var(--teal-600);
  cursor: pointer;
  margin: 2px 0 0;
}
.check__label { font-weight: 700; }
.check__label span { display: block; font-weight: 400; font-size: 0.92rem; color: var(--ink-500); }
.check__evidence { font-size: 0.9rem; color: var(--ink-700); }
.pill-open {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: var(--gold-200);
  border-radius: 999px;
  padding: 3px 10px;
}
.pill-open--met { color: var(--teal-600); background: var(--teal-100); }

/* ------------------------------------------------ safeguarding */
.guard { display: grid; gap: 12px; }
.guard__row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  flex-wrap: wrap;
}
.guard__row > div { flex: 1 1 260px; min-width: 0; }
.guard__row h4 { margin-bottom: 0.2em; }
.guard__row p { font-size: 0.93rem; margin: 0; color: var(--ink-700); }
.guard__state {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--teal-600);
  min-width: 96px;
  text-align: right;
}
.locked { font-size: 0.78rem; color: var(--ink-500); font-weight: 700; }

/* ------------------------------------------------ misc components */
.meter { background: var(--sand-200); border-radius: 999px; height: 12px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--teal-500); border-radius: 999px; transition: width 0.35s var(--ease); }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1.5px solid var(--sand-300); background: var(--white); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 0.95rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--sand-200); vertical-align: top; }
th {
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-700);
  background: var(--sand-200);
}
tbody tr:last-child td { border-bottom: 0; }

details.acc {
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  border-radius: var(--radius);
  padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}
details.acc + details.acc { margin-top: 12px; }
details.acc > summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  padding: 16px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--blue-600);
  line-height: 1;
}
details.acc[open] > summary::after { content: "–"; }
details.acc > div { padding-bottom: 18px; }

.transcript {
  background: var(--sand-50);
  border: 1.5px dashed #cfbd9c;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 0.95rem;
}
.transcript p { margin-bottom: 0.7em; }
.transcript .t-active { background: var(--gold-200); border-radius: 6px; box-shadow: 0 0 0 4px var(--gold-200); }

.prose-book {
  font-size: 1.09rem;
  line-height: 1.95;
}
.prose-book p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.1rem;
  float: left;
  line-height: 0.86;
  padding: 6px 10px 0 0;
  color: var(--blue-600);
}
.prose-book .say {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0;
  max-width: none;
}

.badge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.badge {
  text-align: center;
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  border-radius: var(--radius);
  padding: 18px 12px;
  opacity: 0.5;
  filter: grayscale(1);
  transition: opacity 0.25s var(--ease), filter 0.25s var(--ease), transform 0.25s var(--ease);
}
.badge.earned { opacity: 1; filter: none; transform: translateY(-3px); border-color: var(--gold-500); box-shadow: var(--shadow-sm); }
.badge svg { width: 56px; height: 56px; }
.badge b { display: block; font-family: var(--font-display); font-size: 0.95rem; margin-top: 6px; }
.badge small { color: var(--ink-500); }

.taglist { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  color: var(--ink-700);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
}
.tag[aria-pressed="true"] { background: var(--teal-600); border-color: var(--teal-600); color: var(--white); }

input[type="text"], select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  min-height: 48px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--sand-300);
  background: var(--white);
  color: var(--ink-900);
}
label.field { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }

.doorgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 12px; }
.door {
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.door b { font-family: var(--font-display); display: block; font-size: 1rem; }
.door span { font-size: 0.82rem; font-weight: 700; }
.door--open { border-color: #a9dbd3; background: var(--teal-100); }
.door--open span { color: var(--teal-600); }
.door--spec span { color: var(--blue-700); }

/* ------------------------------------------------ footer */
.foot {
  background: var(--ink-900);
  color: #dfe6ee;
  padding: clamp(38px, 5vw, 60px) 0 30px;
}
.foot h4 { color: var(--white); font-size: 0.95rem; letter-spacing: 0.04em; }
.foot a { color: #b9d4ec; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 28px; }
.foot ul { list-style: none; padding: 0; }
.foot li { margin-bottom: 8px; font-size: 0.94rem; }
.foot__line {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #3c4b5c;
  display: flex;
  gap: 12px 26px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.9rem;
}
.foot__stack { font-family: var(--font-display); font-weight: 700; color: var(--white); }

.printcard {
  background: var(--white);
  border: 2.5px dashed var(--blue-500);
  border-radius: var(--radius);
  padding: 24px;
}
.printcard ol { font-size: 1.06rem; }

/* ------------------------------------------------ modes */
body[data-motion="gentle"] .sunbeam { animation-duration: 34s; }
body[data-motion="gentle"] .floaty,
body[data-motion="gentle"] .cast-float { animation-duration: 26s !important; }
body[data-motion="gentle"] .grain { opacity: 0.28; }

body[data-motion="minimal"] .sunbeam,
body[data-motion="minimal"] .floaty,
body[data-motion="minimal"] .cast-float,
body[data-motion="minimal"] .pulse { animation: none !important; }
body[data-motion="minimal"] * { transition-duration: 0.01ms !important; }
body[data-motion="minimal"] .grain { display: none; }
body[data-motion="minimal"] html { scroll-behavior: auto; }
body[data-motion="minimal"] .tile:hover,
body[data-motion="minimal"] .btn:hover { transform: none; }

body[data-quiet="on"] {
  --sand-100: #f6f1e8;
  --white: #fdfbf7;
  --blue-600: #4a7ba8;
  --blue-700: #3d6a95;
  --gold-500: #d9ac66;
  --ink-900: #33404d;
}
body[data-quiet="on"] .hero { background: linear-gradient(178deg, #f8f2e6, #f2ebdd); }
body[data-quiet="on"] .accessbar { background: #3d6a95; }
body[data-quiet="on"] .foot { background: #35414e; }
body[data-quiet="on"] .grain { opacity: 0.2; }

body[data-sensory="on"] { line-height: 1.85; letter-spacing: 0.01em; }
body[data-sensory="on"] .grain,
body[data-sensory="on"] .sunbeam { display: none; }
body[data-sensory="on"] .hero { background: #f7f2e8; }
body[data-sensory="on"] .card,
body[data-sensory="on"] .tile { box-shadow: none; }
body[data-sensory="on"] .prose-book { font-size: 1.16rem; line-height: 2.1; }
body[data-sensory="on"] p { max-width: 60ch; }

.mode-readout {
  font-size: 0.84rem;
  color: #cfe2f4;
  font-weight: 700;
}
.ambience-state { font-weight: 700; }

/* ------------------------------------------------ responsive */
@media (max-width: 1040px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__cast { max-width: 460px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .navtoggle { display: inline-flex; }
  .nav {
    display: none;
    width: 100%;
    margin: 6px 0 4px;
    flex-direction: column;
    gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; min-height: 48px; display: flex; align-items: center; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; }
  .check { grid-template-columns: 28px minmax(0, 1fr); }
  .check__evidence { grid-column: 2; }
  .check--head { display: none; }
  .accessbar__inner { gap: 10px 16px; }
  .segset button { padding: 7px 11px; font-size: 0.8rem; }
  .guard__state { text-align: left; min-width: 0; }
  .prose-book p:first-of-type::first-letter { font-size: 2.5rem; }
}

@media print {
  .topbar, .accessbar, .foot, .btn, .tabs, .no-print { display: none !important; }
  body { background: #fff; }
}

/* character card head */
.charhead { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 10px; }
.charhead__meta { min-width: 0; }
.charhead__meta .chip { max-width: 100%; }
@media (max-width: 640px) {
  .charhead { flex-direction: column; align-items: flex-start; gap: 8px; }
  .charhead svg { max-width: 110px; }
}

/* ============================================================ TRIPLE LENS */

.lensbadge {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0;
  border: 1px solid var(--sand-300);
  background: var(--white);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  max-width: 100%;
  flex-wrap: wrap;
}
.lensbadge:hover { border-color: var(--blue-500); box-shadow: var(--shadow-sm); }
.lensbadge:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 2px; }
.lensbadge__seg {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sand-100);
  line-height: 1.25;
}
.lensbadge__seg b {
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.lensbadge__seg i {
  font-style: normal;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.lensbadge__seg.is-verified { background: var(--teal-100); }
.lensbadge__seg.is-verified i { color: var(--teal-600); }
.lensbadge__seg.is-contested { background: var(--gold-200); }
.lensbadge__seg.is-contested i { color: var(--gold-600); }
.lensbadge__seg.is-unsupported { background: var(--sand-200); }
.lensbadge__seg.is-unsupported i { color: var(--ink-700); }
.lensbadge__seg.is-notstated { background: var(--sand-100); border: 1px dashed var(--sand-300); }
.lensbadge__seg.is-notstated i { color: var(--ink-500); }
.lensbadge__seg.is-withheld { background: var(--blue-100); }
.lensbadge__seg.is-withheld i { color: var(--blue-700); }

.lensrow-wrap { margin-top: 12px; }

/* answer block */
.lensans {
  border: 1px solid var(--sand-300);
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px);
  margin-top: 18px;
}
.lensans--refused { border-color: var(--gold-500); background: #fffdf7; }
.lensans__head h3 { margin: 8px 0 4px; font-size: 1.24rem; }
.lensans__head p { margin: 0; color: var(--ink-700); font-size: .95rem; }
.lensans__note {
  margin: 14px 0 0;
  font-size: .92rem;
  color: var(--ink-700);
  background: var(--sand-100);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.lenstag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
}
.lenstag--power { background: var(--gold-200); color: var(--gold-600); }
.lenstag--path { background: var(--teal-100); color: var(--teal-600); }

.refusal {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-600);
  background: var(--gold-200);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.lensrows { margin-top: 16px; display: grid; gap: 2px; }
.lensrow {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 4px 18px;
  padding: 12px 14px;
  background: var(--sand-50);
  border-radius: var(--radius-sm);
}
.lensrow.is-missing { background: repeating-linear-gradient(135deg, #fffdf7, #fffdf7 8px, #fdf6e6 8px, #fdf6e6 16px); }
body[data-sensory="on"] .lensrow.is-missing { background: #fdf6e6; }
.lensrow__k { font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--ink-700); }
.lensrow__v { font-size: .97rem; min-width: 0; overflow-wrap: anywhere; }
.lensrow__n { display: block; font-size: .85rem; color: var(--ink-500); margin-top: 4px; }

.lensq { margin-top: 18px; border-top: 1px dashed var(--sand-300); padding-top: 16px; }
.lensq h4 { margin: 0 0 10px; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); }
.lensq pre {
  margin: 0;
  background: #1d2a36;
  color: #e8f1fa;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  font-size: .82rem;
  line-height: 1.6;
  white-space: pre;
}
.lensq__binds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lensq__binds span {
  font-size: .8rem;
  background: var(--blue-100);
  color: var(--blue-700);
  border-radius: 999px;
  padding: 4px 12px;
}
.lensq__binds b { font-family: var(--font-display); }
.lensq__note { font-size: .86rem; color: var(--ink-500); margin: 10px 0 0; }
.lensq__note code { background: var(--sand-200); border-radius: 6px; padding: 1px 6px; font-size: .82rem; }

/* modal */
.lensmodal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; }
.lensmodal[hidden] { display: none; }
.lensmodal__scrim { position: absolute; inset: 0; background: rgba(38, 49, 61, .45); }
.lensmodal__box {
  position: relative;
  margin: 5vh 16px;
  background: var(--sand-50);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 34px);
}
.lensmodal__x {
  position: sticky;
  top: 0;
  float: right;
  border: 1px solid var(--sand-300);
  background: var(--white);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
}
.lensfull__where { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-600); margin: 0 0 6px; }
.lensfull h3 { margin: 0 0 4px; }
.lensfull__link { margin-top: 18px; font-size: .92rem; }

/* binding table + lens page pieces */
.lenspick { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; }
.lenspick label { display: block; font-family: var(--font-display); font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.lenspick select, .lenspick input[type="text"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: .95rem;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sand-300);
  background: var(--white);
  color: var(--ink-900);
}
.nullzero { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.nullzero__card { border: 1px solid var(--sand-300); border-radius: var(--radius); padding: 20px; background: var(--white); }
.nullzero__card h4 { margin: 0 0 6px; }
.nullzero__val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin: 8px 0; }
.nullzero__card--null { background: repeating-linear-gradient(135deg, #fffdf7, #fffdf7 8px, #fdf6e6 8px, #fdf6e6 16px); }
body[data-sensory="on"] .nullzero__card--null { background: #fdf6e6; }

@media (max-width: 640px) {
  .lensrow { grid-template-columns: minmax(0, 1fr); }
  .lensbadge { width: 100%; }
  .lensbadge__seg { flex: 1 1 auto; justify-content: center; }
}

.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;
}

.tilewrap { display: flex; flex-direction: column; gap: 10px; }
.tilewrap .tile { flex: 1 1 auto; }
.tilelens { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tilelens__cap { font-size: .78rem; color: var(--ink-500); }
.lensfull__sub { margin: 0 0 14px; font-size: .92rem; color: var(--ink-500); }
.objcell { text-transform: none; letter-spacing: normal; font-size: .96rem; }
@media (max-width: 640px) {
  .lensq pre { font-size: .72rem; padding: 12px; }
}

/* mobile table legibility: wider min-width so columns don't shred, plus a scroll affordance */
.table-wrap {
  background-image: linear-gradient(to left, rgba(38,49,61,.10), rgba(38,49,61,0) 28px);
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 28px 100%;
  background-attachment: local;
}
@media (max-width: 640px) {
  table { min-width: 700px; font-size: 0.88rem; }
  table td, table th { padding-left: 12px; padding-right: 12px; }
}

/* breathing room under inline lens captions so they never collide with the next heading */
.tilelens__cap { display: block; margin-bottom: 14px; line-height: 1.45; }


/* ---- real published assets (added 2026-09-05) ---- */
.realcrest{margin:0;position:relative}
.realcrest img{display:block;width:100%;height:auto;
  filter:drop-shadow(0 18px 34px rgba(20,50,90,.22));
  animation:crestfloat 7s ease-in-out infinite}
.realcrest__cap{margin:10px 0 0;text-align:center}
@keyframes crestfloat{0%,100%{transform:translateY(0) rotate(-.4deg)}50%{transform:translateY(-12px) rotate(.4deg)}}
@media (prefers-reduced-motion:reduce){.realcrest img{animation:none}}
#real-assets figure img{background:#fff}
@media (max-width:760px){
  #real-assets .grid.g3{grid-template-columns:1fr}
  .realcrest{max-width:340px;margin:0 auto}
}
