/* Pavilion Ecosystem — Customer Startup Experience shell (landing → join → PIA onboarding).
   Follows ClaudeDesign/readme.md: dark-green world gradient, translucent glass card with a lime
   hairline, nature imagery bleeding in from the right, wide tracking, left-aligned ghost buttons.
   Loads AFTER app.css / theme.css / design-tokens.css. */

.pe-world {
  min-height: 100vh; margin: 0; background: var(--pav-gradient-world); color: var(--pav-text-body);
  position: relative; overflow-x: hidden;
}
.pe-motif {
  position: fixed; top: 0; right: 0; bottom: 0; width: 52vw; pointer-events: none;
  background-size: cover; background-position: center; opacity: .55;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 52%);
          mask-image: linear-gradient(to right, transparent, #000 52%);
}
.pe-layout {
  position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 640px);
  gap: 3rem; align-items: center; padding: 2.5rem 3rem; max-width: 1200px;
}
.pe-rail { align-self: start; padding-top: 1rem; }
.pe-rail img { width: 168px; height: 168px; display: block; border-radius: 18px; }
.pe-lockup { margin-top: 1rem; font-size: 1.25rem; letter-spacing: .5em; color: var(--pav-text-strong); font-weight: 400; }
.pe-state { margin-top: .5rem; font-size: .72rem; letter-spacing: .32em; text-transform: uppercase; color: var(--pav-lime-300); }
.pe-progress { margin-top: 2rem; display: grid; gap: .45rem; }
.pe-progress div { font-size: .78rem; letter-spacing: .08em; color: var(--pav-text-faint); display: flex; align-items: center; gap: .55rem; }
.pe-progress div::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--pav-text-faint); flex: none; }
.pe-progress div.done { color: var(--pav-text-muted); }
.pe-progress div.done::before { background: var(--pav-lime-500); border-color: var(--pav-lime-500); }
.pe-progress div.now { color: var(--pav-lime-300); }
.pe-progress div.now::before { border-color: var(--pav-lime-300); box-shadow: 0 0 8px var(--pav-lime-glow); }

.pe-card {
  background: var(--pav-gradient-card); border: 1.5px solid var(--pav-lime-border); border-radius: 26px;
  box-shadow: 0 0 30px var(--pav-lime-glow); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: 2.2rem 2.4rem;
}
.pe-card.dense { box-shadow: none; }
/* Calibri at 85% of the previous 1.7rem (2026-10-20), matching the portal page headings. */
.pe-title { font-family: Calibri, Carlito, 'Segoe UI', system-ui, sans-serif; font-size: 1.445rem; font-weight: 400; letter-spacing: .04em; color: var(--pav-text-strong); margin: 0 0 1.5rem; line-height: 1.25; }
.pe-title b { font-weight: 500; letter-spacing: .35em; }
/* Same 24px heading gap as the portal pages (app.css .gw-page-head h1) — the next element starts exactly 1.5rem below. */
.pe-title + * { margin-top: 0; }
.pe-sub { color: var(--pav-text-muted); font-size: .92rem; letter-spacing: .03em; line-height: 1.6; margin: 0 0 1.4rem; }
.pe-body { color: var(--pav-text-body); font-size: .97rem; letter-spacing: .02em; line-height: 1.7; }
.pe-body p { margin: 0 0 .9rem; }

.pe-tabs { display: flex; align-items: center; gap: 1rem; margin: 0 0 .7rem; font-size: .95rem; letter-spacing: .1em; }
.pe-tabs button { background: none; border: 0; padding: .2rem 0; font: inherit; letter-spacing: inherit; color: var(--pav-text-faint); cursor: pointer; }
.pe-tabs button[aria-pressed="true"] { color: var(--pav-text-strong); font-weight: 500; }
.pe-tabs button:focus-visible { outline: 1px solid var(--pav-lime-500); outline-offset: 4px; border-radius: 4px; }
.pe-tabs span { color: var(--pav-text-faint); }

