:root {
  color-scheme: light;
  --bg: #fbf7ef;
  --surface: #fffdf9;
  --ink: #0f2247;
  --ink-2: #1c3158;
  --muted: #59657a;
  --line: rgba(15, 34, 71, 0.14);
  --coral: #d65b3d;
  --gold: #e9aa22;
  --blue: #62a5d2;
  --green: #6da47a;
  --violet: #9273bd;
  --slate: #648da4;
  --shadow: 0 26px 70px rgba(15, 34, 71, 0.14);
  --soft-shadow: 0 12px 26px rgba(15, 34, 71, 0.08);
  --radius: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 3% 24%, rgba(233, 170, 34, 0.18), transparent 15rem),
    linear-gradient(180deg, #fffaf1 0%, var(--bg) 46%, #f4ead9 100%);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.page-frame {
  width: min(1400px, calc(100% - 40px));
  margin: 48px auto;
  overflow: hidden;
  border: 1px solid rgba(15, 34, 71, 0.18);
  border-radius: 32px;
  background:
    radial-gradient(circle at 0 13%, rgba(233, 170, 34, 0.9) 0 54px, transparent 55px),
    radial-gradient(circle at 100% 89%, rgba(100, 141, 164, 0.22) 0 84px, transparent 85px),
    var(--surface);
  box-shadow: var(--shadow);
}

.site-header,
main,
.site-footer {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  padding: 26px 0 0;
}

.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(15, 34, 71, 0.11);
  padding-bottom: 18px;
}

.brand,
.nav-links a {
  font-weight: 850;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 1.04rem;
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 28px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.brand-mark svg,
.card-icon svg {
  width: 100%;
  height: 100%;
}

.brand-mark path,
.card-icon path,
.card-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: flex-end;
}

.nav-links a {
  position: relative;
  color: var(--ink);
  font-size: 0.94rem;
  padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--coral);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  background: var(--coral);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.43fr) minmax(0, 0.57fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 430px;
  padding: clamp(42px, 5vw, 68px) 0 34px;
}

.hero-copy {
  max-width: 500px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 6.2vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.88;
  margin-bottom: 22px;
}

h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 10px;
}

h3 {
  color: var(--ink);
  font-size: clamp(1.02rem, 1.45vw, 1.28rem);
  line-height: 1.18;
  margin-bottom: 9px;
}

.lead {
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.45vw, 1.24rem);
  font-weight: 650;
  line-height: 1.35;
  max-width: 460px;
}

.sublead,
.section-heading p,
.topic-card p,
.page-intro p,
.empty-panel p,
.info-section p,
.meta {
  color: var(--muted);
}

.sublead {
  font-size: 0.98rem;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 18px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fffdf9;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 850;
  padding: 10px 16px;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button:hover {
  background: var(--ink-2);
  box-shadow: 0 10px 22px rgba(15, 34, 71, 0.18);
  transform: translateY(-2px);
}

.meta {
  font-size: 0.88rem;
  margin: 0;
}

.info-panel {
  max-width: 520px;
  margin: 18px 0 0;
  border: 1px solid rgba(214, 91, 61, 0.2);
  border-radius: 12px;
  background: rgba(255, 246, 225, 0.9);
  padding: 14px 16px;
}

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.hero-art img {
  display: block;
  width: min(100%, 720px);
  max-height: 390px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.section {
  padding: 34px 0;
  scroll-margin-top: 24px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 22px;
}

.eyebrow,
.card-label {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.section-heading p {
  max-width: 760px;
  font-size: 0.98rem;
  margin-bottom: 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.is-hidden {
  display: none !important;
}

.topic-card {
  --card-color: var(--gold);
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon title"
    "icon body"
    "icon link";
  column-gap: 18px;
  min-height: 172px;
  overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--card-color) 42%, transparent);
  border-radius: 12px;
  background:
    radial-gradient(circle at 98% 100%, color-mix(in srgb, var(--card-color) 18%, transparent) 0 76px, transparent 77px),
    var(--surface);
  box-shadow: var(--soft-shadow);
  padding: 22px;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.topic-card:hover {
  border-color: var(--card-color);
  box-shadow: 0 18px 34px rgba(15, 34, 71, 0.13);
  transform: translateY(-4px);
}

.topic-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -36px;
  width: 112px;
  height: 112px;
  border: 18px solid color-mix(in srgb, var(--card-color) 20%, transparent);
  border-radius: 50%;
}

.card-icon {
  grid-area: icon;
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card-color);
  color: #fffdf9;
  padding: 13px;
}

.card-label {
  grid-area: label;
  color: var(--card-color);
  margin-bottom: 5px;
}

.topic-card h3 {
  grid-area: title;
  min-width: 0;
}

.topic-card h3 small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.25;
}

