/* Themes. Dark is the house look; Ivory is the light one. js/theme.js sets data-theme on <html>
   from the visitor's choice (stored) or their system setting; without scripts the system setting
   still applies through the media query. Every colour on the site comes from these tokens: solid
   ones directly, see-through ones as rgba(var(--ink-rgb), alpha). */
:root {
  --void: #07070a;
  --bg-rgb: 7, 7, 10;
  --bone: #f2ebd8;
  --ink-rgb: 242, 235, 216;
  --ink-strong: #fff8e8;
  --bone-dim: #a39b8c;
  --bone-faint: #6a655c;
  --bronze: #c4a46a;
  --accent-rgb: 196, 164, 106;
  --bronze-deep: #8a6d3d;
  --bronze-hi: #d4b57a;
  --bronze-lo: #a8864a;
  --on-accent: #120e08;
  --danger-rgb: 224, 138, 122;
  /* Chart colours (js/noah-visuals.js): bronze first, then colours that stay apart on dark. */
  --viz-1: #d4b57a; --viz-2: #7fb3d5; --viz-3: #9fd4a8; --viz-4: #e39a8c; --viz-5: #b9a3e3; --viz-6: #e6c86e;
  --warn-rgb: 224, 160, 96;
  --ok-rgb: 143, 227, 162;
  --new-rgb: 242, 201, 107;
  --info-rgb: 127, 197, 255;
  --shadow-rgb: 0, 0, 0;
  --surface: #12141b;
  --surface-2: #0e1016;
  --panel: #0c0d12;
  --rail: #0a0b0f;
  --field: #131a2a;
  --field-text: #e8ecf5;
  --line-a: 0.34;
  --glass-a: 0.72;
  --sky-0: #14141e;
  --sky-1: #0a0a10;
  --sky-2: #050508;
  --star-rgb: 242, 235, 216;
  --fog: #060608;
  --edge: rgba(var(--ink-rgb), 0.1);
  --line: rgba(var(--ink-rgb), var(--line-a));
  --glass: rgba(var(--bg-rgb), var(--glass-a));
  --glow-bronze: rgba(var(--accent-rgb), 0.22);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --void: #f6f2ea;
  --bg-rgb: 246, 242, 234;
  --bone: #1d1a15;
  --ink-rgb: 29, 26, 21;
  --ink-strong: #0f0d0a;
  --bone-dim: #5b5448;
  --bone-faint: #8b8374;
  --bronze: #8f6a2c;
  --accent-rgb: 143, 106, 44;
  --bronze-deep: #6b4f1f;
  --bronze-hi: #c89b52;
  --bronze-lo: #7d5c25;
  --on-accent: #fffaf0;
  --danger-rgb: 176, 58, 46;
  --viz-1: #8f6a2c; --viz-2: #2f6f9f; --viz-3: #3f8a52; --viz-4: #b5523f; --viz-5: #6b52a8; --viz-6: #a88418;
  --warn-rgb: 168, 98, 20;
  --ok-rgb: 28, 122, 64;
  --new-rgb: 150, 104, 0;
  --info-rgb: 26, 104, 176;
  --shadow-rgb: 150, 124, 84;
  --surface: #fffdf8;
  --surface-2: #faf6ee;
  --panel: #fbf8f2;
  --rail: #efe9dd;
  --field: #ffffff;
  --field-text: #1d1a15;
  --line-a: 0.22;
  --glass-a: 0.8;
  --sky-0: #fffdf7;
  --sky-1: #f6f1e6;
  --sky-2: #ece4d4;
  --star-rgb: 143, 106, 44;
  --fog: #f1ebdf;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --void: #f6f2ea;
    --bg-rgb: 246, 242, 234;
    --bone: #1d1a15;
    --ink-rgb: 29, 26, 21;
    --ink-strong: #0f0d0a;
    --bone-dim: #5b5448;
    --bone-faint: #8b8374;
    --bronze: #8f6a2c;
    --accent-rgb: 143, 106, 44;
    --bronze-deep: #6b4f1f;
    --bronze-hi: #c89b52;
    --bronze-lo: #7d5c25;
    --on-accent: #fffaf0;
    --danger-rgb: 176, 58, 46;
  --viz-1: #8f6a2c; --viz-2: #2f6f9f; --viz-3: #3f8a52; --viz-4: #b5523f; --viz-5: #6b52a8; --viz-6: #a88418;
    --warn-rgb: 168, 98, 20;
    --ok-rgb: 28, 122, 64;
    --new-rgb: 150, 104, 0;
    --info-rgb: 26, 104, 176;
    --shadow-rgb: 150, 124, 84;
    --surface: #fffdf8;
    --surface-2: #faf6ee;
    --panel: #fbf8f2;
    --rail: #efe9dd;
    --field: #ffffff;
    --field-text: #1d1a15;
    --line-a: 0.22;
    --glass-a: 0.8;
    --sky-0: #fffdf7;
    --sky-1: #f6f1e6;
    --sky-2: #ece4d4;
    --star-rgb: 143, 106, 44;
    --fog: #f1ebdf;
    color-scheme: light;
  }
}
/* The hidden attribute always hides, even on elements whose class sets a display (buttons, cards). */
[hidden] { display: none !important; }