.pe-fields { display: grid; gap: .75rem; }
.pe-field, .pe-fields input, .pe-fields select, .pe-fields textarea {
  width: 100%; box-sizing: border-box; padding: .85rem 1.05rem; border-radius: 14px;
  border: 1px solid var(--pav-hairline); background: var(--pav-surface-field);
  color: var(--pav-lime-400); font: inherit; font-size: .95rem; letter-spacing: .04em; transition: border-color .2s ease;
}
.pe-fields select:invalid { color: var(--pav-text-faint); } /* the "Location" placeholder option */
.pe-fields select option { background: var(--pav-forest-800); color: var(--pav-text); }
.pe-fields input::placeholder, .pe-fields textarea::placeholder { color: var(--pav-text-faint); }
.pe-fields input:focus, .pe-fields select:focus, .pe-fields textarea:focus { outline: none; border-color: var(--pav-lime-border); }
.pe-fields input[readonly] { color: var(--pav-text-muted, #ccd5c7); cursor: default; }   /* locked, e.g. the invited email - light grey, not dimmed */
.pe-fields textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }
.pe-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pe-hint { font-size: .78rem; color: var(--pav-text-faint); letter-spacing: .03em; margin-top: -.25rem; }

.pe-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.pe-btn {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: .6rem; text-align: left;
  min-width: 220px; padding: .9rem 1.4rem; border-radius: 16px; cursor: pointer; text-decoration: none;
  background: var(--pav-surface-btn); border: 1px solid var(--pav-border-soft); color: var(--pav-text);
  font: inherit; font-size: .95rem; letter-spacing: .12em; transition: border-color .2s ease, background .2s ease;
}
.pe-btn:hover, .pe-btn:focus-visible { border-color: var(--pav-lime-border); background: rgba(169, 223, 75, .07); outline: none; }
.pe-btn.primary { background: rgba(169, 223, 75, .12); border-color: var(--pav-lime-border); color: var(--pav-text-strong); }
.pe-btn.quiet { min-width: 0; background: transparent; border-color: transparent; color: var(--pav-text-muted); letter-spacing: .06em; }
.pe-btn.quiet:hover { color: var(--pav-text); border-color: var(--pav-border-soft); }
.pe-btn[disabled] { opacity: .5; cursor: progress; }

.pe-msg { margin-top: 1rem; font-size: .88rem; line-height: 1.55; color: var(--pav-text-muted); }
.pe-msg.ok { color: var(--pav-lime-300); }
.pe-msg.err { color: #f0b49a; }

/* PIA speaking */
.pe-pia { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.2rem; }
.pe-pia-mark {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--pav-lime-border); box-shadow: 0 0 18px var(--pav-lime-glow);
  font-size: .8rem; letter-spacing: .14em; color: var(--pav-lime-300); font-weight: 600;
}
.pe-pia-name { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--pav-lime-300); margin-bottom: .25rem; }
.pe-steps { margin: .4rem 0 1rem; padding: 0; list-style: none; display: grid; gap: .45rem; counter-reset: s; }
.pe-steps li { counter-increment: s; display: flex; gap: .7rem; align-items: baseline; color: var(--pav-text-body); }
.pe-steps li::before { content: counter(s); font-size: .75rem; color: var(--pav-lime-300); min-width: 1.1rem; }

/* Tour */
/* The Ecosystem Tour slide heading — same Page Heading format as "My Ecosystem · [name]" (app.css .gw-page-head h1):
   Calibri, normal weight, the step name in green. The slide's statement follows as the .pe-title sub-heading. */
.pe-tour-head { font-family: Calibri, Carlito, 'Segoe UI', system-ui, sans-serif; font-size: calc(clamp(1.6rem, 3.5vw, 2.2rem) * .85); font-weight: 400; letter-spacing: -0.02em; color: var(--pav-text-strong); margin: .25rem 0 1.5rem; line-height: 1.2; }
.pe-tour-head span { color: var(--pav-lime-500); }
.pe-tour-k { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--pav-text-faint); margin-bottom: .6rem; }
.pe-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .6rem 0 1rem; }
.pe-chips span { font-size: .78rem; letter-spacing: .08em; padding: .35rem .75rem; border-radius: 20px; border: 1px solid var(--pav-border-soft); color: var(--pav-text-body); }
.pe-chips span b { color: var(--pav-lime-300); font-weight: 500; margin-right: .35rem; }
.pe-flow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .4rem 0 1rem; font-size: .9rem; letter-spacing: .08em; color: var(--pav-text); }
.pe-flow i { font-style: normal; color: var(--pav-lime-300); }
.pe-dots { display: flex; gap: .4rem; margin-top: 1.2rem; }
.pe-dots span { width: 22px; height: 3px; border-radius: 2px; background: var(--pav-border-soft); }
.pe-dots span.on { background: var(--pav-lime-500); }

