/* ==========================================================================
   JoPACC Data Portals: shared stylesheet (public + private)
   Built only from the JoPACC design system tokens (tokens.json + bundle.css).
   Sections: 1 tokens · 2 base · 3 DS components · 4 public chrome ·
             5 private app shell · 6 data components · 7 charts · 8 RTL · 9 responsive
   ========================================================================== */

/* 1 ─── tokens (verbatim from tokens.json) ───────────────────────────────── */
:root {
  --navy: #243746;
  --navy-text: var(--navy);
  --yellow: #ffb600;
  --yellow-tint: #ffe4a1;
  --gold: #ae841f;
  --gray: #6f7271;
  --silver: #9ea1a2;
  --ink: #000000;
  --white: #ffffff;
  --surface-alt: #f6f9fc;
  --surface-muted: #ececec;
  --border-input: #ced4da;
  --overlay-ink: rgba(0, 0, 0, 0.65);

  --font-display: Geomanist-Book, Geomanist, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-sans: Geomanist, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-arabic: Hacen-Algeria-Bd, Geomanist, Tahoma, sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --space-10: 10px; --space-15: 15px; --space-20: 20px; --space-30: 30px; --space-60: 60px;
  --radius-leaf-sm: 25px; --radius-leaf-md: 40px; --radius-leaf-lg: 100px;
  --radius-md: 16px; --radius-sm: 6px; --radius-round: 50%;
  --shadow-soft-lg: 0px 20px 60px 0px rgba(121, 121, 121, 0.05);
  --shadow-soft-md: 0px 20px 40px 0px rgba(121, 121, 121, 0.05);

  /* derived (color-mix of DS tokens only) */
  --hairline: color-mix(in srgb, var(--silver) 45%, var(--white));
  --navy-08: color-mix(in srgb, var(--navy) 8%, var(--white));
  --navy-15: color-mix(in srgb, var(--navy) 15%, var(--white));
  --container: 1290px;
  --sidebar: 248px;
}

/* 2 ─── base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 16px/24px var(--font-sans); -webkit-font-smoothing: antialiased; }
[dir="rtl"] body, [dir="rtl"] { font-family: var(--font-arabic); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: var(--font-arabic); }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 10px; top: 10px; z-index: 99; background: var(--white); padding: 10px 20px; }
.sr-only { position: absolute; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.t-display { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.4; }
.t-h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.4; }
.t-h3 { font-size: 23px; line-height: 32.2px; }
.t-lg { font-size: 18px; line-height: 27px; }
.t-sm { font-size: 15px; line-height: 22.5px; }
.t-xs { font-size: 13px; line-height: 18px; }
.muted { color: var(--gray); }
.num { font-variant-numeric: tabular-nums; }
.code { font-family: var(--font-code); font-size: 14px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-30); }
.section { padding-block: var(--space-60); }
.alt { background: var(--surface-alt); }
.row { display: flex; align-items: center; gap: var(--space-15); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-15); flex-wrap: wrap; }
.stack { display: grid; gap: var(--space-15); }
.grid { display: grid; gap: var(--space-30); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-15); margin-bottom: var(--space-30); flex-wrap: wrap; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 14px; height: 14px; }
.dir-ico { transition: transform .2s; }
[dir="rtl"] .dir-ico { transform: scaleX(-1); }

/* 3 ─── design-system components (bundle.css, extended) ─────────────────── */
.jp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 400 16px/24px inherit; font-family: inherit; padding: var(--space-10) var(--space-20); border: 1px solid var(--navy); border-radius: var(--radius-leaf-sm) 0; background: var(--navy); color: var(--white); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.jp-btn:hover { background: var(--white); color: var(--navy-text); }
.jp-btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.jp-btn--outline { background: var(--white); color: var(--navy-text); }
.jp-btn--outline:hover { background: var(--navy); color: var(--white); }
.jp-btn--ghost { background: transparent; border-color: transparent; color: var(--navy-text); }
.jp-btn--ghost:hover { background: var(--navy-08); color: var(--navy-text); }
.jp-btn--sm { padding: 5px 14px; font-size: 15px; border-radius: 16px 0; }
.jp-btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.jp-link { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.jp-link::before { content: "\203A"; color: var(--yellow); font-size: 20px; line-height: 1; }
[dir="rtl"] .jp-link::before { content: "\2039"; }
.jp-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.jp-card { background: var(--white); border-radius: var(--radius-leaf-md) 0; box-shadow: var(--shadow-soft-lg); overflow: hidden; color: var(--ink); }
.jp-card--line { box-shadow: none; border: 1px solid var(--hairline); }
.jp-card__title { margin: 0; padding: var(--space-15) var(--space-30); font: inherit; font-size: 23px; line-height: 32.2px; }
.jp-card__body { padding: 0 var(--space-30) var(--space-30); }
.jp-band { background: var(--navy); color: var(--white); border-radius: var(--radius-leaf-md) 0; padding: var(--space-60) var(--space-30); }
.panel { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.panel-pad { padding: var(--space-20); }

/* inputs */
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 15px; color: var(--ink); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 14px; font-weight: 300; background: var(--white); border: 1px solid var(--border-input); border-radius: var(--radius-sm); }
.input:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.search-xl { position: relative; }
.search-xl .input { min-height: 60px; padding-inline: 54px 150px; font-size: 18px; border-color: var(--navy); border-radius: var(--radius-leaf-sm) 0; }
.search-xl > .ico { position: absolute; inset-inline-start: 20px; top: 21px; color: var(--navy); }
.search-xl .jp-btn { position: absolute; inset-inline-end: 8px; top: 8px; }
.ac { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-sm); box-shadow: var(--shadow-soft-md); padding: 8px 0; display: none; text-align: start; }
.ac.open { display: block; }
.ac-group { padding: 6px 18px 2px; font-size: 13px; color: var(--gray); }
.ac a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 18px; text-decoration: none; }
.ac a:hover, .ac a.on { background: var(--surface-alt); }
.ac mark { background: var(--yellow-tint); color: inherit; }

