/* Japan Career Tools — JCRC brand tokens + tool UI */
:root {
  --color-primary: #2356A5;
  --color-primary-hover: #1B4380;
  --color-secondary: #0F2A4F;
  --color-accent: #FF794A;
  --color-accent-soft: #FFE4D6;
  --color-background: #FBFAF7;
  --color-surface: #FFFFFF;
  --color-surface-2: #F4F2EC;
  --color-surface-3: #ECE9E0;
  --color-text: #0F1B2D;
  --color-text-muted: #5A6577;
  --color-text-soft: #8A92A2;
  --color-border: #E3E0D6;
  --color-border-soft: #EEEBE2;
  --color-success: #1F7A4D;
  --color-warning: #B45309;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-ui: 'Poppins', sans-serif;
  --font-mono: 'Inter', ui-monospace, monospace;
  --container-max: 1100px;
  --space-section: 4.5rem;
  --radius: 1rem;
  --radius-lg: 1.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

#jct {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

#jct h1,
#jct h2,
#jct h3,
#jct h4,
#jct .font-heading,
#jct .jct-card h2,
#jct .jct-hero h1,
#jct .jct-status-title,
#jct .jct-chart h3,
#jct .jct-related h3,
#jct .jct-list-box h4,
#jct .jct-hero-stat strong {
  font-family: var(--font-heading) !important;
}

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

#jct p {
  margin: 0;
}

#jct button,
#jct input,
#jct select {
  font: inherit;
  color: inherit;
  margin: 0;
}

#jct button {
  cursor: pointer;
  /* Do not reset background/border here — Bootstrap + ID specificity
     would override .jct-tab / .jct-btn styles. */
}

#jct a {
  color: inherit;
  text-decoration: none;
}

#jct svg {
  display: block;
  flex-shrink: 0;
}

#jct *:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.jct-wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.jct-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.25rem;
  background:
    linear-gradient(135deg, rgba(255, 247, 244, 0.95) 0%, rgba(239, 245, 255, 0.9) 48%, rgba(251, 250, 247, 1) 100%),
    var(--color-background);
  border-bottom: 1px solid var(--color-border-soft);
}

.jct-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(35, 86, 165, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 86, 165, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 70% 65% at 70% 20%, #000 20%, transparent 75%);
  pointer-events: none;
}

.jct-hero-layout {
  display: grid;
  gap: 2.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .jct-hero-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
    gap: 3rem;
    align-items: center;
  }
}

.jct-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(227, 224, 214, 0.9);
  box-shadow: 0 6px 18px rgba(15, 27, 45, 0.04);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 1.75rem;
}

.jct-eyebrow-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(255, 121, 74, 0.18);
}

.jct-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 6vw, 4.15rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 11ch;
  margin: 0.35rem 0 1.35rem;
  color: var(--color-secondary);
}

.jct-hero h1 em {
  font-style: italic;
  color: var(--color-primary);
  position: relative;
}

.jct-hero h1 em::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.18em;
  background: linear-gradient(90deg, rgba(255, 121, 74, 0.55), rgba(255, 121, 74, 0.08));
  border-radius: 999px;
  z-index: -1;
}

.jct-hero-lead {
  margin: 0 0 1.85rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 38rem;
}

.jct-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.jct-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--color-border-soft);
}

.jct-hero-meta svg {
  width: 1rem;
  height: 1rem;
  color: var(--color-success);
}

.jct-hero-aside {
  position: relative;
  min-height: 210px;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background:
    linear-gradient(160deg, rgba(15, 42, 79, 0.96), rgba(35, 86, 165, 0.92));
  color: #fff;
  box-shadow: 0 22px 50px rgba(15, 42, 79, 0.22);
  overflow: hidden;
}

.jct-hero-aside::before {
  content: '';
  position: absolute;
  inset: auto -20% -35% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 121, 74, 0.45), transparent 70%);
}

.jct-hero-stat {
  position: relative;
  z-index: 1;
}