/* Only while switching: fade instead of flashing. */
html.theme-switching, html.theme-switching * {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, fill 0.35s ease, box-shadow 0.35s ease !important;
}
/* The switch itself: sits in the top bar (or the chat rail), sun in dark mode, moon in light. */
.theme-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 999px;
  border: 1px solid var(--edge); background: rgba(var(--ink-rgb), 0.04); color: var(--bone); cursor: pointer;
  transition: transform 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover { border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.1); transform: rotate(-12deg); }
.theme-toggle:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
.site-nav .links { align-items: center; }
.theme-toggle.floating { position: fixed; right: 16px; bottom: 16px; z-index: 90; backdrop-filter: blur(10px); background: var(--glass); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--bone);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.bronze { color: var(--bronze); }
h1, h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
}

nav.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 44px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: linear-gradient(
    to bottom,
    rgba(var(--bg-rgb), 0.94),
    rgba(var(--bg-rgb), 0.72),
    rgba(var(--bg-rgb), 0.28)
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.14);
  box-shadow: 0 10px 28px rgba(var(--shadow-rgb), 0.35);
}
nav.site-nav .mark {
  letter-spacing: 0.34em;
  color: var(--bone);
  text-decoration: none;
  font-weight: 500;
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.28);
}
nav.site-nav .links {
  display: flex;
  align-items: center;
  gap: 8px;
}
nav.site-nav .links a {
  color: var(--bone);
  text-decoration: none;
  margin-left: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--ink-rgb), 0.22);
  background: rgba(var(--ink-rgb), 0.06);
  opacity: 1;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
nav.site-nav .links a:hover,
nav.site-nav .links a:focus-visible {
  color: var(--on-accent);
  background: linear-gradient(180deg, var(--bronze-hi) 0%, var(--bronze) 55%, var(--bronze-deep) 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.28);
  outline: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 36px;
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--bronze-hi) 0%, var(--bronze) 55%, var(--bronze-deep) 100%);
  color: var(--on-accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 0;
  box-shadow:
    0 1px 0 rgba(255, 248, 230, 0.35) inset,
    0 10px 28px rgba(var(--accent-rgb), 0.28);
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}
.cta.ghost {
  background: rgba(var(--ink-rgb), 0.03);
  color: var(--bone);
  border: 1px solid var(--line);
  box-shadow: none;
}
.cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 248, 230, 0.4) inset,
    0 14px 34px rgba(var(--accent-rgb), 0.34);
}
.cta.ghost:hover {
  border-color: rgba(var(--accent-rgb), 0.65);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: 0 8px 24px rgba(var(--shadow-rgb), 0.25);
}
button.cta { cursor: pointer; font-family: inherit; }
button.cta:disabled { opacity: 0.45; cursor: default; transform: none; }
.inline-link {
  color: var(--bronze);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.title-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 120px 24px 80px;
  text-align: center;
  background: transparent;
  border-bottom: none;
}
.title-hero .mega {
  margin: 18px 0 22px;
  font-size: clamp(96px, 22vw, 260px);
  line-height: 0.82;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, var(--ink-strong) 0%, var(--bone) 42%, var(--bone-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 40px rgba(var(--shadow-rgb), 0.45));
}
.title-hero .lede {
  color: var(--bone-dim);
  font-size: 17.5px;
  font-weight: 300;
  line-height: 1.85;
  max-width: 640px;
  margin: 0 auto;
}
.scroll-cue {
  margin-top: 48px;
  color: var(--bone-faint);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(4px); }
}

