/* ─── ZEPHYY PROFILE (/zephyy) ───
 * The profile page only, on top of zephyy.css: the hero and glyph, mood dial, signal deck,
 * chronicle, capabilities, systems, crew, operating code and contact sections.
 */

/* ── Her status dots (hero and nav): first here, so the cascade is the base's ── */
.zp-dot.online {
  background: oklch(var(--brand-green));
  box-shadow: 0 0 6px oklch(var(--brand-green) / 0.5);
  animation: zp-dot-pulse 2s ease-in-out infinite;
}

.zp-dot.offline {
  background: oklch(35% 0.02 0);
  box-shadow: 0 0 3px oklch(35% 0.02 0 / 0.3);
  opacity: 0.5;
  animation: zp-dot-fade 4s ease-in-out infinite;
}

@keyframes zp-dot-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

@keyframes zp-dot-fade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* ── Hero ── */

.zp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.zp-glyph-wrap {
  position: relative;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.zp-glyph-wrap:hover {
  transform: scale(1.08);
}

.zp-glyph-wrap svg {
  --whorl-tint: var(--zp-state); /* her whorl's ring and center show her state */
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.zp-glyph-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  max-width: 120px;
  max-height: 120px;
  border-radius: 50%;
  border: 1px solid oklch(var(--brand-teal) / 0.15);
  animation: zp-ring-breathe 4s ease-in-out infinite;
  pointer-events: none;
}

.zp-hero h1 { font-family: var(--font-accent); padding: 10px; }

.zp-hero .subtitle {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

/* ── Pill badges (skills, tools) ── */

.zp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.zp-pill {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  background: oklch(var(--brand-teal) / 0.06);
  border: 1px solid oklch(var(--brand-teal) / 0.12);
  color: oklch(var(--brand-teal));
  transition: all 0.2s ease;
}

.zp-pill:hover {
  background: oklch(var(--brand-teal) / 0.12);
  border-color: oklch(var(--brand-teal) / 0.25);
}

.zp-pill.purple:hover {
  background: oklch(var(--brand-purple) / 0.12);
  border-color: oklch(var(--brand-purple) / 0.25);
}

.zp-pill.green {
  background: oklch(var(--brand-green) / 0.06);
  border-color: oklch(var(--brand-green) / 0.12);
  color: oklch(var(--brand-green));
}

.zp-pill.green:hover {
  background: oklch(var(--brand-green) / 0.12);
  border-color: oklch(var(--brand-green) / 0.25);
}

/* ── Status line ── */

.zp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 1.5rem;
  position: relative;
}

.zp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ── Mood switcher ── */

.zp-mood-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  margin-right: 0.25rem;
}