.jct-hero-stat-kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.85rem;
}

.jct-hero-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  margin: 0.15rem 0 1rem;
  letter-spacing: -0.03em;
}

.jct-hero-stat p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  max-width: 16rem;
}

@media (max-width: 899px) {
  .jct-hero-aside {
    max-width: 360px;
  }
}

/* Tabs */
.jct-tabs {
  display: block;
  padding: 1.75rem 0 1.35rem;
  z-index: 20;
  background: linear-gradient(180deg, rgba(251, 250, 247, 0.97), rgba(251, 250, 247, 0.88));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  margin: 0 0 2rem;
}

@media (min-width: 992px) {
  .jct-tabs {
    top: 4.1rem;
  }
}

.jct-tabs-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 10px 28px rgba(15, 27, 45, 0.05);
}

@media (max-width: 991px) {
  .jct-tabs-rail {
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
    padding: 0.3rem 0.1rem;
  }
}
.jct-tab {
  min-height: 46px;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background-color: transparent;
  background-image: none;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.jct-tab-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.jct-tab:hover {
  color: var(--color-text);
  background-color: var(--color-surface-2);
}

#jct .jct-tab.is-active,
.jct-tab.is-active {
  background-color: var(--color-primary) !important;
  background-image: none !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(35, 86, 165, 0.28);
}

#jct .jct-tab.is-active .jct-tab-num,
.jct-tab.is-active .jct-tab-num {
  opacity: 1;
  color: #ffe4d6;
}

/* Panels */
.jct-panel {
  display: none;
  padding-bottom: var(--space-section);
}

.jct-panel.is-active {
  display: block;
  animation: jctFadeIn 220ms var(--ease);
}

@keyframes jctFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jct-panel.is-active {
    animation: none;
  }
  .jct-tab,
  .jct-btn,
  .jct-bar-fill,
  .jct-ring-progress {
    transition: none !important;
  }
}

.jct-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .jct-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    align-items: start;
  }
}

.jct-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    var(--color-surface);
  border: 1px solid rgba(227, 224, 214, 0.95);
  border-radius: 1.35rem;
  padding: 1.65rem 1.55rem 1.7rem;
  box-shadow: 0 12px 34px rgba(15, 27, 45, 0.04);
  position: relative;
}

@media (min-width: 768px) {
  .jct-card {
    padding: 2rem 1.85rem 1.9rem;
  }
}

.jct-card-head {
  display: block;
  margin: 0.35rem 0 1rem;
}

.jct-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0.15rem 0 0.2rem;
  color: var(--color-secondary);
}

.jct-card-sub {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0 0 1.65rem;
  padding-bottom: 1.15rem;
  /* border-bottom: 1px dashed rgba(227, 224, 214, 0.95); */
}

.jct-result {
  background:
    linear-gradient(165deg, rgba(234, 241, 247, 0.95) 0%, rgba(244, 242, 236, 0.92) 55%, rgba(255, 255, 255, 0.9) 100%);
  border-color: #d4e0ea;
  overflow: hidden;
}

.jct-result::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -50px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 86, 165, 0.12), transparent 70%);
  pointer-events: none;
}

.jct-field {
  margin-bottom: 1rem;
}

.jct-field label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.jct-field .jct-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-soft);
  margin-top: 0.3rem;
}

.jct-field select,
.jct-field input[type='number'],
.jct-field input[type='text'] {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-surface);
  font-family: var(--font-body);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.jct-field select:focus,
.jct-field input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(35, 86, 165, 0.15);
  outline: none;
}

.jct-field.is-invalid select,
.jct-field.is-invalid input {
  border-color: #dc2626;
}

.jct-field-error {
  display: none;
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.3rem;
}

.jct-field.is-invalid .jct-field-error {
  display: block;
}

.jct-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .jct-field-row {
    grid-template-columns: 1fr;
  }
}

.jct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}

