/* proposal.css — the passport proposal's changes over the app's own styles (shared.css), decision 115.
   Every value is an app token or a value the page already uses; nothing new enters the type scale. */

/* ---- Changes 1–3: the hero. The right column keeps the app's x 193 and y 142; the legal name and the two chips
   leave it, the logo and the name share one line, and the price with its change closes it. */

/* The district title, smaller and centred between the back arrow (21–45) and the bookmark (333–373), on their
   shared centre line y 87 (Aastha, 16 Oct: "too large and unaligned"). */
.pp-head .cp-title {
  left: 45px;
  right: 60px;
  top: 76px;
  text-align: center;
  font: 800 var(--ks-k-h3) var(--ks-font); /* 18/22, centred on y 87 */
  letter-spacing: -0.36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The name much larger (Aastha, 16 Oct): the screen-title size, the logo grown to sit level with it */
.pp-id .cp-name {
  font: 800 var(--ks-k-h1) var(--ks-font); /* 28/34 */
  letter-spacing: -0.56px;
}
.pp-id .cp-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.pp-id .cp-logo img {
  width: 26px;
  height: 26px;
}
.pp-id {
  position: relative;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 176px; /* to the right margin, as the tagline */
}
.pp-id .cp-logo {
  position: static; /* in the row, not placed at (193, 147) */
  flex: none;
}
.pp-id .cp-name {
  margin: 0;
  width: auto;
  min-width: 0;
}
.pp-price {
  position: relative;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.pp-price-vl {
  font: 800 var(--ks-k-h2) var(--ks-font); /* 24/29: the page's one headline number (decision 98) */
  letter-spacing: -0.48px;
  color: #fff;
}
.pp-price .cp-move {
  margin-top: 0;
}

/* ---- Change 4: first visit. "The idea in short" takes the passport card's place on the sheet's edge (y −31),
   then the quick quiz as the page's one black button. */
.pp-idea {
  margin-top: -31px;
}
.pp-idea-hl {
  margin: 12px 0 0;
  font: 800 var(--ks-k-h3) var(--ks-font); /* 18/22, as the question cards' titles */
  letter-spacing: -0.36px;
}
.pp-idea-body {
  margin: 6px 0 0;
  font: 500 var(--ks-k-body) var(--ks-font);
  letter-spacing: -0.2px;
}
.pp-cta {
  text-decoration: none;
}
.pp-idea .pp-cta {
  margin-top: 16px;
}
.pp-idea .pp-cta img {
  filter: brightness(0) invert(1);
}
.pp-cta-note {
  margin: 8px 0 0;
  text-align: center;
  font: 500 var(--ks-k-small) var(--ks-font);
  letter-spacing: -0.2px;
  color: var(--ks-ink-secondary);
}

/* ---- Changes 5–6: the passport bar as today, one next-step button under it */
.pp-next {
  margin-top: 13px;
}
.pp-ic-white {
  filter: brightness(0) invert(1);
}

/* ---- Changes 7–8: two rows before Learn, in the rows' own construction (gradient, 1-px light line, inner shade).
   Discover takes the Discover step's green; News and events a teal, neither used by another row. */
.cp-row.pp-discover,
.cp-row.pp-news {
  width: 100%;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  z-index: 1;
}
.cp-row.pp-discover {
  background: linear-gradient(180deg, #23b552, #078a33);
  box-shadow: inset 0 0 0 1px #9be8b4, inset 0 -2px 4px #005d22, var(--ks-fx-tile-inset-light);
}
.cp-row.pp-news {
  background: linear-gradient(180deg, #22a9bd, #0e7f91);
  box-shadow: inset 0 0 0 1px #a6eef7, inset 0 -2px 4px #075866, var(--ks-fx-tile-inset-light);
}
/* The two panels hold today's cards unchanged, on the sheet's ground rather than inside another white card */
.pp-panel > :first-child {
  margin-top: 0;
}
.pp-panel .cp-sec {
  margin-top: 24px;
}
/* The event tile: a white card that opens the events; the bell in a soft yellow disc, the label, the headline, the
   question to watch. It never says which way the price will go. */
.pp-event {
  display: block;
  margin-top: 13px;
  padding: 16px 52px 16px 76px;
  color: var(--ks-ink);
  text-decoration: none;
}
.pp-event-ic {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff3c4;
  display: grid;
  place-items: center;
}
.pp-event-ic img {
  width: 24px;
  height: 24px;
}
.pp-event-lb,
.pp-event-st {
  display: block;
  font: 600 var(--ks-k-small) var(--ks-font);
  letter-spacing: -0.2px;
  color: var(--ks-ink-secondary);
}
.pp-event-hl {
  display: block;
  margin: 4px 0;
  font: 800 var(--ks-k-title) var(--ks-font);
  letter-spacing: -0.28px;
}
.pp-event-go {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
}
.pp-event:focus-visible {
  outline: 3px solid var(--ks-cyan);
  outline-offset: 2px;
}

/* ---- The mock quick-quiz sheet and the one-time pop-up */
.pp-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--ks-overlay-blur);
}
.pp-sheet[hidden] {
  display: none;
}
.pp-sheet-card {
  width: 100%;
  max-width: 393px;
  max-height: 92dvh;
  overflow: auto;
  box-sizing: border-box;
  padding: 16px var(--ks-margin-screen) 32px;
  border-radius: var(--ks-r-card-16) var(--ks-r-card-16) 0 0;
  background: #fff;
  color: var(--ks-ink);
}
.pp-sheet-top {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 800 var(--ks-k-title) var(--ks-font);
}
.pp-sheet-top #pp-quiz-count {
  margin-left: auto;
  font: 600 var(--ks-k-small-tight) var(--ks-font);
  color: var(--ks-ink-secondary);
}
.pp-sheet-x {
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pp-sheet-x img {
  width: 24px;
  height: 24px;
}
.pp-bar {
  display: block;
  height: 8px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--ks-line);
  overflow: hidden;
}
.pp-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ks-grad-identity-h);
  transition: width 300ms ease;
}
.pp-q {
  margin: 20px 0 0;
  font: 800 var(--ks-k-h3) var(--ks-font);
  letter-spacing: -0.36px;
}
.pp-hint {
  margin: 6px 0 0;
  font: 500 var(--ks-k-small) var(--ks-font);
  color: var(--ks-ink-secondary);
}
.pp-opts {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.pp-opts button {
  width: 100%;
  min-height: var(--ks-h-button-k);
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid var(--ks-line-2);
  border-radius: var(--ks-r-card-16);
  background: #fff;
  color: var(--ks-ink);
  text-align: left;
  font: 600 var(--ks-k-body) var(--ks-font);
  cursor: pointer;
}
.pp-opts button:disabled {
  cursor: default;
}
.pp-opts button.right {
  border-color: var(--ks-success);
  background: var(--ks-success-tint);
  color: var(--ks-success);
}
.pp-opts button.wrong {
  border-color: var(--ks-loss);
  background: var(--ks-loss-tint);
  color: var(--ks-loss);
}
.pp-explain {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--ks-r-tile);
  background: var(--ks-field-fill);
  font: 500 var(--ks-k-body) var(--ks-font);
}
.pp-learned {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pp-learned li {
  position: relative;
  padding-left: 30px;
  font: 500 var(--ks-k-body) var(--ks-font);
}
.pp-learned li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  background: url('assets/company/icon-quiz-check-green.svg') center / contain no-repeat;
}
.pp-score {
  margin: 20px 0 0;
  font: 800 var(--ks-k-h2) var(--ks-font);
  letter-spacing: -0.48px;
}
.pp-sheet .pp-cta {
  margin-top: 20px;
}
.pp-pop {
  align-items: center;
  padding: 0 var(--ks-margin-screen);
}
.pp-pop-card {
  width: 100%;
  max-width: 345px;
  box-sizing: border-box;
  padding: 20px 20px 24px;
  border-radius: var(--ks-r-card-16);
  background: #fff;
  color: var(--ks-ink);
  text-align: center;
}
.pp-pop-art {
  width: 104px;
  height: 104px;
  object-fit: contain;
}
.pp-pop h2 {
  margin: 8px 0 0;
  font: 800 var(--ks-k-h2) var(--ks-font);
  letter-spacing: -0.48px;
}
.pp-pop p {
  margin: 8px 0 0;
  font: 500 var(--ks-k-body) var(--ks-font);
  color: var(--ks-ink-secondary);
}
.pp-pop ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
}
.pp-pop li {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 var(--ks-k-body) var(--ks-font);
}
.pp-pop li img {
  width: 36px;
  height: 32px;
  object-fit: contain;
  flex: none;
}
.pp-pop .pp-cta {
  margin-top: 20px;
}
/* Home's bell is drawn white for the dark header; on the yellow disc it is ink */
.pp-event-ic img {
  filter: brightness(0);
}

