/* =============================================================
 * Seijitsu v2 design — alpine white + forest green + Soji.
 * Ported from Seijitsu All Screens.html (2026-04 final).
 *
 * Layers on top of app.css. Uses v2 tokens from tokens.css.
 * Re-skins legacy classes (.page-title, .section-card, .stat-tile,
 * .dimension-card, .mini-item, .empty-state, ...) and adds new
 * .sj-* primitives (topbar, hero, card, pill, button).
 *
 * Import order in each page:
 *   app.css → seijitsu-v2.css (this file)
 * ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;600;700;800&family=Hiragino+Maru+Gothic+ProN:wght@400;600&display=swap');

/* ── token override: when body[data-sj-v2], v1 tokens → v2 ─── */
body[data-sj-v2] {
  --bg: var(--sj-paper);
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: var(--sj-cream);
  --ink: var(--sj-ink);
  --ink-soft: var(--sj-ink-soft);
  --muted: var(--sj-muted);
  --line: var(--sj-line);
  --line-strong: var(--sj-line-strong);
  --brand: var(--sj-forest);
  --brand-strong: var(--sj-forest-deep);
  --brand-soft: var(--sj-forest-08);
  --accent: var(--sj-forest);
  --accent-soft: var(--sj-forest-08);
  --rose-soft: var(--sj-alert-bg);
  --sky-soft: var(--sj-forest-05);
  --sand-soft: var(--sj-cream);
  --radius-xl: 20px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: var(--sj-shadow-card);
  --shadow-card: var(--sj-shadow-card);
  --shadow-float: 0 16px 40px rgba(43, 58, 52, 0.16);
  --font-sans: var(--sj-font-round);
}

/* ── base page ─────────────────────────────────────────────── */
body[data-sj-v2] {
  background: var(--sj-paper) !important;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  -webkit-font-smoothing: antialiased;
}
html:has(body[data-sj-v2]) { background: var(--sj-paper); }
body[data-sj-v2]::before,
body[data-sj-v2]::after { display: none !important; }
body[data-sj-v2] * { box-sizing: border-box; }

body[data-sj-v2] .app-shell {
  max-width: 100%;
  padding: 0 0 32px;
  background: var(--sj-paper);
  min-height: 100vh;
}
body[data-sj-v2] #page-nav { display: none; }

/* scrollbar hide */
body[data-sj-v2] ::-webkit-scrollbar { height: 0; width: 0; }