/* pills, badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; font-size: 13px; line-height: 20px; border-radius: 12px 0; border: 1px solid var(--hairline); background: var(--white); color: var(--ink); white-space: nowrap; }
.pill .ico { width: 13px; height: 13px; }
.b-public { background: var(--navy-08); border-color: var(--navy-15); }
.b-priv { background: var(--yellow-tint); border-color: var(--yellow-tint); }
.b-restricted { background: var(--white); border-color: var(--ink); }
.b-org { background: var(--navy); color: var(--white); border-color: var(--navy); }
.b-shared { background: var(--surface-alt); border-color: var(--silver); }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--silver); }
.st-ok::before { background: var(--navy); }
.st-warn::before { background: var(--yellow); }
.st-err::before { background: var(--white); border: 2px solid var(--ink); width: 9px; height: 9px; border-radius: 1px; transform: rotate(45deg); }
.st-wait::before { background: transparent; border: 2px solid var(--gray); }
.tag { font-size: 14px; padding: 2px 10px; border-radius: var(--radius-sm); background: var(--surface-muted); text-decoration: none; }
.tag:hover { background: var(--yellow-tint); }
.ds-id { display: inline-block; font-family: var(--font-code); font-size: 0.72em; font-weight: 500; line-height: 1.5; letter-spacing: 0.02em; padding: 0 6px; margin-inline-end: 8px; border-radius: var(--radius-sm); background: var(--navy-08); color: var(--navy); vertical-align: 0.12em; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; font-size: 14px; background: var(--navy-08); border-radius: 14px 0; }
.chip button { border: 0; background: transparent; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.chip button:hover { background: var(--white); }
.sample-flag { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--gray); }
.sample-flag::before { content: ""; width: 10px; height: 10px; background: repeating-linear-gradient(45deg, var(--silver) 0 2px, transparent 2px 4px); }
/* list rows: one line per item in a widget or list (private home widgets, changelog) */
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding-block: 10px; border-bottom: 1px solid var(--hairline); font-size: 15px; text-decoration: none; }
.list-row:last-child { border-bottom: 0; }

/* tabs: active = short yellow bar */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; border: 0; background: none; padding: 12px 16px; font-size: 16px; color: var(--gray); white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; inset-inline-start: 16px; bottom: -1px; width: 28px; height: 3px; background: var(--yellow); }
.tabpanel[hidden] { display: none; }
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; border: 1px solid var(--border-input); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: var(--white); padding: 6px 12px; font-size: 14px; color: var(--gray); }
.seg button + button { border-inline-start: 1px solid var(--border-input); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

/* notices */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface-alt); border-inline-start: 3px solid var(--navy); font-size: 15px; }
.notice--warn { background: color-mix(in srgb, var(--yellow-tint) 55%, var(--white)); border-color: var(--yellow); }
.notice--lock { background: var(--white); border: 1px dashed var(--silver); border-inline-start: 3px solid var(--gold); }

/* 4 ─── public chrome ─────────────────────────────────────────────────────── */
.corp-strip { background: var(--surface-alt); font-size: 14px; }
.corp-strip .container { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 20px; }
.corp-strip a { text-decoration: none; color: var(--gray); }
.corp-strip a:hover { color: var(--ink); }
.pub-head { position: sticky; top: 0; z-index: 20; background: var(--white); box-shadow: var(--shadow-soft-lg); border-bottom: 1px solid var(--hairline); }
.pub-head .container { display: flex; align-items: center; gap: 30px; height: 78px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.brand img { height: 40px; width: auto; }
.brand .portal-name { max-width: 7em; padding-inline-start: 14px; border-inline-start: 1px solid var(--hairline); font-size: 15px; line-height: 18px; color: var(--gray); }
.pub-nav { display: flex; gap: 4px; flex: 1; }
.pub-nav a { position: relative; padding: 8px 12px; text-decoration: none; white-space: nowrap; }
.pub-nav a:hover { color: var(--navy-text); }
.pub-nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline-start: 12px; bottom: -2px; width: 24px; height: 3px; background: var(--yellow); }
.lang-btn { border: 0; background: none; padding: 8px 10px; border-radius: var(--radius-sm); display: inline-flex; gap: 6px; align-items: center; }
.lang-btn:hover { background: var(--surface-alt); }
.menu-btn { display: none; border: 1px solid var(--hairline); background: var(--white); width: 44px; height: 44px; border-radius: var(--radius-sm); place-items: center; }
.drawer { position: fixed; inset: 0; z-index: 60; background: var(--overlay-ink); display: none; }
.drawer.open { display: block; }
.drawer-panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(340px, 88vw); background: var(--white); padding: 20px; display: grid; align-content: start; gap: 4px; }
.drawer-panel a { padding: 12px 8px; text-decoration: none; border-bottom: 1px solid var(--hairline); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 15px; color: var(--gray); padding-block: 20px 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--silver); }

.pub-foot { background: var(--surface-alt); margin-top: var(--space-60); border-radius: 0 var(--radius-leaf-md) 0 0; }
.pub-foot .container { padding-block: var(--space-60) var(--space-30); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-30); }
.foot-grid h4 { font-size: 16px; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.foot-grid a { text-decoration: none; color: var(--gray); }
.foot-grid a:hover { color: var(--ink); }
.foot-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--hairline); margin-top: var(--space-30); padding-top: var(--space-20); font-size: 14px; color: var(--gray); }

/* 5 ─── private app shell ────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; background: var(--surface-alt); transition: grid-template-columns .2s; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--white); border-inline-end: 1px solid var(--hairline); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
.side .brand img { height: 34px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-col { flex: none; width: 32px; height: 32px; }
.side-col .ico { transform: scaleX(-1); transition: transform .2s; }             /* expanded: points to the sidebar edge */
[dir="rtl"] .side-col .ico { transform: none; }
.nav-tip { display: none; }
/* collapsed: 72 px icon rail (desktop only; the ≤1024 px drawer always opens expanded) */
@media (min-width: 1025px) {
  .app.side-rail { grid-template-columns: 72px minmax(0, 1fr); }
  .side-rail .side { padding: 18px 12px; overflow-x: hidden; align-items: stretch; z-index: 20; }
  .side-rail .side-head { flex-direction: column; }
  .side-rail .side .brand { display: none; }
  .side-rail .side-col .ico { transform: none; }
  [dir="rtl"] .side-rail .side-col .ico { transform: scaleX(-1); }
  .side-rail .env { justify-content: center; padding: 10px 0; font-size: 0; }
  .side-rail .env > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .side-rail .nav-group h5 { height: 1px; margin: 0 8px 6px; padding: 0; overflow: hidden; font-size: 0; background: var(--hairline); }
  .side-rail .nav-item { justify-content: center; padding: 10px 0; }
  .side-rail .nav-item .nav-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .side-rail .nav-item .count { position: absolute; top: 2px; inset-inline-end: 6px; margin: 0; min-width: 18px; padding: 0 4px; font-size: 11px; line-height: 16px; }
  .side-rail .nav-item[aria-current="page"]::before { inset-inline-start: -12px; }
  .side-rail .nav-tip { position: fixed; transform: translateY(-50%); z-index: 60; white-space: nowrap; padding: 4px 10px; border-radius: 8px 0; background: var(--navy); color: var(--white); font-size: 13px; line-height: 18px; pointer-events: none; }
  .side-rail .nav-item:hover .nav-tip, .side-rail .nav-item:focus-visible .nav-tip { display: block; }
  .side-rail .side-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) { .app, .side-col .ico { transition: none; } }