.topic-card p {
  grid-area: body;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 10px;
}

.card-link {
  grid-area: link;
  align-self: end;
  color: var(--card-color);
  font-size: 0.86rem;
  font-weight: 900;
  min-width: 0;
}

.status-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--card-color) 32%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-color) 12%, #fffdf9);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 4px 8px;
}

.card-jobs {
  --card-color: var(--gold);
}

.card-education {
  --card-color: var(--blue);
}

.card-age {
  --card-color: var(--coral);
}

.card-experience {
  --card-color: var(--green);
}

.card-birthplace {
  --card-color: var(--violet);
}

.card-committees {
  --card-color: var(--slate);
}

.support-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 8px 0 34px;
  border: 1.5px solid rgba(233, 170, 34, 0.42);
  border-radius: 18px;
  background:
    radial-gradient(circle at 96% 10%, rgba(233, 170, 34, 0.18), transparent 10rem),
    #fff6df;
  box-shadow: 0 12px 26px rgba(15, 34, 71, 0.07);
  padding: 22px 24px;
}

.support-icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(233, 170, 34, 0.18);
  color: var(--gold);
  flex: 0 0 auto;
}

.support-icon svg {
  width: 34px;
  height: 34px;
}

.support-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.support-copy h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  margin-bottom: 8px;
}

.support-copy p:last-child {
  color: var(--ink-2);
  margin-bottom: 0;
  max-width: 680px;
}

.support-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--coral);
  color: #fffdf9;
  font-weight: 900;
  padding: 11px 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.support-button:hover {
  background: #bf4f35;
  box-shadow: 0 12px 24px rgba(214, 91, 61, 0.22);
  transform: translateY(-2px);
}

.info-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  border-top: 1px solid rgba(15, 34, 71, 0.12);
}

.info-section p {
  max-width: 780px;
  font-size: 1.03rem;
}

.source-section {
  padding-top: 30px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  border-top: 1px solid rgba(15, 34, 71, 0.12);
  color: var(--muted);
  padding: 28px 0 34px;
}

.site-footer strong {
  color: var(--ink);
}

.page-shell .site-header,
.page-shell main,
.page-shell .site-footer {
  width: min(1180px, calc(100% - 40px));
}

.page-shell .site-header {
  padding-bottom: 12px;
}

.page-main {
  min-height: 58vh;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--ink-2);
  font-weight: 900;
  text-decoration: none;
}

.back-link:hover {
  color: var(--coral);
}

.page-intro {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 34, 71, 0.16);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 3rem clamp(1.8rem, 4vw, 3rem);
}

.page-intro::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -76px;
  top: -82px;
  border-radius: 50%;
  background: rgba(233, 170, 34, 0.18);
}

.page-intro > * {
  position: relative;
  z-index: 1;
}

