/* ==========================================================================
   Gael Talent Bridge, Candidate Workspace
   Calm, task-led interface. Cloud surfaces on a Linen page.
   ========================================================================== */

.portal-body {
  background: var(--linen);
  --side-w: 268px;
  --top-h: 68px;
}

/* ---- Demo notice ---- */
.portal-demo-bar {
  background: var(--ink-deep);
  color: #b6c8ce;
  font-size: var(--text-micro);
  padding: 0.6rem 0;
}
.portal-demo-bar .wrap { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; max-width: none; }
.portal-demo-bar strong { color: var(--seaglass); }
.portal-demo-bar a { margin-left: auto; color: var(--seaglass); font-weight: 600; }

/* ---- Shell ---- */
.portal-shell { display: flex; min-height: 100vh; align-items: stretch; }

.portal-side {
  width: var(--side-w);
  flex-shrink: 0;
  background: var(--ink);
  color: #a9bcc3;
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.portal-brand { color: var(--cloud); margin-bottom: var(--sp-2); }
.portal-brand .brand-name { color: var(--cloud); font-size: 0.9375rem; }
.portal-brand .brand-sub { color: #7f959d; }
.portal-brand svg { width: 30px; height: 30px; }

.portal-nav { display: flex; flex-direction: column; gap: 2px; }
.portal-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: #a9bcc3;
  font-size: var(--text-small);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.portal-nav a svg { width: 19px; height: 19px; flex-shrink: 0; opacity: 0.85; }
.portal-nav a:hover { background: rgba(255, 255, 255, 0.07); color: var(--cloud); text-decoration: none; }
.portal-nav a[aria-current="page"] {
  background: rgba(79, 195, 184, 0.16);
  color: var(--cloud);
  font-weight: 600;
  box-shadow: inset 2px 0 0 #4fc3b8;
}

.portal-side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: var(--sp-4); }
.portal-consultant {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.5rem;
  border-radius: 10px;
  color: #a9bcc3;
}
.portal-consultant:hover { background: rgba(255, 255, 255, 0.07); text-decoration: none; }
.portal-consultant strong { display: block; color: var(--cloud); font-size: var(--text-small); }
.portal-consultant small { color: #7f959d; font-size: var(--text-micro); }
.portal-signout {
  display: block;
  margin-top: var(--sp-2);
  padding: 0.5rem;
  font-size: var(--text-micro);
  color: #7f959d;
}

.portal-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(140deg, #0f6f68, #14424a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* ---- Main column ---- */
.portal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.portal-top {
  height: var(--top-h);
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 clamp(1rem, 3vw, 2rem);
  position: sticky;
  top: 0;
  z-index: 40;
}
.portal-top-title span {
  display: block;
  font-size: var(--text-micro);
  color: var(--stone);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
}
.portal-top-title strong {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--ink);
  font-weight: 700;
}
.portal-top-actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); }
.portal-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--cloud);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.portal-icon-btn svg { width: 20px; height: 20px; }
.portal-icon-btn:hover { border-color: var(--ink); text-decoration: none; }
.portal-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.portal-user { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); }
.portal-user:hover { text-decoration: none; }
.portal-user-name { font-size: var(--text-small); font-weight: 600; }

.portal-content { padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2rem) var(--sp-9); max-width: 1220px; width: 100%; }

.portal-menu {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--cloud);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.portal-menu span,
.portal-menu span::before,
.portal-menu span::after {
  content: ""; display: block; width: 17px; height: 1.5px; background: currentColor; border-radius: 2px;
}
.portal-menu span::before { transform: translateY(-5px); }
.portal-menu span::after { transform: translateY(3.5px); }

@media (max-width: 1000px) {
  .portal-menu { display: inline-flex; }
  .portal-side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 120;
    transform: translateX(-100%);
    transition: transform 0.28s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .portal-side.open { transform: none; }
  .portal-user-name { display: none; }
}

