/* Plotux job page: tokens from the ptx-id design system (light only, no shadows). */
:root {
  --ink: #181d27;
  --body2: #414651;
  --muted: #717680;
  --ground: #f1f2f4;
  --card: #ffffff;
  --line: #e9eaeb;
  --input-line: #d5d7da;
  --on-ink: #ffffff;
  --on-ink-muted: #a4a7ae;
  --ink-line: #2b3038;
  --ink-raised: #22262d;
  --accent: #fe6903;
  --accent-hover: #fa844c;
  --accent-soft: #fcf1ec;
  --accent-soft-line: #f8cdba;

  --sans: Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-caption: clamp(.75rem, .73rem + .1vw, .8125rem);
  --fs-small: .875rem;
  --fs-body: clamp(.9375rem, .92rem + .1vw, 1rem);
  --fs-h3: 1.1875rem;
  --fs-h2: clamp(1.375rem, 1.25rem + .6vw, 1.625rem);
  --fs-h1: clamp(2.125rem, 1.7rem + 2vw, 2.75rem);

  --r-chip: 6px;
  --r-ctl: 10px;
  --r-card: 16px;
  --r-pill: 999px;

  --ctl-h: 48px;
  --column: 560px;
  --gutter: clamp(16px, 4vw, 48px);
  --card-pad: clamp(20px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
}

.page {
  width: min(100% - 2 * var(--gutter), var(--column));
  margin: 0 auto;
  padding: clamp(20px, 5vh, 56px) 0 64px;
}

/* Header */
.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(28px, 6vh, 48px);
}

.wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  text-decoration: none;
}

.top__label {
  font-size: var(--fs-caption);
  color: var(--body2);
}

/* Type */
h1, h2, h3, p { margin: 0; }

h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.lead {
  color: var(--body2);
  margin-top: 12px;
}

.sub {
  color: var(--muted);
  font-size: var(--fs-small);
  margin-bottom: 20px;
}

/* Hero */
.hero { margin-bottom: 28px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.fact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--input-line);
  border-radius: var(--r-pill);
  background: var(--card);
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--ink);
}

.fact--live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--ctl-h);
  padding: 0 20px;
  border-radius: var(--r-ctl);
  border: 1px solid transparent;
  font: 600 var(--fs-body)/1.25 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}

.btn:active { transform: scale(.985); }

.btn:focus-visible,
.wordmark:focus-visible,
.link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.btn--primary { background: var(--accent); color: var(--ink); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--input-line);
}
.btn--secondary:hover { background: var(--ground); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--card-pad);
}

.card + .card { margin-top: 16px; }

.card p + p { margin-top: 12px; }

.card p { color: var(--body2); }

.card strong { color: var(--ink); font-weight: 600; }

/* Item lists: title, text, stack chips */
.items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.items > li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.items > li:first-child { border-top: 0; padding-top: 0; }
.items > li:last-child { padding-bottom: 0; }

.item__title {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.item__text {
  display: block;
  margin-top: 4px;
  color: var(--body2);
  font-size: var(--fs-small);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.stack li {
  padding: 2px 8px;
  border-radius: var(--r-chip);
  background: var(--ground);
  color: var(--body2);
  font-size: var(--fs-caption);
  font-weight: 500;
}

/* Grouped blocks inside a card (Backend / Infrastructure, Minimum / Ideal) */
.group + .group {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

h2 + .group { margin-top: 20px; }

.group h3 { margin-bottom: 14px; }

.tier {
  margin: 20px 0 12px;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--muted);
}

.group h3 + .tier { margin-top: 0; }

/* Collapsible sections (details/summary), collapsed by default */
.fold__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  align-items: center;
  list-style: none;
  cursor: pointer;
  border-radius: var(--r-ctl);
}

.fold__head::-webkit-details-marker { display: none; }

.fold__head h2 { grid-column: 1; margin-bottom: 4px; }

.fold__head .fold__sub { grid-column: 1; margin-bottom: 0; }

.fold__head:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

.chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--ground);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s;
}

.chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid var(--body2);
  border-bottom: 2px solid var(--body2);
  transform: rotate(45deg);
  transition: transform .15s;
}