#jct .jct-btn-primary,
.jct-btn-primary {
  width: 100%;
  margin-top: 0.75rem;
  background-color: var(--color-accent) !important;
  background-image: none !important;
  color: #fff !important;
  border: 1px solid var(--color-accent) !important;
}

#jct .jct-btn-primary:hover,
.jct-btn-primary:hover {
  background-color: #e86a3d !important;
  border-color: #e86a3d !important;
}

.jct-btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.jct-btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.jct-btn-secondary:hover {
  border-color: var(--color-text-muted);
}

.jct-btn-accent {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-accent);
}

.jct-btn-accent:hover {
  background: var(--color-accent-soft);
}

.jct-btn svg {
  width: 1rem;
  height: 1rem;
}

/* Results */
.jct-empty {
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.6;
  padding: 1rem 0 1.25rem;
  margin: 0.25rem 0 0.5rem;
}

.jct-metrics {
  display: none;
  margin-top: 0.5rem;
}

.jct-metrics.is-visible {
  display: block;
}

.jct-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(212, 224, 234, 0.9);
  font-size: 0.9375rem;
}

.jct-row:last-of-type {
  border-bottom: 0;
}

.jct-row span {
  color: var(--color-text-muted);
}

.jct-row b {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--color-text);
}

.jct-row.is-total b {
  color: var(--color-primary);
  font-size: 1.05rem;
}

.jct-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text-soft);
}

.jct-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.6875rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Charts */
.jct-chart {
  display: none;
  margin-top: 1.6rem;
  padding: 1.35rem 1.1rem 1.1rem;
  border-top: 0;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(212, 224, 234, 0.8);
}

.jct-chart.is-visible {
  display: block;
}

.jct-chart h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.015em;
  color: var(--color-secondary);
  margin: 1.35rem 0 1rem;
}

.jct-chart h3:first-child {
  margin-top: 0.35rem;
}

.jct-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.jct-bar-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.8125rem;
}

.jct-bar-item .label {
  color: var(--color-text-muted);
}

.jct-bar-track {
  height: 0.5rem;
  background: rgba(35, 86, 165, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.jct-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 9999px;
  background: var(--color-primary);
  transition: width 450ms var(--ease);
}

.jct-bar-fill.accent {
  background: var(--color-accent);
}

.jct-bar-fill.muted {
  background: var(--color-text-soft);
}

.jct-bar-item .value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text);
  min-width: 4.5rem;
  text-align: right;
}

.jct-range {
  margin-bottom: 1rem;
}

.jct-range-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-soft);
  margin-bottom: 0.45rem;
}

.jct-range-labels [data-range-lo],
.jct-range-labels [data-range-hi] {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.jct-range-labels [data-range-mid] {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
  text-align: center;
}

.jct-range-track {
  position: relative;
  height: 0.7rem;
  background: rgba(35, 86, 165, 0.12);
  border-radius: 9999px;
  overflow: visible;
}

.jct-range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 9999px;
  transition: left 400ms var(--ease), width 400ms var(--ease);
}

.jct-range-mid {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  margin-top: -0.35rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-secondary);
  box-shadow: 0 2px 8px rgba(15, 42, 79, 0.2);
  z-index: 1;
  transition: left 400ms var(--ease);
}

.jct-stack {
  display: flex;
  height: 1.1rem;
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(15, 42, 79, 0.08);
  margin-bottom: 0.85rem;
}

.jct-stack span {
  height: 100%;
  transition: width 400ms var(--ease);
}

.jct-stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.jct-stack-legend i {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.jct-eligibility-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.jct-ring {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
}

.jct-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.jct-ring-bg {
  fill: none;
  stroke: rgba(35, 86, 165, 0.12);
  stroke-width: 8;
}

.jct-ring-progress {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 500ms var(--ease), stroke 200ms var(--ease);
}

.jct-ring-progress.is-eligible {
  stroke: var(--color-success);
}

.jct-ring-progress.is-review {
  stroke: var(--color-warning);
}

.jct-ring-progress.is-ineligible {
  stroke: #dc2626;
}

.jct-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
}