.env { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px 0; background: var(--navy); color: var(--white); font-size: 13px; line-height: 16px; }
.env::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); flex: none; }
.nav-group { display: grid; gap: 2px; }
.nav-group h5 { margin: 0 0 4px; padding-inline: 12px; font: 400 12px/16px inherit; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); }
[dir="rtl"] .nav-group h5 { letter-spacing: 0; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); text-decoration: none; font-size: 15px; }
.nav-item:hover { background: var(--surface-alt); }
.nav-item[aria-current="page"] { background: var(--navy-08); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: 0; top: 9px; bottom: 9px; width: 3px; background: var(--yellow); }
.nav-item .count { margin-inline-start: auto; font-size: 12px; min-width: 22px; text-align: center; padding: 0 6px; border-radius: 10px 0; background: var(--yellow); }
.side-foot { margin-top: auto; font-size: 13px; color: var(--gray); }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 16px; height: 64px; padding-inline: 28px; background: var(--white); border-bottom: 1px solid var(--hairline); }
.org { display: flex; align-items: center; gap: 10px; min-width: 0; }
.org-logo { width: 34px; height: 34px; border-radius: 10px 0; background: var(--surface-muted); display: grid; place-items: center; font-size: 13px; color: var(--gray); flex: none; }
.org b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-search { flex: 1; max-width: 460px; position: relative; }
.top-search .input { min-height: 40px; padding-inline-start: 40px; background: var(--surface-alt); border-color: transparent; }
.top-search .ico { position: absolute; inset-inline-start: 12px; top: 11px; color: var(--gray); }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: var(--radius-round); border: 0; background: transparent; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-alt); }
.icon-btn .dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--white); }
.avatar { width: 34px; height: 34px; border-radius: var(--radius-round); background: var(--yellow-tint); display: grid; place-items: center; font-size: 13px; flex: none; }
.role-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray); padding: 4px 4px 4px 10px; border: 1px dashed var(--silver); border-radius: var(--radius-sm); }
.role-switch select { border: 0; background: transparent; font-size: 14px; color: var(--ink); padding: 4px; }
.main { padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-content: start; min-width: 0; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; line-height: 42px; }
.asof { font-size: 14px; color: var(--gray); }
.side-toggle { display: none; }
.mob-head { display: none; }
.menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 40; width: 280px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-sm); box-shadow: var(--shadow-soft-md); padding: 8px; display: none; }
.menu.open { display: block; }
.menu a, .menu button.mi { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: var(--radius-sm); text-decoration: none; text-align: start; font-size: 15px; }
.menu a:hover, .menu button.mi:hover { background: var(--surface-alt); }

/* 6 ─── data components ──────────────────────────────────────────────────── */
.kpi { display: grid; gap: 6px; padding: 20px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.kpi-label { font-size: 14px; color: var(--gray); }
.kpi-value { font-size: 32px; line-height: 40px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-value small { font-size: 16px; color: var(--gray); margin-inline-start: 4px; }
.kpi-delta { font-size: 14px; display: inline-flex; gap: 4px; align-items: center; font-variant-numeric: tabular-nums; }
.kpi-delta.up::before { content: "\25B2"; font-size: 9px; color: var(--navy); }
.kpi-delta.down::before { content: "\25BC"; font-size: 9px; color: var(--gold); }
.spark { height: 36px; width: 100%; }

.tbl-wrap { position: relative; overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--white); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: start; font-weight: 400; font-size: 13px; color: var(--gray); background: var(--surface-alt); padding: 10px 14px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--surface-alt) 70%, var(--white)); }
.tbl tr.sel { background: var(--navy-08); }
.tbl .n { text-align: end; }
.tbl a { text-decoration: none; }
.tbl a:hover { text-decoration: underline; }

.ds-card { display: grid; gap: 12px; padding: 24px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-leaf-md) 0; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.ds-card:hover { border-color: var(--navy); box-shadow: var(--shadow-soft-lg); }
.ds-card h3 { font-size: 20px; line-height: 28px; }
.ds-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--gray); }
.ds-meta span { display: inline-flex; gap: 6px; align-items: center; }
.fmt { font-family: var(--font-code); font-size: 12px; padding: 1px 6px; border: 1px solid var(--hairline); border-radius: 4px; color: var(--gray); }

.facet { border-bottom: 1px solid var(--hairline); padding-block: 14px; }
.facet summary { list-style: none; display: flex; justify-content: space-between; cursor: pointer; font-size: 16px; }
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after { content: "+"; color: var(--gray); }
.facet[open] summary::after { content: "\2212"; }
.facet .opts { display: grid; gap: 8px; padding-top: 12px; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--navy); margin: 0; }
.chk .c { margin-inline-start: auto; font-size: 13px; color: var(--gray); }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; font-size: 15px; margin: 0; }
.dl dt { color: var(--gray); }
.dl dd { margin: 0; }
.steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 0; }
.steps li { flex: 1; position: relative; padding-top: 22px; font-size: 13px; color: var(--gray); }
.steps li::before { content: ""; position: absolute; top: 4px; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--silver); background: var(--white); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 9px; inset-inline: 12px 0; height: 2px; background: var(--hairline); }
.steps li:last-child::after { display: none; }
.steps li.done::before { background: var(--navy); border-color: var(--navy); }
.steps li.done::after { background: var(--navy); }
.steps li.now::before { border-color: var(--yellow); background: var(--yellow); }
.steps li b { display: block; font-weight: 400; color: var(--ink); font-size: 14px; }