/* Uploads */
.pe-drop {
  border: 1.5px dashed var(--pav-border-soft); border-radius: 18px; padding: 1.6rem; text-align: center;
  color: var(--pav-text-muted); cursor: pointer; transition: border-color .2s ease, background .2s ease;
}
.pe-drop:hover, .pe-drop.over { border-color: var(--pav-lime-border); background: rgba(169, 223, 75, .05); }
.pe-files { margin-top: .9rem; display: grid; gap: .45rem; }
.pe-file { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .6rem .9rem; border-radius: 12px; background: var(--pav-surface-field); font-size: .88rem; }
.pe-file a { color: var(--pav-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-file button { background: none; border: 0; color: var(--pav-text-faint); cursor: pointer; font: inherit; font-size: .8rem; }
.pe-file button:hover { color: #f0b49a; }

.pe-fade { animation: peFade .5s ease both; }
@keyframes peFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .pe-layout { grid-template-columns: 1fr; gap: 1.4rem; padding: 1.5rem 16px; }
  .pe-rail { display: flex; align-items: center; gap: 1rem; padding-top: 0; }
  .pe-rail img { width: 72px; height: 72px; border-radius: 10px; }
  .pe-lockup { margin-top: 0; font-size: 1rem; }
  .pe-progress { display: none; }
  .pe-motif { width: 100vw; opacity: .22; }
  .pe-card { padding: 1.5rem 1.25rem; border-radius: 22px; }
  .pe-row2 { grid-template-columns: 1fr; }
  .pe-tabs { font-size: .86rem; letter-spacing: .04em; gap: .6rem; }
  .pe-tabs button { white-space: nowrap; }
  .pe-btn { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .pe-fade { animation: none; } }

/* Your Introduction to Pavilion (2026-10-19) — section headings, the tagline and the mission quote. */
.pe-intro h2 { font-size: 1.15rem; font-weight: 400; letter-spacing: .04em; color: var(--accent); margin: 2.4rem 0 .6rem; }
.pe-intro h2:first-of-type { color: var(--pav-text-strong); margin-top: .4rem; }
.pe-intro .pe-tagline { color: var(--pav-text-muted); letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; margin: -.8rem 0 1.2rem; }
.pe-intro .pe-more { margin-top: 1.4rem; border-top: 1px solid var(--pav-hairline); padding-top: 1rem; }
.pe-intro .pe-more summary { cursor: pointer; color: var(--accent); font-weight: 600; letter-spacing: .04em; }
.pe-intro .pe-more[open] summary { margin-bottom: .4rem; }
.pe-intro blockquote { margin: .4rem 0 1rem; padding: .7rem 1rem; border-left: 3px solid var(--accent); color: var(--pav-text-strong); font-style: italic; background: rgba(255,255,255,.03); border-radius: 0 9px 9px 0; }

/* Register / sign-in (2026-10-20): no side rail — the card sits alone, centred, with the welcome
   band (the "Welcome to Pavilion Ecosystem" artwork) running edge to edge across its top. */
.pe-layout.pe-solo { grid-template-columns: minmax(0, 640px); justify-content: center; margin: 0 auto; }
.pe-band { margin: -2.2rem -2.4rem 1.5rem; border-radius: 24px 24px 0 0; overflow: hidden; line-height: 0; }
.pe-band img { display: block; width: 100%; height: auto; }
.pe-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 860px) { .pe-band { margin: -1.5rem -1.25rem 1.2rem; border-radius: 20px 20px 0 0; } }

/* Terms and news tick boxes (Join, Complete your registration — 2026-10-21). Overrides the full-width
   .pe-fields input style for the checkbox itself. */
.pe-check { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; line-height: 1.5; color: var(--pav-text-body); cursor: pointer; }
.pe-fields .pe-check input[type="checkbox"] { width: 1.15rem; height: 1.15rem; min-height: 0; padding: 0; margin: .15rem 0 0; flex: none; accent-color: var(--accent); border-radius: 4px; cursor: pointer; }
.pe-check a { color: var(--accent); }
.pe-check .req { color: var(--accent); font-weight: 600; }
.pe-checks { display: grid; gap: .6rem; margin-top: .3rem; padding-top: .8rem; border-top: 1px solid var(--pav-hairline, rgba(255,255,255,.08)); }
.pe-btn:disabled { opacity: .45; cursor: not-allowed; }

/* The PE Tour with Pia (?tour=1, 2026-10-21): the Register/Sign In format — no side rail, one centred
   card — with Hamish's unfurling-fern artwork as the card's own background, anchored bottom right. */
/* With the welcome band on top (2026-10-21): the artwork is sized to 80% of the card's height and
   anchored bottom right, so the koru keeps the same proportion to the card on wide screens as on a phone. */
.pe-card.pe-tour-card { position: relative; isolation: isolate; min-height: 600px; display: flex; flex-direction: column; }
/* The artwork on its own layer, its top and left edges faded into the card so no seam shows. */
.pe-card.pe-tour-card::before {
  content: ''; position: absolute; right: 0; bottom: 0; height: 80%; aspect-ratio: 4 / 5; max-width: 100%; z-index: -1;
  background: url(/assets/brand/tour-background.jpg) right bottom / cover no-repeat; border-radius: 0 0 24px 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at right bottom, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 100% 100% at right bottom, #000 60%, transparent 100%);
}
.pe-card.pe-tour-card .pe-actions { margin-top: auto; padding-top: 1.2rem; }

/* Pia's circle portrait on the Introduction pages (Hamish, 2026-11-25): the same framing as Ask Pia's
   (pia-chat.js .pia-face), drawn from /assets/brand/pia.jpg, which stays exactly as provided. */
.pe-pia-row { display: flex; align-items: center; gap: 1.1rem; margin: 1rem 0 1.2rem; }
.pe-pia-row p { margin: 0; }
.pe-face {
  flex: none; width: 96px; height: 96px; border-radius: 50%;
  background: #1f2c24 url(/assets/brand/pia.jpg) 74% 12% / 205% auto no-repeat;
  border: 2px solid var(--accent, #a9df4b); box-shadow: 0 0 18px rgba(150, 215, 70, .45);
}
@media (max-width: 560px) { .pe-face { width: 72px; height: 72px; } }