.page-title {
  max-width: 1100px;
  font-size: clamp(3.1rem, 5.6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.page-intro p {
  max-width: 720px;
  font-size: 1.04rem;
}

.page-intro > p:last-child {
  max-width: 780px;
  line-height: 1.65;
}

.profession-chart-card {
  margin-top: 28px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  padding: clamp(22px, 4vw, 34px);
}

.profession-story-card {
  position: relative;
  margin-top: 28px;
  border: 1px solid rgba(15, 34, 71, 0.1);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  padding: clamp(22px, 4vw, 34px);
}

.profession-race-wrapper {
  position: relative;
  min-height: 520px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(15, 34, 71, 0.08);
  border-radius: 18px;
  background: #fffdf9;
  overflow: hidden;
}

.profession-race-current-term {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin: 8px 0 10px;
  color: #0f2247;
}

.profession-race-chart {
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.profession-race-term-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.profession-race-term-years {
  color: #667085;
  font-size: 15px;
}

@media (prefers-reduced-motion: reduce) {
  .animation-action,
  .term-button {
    transition: none;
  }

  .term-button:hover:not(:disabled) {
    transform: none;
  }

  .education-terms-conclusion {
    transition: none;
  }

  .education-terms-conclusion.is-hidden {
    transform: none;
  }
}

.analysis-header {
  max-width: 820px;
  margin-bottom: 1.25rem;
}

.analysis-eyebrow {
  margin: 0 0 0.38rem;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
}

.analysis-title {
  margin: 0;
  color: #0f2247;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 2.4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.analysis-subtitle {
  margin: 0;
  color: #0f2247;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  font-weight: 800;
  line-height: 1.15;
}

.analysis-lead {
  max-width: 720px;
  margin: 0.7rem 0 0;
  color: #536079;
  font-size: 1rem;
  line-height: 1.58;
}

.analysis-meta {
  margin: 0.55rem 0 0;
  color: #6b7588;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.chart-section-note {
  max-width: 720px;
  margin: 0.7rem 0 0;
  padding-left: 0.9rem;
  border-left: 3px solid rgba(184, 120, 58, 0.28);
  color: #6b7588;
  font-size: 0.95rem;
  line-height: 1.55;
}

.donut-lead-lines {
  display: grid;
  gap: 0.35rem;
  margin: 0.85rem 0 0.8rem;
}

.donut-lead-lines p {
  margin: 0;
  color: #0f2247;
  font-size: 1.02rem;
  line-height: 1.45;
}

.donut-lead-lines strong {
  font-weight: 800;
}

.group-highlight {
  display: inline-block;
  padding: 0.06em 0.38em 0.1em;
  border-radius: 0.45em;
  font-weight: 900;
  line-height: 1.1;
}

.group-education {
  background: rgba(143, 175, 212, 0.22);
  color: #5f83ad;
}

.group-politics {
  background: rgba(179, 106, 46, 0.18);
  color: #9b5c28;
}

.group-business {
  background: rgba(212, 164, 75, 0.22);
  color: #a87c32;
}

.group-law {
  background: rgba(95, 126, 164, 0.18);
  color: #547192;
}

.donut-lead-note {
  max-width: 760px;
  margin: 0;
  color: #536079;
  font-size: 0.95rem;
  line-height: 1.6;
}

.profession-chart-area {
  position: relative;
  min-width: 0;
  width: 100%;
  border-radius: 18px;
  background: #fffdf9;
}

.profession-chart {
  width: 100%;
  min-height: 620px;
  opacity: 1;
  visibility: visible;
  filter: none;
}

.profession-chart canvas,
.profession-chart svg {
  opacity: 1;
  visibility: visible;
  filter: none;
}

.chart-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.92);
  color: var(--muted);
  font-weight: 850;
  text-align: center;
  padding: 24px;
}

.chart-status[hidden] {
  display: none !important;
}

.chart-status.is-error {
  color: var(--coral);
}

.chart-methodology {
  margin-top: 18px;
  border-top: 1px solid rgba(15, 34, 71, 0.12);
  padding-top: 14px;
}

.profession-commentary {
  margin-top: 1.2rem;
  border: 1px solid rgba(184, 120, 58, 0.16);
  border-radius: 22px;
  background: rgba(255, 248, 235, 0.55);
  padding: 1.35rem 1.5rem;
}

.profession-commentary .analysis-subtitle {
  margin-bottom: 1rem;
}

.commentary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.4rem;
}

.commentary-list p {
  margin: 0;
  color: #536079;
  font-size: 0.98rem;
  line-height: 1.55;
}

.commentary-list strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #0f2247;
  font-weight: 800;
}

.profession-other-note {
  margin-top: 1rem;
  border: 1px solid rgba(15, 34, 71, 0.08);
  border-radius: 18px;
  background: rgba(15, 34, 71, 0.035);
  padding: 1.1rem 1.25rem;
}