/* ── shared top bar (injected by sj-topbar.js) ─────────────── */
.sj-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
}
.sj-topbar__bleed {
  position: relative;
  height: var(--sj-bleed-height);
  padding-top: var(--sj-safe-top);
  background: linear-gradient(180deg, var(--sj-forest-deep) 0%, #1a5d45 100%);
  overflow: hidden;
}
.sj-topbar__bleed::after {
  content: '';
  position: absolute;
  right: -10px; top: -4px;
  width: 140px; height: 44px;
  background: radial-gradient(ellipse at 70% 40%, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.sj-topbar__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 14px;
  background: rgba(251, 250, 245, 0.82);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.sj-topbar__pagebtn {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: var(--sj-radius-pill);
  background: #fff;
  border: 1px solid var(--sj-line-strong);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 6px;
  box-shadow: var(--sj-shadow-topbar);
  cursor: pointer;
  font-family: var(--sj-font-round);
  color: var(--sj-ink);
  text-align: left;
  -webkit-appearance: none;
}
.sj-topbar__pagebtn:active { transform: scale(0.99); }
.sj-topbar__avatar {
  width: 32px; height: 32px;
  border-radius: 16px;
  background: var(--sj-cream);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sj-topbar__labels {
  display: flex; flex-direction: column;
  line-height: 1;
  align-items: flex-start;
  flex: 1; min-width: 0;
}
.sj-topbar__brand {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--sj-hair);
  font-weight: 700;
}
.sj-topbar__page {
  font-size: 14px;
  color: var(--sj-ink);
  font-weight: 700;
  margin-top: 3px;
  font-family: "Hiragino Maru Gothic ProN", var(--sj-font-round);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.sj-topbar__chev {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.sj-topbar__pagebtn[aria-expanded="true"] .sj-topbar__chev {
  transform: rotate(180deg);
}

.sj-topbar__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 14px;
  right: 14px;
  background: #fff;
  border-radius: var(--sj-radius-lg);
  box-shadow: var(--sj-shadow-float);
  overflow: hidden;
  z-index: 50;
  padding: 6px;
  display: none;
}
.sj-topbar__menu[data-open="1"] { display: block; }
.sj-topbar__menuitem {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: var(--sj-radius-md);
  color: var(--sj-ink);
  font-weight: 500;
  cursor: pointer;
  font-family: "Hiragino Maru Gothic ProN", var(--sj-font-round);
  text-decoration: none;
}
.sj-topbar__menuitem:hover { background: var(--sj-forest-05); }
.sj-topbar__menuitem[data-active="1"] {
  color: var(--sj-forest);
  font-weight: 700;
  background: var(--sj-forest-08);
}

.sj-topbar__langs {
  display: flex;
  border-radius: var(--sj-radius-pill);
  overflow: hidden;
  background: #fff;
  height: 42px;
  border: 1px solid var(--sj-line-strong);
  box-shadow: var(--sj-shadow-topbar);
  flex-shrink: 0;
}
.sj-topbar__lang {
  padding: 0 8px;
  font-size: 10px;
  font-weight: 700;
  background: transparent;
  color: var(--sj-muted);
  border: none;
  cursor: pointer;
  font-family: -apple-system, sans-serif;
  letter-spacing: 0.4px;
  min-width: 30px;
  -webkit-appearance: none;
}
.sj-topbar__lang[data-active="1"] {
  background: var(--sj-forest);
  color: #fff;
}

/* ── compact hero (per-page header) ────────────────────────── */
.sj-hero {
  padding: 6px 20px 14px;
}
.sj-hero__eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--sj-forest);
  margin-bottom: 4px;
  font-family: var(--sj-font-round);
  text-transform: uppercase;
}
.sj-hero__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.sj-hero__text { flex: 1; min-width: 0; }
.sj-hero__title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--sj-ink);
  line-height: 1.25;
  letter-spacing: 0.2px;
  font-family: var(--sj-font-round);
  text-wrap: balance;
}
.sj-hero__copy {
  margin: 0;
  font-size: 12px;
  color: var(--sj-muted);
  line-height: 1.55;
}
.sj-hero__icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Home greeting hero (unique) ───────────────────────────── */
.sj-greeting {
  position: relative;
  border-radius: var(--sj-radius-xl);
  padding: 20px 18px 18px;
  background: linear-gradient(155deg, #ecf1e7 0%, #fbfaf5 55%, #f5efe3 100%);
  border: 1px solid var(--sj-forest-08);
  overflow: hidden;
  margin: 8px 16px 18px;
}
.sj-greeting__leaf {
  position: absolute;
  right: -40px; top: -20px;
  opacity: 0.08;
  pointer-events: none;
}
.sj-greeting__leaf--second {
  right: auto; top: auto;
  left: -30px; bottom: -40px;
  opacity: 0.05;
}
.sj-greeting__row {
  display: flex; align-items: flex-start; gap: 12px;
  position: relative;
}
.sj-greeting__text { flex: 1; min-width: 0; padding-top: 4px; }
.sj-greeting__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 700;
  color: var(--sj-forest);
  margin-bottom: 10px;
  font-family: var(--sj-font-round);
}
.sj-greeting__date::before {
  content: '';
  width: 14px; height: 1.5px;
  background: var(--sj-forest);
  display: inline-block;
}
.sj-greeting__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--sj-ink);
  line-height: 1.35;
  letter-spacing: 0.3px;
  font-family: var(--sj-font-round);
  word-break: keep-all;
}
.sj-greeting__copy {
  margin: 0;
  font-size: 12px;
  color: var(--sj-muted);
  line-height: 1.65;
  font-family: "Hiragino Maru Gothic ProN", var(--sj-font-round);
}
.sj-greeting__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 12px 6px 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--sj-forest-14);
  border-radius: var(--sj-radius-pill);
  font-size: 11px;
  color: var(--sj-ink);
  font-weight: 600;
  font-family: var(--sj-font-round);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.sj-greeting__pill-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: var(--sj-forest);
  box-shadow: 0 0 0 3px var(--sj-forest-14);
  flex-shrink: 0;
}
.sj-greeting__pill-sep {
  width: 3px; height: 3px;
  border-radius: 2px;
  background: #c7d0c8;
}
.sj-greeting__avatar {
  flex-shrink: 0;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e8efe2 70%, #c8d4c2 100%);
  border: 1px solid var(--sj-forest-14);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(26,93,69,0.14), inset 0 -4px 12px rgba(26,93,69,0.05);
  position: relative;
  margin-top: 2px;
}
.sj-greeting__avatar::after {
  content: '';
  position: absolute;
  top: 4px; right: 6px;
  width: 6px; height: 6px; border-radius: 3px;
  background: var(--sj-yellow);
  box-shadow: 0 0 0 3px rgba(245,201,107,0.25);
}

