/* Professional services industry page (EN/DE/ES).
   Product-shot mockups drawn in HTML/CSS: intake queue, matter card,
   drafting pane, time capture. Tokens come from styles.css. */

.psx { --psx-line: var(--border); --psx-sage: var(--accent-tone); --psx-wash: rgba(79, 106, 92, 0.07); }

.psx-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* Section titles: a step below the site default so long industry headlines hold two lines */
.psx .section__title { font-size: clamp(2.3rem, 4.8vw, 4.25rem); max-width: 20ch; }

/* ---------- Hero ---------- */
.psx-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); }
.psx-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.psx-hero .section__head { margin-bottom: 0; gap: 1.3rem; }
.psx-hero .section__title { font-size: clamp(2.3rem, 4.6vw, 4.1rem); max-width: 14ch; }
.psx-hero .section__sub { align-self: flex-start; }
.psx-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.4rem; }

/* ---------- App window (shared mockup frame) ---------- */
.psx-app {
  background: var(--surface);
  border: 1px solid var(--psx-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
}
.psx-app__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--psx-line);
  background: var(--bg-elev);
}
.psx-app__title { font-weight: 600; letter-spacing: -0.01em; }
.psx-app__title .psx-label { margin-left: 0.5rem; }
.psx-app__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--psx-line);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.psx-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}
.psx-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.14rem 0.5rem;
  border: 1px solid var(--psx-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  white-space: nowrap;
}
.psx-pill--sage { border-color: rgba(79, 106, 92, 0.35); color: var(--psx-sage); background: var(--psx-wash); }
.psx-pill--sage::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--psx-sage);
}
.psx-shot-note { margin-top: 0.7rem; text-align: right; }

/* ---------- Intake queue ---------- */
.psx-queue { list-style: none; margin: 0; padding: 0; }
.psx-msg {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.25rem 0.8rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--psx-line);
  position: relative;
}
.psx-msg:last-child { border-bottom: 0; }
.psx-msg.is-active { background: var(--psx-wash); }
.psx-msg.is-active::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--psx-sage);
}
.psx-avatar {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--psx-line);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
}
.psx-msg__from { font-weight: 600; letter-spacing: -0.005em; }
.psx-msg__subj { grid-column: 2 / 4; color: var(--text-muted); margin-top: -0.15rem; }
.psx-msg__time { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-soft); }
.psx-msg__tags { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }

/* ---------- Client proof strip ---------- */
.psx-proof { padding: 0 0 clamp(3rem, 6vw, 4.5rem); }
.psx-proof__inner {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--psx-line);
}
.psx-proof__inner p { margin: 0; max-width: 62ch; color: var(--text-muted); }
.psx-proof__inner strong { color: var(--text); font-weight: 600; }
.psx-proof__inner a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Systems rows ---------- */
.psx-systems { padding: clamp(4rem, 8vw, 6.5rem) 0; background: var(--bg-elev); border-top: 1px solid var(--psx-line); border-bottom: 1px solid var(--psx-line); }
.psx-sys { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(3.5rem, 7vw, 6rem); }
.psx-sys__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.psx-sys__row:nth-child(even) .psx-sys__shot { order: 2; }
.psx-sys__copy h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin: 0.8rem 0 1rem; }
.psx-sys__copy p { color: var(--text-muted); margin: 0 0 1.2rem; max-width: 46ch; }
.psx-parts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--psx-line); }
.psx-parts li {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--psx-line);
  font-size: 0.95rem;
}
.psx-parts li::before { content: ""; width: 6px; height: 6px; border: 1px solid var(--text-soft); border-radius: 2px; flex: none; }
.psx-parts li:first-child::before { background: var(--psx-sage); border-color: var(--psx-sage); }

/* Matter card */
.psx-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.psx-fields div { padding: 0.75rem 1rem; border-bottom: 1px solid var(--psx-line); }
.psx-fields div:nth-child(odd) { border-right: 1px solid var(--psx-line); }
.psx-fields dt { margin-bottom: 0.15rem; }
.psx-fields dd { margin: 0; font-weight: 500; }
.psx-check { list-style: none; margin: 0; padding: 0.5rem 1rem 0.8rem; }
.psx-check__head { padding: 0.7rem 1rem 0; }
.psx-check li {
  display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  gap: 0.6rem; align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--psx-line);
}
.psx-check li:last-child { border-bottom: 0; }
.psx-tick {
  width: 1rem; height: 1rem; border-radius: 4px;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
}
.psx-tick svg { width: 0.7rem; height: 0.7rem; }
.psx-check .is-done .psx-tick { background: var(--text); border-color: var(--text); color: var(--surface); }
.psx-check .is-open .psx-tick { border-style: dashed; border-color: var(--psx-sage); }
.psx-check__state { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--text-soft); text-transform: uppercase; white-space: nowrap; }
.psx-check .is-open .psx-check__state { color: var(--psx-sage); }