.experience {
  height: 600vh;
  position: relative;
  border-top: none;
  background: transparent;
}

/* Sculpture | line | writing */
.pin-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1px minmax(360px, 46%);
  background: transparent;
  overflow: hidden;
}
.pin-stage.is-finale {
  grid-template-columns: 1fr 1px minmax(380px, 48%);
}

.statue-stage {
  position: relative;
  height: 100%;
  min-width: 0;
  background: transparent;
  isolation: isolate;
}
.statue-stage::before { content: none; display: none; }
.statue-stage::after { content: none; display: none; }
#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  filter: none;
}

.stage-divider {
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--line) 10%,
    var(--bronze) 50%,
    var(--line) 90%,
    transparent 100%
  );
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.28);
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--bone-faint);
  background:
    radial-gradient(ellipse 50% 40% at 50% 45%, rgba(var(--accent-rgb), 0.08), transparent 60%),
    var(--void);
  transition: opacity 0.9s ease;
}
.loading.gone { opacity: 0; pointer-events: none; }

.hint {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 6;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bone-faint);
  opacity: 0.7;
  transition: opacity 0.35s ease;
  text-shadow: 0 2px 12px rgba(var(--shadow-rgb), 0.65);
}

.region-tag {
  position: absolute;
  left: 28px;
  top: 100px;
  z-index: 6;
  color: var(--bronze);
  opacity: 0.9;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.35);
}

.info-lane {
  position: relative;
  z-index: 4;
  height: 100%;
  padding: 100px 48px 48px 40px;
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.92) 0%, rgba(var(--bg-rgb), 0.97) 100%);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  box-shadow: inset 1px 0 0 rgba(var(--ink-rgb), 0.04);
}
.info-lane .mono { font-size: 12px; margin-bottom: 0.4rem; }
.info-lane h2 {
  margin: 14px 0 18px;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.info-lane #step-body {
  color: var(--bone-dim);
  font-size: clamp(16.5px, 1.45vw, 20.5px);
  line-height: 1.85;
  font-weight: 300;
  max-width: 540px;
  max-height: 46vh;
  overflow: auto;
}

.quote {
  margin: 8px 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.4;
  font-weight: 300;
  color: var(--bone);
  text-shadow: 0 8px 30px rgba(var(--shadow-rgb), 0.35);
}
.quote[hidden],
.quote-cite[hidden] { display: none !important; }
.quote-cite {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 22px;
}

.progress-dots {
  display: flex;
  gap: 10px;
  margin-top: 40px;
}
.progress-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bone-faint);
  opacity: 0.35;
  transition: background 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}
.progress-dots span.on {
  background: var(--bronze);
  opacity: 1;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.55);
}

