/* Shared showcase layer. Loaded after each demo's own stylesheet so it can
   provide consistent presentation chrome while preserving each visual world. */

:root {
  --pl-rail-bg: rgba(255, 255, 255, 0.94);
  --pl-rail-ink: #45556C;
  --pl-rail-muted: #6F7E94;
  --pl-rail-line: rgba(69, 85, 108, 0.16);
  --pl-rail-chip: rgba(123, 107, 181, 0.1);
  --pl-rail-focus: #7B6BB5;
}

body[data-demo="show-and-tell"],
body[data-demo="professional"],
body[data-demo="idea-board"] {
  --pl-rail-bg: rgba(11, 13, 18, 0.92);
  --pl-rail-ink: #EEF1F6;
  --pl-rail-muted: #A8B1C2;
  --pl-rail-line: rgba(255, 255, 255, 0.12);
  --pl-rail-chip: rgba(255, 255, 255, 0.08);
}

body[data-demo="event"] {
  --pl-rail-bg: rgba(16, 40, 32, 0.94);
  --pl-rail-ink: #F5EEDF;
  --pl-rail-muted: #B6C8BE;
  --pl-rail-line: rgba(245, 238, 223, 0.16);
  --pl-rail-chip: rgba(245, 238, 223, 0.08);
  --pl-rail-focus: #E46F3B;
}

body[data-demo="resource-exchange"] {
  --pl-rail-bg: rgba(237, 218, 180, 0.96);
  --pl-rail-ink: #352C20;
  --pl-rail-muted: #635441;
  --pl-rail-line: rgba(53, 44, 32, 0.18);
  --pl-rail-chip: rgba(53, 44, 32, 0.08);
  --pl-rail-focus: #A33F32;
}