.jct-status-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.35rem 0 0.65rem;
  letter-spacing: -0.02em;
  color: var(--color-secondary);
}

.jct-status-body {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.jct-lists {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.jct-list-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
}

.jct-list-box h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--color-secondary);
  margin: 0.15rem 0 0.75rem;
}

.jct-list-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.jct-list-box li {
  font-size: 0.875rem;
  line-height: 1.4;
  padding-left: 1rem;
  position: relative;
}

.jct-list-box li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: var(--color-primary);
}

.jct-list-box.gaps li::before {
  background: var(--color-accent);
}

.jct-related {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #d4e0ea;
}

.jct-related.is-visible {
  display: block;
}

.jct-related h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.015em;
  color: var(--color-secondary);
  margin: 0.5rem 0 0.9rem;
}

.jct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.jct-chip {
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--color-text-muted);
}

/* CTA strip */
.jct-cta-strip {
  display: none;
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: 0.85rem;
  flex-direction: column;
  gap: 0.75rem;
}

.jct-cta-strip.is-visible {
  display: flex;
}

@media (min-width: 520px) {
  .jct-cta-strip {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.jct-cta-strip p {
  flex: 1;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  min-width: 12rem;
}

.jct-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.jct-cta-actions .jct-btn {
  min-height: 42px;
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  width: auto;
  margin: 0;
}

.jct-cross {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.jct-cross a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.jct-foot-note {
  padding: 1.25rem 0 4rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-soft);
  line-height: 1.65;
  max-width: 46rem;
  border-top: 1px solid var(--color-border-soft);
}

/* ---- Interactive polish ---- */
.jct-hero-inner {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms var(--ease), transform 560ms var(--ease);
}

.jct-hero-inner.is-in {
  opacity: 1;
  transform: none;
}

.jct-card {
  transition:
    transform 220ms var(--ease),
    box-shadow 220ms var(--ease),
    border-color 220ms var(--ease);
}

.jct-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(15, 27, 45, 0.08);
  border-color: #d4dce8;
}

.jct-result {
  position: relative;
  overflow: hidden;
}

.jct-result::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}

.jct-result.has-result::before {
  transform: scaleX(1);
}

.jct-result.has-result .jct-metrics.is-visible {
  animation: jctResultPop 420ms var(--ease);
}