.finish {
  padding: 140px 24px;
  text-align: center;
  border-top: 1px solid var(--edge);
  background:
    radial-gradient(ellipse 55% 50% at 50% 30%, rgba(var(--accent-rgb), 0.08), transparent 55%),
    radial-gradient(ellipse 60% 60% at 50% 40%, var(--surface), var(--void));
}
.finish h2 {
  font-size: clamp(36px, 5vw, 58px);
  margin-top: 16px;
}
.finish > p {
  margin: 18px auto 0;
  color: var(--bone-dim);
  font-size: 15.5px;
  max-width: 440px;
  font-weight: 300;
  line-height: 1.9;
}
.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 420px));
  gap: 28px;
  margin: 48px auto 0;
  justify-content: center;
  max-width: 920px;
  text-align: left;
}
.audience-grid-single {
  grid-template-columns: minmax(280px, 520px);
}
.audience-card {
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  background:
    linear-gradient(165deg, rgba(var(--ink-rgb), 0.05) 0%, rgba(var(--ink-rgb), 0.015) 100%);
  padding: 30px 26px 26px;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(var(--shadow-rgb), 0.28);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.audience-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-2px);
}
.audience-card h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  margin: 10px 0 12px;
}
.audience-blurb {
  color: var(--bone-dim);
  font-size: 14.5px;
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 22px;
  min-height: 4.5em;
}
.platform-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.downloads {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
  justify-content: center;
}
a.dl { text-decoration: none; color: inherit; }
.dl {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 34px;
  border: 1px solid var(--edge);
  background: rgba(var(--ink-rgb), 0.03);
  color: var(--bone);
  font-size: 14.5px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 12px;
  transition: border-color 0.35s, transform 0.35s, background 0.35s, box-shadow 0.35s;
}
.dl:hover {
  border-color: var(--bronze);
  transform: translateY(-2px);
  background: rgba(var(--accent-rgb), 0.09);
  box-shadow: 0 12px 28px rgba(var(--shadow-rgb), 0.3);
}
.dl svg { width: 19px; height: 19px; }
.dl .s {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  color: var(--bone-faint);
  letter-spacing: 0.18em;
  margin-top: 4px;
  text-align: left;
}
/* [hidden] loses to .dl .s { display:block } — force hide empty/hidden metas */
.dl .s[hidden],
.dl .s:empty {
  display: none !important;
}
.dl.coming-soon,
.dl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.dl.coming-soon:hover,
.dl:disabled:hover {
  border-color: var(--edge);
  background: rgba(var(--ink-rgb), 0.02);
  transform: none;
  box-shadow: none;
}
.status {
  min-height: 1.4rem;
  margin-top: 1.4rem;
  color: var(--bronze);
  font-size: 0.9rem;
}
footer {
  padding: 44px;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-faint);
  opacity: 0.65;
  border-top: 1px solid var(--edge);
}
.maker-credit {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: 168px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.55;
  color: var(--bone-faint);
  opacity: 0.78;
  text-transform: none;
  pointer-events: auto;
}
.maker-credit strong {
  font-weight: 400;
  color: var(--bone-dim);
}
.maker-credit a {
  color: var(--bronze);
  text-decoration: none;
}
.maker-credit a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  nav.site-nav { padding: 14px 16px; font-size: 11px; letter-spacing: 0.14em; }
  nav.site-nav .mark { letter-spacing: 0.18em; }
  nav.site-nav .links { gap: 6px; }
  nav.site-nav .links a { padding: 7px 10px; }
  .audience-grid {
    grid-template-columns: 1fr;
    padding: 0 8px;
  }
  .pin-stage,
  .pin-stage.is-finale {
    grid-template-columns: 1fr;
    grid-template-rows: 52vh auto;
  }
  .stage-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--line), var(--bronze), var(--line), transparent);
  }
  .info-lane { padding: 28px 22px 40px; }
  .statue-stage::after { opacity: 0.22; }
}

/* —— Account profile chip (top-right / nav) —— */
.noah-profile-host {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  text-transform: none;
  letter-spacing: 0;
}
.noah-profile-login {
  color: var(--bone);
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--ink-rgb), 0.22);
  background: rgba(var(--ink-rgb), 0.06);
}
.noah-profile-login:hover { color: var(--bronze); }
.noah-profile-wrap { position: relative; }
.noah-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--ink-rgb), 0.04);
  color: var(--bone);
  cursor: pointer;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 13px;
}
.noah-profile-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.8);
  background: rgba(var(--accent-rgb), 0.12);
}
.noah-profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bronze);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 600;
}
.noah-profile-avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.noah-profile-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.noah-profile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(300px, 86vw);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(var(--shadow-rgb), 0.5);
  z-index: 80;
  text-transform: none;
  letter-spacing: 0;
}
.noah-profile-panel-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.noah-profile-panel-title { font-size: 15px; color: var(--bone); }
.noah-profile-panel-email { font-size: 12px; color: var(--bone-dim); word-break: break-all; }
.noah-profile-facts { display: grid; gap: 8px; margin: 0 0 12px; font-size: 12px; }
.noah-profile-facts div { display: flex; justify-content: space-between; gap: 12px; }
.noah-profile-facts dt { color: var(--bone-faint); }
.noah-profile-facts dd { color: var(--bone); margin: 0; }
.noah-profile-logout {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(var(--ink-rgb), 0.18);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 13px;
}
.noah-profile-logout:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.1);
}
.chat-top-profile {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 70;
}
@media (max-width: 640px) {
  .chat-top-profile { top: 12px; right: 12px; }
  .noah-profile-name { display: none; }
}