/* ---- Portal building blocks ---- */
.p-card {
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
}
.p-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.p-card-head h2, .p-card-head h3 { font-size: 1.0625rem; margin: 0; }
.p-card-head a { font-size: var(--text-micro); font-weight: 600; }
.p-grid { display: grid; gap: var(--sp-4); }
.p-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p-grid-main { grid-template-columns: 1.55fr 1fr; align-items: start; }
@media (max-width: 1080px) { .p-grid-main { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .p-grid-3, .p-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .p-grid-2, .p-grid-3, .p-grid-4 { grid-template-columns: 1fr; } }

.p-page-head { margin-bottom: var(--sp-5); max-width: 46rem; }
.p-page-head h1 { font-size: clamp(1.6rem, 3.2vw, 2rem); margin-bottom: var(--sp-2); }
.p-page-head p { color: var(--stone); font-size: var(--text-small); margin: 0; }
.p-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Focus banner */
.p-focus {
  background: linear-gradient(120deg, var(--ink) 0%, #14424a 100%);
  color: var(--cloud);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.p-focus::after {
  content: "";
  position: absolute; right: -10%; top: -70%;
  width: 46%; height: 240%;
  background: radial-gradient(circle at center, rgba(79, 195, 184, 0.35), transparent 65%);
}
.p-focus > * { position: relative; z-index: 2; }
.p-focus .eyebrow { color: var(--seaglass); }
.p-focus h2 { color: var(--cloud); font-size: 1.4rem; margin-bottom: var(--sp-3); }
.p-focus p { color: #b6c8ce; font-size: var(--text-small); max-width: 34rem; }

/* Stat tiles */
.p-stat {
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
}
.p-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--ink);
  line-height: 1.1;
}
.p-stat span { font-size: var(--text-micro); color: var(--stone); }
.p-stat .p-trend { color: var(--ok); font-weight: 600; }

/* Progress path */
.p-path { display: flex; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.p-path li {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--stone);
  padding-top: 0.6rem;
  border-top: 3px solid var(--line-strong);
  line-height: 1.3;
}
.p-path li.done { color: var(--ok); border-top-color: var(--ok); }
.p-path li.now { color: var(--teal-hover); border-top-color: var(--teal); }

/* Task list */
.p-tasks { list-style: none; padding: 0; margin: 0; }
.p-tasks li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-small);
}
.p-tasks li:last-child { border-bottom: 0; padding-bottom: 0; }
.p-tasks input[type="checkbox"] { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--teal); flex-shrink: 0; }
.p-tasks .p-task-body { flex: 1; min-width: 0; }
.p-tasks strong { display: block; color: var(--ink); font-weight: 600; }
.p-tasks small { color: var(--stone); font-size: var(--text-micro); }
.p-tasks li.is-done strong { text-decoration: line-through; color: var(--stone); }

/* Timeline (Career Storyboard) */
.p-timeline { position: relative; margin: 0; padding: 0 0 0 2.25rem; list-style: none; }
.p-timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem; top: 0.4rem; bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, var(--seaglass), var(--line-strong));
}
.p-timeline > li { position: relative; margin: 0 0 var(--sp-4); }
.p-timeline > li::before {
  content: "";
  position: absolute;
  left: -2rem; top: 1.35rem;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--cloud);
  border: 3px solid var(--teal);
}
.p-timeline > li.is-education::before { border-color: var(--interview); }
.p-timeline > li.is-transition::before { border-color: var(--warn); }
.p-timeline > li.is-learning::before { border-color: var(--ok); }
.p-entry {
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
}
.p-entry-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-bottom: var(--sp-2);
}
.p-entry-year {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal-hover);
  font-size: var(--text-small);
  letter-spacing: 0.01em;
}
.p-entry h3 { font-size: 1.0625rem; margin: 0 0 0.3rem; }
.p-entry .p-entry-org { font-size: var(--text-micro); color: var(--stone); display: block; margin-bottom: var(--sp-3); }
.p-entry p { font-size: var(--text-small); color: var(--slate); margin-bottom: var(--sp-3); }
.p-entry-meta {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr 1fr;
  border-top: 1px dashed var(--line-strong);
  padding-top: var(--sp-3);
  font-size: var(--text-micro);
}
.p-entry-meta dt { color: var(--stone); font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.6875rem; margin-bottom: 0.2rem; }
.p-entry-meta dd { margin: 0; color: var(--slate); }
@media (max-width: 620px) { .p-entry-meta { grid-template-columns: 1fr; } }
.p-entry-actions { display: flex; gap: 0.4rem; margin-left: auto; }