.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%) translateY(20px); z-index: 90; background: var(--navy); color: var(--white); padding: 12px 20px; border-radius: 16px 0; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; display: flex; gap: 10px; align-items: center; }
[dir="rtl"] .toast { transform: translateX(50%) translateY(20px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
[dir="rtl"] .toast.show { transform: translateX(50%) translateY(0); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.toast.has-act.show { pointer-events: auto; }
.toast-act { background: none; border: 0; padding: 0 0 0 6px; color: var(--yellow); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
[dir="rtl"] .toast-act { padding: 0 6px 0 0; }

dialog.modal { border: 0; padding: 0; width: min(560px, 94vw); border-radius: var(--radius-leaf-md) 0; box-shadow: var(--shadow-soft-lg); }
dialog.modal::backdrop { background: var(--overlay-ink); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px 0; }
.modal-body { padding: 18px 28px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 28px 24px; }

.skel { background: linear-gradient(90deg, var(--surface-muted), var(--surface-alt), var(--surface-muted)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius-sm); }
@keyframes sk { to { background-position: -200% 0; } }

/* 7 ─── charts ───────────────────────────────────────────────────────────── */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: inherit; font-size: 12px; fill: var(--gray); }
.chart .grid-l { stroke: var(--hairline); stroke-width: 1; }
.chart .s1 { fill: var(--navy); stroke: var(--navy); }
.chart .s2 { fill: var(--yellow); stroke: var(--yellow); }
.chart .s3 { fill: var(--gold); stroke: var(--gold); }
.chart .s4 { fill: var(--silver); stroke: var(--silver); }
.chart .line { fill: none; stroke-width: 2.5; }
.chart .area { stroke: none; opacity: .12; }
.chart .bar:hover, .chart .tile:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--gray); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px 0; margin-inline-end: 6px; vertical-align: -1px; }
.chart-card { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.chart-card h3 { font-size: 18px; line-height: 26px; }
.chart-tools { display: flex; gap: 2px; }
.chart-note { font-size: 14px; color: var(--gray); border-inline-start: 2px solid var(--yellow); padding-inline-start: 12px; }
/* infographics (js/charts.js 3b): a plain-language sentence with its number, same tokens as the charts */
.ig { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ig[hidden] { display: none; }
.ig-say { margin: 0; font-size: 20px; line-height: 28px; color: var(--ink); }
.ig-say .ig-n { font-size: 1.35em; color: var(--navy); }
.ig-more { margin: 0; font-size: 14px; line-height: 21px; color: var(--gray); }
.ig-big-n { display: flex; align-items: center; gap: 14px; }
.ig-mk { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 16px 0; background: var(--yellow-tint); color: var(--navy); }
.ig-mk .ico { width: 28px; height: 28px; }
.ig-num { font-size: 64px; line-height: 1; letter-spacing: -.02em; color: var(--navy); }
.ig-unit { align-self: flex-end; padding-bottom: 6px; font-size: 16px; color: var(--gray); }
.ig-big .ig-say .ig-n { font-size: inherit; color: inherit; }
.ig-pic.is-wide { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 24px; }
.ig-txt { display: grid; gap: 8px; align-content: start; }
.ig-pict { display: block; width: 100%; height: auto; }
.ig-pict g { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ig-pict .on { stroke: var(--navy); }
.ig-pict .on > :first-child { fill: var(--yellow); }
.ig-pict .off { stroke: var(--silver); opacity: .45; }
.chart .ig-pin-g { pointer-events: none; }
.chart .ig-lead { stroke: var(--navy); stroke-width: 1; }
.chart .ig-dot { fill: var(--white); stroke: var(--navy); stroke-width: 2; }
.chart .ig-pin { fill: var(--yellow); stroke: var(--white); stroke-width: 1.5; }
.chart .ig-pin-t { fill: var(--ink); font-size: 11px; }
.ig-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; line-height: 20px; }
.ig-notes li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.ig-pin-n { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 11px; }
.ig-notes .sample-flag { font-size: 14px; color: var(--ink); font-weight: 400; }
.ig-bar { display: flex; height: 28px; overflow: hidden; border-radius: 14px 0; background: var(--navy); }
.ig-bar .a { min-width: 8px; background: var(--yellow); }
.ig-bar .b { flex: 1; }
.ig-bar-l { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--gray); }
.ig-bar-l span { display: grid; }
.ig-bar-l span:last-child { text-align: end; }
.ig-bar-l b { font-size: 28px; line-height: 34px; font-weight: 400; color: var(--navy); }
.tip { position: fixed; z-index: 95; pointer-events: none; background: var(--ink); color: var(--white); font-size: 13px; padding: 6px 10px; border-radius: 4px; opacity: 0; transition: opacity .1s; white-space: nowrap; }

/* 8 ─── RTL helpers ──────────────────────────────────────────────────────── */
[dir="rtl"] .num, [dir="rtl"] .code, [dir="rtl"] .fmt { unicode-bidi: isolate; }
[dir="rtl"] .eyebrow-ltr { direction: ltr; }

/* 9 ─── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .pub-nav a { padding-inline: 8px; font-size: 15px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .pub-nav, .pub-head .hide-md { display: none; }
  .menu-btn { display: grid; }
  .pub-head .container { justify-content: space-between; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50; width: 280px; transform: translateX(-100%); transition: transform .2s; }
  [dir="rtl"] .side { transform: translateX(100%); }
  .side.open { transform: none !important; box-shadow: var(--shadow-soft-lg); }
  .side-toggle { display: grid; }
  .side-col { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .topbar .top-search, .topbar .hide-sm { display: none; }
}
@media (max-width: 600px) {
  .container { padding-inline: var(--space-20); }
  .section { padding-block: 40px; }
  .g4 { grid-template-columns: minmax(0, 1fr); }
  .corp-strip { display: none; }
  .pub-head .container { height: 64px; }
  .brand img { height: 32px; }
  .brand .portal-name { display: none; }
  .search-xl .input { padding-inline-end: 20px; min-height: 54px; }
  .search-xl .jp-btn { display: none; }
  .main { padding: 18px; }
  .topbar { padding-inline: 14px; gap: 8px; }
  .role-switch span { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
}
.dir-ico-rev { transform: scaleX(-1); }
[dir="rtl"] .dir-ico-rev { transform: none; }
@media (max-width: 600px) { .org .t-xs { display: none; } .org b { max-width: 34vw; } }

/* ─── maker–checker: submission timeline, permission chips, switch ─── */
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl li { position: relative; display: grid; gap: 2px; padding: 0 0 16px 28px; }
[dir="rtl"] .tl li { padding: 0 28px 16px 0; }
.tl li::before { content: ""; position: absolute; top: 4px; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--silver); background: var(--white); z-index: 1; }
.tl li::after { content: ""; position: absolute; top: 18px; bottom: 0; inset-inline-start: 7px; width: 2px; background: var(--hairline); }
.tl li:last-child { padding-bottom: 0; } .tl li:last-child::after { display: none; }
.tl li b { font-weight: 400; font-size: 15px; }
.tl li.done::before { background: var(--navy); border-color: var(--navy); }
.tl li.done::after { background: var(--navy); }
.tl li.now::before, .tl li.warn::before { background: var(--yellow); border-color: var(--yellow); }
.tl li.bad::before { border-color: var(--ink); border-radius: 1px; transform: rotate(45deg) scale(.85); }
.tl li.todo b { color: var(--gray); }
.tl .cmt { margin-top: 4px; padding: 8px 12px; background: var(--white); border: 1px solid var(--hairline); border-radius: 10px 0; }
.perm { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; font-size: 13px; line-height: 20px; border-radius: 10px 0; background: var(--surface-muted); white-space: nowrap; }
.perm--rv { background: var(--navy); color: var(--white); }
.perm--ad { background: var(--yellow-tint); }
.you { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; font-size: 12px; line-height: 20px; border-radius: 10px 0; border: 1px dashed var(--gold); background: var(--white); white-space: nowrap; }
.switch { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.switch input { appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 13px; background: var(--silver); position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: inset-inline-start .15s; }
.switch input:checked { background: var(--navy); }
.switch input:checked::after { inset-inline-start: 21px; }
.switch input:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.switch input:disabled { opacity: .5; cursor: not-allowed; }

/* 10 ─── auth: sign in, sign up, reset (public + private) ───────────────────
   Only DS tokens. Errors use the DS "error" vocabulary already in .st-err
   (ink diamond) plus a gold field border, never a new red. */
.auth-main { padding-block: 48px 0; }
.auth-wrap { width: min(520px, calc(100% - 32px)); margin-inline: auto; display: grid; gap: 20px; }
.auth-wrap--wide { width: min(680px, calc(100% - 32px)); }
.auth-card { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-leaf-md) 0; box-shadow: var(--shadow-soft-lg); padding: 36px; display: grid; gap: 20px; min-width: 0; }
.auth-card h1 { font-size: clamp(26px, 3vw, 32px); line-height: 1.3; }
.auth-card form, .auth-view { display: grid; gap: 18px; min-width: 0; }
.auth-card [hidden] { display: none !important; }
[data-priv-only][hidden], [data-priv-lock][hidden], [data-dl-only][hidden], [data-dl-lock][hidden], [data-lock-card][hidden] { display: none !important; }   /* public access states */   /* .stack/.field set display:grid, which would beat [hidden] */
.auth-sub { color: var(--gray); margin-top: 6px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.auth-row a, .auth-link { color: var(--navy-text); text-underline-offset: 3px; }
.auth-btn { width: 100%; min-height: 48px; }
.auth-alt { text-align: center; font-size: 15px; color: var(--gray); display: grid; gap: 6px; }
.auth-alt a { color: var(--navy-text); text-underline-offset: 3px; }
.auth-icon { width: 56px; height: 56px; border-radius: var(--radius-leaf-sm) 0; background: var(--yellow-tint); display: grid; place-items: center; color: var(--navy); }
.auth-icon .ico { width: 26px; height: 26px; }
.auth-foot { border-top: 1px solid var(--hairline); padding-top: 16px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--gray); }
.req { color: var(--gray); font-size: 13px; margin-inline-start: 6px; }
.hint { font-size: 13px; color: var(--gray); }

/* field errors + summary */
.f-err { display: flex; gap: 8px; align-items: baseline; font-size: 14px; line-height: 20px; color: var(--ink); }
.f-err::before { content: ""; flex: none; width: 8px; height: 8px; border: 2px solid var(--ink); border-radius: 1px; transform: rotate(45deg) translateY(-1px); }
.f-err[hidden] { display: none; }
.has-err .input, .has-err .captcha, .has-err .drop { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.notice--err { background: color-mix(in srgb, var(--yellow-tint) 55%, var(--white)); border-color: var(--ink); }
.notice[hidden] { display: none; }
.notice ul { margin: 6px 0 0; padding-inline-start: 18px; }
.notice a:not(.jp-btn) { color: inherit; text-underline-offset: 3px; }

/* password: show/hide + live rules */
.pw { position: relative; }
.pw .input { padding-inline-end: 52px; }
.pw-eye { position: absolute; inset-inline-end: 4px; top: 4px; width: 36px; height: 36px; border: 0; background: none; border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--gray); }
.pw-eye:hover { background: var(--surface-alt); color: var(--ink); }
.pw-rules { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: 13px; line-height: 18px; color: var(--gray); }
.pw-rules li { display: flex; gap: 8px; align-items: flex-start; }
.pw-rules .tk { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--silver); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.pw-rules .tk .ico { width: 11px; height: 11px; stroke-width: 2.5; }
.pw-rules li.ok { color: var(--ink); }
.pw-rules li.ok .tk { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* CAPTCHA placeholder (vendor-neutral) */
.captcha { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--border-input); border-radius: var(--radius-sm); background: var(--surface-alt); }
.captcha .chk input { width: 22px; height: 22px; }
.captcha .cap-mark { display: grid; justify-items: end; text-align: end; font-size: 11px; line-height: 14px; color: var(--gray); }
.captcha .cap-mark .ico { width: 22px; height: 22px; color: var(--silver); }
.captcha.ok .cap-mark .ico { color: var(--navy); }
.captcha.busy .chk input { opacity: .3; }

/* choice cards, upload, toggles inside forms */
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.rcard { position: relative; cursor: pointer; }
.rcard input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rcard span { display: flex; gap: 10px; align-items: center; min-height: 56px; padding: 12px 14px; border: 1px solid var(--border-input); border-radius: 16px 0; background: var(--white); font-size: 15px; transition: border-color .15s, background .15s; }
.rcard span::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--silver); background: var(--white); }
.rcard:hover span { border-color: var(--navy); }
.rcard input:checked + span { border-color: var(--navy); background: var(--navy-08); box-shadow: inset 0 0 0 1px var(--navy); }
.rcard input:checked + span::before { border: 5px solid var(--navy); }
.rcard input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.has-err .rcard span { border-color: var(--gold); }
.drop { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 16px; border: 1px dashed var(--silver); border-radius: var(--radius-md); background: var(--surface-alt); }
.drop .grow { flex: 1; min-width: 160px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 12px; background: var(--white); border: 1px solid var(--hairline); border-radius: 12px 0; font-size: 14px; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-chip button { border: 0; background: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.file-chip button:hover { background: var(--surface-alt); }
.dom-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--navy-text); }
.dom-ok .ico { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--navy); color: var(--white); padding: 3px; stroke-width: 2.5; }
.counter { font-size: 13px; color: var(--gray); text-align: end; font-variant-numeric: tabular-nums; }
.badge-opt { display: inline-flex; padding: 0 8px; font-size: 12px; line-height: 20px; border-radius: 10px 0; background: var(--surface-muted); margin-inline-start: 6px; vertical-align: 1px; }
.badge-opt.req-on { background: var(--yellow-tint); }