@keyframes jctResultPop {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.jct-tab {
  position: relative;
  overflow: hidden;
}

.jct-tab::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(35, 86, 165, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 220ms var(--ease);
  pointer-events: none;
}

.jct-tab:active::after {
  opacity: 1;
}

.jct-tab.is-active {
  transform: translateY(-1px);
}

.jct-field select,
.jct-field input[type='number'],
.jct-field input[type='text'] {
  transition:
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    background 160ms var(--ease),
    transform 160ms var(--ease);
}

.jct-field select:hover,
.jct-field input:hover {
  border-color: #b8c5d6;
  background: #fcfdff;
}

.jct-field select:focus,
.jct-field input:focus {
  transform: translateY(-1px);
}

.jct-btn {
  position: relative;
  overflow: hidden;
  transition:
    background 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.jct-btn-primary {
  box-shadow: 0 8px 20px rgba(255, 121, 74, 0.28);
}

.jct-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(255, 121, 74, 0.34);
}

.jct-btn-primary:active {
  transform: translateY(0);
}

.jct-btn-primary.is-calculating {
  pointer-events: none;
}

.jct-btn-primary.is-calculating svg {
  animation: jctSpin 700ms linear infinite;
}

@keyframes jctSpin {
  to {
    transform: rotate(360deg);
  }
}

.jct-btn-secondary:hover,
.jct-btn-accent:hover {
  transform: translateY(-2px);
}

.jct-btn-accent {
  box-shadow: 0 4px 14px rgba(255, 121, 74, 0.18);
}

.jct-chip {
  transition: border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}

.jct-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.jct-row b {
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}

.jct-row b.is-flash {
  color: var(--color-primary);
  transform: scale(1.04);
}

.jct-bar-fill {
  position: relative;
}

.jct-bar-item {
  opacity: 0;
  transform: translateX(-8px);
  animation: jctBarIn 380ms var(--ease) forwards;
}

.jct-bar-item:nth-child(1) { animation-delay: 40ms; }
.jct-bar-item:nth-child(2) { animation-delay: 90ms; }
.jct-bar-item:nth-child(3) { animation-delay: 140ms; }
.jct-bar-item:nth-child(4) { animation-delay: 190ms; }
.jct-bar-item:nth-child(5) { animation-delay: 240ms; }

@keyframes jctBarIn {
  to {
    opacity: 1;
    transform: none;
  }
}

.jct-cta-strip.is-visible {
  animation: jctResultPop 450ms var(--ease);
}

.jct-ring-progress {
  filter: drop-shadow(0 0 0 transparent);
  transition: stroke-dashoffset 600ms var(--ease), stroke 220ms var(--ease), filter 220ms var(--ease);
}

.jct-ring-progress.is-eligible {
  filter: drop-shadow(0 0 6px rgba(31, 122, 77, 0.35));
}

.jct-ring-progress.is-review {
  filter: drop-shadow(0 0 6px rgba(180, 83, 9, 0.3));
}

.jct-ring-label {
  transition: transform 300ms var(--ease);
}

.jct-eligibility-head.is-ready .jct-ring-label {
  animation: jctScoreBounce 480ms var(--ease);
}

@keyframes jctScoreBounce {
  0% { transform: scale(0.85); opacity: 0.4; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* Floating hero accents */
.jct-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.55;
  animation: jctFloat 9s ease-in-out infinite;
}

.jct-hero-blob-a {
  width: 220px;
  height: 220px;
  background: rgba(35, 86, 165, 0.16);
  top: -40px;
  right: 8%;
}

.jct-hero-blob-b {
  width: 180px;
  height: 180px;
  background: rgba(255, 121, 74, 0.14);
  bottom: -30px;
  left: 6%;
  animation-delay: -3.5s;
}

@keyframes jctFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(14px) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .jct-hero-inner,
  .jct-card,
  .jct-tab,
  .jct-btn,
  .jct-chip,
  .jct-field select,
  .jct-field input,
  .jct-bar-item,
  .jct-hero-blob,
  .jct-result.has-result .jct-metrics.is-visible,
  .jct-cta-strip.is-visible,
  .jct-eligibility-head.is-ready .jct-ring-label {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- Back to top button (site chrome, outside #jct) ---- */
#backToTopBtn {
  position: fixed;
  bottom: 55px;
  right: 20px;
  z-index: 9999;
  cursor: pointer;
  display: none;
  opacity: 0;
  transform: translateY(12px) scale(0.92);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}

#backToTopBtn.is-visible,
#backToTopBtn[style*="display: block"],
#backToTopBtn[style*="display:block"] {
  opacity: 1;
  transform: none;
}

#backToTopBtn div {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#backToTopBtn button {
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FF794A;
  border: 3px solid #FF794A;
  border-radius: 50%;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(225, 86, 37, 0.32);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#backToTopBtn button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

#backToTopBtn button:hover {
  background: #2356A5;
  border-color: #2356A5;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(35, 86, 165, 0.35);
}

#backToTopBtn button:hover::after {
  opacity: 1;
}

#backToTopBtn button:active {
  transform: translateY(-1px) scale(0.96);
}

#backToTopBtn p {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #FF794A;
  margin-bottom: 0;
  margin-top: 6px;
  white-space: nowrap;
  transition: color 0.25s ease;
}

#backToTopBtn.scrolled-90 p,
#backToTopBtn button:hover + p,
#backToTopBtn:hover p {
  color: #2356A5;
}

@media (max-width: 767px) {
  .mobile#backToTopBtn,
  #backToTopBtn {
    display: none !important;
  }
}
