/* case-trader-portfolio-platform.html only: styles for this case study's own screens and sections.
   Shared patterns live in case-study.css (page) and case-ui.css (product UI). */

/* ==========================================================================
   Still frames. Bars inside a flow grow on cue; without the motion script
   (no data-flow-index yet) they show their real heights instead of stubs.
   ========================================================================== */

.ui.is-12t .tw-app:not([data-flow-index]) .tw-bars i { height: var(--h); }
.ui.is-12t .tw-event-win:not([data-flow-index]) .tw-compare { opacity: 1; transform: none; }
.ui.is-12t .tw-event-win:not([data-flow-index]) .tw-cmp-r i { width: calc(var(--w) * .7); }

/* ==========================================================================
   Processes (03 applying, 04 reviewing). Four real screens in reading order,
   each with a numbered caption. The flow walks the steps: the running step
   gets an accent ring, finished steps turn into ticks. Nothing is dimmed, so
   the still frame reads end to end.
   ========================================================================== */

.ui.tp-ui { padding: clamp(12px, 2.4vw, 28px); }

.tp-proc {
  font-family: 'DM Sans', sans-serif;
  color: var(--ui-ink);
  text-align: left;
}

/* --- head: who acts, what they are doing ------------------------------------ */

.tp-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 18px;
}

.tp-head > b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }

.tp-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--ui-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tp-who .i { width: 12px; height: 12px; }
.tp-proc.is-emp .tp-who { background: var(--ui-solid); color: var(--ui-solid-ink); }
.page-wrap:not(.light-mode) .tp-proc:not(.is-emp) .tp-who { color: #0e0e15; }

.tp-now { display: grid; margin-left: auto; font-size: 11.5px; color: var(--ui-ink-3); }
.tp-now > span { grid-area: 1 / 1; text-align: right; white-space: nowrap; opacity: 0; transition: opacity .35s ease; }
.tp-now > span.is-now,
.tp-proc:not([data-flow-index]) .tp-now > span:first-child { opacity: 1; }
.tp-now b { font-weight: 600; color: var(--ui-ink); }

/* --- steps ------------------------------------------------------------------ */

.tp-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tp-step { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.tp-cap { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.tp-cap b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--ui-ink); }
.tp-cap small { display: block; font-size: 11px; line-height: 1.35; color: var(--ui-ink-3); }

.tp-n {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ui-accent) 40%, var(--ui-line));
  background: var(--ui-bg);
  color: var(--ui-accent);
  font-size: 11.5px;
  font-weight: 700;
  transition: background .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.tp-n > span { transition: opacity .25s ease; }
.tp-n .i { position: absolute; width: 12px; height: 12px; stroke-width: 3; opacity: 0; transition: opacity .25s ease; }

.tp-step[data-state="run"] .tp-n {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 18%, transparent);
}

.tp-step[data-state="done"] .tp-n { background: var(--tw-up); border-color: var(--tw-up); color: #fff; }
.tp-step[data-state="done"] .tp-n > span { opacity: 0; }
.tp-step[data-state="done"] .tp-n .i { opacity: 1; }
.page-wrap:not(.light-mode) .tp-step:is([data-state="run"], [data-state="done"]) .tp-n { color: #0e0e15; }

.tp-win {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 418px;
  font-size: 11px;
}

.tp-step[data-state="run"] .tp-win {
  border-color: color-mix(in srgb, var(--ui-accent) 55%, var(--ui-line));
  box-shadow: var(--ui-shadow), 0 0 0 3px color-mix(in srgb, var(--ui-accent) 16%, transparent);
}

.tp-bar {
  display: block;
  height: 3px;
  margin-top: 22px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ui-accent) 14%, transparent);
  overflow: hidden;
}

.tp-bar i { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--ui-accent); transition: width .6s ease; }

/* --- app chrome --------------------------------------------------------------- */

.tp-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-bg);
}

.ui.is-12t .tp-nav .tw-brand svg { width: 14px; height: 19px; }
.tp-links { display: flex; gap: 13px; margin-left: auto; font-size: 10.5px; color: var(--ui-ink-2); white-space: nowrap; }
.tp-links .is-on { color: var(--ui-accent); font-weight: 700; }
.tp-nav .tw-bell { position: relative; width: 24px; height: 24px; }
.tp-nav .tw-bell.is-dot::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tw-down);
  box-shadow: 0 0 0 1.5px var(--tw-soft);
}