/* —— Homepage starfield —— */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}
.title-hero,
.experience,
.finish,
.ways,
.site-foot {
  position: relative;
  z-index: 1;
}
.title-hero {
  background: transparent !important;
}
.title-hero-inner {
  position: relative;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
/* Keep top nav fixed and above starfield/sculpture — do not demote to z-index 1 */
nav.site-nav {
  position: fixed !important;
  z-index: 80 !important;
}


/* Approve chips styled in chat-app.css to match site CTAs */


/* —— Phone landing: readable type, tappable nav, no six-screen sculpture —— */
@media (max-width: 720px) {
  nav.site-nav {
    flex-wrap: wrap;
    gap: 8px;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px !important;
  }
  nav.site-nav .mark {
    font-size: 11px;
    letter-spacing: 0.14em !important;
  }
  nav.site-nav .links {
    width: 100%;
    justify-content: space-between;
    gap: 6px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  nav.site-nav .links a,
  .noah-profile-login {
    flex: 1 1 auto;
    text-align: center;
    padding: 10px 8px !important;
    font-size: 10px;
    letter-spacing: 0.08em !important;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .title-hero {
    min-height: 100dvh;
    padding: calc(88px + env(safe-area-inset-top)) 16px 40px;
  }
  .title-hero .mega {
    font-size: clamp(40px, 15vw, 64px) !important;
    line-height: 1.02;
    margin: 12px 0 16px;
  }
  .title-hero .lede {
    font-size: 16px;
    line-height: 1.55;
    padding: 0 4px;
  }
  .hero-actions {
    flex-direction: column;
    margin-top: 24px;
  }
  .cta {
    width: 100%;
    min-height: 48px;
  }
  .experience {
    height: auto !important;
  }
  .pin-stage,
  .pin-stage.is-finale {
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .statue-stage {
    height: min(46vh, 340px);
    min-height: 240px;
  }
  .info-lane {
    padding: 20px 16px 36px;
  }
  .finish {
    padding: 36px 16px calc(40px + env(safe-area-inset-bottom));
  }
  .downloads {
    flex-direction: column;
    margin-top: 24px;
  }
  .dl { width: 100%; justify-content: center; }
  footer { padding: 28px 16px calc(24px + env(safe-area-inset-bottom)); }
  .maker-credit {
    position: static;
    left: auto;
    bottom: auto;
    max-width: none;
    margin: 0 auto 18px;
    text-align: center;
  }
}

.doctors-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 120px 22px 80px;
}
.doctors-page h1 {
  font-size: clamp(48px, 8vw, 84px);
  line-height: 0.95;
  margin: 10px 0 14px;
}
.doctors-lead {
  color: var(--bone-dim);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.doctors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.doctors-card {
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 22px 22px 26px;
  background: rgba(var(--ink-rgb), 0.03);
}
.doctors-panel { max-width: 640px; }
.doctors-card h2 {
  font-size: 2rem;
  margin: 8px 0 10px;
}
a.doctors-choice {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.doctors-choice h2 { color: var(--bone); }
a.doctors-choice:hover {
  border-color: rgba(var(--accent-rgb), 0.7);
  transform: translateY(-2px);
}
.doctors-card p { color: var(--bone-dim); line-height: 1.65; }
.doctors-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.doctors-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.doctors-field span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
}
.doctors-field input, .doctors-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: rgba(var(--bg-rgb), 0.55);
  color: var(--bone);
  font: 15px/1.5 "Space Grotesk", system-ui, sans-serif;
}
.doctors-note { margin-top: 12px; color: var(--bone-faint); font-size: 13px; }
#downloadLink[hidden] { display: none; }

@media (max-width: 800px) {
  .doctors-grid { grid-template-columns: 1fr; }
}

/* —— Navigation: the page you are on is marked, on every header —— */
nav.site-nav .links a[aria-current="page"] { border-color: var(--bronze); color: var(--bronze); }

/* —— Home: the three ways in, before the sculpture story —— */
.ways { padding: 24px 20px 64px; max-width: 1120px; margin: 0 auto; }
.ways-head { text-align: center; margin: 0 0 22px; }
.ways-head h2 { margin: 6px 0 0; font-size: 30px; }
.ways-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 820px; margin: 0 auto; }
.ways-grid .doctors-card h2 { font-size: 26px; }
.ways-note { text-align: center; margin: 22px 0 0; color: var(--bone-dim); }
@media (max-width: 800px) { .ways-grid { grid-template-columns: 1fr; } .ways-head h2 { font-size: 26px; } }

/* —— Not found —— */
.not-found { max-width: 720px; margin: 0 auto; padding: 140px 20px 80px; text-align: center; }
.not-found h1 { margin: 6px 0 12px; }
.not-found .hero-actions { justify-content: center; }

/* —— Hero: the one line under the buttons —— */
.hero-note { margin: 14px 0 0; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bone-dim); }
.hero-note .inline-link { letter-spacing: inherit; }

/* The Noah seal as a line mark in the theme's bronze (img/noah_seal_mark.png is its lines on
   transparent), so it sits cleanly on dark and light alike: no black square, no second ring. */
.seal-mark {
  display: block; width: var(--seal, 88px); height: var(--seal, 88px); background: var(--bronze);
  -webkit-mask: url(/img/noah_seal_mark.png?v=3) center / contain no-repeat;
  mask: url(/img/noah_seal_mark.png?v=3) center / contain no-repeat;
}

/* —— Navigation (js/site-session.js): one header everywhere, a tab bar on phones ——
   The mark on the left goes home; the middle holds the places this person uses, in plain words with
   an icon; the right holds the theme switch and the account button (initials + first name) whose
   menu has the person's name and role, Account, Get the app, Privacy and Sign out. */
nav.site-nav.nav2 {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  padding: 10px 28px; font-family: "Space Grotesk", system-ui, sans-serif; font-size: 14px;
  letter-spacing: 0; text-transform: none; min-height: 62px;
}
nav.site-nav.nav2 .mark { display: inline-flex; align-items: center; gap: 10px; letter-spacing: 0.26em; font: 500 11.5px "IBM Plex Mono", monospace; text-transform: uppercase; }
.nav-seal { --seal: 30px; flex: 0 0 auto; }
.nav-main { display: flex; justify-content: center; gap: 4px; min-width: 0; }
.nav-link, .nav-plain {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px;
  color: var(--bone-dim); text-decoration: none; font-weight: 500; white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}
.nav-link svg, .nav-plain svg, .nav-login svg, .nav-tab svg, .nav-menu-item svg { width: 19px; height: 19px; flex: 0 0 auto; }
.nav-link:hover, .nav-plain:hover { color: var(--bone); background: rgba(var(--ink-rgb), .06); }
.nav-link[aria-current="page"] { color: var(--bone); background: rgba(var(--accent-rgb), .14); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .45); }
.nav-link[aria-current="page"] svg { color: var(--bronze); }
nav.site-nav.nav2 .nav-side { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
nav.site-nav.nav2 .nav-side a.nav-plain { border: 0; background: none; padding: 8px 12px; }
nav.site-nav.nav2 .nav-side a.nav-plain:hover { background: rgba(var(--ink-rgb), .06); color: var(--bone); box-shadow: none; }
nav.site-nav.nav2 .nav-side a.nav-login {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; border: 0;
  color: var(--on-accent); background: linear-gradient(180deg, var(--bronze-hi) 0%, var(--bronze) 55%, var(--bronze-deep) 100%);
  font-weight: 600; text-decoration: none;
}
.nav-theme { display: inline-flex; }
.nav-account {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--edge); background: rgba(var(--ink-rgb), .04); color: var(--bone); font: 500 14px "Space Grotesk", system-ui, sans-serif; cursor: pointer;
}
.nav-account:hover, .nav-account[aria-expanded="true"] { border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .1); }
.nav-account:focus-visible, .nav-link:focus-visible, .nav-tab:focus-visible, .nav-menu-item:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.nav-avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--bronze); color: var(--on-accent); font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.nav-menu {
  position: fixed; top: 64px; right: 16px; z-index: 120; width: min(300px, calc(100vw - 32px));
  padding: 8px; border-radius: 16px; border: 1px solid var(--edge); background: var(--void);
  box-shadow: 0 18px 50px rgba(var(--shadow-rgb), .45); display: grid; gap: 2px;
}
.nav-menu[hidden] { display: none !important; }
.nav-menu-head { display: grid; gap: 2px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--edge); }
.nav-menu-head strong { font-weight: 500; font-size: 15px; color: var(--bone); }
.nav-menu-head span { font-size: 13px; color: var(--bone-dim); overflow-wrap: anywhere; }
.nav-menu-head .nav-role { margin-top: 6px; justify-self: start; padding: 2px 9px; border-radius: 999px; font-size: 12px; color: var(--bronze); background: rgba(var(--accent-rgb), .12); }
.nav-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  color: var(--bone); text-decoration: none; font: 400 14.5px "Space Grotesk", system-ui, sans-serif; text-align: left; cursor: pointer;
}
.nav-menu-item:hover { background: rgba(var(--ink-rgb), .06); }
.nav-menu-item svg { color: var(--bone-dim); }
.nav-out { margin-top: 4px; border-top: 1px solid var(--edge); border-radius: 0 0 10px 10px; color: var(--bone-dim); }
.nav-tabs { display: none; }