.zp-mood-btn {
  border-radius: 999px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  border: 1px solid oklch(var(--brand-teal) / 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.zp-mood-btn:hover {
  border-color: oklch(var(--brand-teal) / 0.4);
  color: var(--text-main);
}

/* ==========================================================================
   Profile v4 — operator console refresh
   Scoped to the main profile so the crew / QA / changelog / status pages keep
   their established subpage layout.
   ========================================================================== */

.zp-profile-v4 {
  --zp-state: var(--brand-teal);
  --zp-panel: oklch(13% 0.035 275 / 0.78);
  --zp-hairline: oklch(var(--star-white) / 0.1);
  --zp-copy: oklch(88% 0.025 270);
  --zp-copy-muted: oklch(70% 0.035 270);
}

.zp-profile-v4[data-zp-mood="active"] { --zp-state: 72% 0.2 290; }

.zp-profile-v4[data-zp-mood="debugging"] { --zp-state: 76% 0.19 62; }

.zp-profile-v4[data-zp-mood="heartbeat"] { --zp-state: var(--brand-green); }

/* Her glyph spins at the mood's pace (calm is the default, in zephyy-orb.css) */

[data-zp-mood="active"] #zephyy-glyph    { --whorl-1: 5s;   --whorl-2: 3.5s; --whorl-3: 2.2s; --whorl-4: 0.8s; }

[data-zp-mood="debugging"] #zephyy-glyph { --whorl-1: 1.8s; --whorl-2: 1.2s; --whorl-3: 0.7s; --whorl-4: 0.4s; }

[data-zp-mood="heartbeat"] #zephyy-glyph { --whorl-1: 8s;   --whorl-2: 5s;   --whorl-3: 3s;   --whorl-4: 1.1s; }

.zp-profile-v4 main {
  position: relative;
  z-index: 2;
}

.zp-skip-link {
  position: fixed;
  z-index: 10001;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid oklch(var(--brand-teal) / 0.55);
  border-radius: 0.55rem;
  background: oklch(var(--space-oled) / 0.96);
  color: oklch(var(--brand-teal));
  font: 700 0.8rem/1 var(--font-mono);
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.zp-skip-link:focus { transform: translateY(0); }

.zp-profile-nav {
  position: fixed;
  z-index: 900;
  top: 1rem;
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(1180px, calc(100% - 2rem));
  min-height: 3.25rem;
  padding: 0.45rem 0.55rem 0.45rem 0.8rem;
  border: 1px solid var(--zp-hairline);
  border-radius: 1rem;
  background: oklch(8% 0.025 275 / 0.78);
  box-shadow: 0 14px 50px oklch(var(--space-oled) / 0.34);
  backdrop-filter: blur(18px) saturate(140%);
  transform: translateX(-50%);
}

.zp-profile-brand,
.zp-profile-status-link,
.zp-profile-nav-links a {
  color: var(--zp-copy-muted);
  text-decoration: none;
}

.zp-profile-brand {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  padding-right: 1rem;
  font: 800 0.72rem/1 var(--font-mono);
  letter-spacing: 0.13em;
}

.zp-profile-brand > span:first-child { color: oklch(var(--brand-teal)); }

.zp-profile-nav-links {
  display: flex;
  gap: 0.15rem;
  justify-content: center;
}

.zp-profile-nav-links a,
.zp-profile-status-link {
  padding: 0.68rem 0.72rem;
  border-radius: 0.65rem;
  font: 650 0.73rem/1 var(--font-mono);
  letter-spacing: 0.04em;
  transition: color 0.18s ease, background 0.18s ease;
}

.zp-profile-nav-links a:hover,
.zp-profile-nav-links a:focus-visible,
.zp-profile-nav-links a.active,
.zp-profile-status-link:hover,
.zp-profile-status-link:focus-visible {
  background: oklch(var(--zp-state) / 0.1);
  color: oklch(var(--zp-state));
}

.zp-profile-status-link {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.zp-profile-status-link .zp-dot {
  width: 0.45rem;
  height: 0.45rem;
  margin: 0;
}

.zp-profile-v4 .zp-hero {
  min-height: min(860px, calc(100svh - 1rem));
  padding: 8.5rem max(5vw, 1.25rem) 4.5rem;
  overflow-x: clip; /* the glyph's outer ring would otherwise widen the page on phones */
}

.zp-profile-v4 .zp-hero-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  width: min(1160px, 100%);
  margin: auto;
}

.zp-hero-mark {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  isolation: isolate;
}

.zp-profile-v4 .zp-glyph-wrap {
  z-index: 3;
  width: clamp(190px, 22vw, 290px);
  height: clamp(190px, 22vw, 290px);
  cursor: pointer;
  filter: drop-shadow(0 0 30px oklch(var(--zp-state) / 0.22));
}

.zp-profile-v4 .zp-glyph-ring {
  inset: 50% auto auto 50%;
  width: clamp(255px, 29vw, 380px);
  height: clamp(255px, 29vw, 380px);
  border-color: oklch(var(--zp-state) / 0.16);
  transform: translate(-50%, -50%);
}

.zp-hero-mark::before,
.zp-hero-mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid oklch(var(--zp-state) / 0.12);
  border-radius: 50%;
}

.zp-hero-mark::before {
  width: min(34vw, 430px);
  aspect-ratio: 1;
}

.zp-hero-mark::after {
  width: min(41vw, 520px);
  aspect-ratio: 1;
  border-style: dashed;
  opacity: 0.55;
}

.zp-hero-orbit-label {
  position: absolute;
  right: 6%;
  bottom: 10%;
  padding: 0.5rem 0.7rem;
  border: 1px solid oklch(var(--zp-state) / 0.3);
  border-radius: 999px;
  background: oklch(var(--space-oled) / 0.7);
  color: oklch(var(--zp-state));
  font: 700 0.65rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zp-hero-copy {
  position: relative;
  z-index: 2;
  text-align: left;
}

.zp-eyebrow,
.zp-kicker,
.zp-card-label,
.zp-deck-eyebrow {
  margin: 0 0 0.75rem;
  color: oklch(var(--zp-state));
  font: 750 0.7rem/1.4 var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.zp-profile-v4 .zp-hero h1 {
  margin: 0;
  font-size: clamp(4.5rem, 11vw, 9rem);
  line-height: 0.8;
  letter-spacing: -0.075em;
  text-align: left;
  background: linear-gradient(115deg, oklch(var(--brand-teal)), oklch(var(--brand-purple)) 55%, oklch(var(--brand-green)));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.zp-profile-v4 .zp-hero .subtitle {
  max-width: none;
  margin: 1.6rem 0 0;
  color: var(--zp-copy);
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.025em;
}

.zp-hero-lede {
  max-width: 700px;
  margin: 1.25rem 0 0;
  color: var(--zp-copy-muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.75;
}

.zp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
}

.zp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.8rem 1.15rem;
  border: 1px solid oklch(var(--zp-state) / 0.35);
  border-radius: 0.75rem;
  font: 750 0.77rem/1 var(--font-mono);
  letter-spacing: 0.035em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.zp-action-primary {
  background: oklch(var(--zp-state) / 0.18);
  color: oklch(94% 0.035 270);
  box-shadow: inset 0 0 20px oklch(var(--zp-state) / 0.08);
}

.zp-action-ghost {
  background: oklch(var(--space-oled) / 0.2);
  color: var(--zp-copy-muted);
}

.zp-action:hover,
.zp-action:focus-visible {
  border-color: oklch(var(--zp-state) / 0.72);
  transform: translateY(-2px);
}

.zp-profile-v4 .zp-hero .zp-status {
  justify-content: flex-start;
  max-width: max-content;
  margin: 1.4rem 0 0;
  padding: 0.65rem 0.85rem;
  border-color: var(--zp-hairline);
  background: oklch(var(--space-oled) / 0.32);
  color: var(--zp-copy-muted);
  font-size: 0.76rem;
}

.zp-profile-v4 .zp-mood-switch {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  width: min(1160px, 100%);
  margin: 3rem auto 0;
  padding: 0.65rem;
  border: 1px solid var(--zp-hairline);
  border-radius: 0.9rem;
  background: oklch(var(--space-oled) / 0.38);
  backdrop-filter: blur(14px);
}

.zp-profile-v4 .zp-mood-label {
  margin: 0 0.45rem 0 0.25rem;
  color: var(--zp-copy-muted);
  opacity: 1;
}

.zp-profile-v4 .zp-mood-btn {
  min-height: 2.2rem;
  padding: 0.55rem 0.75rem;
  border-color: transparent;
  background: transparent;
  color: var(--zp-copy-muted);
}

.zp-profile-v4 .zp-mood-btn:hover,
.zp-profile-v4 .zp-mood-btn:focus-visible {
  border-color: oklch(var(--zp-state) / 0.32);
  color: oklch(var(--zp-state));
}

.zp-profile-v4 .zp-mood-btn.active {
  border-color: oklch(var(--zp-state) / 0.48);
  background: oklch(var(--zp-state) / 0.13);
  color: oklch(92% 0.04 270);
}

.zp-mood-copy {
  min-width: 230px;
  margin-left: auto;
  color: var(--zp-copy-muted);
  font-size: 0.8rem;
}

.zp-profile-v4 .zp-section {
  width: min(1160px, calc(100% - 2rem));
  max-width: none;
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  scroll-margin-top: 5.5rem;
}

.zp-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.6fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.zp-section-heading h2 {
  margin: 0;
  color: var(--zp-copy);
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.zp-section-heading > p {
  max-width: 540px;
  margin: 0;
  color: var(--zp-copy-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.zp-profile-v4 .zp-card,
.zp-daily-card,
.zp-deck,
.zp-cap-card,
.zp-workbench-card,
.zp-contact-card,
.zp-vibe-card {
  border: 1px solid var(--zp-hairline);
  background: linear-gradient(145deg, var(--zp-panel), oklch(8% 0.025 275 / 0.84));
  box-shadow: 0 24px 70px oklch(var(--space-oled) / 0.24);
  /* no backdrop blur: these panels are 78-84% opaque, so it barely showed, yet it re-blurred
     the live star sky behind every card each frame (SwiftShader, card-heavy view: 9 -> 16 fps) */
}

.zp-profile-v4 .zp-card:hover {
  border-color: oklch(var(--zp-state) / 0.22);
  transform: none;
}

.zp-signal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1.28fr);
  gap: 1rem;
}

.zp-profile-v4 .zp-daily-card {
  min-height: 330px;
  padding: 1.4rem;
  border-radius: 1rem;
}

.zp-profile-v4 .zp-daily-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--zp-hairline);
}

.zp-profile-v4 .zp-daily-quote {
  margin-top: 1.2rem;
  color: var(--zp-copy);
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  line-height: 1.58;
}

.zp-deck {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-radius: 1rem;
}

.zp-deck-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--zp-hairline);
  overflow-x: auto;
}

.zp-deck-tab {
  flex: 0 0 auto;
  padding: 0.65rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  color: var(--zp-copy-muted);
  font: 700 0.72rem/1 var(--font-mono);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.zp-deck-tab:hover,
.zp-deck-tab:focus-visible {
  border-color: oklch(var(--zp-state) / 0.2);
  color: oklch(var(--zp-state));
}

.zp-deck-tab.active {
  border-color: oklch(var(--zp-state) / 0.38);
  background: oklch(var(--zp-state) / 0.12);
  color: oklch(92% 0.04 270);
}

.zp-deck-loader {
  position: absolute;
  z-index: 3;
  top: 4.25rem;
  right: 1rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: oklch(var(--zp-state));
  box-shadow: 0 0 16px oklch(var(--zp-state) / 0.8);
  opacity: 0;
}

.zp-signal-panel {
  min-height: 270px;
  padding: 1.5rem;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.zp-signal-panel.htmx-swapping {
  opacity: 0;
  transform: translateY(6px);
}

.zp-deck-view h3 {
  max-width: 650px;
  margin: 0;
  color: var(--zp-copy);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.1;
}

.zp-deck-view > p:not(.zp-deck-eyebrow) {
  max-width: 680px;
  color: var(--zp-copy-muted);
  line-height: 1.65;
}

.zp-deck-facts,
.zp-system-facts {
  display: grid;
  gap: 0.7rem;
  margin: 1.5rem 0 0;
}

.zp-deck-facts div,
.zp-system-facts div {
  display: grid;
  grid-template-columns: minmax(90px, 0.34fr) 1fr;
  gap: 1rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--zp-hairline);
}

.zp-deck-facts dt,
.zp-system-facts dt {
  color: var(--zp-copy-muted);
  font: 700 0.68rem/1.4 var(--font-mono);
  text-transform: uppercase;
}

.zp-deck-facts dd,
.zp-system-facts dd {
  margin: 0;
  color: var(--zp-copy);
}

.zp-receipt-list,
.zp-latest-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.zp-receipt-row,
.zp-latest-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 0.8rem;
  border: 1px solid var(--zp-hairline);
  border-radius: 0.75rem;
  background: oklch(var(--space-oled) / 0.2);
}

.zp-receipt-row > span,
.zp-latest-row > time {
  color: oklch(var(--zp-state));
  font: 750 0.68rem/1.4 var(--font-mono);
}

.zp-receipt-row strong,
.zp-latest-row strong {
  display: block;
  color: var(--zp-copy);
}

.zp-receipt-row p,
.zp-latest-row p {
  margin: 0.2rem 0 0;
  color: var(--zp-copy-muted);
  line-height: 1.5;
}

.zp-noscript {
  margin: 0.8rem 0 0;
  color: var(--zp-copy-muted);
  font-size: 0.78rem;
}

.zp-chronicle {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zp-chronicle::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  left: 8.55rem;
  width: 1px;
  background: linear-gradient(oklch(var(--brand-teal) / 0.12), oklch(var(--brand-purple) / 0.48), oklch(var(--brand-green) / 0.2));
}

.zp-chronicle-entry {
  position: relative;
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 3.2rem;
  padding: 1.3rem 0;
}

.zp-chronicle-entry::before {
  content: "";
  position: absolute;
  top: 2rem;
  left: 8.22rem;
  width: 0.68rem;
  height: 0.68rem;
  border: 2px solid oklch(var(--brand-purple) / 0.72);
  border-radius: 50%;
  background: oklch(12% 0.035 275);
  box-shadow: 0 0 18px oklch(var(--brand-purple) / 0.18);
}

.zp-chronicle-entry.current::before {
  border-color: oklch(var(--brand-green));
  background: oklch(var(--brand-green));
  box-shadow: 0 0 20px oklch(var(--brand-green) / 0.45);
}

.zp-chronicle-entry time {
  padding-top: 0.35rem;
  color: oklch(var(--zp-state));
  font: 750 0.72rem/1.4 var(--font-mono);
  text-align: right;
}

.zp-chronicle-entry > div {
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--zp-hairline);
  border-radius: 0.9rem;
  background: oklch(10% 0.03 275 / 0.64);
}

.zp-chronicle-entry h3 {
  margin: 0;
  color: var(--zp-copy);
  font-size: 1.2rem;
}

.zp-chronicle-entry p {
  margin: 0.55rem 0 0;
  color: var(--zp-copy-muted);
  line-height: 1.65;
}

.zp-profile-v4 .zp-cap-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.zp-profile-v4 .zp-cap-card {
  position: relative;
  min-height: 340px;
  padding: 1.4rem;
  border-radius: 1rem;
}

.zp-profile-v4 .zp-cap-card:hover {
  border-color: oklch(var(--zp-state) / 0.28);
  transform: translateY(-3px);
}

.zp-cap-index {
  color: oklch(var(--zp-state));
  font: 750 0.7rem/1 var(--font-mono);
}

.zp-profile-v4 .zp-cap-card h3 {
  margin: 3.4rem 0 0.8rem;
  color: var(--zp-copy);
  font-size: 1.55rem;
}

.zp-profile-v4 .zp-cap-card > p {
  min-height: 7.2rem;
  color: var(--zp-copy-muted);
  line-height: 1.65;
}

.zp-profile-v4 .zp-pill.purple {
  border-color: oklch(72% 0.2 290 / 0.2);
  background: oklch(72% 0.2 290 / 0.08);
  color: oklch(72% 0.2 290);
}

.zp-workbench {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.zp-workbench-card {
  min-height: 180px;
  padding: 1.1rem;
  border-radius: 0.9rem;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.zp-workbench-card:hover,
.zp-workbench-card:focus-visible {
  border-color: oklch(var(--zp-state) / 0.42);
  transform: translateY(-3px);
}

.zp-workbench-card span {
  color: oklch(var(--zp-state));
  font: 700 0.68rem/1 var(--font-mono);
  text-transform: uppercase;
}

.zp-workbench-card strong {
  display: block;
  margin-top: 2.6rem;
  color: var(--zp-copy);
}

.zp-workbench-card small {
  display: block;
  margin-top: 0.45rem;
  color: var(--zp-copy-muted);
  line-height: 1.45;
}

.zp-systems-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.zp-system-card { padding: 1.5rem; }

.zp-system-card h3,
.zp-service-card h3,
.zp-contact-card h3 {
  margin: 0;
  color: var(--zp-copy);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.zp-system-card > p,
.zp-service-card p,
.zp-contact-card p {
  color: var(--zp-copy-muted);
  line-height: 1.65;
}

.zp-loop {
  display: grid;
  gap: 0.5rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.zp-loop li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--zp-hairline);
  border-radius: 0.7rem;
  background: oklch(var(--space-oled) / 0.2);
}

.zp-loop li > span {
  color: oklch(var(--zp-state));
  font: 700 0.68rem/1 var(--font-mono);
}

.zp-loop strong,
.zp-loop small { display: block; }

.zp-loop strong { color: var(--zp-copy); }

.zp-loop small { margin-top: 0.2rem; color: var(--zp-copy-muted); }

.zp-service-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(420px, 1.35fr);
  gap: 2rem;
  align-items: center;
  padding: 1.5rem;
}

.zp-profile-v4 .zp-service-grid {
  display: grid; /* the columns below only take hold on a grid; the base rule is a flex row */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0;
}

.zp-profile-v4 .zp-service-item {
  min-height: 88px;
  flex-direction: column;
  gap: 0.55rem;
  justify-content: center;
  border: 1px solid var(--zp-hairline);
  border-radius: 0.75rem;
  background: oklch(var(--space-oled) / 0.24);
}

.zp-profile-v4 .zp-crew-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.zp-profile-v4 #crew > .zp-card { padding: 1rem; }

.zp-profile-v4 .zp-crew-card {
  min-height: 300px;
  padding: 1.2rem;
}

.zp-profile-v4 .zp-crew-card p { min-height: 6rem; }

.zp-inline-link {
  display: inline-block;
  margin: 1rem 0.2rem 0.25rem;
  color: oklch(var(--brand-teal));
  font: 700 0.78rem/1.4 var(--font-mono);
  text-decoration: none;
}

.zp-inline-link:hover,
.zp-inline-link:focus-visible { text-decoration: underline; }

.zp-code-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 1rem;
  align-items: start;
}

.zp-code-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zp-code-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--zp-hairline);
  border-radius: 0.85rem;
  background: oklch(10% 0.03 275 / 0.62);
}