/* ---- Hero round 3 (Aastha, 16 Oct): Profile's banner composition in the brand's colours, and the hero as one
   centred, balanced group. The banner is Profile's: 719 wide from x −163, its rounded foot hidden under the sheet.
   The picture and the right column share one centre line; the group sits 21 under the title row and 33 clear of
   the card that straddles the sheet's edge (was 16: "pulled down"). */
.pp-head {
  min-height: 0;
  padding: 128px var(--ks-margin-screen) 64px; /* 64 = the card's 31 overlap + 33 of air */
  display: block;
  overflow: clip;
  background: hsl(345 85% 20%); /* the banner's foot, under the image while it loads */
}
/* the tagline on the brighter banner: white at 88 %, not the dark tint's pink (as specific as company.css's brand rule) */
.cp[style*='--brand'] .pp-head {
  --desc: rgb(255 255 255 / 88%);
}
.pp-banner {
  position: absolute;
  left: -163px;
  top: -11px;
  width: 719px;
  max-width: none;
  height: calc(100% + 72px);
  pointer-events: none;
}
.pp-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.pp-head .cp-render {
  position: static;
  flex: none;
  width: 136px;
  height: 150px;
}
.pp-col {
  flex: 0 1 189px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.pp-col .pp-id {
  max-width: none;
}
.pp-col .cp-tagline {
  width: auto;
  max-width: 189px;
}

/* ---- Sticky open tabs (Aastha, 16 Oct): an open row stays at the top while its own panel scrolls under it, then
   leaves with its box as the next row arrives; closing it ends the stickiness. It floats 12 px from the top (plus
   the safe area) with the floating navbar's shadow while it is stuck. */
.pp-acc {
  display: grid;
  gap: 16px; /* as .cp-rows, so the tucked panels (−50) sit where they sit today */
}
.pp-acc > .cp-row[aria-expanded='true'] {
  position: sticky;
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 3; /* over the tucked panel and the cards scrolling under it; under the navbar (5) and sheets (20) */
  transition: box-shadow 160ms ease;
}
.pp-acc > .cp-row.stuck {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}
/* while stuck, the 12 px above the row is the page's ground, so no half-line of a card shows over it */
.pp-acc > .cp-row.stuck::before {
  content: '';
  position: absolute;
  left: -24px;
  right: -24px;
  top: calc(-12px - env(safe-area-inset-top, 0px));
  height: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--ks-ground);
}