/* Matrix cards */
.p-matrix {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cloud);
  overflow: hidden;
}
.p-matrix-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  background: var(--linen);
}
.p-matrix-head h3 { margin: 0; font-size: 1.0625rem; }
.p-matrix-body { padding: var(--sp-5); display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .p-matrix-body { grid-template-columns: 1fr; } }
.p-field-block dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--stone);
  margin-bottom: 0.25rem;
}
.p-field-block dd { margin: 0 0 var(--sp-3); font-size: var(--text-small); color: var(--slate); }
.p-field-block dd:last-child { margin-bottom: 0; }

/* Application (tracker) rows */
.p-app {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cloud);
  margin-bottom: var(--sp-3);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.p-app:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.p-app h3 { font-size: 1rem; margin: 0 0 0.15rem; }
.p-app .p-app-co { font-size: var(--text-micro); color: var(--stone); }
.p-app .p-app-next { font-size: var(--text-micro); color: var(--slate); }
.p-app .p-app-next b { color: var(--ink); }
@media (max-width: 760px) { .p-app { grid-template-columns: 1fr; } }

.p-stage-bar { display: flex; gap: 3px; margin-top: 0.5rem; }
.p-stage-bar i {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--line-strong);
}
.p-stage-bar i.on { background: var(--teal); }

/* Kanban */
.p-board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-3); }
.p-col { background: var(--linen-warm); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); min-width: 200px; }
.p-col h3 {
  font-size: var(--text-micro);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stone);
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.p-col-card {
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  margin-bottom: var(--sp-2);
  font-size: var(--text-micro);
}
.p-col-card strong { display: block; font-size: var(--text-small); color: var(--ink); }
.p-col-card span { color: var(--stone); }

/* Opportunity card */
.p-opp {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cloud);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.p-opp h3 { margin: 0; font-size: 1.0625rem; }
.p-opp .p-opp-meta { font-size: var(--text-micro); color: var(--stone); }
.p-match {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-micro);
  font-weight: 700;
  color: var(--teal-hover);
}
.p-match-ring {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--pct, 70%), var(--line-strong) 0);
  display: inline-grid;
  place-items: center;
  font-size: 0.625rem;
  color: var(--ink);
}
.p-match-ring::before {
  content: "";
  position: absolute;
  width: 26px; height: 26px;
  background: var(--cloud);
  border-radius: 50%;
}
.p-match-ring { position: relative; }
.p-match-ring span { position: relative; z-index: 2; font-weight: 700; }

/* Chat / interview studio */
.p-chat { display: flex; flex-direction: column; gap: var(--sp-4); max-height: 32rem; overflow-y: auto; padding-right: 0.25rem; }
.p-msg { display: flex; gap: 0.75rem; max-width: 90%; }
.p-msg-body {
  background: var(--linen-warm);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  padding: 0.85rem 1rem;
  font-size: var(--text-small);
}
.p-msg-body p:last-child { margin-bottom: 0; }
.p-msg.me { margin-left: auto; flex-direction: row-reverse; }
.p-msg.me .p-msg-body { background: var(--teal-quiet); border-color: rgba(0, 123, 114, 0.2); border-radius: 16px 16px 4px 16px; }
.p-msg-who { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--stone); margin-bottom: 0.3rem; }
.p-feedback {
  border: 1px solid rgba(0, 123, 114, 0.25);
  background: var(--teal-quiet);
  border-radius: var(--radius);
  padding: var(--sp-4);
  font-size: var(--text-small);
}
.p-feedback h4 { font-size: 0.9375rem; margin-bottom: var(--sp-2); }
.p-score { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-3); }
.p-score div { font-size: var(--text-micro); color: var(--stone); }
.p-score b { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }

/* Meter */
.p-meter { height: 6px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.p-meter i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }

/* Empty state */
.p-empty { text-align: center; padding: var(--sp-7) var(--sp-5); color: var(--stone); }
.p-empty svg { width: 42px; height: 42px; margin: 0 auto var(--sp-4); color: var(--line-strong); }
.p-empty h3 { font-size: 1.0625rem; }
.p-empty p { font-size: var(--text-small); max-width: 24rem; margin: 0 auto var(--sp-4); }

/* Filter row */
.p-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--sp-5); align-items: center; }
.p-chip {
  border: 1px solid var(--line-strong);
  background: var(--cloud);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: var(--text-micro);
  font-weight: 600;
  color: var(--stone);
  cursor: pointer;
}
.p-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--cloud); }