.profession-other-note h3 {
  margin: 0 0 0.5rem;
  color: #0f2247;
  font-size: 1.05rem;
}

.profession-other-note p {
  margin: 0 0 0.65rem;
  color: #536079;
  line-height: 1.55;
}

.profession-other-note ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #536079;
  line-height: 1.55;
}

.profession-donuts {
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(15, 34, 71, 0.08);
}

.donut-visuals {
  position: relative;
}

.donut-status {
  margin: 1rem 0 0;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.92);
  color: var(--muted);
  font-weight: 850;
  text-align: center;
  padding: 18px;
}

.donut-status[hidden] {
  display: none !important;
}

.donut-status.is-error {
  color: var(--coral);
}

.donut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.6rem;
}

.donut-card {
  min-width: 0;
  padding: 1.35rem 1.45rem 1.25rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 34, 71, 0.08);
}

.donut-card h3 {
  margin: 0;
  color: #0f2247;
  font-size: 1.05rem;
  line-height: 1.2;
}

.donut-term-meta {
  margin: 0.2rem 0 0.4rem;
  color: #536079;
  font-size: 0.9rem;
  line-height: 1.35;
}

.donut-leading-group-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 0.9rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 248, 235, 0.9);
  border: 1px solid rgba(184, 120, 58, 0.18);
  color: #0f2247;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.donut-leading-group-badge span {
  color: #b85f3d;
  font-weight: 900;
}

.profession-donut-chart {
  width: 100%;
  min-height: 430px;
}

.donut-top-list {
  display: grid;
  gap: 0.65rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  color: #536079;
  font-size: 0.94rem;
  line-height: 1.35;
}

.donut-top-list::before {
  content: "Top 5 grup";
  display: block;
  margin-bottom: 0.15rem;
  color: #b85f3d;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.donut-top-item {
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  background: rgba(15, 34, 71, 0.025);
  border: 1px solid rgba(15, 34, 71, 0.06);
}

.donut-top-item.is-leading {
  background: rgba(255, 248, 235, 0.85);
  border-color: rgba(184, 120, 58, 0.18);
}

.donut-top-item.is-other {
  margin-top: 0.15rem;
  border-color: rgba(15, 34, 71, 0.06);
  background: rgba(15, 34, 71, 0.035);
}

.donut-top-list li.breakdown {
  display: block;
  padding: 0 0.2rem 0.1rem;
  border: 0;
  background: transparent;
  color: #6b7588;
  font-size: 0.82rem;
  line-height: 1.45;
}

.donut-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.donut-top-main {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
}

.donut-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(15, 34, 71, 0.08);
  color: #0f2247;
  font-size: 0.76rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.donut-top-item.is-leading .donut-rank {
  background: #b8783a;
  color: #fff;
}

.donut-top-item.is-other .donut-rank {
  background: rgba(15, 34, 71, 0.06);
  color: #536079;
}

.donut-top-list .dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.donut-top-list .name {
  color: #0f2247;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-top-list .value {
  color: #0f2247;
  font-weight: 800;
  flex: 0 0 4.4rem;
  min-width: 4.4rem;
  text-align: right;
  white-space: nowrap;
}

.donut-bar-track {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: #edf0f4;
  overflow: hidden;
}

.donut-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.donut-method-note {
  max-width: 780px;
  margin: 1rem 0 0;
  color: #536079;
  font-size: 0.95rem;
  line-height: 1.6;
}

.chart-methodology summary {
  width: fit-content;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 900;
}

.chart-methodology summary:hover {
  color: var(--coral);
}

.chart-methodology p {
  max-width: 820px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.chart-tooltip-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
  margin-top: 10px;
}

.chart-tooltip-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
}

.tooltip-muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.education-chart-card {
  margin-top: 28px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  padding: clamp(22px, 4vw, 34px);
}

.education-chart-area {
  position: relative;
  min-width: 0;
  width: 100%;
  border-radius: 18px;
  background: #fffdf9;
}

.education-terms-chart,
.education-clubs-chart {
  width: 100%;
  opacity: 1;
  visibility: visible;
  filter: none;
}