/* ---- The event tile is a button now (it opens the event sheet on the page) */
button.pp-event {
  width: 100%;
  border: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
/* ---- The event sheet: the engine's event read (+10 XP once) and "Why did it move?" as taps */
.pp-xp {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: var(--ks-r-pill-40);
  background: var(--ks-success-tint);
  color: var(--ks-success);
  font: 700 var(--ks-k-small-tight) var(--ks-font);
}
.pp-ev-story {
  margin: 8px 0 0;
  font: 500 var(--ks-k-body) var(--ks-font);
}
.pp-ev-ask {
  margin-top: 20px;
}
.pp-ev-lb {
  margin: 16px 0 0;
  font: 800 var(--ks-k-title) var(--ks-font);
}
.pp-ev-tx {
  margin: 4px 0 0;
  font: 500 var(--ks-k-body) var(--ks-font);
}

/* ---- The status pill, moved from the hero to the passport card's top-right in place of "n/5" (Aastha, 16 Oct).
   The journey's state as the app names it (Company.tsx JOURNEY_PILL): Discovered · Explored · Invested · Mastered.
   One tint per state, each ink at least 4.5:1 on its fill at 14 px. */
.pp-status {
  position: absolute;
  right: 16px;
  top: 12px; /* centred on the 16/19 title at +14 */
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 12px;
  border-radius: var(--ks-r-pill-40);
  font: 700 var(--ks-k-small-tight) var(--ks-font);
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.pp-status[data-state='discovered'] {
  background: var(--ks-success-tint);
  color: var(--ks-success-deep);
}
.pp-status[data-state='explored'] {
  background: #f1ebff;
  color: var(--ks-purple-shade); /* the Quiz step's family */
}
.pp-status[data-state='invested'] {
  background: #fff1e5;
  color: var(--ks-tile-cash-shade); /* the Invest row's family */
}
.pp-status[data-state='mastered'] {
  background: var(--ks-pf-xp-tint);
  color: #7a5400;
}