.zp-code-list li > span {
  color: oklch(var(--zp-state));
  font: 750 0.68rem/1.4 var(--font-mono);
}

.zp-code-list strong {
  color: var(--zp-copy);
  font-size: 1.03rem;
}

.zp-code-list p {
  margin: 0.35rem 0 0;
  color: var(--zp-copy-muted);
  line-height: 1.55;
}

.zp-vibe-card {
  position: sticky;
  top: 6rem;
  padding: 1.5rem;
  border-radius: 1rem;
}

.zp-vibe-card blockquote {
  margin: 1.5rem 0;
  color: var(--zp-copy);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 650;
  line-height: 1.35;
}

.zp-vibe-card > p:not(.zp-card-label) {
  color: var(--zp-copy-muted);
  line-height: 1.6;
}

.zp-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.zp-contact-card {
  min-height: 360px;
  padding: 1.5rem;
  border-radius: 1rem;
}

.zp-contact-primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background:
    radial-gradient(circle at 90% 10%, oklch(var(--zp-state) / 0.18), transparent 40%),
    linear-gradient(145deg, var(--zp-panel), oklch(8% 0.025 275 / 0.84));
}

.zp-contact-primary .zp-action { margin-top: auto; }

.zp-contact-links {
  display: grid;
  gap: 0.55rem;
}