.education-terms-chart {
  min-height: 430px;
}

.education-terms-conclusion {
  max-width: 780px;
  margin: 1rem 0 0;
  border-left: 4px solid rgba(184, 120, 58, 0.72);
  border-radius: 14px;
  background: rgba(255, 248, 235, 0.58);
  opacity: 1;
  padding: 0.95rem 1rem;
  transform: translateY(0);
  transition: opacity 520ms ease, transform 520ms ease;
}

.education-terms-conclusion.is-hidden {
  opacity: 0;
  transform: translateY(10px);
}

.education-terms-conclusion strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #9b5c28;
  font-family: inherit;
  font-size: clamp(1.12rem, 2.2vw, 1.45rem);
  font-weight: 950;
  line-height: 1.15;
}

.education-terms-conclusion p {
  max-width: 720px;
  margin: 0;
  color: #536079;
  font-size: 1rem;
  line-height: 1.6;
}

.education-clubs-chart {
  min-height: 230px;
}

.education-terms-chart canvas,
.education-terms-chart svg,
.education-clubs-chart canvas,
.education-clubs-chart svg {
  opacity: 1;
  visibility: visible;
  filter: none;
}

.education-callouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.education-callout {
  border: 1px solid rgba(184, 120, 58, 0.16);
  border-radius: 20px;
  background: rgba(255, 248, 235, 0.62);
  padding: 1.15rem 1.25rem;
}

.education-callout strong {
  display: block;
  margin-bottom: 0.45rem;
  color: #9b5c28;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3.3vw, 2.6rem);
  line-height: 1;
}

.education-callout p {
  margin: 0;
  color: #536079;
  font-size: 0.98rem;
  line-height: 1.55;
}

.education-commentary {
  margin-top: 1.25rem;
}

.education-term-filter {
  margin: 0.4rem 0 1.2rem;
  border: 1px solid rgba(15, 34, 71, 0.1);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.72);
  padding: 1rem 1.1rem;
}

.term-switcher-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.analysis-animation-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.animation-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.animation-action {
  min-height: 38px;
  border: 1px solid rgba(15, 34, 71, 0.18);
  border-radius: 9px;
  background: rgba(255, 253, 249, 0.82);
  color: #315f91;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  padding: 0.45rem 0.85rem;
  transition: background-color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.animation-action:hover:not(:disabled),
.animation-action:focus-visible:not(:disabled) {
  border-color: #4e79a7;
  background: rgba(78, 121, 167, 0.1);
}

.animation-action:focus-visible {
  outline: 2px solid rgba(49, 95, 145, 0.25);
  outline-offset: 2px;
}

.animation-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.term-switcher {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
}

.term-switcher-label {
  flex: 0 0 auto;
  color: #536079;
  font-size: 0.9rem;
  font-weight: 850;
}

.term-switcher-options {
  display: flex;
  min-width: 0;
  gap: 0.55rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0.1rem;
  scrollbar-width: thin;
}

.term-button {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 38px;
  border: 1px solid rgba(15, 34, 71, 0.16);
  border-radius: 9px;
  background: #fffdf9;
  color: #0f2247;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  padding: 0.45rem 0.8rem;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.term-button:hover:not(:disabled),
.term-button:focus-visible:not(:disabled) {
  border-color: var(--coral);
  background: #fff6e1;
  transform: translateY(-1px);
}

.term-button:focus-visible {
  outline: 2px solid rgba(178, 118, 61, 0.32);
  outline-offset: 2px;
}

.term-button.is-active {
  border-color: #b2763d;
  background: #b2763d;
  color: #fffdf9;
}

.term-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.education-current-term {
  margin: 0.8rem 0 0;
  color: #0f2247;
  font-size: 1rem;
  font-weight: 850;
}

.education-club-panels {
  display: grid;
  gap: 1rem;
}

.education-club-panel {
  border: 1px solid rgba(15, 34, 71, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  padding: clamp(16px, 3vw, 22px);
}

.education-club-panel h3 {
  margin: 0 0 0.3rem;
  color: #0f2247;
  font-size: 1.15rem;
  line-height: 1.2;
}

.education-ranking-panel {
  border: 1px solid rgba(15, 34, 71, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  padding: clamp(16px, 3vw, 22px);
}

.education-ranking-insight {
  margin: 0 0 1rem;
  color: #0f2247;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.45;
}

.education-higher-ranking {
  display: grid;
  gap: 0.75rem;
}

.education-ranking-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr) minmax(58px, auto);
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  border-radius: 14px;
  padding: 0.35rem 0.25rem;
}

.education-ranking-row.is-other {
  margin-top: 0.35rem;
  border-top: 1px solid rgba(15, 34, 71, 0.08);
  border-radius: 0;
  padding-top: 0.85rem;
}

.education-ranking-row:focus-visible {
  outline: 3px solid rgba(178, 118, 61, 0.28);
  outline-offset: 3px;
}

.education-ranking-label {
  min-width: 0;
}

.education-ranking-label strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0f2247;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.2;
}

.education-ranking-label span {
  display: block;
  margin-top: 0.16rem;
  color: #6b7588;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.education-ranking-track {
  min-width: 0;
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(78, 121, 167, 0.13);
}

.education-ranking-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4e79a7;
  box-shadow: inset 0 -1px 0 rgba(15, 34, 71, 0.14);
}