/* ── section header ────────────────────────────────────────── */
body[data-sj-v2] .sj-section-header {
  padding: 0 20px;
  margin-bottom: 10px;
}
body[data-sj-v2] .sj-section-header__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  letter-spacing: 0.4px;
  line-height: 1.25;
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
body[data-sj-v2] .sj-section-header__ja {
  font-size: 10px;
  color: var(--sj-hair);
  font-weight: 500;
}
body[data-sj-v2] .sj-section-header__rule {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
}
body[data-sj-v2] .sj-section-header__rule::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--sj-forest-22), var(--sj-forest-08) 50%, transparent);
}
body[data-sj-v2] .sj-section-header__hint {
  font-size: 10px;
  color: var(--sj-hair);
  line-height: 1.4;
  white-space: nowrap;
  font-weight: 500;
}

/* ── re-skin legacy section-card / section-headline ────────── */
body[data-sj-v2] .section-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0 16px;
  margin: 0 0 22px;
}
/* Self-padded descendants reset to 0 under section-card */
body[data-sj-v2] .section-card > .stats-grid,
body[data-sj-v2] .section-card > .mini-list,
body[data-sj-v2] .section-card > .country-grid,
body[data-sj-v2] .section-card > .timeline,
body[data-sj-v2] .section-card > .index-layout,
body[data-sj-v2] .section-card > .policy-link-grid,
body[data-sj-v2] .section-card > .section-headline,
body[data-sj-v2] .section-card > .split-header {
  padding-left: 0;
  padding-right: 0;
}
body[data-sj-v2] .section-headline {
  padding: 0 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
body[data-sj-v2] .section-headline > div:first-child { flex: 1; min-width: 0; }
body[data-sj-v2] .section-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  letter-spacing: 0.4px;
  line-height: 1.3;
}
body[data-sj-v2] .supporting-copy {
  margin: 0;
  font-size: 11px;
  color: var(--sj-muted);
  line-height: 1.6;
}
body[data-sj-v2] .gentle-kicker {
  font-size: 10px;
  color: var(--sj-hair);
  font-weight: 500;
  white-space: nowrap;
  margin-top: 2px;
}