/* Medium screens: icons stay, the long labels shorten to fit. */
@media (max-width: 1100px) {
  nav.site-nav.nav2 { padding: 10px 18px; gap: 10px; }
  nav.site-nav.nav2 .nav-name { display: none; }
  .nav-link { padding: 8px 10px; }
}

/* Phones: header = mark + account; the places move to a tab bar along the bottom. */
@media (max-width: 720px) {
  nav.site-nav.nav2 {
    display: flex !important; flex-wrap: nowrap !important; justify-content: space-between; gap: 8px !important;
    padding: max(8px, env(safe-area-inset-top)) 14px 8px !important; min-height: 56px;
  }
  nav.site-nav.nav2 .nav-name { display: inline; font-size: 10.5px; letter-spacing: .2em; }
  nav.site-nav.nav2 .nav-main { display: none; }
  nav.site-nav.nav2 .nav-side { width: auto !important; overflow: visible !important; gap: 6px !important; }
  nav.site-nav.nav2 .nav-side a { flex: 0 0 auto !important; min-height: 0 !important; font-size: 14px !important; letter-spacing: 0 !important; }
  nav.site-nav.nav2 .nav-side a.nav-plain { display: none !important; }
  nav.site-nav.nav2 .nav-side a.nav-login { padding: 9px 16px !important; }
  .nav-first { display: none; }
  .nav-account { padding: 3px; }
  .nav-menu { top: calc(58px + env(safe-area-inset-top)); right: 10px; }
  body.has-tabs { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .nav-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; display: flex; justify-content: space-around;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--glass);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--edge);
  }
  .nav-tab {
    flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px;
    color: var(--bone-dim); text-decoration: none; font-size: 11px; font-weight: 500; line-height: 1.1; text-align: center;
  }
  .nav-tab svg { width: 23px; height: 23px; }
  .nav-tab[aria-current="page"] { color: var(--bronze); background: rgba(var(--accent-rgb), .12); }
  .nav-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  /* The order form's "View bag" bar sits above the tab bar, not under it. */
  body.has-tabs .bag-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media print { .nav-tabs, .nav-menu { display: none !important; } }