.fold[open] .chevron::before { transform: rotate(-135deg); margin-top: 4px; }

.fold__head:hover .chevron { background: var(--line); }

.fold__body { margin-top: 20px; }

/* Requirements: compact rows, text left, tech tags right */
#requirements .group + .group { margin-top: 20px; padding-top: 20px; }

#requirements .group h3 { margin-bottom: 8px; }

#requirements .items > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
  /* Extra height of a tall tag list goes below the text, not between title and text. */
  grid-template-rows: auto 1fr;
  column-gap: 16px;
  align-items: start;
  padding: 8px 0;
}

#requirements .items > li:first-child { padding-top: 0; }
#requirements .items > li:last-child { padding-bottom: 0; }

#requirements .item__title,
#requirements .item__text { grid-column: 1; }

#requirements .item__title { font-size: var(--fs-small); }

#requirements .item__text { margin-top: 0; }

#requirements .item__title + .item__text { margin-top: 2px; }

#requirements .stack {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-content: flex-end;
  align-content: flex-start;
  margin-top: 0;
  gap: 4px;
}

@media (max-width: 520px) {
  #requirements .items > li { display: block; }
  #requirements .stack { justify-content: flex-start; margin-top: 6px; }
}

/* Requirement level tabs (segmented control; selected = ink, per the design system) */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 24px;
  background: var(--ground);
  border-radius: var(--r-ctl);
}

.tabs[hidden] { display: none; }

.tab {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--body2);
  font: 600 var(--fs-small)/1.25 var(--sans);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.tab:hover { color: var(--ink); background: var(--card); }

.tab[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* With tabs active, one tier shows at a time and its label is redundant. */
.js-tabs .tier-panel[hidden] { display: none; }
.js-tabs .tier-panel .tier { display: none; }

/* Concepts */
.concepts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.concepts li {
  padding: 8px 14px;
  border: 1px solid var(--input-line);
  border-radius: var(--r-ctl);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
}

/* Section anchor nav */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
}

.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--input-line);
  text-underline-offset: 3px;
  border-radius: 2px;
}

.link:hover { text-decoration-color: var(--ink); }

/* Dark action card: how to apply */
.apply {
  margin-top: 28px;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.apply h2 { color: var(--on-ink); }

.apply .sub { color: var(--on-ink-muted); }

.apply .btn:focus-visible,
.apply .link:focus-visible { outline-color: var(--accent); }

.apply .link { color: var(--on-ink); text-decoration-color: var(--on-ink-muted); }

.subject {
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-ctl);
  background: var(--ink-raised);
}

.subject__label {
  display: block;
  font-size: var(--fs-caption);
  color: var(--on-ink-muted);
  margin-bottom: 4px;
}

.subject__value {
  font-family: var(--mono);
  font-size: var(--fs-small);
  color: var(--on-ink);
}

.checklist {
  counter-reset: step;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.checklist li {
  counter-increment: step;
  position: relative;
  padding: 12px 0 12px 40px;
  border-top: 1px solid var(--ink-line);
  font-size: var(--fs-small);
  color: var(--on-ink-muted);
}

.checklist li:first-child { border-top: 0; padding-top: 0; }
.checklist li:first-child::before { top: 0; }

.checklist li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  color: var(--on-ink);
  font-size: var(--fs-caption);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checklist strong { color: var(--on-ink); font-weight: 600; }

.actions {
  display: grid;
  gap: 10px;
}

.btn--on-ink {
  background: var(--ink-raised);
  color: var(--on-ink);
  border-color: var(--ink-line);
}
.btn--on-ink:hover { border-color: var(--on-ink-muted); }

.btn[hidden] { display: none; }

.copy-status {
  min-height: 1.5em;
  font-size: var(--fs-caption);
  color: var(--on-ink-muted);
  text-align: center;
}

.copy-status:empty { display: none; }

/* Footer */
.footer {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--fs-caption);
  color: var(--body2);
}

.footer .link { color: var(--body2); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:active { transform: none; }
  html { scroll-behavior: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