.tp-org {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 3px;
  border: 1px solid var(--ui-line);
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tp-org .tp-logo { width: 18px; height: 18px; border-radius: 5px; font-size: 7px; }
.ui.is-12t .tw-av.is-emp { background: var(--ui-solid); color: var(--ui-solid-ink); }

.tp-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
  background: var(--ui-panel);
}

.tp-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-h b { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.tp-h small { display: block; font-size: 10px; color: var(--ui-ink-3); }

.tp-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--c);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .02em;
}

.tp-logo.is-lg { width: 38px; height: 38px; border-radius: 10px; font-size: 12px; }

.tp-k {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
}

.tp-k .i { width: 11px; height: 11px; }

.tp-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.tp-chip.is-rev,
.tp-chip.is-new { background: var(--tw-soft); color: var(--ui-accent); }
.tp-chip.is-short { background: color-mix(in srgb, var(--tw-up) 14%, transparent); color: var(--tw-up); }
.tp-chip.is-part { background: color-mix(in srgb, var(--tw-amber) 20%, transparent); color: var(--tp-amber-ink, #9a5c0c); }
.tp-chip.is-fb { background: none; box-shadow: inset 0 0 0 1px var(--ui-line); color: var(--ui-accent); }

.ui.is-12t { --tp-amber-ink: #9a5c0c; }
.page-wrap:not(.light-mode) .ui.is-12t { --tp-amber-ink: var(--tw-amber); }

.tp-back { display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; font-size: 10px; font-weight: 600; color: var(--ui-ink-3); }
.tp-back .i { width: 10px; height: 10px; }

.tp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--ui-line);
}

.tp-how { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 9.5px; color: var(--ui-ink-3); }
.tp-how .i { width: 11px; height: 11px; flex: none; }
.tp-foot .tw-btn .i,
.tp-acts .tw-btn.is-primary .i { order: 2; }

.ui.is-12t .tw-btn.tp-send.is-now { transform: scale(.95); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ui-accent) 25%, transparent); }

@keyframes tp-pop { from { opacity: .15; transform: translateY(-6px); } }

/* --- 03.1 jobs ---------------------------------------------------------------- */

.tp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-bg);
  font-size: 11px;
  font-weight: 600;
}

.tp-search > .i { width: 12px; height: 12px; color: var(--ui-ink-3); }
.tp-chips { display: flex; gap: 4px; margin-left: auto; }
.tp-chips span { padding: 3px 8px; border-radius: 6px; background: var(--ui-sunken); color: var(--ui-ink-2); font-size: 9.5px; font-weight: 500; }
.tp-chips .is-on { background: var(--tw-soft); color: var(--ui-accent); font-weight: 700; }

.tp-jobs { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }

.tp-jobs li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: var(--ui-bg);
  transition: border-color .35s ease, box-shadow .35s ease, transform .35s ease;
}

.tp-jobs b { display: block; font-size: 11.5px; line-height: 1.3; }
.tp-jobs small { display: block; font-size: 9.5px; color: var(--ui-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-jobs li.is-pick { border-color: color-mix(in srgb, var(--ui-accent) 55%, var(--ui-line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 10%, transparent); }
.tp-jobs li.is-pick.is-now { transform: scale(.985); }

.tp-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tp-tags span { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 5px; background: var(--ui-sunken); color: var(--ui-ink-2); font-size: 9px; }
.tp-tags .is-ev { background: var(--tw-soft); color: var(--ui-accent); font-weight: 600; }
.tp-tags .i { width: 9px; height: 9px; }

.tp-match { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; }
.tp-match i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--tw-up) calc(var(--p) * 1%), var(--ui-sunken) 0);
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 59%);
          mask: radial-gradient(circle, transparent 57%, #000 59%);
}
.tp-match.is-low i { background: conic-gradient(var(--tw-amber) calc(var(--p) * 1%), var(--ui-sunken) 0); }
.tp-match b { font-size: 9.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- 03.2 job page ------------------------------------------------------------ */

.tp-job-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.tp-job-h b { display: block; font-size: 14px; letter-spacing: -.01em; line-height: 1.25; }
.tp-job-h small { display: block; font-size: 9.5px; color: var(--ui-ink-3); }

.tp-sec { padding: 10px 12px; border: 1px solid var(--ui-line); border-radius: 9px; background: var(--ui-bg); }

.tp-req { display: grid; margin: 0; padding: 0; list-style: none; }
.tp-req li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  border-top: 1px solid var(--ui-line-soft);
  border-radius: 6px;
  font-size: 10.5px;
  transition: background .4s ease;
}
.tp-req li:first-child { border-top: 0; }
.tp-req b { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.tp-req .is-ok b { color: var(--tw-up); }
.tp-req .is-gap b { font-size: 10px; color: var(--ui-accent); }
.tp-req .is-gap b .i { width: 9px; height: 9px; }
.tp-req .is-gap.is-now { background: color-mix(in srgb, var(--tw-amber) 14%, transparent); }

.tp-mk { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: color-mix(in srgb, var(--tw-up) 16%, transparent); color: var(--tw-up); }
.tp-mk .i { width: 9px; height: 9px; stroke-width: 3; }
.tp-req .is-gap .tp-mk { background: color-mix(in srgb, var(--tw-amber) 22%, transparent); color: var(--tp-amber-ink); }
.tp-req .is-gap .tp-mk .i { width: 11px; height: 11px; stroke-width: 2.4; }

.tp-sees-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.tp-sees-g span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 4px;
  border-radius: 7px;
  background: var(--tw-soft);
  color: var(--ui-accent);
  font-size: 9.5px;
  font-weight: 600;
  text-align: center;
}
.tp-sees-g .i { width: 13px; height: 13px; }