/* Modal */
.p-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 28, 36, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  z-index: 200;
}
.p-modal-backdrop.open { display: flex; }
.p-modal {
  background: var(--cloud);
  border-radius: var(--radius-lg);
  width: min(640px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
}
.p-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.p-modal-head h2 { font-size: 1.25rem; margin: 0; }
.p-close {
  border: 1px solid var(--line);
  background: var(--cloud);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--stone);
  font-size: 1.1rem;
  line-height: 1;
}
.p-close:hover { border-color: var(--ink); color: var(--ink); }

/* Privacy visibility selector */
.p-visibility { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.p-visibility label {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: var(--text-micro);
  font-weight: 600;
  color: var(--stone);
  cursor: pointer;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.p-visibility input { position: absolute; opacity: 0; pointer-events: none; }
.p-visibility input:checked + span { color: var(--teal-hover); }
.p-visibility label:has(input:checked) { border-color: var(--teal); background: var(--teal-quiet); color: var(--teal-hover); }
.p-visibility label:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ==========================================================================
   Live workspace components
   Added when the workspace moved from a static demonstration to real data.
   ========================================================================== */

/* ---- Loading and error states ---- */
.p-loading {
  display: flex; align-items: center; gap: 0.65rem;
  padding: var(--sp-7) 0; color: var(--stone); font-size: var(--text-small);
}
.p-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--teal);
  animation: p-spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes p-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .p-spinner { animation-duration: 2s; } }

.p-empty {
  background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-7) var(--sp-6); text-align: center; max-width: 44rem; margin: var(--sp-5) auto;
  box-shadow: var(--shadow-sm);
}
.p-empty h2 { font-size: var(--text-sub); margin: 0 0 var(--sp-3); }
.p-empty p { color: var(--stone); margin: 0 auto var(--sp-5); max-width: 34rem; }
.p-empty.is-error { border-color: #e8cfcb; }

/* ---- View header ---- */
.p-view-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-5);
}
.p-view-intro { color: var(--stone); max-width: 44rem; margin: 0; font-size: var(--text-small); }

/* ---- Banner ---- */
.p-banner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  flex-wrap: wrap; background: var(--warn-bg); border: 1px solid #ecd9b7;
  border-radius: var(--radius-sm); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-5);
}
.p-banner strong { color: var(--warn); }
.p-banner p { margin: 0.25rem 0 0; font-size: var(--text-small); color: var(--slate); }

/* ---- Greeting and statistics ---- */
.p-hello { margin-bottom: var(--sp-5); }
.p-hello h2 { font-size: var(--text-section); margin: 0 0 0.4rem; letter-spacing: -0.02em; }
.p-hello p { color: var(--stone); margin: 0; max-width: 46rem; }

.p-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3); margin-bottom: var(--sp-6);
}
.p-stat {
  background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--sp-4); display: flex; flex-direction: column; gap: 0.15rem;
}
.p-stat-label { font-size: var(--text-micro); color: var(--stone); font-weight: 600; letter-spacing: 0.02em; }
.p-stat-value { font-family: var(--font-display); font-size: 1.75rem; line-height: 1.1; color: var(--ink); }
.p-stat-hint { font-size: var(--text-micro); color: var(--stone-light); }

.p-two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--sp-5); align-items: start; }
@media (max-width: 900px) { .p-two-col { grid-template-columns: 1fr; } }

.p-list { list-style: none; margin: 0; padding: 0; }
.p-list li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.p-list li:last-child { border-bottom: 0; }
.p-list small { display: block; color: var(--stone); font-size: var(--text-micro); margin-top: 0.15rem; }

.p-suggest { list-style: none; margin: 0; padding: 0; }
.p-suggest a {
  display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); color: var(--ink);
}
.p-suggest li:last-child a { border-bottom: 0; }
.p-suggest a:hover { text-decoration: none; }
.p-suggest a:hover strong { color: var(--teal); }
.p-suggest strong { display: block; font-size: var(--text-body); }
.p-suggest span { display: block; color: var(--stone); font-size: var(--text-micro); margin-top: 0.2rem; }

.p-card-link { display: inline-block; margin-top: var(--sp-4); font-weight: 600; font-size: var(--text-small); }