/* —— Computers, signed in: the places in a sidebar, like an app (js/site-session.js) —— */
.nav-sidebar, .nav-here { display: none; }
@media (min-width: 900px) {
  html.has-sidebar body { padding-left: 248px; }
  .nav-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 86; width: 248px; display: flex; flex-direction: column; gap: 18px;
    padding: 16px 14px 18px; overflow-y: auto; border-right: 1px solid var(--edge);
    background: linear-gradient(180deg, rgba(var(--ink-rgb), .035), rgba(var(--ink-rgb), .015)), var(--void);
  }
  .nav-side-mark {
    display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; color: var(--bone); text-decoration: none;
    font: 500 11.5px "IBM Plex Mono", monospace; letter-spacing: .24em; text-transform: uppercase;
  }
  .nav-side-mark .nav-seal { --seal: 34px; }
  .nav-side-list { display: grid; gap: 14px; align-content: start; flex: 1 1 auto; }
  .nav-side-group { display: grid; gap: 2px; }
  .nav-side-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
    color: var(--bone-dim); text-decoration: none; font: 500 15px "Space Grotesk", system-ui, sans-serif;
    transition: color .15s ease, background .15s ease;
  }
  .nav-side-link svg { width: 21px; height: 21px; flex: 0 0 auto; }
  .nav-side-link:hover { color: var(--bone); background: rgba(var(--ink-rgb), .06); }
  .nav-side-link[aria-current="page"] { color: var(--bone); background: rgba(var(--accent-rgb), .15); box-shadow: inset 3px 0 0 var(--bronze); }
  .nav-side-link[aria-current="page"] svg { color: var(--bronze); }
  .nav-side-link:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
  .nav-side-head { color: var(--bone); }
  .nav-side-sub { padding: 8px 12px 8px 45px; font-size: 14px; font-weight: 400; }
  .nav-side-sub svg { display: none; }
  .nav-side-foot { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--edge); }

  html.has-sidebar nav.site-nav.nav2 { left: 248px; grid-template-columns: 1fr auto; padding: 10px 24px; }
  html.has-sidebar nav.site-nav.nav2 .mark, html.has-sidebar nav.site-nav.nav2 .nav-main { display: none; }
  html.has-sidebar .nav-here { display: block; font: 400 22px "Cormorant Garamond", Georgia, serif; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* The staff desk's own section list now lives in the sidebar. */
  html.has-sidebar .st-rail { display: none; }
  html.has-sidebar .staff-page { grid-template-columns: 1fr; }
}