.ui.is-12t .tp-fine { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 9.5px; color: var(--ui-ink-3); }
.tp-fine .i { width: 11px; height: 11px; }

/* --- 03.3 apply sheet --------------------------------------------------------- */

.tp-body.tp-scrim { justify-content: center; padding: 14px 20px; background: color-mix(in srgb, var(--ui-ink) 16%, var(--ui-panel)); }

.tp-modal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ui-bg);
  box-shadow: 0 18px 40px -14px rgba(15, 15, 40, .45);
}

.tp-modal-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding-bottom: 9px; border-bottom: 1px solid var(--ui-line); }
.tp-modal-h small { display: block; font-size: 9.5px; color: var(--ui-ink-3); }
.tp-modal-h b { display: block; font-size: 12.5px; }
.tp-x { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ui-sunken); color: var(--ui-ink-3); }
.tp-x .i { width: 10px; height: 10px; }
.tp-modal .tp-k { margin: 2px 0 0; }

.tp-share { display: grid; margin: 0; padding: 0; list-style: none; }
.tp-share li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--ui-line-soft); }
.tp-share li:first-child { border-top: 0; }
.tp-share b { display: block; font-size: 10.5px; }
.tp-share small { display: block; font-size: 9px; color: var(--ui-ink-3); }
.tp-share .is-off b { color: var(--ui-ink-2); }

.tp-ico { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--tw-soft); color: var(--ui-accent); }
.tp-ico .i { width: 12px; height: 12px; }
.tp-share .is-off .tp-ico { background: var(--ui-sunken); color: var(--ui-ink-3); }

.tp-lock { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; font-weight: 600; color: var(--ui-ink-3); }
.tp-lock .i { width: 9px; height: 9px; }

.tp-tg { position: relative; width: 26px; height: 15px; border-radius: 99px; background: var(--ui-line); }
.tp-tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.tp-tg.is-on { background: var(--ui-accent); }
.tp-tg.is-on::after { left: 13px; }

.tp-note { padding: 7px 9px; border: 1px solid var(--ui-line); border-radius: 7px; font-size: 10px; line-height: 1.4; color: var(--ui-ink-2); }
.tp-note small { display: block; margin-bottom: 2px; font-size: 8.5px; color: var(--ui-ink-3); }