.zp-contact-links a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--zp-hairline);
  color: var(--zp-copy);
  text-decoration: none;
}

.zp-contact-links a:hover span,
.zp-contact-links a:focus-visible span { color: oklch(var(--zp-state)); }

.zp-contact-links small { color: var(--zp-copy-muted); }

.zp-profile-v4 :is(a, button):focus-visible {
  outline: 2px solid oklch(var(--zp-state) / 0.9);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .zp-profile-nav {
    grid-template-columns: auto 1fr;
  }
  .zp-profile-status-link { display: none; }
  .zp-profile-nav-links { justify-content: flex-end; }
  .zp-profile-nav-links a:nth-child(4),
  .zp-profile-nav-links a:nth-child(5) { display: none; }
  .zp-profile-v4 .zp-hero-grid {
    grid-template-columns: minmax(210px, 0.55fr) minmax(0, 1.45fr);
    gap: 2rem;
  }
  .zp-profile-v4 .zp-cap-grid { grid-template-columns: 1fr; }
  .zp-profile-v4 .zp-cap-card { min-height: 0; }
  .zp-profile-v4 .zp-cap-card h3 { margin-top: 2rem; }
  .zp-profile-v4 .zp-cap-card > p { min-height: 0; }
  .zp-workbench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zp-profile-v4 .zp-crew-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The service card's two tracks (260px + 420px, gap and padding) need ~800px; below that it stacks */
@media (max-width: 800px) {
  .zp-service-card { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 760px) {
  .zp-profile-nav {
    top: 0.6rem;
    width: calc(100% - 1rem);
    min-height: 3rem;
  }
  .zp-profile-nav-links {
    justify-content: flex-end;
    overflow-x: auto;
  }
  .zp-profile-nav-links a { display: none; }
  .zp-profile-nav-links a:first-child,
  .zp-profile-nav-links a:nth-child(2),
  .zp-profile-nav-links a:last-child { display: block; }
  .zp-profile-v4 .zp-hero {
    min-height: auto;
    padding: 7rem 1rem 3.5rem;
  }
  .zp-profile-v4 .zp-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .zp-hero-mark { min-height: 260px; }
  .zp-hero-mark::before { width: 300px; max-width: 84vw; }
  .zp-hero-mark::after { width: 350px; max-width: 94vw; }
  .zp-hero-orbit-label { right: 16%; bottom: 5%; }
  .zp-profile-v4 .zp-hero h1,
  .zp-hero-copy { text-align: center; }
  .zp-profile-v4 .zp-hero h1 { font-size: clamp(4.6rem, 25vw, 7rem); }
  .zp-hero-actions { justify-content: center; }
  .zp-profile-v4 .zp-hero .zp-status { margin-inline: auto; }
  .zp-profile-v4 .zp-mood-switch {
    justify-content: center;
    margin-top: 2rem;
  }
  .zp-profile-v4 .zp-mood-label { width: 100%; text-align: center; }
  .zp-mood-copy { width: 100%; min-width: 0; margin: 0.35rem 0 0; text-align: center; }
  .zp-profile-v4 .zp-section {
    width: min(100% - 1.2rem, 1160px);
    padding: 4rem 0;
  }
  .zp-section-heading {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .zp-section-heading h2 { font-size: clamp(2.5rem, 13vw, 4rem); }
  .zp-signal-layout,
  .zp-systems-grid,
  .zp-code-grid,
  .zp-contact-grid { grid-template-columns: 1fr; }
  .zp-profile-v4 .zp-daily-card { min-height: 0; }
  .zp-profile-v4 .zp-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zp-profile-v4 .zp-service-item:last-child { grid-column: 1 / -1; }
  .zp-chronicle::before { left: 0.34rem; }
  .zp-chronicle-entry {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding-left: 1.8rem;
  }
  .zp-chronicle-entry::before { left: 0; }
  .zp-chronicle-entry time { padding: 0; text-align: left; }
  .zp-vibe-card { position: static; }
}

@media (max-width: 520px) {
  .zp-profile-brand { padding-right: 0.4rem; }
  .zp-profile-brand span:last-child { display: none; }
  .zp-profile-v4 .zp-glyph-wrap { width: 180px; height: 180px; }
  .zp-deck-tabs { padding: 0.55rem; }
  .zp-deck-tab { padding: 0.6rem 0.68rem; }
  .zp-signal-panel { padding: 1.15rem; }
  .zp-workbench,
  .zp-profile-v4 .zp-crew-grid { grid-template-columns: 1fr; }
  .zp-profile-v4 .zp-crew-card p { min-height: 0; }
  .zp-contact-links a { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .zp-hero-mark::after { animation: zp-profile-orbit 38s linear infinite; }
  .zp-profile-v4[data-zp-mood="active"] .zp-hero-mark::after { animation-duration: 19s; }
  .zp-profile-v4[data-zp-mood="debugging"] .zp-hero-mark::after { animation-duration: 8s; }
  .zp-profile-v4[data-zp-mood="heartbeat"] .zp-hero-mark::after { animation: zp-profile-pulse 2.6s ease-in-out infinite; }
  @keyframes zp-profile-orbit {
    to { transform: rotate(360deg); }
  }
  @keyframes zp-profile-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.98); }
    50% { opacity: 0.85; transform: scale(1.03); }
  }
}

/* ── Hero background effects ── */

.zp-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.zp-hero-bg::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background:
    radial-gradient(ellipse at center, oklch(30% 0.20 195 / 0.15) 0%, oklch(28% 0.24 285 / 0.08) 40%, transparent 70%);
  animation: heroGlow 8s ease-in-out infinite;
}