/* legacy hero-card gets neutralised when we use sj-greeting/sj-hero */
body[data-sj-v2] .hero-card {
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
}
body[data-sj-v2] .hero-card .hero-soft-panel {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

/* ── card primitive (shared) ───────────────────────────────── */
.sj-card {
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 16px;
  box-shadow: var(--sj-shadow-card);
  border: 1px solid var(--sj-line);
}
.sj-card[data-accent="1"] {
  box-shadow: var(--sj-shadow-soft);
  border-color: var(--sj-forest-14);
}

/* ── pill ──────────────────────────────────────────────────── */
body[data-sj-v2] .pill,
body[data-sj-v2] .sj-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: rgba(43, 58, 52, 0.06);
  color: var(--sj-ink);
  border-radius: var(--sj-radius-sm);
  font-family: var(--sj-font-round);
}
body[data-sj-v2] .pill.warning,
body[data-sj-v2] .sj-pill--warn {
  background: var(--sj-warn-bg);
  color: var(--sj-warn);
}
body[data-sj-v2] .pill.alert,
body[data-sj-v2] .sj-pill--alert {
  background: var(--sj-alert-bg);
  color: var(--sj-alert);
}
body[data-sj-v2] .pill.accent,
body[data-sj-v2] .sj-pill--forest {
  background: var(--sj-forest-10);
  color: var(--sj-forest);
}
body[data-sj-v2] .sj-pill--solid {
  background: rgba(26,93,69,0.85);
  color: #fff;
}

/* ── buttons ───────────────────────────────────────────────── */
body[data-sj-v2] .primary-button,
body[data-sj-v2] .sj-btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--sj-radius-md);
  background: var(--sj-forest);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--sj-font-round);
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(26,93,69,0.2);
  text-decoration: none;
  -webkit-appearance: none;
}
body[data-sj-v2] .primary-button:active,
body[data-sj-v2] .sj-btn--primary:active { transform: scale(0.99); }

body[data-sj-v2] .secondary-button,
body[data-sj-v2] .sj-btn--secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--sj-radius-md);
  background: #fff;
  color: var(--sj-forest);
  border: 1px solid var(--sj-forest-22);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--sj-font-round);
  cursor: pointer;
  letter-spacing: 0.3px;
  text-decoration: none;
  -webkit-appearance: none;
}

body[data-sj-v2] .ghost-button,
body[data-sj-v2] .sj-btn--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--sj-radius-md);
  background: #fff;
  color: var(--sj-ink);
  border: 1px solid var(--sj-line-strong);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--sj-font-round);
  cursor: pointer;
  text-decoration: none;
  -webkit-appearance: none;
}

body[data-sj-v2] .secondary-button.small,
body[data-sj-v2] .inline-button {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

body[data-sj-v2] .actions-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  flex-wrap: wrap;
}
body[data-sj-v2] .actions-row > .primary-button,
body[data-sj-v2] .actions-row > .secondary-button { flex: 1; min-width: 140px; }

/* ── re-skin legacy tiles / cards / lists ──────────────────── */
body[data-sj-v2] .stats-grid {
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
body[data-sj-v2] .stat-tile {
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 12px 14px;
  box-shadow: var(--sj-shadow-card);
  border: 1px solid var(--sj-line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body[data-sj-v2] .stat-label {
  font-size: 10px;
  color: var(--sj-muted);
  font-weight: 600;
  letter-spacing: 0.6px;
}
body[data-sj-v2] .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  line-height: 1.2;
}
body[data-sj-v2] .stat-tile.warm .stat-value { color: var(--sj-forest); }
body[data-sj-v2] .stat-note {
  font-size: 10px;
  color: var(--sj-hair);
  line-height: 1.4;
}

/* dimension-card */
body[data-sj-v2] .index-layout {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body[data-sj-v2] .radar-card {
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 16px;
  box-shadow: var(--sj-shadow-card);
  border: 1px solid var(--sj-line);
}
body[data-sj-v2] .radar-wrap { display: flex; justify-content: center; }
body[data-sj-v2] .radar-wrap svg { max-width: 100%; height: auto; }
body[data-sj-v2] .radar-caption {
  display: flex;
  gap: 14px;
  justify-content: center;
  font-size: 10px;
  color: var(--sj-hair);
  padding-top: 6px;
  margin-top: 6px;
  border-top: 1px dashed var(--sj-line-strong);
}
body[data-sj-v2] .dimension-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
body[data-sj-v2] .dimension-card {
  background: #fff;
  border-radius: var(--sj-radius-md);
  padding: 12px;
  box-shadow: var(--sj-shadow-card);
  border: 1px solid var(--sj-line);
}
body[data-sj-v2] .dimension-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
body[data-sj-v2] .dimension-copy { flex: 1; min-width: 0; }
body[data-sj-v2] .dimension-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  white-space: nowrap;
}
body[data-sj-v2] .dimension-stat {
  font-size: 10px;
  color: var(--sj-muted);
  margin-top: 2px;
  font-weight: 600;
}
body[data-sj-v2] .dimension-scoreline { white-space: nowrap; }
body[data-sj-v2] .dimension-score {
  display: inline;
  font-size: 16px;
  font-weight: 700;
  color: var(--sj-forest);
}
body[data-sj-v2] .dimension-out-of {
  font-size: 9px;
  color: var(--sj-hair);
  margin-left: 1px;
}
body[data-sj-v2] .dimension-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--sj-forest-10);
  overflow: hidden;
  margin-bottom: 8px;
}
body[data-sj-v2] .dimension-bar > span {
  display: block;
  height: 100%;
  background: var(--sj-forest);
  border-radius: 2px;
}
body[data-sj-v2] .dimension-note {
  font-size: 10px;
  color: var(--sj-hair);
  line-height: 1.5;
  margin: 0;
}
body[data-sj-v2] .micro-copy {
  font-size: 11px;
  color: var(--sj-muted);
  line-height: 1.5;
}