.tp-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 9.5px; line-height: 1.4; color: var(--ui-ink-2); }
.tp-cb {
  display: grid;
  place-items: center;
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border-radius: 4px;
  border: 1.5px solid var(--ui-accent);
  background: var(--ui-accent);
  color: #fff;
  transition: background .3s ease, border-color .3s ease, color .3s ease;
}
.tp-cb .i { width: 9px; height: 9px; stroke-width: 3.2; }
.page-wrap:not(.light-mode) .tp-cb { color: #0e0e15; }
/* Unticked until the flow reaches the sheet; ticked in every still frame. */
.tp-proc:is([data-flow-index="0"], [data-flow-index="1"]) .tp-cb { border-color: var(--ui-line); background: var(--ui-bg); color: transparent; }

.tp-modal-f { display: flex; justify-content: flex-end; gap: 6px; padding-top: 2px; }

/* --- 03.4 my applications ----------------------------------------------------- */

.tp-ok {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--tw-up) 35%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--tw-up) 11%, var(--ui-bg));
}
.tp-ok > span { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--tw-up); color: #fff; }
.page-wrap:not(.light-mode) .tp-ok > span { color: #0e0e15; }
.tp-ok .i { width: 11px; height: 11px; stroke-width: 2.8; }
.tp-ok b { display: block; font-size: 11px; }
.tp-ok small { display: block; font-size: 9.5px; color: var(--ui-ink-2); }
.tp-ok.is-now { animation: tp-pop .5s ease; }

.tp-tabs { display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: var(--ui-sunken); font-size: 9.5px; }
.tp-tabs span { padding: 3px 9px; border-radius: 5px; color: var(--ui-ink-3); }
.tp-tabs .is-on { background: var(--ui-bg); color: var(--ui-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 15, 40, .1); }

.tp-app { padding: 9px 10px; border: 1px solid var(--ui-line); border-radius: 9px; background: var(--ui-bg); }
.tp-app.is-main { border-color: color-mix(in srgb, var(--ui-accent) 35%, var(--ui-line)); }
.tp-app-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.tp-app-h b { display: block; font-size: 11px; }
.tp-app-h small { display: block; font-size: 9.5px; color: var(--ui-ink-3); }
.tp-app .tp-logo { width: 24px; height: 24px; border-radius: 7px; font-size: 8px; }

.tp-track { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 12px 0 2px; padding: 0; list-style: none; }
.tp-track li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: var(--ui-ink-3);
}
.tp-track li::before { content: ""; position: absolute; top: 5px; right: 50%; width: 100%; height: 2px; background: var(--ui-line); transition: background .4s ease; }
.tp-track li:first-child::before { display: none; }
.tp-track i { position: relative; z-index: 1; width: 12px; height: 12px; margin-bottom: 4px; border-radius: 50%; border: 2px solid var(--ui-line); background: var(--ui-bg); transition: background .4s ease, border-color .4s ease, box-shadow .4s ease; }
.tp-track small { font-size: 8.5px; font-weight: 400; color: var(--ui-ink-3); }
.tp-track .is-done { color: var(--ui-ink); }
.tp-track .is-done i { border-color: var(--tw-up); background: var(--tw-up); }
.tp-track .is-done::before,
.tp-track .is-cur::before { background: var(--tw-up); }
.tp-track .is-cur { color: var(--ui-accent); }
.tp-track .is-cur i { border-color: var(--ui-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 20%, transparent); }
/* Before the employer has opened it, only "Applied" is filled. */
.tp-proc:is([data-flow-index="0"], [data-flow-index="1"], [data-flow-index="2"]) .tp-track .tp-late { color: var(--ui-ink-3); }
.tp-proc:is([data-flow-index="0"], [data-flow-index="1"], [data-flow-index="2"]) .tp-track .tp-late i { border-color: var(--ui-line); background: var(--ui-bg); box-shadow: none; }
.tp-proc:is([data-flow-index="0"], [data-flow-index="1"], [data-flow-index="2"]) .tp-track .tp-late::before { background: var(--ui-line); }

/* --- 04.1 applicants ---------------------------------------------------------- */

.tp-pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.tp-pipe span {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid var(--ui-line);
  border-radius: 7px;
  background: var(--ui-bg);
  font-size: 9.5px;
  color: var(--ui-ink-3);
  white-space: nowrap;
}
.tp-pipe b { font-size: 13px; color: var(--ui-ink); font-variant-numeric: tabular-nums; }
.tp-pipe .is-on { border-color: var(--ui-accent); background: var(--tw-soft); color: var(--ui-accent); font-weight: 600; }
.tp-pipe .is-on b { color: var(--ui-accent); }

.tp-tbl { border: 1px solid var(--ui-line); border-radius: 9px; background: var(--ui-bg); overflow: hidden; }
.tp-tr {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, .6fr) minmax(0, .7fr) minmax(0, .8fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px solid var(--ui-line-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  transition: background .35s ease, box-shadow .35s ease;
}
.tp-tr.is-h { padding-block: 6px; border-top: 0; background: var(--ui-panel); font-size: 8.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ui-ink-3); }
.tp-tr .tw-t { gap: 7px; min-width: 0; font-weight: 600; white-space: nowrap; }
.tp-tr .tw-t small { display: block; font-size: 8.5px; font-weight: 400; color: var(--ui-ink-3); }
.tp-tr.is-pick { background: color-mix(in srgb, var(--ui-accent) 7%, transparent); box-shadow: inset 3px 0 0 var(--ui-accent); }
.tp-req-n { font-weight: 700; color: var(--tw-up); }
.tp-req-n.is-part { color: var(--tp-amber-ink); }
.tp-req-n.is-low { color: var(--tw-down); }