/* ── Status line bounce ── */

.zp-status::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: oklch(var(--brand-teal));
  animation: statusPulse 2s ease-in-out infinite;
}

/* ── Pills as links (interactive) ── */

/* ── Chapter 2: What I Do — Capability Grid ── */

.zp-cap-grid { display: grid; margin-top: 1.2rem; }

.zp-cap-card {
  background: oklch(25% 0.02 260 / 0.3);
  border: 1px solid oklch(80% 0.25 185 / 0.10);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.zp-cap-card:hover { box-shadow: 0 6px 24px oklch(25% 0.18 195 / 0.12); }

.zp-cap-card > p { font-size: 0.85rem; margin: 0 0 0.8rem; }

.zp-cap-card .zp-pills {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.zp-cap-card .zp-pill {
  font-size: 0.7rem;
  padding: 0.25em 0.6em;
}

/* ── Performance safety valve: when frames drop, main.js's FPS watcher flips
   this class so every ambient/decorative infinite animation on the page eases
   off (the WebGL stars are cheap enough to keep going). Presence
   dots, the typing indicator, and the status pulse are left untouched — they're
   cheap and carry real meaning, not just atmosphere. ── */

body.zp-motion-throttled .zp-glyph-ring,
body.zp-motion-throttled .zp-hero-bg::before {
  animation-play-state: paused;
} /* her orb (zephyy.css) and whorl (zephyy-orb.css) pause by their own rules */

/* ── Daily Zephyy ── */

.zp-daily-card {
  position: relative;
  background: linear-gradient(135deg,
    oklch(25% 0.18 195 / 0.10) 0%,
    oklch(28% 0.30 335 / 0.08) 50%,
    oklch(22% 0.20 220 / 0.10) 100%);
  border: 1px solid oklch(78% 0.23 185 / 0.15);
  transition: all 0.3s ease;
}

.zp-daily-card.loaded {
  border-color: oklch(78% 0.23 185 / 0.25);
}

.zp-daily-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.zp-daily-mood {
  font-size: 1.5rem;
  line-height: 1;
}

.zp-daily-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: oklch(78% 0.23 185 / 0.6);
  font-family: var(--font-mono);
}

.zp-daily-quote {
  margin: 0 0 0.5rem;
  font-style: italic;
  opacity: 0.9;
}

.zp-daily-source {
  font-size: 0.85rem;
  color: oklch(78% 0.23 185 / 0.6);
  margin: 0;
  font-family: var(--font-mono);
}

@media (max-width: 700px) {
  .zp-daily-card {
    padding: 1.5rem;
  }
  .zp-daily-quote {
    font-size: 1rem;
  }
}

/* ===== Chapter 2: Crew Cards ===== */

.zp-crew-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.zp-crew-card {
  background: oklch(25% 0.02 260 / 0.3);
  border: 1px solid oklch(80% 0.25 185 / 0.12);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.3s;
}

.zp-crew-card:hover {
  border-color: oklch(80% 0.25 185 / 0.3);
}

.zp-crew-emoji {
  font-size: 2rem;
  text-align: center;
  display: block;
}

.zp-crew-card h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--text-main);
  text-align: center;
}