.pl-demo-rail {
  position: sticky;
  inset-block-start: 0;
  z-index: 1000;
  color: var(--pl-rail-ink);
  background: var(--pl-rail-bg);
  border-bottom: 1px solid var(--pl-rail-line);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.pl-rail-inner {
  min-height: 64px;
  max-width: 1280px;
  margin-inline: auto;
  padding: 8px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 18px;
}

.pl-rail-brand,
.pl-rail-mode,
.pl-rail-pager a {
  color: inherit;
  text-decoration: none;
}

.pl-rail-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.pl-rail-brand img {
  display: block;
  width: 92px;
  height: auto;
}

.pl-rail-brand span,
.pl-rail-title span,
.pl-rail-pager,
.pl-rail-mode {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.pl-rail-brand span {
  color: var(--pl-rail-muted);
  border-left: 1px solid var(--pl-rail-line);
  padding-left: 12px;
}

.pl-rail-title {
  margin: 0;
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.pl-rail-title strong {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.pl-rail-title span { color: var(--pl-rail-muted); }

.pl-rail-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pl-rail-identity {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: var(--pl-rail-muted) !important;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace !important;
  font-size: 9px !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
}

.pl-rail-identity select {
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 30px 8px 11px !important;
  color: var(--pl-rail-ink) !important;
  background-color: var(--pl-rail-chip) !important;
  border: 1px solid var(--pl-rail-line) !important;
  border-radius: 999px !important;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.pl-rail-mode {
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--pl-rail-line);
  border-radius: 999px;
}

.pl-rail-mode:hover,
.pl-rail-mode:focus-visible { background: var(--pl-rail-chip); }

.pl-rail-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pl-rail-muted);
}

.pl-rail-pager a {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--pl-rail-line);
  border-radius: 50%;
  font-family: system-ui, sans-serif;
  font-size: 17px;
}

.pl-rail-pager a:hover,
.pl-rail-pager a:focus-visible {
  color: var(--pl-rail-ink);
  background: var(--pl-rail-chip);
}

.pl-demo-proof {
  width: fit-content;
  margin-top: 18px !important;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.82;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase;
}

.pl-demo-proof span {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.pl-focus-action {
  position: relative;
  isolation: isolate;
}

.pl-form-close,
.pl-inline-compose {
  min-height: 44px;
  cursor: pointer;
  font: 600 13px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.pl-form-close {
  margin-left: 10px;
  padding: 10px 14px;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 9px;
  opacity: 0.75;
}

.pl-inline-compose {
  margin-block: 0 16px;
  padding: 10px 16px;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.82;
}

[data-presentation-disclosure="true"] {
  transform-origin: top center;
}

[data-presentation-disclosure="true"].is-revealed {
  animation: pl-form-enter 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pl-mechanic-callout {
  position: fixed;
  z-index: 1200;
  right: clamp(14px, 3vw, 34px);
  bottom: 82px;
  width: min(390px, calc(100vw - 28px));
  padding: 20px 48px 20px 20px;
  color: #45556C;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #D7DFEA;
  border-left: 4px solid #7B6BB5;
  border-radius: 14px;
  box-shadow: 0 24px 70px -30px rgba(15, 23, 42, 0.5);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.pl-mechanic-callout.is-visible { opacity: 1; transform: none; }
.pl-mechanic-callout p { margin: 0; font: 14px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
.pl-mechanic-callout .pl-callout-kicker {
  margin-bottom: 7px;
  color: #646444;
  font: 700 10px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.pl-callout-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  color: #45556C;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font: 22px/1 system-ui, sans-serif;
}
.pl-callout-close:hover { background: #F1F5F9; }

.pl-present .pl-demo-rail { position: relative; }
.pl-present body { cursor: default; }
.pl-present .pl-demo-proof { opacity: 1; }
.pl-present body[data-demo="accountability"] .privacy-note { display: none; }

/* Show & Tell: an editorial gallery with one dominant feature. */
body[data-demo="show-and-tell"] .grid > .card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(0, 0.85fr);
  min-height: 380px;
}
body[data-demo="show-and-tell"] .grid > .card:first-child .card-thumb {
  min-height: 100%;
  font-size: clamp(72px, 10vw, 132px);
  background:
    linear-gradient(135deg, rgba(125,242,198,0.22), transparent 52%),
    repeating-linear-gradient(120deg, transparent 0 24px, rgba(255,255,255,0.035) 24px 25px),
    #19231F;
}
body[data-demo="show-and-tell"] .grid > .card:first-child .card-body {
  justify-content: center;
  padding: clamp(24px, 4vw, 48px);
}
body[data-demo="show-and-tell"] .grid > .card:first-child .card-title {
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.06;
}
body[data-demo="show-and-tell"] .grid > .card:nth-child(2) .card-thumb {
  background: radial-gradient(circle at 50% 52%, rgba(255,214,122,0.32), transparent 24%), #181B27;
}
body[data-demo="show-and-tell"] .grid > .card:nth-child(3) .card-thumb {
  background: radial-gradient(ellipse at 50% 70%, rgba(255,138,107,0.25), transparent 48%), #201817;
}
body[data-demo="show-and-tell"] .grid > .card:nth-child(4) .card-thumb {
  background: linear-gradient(150deg, rgba(125,242,198,0.15), transparent 62%), #131D1B;
}

/* Accountability: a calm ritual with the current streak as the focal point. */
body[data-demo="accountability"] {
  background:
    radial-gradient(700px 420px at 18% 8%, rgba(30,87,255,0.07), transparent 65%),
    #F4F6F8;
}
body[data-demo="accountability"] .stats {
  align-items: stretch;
}
body[data-demo="accountability"] .stats .stat:first-child {
  grid-row: span 2;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(150deg, #FFFFFF, #F5F8FF);
  border-color: #CAD8FF;
}
body[data-demo="accountability"] .stats .stat:first-child .stat-ring {
  justify-content: center;
}
body[data-demo="accountability"] .hundred {
  background: rgba(255,255,255,0.78);
  box-shadow: 0 24px 70px -54px rgba(31,44,72,0.7);
}
body[data-demo="accountability"] .checkin-form {
  border-left: 4px solid var(--accent);
  box-shadow: 0 20px 50px -42px rgba(30,87,255,0.55);
}

/* Professional: a restrained operations console with visible hierarchy. */
body[data-demo="professional"] .console-strip {
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 80px -54px rgba(61, 222, 255, 0.55);
}
body[data-demo="professional"] .console-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(61,222,255,0.045), transparent);
}
body[data-demo="professional"] .stat-v { font-size: clamp(22px, 3vw, 34px); }
body[data-demo="professional"] .tabs {
  padding: 5px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(8, 13, 19, 0.65);
}
body[data-demo="professional"] .member-card:first-child {
  border-color: rgba(61,222,255,0.44);
  background: linear-gradient(135deg, rgba(61,222,255,0.08), transparent 55%), var(--panel);
}

/* Resource Exchange: physical work orders and unmistakable claim stamps. */
body[data-demo="resource-exchange"] .listing[data-type="have"] { border-left: 6px solid var(--have); }
body[data-demo="resource-exchange"] .listing[data-type="need"] { border-left: 6px solid var(--need); }
body[data-demo="resource-exchange"] .status-tag {
  transform: rotate(-2deg);
  padding: 4px 10px;
  border-width: 2px;
  background: rgba(255,255,255,0.26);
}
/* The card already renders its status inline, and that one is live — it is
   what changes when someone claims on stage. A second decorative stamp in
   the corner printed the word twice on every claimed card. The inline one
   wins because it is the live record; this decorative one is removed. */
body[data-demo="resource-exchange"] .listing:has(.status-tag[data-status="claimed"])::after {
  display: none;
  content: "";
  position: absolute;
  right: 18px;
  top: 16px;
  color: var(--stamp-claimed);
  border: 3px double currentColor;
  padding: 5px 9px;
  transform: rotate(7deg);
  opacity: 0.2;
  font: 700 18px/1 "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.08em;
  pointer-events: none;
}

/* Event: a trail pass over a quiet topographic field. */
body[data-demo="event"] .event-card {
  background:
    repeating-radial-gradient(ellipse at 95% 8%, transparent 0 18px, rgba(25,56,44,0.055) 19px 20px),
    var(--ticket);
  box-shadow: 0 34px 90px -56px rgba(2, 17, 12, 0.9);
}
body[data-demo="event"] .countdown-unit {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -3px 0 rgba(25,56,44,0.12);
}
body[data-demo="event"] .countdown-unit::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(25,56,44,0.1);
}
body[data-demo="event"] .session {
  position: relative;
  background: rgba(255,255,255,0.26);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}
body[data-demo="event"] .attendee-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50% 50% 50% 0;
  background: currentColor;
  transform: rotate(-45deg);
}

/* Directory: a lively roster with distinct portrait fields. */
body[data-demo="member-directory"] .search-bar {
  position: sticky;
  top: 76px;
  z-index: 20;
  padding-block: 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
}
body[data-demo="member-directory"] .profile-card::before {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45), 0 10px 24px -16px rgba(56,44,96,0.75);
}
body[data-demo="member-directory"] .profile-card:nth-child(3n + 1)::before { background: linear-gradient(145deg, #D8CCFF, #8D76D7); }
body[data-demo="member-directory"] .profile-card:nth-child(3n + 2)::before { background: linear-gradient(145deg, #BFE4DD, #4C9B8E); }
body[data-demo="member-directory"] .profile-card:nth-child(3n)::before { background: linear-gradient(145deg, #F2CEB4, #C97A58); }
body[data-demo="member-directory"] .profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px -36px rgba(56,44,96,0.55);
}

/* Book Club: the current selection presented as a real book jacket.

   styles.css also lays .current-pick out as a two-column grid with its own
   drawn cover in column 1. Both cannot win: the grid left an empty 14rem
   column and shoved this jacket into the middle of the card. This file
   loads last, so cancel the grid explicitly rather than relying on order
   for the individual properties. */
body[data-demo="book-club"] .current-pick {
  display: block;
  grid-template-columns: none;
  position: relative;
  min-height: 430px;
  padding-left: min(42%, 280px);
  overflow: hidden;
}
body[data-demo="book-club"] .current-pick > * { grid-column: auto; }
body[data-demo="book-club"] .current-pick::before {
  content: "THE\A QUIET\A ATLAS";
  white-space: pre;
  position: absolute;
  left: 30px;
  top: 30px;
  bottom: 30px;
  width: min(32%, 190px);
  padding: 26px 20px;
  display: flex;
  align-items: flex-end;
  color: #FFF8ED;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,255,255,0.22), transparent 26%),
    linear-gradient(145deg, #77323A, #3D2028);
  border-radius: 2px 8px 8px 2px;
  box-shadow: 10px 14px 26px -16px rgba(42,33,24,0.85), inset 5px 0 rgba(255,255,255,0.08);
  font: 600 clamp(20px, 3vw, 31px)/0.92 var(--serif);
  letter-spacing: -0.04em;
}
body[data-demo="book-club"] .archive-list {
  border-bottom: 10px solid #5B3026;
  box-shadow: 0 8px 0 #D7C49F;
}
body[data-demo="book-club"] .archive-item { border-left-width: 9px; }

/* Idea Board: each vote strengthens a signal travelling toward shipped. */
body[data-demo="idea-board"]::before {
  content: "";
  position: fixed;
  z-index: -1;
  width: 680px;
  height: 680px;
  right: -260px;
  top: 90px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 62px, rgba(112,231,214,0.045) 63px 64px),
    conic-gradient(from 25deg, transparent, rgba(112,231,214,0.08), transparent 18%);
}
body[data-demo="idea-board"] .idea-list {
  position: relative;
}
body[data-demo="idea-board"] .idea-list::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 52px;
  bottom: 52px;
  width: 1px;
  background: linear-gradient(var(--accent-2), rgba(112,231,214,0.12), transparent);
}
body[data-demo="idea-board"] .idea:first-child {
  box-shadow: 0 24px 70px -44px rgba(112,231,214,0.65);
}
body[data-demo="idea-board"] .btn-vote {
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(112,231,214,0.06);
}

@keyframes pl-form-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .pl-rail-title { display: none; }
  .pl-rail-brand span { display: none; }
  .pl-rail-tools { gap: 7px; }
  .pl-rail-identity label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pl-rail-mode { display: none; }
  body[data-demo="show-and-tell"] .grid > .card:first-child {
    display: flex;
    grid-column: auto;
    min-height: 0;
  }
  body[data-demo="show-and-tell"] .grid > .card:first-child .card-thumb { min-height: 240px; }
  body[data-demo="book-club"] .current-pick { padding: 248px 24px 28px; }
  body[data-demo="book-club"] .current-pick::before {
    left: 24px;
    top: 24px;
    bottom: auto;
    width: 132px;
    height: 190px;
  }
}

@media (max-width: 560px) {
  .pl-rail-inner { gap: 9px; padding-inline: 12px; }
  .pl-rail-brand img { width: 82px; }
  .pl-rail-identity select { max-width: 112px; }
  .pl-rail-pager span { display: none; }
  .pl-rail-pager a:first-child { display: none; }
  .pl-mechanic-callout { bottom: 72px; }
  body[data-demo="accountability"] .stats .stat:first-child { grid-row: auto; min-height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  [data-presentation-disclosure="true"].is-revealed { animation: none; }
  .pl-mechanic-callout { transition: none; }
}