/* Drafting pane */
.psx-draft { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.psx-doc { padding: 1.1rem 1.2rem; border-right: 1px solid var(--psx-line); }
.psx-doc h4 { margin: 0 0 0.8rem; font-size: 0.95rem; font-weight: 600; }
.psx-doc p { margin: 0 0 0.7rem; color: var(--text-muted); font-size: 0.82rem; }
.psx-doc b { color: var(--text); font-weight: 600; }
.psx-doc sup {
  font-family: var(--font-mono); font-size: 0.6rem;
  padding: 0 0.25rem; margin-left: 0.15rem;
  border: 1px solid var(--psx-line); border-radius: 4px; color: var(--text-muted);
  vertical-align: 0.25em;
}
.psx-doc .is-flagged { background: var(--psx-wash); box-shadow: inset 2px 0 0 var(--psx-sage); padding: 0.45rem 0.6rem; border-radius: 0 6px 6px 0; }
.psx-src { padding: 1rem; background: var(--bg-elev); display: flex; flex-direction: column; gap: 0.55rem; }
.psx-src__item { padding: 0.55rem 0.65rem; background: var(--surface); border: 1px solid var(--psx-line); border-radius: var(--radius-sm); font-size: 0.76rem; line-height: 1.35; }
.psx-src__item .psx-label { display: block; margin-bottom: 0.15rem; }
.psx-src__item.is-flag { border-color: rgba(79, 106, 92, 0.4); }
.psx-src__item.is-flag .psx-label { color: var(--psx-sage); }

/* Time capture */
.psx-time { width: 100%; border-collapse: collapse; }
.psx-time td { padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--psx-line); vertical-align: middle; }
.psx-time td:first-child { padding-left: 1rem; }
.psx-time td:last-child { padding-right: 1rem; text-align: right; }
.psx-time tr:last-child td { border-bottom: 0; }
.psx-time__at, .psx-time__h, .psx-time__m { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-soft); white-space: nowrap; }
.psx-time__h { color: var(--text); font-size: 0.78rem; }
.psx-src-tag { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; padding: 0.1rem 0.35rem; border: 1px solid var(--psx-line); border-radius: 4px; color: var(--text-muted); }
.psx-time tr.is-active td { background: var(--psx-wash); }
.psx-time tr.is-active td:first-child { box-shadow: inset 2px 0 0 var(--psx-sage); }
.psx-ok { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 6px; border: 1px solid var(--psx-line); color: var(--text-muted); }
.psx-ok svg { width: 0.7rem; height: 0.7rem; }
.psx-time tr.is-active .psx-ok { border-color: var(--psx-sage); color: var(--psx-sage); }

/* ---------- Day before/after ---------- */
.psx-day { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.psx-day__table { border-top: 1px solid var(--border-strong); }
.psx-day__row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 clamp(1.2rem, 3vw, 2.5rem);
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--psx-line);
}
.psx-day__row--head { padding: 0.8rem 0; }
.psx-day__at { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-soft); padding-top: 0.15rem; }
.psx-day__cell { margin: 0; color: var(--text-muted); max-width: 46ch; }
.psx-day__cell--new { color: var(--text); padding-left: clamp(1rem, 2.5vw, 1.8rem); border-left: 1px solid var(--psx-line); }
.psx-day__row--head .psx-day__cell--new { color: var(--psx-sage); }
.psx-day__row--head .psx-day__cell--new::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--psx-sage); margin-right: 0.5rem; vertical-align: 0.1em; }
.psx-day__cell .psx-label { display: none; }

/* ---------- Rules of the trade ---------- */
.psx-law { padding: clamp(4rem, 8vw, 6.5rem) 0; background: var(--bg-elev); border-top: 1px solid var(--psx-line); border-bottom: 1px solid var(--psx-line); }
.psx-law__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.psx-law__card {
  display: flex; flex-direction: column; gap: 0.9rem;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--psx-line);
  border-radius: var(--radius);
  position: relative;
}
.psx-law__card::before { content: ""; position: absolute; left: 1.4rem; top: -1px; width: 2.5rem; height: 2px; background: var(--psx-sage); }
.psx-law__card h3 { margin: 0; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.psx-law__card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.psx-law__card .psx-law__so { margin-top: auto; padding-top: 0.9rem; border-top: 1px dashed var(--psx-line); color: var(--text); }
.psx-law__src { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.psx-law__src:hover { color: var(--text); }

/* ---------- Stack strip ---------- */
.psx-stack { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.psx-stack__inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 5vw, 4rem); align-items: start; }
.psx-stack h2 { margin: 0.8rem 0 0.8rem; font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.psx-stack p { margin: 0; color: var(--text-muted); max-width: 40ch; }
.psx-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--psx-line); }
.psx-chips li { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 0; border-bottom: 1px solid var(--psx-line); font-size: 0.98rem; }
.psx-chips li:nth-child(odd) { padding-right: 1rem; }
.psx-chips svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--text-soft); }