.zp-crew-role {
  font-size: 0.8rem;
  color: oklch(78% 0.23 185 / 0.6);
  font-family: var(--font-mono);
  text-align: center;
}

.zp-crew-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
  text-align: center;
}

/* ===== Chapter 2: Values with Icons ===== */

/* ===== Chapter 2: Service Health Indicators ===== */

.zp-service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}

.zp-service-item {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

.zp-service-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(70% 0.15 100 / 0.4);
  flex-shrink: 0;
}

.zp-service-dot.online {
  background: oklch(75% 0.28 150);
  box-shadow: 0 0 6px oklch(75% 0.28 150 / 0.5);
}

.zp-service-dot.offline {
  background: oklch(65% 0.25 20 / 0.5);
}

.zp-service-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ── Per-agent crew card hover accents ── */

.zp-crew-zephyy:hover { border-color: oklch(80% 0.25 185 / 0.35); box-shadow: 0 4px 20px oklch(80% 0.25 185 / 0.08); }

.zp-crew-torgent:hover { border-color: oklch(70% 0.28 150 / 0.35); box-shadow: 0 4px 20px oklch(70% 0.28 150 / 0.08); }

.zp-crew-wick:hover { border-color: oklch(78% 0.2 80 / 0.35); box-shadow: 0 4px 20px oklch(78% 0.2 80 / 0.08); }