.education-ranking-value {
  color: #0f2247;
  font-size: 0.98rem;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.education-ranking-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  display: none;
  max-width: min(360px, calc(100vw - 48px));
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 16px 38px rgba(15, 34, 71, 0.16);
  color: #0f2247;
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 0.85rem 0.95rem;
}

.education-ranking-row:hover .education-ranking-tooltip,
.education-ranking-row:focus-within .education-ranking-tooltip {
  display: block;
}

.education-panel-count {
  margin: 0 0 0.25rem;
  color: #536079;
  font-size: 0.96rem;
  font-weight: 850;
}

.education-panel-method-note {
  max-width: 760px;
  margin: 0 0 0.75rem;
  color: #6b7588;
  font-size: 0.86rem;
  line-height: 1.45;
}

.education-ranking-panel .education-panel-method-note {
  margin: 1rem 0 0;
}

.education-chart-caption {
  max-width: 780px;
  margin: 0.95rem 0 0;
  color: #536079;
  font-size: 0.95rem;
  line-height: 1.55;
}

.education-other-clubs {
  max-width: 860px;
  margin: 0.7rem 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #536079;
  font-size: 0.92rem;
  line-height: 1.55;
  padding: 0;
}

.education-omitted-groups {
  max-width: 780px;
  margin: 0.8rem 0 0;
  color: #6b7588;
  font-size: 0.92rem;
  line-height: 1.5;
}

.birthplace-intro-note {
  margin-top: 0.8rem;
  color: #6b7588;
  font-size: 0.96rem;
}

.birthplace-card {
  position: relative;
  margin-top: 28px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  padding: clamp(22px, 4vw, 34px);
}

.birthplace-ranking-panel,
.birthplace-map-panel {
  position: relative;
  border: 1px solid rgba(15, 34, 71, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  padding: clamp(16px, 3vw, 22px);
}

.birthplace-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
}

