/* BrnTrn website. Always the app's dark palette (daily_reps_app/lib/core/theme.dart, Pal.dark). */
:root {
  --bg: #0A1014; --surface: #111A20; --surface2: #17232A; --ink: #E5EEF1; --muted: #8AA0AA; --line: #21313A;
  --chip: #18252D; --accent: #22D3EE; --accent-ink: #03272D; --accent-text: #4FE0F5; --hl: rgba(34, 211, 238, .15);
  --good: #4ADE80; --bad: #F87171; --sq-l: #2C4550;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.55 var(--body);
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
a { color: var(--accent-text); }
#neurons { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
header, main, footer { position: relative; z-index: 1; }
main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 8px 16px 48px; }

.ms {
  font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; width: 1em; overflow: hidden; flex: none;
}

/* Header and footer */
.top { display: flex; align-items: center; max-width: 1080px; width: 100%; margin: 0 auto; padding: 18px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 22px/1 var(--display); letter-spacing: -.02em; }
.brand img { border-radius: 8px; }
footer { padding: 24px 16px 40px; text-align: center; color: var(--muted); font-size: 14px; }
footer p { margin: 8px 0 0; }
.pages-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.pages-nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.pages-nav a:hover { color: var(--ink); background: var(--chip); }
.pages-nav a.on { color: var(--accent-text); background: var(--hl); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(40px, 8vw, 64px); }
.muted { color: var(--muted); }

/* One-screen pages: the heading, the map dead centre, a line below. site.js sizes the map to fit. */
body.screen { height: 100vh; height: 100dvh; overflow: hidden; }
body.screen .top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
body.screen main {
  position: fixed; inset: 0; max-width: none; padding: 0 16px;
  display: grid; place-items: center;
}
/* The heading beside the map (over it when there isn't room); site.js places it. */
.slogan { position: absolute; z-index: 1; }
.slogan h1 { font-size: clamp(26px, 4vw, 44px); text-wrap: balance; }
.slogan.above-map { text-align: center; }
.slogan.side h1 { font-size: clamp(36px, 3.6vw, 56px); line-height: 1.05; }
.pill {
  display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-weight: 700; font-size: 15px;
}
.hint { color: var(--muted); font-size: 15px; margin: 10px 0 0; }
.slogan.side .hint { font-size: 17px; margin-top: 16px; }

/* The map */
/* --z scales everything on the map with its size (set by site.js). */
.map { position: relative; width: 300px; height: 300px; --z: 1; }
.map .wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.core {
  position: absolute; z-index: 1; left: 50%; top: 50%; width: calc(104px * var(--z)); height: calc(104px * var(--z));
  transform: translate(-50%, -50%); border-radius: 50%;
  /* The app icon's own background colour, so its square melts into the circle. */
  background: #030709; border: 2px solid var(--accent); display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 0 32px rgba(34, 211, 238, .35);
}
.core img { width: calc(84px * var(--z)); height: calc(84px * var(--z)); }
.node {
  position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: calc(6px * var(--z));
  transform: translate(-50%, calc(-30px * var(--z))); text-decoration: none; color: var(--ink);
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
}
.node.up { flex-direction: column-reverse; transform: translate(-50%, calc(-100% + 30px * var(--z))); }
.node .ms {
  width: calc(60px * var(--z)); height: calc(60px * var(--z)); border-radius: 50%; display: grid; place-items: center;
  font-size: calc(28px * var(--z)); background: var(--surface); border: 2px solid var(--sq-l); color: var(--muted);
  transition: border-color .3s, box-shadow .3s, color .3s, background .3s;
}
.node b { font-weight: 800; font-size: calc(15.5px * var(--z)); padding: 1px 8px; border-radius: 8px; background: rgba(10, 16, 20, .75); white-space: nowrap; }
.node.lit .ms, .node:hover .ms, .node:focus-visible .ms {
  border-color: var(--accent); color: var(--accent-text); background: #0F2A31; box-shadow: 0 0 18px rgba(34, 211, 238, .35);
}
.node:hover b, .node:focus-visible b { color: var(--accent-text); }
.node:focus-visible { outline: none; }

/* Activities: an area's sheet */
.sheet {
  width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 28px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 0 60px rgba(34, 211, 238, .15);
}
.sheet::backdrop { background: rgba(5, 9, 12, .7); backdrop-filter: blur(4px); }
.sheet[open] { animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--chip); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.sheet .x:hover { color: var(--ink); }
.sheet h2 { font-size: 32px; margin-top: 14px; }
.sheet .intro { color: var(--muted); margin: 6px 0 0; }
.acts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.acts li { background: var(--surface2); border-radius: 14px; padding: 12px 16px; }
.acts b { display: block; font-weight: 800; }
.acts span { color: var(--muted); font-size: 15px; }
.area-icon {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: #0F2A31; border: 2px solid var(--accent); color: var(--accent-text); box-shadow: 0 0 24px rgba(34, 211, 238, .35);
}
.area-icon .ms { font-size: 28px; }

/* Text pages: big and short */
.punch { padding: 24px 0 8px; }
.punch .big { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.45; margin: 20px 0 0; }
.beats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; }
.beats li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; color: var(--muted); }
.beats b { display: block; color: var(--ink); font: 800 22px/1.2 var(--display); letter-spacing: -.01em; margin-bottom: 4px; }
.sign { font: 800 clamp(26px, 4vw, 34px)/1.1 var(--display); color: var(--accent-text); margin: 36px 0 0; letter-spacing: -.02em; }

/* Science: the papers */
.refs { margin-top: 32px; }
.refs h2 { display: flex; align-items: center; gap: 10px; font-size: 24px; margin-bottom: 12px; }
.refs h2 .ms { color: var(--accent-text); }
.refs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.refs li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.refs li b { display: block; }
.refs li span { font-size: 15px; color: var(--muted); }
.refs a { color: var(--muted); text-decoration-color: var(--line); text-underline-offset: 3px; }
.refs a:hover { color: var(--accent-text); text-decoration-color: currentColor; }

/* Cards, privacy */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.prose { margin-top: 16px; }
.prose h1 { font-size: clamp(34px, 6vw, 44px); }
.prose h2 { font-size: 24px; margin: 32px 0 8px; }
.prose h3 { font-size: 18px; margin: 22px 0 6px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }

/* Support: the contact form */
.contact { margin-top: 28px; display: grid; gap: 16px; }
.contact label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.contact input, .contact select, .contact textarea {
  font: 500 17px/1.4 var(--body); color: var(--ink); background: var(--surface2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; width: 100%;
}
.contact textarea { resize: vertical; min-height: 140px; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact .btn { justify-self: start; margin: 4px 0 0; border: 0; cursor: pointer; font-size: 17px; }
.contact .btn:disabled { opacity: .6; cursor: default; }
.status { margin: 0; min-height: 1.5em; font-weight: 700; }
.status.ok { color: var(--good); }
.status.err { color: var(--bad); }
.note { color: var(--muted); font-size: 15px; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 14px 22px; border-radius: 16px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none; font-family: var(--body);
}
.btn:hover { filter: brightness(1.05); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .card { padding: 20px; border-radius: 20px; }
  .sheet { padding: 24px 20px; }
}
.pill.soon { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; padding: 12px 20px; font-size: 17px; }
.pill.soon .ms { color: var(--accent-text); }

.beats-h { font-size: 24px; margin: 40px 0 0; }
.beats-h + .beats { margin-top: 16px; }