/* signup: step count for phones, review summary */
.step-count { display: none; font-size: 14px; color: var(--gray); }
.step-count b { font-weight: 400; color: var(--ink); }
.sum { display: grid; gap: 0; border: 1px solid var(--hairline); border-radius: var(--radius-md); overflow: hidden; }
.sum section { padding: 16px 18px; display: grid; gap: 8px; }
.sum section + section { border-top: 1px solid var(--hairline); }
.sum h3 { font-size: 16px; line-height: 24px; display: flex; justify-content: space-between; gap: 12px; }
.sum h3 button { border: 0; background: none; padding: 0; color: var(--navy-text); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.sum .dl { font-size: 14px; gap: 4px 18px; }
.sum .dl dd { overflow-wrap: anywhere; }

/* public header: signed-in account button */
.acct-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--hairline); background: var(--white); border-radius: 22px 0; padding: 4px 10px 4px 4px; }
[dir="rtl"] .acct-btn { padding: 4px 4px 4px 10px; }
.acct-btn:hover { border-color: var(--navy); }

/* demo state switcher (presenter aid, visually secondary) */
.demo-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 28px 16px 8px; }
.demo-bar .role-switch { background: var(--white); max-width: 100%; }
.demo-bar .role-switch span { display: inline; white-space: nowrap; }
.demo-bar .role-switch select { max-width: 60vw; }
.demo-note { width: 100%; text-align: center; font-size: 12px; color: var(--gray); }