/* ---- Entry cards ---- */
.p-cards { display: grid; gap: var(--sp-4); }
.p-entry {
  background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-5); box-shadow: var(--shadow-sm);
}
.p-entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.p-entry-head h3 { font-size: var(--text-body); margin: 0.2rem 0 0; }
.p-entry-eyebrow {
  font-size: var(--text-micro); color: var(--teal); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.p-entry > p { color: var(--slate); margin: var(--sp-3) 0 0; white-space: pre-line; }
.p-entry-extra { font-size: var(--text-small); color: var(--stone); margin: var(--sp-3) 0 0; }
.p-entry-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--sp-4); }
.p-entry-chips:empty { display: none; }

.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-skill { background: var(--teal-quiet); color: var(--teal-hover); }
.tag-muted { background: var(--linen-warm); color: var(--stone); }

.p-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--sp-4); }
.p-links a {
  font-size: var(--text-micro); font-weight: 600; padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink);
}
.p-links a:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }

/* ---- Pipeline summary ---- */
.p-pipeline { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.p-pipe {
  background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.6rem 1rem; display: flex; align-items: baseline; gap: 0.45rem;
}
.p-pipe strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.p-pipe span { font-size: var(--text-micro); color: var(--stone); }

/* ---- Table ---- */
.p-table-wrap {
  background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto; box-shadow: var(--shadow-sm);
}
.p-table { width: 100%; border-collapse: collapse; font-size: var(--text-small); min-width: 46rem; }
.p-table th {
  text-align: left; font-size: var(--text-micro); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--stone); font-weight: 700; padding: 0.85rem var(--sp-4);
  border-bottom: 1px solid var(--line); background: var(--linen);
}
.p-table td { padding: 0.9rem var(--sp-4); border-bottom: 1px solid var(--line); vertical-align: top; }
.p-table tr:last-child td { border-bottom: 0; }
.p-cell-sub { display: block; color: var(--stone); font-size: var(--text-micro); margin-top: 0.15rem; }
.p-cell-action { text-align: right; white-space: nowrap; }

.p-status {
  display: inline-block; font-size: var(--text-micro); font-weight: 600;
  padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--linen-warm); color: var(--stone);
  white-space: nowrap;
}
.p-status-applied, .p-status-acknowledged { background: var(--teal-quiet); color: var(--teal-hover); }
.p-status-screening { background: var(--warn-bg); color: var(--warn); }
.p-status-interview { background: var(--interview-bg); color: var(--interview); }
.p-status-offer { background: var(--ok-bg); color: var(--ok); }
.p-status-unsuccessful, .p-status-withdrawn { background: var(--linen-warm); color: var(--stone-light); }

/* ---- Notifications ---- */
.p-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.p-notes li {
  background: var(--cloud); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--radius-sm); padding: var(--sp-4) var(--sp-5);
}
.p-notes li.is-unread { border-left-color: var(--teal); }
.p-note-head { display: flex; justify-content: space-between; gap: var(--sp-4); align-items: baseline; }
.p-note-head span { font-size: var(--text-micro); color: var(--stone-light); white-space: nowrap; }
.p-notes p { margin: 0.4rem 0 0; color: var(--slate); font-size: var(--text-small); }
.p-notes a { font-size: var(--text-small); font-weight: 600; display: inline-block; margin-top: 0.5rem; }

/* ---- Documents ---- */
.p-upload { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--sp-4); align-items: end; margin-top: var(--sp-4); }
.p-upload .field { margin-bottom: 0; }
.p-upload button { align-self: end; }
@media (max-width: 700px) { .p-upload { grid-template-columns: 1fr; } }

.p-files { list-style: none; margin: var(--sp-5) 0 0; padding: 0; }
.p-files li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 0.8rem 0; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.p-files small { display: block; color: var(--stone); font-size: var(--text-micro); margin-top: 0.15rem; }
.p-file-actions { display: flex; gap: 0.4rem; }

.p-plain-list { color: var(--slate); padding-left: 1.2rem; }
.p-plain-list li { margin-bottom: 0.35rem; }
.p-readonly {
  background: var(--linen); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem; font-family: var(--font-body); margin: 0 0 var(--sp-3);
}

/* ---- Forms inside the workspace ---- */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-4); }
.field-grid > .field { grid-column: 1 / -1; }
.field-grid > .field-half { grid-column: auto; }
@media (max-width: 640px) { .field-grid > .field-half { grid-column: 1 / -1; } }

.p-form-error {
  color: var(--danger); background: var(--danger-bg); border: 1px solid #eccdc9;
  border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; font-size: var(--text-small);
  margin: 0 0 var(--sp-4);
}
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: #e5c4c0; }
.btn-danger-ghost:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }

/* ---- Modal ---- */
.p-modal-backdrop.is-open {
  position: fixed; inset: 0; z-index: 200; background: rgba(10, 28, 36, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--sp-5); overflow-y: auto; backdrop-filter: blur(2px);
}
body.has-modal { overflow: hidden; }
.p-modal-backdrop.is-open .p-modal {
  background: var(--cloud); border-radius: var(--radius); width: 100%; max-width: 46rem;
  padding: var(--sp-6); box-shadow: 0 24px 70px -20px rgba(10, 28, 36, 0.5);
  margin: auto 0;
}
.p-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.p-modal-head h2 { font-size: var(--text-sub); margin: 0; }
.p-modal-head .form-note { margin: 0.3rem 0 0; }
.p-close {
  background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--stone);
  cursor: pointer; padding: 0 0.3rem; border-radius: 8px;
}
.p-close:hover { color: var(--ink); background: var(--linen); }
.p-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* ---- Embedded interview companion ---- */
.p-embed-frame {
  background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: var(--sp-4);
}
.p-embed-frame iframe { width: 100%; height: min(76vh, 720px); border: 0; display: block; }

/* ---- Toast ---- */
.gtb-toast-host {
  position: fixed; bottom: var(--sp-5); left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 0.5rem; align-items: center;
  pointer-events: none;
}
.gtb-toast {
  background: var(--ink); color: var(--cloud); font-size: var(--text-small); font-weight: 500;
  padding: 0.7rem 1.1rem; border-radius: 999px; box-shadow: 0 12px 32px -12px rgba(10, 28, 36, 0.6);
  opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s;
  max-width: min(92vw, 34rem); text-align: center;
}
.gtb-toast.is-in { opacity: 1; transform: translateY(0); }
.gtb-toast.is-error { background: var(--danger); }

/* ============================================================
   Demonstration bar
   Shown only in the sample workspace, so a visitor is never in any
   doubt about whether the data in front of them is real.
   ============================================================ */
.p-demobar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.15rem;
  border: 1px solid rgba(79, 195, 184, 0.35);
  border-radius: 0.75rem;
  background: rgba(79, 195, 184, 0.1);
}
.p-demobar p { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.p-demobar strong { display: inline-block; margin-right: 0.4rem; letter-spacing: 0.02em; }
.p-demobar .btn { flex: 0 0 auto; }

/* Worked examples, folded away beneath an intake question. Kept visually quiet
   so they read as help rather than as content the candidate has to deal with. */
.p-example {
  margin: -0.35rem 0 1.1rem;
  border-left: 3px solid var(--line-strong);
  background: var(--linen-warm);
  border-radius: 0 6px 6px 0;
}
.p-example > summary {
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  font-size: var(--text-micro);
  font-weight: 600;
  color: var(--stone);
  list-style: none;
}
.p-example > summary::-webkit-details-marker { display: none; }
.p-example > summary::before { content: "+ "; font-weight: 700; }
.p-example[open] > summary::before { content: "\2212 "; }
.p-example > summary:hover { color: var(--ink); }
.p-example > p,
.p-example > article {
  margin: 0 0.85rem 0.85rem;
  font-size: var(--text-small);
  color: var(--stone);
}
.p-example .p-entry { background: var(--cloud); }

/* Stays on the page after a save, because a toast does not. */
.p-saved {
  align-self: center;
  font-size: var(--text-small);
  color: var(--ok);
  font-weight: 600;
}

/* ---------- forwarded application email ---------- */

.p-forward { margin: 0 0 var(--space-6); }

.p-forward-address {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.p-forward-address code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: var(--text-small);
  word-break: break-all;
}

/* Captures the reader was not certain about. Amber rather than red, because
   this is a question for the candidate, not a fault. */
.p-review {
  border: 1px solid var(--warn, #b8860b);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  padding: var(--space-5);
  margin: 0 0 var(--space-6);
}

.p-review h2 { font-size: var(--text-h4, 1.1rem); margin: 0 0 var(--space-2); }
.p-review > p { margin: 0 0 var(--space-4); font-size: var(--text-small); color: var(--ink-soft); }

.p-review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }

.p-review-list li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
}

.p-review-actions { display: flex; gap: var(--space-2); }