/* —— Tables and charts in replies (js/noah-visuals.js) —— */
.viz { margin: 10px 0 6px; padding: 12px 14px 8px; border: 1px solid var(--edge); border-radius: 14px; background: rgba(var(--ink-rgb), .025); display: grid; gap: 6px; max-width: 680px; }
.viz figcaption { font-weight: 500; font-size: 14px; color: var(--bone); }
.viz-plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-plot .viz-pie { max-width: 240px; margin: 0 auto; }
.viz-grid { stroke: rgba(var(--ink-rgb), .1); stroke-width: 1; }
.viz-tick, .viz-label { fill: var(--bone-dim); font: 11px "Space Grotesk", system-ui, sans-serif; }
.viz-val { fill: var(--bone); font: 500 11px "Space Grotesk", system-ui, sans-serif; }
.viz-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.viz-area { opacity: .18; }
.viz-dot { stroke: var(--void); stroke-width: 1.5; }
.viz-bar, .viz-slice { transition: opacity .15s ease; }
.viz-bar:hover, .viz-slice:hover, .viz-dot:hover { opacity: .8; }
.viz-slice { stroke: var(--void); stroke-width: 2; }
.viz-hole { fill: var(--void); }
.viz-total { fill: var(--bone); font: 500 20px "Space Grotesk", system-ui, sans-serif; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--bone-dim); }
.viz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.viz-note { margin: 0; font-size: 12px; color: var(--bone-faint); }
.viz-numbers summary { cursor: pointer; font-size: 12px; color: var(--bone-dim); }
.viz-table-wrap { overflow-x: auto; margin: 8px 0; max-width: 100%; }
.viz-table { border-collapse: collapse; font-size: 13.5px; min-width: 60%; }
.viz-table th, .viz-table td { padding: 7px 12px; border-bottom: 1px solid var(--edge); text-align: left; white-space: nowrap; }
.viz-table thead th { font-weight: 500; color: var(--bone); background: rgba(var(--accent-rgb), .1); border-bottom: 1px solid rgba(var(--accent-rgb), .45); }
.viz-table tbody tr:nth-child(even) { background: rgba(var(--ink-rgb), .025); }
.viz-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.viz-table tbody th { font-weight: 400; color: var(--bone-dim); }

/* Inside the Noah app: no "Get the app" anywhere (js/theme.js sets .in-app). */
html.in-app .hide-in-app { display: none !important; }
.nav-menu-app { padding: 8px 12px 4px; font-size: 12px; color: var(--bone-faint); }