/* --- 04.2 the CV, employer side ---------------------------------------------- */

.tp-bar-row { display: flex; align-items: center; justify-content: space-between; }
.tp-pager { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; color: var(--ui-ink-3); }
.tp-pager .i { width: 10px; height: 10px; }

.tp-who-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ui.is-12t .tp-who-row .tw-av.is-lg { width: 42px; height: 42px; font-size: 13px; }
.tp-who-row b { font-size: 13.5px; margin-right: 6px; }
.tp-who-row .tw-tag { margin: 0; vertical-align: 1px; }
.tp-who-row small { display: block; margin-top: 3px; font-size: 9.5px; color: var(--ui-ink-3); }

.ui.is-12t .tp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }

.tp-habits { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.tp-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2px 8px;
  padding: 8px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-bg);
}
.tp-mini small { font-size: 8.5px; color: var(--ui-ink-3); white-space: nowrap; }
.tp-mini b { grid-column: 1; font-size: 12.5px; }
.tp-mini b em { font-style: normal; font-size: 9.5px; font-weight: 500; color: var(--ui-ink-3); }
.tp-mbars { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: flex-end; gap: 2px; height: 30px; }
.tp-mbars i { width: 5px; height: var(--h); border-radius: 2px 2px 1px 1px; background: color-mix(in srgb, var(--ui-accent) 35%, transparent); }
.tp-mbars i.is-on { background: var(--ui-accent); }
.tp-mbars.is-risk i { background: var(--tw-up); }
.tp-mbars.is-risk i.is-mid { background: var(--tw-amber); }
.tp-mbars.is-risk i.is-hi { background: var(--tw-down); }

.ui.is-12t .tp-acad { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--ui-ink-2); }
.tp-acad .i { width: 11px; height: 11px; color: var(--ui-accent); }
.tp-acad b { font-weight: 600; color: var(--tp-amber-ink); }

.tp-acts { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--ui-line); }
.tp-acts .tw-btn.is-primary { margin-left: auto; }
.tp-sw { display: inline-grid; }
.tp-sw > span { grid-area: 1 / 1; transition: opacity .3s ease; }
.tp-sw > span + span { opacity: 0; }
.ui.is-12t .tp-star.is-on { border-color: var(--tw-amber); background: color-mix(in srgb, var(--tw-amber) 12%, transparent); color: var(--tp-amber-ink); }
.tp-star.is-on .i { fill: currentColor; }
.tp-star.is-on .tp-sw > span:first-child { opacity: 0; }
.tp-star.is-on .tp-sw > span + span { opacity: 1; }

/* --- 04.3 compare ------------------------------------------------------------- */

.tp-cmp { border: 1px solid var(--ui-line); border-radius: 9px; background: var(--ui-bg); overflow: hidden; }
.tp-cr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-top: 1px solid var(--ui-line-soft);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tp-cr.is-h { padding-block: 8px; border-top: 0; background: var(--ui-panel); }
.tp-cr.is-h > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tp-cr small { font-size: 9.5px; font-weight: 500; color: var(--ui-ink-3); }
.tp-cr > span.is-win { display: inline-flex; align-items: center; gap: 5px; color: var(--tw-up); }
.tp-cr > span.is-win::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tp-memo { display: flex; align-items: flex-start; gap: 9px; margin-top: auto; padding: 10px 12px; border-radius: 9px; background: var(--tw-lav); }
.tp-memo small { display: block; margin-bottom: 3px; font-size: 9px; font-weight: 600; color: var(--ui-ink-2); }
.ui.is-12t .tp-memo p { font-size: 10.5px; line-height: 1.45; color: var(--ui-ink); }
.tp-memo.is-now { animation: tp-pop .5s ease; }

/* --- 04.4 next step ----------------------------------------------------------- */

