/* courts: the site-v2 public-sector page (jhana.ai/public-sector), same components, drawings and text,
   restyled to v3: black/white/grey palette, Helvetica on the v3 size tokens, the v3 .wrap frame and section spacing.
   Everything is scoped under main.ps so the v3 header and footer are untouched. */

/* v2 colour roles, remapped to the v3 palette */
main.ps {
  --paper: #fff;      /* v2 cream page / text on dark */
  --ink: #111;        /* v2 navy ink */
  --blue: #111;       /* v2 accent blue, on light grounds */
  --line: #ddd;       /* v2 hairline */
  --muted: #555;      /* v2 muted text */
  --note: #777;       /* v2 notes, captions */
  display: block;
}
main.ps :is(h1, h2, h3, h4) { margin: 0; font-weight: bold; text-wrap: balance; }
main.ps section { padding: 120px 0; }
main.ps img { max-width: 100%; display: block; }
main.ps .num { font-variant-numeric: tabular-nums; }
main.ps :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
main.ps .label { font-size: var(--small); font-weight: bold; color: var(--note); }

/* v2 square button, kept square */
main.ps .pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; font-size: var(--body); font-weight: bold; transition: background 0.25s, color 0.25s; }
main.ps .pill .ar { display: inline-block; transition: transform 0.3s; }
main.ps .pill:hover { text-shadow: none; }
main.ps .pill:hover .ar { transform: translateX(4px); }
main.ps .pill.solid { background: var(--ink); color: #fff; }
main.ps .pill.solid:hover { background: #555; }

/* hero: dark, copy left, photo right, four numbers under a rule */
main.ps section.ps-hero { padding: 160px 0 120px; background: #111; color: #fff; }
main.ps .ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
main.ps .ps-hero h1 { font-size: var(--display); line-height: 1.02; letter-spacing: -4px; }
main.ps .ps-hero .lede { margin-top: 40px; font-size: var(--lead); line-height: 1.25; letter-spacing: -0.5px; color: #b3b3b3; text-wrap: balance; }
main.ps .ps-hero .ctas { display: flex; gap: 12px; margin-top: 48px; }
main.ps .ps-hero .pill.solid { background: #fff; color: #111; }
main.ps .ps-hero .chip.solid { border-color: #fff; background: #fff; color: #111; }
main.ps .ps-hero .pill.solid:hover { background: #b3b3b3; }
main.ps .ps-photo { margin: 0; }
main.ps .ps-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1); }
main.ps .ps-photo figcaption { margin-top: 12px; font-size: var(--small); color: var(--muted); }
main.ps .ps-hero .ps-photo figcaption { color: #b3b3b3; }
main.ps .console { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 18px 72px; margin: 96px 0 0; padding-top: 32px; border-top: 1px solid #333; }
main.ps .console span { display: flex; flex-direction: column; gap: 8px; font-size: var(--small); color: #b3b3b3; }
main.ps .console b { font-size: var(--head); font-weight: bold; line-height: 1.1; letter-spacing: -1.5px; color: #fff; }

/* Humanly Impossible: three constraint columns, drawn */
main.ps section.court-impossible { background: #fff; border-top: 1px solid var(--line); }
main.ps .court-component-heading { text-align: center; margin-bottom: 60px; }
main.ps .court-component-heading h2 { font-size: var(--title); line-height: 1.04; letter-spacing: -2.5px; }
main.ps .court-component-heading > p { margin-top: 24px; font-size: var(--lead); line-height: 1.25; letter-spacing: -0.5px; color: var(--muted); }
main.ps .court-component-heading strong { font-weight: bold; color: var(--ink); }
main.ps .court-constraints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
main.ps .court-constraint { text-align: center; padding: 20px 28px 29px; min-width: 0; }
main.ps .court-constraint + .court-constraint { border-left: 1px solid var(--line); }
main.ps .court-constraint h3 { display: inline-block; padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-size: var(--lead); line-height: 1.2; letter-spacing: -0.5px; color: var(--ink); }
main.ps .court-stacks { display: flex; justify-content: center; align-items: end; gap: 28px; min-height: 218px; margin-top: 39px; }
main.ps .court-stacks > div { display: flex; flex-direction: column; align-items: center; }
main.ps .court-stacks svg { display: block; width: 75px; height: 103px; margin-bottom: 14px; overflow: visible; color: var(--ink); }
main.ps .court-stacks > div:nth-child(2) svg { width: 91px; height: 130px; }
main.ps .court-stacks strong { font-size: var(--body); font-weight: bold; line-height: 1.35; }
main.ps .court-stacks span { margin-top: 4px; font-size: var(--small); line-height: 1.35; color: var(--muted); white-space: nowrap; }
main.ps .court-speedometer { display: block; width: 160px; height: 110px; margin: 43px auto 26px; overflow: visible; color: var(--ink); }
main.ps .court-constraint > p, main.ps .court-time-bars p { font-size: var(--small); line-height: 1.35; color: var(--muted); }
main.ps .court-constraint p strong { display: block; font-size: var(--body); line-height: 1.35; font-weight: bold; color: var(--ink); }
main.ps .court-constraint .court-review-time { margin-top: 23px; }
main.ps .court-time-bars { display: flex; flex-direction: column; gap: 39px; margin-top: 46px; text-align: right; }
main.ps .court-hours-track { display: block; height: 16px; margin-top: 15px; background: var(--line); }
main.ps .court-hours-track > span { display: block; height: 100%; background: var(--ink); }
main.ps .court-impossible-close { margin-top: 60px; text-align: center; font-size: var(--lead); line-height: 1.25; letter-spacing: -0.5px; color: var(--ink); }

/* Registry → Judge → Public: three boxed acts of three cards, arrows between */
main.ps section.court-acts { background: #111; color: #fff; }
main.ps .court-acts .court-component-heading { margin-bottom: 52px; }
main.ps .court-acts .court-component-heading h2 span { font-weight: normal; color: #b3b3b3; }
main.ps .court-act { position: relative; margin-top: 42px; padding: 34px 25px 26px; border: 1px solid #444; }
main.ps .court-act > h3 { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); padding: 7px 19px; border: 1px solid #555; background: #111; font-size: var(--small); line-height: 1.35; letter-spacing: 0; white-space: nowrap; }
main.ps .court-act-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin: 0; padding: 0; list-style: none; }
main.ps .court-act-card { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 205px; padding: 28px 18px 23px; border: 1px solid #777; text-align: center; }
main.ps .court-card-icon { display: block; flex: 0 0 auto; width: 35px; height: 35px; margin-bottom: 20px; fill: currentColor; color: #fff; }
main.ps .court-act-card h4 { font-size: var(--body); line-height: 1.2; }
main.ps .court-act-card p { margin-top: 12px; font-size: var(--small); line-height: 1.35; color: #b3b3b3; }
main.ps .court-act-card:not(:last-child)::after { content: "→"; position: absolute; right: -36px; top: 50%; width: 35px; transform: translateY(-50%); font-size: var(--body); line-height: 1; text-align: center; color: #fff; }
main.ps .court-act--judge .court-act-card:nth-child(1) { grid-area: 1 / 3; }
main.ps .court-act--judge .court-act-card:nth-child(2) { grid-area: 1 / 2; }
main.ps .court-act--judge .court-act-card:nth-child(3) { grid-area: 1 / 1; }
main.ps .court-act--judge .court-act-card:not(:last-child)::after { content: "←"; right: auto; left: -36px; }
main.ps .court-act:not(:last-child)::after { content: "↓"; position: absolute; bottom: -34px; right: calc(16.6667% + 5px); font-size: var(--body); line-height: 1; color: #fff; }
main.ps .court-act--judge::after { right: auto !important; left: calc(16.6667% + 5px); }
main.ps .court-channel-icons { display: flex; justify-content: center; gap: 5px; margin-top: 15px; }
main.ps .court-channel-icons > span { display: flex; justify-content: center; align-items: center; width: 24px; height: 24px; border: 1px solid #444; color: #b3b3b3; }
main.ps .court-channel-icon { width: 14px; height: 14px; fill: currentColor; }

/* section heads: title left, a short note right */
main.ps .sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 60px; }
main.ps .sec-head h2 { font-size: var(--title); line-height: 1.04; letter-spacing: -2.5px; }
main.ps .sec-head p { max-width: 330px; color: var(--muted); }

/* the court, end to end: seven bordered stage boxes joined by ink connectors; the active one fills ink.
   Below, a two-panel strip repeats the active stage (white, ruled) and its result (ink). Pattern from the rev/landing timeline. */
main.ps .pipe { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 20px; margin: 0; padding: 0; }
main.ps .pipe li { position: relative; display: flex; min-width: 0; list-style: none; }
main.ps .pipe li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -20px; width: 20px; border-top: 1px solid var(--ink); }
main.ps .pipe-stage { display: flex; flex-direction: column; width: 100%; min-height: 340px; padding: 18px 16px 18px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color 0.3s ease, color 0.3s ease; }
main.ps .pipe-stage .k { padding-bottom: 56px; font-size: var(--small); font-weight: bold; color: var(--note); transition: color 0.3s ease; }
main.ps .pipe-stage .t { font-size: var(--body); font-weight: bold; line-height: 1.2; }
main.ps .pipe-stage .d { flex: 1; margin-top: 8px; font-size: var(--small); line-height: 1.35; color: var(--muted); transition: color 0.3s ease; }
main.ps .pipe-stage .m { display: block; box-sizing: content-box; height: 2.5em; margin-top: 16px; padding-top: 12px; border-top: 1px solid transparent; font-size: var(--body); font-weight: bold; line-height: 1.2; transition: border-color 0.3s ease; }
main.ps .pipe-stage .m:not(:empty) { border-top-color: var(--line); }
main.ps .pipe-stage .m small { display: block; font-size: var(--small); font-weight: normal; color: var(--muted); transition: color 0.3s ease; }
main.ps .pipe-stage[aria-pressed="true"] { background: var(--ink); color: #fff; }
main.ps .pipe-stage[aria-pressed="true"] :is(.k, .d, .m small) { color: #b3b3b3; }
main.ps .pipe-stage[aria-pressed="true"] .m:not(:empty) { border-top-color: #444; }
main.ps .pipe-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
main.ps .pipe-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; }
main.ps .pipe-cmp > div { display: flex; flex-direction: column; gap: 16px; min-height: 240px; padding: 32px 40px 36px; transition: opacity 0.3s ease; }
main.ps .pipe-cmp.is-swap > div { opacity: 0; transition: none; }
main.ps .pipe-a { border: 1px solid var(--line); border-right: 0; background: #fff; }
main.ps .pipe-b { background: var(--ink); color: #fff; }
main.ps .pipe-cmp .pk { font-size: var(--small); color: var(--note); }
main.ps .pipe-b .pk { color: #b3b3b3; }
main.ps .pipe-cmp .pv { margin: 0; max-width: 22em; font-size: var(--lead); line-height: 1.25; letter-spacing: -0.5px; text-wrap: balance; }
main.ps .pipe-cmp .pv.is-big { font-size: var(--head); font-weight: bold; line-height: 1.06; letter-spacing: -1.5px; }
main.ps .pipe-cmp .pv small { display: block; margin-top: 8px; font-size: var(--body); font-weight: normal; letter-spacing: 0; color: #b3b3b3; }
/* the section's pointer: a small white dot in difference blend (ink on white, white on ink), a ring over a stage box */
main.ps .pipe-cursor { position: fixed; top: 0; left: 0; z-index: 50; width: 8px; height: 8px; margin: -4px 0 0 -4px; border: 1px solid #fff; border-radius: 999px; background: #fff; mix-blend-mode: difference; pointer-events: none; opacity: 0; transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, background-color 0.25s ease, opacity 0.2s ease; }
main.ps .pipe-cursor.is-on { opacity: 1; }
main.ps .pipe-cursor.is-ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; background: transparent; }
@media (hover: none), (pointer: coarse) { main.ps .pipe-cursor { display: none; } }

/* where it runs: one block holds the heading and the tabs. Without JS the four courts stack at two thirds width */
main.ps .courts .sec-head { margin-bottom: 40px; }
main.ps .courts-panels { display: grid; gap: 72px; max-width: calc((100% - 48px) * 2 / 3); }
/* with JS: court names on the left (a third), the active court on the right; courts crossfade in place */
main.ps .is-tabs .courts-stage { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
main.ps .is-tabs .courts-panels { gap: 0; max-width: none; }
main.ps .is-tabs .court { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
main.ps .is-tabs .court.is-on { visibility: visible; opacity: 1; transition: opacity 0.4s ease; }
main.ps .courts-tabs { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
main.ps .courts-tabs button { position: relative; display: block; padding: 20px 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: var(--body); line-height: 1.35; text-align: left; color: var(--note); cursor: pointer; transition: color 0.3s ease; }
main.ps .courts-tabs button:first-child { border-top-color: var(--ink); }
main.ps .courts-tabs button:hover, main.ps .courts-tabs button[aria-selected="true"] { color: var(--ink); }
main.ps .courts-tabs button[aria-selected="true"] .tab-name { font-weight: bold; }
/* the active tab opens to show the court's headline */
main.ps .tab-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
main.ps .tab-sub > span { overflow: hidden; font-size: var(--small); color: var(--muted); }
main.ps .courts-tabs button[aria-selected="true"] .tab-sub { grid-template-rows: 1fr; }
main.ps .courts-tabs button[aria-selected="true"] .tab-sub > span { padding-top: 6px; }
/* autoplay: a thin ink line fills along the active tab's rule */
main.ps .courts-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; }
main.ps .courts-tabs button.is-run::after { animation: courts-fill var(--courts-dur, 5000ms) linear forwards; }
@keyframes courts-fill { to { transform: scaleX(1); } }
main.ps .court { padding-top: 24px; border-top: 1px solid var(--ink); }
main.ps .court .label { color: var(--ink); }
main.ps .court h3 { margin-top: 12px; font-size: var(--lead); line-height: 1.2; letter-spacing: -0.5px; }
main.ps .court p { max-width: 34em; margin-top: 12px; color: var(--muted); }
main.ps .court .nums { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 24px; }
main.ps .court .nums b { display: block; font-size: var(--lead); line-height: 1.1; letter-spacing: -0.5px; }
main.ps .court .nums span { font-size: var(--small); color: var(--note); }
main.ps .court blockquote { max-width: 30em; margin: 24px 0 0; padding-left: 14px; border-left: 2px solid var(--ink); }
main.ps .court blockquote cite { display: block; margin-top: 6px; font-size: var(--small); font-style: normal; color: var(--note); }

/* built for institutions: dark, headline and photo left, the spec box right */
main.ps section.platform { background: #111; color: #fff; }
main.ps .plat-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 96px; align-items: start; }
main.ps .platform h2 { font-size: var(--title); line-height: 1.04; letter-spacing: -2.5px; }
main.ps .platform .ps-photo { margin-top: 48px; }
main.ps .platform .ps-photo figcaption { color: #b3b3b3; }
main.ps .spec { padding: 26px 26px 10px; border: 1px solid #333; }
main.ps .spec dl { margin: 14px 0 0; }
main.ps .spec dt { margin-top: 18px; font-size: var(--body); font-weight: bold; color: #fff; }
main.ps .spec dd { margin: 6px 0 0; padding-bottom: 16px; border-bottom: 1px solid #333; font-size: var(--small); color: #b3b3b3; }
main.ps .spec dd:last-child { border-bottom: 0; }

/* final call: v2 sets it apart in its own colour; in black and white it turns white between the two black blocks, under an ink rule */
main.ps section.final { background: #fff; color: var(--ink); border-top: 1px solid var(--ink); }
main.ps .final h2 { font-size: var(--display); line-height: 1.02; letter-spacing: -4px; }
main.ps .final .row { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-top: 60px; }
main.ps .final p { max-width: 32em; font-size: var(--lead); line-height: 1.25; letter-spacing: -0.5px; color: var(--muted); text-wrap: balance; }
main.ps .final .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
main.ps .final .pill.solid { padding: 11px 19px; border: 1px solid var(--ink); }
main.ps .final .pill.solid:hover { background: #fff; color: var(--ink); }
main.ps .copy { padding: 12px 18px; border: 1px solid #b3b3b3; font-size: var(--small); color: var(--ink); cursor: pointer; }
main.ps .copy:hover { border-color: var(--ink); }
main.ps .final .fine { margin-top: 36px; font-size: var(--small); letter-spacing: 0; color: var(--note); }

@media (prefers-reduced-motion: reduce) {
  main.ps * { transition: none !important; }
  main.ps .courts-tabs button::after { display: none; }
  main.ps .pipe-cursor { display: none; }
}