/* private sign-in: full-height navy, no app shell */
.priv-auth { min-height: 100vh; background: var(--navy); color: var(--white); display: flex; flex-direction: column; }
.priv-auth .lang-btn { color: var(--white); }
.priv-auth .lang-btn:hover { background: color-mix(in srgb, var(--white) 10%, var(--navy)); }
.priv-top { display: flex; justify-content: flex-end; padding: 16px 20px; }
.priv-center { flex: 1; display: grid; align-content: center; justify-items: center; gap: 22px; padding: 8px 0 24px; }
.priv-brand { display: grid; justify-items: center; gap: 14px; }
.priv-brand .plate { background: var(--white); padding: 12px 20px; border-radius: var(--radius-leaf-sm) 0; }
.priv-brand .plate img { height: 38px; width: auto; }
.priv-auth .auth-card { color: var(--ink); border: 0; }
.priv-auth .auth-wrap { width: min(460px, calc(100% - 32px)); }
.priv-auth .demo-bar .role-switch { background: transparent; color: color-mix(in srgb, var(--white) 75%, var(--navy)); border-color: color-mix(in srgb, var(--white) 35%, var(--navy)); }
.priv-auth .demo-bar .role-switch select { color: var(--white); }
.priv-auth .demo-bar option { color: var(--ink); }
.priv-auth .demo-note { color: color-mix(in srgb, var(--white) 65%, var(--navy)); }
.invite-note { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-alt); font-size: 14px; line-height: 20px; color: var(--gray); }
.invite-note b { font-weight: 400; color: var(--ink); }

@media (max-width: 600px) {
  .auth-main { padding-block: 24px 0; }
  .auth-card { padding: 24px 20px; border-radius: var(--radius-leaf-sm) 0; gap: 18px; }
  .pw-rules { grid-template-columns: minmax(0, 1fr); }
  .signup-steps { display: none; }
  .step-count { display: block; }
  .rcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .captcha { padding: 10px 12px; }
  .demo-bar .role-switch { flex-wrap: wrap; }
}

/* ─── review: validation pill + SLA cell (queue and submission pages) ─── */
.vpill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; font-size: 13px; line-height: 20px; border-radius: 10px 0; border: 1px solid var(--navy-15); background: var(--white); white-space: nowrap; }
.vpill .ico { width: 13px; height: 13px; stroke-width: 2.5; }
.vpill-warn { border-color: var(--gold); background: color-mix(in srgb, var(--yellow-tint) 55%, var(--white)); }
.sla { display: grid; gap: 1px; }
.sla b { font-weight: 400; font-size: 15px; }
.sla .t-xs { color: var(--gray); }
.sla-late b, .sla-soon b { color: var(--gold); }
.sla-late b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-start: 6px; vertical-align: 2px; background: var(--gold); transform: rotate(45deg); }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); }
[dir="rtl"] .eyebrow { letter-spacing: 0; }

/* private gate B / org users — data-flow update */
.via-tag { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; font-size: 12px; line-height: 18px; border-radius: 8px 0; border: 1px solid var(--hairline); background: var(--white); color: var(--gray); white-space: nowrap; }
.via-tag .ico { width: 12px; height: 12px; }
.via-tag--api { border-color: var(--navy-15); background: var(--navy-08); color: var(--navy-text); }
.ou-status { display: grid; gap: 2px; }
.ou-status .t-xs { color: var(--gray); }
.ou-acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ou-scope { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; background: var(--surface-alt); border-radius: 16px 0; font-size: 15px; max-width: 820px; }
.ou-scope .ico { flex: none; margin-top: 3px; color: var(--navy); }
.ou-role-pick { display: grid; gap: 8px; }
.ou-role-pick label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 14px 0; cursor: pointer; }
.ou-role-pick label:has(input:checked) { border-color: var(--navy); background: var(--navy-08); }
.ou-role-pick input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--navy); grid-row: span 2; }