.tp-opts { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.tp-opts li {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: var(--ui-bg);
}
.tp-opts b { display: block; font-size: 11px; }
.tp-opts small { display: block; font-size: 9px; color: var(--ui-ink-3); }
.tp-radio { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ui-line); background: var(--ui-bg); }
.tp-opts .is-sel { border-color: var(--ui-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 10%, transparent); }
.tp-opts .is-sel .tp-radio { border: 4px solid var(--ui-accent); }
.tp-opts .is-rej .tp-ico { background: color-mix(in srgb, var(--tw-down) 12%, transparent); color: var(--tw-down); }

.tp-msg { padding: 8px 10px; border: 1px solid var(--ui-line); border-radius: 8px; background: var(--ui-bg); font-size: 10px; line-height: 1.45; color: var(--ui-ink-2); }
.tp-msg small { display: block; margin-bottom: 2px; font-size: 8.5px; color: var(--ui-ink-3); }

.tw-toast.tp-toast { right: 14px; bottom: 56px; }

/* --- small screens ------------------------------------------------------------ */

@media screen and (max-width: 991px) {
  .tp-steps { gap: 22px 14px; }
  .tp-links { gap: 10px; }
}

@media screen and (max-width: 767px) {
  .ui.tp-ui { padding: 12px 10px; }
  .tp-head { margin-bottom: 14px; }
  .tp-now { margin-left: 0; width: 100%; }
  .tp-now > span { text-align: left; }
  .tp-steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tp-win { min-height: 0; }
  .tp-nav { gap: 10px; padding: 8px 12px; }
  .tp-proc.is-emp .tp-links > span:not(.is-on) { display: none; }
  .tp-body { padding: 11px 12px 12px; }
  .tp-chips span:last-child { display: none; }
  .tp-tr { grid-template-columns: minmax(0, 1.9fr) minmax(0, .6fr) minmax(0, .7fr) minmax(0, 1.1fr); }
  .tp-tr > span:nth-child(4) { display: none; }
  .tp-body.tp-scrim { padding: 12px; }
}

@media screen and (max-width: 479px) {
  .tp-proc:not(.is-emp) .tp-links > span:first-child { display: none; }
  .tp-track li { font-size: 8.5px; }
  .tp-track small { font-size: 8px; }
  .tp-acts .tw-btn:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-ok.is-now,
  .tp-memo.is-now { animation: none; }
}

/* --- fillers that are real content: list footers, tie-ins ------------------- */

.tp-pipe { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tp-pipe span { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; }

.tp-most { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.tp-most small { margin-right: 4px; font-size: 9px; color: var(--ui-ink-3); }
.tp-most span { padding: 2px 8px; border-radius: 99px; background: var(--ui-sunken); font-size: 9.5px; font-weight: 600; color: var(--ui-ink-2); }

.ui.is-12t .tw-next.tp-prep { margin-top: auto; }
.tp-foot .tw-btn { padding: 6px 10px; font-size: 10px; }
.tp-foot .tw-btn:not(.is-primary) .i { order: 0; }

.tp-when { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: tp-when; }
.tp-when li { position: relative; padding: 0 0 0 18px; font-size: 9.5px; line-height: 1.35; color: var(--ui-ink-3); counter-increment: tp-when; }
.tp-when li::before { content: counter(tp-when); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: var(--tw-soft); color: var(--ui-accent); font-size: 8px; font-weight: 700; }
.tp-when b { display: block; font-size: 10.5px; color: var(--ui-ink); }
.tp-note.tp-quote { background: var(--ui-bg); border-left: 3px solid var(--ui-accent); }

/* ==========================================================================
   01 · Trade. A chart, an order ticket and the portfolio it lands in. The
   flow buys: the button presses, the Apple row joins the list, the toast
   says it is logged to the CV. Still frames show the row already there.
   ========================================================================== */

.tr-bal { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-size: 11.5px; font-weight: 700; color: var(--ui-ink); white-space: nowrap; }
.tr-bal small { font-size: 8.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ui-ink-3); }

.tr-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 10px; }
.tr-port { grid-column: 1 / -1; }