/* mini list (reminders / resubmission) */
body[data-sj-v2] .mini-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body[data-sj-v2] .mini-item {
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 14px;
  box-shadow: var(--sj-shadow-card);
  border: 1px solid var(--sj-line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
body[data-sj-v2] .mini-item > div:first-child { flex: 1; min-width: 0; }
body[data-sj-v2] .mini-item strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  display: block;
  margin-bottom: 4px;
}
body[data-sj-v2] .mini-meta {
  font-size: 11px;
  color: var(--sj-muted);
  line-height: 1.5;
}

/* country grid */
body[data-sj-v2] .country-grid {
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
body[data-sj-v2] .country-tile {
  background: #fff;
  border-radius: var(--sj-radius-md);
  padding: 10px;
  box-shadow: var(--sj-shadow-card);
  border: 1px solid var(--sj-line);
  text-align: center;
}
body[data-sj-v2] .country-tile strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  display: block;
  margin-bottom: 3px;
}

/* timeline */
body[data-sj-v2] .timeline {
  padding: 0 16px;
  position: relative;
}
body[data-sj-v2] .timeline::before {
  content: '';
  position: absolute;
  left: 22px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--sj-forest-22), var(--sj-forest-08));
}
body[data-sj-v2] .timeline-item {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  background: #fff;
  border-radius: var(--sj-radius-md);
  padding: 10px 12px 10px 32px;
  box-shadow: var(--sj-shadow-card);
  border: 1px solid var(--sj-line);
  margin-left: 20px;
}
body[data-sj-v2] .timeline-item::before {
  content: '';
  position: absolute;
  left: -24px; top: 14px;
  width: 10px; height: 10px;
  border-radius: 5px;
  background: var(--sj-forest);
  border: 3px solid var(--sj-paper);
  box-shadow: 0 0 0 1px var(--sj-forest-22);
}
body[data-sj-v2] .timeline-item strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sj-ink);
  line-height: 1.4;
  font-family: var(--sj-font-round);
  display: block;
  margin-bottom: 3px;
}

/* empty state / loading */
body[data-sj-v2] .empty-state {
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--sj-line-strong);
  color: var(--sj-muted);
}
body[data-sj-v2] .empty-state strong {
  font-size: 14px;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  display: block;
  margin-bottom: 6px;
}
body[data-sj-v2] .loading-card {
  background: #fff;
  border-radius: var(--sj-radius-md);
  padding: 12px;
  box-shadow: var(--sj-shadow-card);
  border: 1px solid var(--sj-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body[data-sj-v2] .loading-line {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--sj-cream) 0%, #e8ece4 50%, var(--sj-cream) 100%);
  background-size: 200% 100%;
  animation: sj-loading 1.6s linear infinite;
  width: 70%;
}
body[data-sj-v2] .loading-line--sm { width: 40%; }
body[data-sj-v2] .loading-line--lg { width: 90%; height: 14px; }
@keyframes sj-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* language panel (vault) */
body[data-sj-v2] .language-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
body[data-sj-v2] .language-panel button,
body[data-sj-v2] .language-panel [role="button"] {
  padding: 5px 10px;
  border-radius: var(--sj-radius-md);
  background: #fff;
  color: var(--sj-ink);
  border: 1px solid var(--sj-line-strong);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--sj-font-round);
  cursor: pointer;
  -webkit-appearance: none;
}
body[data-sj-v2] .language-panel [aria-pressed="true"],
body[data-sj-v2] .language-panel button.active {
  background: var(--sj-forest);
  color: #fff;
  border-color: var(--sj-forest);
}