/* "To confirm": anything JoPACC hasn't explicitly agreed yet (tooltip says what's open) */
.tbc{display:inline-flex;align-items:center;gap:4px;padding:1px 8px;border:1px dashed #d97706;border-radius:999px;color:#b45309;font-size:12px;font-weight:600;white-space:nowrap}

/* 10 ─── template screens (templates.html, template.html, template-new.html) ───
   No new visual styles: radio cards, drop zone and validation report are copied from
   Submit data; the audit list from Review a submission; the JSON block from the API snippet. */
.tpl-ed .tpl-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tpl-ed .tpl { position: relative; display: grid; gap: 6px; min-width: 0; padding: 16px 18px 16px 46px; border: 1px solid var(--hairline); border-radius: 20px 0; background: var(--white); cursor: pointer; }
[dir="rtl"] .tpl-ed .tpl { padding: 16px 46px 16px 18px; }
.tpl-ed .tpl input { position: absolute; top: 19px; inset-inline-start: 16px; width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.tpl-ed .tpl:hover { border-color: var(--navy); }
.tpl-ed .tpl:has(input:checked) { border-color: var(--navy); background: var(--navy-08); box-shadow: inset 0 0 0 1px var(--navy); }
.tpl-ed .tpl:has(input:disabled) { cursor: default; }
.tpl-ed .tpl:has(input:disabled):not(:has(input:checked)) { opacity: .6; }
.tpl-ed .tpl .nm { font-size: 17px; line-height: 24px; }
.tpl-ed .col-tbl td { vertical-align: top; }
.tpl-ed .col-tbl select.input, .tpl-ed .col-tbl .input { min-height: 38px; padding-block: 6px; }
.tpl-ed .col-tbl select.input:disabled, .tpl-ed .rule-grid select.input:disabled, .tpl-ed .rule-grid .input:disabled, .tpl-ed .rule-row .input:disabled, .tpl-ed .tr-block .input:disabled { background: var(--surface-alt); color: var(--ink); opacity: 1; }
.tpl-ed .c-tog .chev { transition: transform .15s; }
.tpl-ed .c-tog[aria-expanded="true"] .chev { transform: rotate(90deg); }
[dir="rtl"] .tpl-ed .c-tog .chev { transform: scaleX(-1); }
[dir="rtl"] .tpl-ed .c-tog[aria-expanded="true"] .chev { transform: rotate(90deg); }
.tpl-ed .x-row > td { background: var(--surface-alt); padding: 16px 18px 18px; }
.tpl-ed .rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 22px; }
.tpl-ed .rule-grid .field { align-content: start; }
.tpl-ed .snip { margin: 0; padding: 14px 16px; background: var(--navy); color: var(--white); border-radius: 12px 0; font: 13px/20px var(--font-code); overflow: auto; max-height: 560px; direction: ltr; text-align: left; white-space: pre; }
.tpl-ed .snip .k { color: var(--yellow); }
.tpl-ed .drop { display: grid; justify-items: center; gap: 8px; padding: 34px 24px; text-align: center; border: 2px dashed var(--silver); border-radius: var(--radius-leaf-md) 0; background: var(--white); cursor: pointer; }
.tpl-ed .drop:hover, .tpl-ed .drop.over { border-color: var(--navy); background: var(--navy-08); }
.tpl-ed .drop:focus-within { outline: 2px solid var(--navy); outline-offset: 2px; }
.tpl-ed .drop .ic { width: 56px; height: 56px; border-radius: 18px 0; background: var(--yellow-tint); display: grid; place-items: center; }
.tpl-ed .samples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--gray); }
.tpl-ed .filecard { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 16px 0; background: var(--white); }
.tpl-ed .filecard .fi { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px 0; background: var(--navy); color: var(--white); display: grid; place-items: center; font: 12px var(--font-code); }
.tpl-ed .check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.tpl-ed .check .ck-t { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; min-width: 0; }
.tpl-ed .check .mk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.tpl-ed .check .mk .ico { width: 13px; height: 13px; stroke-width: 2.5; }
.tpl-ed .mk.ok { background: var(--navy); color: var(--white); }
.tpl-ed .mk.warn { background: var(--yellow); }
.tpl-ed .mk.err { background: var(--white); border: 2px solid var(--ink); border-radius: 3px; transform: rotate(45deg) scale(.82); }
.tpl-ed .mk.err .ico { transform: rotate(-45deg); }
.tpl-ed .checks-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.tpl-ed .verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; padding: 18px 20px; border-radius: 20px 0; }
.tpl-ed .verdict .vi { grid-row: span 2; width: 40px; height: 40px; border-radius: 14px 0; display: grid; place-items: center; }
.tpl-ed .verdict.fail { background: var(--white); border: 1px solid var(--ink); border-inline-start-width: 4px; }
.tpl-ed .verdict.fail .vi { background: var(--ink); color: var(--white); }
.tpl-ed .verdict.pass { background: var(--navy-08); border-inline-start: 4px solid var(--navy); }
.tpl-ed .verdict.pass .vi { background: var(--navy); color: var(--white); }
.tpl-ed .verdict h2 { font-size: 21px; line-height: 28px; }
.tpl-ed .tbl td.bad-val { font-family: var(--font-code); font-size: 13px; }
.tpl-ed .tbl td.bad-val span { background: var(--yellow-tint); padding: 1px 5px; border-radius: 3px; }
.tpl-ed .tbl td.empty-val { color: var(--gray); font-style: italic; }
.tpl-ed .err-msg { font-size: 14px; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.tpl-ed .err-msg[hidden] { display: none; }
.tpl-ed .au { list-style: none; margin: 0; padding: 0; }
.tpl-ed .au li { display: grid; grid-template-columns: 150px 14px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 18px; }
.tpl-ed .au li:last-child { padding-bottom: 0; }
.tpl-ed .au .at { font-size: 13px; color: var(--gray); text-align: end; padding-top: 2px; }
.tpl-ed .au .dot { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--navy); background: var(--navy); position: relative; z-index: 1; }
.tpl-ed .au li:first-child .dot { background: var(--yellow); border-color: var(--yellow); }
.tpl-ed .au li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: calc(150px + 14px + 5px); top: 19px; bottom: 0; width: 2px; background: var(--navy); }
.tpl-ed .au b { font-weight: 400; display: block; }
.tpl-ed .au .cmt { margin-top: 6px; padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 10px 0; font-size: 14px; }
.tpl-ed .au .cmt ul { margin: 0; padding-inline-start: 18px; }
.tpl-ed dl.facts { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.tpl-ed dl.facts dt { color: var(--gray); font-size: 15px; }
.tpl-ed dl.facts dd { margin: 0; }
/* Table Schema rules: one row per rule (hairline list, like .check), source label on the end side */
.tpl-ed .rule-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.tpl-ed .rule-src { white-space: nowrap; cursor: help; padding-top: 2px; }
.tpl-ed .tr-block + .tr-block { padding-top: 14px; border-top: 1px solid var(--hairline); }
.tpl-ed .rr + .rr { padding-top: 10px; border-top: 1px dashed var(--hairline); }
.tpl-ed .dict-tbl td { vertical-align: top; }
.tpl-ed .ts-src { min-height: 420px; font: 13px/20px var(--font-code); white-space: pre; direction: ltr; text-align: left; }
/* presenter aid in the New template wizard: .demo-note text inside a dashed grey box (not product UI) */
.demo-box { margin: 16px 24px 0; padding: 10px 14px; border: 1px dashed var(--silver); border-radius: var(--radius-sm); }
.demo-box .demo-note { text-align: start; display: block; line-height: 18px; }
.demo-box .demo-note + .demo-note { margin-top: 6px; }
.demo-box b { font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-inline-end: 6px; }
@media (max-width: 744px) { .tpl-ed .rule-row { grid-template-columns: minmax(0, 1fr); } .demo-box { margin-inline: 16px; } }
@media (max-width: 1024px) { .tpl-ed .tpl-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 744px) { .tpl-ed .checks-2 { grid-template-columns: minmax(0, 1fr); } .tpl-ed dl.facts { grid-template-columns: minmax(0, 1fr); gap: 2px; } .tpl-ed dl.facts dd { margin-bottom: 10px; } .tpl-ed .au li { grid-template-columns: 14px minmax(0, 1fr); } .tpl-ed .au .at { grid-column: 2; text-align: start; order: 2; } .tpl-ed .au li:not(:last-child)::after { inset-inline-start: 5px; } }

/* 11 ─── public portal: embeds, articles, API reference, dataset requests ───
   Layout only. Every colour, radius and type size comes from the tokens and
   components above (code block = the dataset API snippet; cards = .ds-card). */
pre.codeblock { margin: 0; padding: 18px 20px; background: var(--surface-alt); border-radius: var(--radius-sm); overflow-x: auto; font: 14px/22px var(--font-code); direction: ltr; text-align: left; }
dialog.modal.emb-dlg { width: min(1060px, 96vw); }
.emb-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 26px; }
.emb-stage { background: var(--surface-alt); border-radius: var(--radius-md); padding: 16px; overflow: hidden; }
.emb-scale { transform-origin: top left; }
[dir="rtl"] .emb-scale { transform-origin: top right; }
.emb-code { white-space: pre-wrap; word-break: break-all; font-size: 13px; line-height: 20px; }
@media (max-width: 920px) { .emb-grid { grid-template-columns: minmax(0, 1fr); } }
/* embed page (what a third-party site shows inside the iframe); dark = the same tokens on navy */
.embed-body { margin: 0; background: var(--white); }
.embed-body.dark { background: var(--navy); color: var(--white); }
.embed-body.dark .emb-frame-in { --navy: #ffffff; --white: #243746; --ink: #ffffff; --gray: color-mix(in srgb, #ffffff 72%, #243746); --surface-alt: color-mix(in srgb, #ffffff 12%, #243746); --hairline: color-mix(in srgb, #ffffff 22%, #243746); --navy-text: var(--yellow); }
.emb-frame-in { display: grid; gap: 10px; padding: 16px 18px 12px; min-height: 100vh; align-content: start; box-sizing: border-box; }
.emb-frame-in .emb-foot { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; border-top: 1px solid var(--hairline); padding-top: 8px; font-size: 12px; line-height: 18px; color: var(--gray); }
.emb-frame-in .emb-foot a { color: var(--navy-text); white-space: nowrap; }
/* articles and studies */
.art-cover { aspect-ratio: 16/9; border-radius: var(--radius-leaf-md) 0; display: grid; align-content: space-between; padding: 18px 20px; overflow: hidden; }
.art-cover--study { background: var(--yellow-tint); }
.art-cover--article { background: var(--surface-alt); border: 1px solid var(--hairline); }
.art-cover--bulletin { background: var(--navy); color: var(--white); }
.art-cover .big { font-size: 34px; line-height: 40px; font-variant-numeric: tabular-nums; }
.art-cover .spark { height: 44px; }
.art-cover--bulletin .spark path { stroke: var(--yellow); }
.art-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--gray); }
.prose { display: grid; gap: 18px; font-size: 18px; line-height: 30px; max-width: 70ch; }
.prose h2 { font-size: 24px; line-height: 34px; margin-top: 10px; }
.prose figure { margin: 8px 0; display: grid; gap: 6px; max-width: none; }
.prose figcaption { font-size: 14px; line-height: 20px; color: var(--gray); }
.prose iframe { width: 100%; height: 470px; border: 0; border-radius: var(--radius-md); box-shadow: 0 0 0 1px var(--hairline); background: var(--white); }
.filters-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filters-chips button { border: 1px solid var(--border-input); background: var(--white); border-radius: 14px 0; padding: 6px 16px; font-size: 15px; }
.filters-chips button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
/* API reference */
.api { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-block: 24px 40px; }
.api-nav { position: sticky; top: 100px; align-self: start; display: grid; gap: 2px; }
.api-nav a { padding: 8px 12px; border-radius: var(--radius-sm); text-decoration: none; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.api-nav a:hover { background: var(--surface-alt); }
.api-nav a.on { background: var(--navy-08); }
.api-sec { padding-block: 10px 34px; border-bottom: 1px solid var(--hairline); display: grid; gap: 18px; scroll-margin-top: 100px; }
.api-sec, .ep { grid-template-columns: minmax(0, 1fr); }
.ep { display: grid; gap: 14px; padding: 22px 24px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--white); min-width: 0; }
.ep-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--font-code); font-size: 15px; direction: ltr; justify-content: flex-start; }
[dir="rtl"] .ep-line { justify-content: flex-end; }
.ep details > summary { cursor: pointer; font-size: 15px; color: var(--navy-text); }
.try { display: grid; gap: 12px; padding: 16px 18px; background: var(--surface-alt); border-radius: var(--radius-md); }
.try .grid { gap: 10px 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.try .input { min-height: 38px; padding-block: 6px; font-family: var(--font-code); font-size: 14px; }
@media (max-width: 920px) { .api { grid-template-columns: minmax(0, 1fr); gap: 16px; } .api-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--hairline); } .api-nav a { white-space: nowrap; } }
.art-card:hover h3, .art-card:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 600px) { .prose iframe { height: 540px; } }