.tr-chart { display: flex; flex-direction: column; gap: 8px; }
.tr-ins { display: flex; align-items: center; gap: 9px; }
.tr-ins .tw-logo { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.tr-ins b, .tr-px b { display: block; font-size: 13px; font-weight: 700; }
.tr-ins small, .tr-px small { display: block; font-size: 9.5px; color: var(--ui-ink-3); }
.tr-px { margin-left: auto; text-align: right; }
.ui.is-12t .tr-px small.is-up { color: var(--tw-up); }
.tr-range { display: flex; gap: 4px; }
.tr-range span { padding: 2px 8px; border-radius: 5px; font-size: 9.5px; color: var(--ui-ink-3); }
.tr-range .is-on { background: var(--tw-soft); color: var(--ui-accent); font-weight: 700; }
.ui.is-12t .tr-svg { display: block; width: 100%; height: 118px; }
.tr-area { fill: color-mix(in srgb, var(--tw-up) 12%, transparent); }
.tr-line { fill: none; stroke: var(--tw-up); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tr-dot { fill: var(--tw-up); }

.tr-ticket { display: flex; flex-direction: column; gap: 10px; }
.tr-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 8px; background: var(--ui-sunken); }
.tr-seg span { padding: 6px 0; border-radius: 6px; text-align: center; font-size: 11px; font-weight: 600; color: var(--ui-ink-3); }
.tr-seg .is-on { background: var(--tw-up); color: #fff; }
.tr-f { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.tr-f div { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; }
.tr-f dt { color: var(--ui-ink-3); }
.tr-f dd { margin: 0; font-weight: 600; color: var(--ui-ink); }
.tr-f dd.tr-in { min-width: 48px; padding: 2px 8px; border: 1px solid var(--ui-accent); border-radius: 6px; text-align: right; }
.tr-buy { margin-top: auto; padding: 9px 12px; font-size: 11.5px; }
.ui.is-12t .tr-fine { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--ui-ink-3); }
.tr-fine .i { width: 10px; height: 10px; }

.tr-port-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-port-h .tw-tabs { margin: 0; }
.tr-port-h .tw-tabs span:last-child { color: var(--ui-accent); }
.tr-port-v { text-align: right; }
.tr-port-v b { display: block; font-size: 14px; font-weight: 700; }
.tr-port-v small { display: block; font-size: 9.5px; }
.tr-rows { margin-top: 8px; }
.tr-row { display: grid; grid-template-columns: 24px minmax(0, 2fr) minmax(0, .6fr) minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--ui-line); font-size: 10.5px; }
.tr-row > span:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.tr-row b { display: block; font-size: 11px; }
.tr-row small { display: block; font-size: 9px; color: var(--ui-ink-3); }
.tr-row.is-h { border-top: 0; padding: 0 0 4px; font-size: 9px; color: var(--ui-ink-3); }
.tr-row[data-at] { margin: 0 -8px; padding: 6px 8px; border-radius: 7px; background: color-mix(in srgb, var(--tw-up) 8%, transparent); }
.tw-trade[data-flow-index] .tr-row[data-at] { max-height: 60px; overflow: hidden; transition: opacity .45s ease, max-height .45s ease, padding .45s ease; }
.tw-trade[data-flow-index] .tr-row[data-at]:not(.is-on) { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-top-color: transparent; }

/* --- 04 · the pattern quiz chart ------------------------------------------ */

.ui.is-12t .tw-qchart { display: block; width: 100%; height: 84px; margin: -2px 0 12px; padding: 4px 6px; box-sizing: border-box; border: 1px solid var(--ui-line); border-radius: 8px; background: var(--ui-bg); }
.tw-qchart line { stroke: var(--ui-ink-3); stroke-width: 1; }
.tw-qchart .c-neck { stroke: var(--ui-accent); stroke-dasharray: 3 3; opacity: .6; }
.tw-qchart .c-up { fill: var(--tw-up); }
.tw-qchart .c-dn { fill: var(--tw-down); }

.tw-mods ul { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tw-mods li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 62px; align-items: center; gap: 10px; font-size: 10.5px; }
.tw-mods em { font-style: normal; font-size: 9.5px; text-align: right; color: var(--ui-ink-3); }
.tw-mbar { height: 5px; border-radius: 99px; background: var(--ui-sunken); overflow: hidden; }
.tw-mbar i { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--ui-accent); }

/* --- 05 · prize tags on the board ------------------------------------------ */

.tp-tags .is-prize,
.tn-tags .is-prize { background: color-mix(in srgb, var(--tw-amber) 18%, transparent); color: color-mix(in srgb, var(--tw-amber) 55%, var(--ui-ink)); font-weight: 600; }

/* ==========================================================================
   06 · Create a contest. The form on the left, what it produces on the
   right. The flow weighs the KPIs, sets the prize, then publishes.
   ========================================================================== */