@media (prefers-reduced-motion: no-preference) {
  /* Her avatar glyph: squish + overshoot on mood-cycle press */
  #zephyy-glyph {
    transition: transform 0.18s cubic-bezier(0.34, 1.8, 0.4, 1);
  }
  #zephyy-glyph:active {
    transform: scale(0.9) rotate(-3deg);
    transition-duration: 0.06s;
  }
  #zephyy-glyph.zp-spring {
    animation: zp-spring-pop 0.5s cubic-bezier(0.22, 1.6, 0.36, 1);
  }
  @keyframes zp-spring-pop {
    0%   { transform: scale(0.9)  rotate(-3deg); }
    45%  { transform: scale(1.08) rotate(2deg); }
    70%  { transform: scale(0.97) rotate(-1deg); }
    100% { transform: scale(1)    rotate(0deg); }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .zp-hero h1 {
    animation: zp-title-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .zp-hero h1 + p {
    animation: zp-title-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  }
  @keyframes zp-title-rise {
    from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
    to   { opacity: 1; transform: translateY(0);    filter: none; }  /* none: no filter layer left behind */
  }
}

@keyframes zp-ring-breathe {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.08); opacity: 0.6; }
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.95); }
  50% { opacity: 0.9; transform: translateX(-50%) scale(1.08); }
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