/* ---------- Audit > Demo > Run ---------- */
.psx-steps { padding: clamp(4rem, 8vw, 6.5rem) 0; border-top: 1px solid var(--psx-line); }
.psx-steps__grid { list-style: none; margin: 0 0 2.2rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border-strong); }
.psx-step { padding: 1.5rem clamp(1rem, 2.5vw, 2rem) 1.5rem 0; display: flex; flex-direction: column; gap: 0.8rem; }
.psx-step + .psx-step { padding-left: clamp(1rem, 2.5vw, 2rem); border-left: 1px solid var(--psx-line); }
.psx-step h3 { margin: 0; font-size: 1.35rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.psx-step p { margin: 0; color: var(--text-muted); font-size: 0.97rem; }
.psx-step__idx { color: var(--text); }
.psx-step__idx b { font-weight: 500; color: var(--psx-sage); }
.psx-mini { margin-top: auto; border: 1px solid var(--psx-line); border-radius: var(--radius-sm); background: var(--surface); font-size: 0.82rem; }
.psx-step .psx-mini__head { margin: 0; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--psx-line); font-size: 0.66rem; color: var(--text-soft); }
.psx-mini ol, .psx-mini ul { list-style: none; margin: 0; padding: 0.3rem 0.75rem; }
.psx-mini li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--psx-line); }
.psx-mini li:last-child { border-bottom: 0; }
.psx-mini li span:last-child { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-soft); white-space: nowrap; }
.psx-mini li.is-on span:first-child { font-weight: 600; }
.psx-mini li.is-on span:last-child { color: var(--psx-sage); }
.psx-steps__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.psx-steps__foot p { margin: 0; color: var(--text-muted); max-width: 52ch; }

/* ---------- Motion: intake rows settle in once ---------- */
@media (prefers-reduced-motion: no-preference) {
  .psx-hero .psx-msg { animation: psx-in 0.7s var(--ease) both; }
  .psx-hero .psx-msg:nth-child(2) { animation-delay: 0.12s; }
  .psx-hero .psx-msg:nth-child(3) { animation-delay: 0.24s; }
  .psx-hero .psx-msg.is-active .psx-pill { animation: psx-in 0.5s var(--ease) both; animation-delay: 0.55s; }
  .psx-hero .psx-msg.is-active .psx-pill:nth-child(2) { animation-delay: 0.7s; }
  .psx-hero .psx-msg.is-active .psx-pill:nth-child(3) { animation-delay: 0.85s; }
}
@keyframes psx-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .psx-hero__grid, .psx-sys__row, .psx-stack__inner { grid-template-columns: minmax(0, 1fr); }
  .psx-sys__row:nth-child(even) .psx-sys__shot { order: 0; }
  .psx-law__grid { grid-template-columns: minmax(0, 1fr); }
  .psx-steps__grid { grid-template-columns: minmax(0, 1fr); }
  .psx-step, .psx-step + .psx-step { padding: 1.5rem 0; border-left: 0; }
  .psx-step + .psx-step { border-top: 1px solid var(--psx-line); }
}
@media (max-width: 640px) {
  .psx-app { font-size: 0.8rem; }
  .psx-draft { grid-template-columns: minmax(0, 1fr); }
  .psx-doc { border-right: 0; border-bottom: 1px solid var(--psx-line); }
  .psx-time__m, .psx-time td.psx-time__at { display: none; }
  .psx-time td:nth-child(2) { padding-left: 1rem; }
  .psx-proof__inner { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .psx-chips { grid-template-columns: minmax(0, 1fr); }
  .psx-day__row { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
  .psx-day__row--head { display: none; }
  .psx-day__cell .psx-label { display: block; margin-bottom: 0.2rem; }
  .psx-day__cell--new { padding-left: 0.9rem; border-left: 2px solid var(--psx-sage); }
  .psx-app__foot { flex-wrap: wrap; }
}