/* soft-note */
body[data-sj-v2] .soft-section-note {
  margin: 10px 16px;
  background: var(--sj-cream);
  border-radius: var(--sj-radius-md);
  padding: 10px 14px;
  font-size: 11px;
  color: #405248;
  line-height: 1.55;
}

/* welcome badges / eyebrow / split-header (home legacy) */
body[data-sj-v2] .welcome-strip { display: none; }
body[data-sj-v2] .split-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 10px;
}
body[data-sj-v2] .split-header > div:first-child { flex: 1; min-width: 0; }

/* notification banner (vault policy grid etc) */
body[data-sj-v2] .policy-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px;
}
body[data-sj-v2] .policy-link-grid > a {
  display: block;
  padding: 12px;
  background: #fff;
  border-radius: var(--sj-radius-md);
  border: 1px solid var(--sj-line);
  color: var(--sj-ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--sj-font-round);
}

/* ── upload / review / vault specific re-skins ─────────────── */
body[data-sj-v2] .eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--sj-forest);
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: var(--sj-font-round);
}
body[data-sj-v2] .page-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--sj-ink);
  line-height: 1.25;
  letter-spacing: 0.2px;
  font-family: var(--sj-font-round);
  text-wrap: balance;
}
body[data-sj-v2] .body-copy {
  font-size: 12px;
  color: var(--sj-muted);
  line-height: 1.55;
  margin: 0 0 12px;
}
body[data-sj-v2] .soft-hero-copy { font-size: 12px; }
body[data-sj-v2] .helper-copy,
body[data-sj-v2] .fine-print {
  font-size: 11px;
  color: var(--sj-muted);
  line-height: 1.55;
}
body[data-sj-v2] .helper-copy.error { color: var(--sj-alert); }
body[data-sj-v2] .helper-copy.success { color: var(--sj-forest); }

body[data-sj-v2] .process-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 6px;
  align-items: center;
  padding: 0 16px;
  margin: 12px 0;
}
body[data-sj-v2] .process-chip {
  padding: 8px 10px;
  border-radius: var(--sj-radius-md);
  background: #fff;
  border: 1px solid var(--sj-line);
  font-size: 11px;
  font-weight: 700;
  color: var(--sj-muted);
  text-align: center;
  font-family: var(--sj-font-round);
}
body[data-sj-v2] .process-chip.is-active {
  background: var(--sj-forest);
  color: #fff;
  border-color: var(--sj-forest);
}
body[data-sj-v2] .process-arrow {
  color: var(--sj-hair);
  font-size: 12px;
  text-align: center;
}

body[data-sj-v2] .form-grid {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
body[data-sj-v2] .field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--sj-muted);
  font-weight: 600;
  letter-spacing: 0.4px;
}
body[data-sj-v2] .select-input {
  height: 44px;
  padding: 0 12px;
  border-radius: var(--sj-radius-md);
  border: 1px solid var(--sj-line-strong);
  background: #fff;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}

body[data-sj-v2] .file-input-native { display: none; }
body[data-sj-v2] .file-trigger-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body[data-sj-v2] .file-trigger-row--stacked { gap: 8px; }
body[data-sj-v2] .file-trigger-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
body[data-sj-v2] .file-trigger {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--sj-radius-md);
  background: #fff;
  color: var(--sj-forest);
  border: 1px solid var(--sj-forest-22);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--sj-font-round);
  cursor: pointer;
}
body[data-sj-v2] .file-trigger:hover { background: var(--sj-forest-05); }
body[data-sj-v2] .file-trigger--primary {
  background: var(--sj-forest);
  color: #fff;
  border-color: var(--sj-forest);
}