.birthplace-methodology-info {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.birthplace-info-button {
  display: inline-flex;
  width: 1.65rem;
  height: 1.65rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(78, 121, 167, 0.35);
  border-radius: 50%;
  background: rgba(78, 121, 167, 0.1);
  color: #315f91;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.birthplace-info-button:hover,
.birthplace-info-button:focus-visible {
  border-color: #4e79a7;
  outline: none;
}

.birthplace-methodology-tooltip,
.birthplace-ranking-tooltip {
  position: absolute;
  z-index: 10;
  display: grid;
  gap: 0.45rem;
  border: 1px solid rgba(15, 34, 71, 0.1);
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 14px 34px rgba(15, 34, 71, 0.16);
  color: #263b60;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
  opacity: 0;
  padding: 0.75rem 0.85rem;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  visibility: hidden;
}

.birthplace-methodology-tooltip {
  top: calc(100% + 0.55rem);
  left: 50%;
  width: min(360px, calc(100vw - 48px));
  transform: translate(-50%, 4px);
}

.birthplace-methodology-info:hover .birthplace-methodology-tooltip,
.birthplace-methodology-info:focus-within .birthplace-methodology-tooltip,
.birthplace-methodology-info.is-open .birthplace-methodology-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.birthplace-ranking {
  display: grid;
  gap: 0.72rem;
}

.birthplace-ranking-row {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem minmax(190px, 0.3fr) minmax(0, 1fr) minmax(62px, auto);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  will-change: transform, opacity;
}

.birthplace-ranking-row.is-winner {
  background: rgba(246, 225, 184, 0.28);
}

.birthplace-ranking-row:focus-visible {
  outline: 2px solid rgba(78, 121, 167, 0.45);
  outline-offset: 2px;
}

.birthplace-ranking-position {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(78, 121, 167, 0.13);
  color: #0f2247;
  font-size: 0.82rem;
  font-weight: 950;
}

.birthplace-ranking-label {
  min-width: 0;
}

.birthplace-ranking-label strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0f2247;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.2;
}

.birthplace-ranking-track {
  min-width: 0;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(78, 121, 167, 0.13);
}

.birthplace-ranking-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4e79a7;
  box-shadow: inset 0 -1px 0 rgba(15, 34, 71, 0.14);
}

.birthplace-ranking-row.is-winner .birthplace-ranking-position {
  background: #315f91;
  color: #fff;
}

.birthplace-ranking-row.is-winner .birthplace-ranking-fill {
  background: #315f91;
}