.tn-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.tn-form { display: flex; flex-direction: column; gap: 12px; }
.tn-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tn-h b { font-size: 14px; font-weight: 700; }
.tn-steps { display: flex; gap: 4px; }
.tn-steps span { padding: 3px 8px; border-radius: 99px; background: var(--ui-sunken); font-size: 9px; color: var(--ui-ink-3); }
.tn-steps .is-done { color: var(--tw-up); }
.tn-steps .is-on { background: var(--tw-soft); color: var(--ui-accent); font-weight: 700; }

.tn-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tn-fields label { display: flex; flex-direction: column; gap: 3px; margin: 0; font-weight: 400; }
.tn-fields .is-wide { grid-column: 1 / -1; }
.tn-fields small, .tn-sec > small, .tn-k { font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ui-ink-3); }
.tn-fields label > span { display: flex; align-items: center; justify-content: space-between; padding: 6px 9px; border: 1px solid var(--ui-line); border-radius: 7px; background: var(--ui-bg); font-size: 10.5px; font-weight: 600; color: var(--ui-ink); }
.tn-fields .i { width: 9px; height: 9px; transform: rotate(90deg); color: var(--ui-ink-3); }

.tn-sec { display: flex; flex-direction: column; gap: 6px; }
.tn-reqs { display: flex; flex-wrap: wrap; gap: 5px; }
.tn-req { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; background: var(--tw-soft); color: var(--ui-accent); font-size: 10px; font-weight: 600; }
.tn-req .i { width: 10px; height: 10px; stroke-width: 2.6; }

.tn-kpi { display: grid; grid-template-columns: 96px minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-size: 10.5px; }
.tn-kpi b { text-align: right; font-variant-numeric: tabular-nums; }
.tn-w { height: 6px; border-radius: 99px; background: var(--ui-sunken); overflow: hidden; }
.tn-w i { display: block; height: 100%; width: calc(var(--w) * 2.2); max-width: 100%; border-radius: inherit; background: var(--ui-accent); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.tw-new[data-flow-index] .tn-kpis:not(.is-on) .tn-w i { width: 4%; }

.tn-pz { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tn-pz span { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border: 1px solid var(--ui-line); border-radius: 8px; background: var(--ui-bg); font-size: 9.5px; color: var(--ui-ink-3); transition: border-color .4s ease, background .4s ease; }
.tn-pz b { font-size: 12.5px; color: var(--ui-ink); }
.tn-pz .is-job .i { width: 12px; height: 12px; color: var(--ui-accent); }
.tn-prize.is-on .tn-pz span { border-color: color-mix(in srgb, var(--tw-amber) 55%, var(--ui-line)); background: color-mix(in srgb, var(--tw-amber) 8%, var(--ui-bg)); }

.tn-side { display: flex; flex-direction: column; gap: 10px; }
.tn-k { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.tn-k .i { width: 11px; height: 11px; }
.tn-card { display: flex; align-items: center; gap: 9px; }
.tn-card b { display: block; font-size: 12px; }
.tn-card small { display: block; font-size: 9.5px; color: var(--ui-ink-3); }
.tn-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.tn-tags span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 5px; background: var(--ui-sunken); font-size: 9px; color: var(--ui-ink-2); }
.tn-tags .i { width: 9px; height: 9px; }
.tn-reach b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.tn-reach em { display: block; font-style: normal; font-size: 9.5px; color: var(--ui-ink-3); }
.tn-bar { display: block; height: 6px; margin: 6px 0 5px; border-radius: 99px; background: var(--ui-sunken); overflow: hidden; }
.tn-bar i { display: block; width: 62%; height: 100%; border-radius: inherit; background: var(--tw-up); }
.tn-time ol { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.tn-time li { position: relative; padding: 0 0 9px 16px; font-size: 9.5px; color: var(--ui-ink-3); }
.tn-time li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ui-accent); box-sizing: border-box; }
.tn-time li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 13px; bottom: 1px; width: 1px; background: var(--ui-line); }
.tn-time li:last-child { padding-bottom: 0; }
.tn-time b { display: block; font-size: 10.5px; color: var(--ui-ink); }
.tn-pub { margin-top: auto; padding: 10px 12px; font-size: 11.5px; }

@media screen and (max-width: 767px) {
  .tr-grid, .tn-grid { grid-template-columns: minmax(0, 1fr); }
  .tr-bal { display: none; }
  .tr-row { grid-template-columns: 24px minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, .8fr); }
  .tr-row > span:nth-child(3) { display: none; }
  .tr-port-h { flex-wrap: wrap; }
  .tn-pz { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-new .tw-links > span:not(.is-on) { display: none; }
}