body[data-sj-v2] .upload-dropzone {
  margin: 0 16px;
  border: 2px dashed var(--sj-forest-22);
  background: var(--sj-forest-05);
  border-radius: var(--sj-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  animation: sj-breathe 3.2s ease-in-out infinite;
}
body[data-sj-v2] .upload-dropzone.is-dragging {
  background: var(--sj-forest-10);
  border-color: var(--sj-forest);
}
body[data-sj-v2] .upload-dropzone strong {
  font-size: 13px;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
}
@keyframes sj-breathe {
  0%, 100% { background-color: var(--sj-forest-05); border-color: var(--sj-forest-22); }
  50% { background-color: var(--sj-forest-08); border-color: rgba(26,93,69,0.5); }
}

body[data-sj-v2] .privacy-card {
  margin: 12px 16px;
  background: #faf8f2;
  border-radius: var(--sj-radius-lg);
  padding: 14px;
  border: 1px solid var(--sj-line);
}
body[data-sj-v2] .privacy-card strong {
  display: block;
  font-size: 13px;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  margin-bottom: 4px;
}
body[data-sj-v2] .privacy-list {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
  font-size: 11px;
  color: var(--sj-muted);
  line-height: 1.7;
}

body[data-sj-v2] .progress-marquee {
  margin: 8px 16px 0;
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 12px 14px;
  border: 1px solid var(--sj-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body[data-sj-v2] .progress-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
body[data-sj-v2] .progress-track {
  height: 5px;
  border-radius: 3px;
  background: var(--sj-forest-10);
  overflow: hidden;
  position: relative;
}
body[data-sj-v2] .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e8c58b, #d4a455);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  transition: width 0.4s ease;
}
body[data-sj-v2] .progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: sj-shimmer 1.4s linear infinite;
}
body[data-sj-v2] .progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--sj-warn);
  animation: sj-pulse 1.6s ease-in-out infinite;
}
@keyframes sj-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(220%); } }
@keyframes sj-pulse { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } }

body[data-sj-v2] .list-stack,
body[data-sj-v2] .task-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body[data-sj-v2] .upload-file-card,
body[data-sj-v2] .task-card {
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 14px;
  border: 1px solid var(--sj-line);
  box-shadow: var(--sj-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body[data-sj-v2] .task-card.processing { border-color: var(--sj-forest-22); }
body[data-sj-v2] .task-card.success { border-color: var(--sj-forest-14); background: #f8fbf8; }
body[data-sj-v2] .task-card.warning { border-color: var(--sj-warn); background: #fdf8ee; }
body[data-sj-v2] .task-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
body[data-sj-v2] .task-meta-line strong {
  font-size: 13px;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  word-break: break-all;
  display: block;
  margin-bottom: 2px;
}
body[data-sj-v2] .status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sj-forest-08);
  color: var(--sj-forest);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-family: var(--sj-font-round);
  white-space: nowrap;
}
body[data-sj-v2] .status-chip.soft {
  background: var(--sj-warn-bg);
  color: var(--sj-warn);
}
body[data-sj-v2] .status-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

body[data-sj-v2] .flow-choice-card {
  background: var(--sj-forest-05);
  border-radius: var(--sj-radius-lg);
  padding: 14px;
  border: 1px solid var(--sj-forest-14);
  margin: 8px 16px 0;
}
body[data-sj-v2] .flow-choice-card strong {
  display: block;
  font-size: 14px;
  color: var(--sj-forest);
  margin-bottom: 4px;
  font-family: var(--sj-font-round);
}
body[data-sj-v2] .flow-choice-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
body[data-sj-v2] .flow-choice-actions > button { flex: 1; min-width: 120px; }

body[data-sj-v2] .badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Review / Vault card internals */
body[data-sj-v2] .decision-card,
body[data-sj-v2] .review-card,
body[data-sj-v2] .vault-card,
body[data-sj-v2] .result-card {
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 14px;
  border: 1px solid var(--sj-line);
  box-shadow: var(--sj-shadow-card);
  margin: 0 16px 10px;
}
body[data-sj-v2] .section-card .decision-list,
body[data-sj-v2] .section-card .result-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Export + share page specifics */
body[data-sj-v2] .export-sheet {
  margin: 0 16px 18px;
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 16px;
  border: 1px solid var(--sj-line);
  box-shadow: var(--sj-shadow-card);
}
body[data-sj-v2] .export-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
body[data-sj-v2] .actions-row--dense {
  gap: 6px;
  padding: 0;
  margin-top: 10px;
}
body[data-sj-v2] .share-card,
body[data-sj-v2] .qr-card {
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 16px;
  border: 1px solid var(--sj-line);
  box-shadow: var(--sj-shadow-card);
  margin: 0 16px 10px;
}

/* Login shell */
body[data-sj-v2] .login-shell,
body[data-sj-v2] .login-card {
  background: #fff;
  border-radius: var(--sj-radius-xl);
  padding: 20px;
  border: 1px solid var(--sj-line);
  box-shadow: var(--sj-shadow-card);
  margin: 0 16px 14px;
}

/* utility */
.sj-hide { display: none !important; }
.sj-nowrap { white-space: nowrap; }
body[data-sj-v2] .hero-guidance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 12px;
}
body[data-sj-v2] .hero-guidance-card {
  background: #f8f5ee;
  border-radius: var(--sj-radius-md);
  padding: 10px 12px;
  border: 1px solid var(--sj-line);
}
body[data-sj-v2] .hero-guidance-card--accent {
  background: var(--sj-forest-05);
  border-color: var(--sj-forest-14);
  position: relative;
  overflow: hidden;
}
body[data-sj-v2] .hero-guidance-label {
  display: block;
  font-size: 9px;
  color: var(--sj-hair);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 3px;
}
body[data-sj-v2] .hero-guidance-card--accent .hero-guidance-label { color: var(--sj-forest); }
body[data-sj-v2] .hero-guidance-value {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  margin-bottom: 2px;
  line-height: 1.3;
}
body[data-sj-v2] .hero-guidance-card--accent .hero-guidance-value { color: var(--sj-forest); }

/* score ring shell */
body[data-sj-v2] .score-ring-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  margin-bottom: 12px;
}
body[data-sj-v2] .score-ring {
  position: relative;
  width: 116px; height: 116px;
}
body[data-sj-v2] .score-ring-svg { width: 116px; height: 116px; transform: rotate(-90deg); }
body[data-sj-v2] .score-ring-track { fill: none; stroke: var(--sj-forest-10); stroke-width: 6; }
body[data-sj-v2] .score-ring-progress { fill: none; stroke: var(--sj-forest); stroke-width: 6; stroke-linecap: round; }
body[data-sj-v2] .score-ring-value {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
body[data-sj-v2] .score-ring-value strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--sj-forest);
  line-height: 1;
  font-family: var(--sj-font-round);
}
body[data-sj-v2] .score-ring-value span {
  font-size: 9px;
  color: var(--sj-hair);
  margin-top: 3px;
  font-weight: 600;
  letter-spacing: 0.8px;
}
body[data-sj-v2] .score-ring-footnote {
  font-size: 11px;
  color: var(--sj-muted);
  text-align: center;
  line-height: 1.5;
}
body[data-sj-v2] .encourage-card {
  margin: 0 16px 12px;
  background: #fff;
  border-radius: var(--sj-radius-lg);
  padding: 14px;
  border: 1px solid var(--sj-line);
  box-shadow: var(--sj-shadow-card);
}
body[data-sj-v2] .encourage-card strong {
  display: block;
  font-size: 13px;
  color: var(--sj-ink);
  font-family: var(--sj-font-round);
  margin-bottom: 4px;
}