/* ─── private catalogue + dataset page: access badge with tooltip (hover or keyboard focus), scope banner ─── */
.acc { position: relative; display: inline-flex; }
.acc > button.pill { cursor: help; font: inherit; font-size: 13px; }
.acc [role="tooltip"] { position: absolute; inset-inline-start: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: min(300px, 80vw); background: var(--ink); color: var(--white); font-size: 13px; line-height: 18px; padding: 8px 10px; border-radius: 4px; opacity: 0; visibility: hidden; transition: opacity .12s; }
.acc:hover [role="tooltip"], .acc:focus-within [role="tooltip"] { opacity: 1; visibility: visible; }
.scope-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; background: var(--surface-alt); border-radius: 16px 0; font-size: 15px; max-width: 820px; }
.scope-banner .ico { flex: none; margin-top: 3px; color: var(--navy); }

/* ─── approval workflow: Data validation and Release decision (js/wfmodel.js). Reuses .steps, .st, .pill, .chip, .tbc ─── */
.lane-line { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.lane-line .st { white-space: normal; }
.wf-dia li { padding-inline-end: 12px; }
.wf-dia li .chk { display: block; margin-top: 4px; font-size: 12px; line-height: 17px; color: var(--gray); text-wrap: pretty; }
.wf-dia li .chk i { font-style: normal; color: var(--gold); }
.wf-dia .pub-li::before { border-style: dashed; }
.resp-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px 12px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: 20px 0; background: var(--white); }
.resp-row:has(input[data-rs-on]:checked), .resp-row.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.resp-row > input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--navy); }
.resp-row .resp-f { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin-top: 10px; }
.resp-row .outs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 1024px) { .resp-row .resp-f { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .wf-dia { flex-direction: column; gap: 14px; } .wf-dia li::after { display: none; } }
.lane-line .st, .resp-chips .st { align-items: flex-start; }
.lane-line .st::before, .resp-chips .st::before, .lane-b .st::before { flex: none; margin-top: .45em; }

/* ─── analytics (private): Share dialog options, provenance strip, JoPACC-definition badge, dashboard cards (added 14 Oct 2026) ─── */
.sh-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 14px 0; cursor: pointer; }
.sh-opt input { margin-top: 4px; accent-color: var(--navy); }
.sh-opt:hover { border-color: var(--navy); }
.sh-opt:has(input:checked) { border-color: var(--navy); background: var(--navy-08); }
.sh-opt.is-dis { cursor: not-allowed; background: var(--surface-alt); }
.sh-opt.is-dis:hover { border-color: var(--hairline); }
.sh-opt.is-dis b { color: var(--gray); }
.sh-opt.is-dis .muted { color: var(--ink); }
.prov { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 10px 16px; background: var(--surface-alt); border-radius: 16px 0; font-size: 14px; }
.prov > span { display: inline-flex; gap: 6px; align-items: center; }
.prov .ico { color: var(--navy); }
.def-badge { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; font-size: 11px; line-height: 18px; border-radius: 8px 0; background: var(--navy-08); border: 1px solid var(--navy-15); color: var(--navy-text); white-space: nowrap; }
.dash-card { display: grid; gap: 10px; align-content: start; padding: 18px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-md); text-decoration: none; color: var(--ink); min-width: 0; }
a.dash-card:hover { border-color: var(--navy); }
.dash-card .thumb { height: 120px; overflow: hidden; pointer-events: none; }
.dash-card h3 { font-size: 17px; line-height: 24px; }
.dash-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--gray); }
.dash-card .legend { display: none; }
/* saved-chart caption: the same on the Analytics workspace, user dashboard tiles and Home (js/analyses.js figure()) */
.an-fig { display: grid; gap: 10px; min-width: 0; }
.an-fig-t { font-size: 16px; line-height: 22px; color: var(--ink); }
.an-src { margin: 0; font-size: 13px; line-height: 18px; color: var(--gray); border-top: 1px solid var(--hairline); padding-top: 10px; }