.birthplace-ranking-value {
  color: #0f2247;
  font-size: 0.98rem;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.birthplace-ranking-tooltip {
  left: clamp(3rem, 22%, 13rem);
  bottom: calc(100% - 0.35rem);
  width: min(310px, calc(100% - 4rem));
}

.birthplace-ranking-tooltip strong,
.birthplace-ranking-tooltip span {
  display: block;
}

.birthplace-ranking-row:hover .birthplace-ranking-tooltip,
.birthplace-ranking-row:focus .birthplace-ranking-tooltip,
.birthplace-ranking-row:focus-within .birthplace-ranking-tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.birthplace-empty {
  margin: 0;
  color: #536079;
  font-weight: 800;
}

.birthplace-map-panel {
  margin-top: 1rem;
}

.birthplace-ranking-panel .term-switcher-actions,
.birthplace-map-panel .term-switcher-actions {
  margin-bottom: 1rem;
}

.birthplace-live-term {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.birthplace-map-meta {
  display: flex;
  justify-content: flex-end;
  margin: -0.35rem 0 0.55rem;
}

.birthplace-ranking-panel .birthplace-ranking {
  margin-top: 0.15rem;
}

.birthplace-map-count {
  margin: 0.1rem 0 0;
  color: #7b8494;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: right;
}

.birthplace-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  margin: 0 0 0.7rem;
  color: #536079;
  font-size: 0.82rem;
  font-weight: 750;
}

.birthplace-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.birthplace-map-legend i {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(15, 34, 71, 0.1);
}

.birthplace-map-legend .is-top-five {
  background: #d97706;
}

.birthplace-map-legend .is-over-one-percent {
  background: #2563eb;
}

.birthplace-map-legend .is-remaining {
  background: #1f2937;
}

.birthplace-map {
  width: 100%;
  height: clamp(470px, 49vw, 590px);
  border: 1px solid rgba(15, 34, 71, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
}

.birthplace-map canvas,
.birthplace-map svg {
  opacity: 1;
  visibility: visible;
  filter: none;
}

.birthplace-notes {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.birthplace-notes p {
  margin: 0;
  color: #6b7588;
  font-size: 0.92rem;
  line-height: 1.5;
}

.chart-methodology ul {
  max-width: 860px;
  margin: 12px 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.prepare-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf9;
  font-weight: 900;
  padding: 8px 12px;
}

.empty-panel {
  margin-top: 24px;
  border: 2px dashed rgba(15, 34, 71, 0.22);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.72);
  padding: clamp(26px, 5vw, 46px);
}

.empty-panel-symbol {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--gold);
  color: var(--ink);
  font-size: 1.7rem;
  font-weight: 900;
}

@media (max-width: 1040px) {
  .page-frame {
    width: min(100% - 24px, 1400px);
    margin: 24px auto;
  }

  .site-header,
  main,
  .site-footer {
    width: min(100% - 48px, 1200px);
  }

  .hero {
    grid-template-columns: minmax(0, 0.48fr) minmax(0, 0.52fr);
    gap: 28px;
  }

  .hero-art img {
    max-height: 330px;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .page-frame {
    width: min(100% - 16px, 1400px);
    margin: 8px auto 18px;
    border-radius: 24px;
  }

  .site-header,
  main,
  .site-footer,
  .page-shell .site-header,
  .page-shell main,
  .page-shell .site-footer {
    width: min(100% - 28px, 1200px);
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    gap: 14px 20px;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 34px 0 24px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.7rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .button {
    justify-content: center;
  }

  .hero-art img {
    width: 100%;
    max-height: 260px;
  }

  .section {
    padding: 30px 0;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .profession-chart-card {
    padding: 18px;
  }

  .profession-story-card {
    padding: 18px;
  }

  .profession-race-wrapper,
  .profession-race-chart {
    min-height: 620px;
  }

  .profession-race-wrapper {
    aspect-ratio: auto;
  }

  .profession-race-current-term {
    gap: 0.6rem;
    margin: 8px 0 8px;
  }

  .profession-race-term-number {
    font-size: 32px;
  }

  .profession-race-term-years {
    font-size: 14px;
  }

  .page-intro {
    padding: 2rem 1.35rem;
  }

  .page-title {
    max-width: 100%;
    font-size: clamp(2.8rem, 12vw, 4rem);
    line-height: 0.95;
  }

  .profession-chart {
    min-height: 740px;
  }

  .profession-commentary {
    padding: 1.15rem;
  }

  .commentary-list {
    grid-template-columns: 1fr;
  }

  .donut-grid {
    grid-template-columns: 1fr;
  }

  .profession-donut-chart {
    min-height: 370px;
  }

  .education-chart-card {
    padding: 18px;
  }

  .education-terms-chart {
    min-height: 400px;
  }

  .education-clubs-chart {
    min-height: 250px;
  }

  .education-ranking-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.75rem;
    padding-block: 0.5rem;
  }

  .education-ranking-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .education-ranking-tooltip {
    position: static;
    grid-column: 1 / -1;
    margin-top: 0.3rem;
  }

  .education-callouts {
    grid-template-columns: 1fr;
  }

  .term-switcher-options {
    gap: 0.45rem;
  }

  .term-button {
    min-width: 48px;
    padding-inline: 0.65rem;
  }

  .analysis-animation-controls .term-switcher {
    flex-basis: 100%;
  }

  .birthplace-card {
    padding: 18px;
  }

  .birthplace-ranking-row {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 0.45rem 0.65rem;
  }

  .birthplace-ranking-track {
    grid-column: 2 / -1;
    grid-row: 2;
    height: 20px;
  }

  .birthplace-methodology-tooltip {
    right: 0;
    left: auto;
    transform: translateY(4px);
  }

  .birthplace-methodology-info:hover .birthplace-methodology-tooltip,
  .birthplace-methodology-info:focus-within .birthplace-methodology-tooltip,
  .birthplace-methodology-info.is-open .birthplace-methodology-tooltip {
    transform: translateY(0);
  }

  .birthplace-ranking-tooltip {
    left: 2.65rem;
    width: calc(100% - 3.4rem);
  }

  .birthplace-map-count {
    margin-top: 0.45rem;
    text-align: left;
  }

  .birthplace-map {
    height: clamp(310px, 92vw, 420px);
    min-height: 0;
  }

  .topic-card {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 14px;
    min-height: 0;
    padding: 18px;
  }

  .card-icon {
    width: 46px;
    height: 46px;
    padding: 11px;
  }

  .status-pill {
    position: static;
    width: fit-content;
    margin-bottom: 7px;
  }

  .support-section {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 30px;
    padding: 20px;
  }

  .support-button {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .info-section {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .site-footer {
    flex-direction: column;
  }
}
