@font-face {
  font-family: "EA Rubik";
  src: url("./fonts/Rubik-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EA Rubik";
  src: url("./fonts/Rubik-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EA Rubik";
  src: url("./fonts/Rubik-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EA Rubik";
  src: url("./fonts/Rubik-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f2e8;
  --bg-soft: #efe6d0;
  --surface: rgba(255, 250, 242, 0.74);
  --surface-strong: rgba(255, 250, 242, 0.92);
  --surface-deep: rgba(20, 43, 66, 0.88);
  --line: rgba(13, 94, 168, 0.14);
  --line-strong: rgba(13, 94, 168, 0.26);
  --ink: #17324a;
  --ink-soft: #56697d;
  --primary: #0d5ea8;
  --primary-strong: #0a4d89;
  --secondary: #16817a;
  --accent: #d9a441;
  --success: #2f855a;
  --warning: #b7791f;
  --danger: #c05621;
  --shadow-lg: 0 28px 80px rgba(20, 42, 63, 0.12);
  --shadow-md: 0 18px 42px rgba(20, 42, 63, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --max-width: 1240px;
  --font-family: "EA Rubik", "Rubik", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(13, 94, 168, 0.24), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(22, 129, 122, 0.18), transparent 20%),
    radial-gradient(circle at 68% 74%, rgba(217, 164, 65, 0.16), transparent 24%),
    linear-gradient(180deg, #fffdfa 0%, #f8f4ec 40%, var(--bg) 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.24;
  z-index: 0;
  animation: float-glow 16s ease-in-out infinite;
}

body::before {
  top: -20vmax;
  left: -14vmax;
  background: rgba(13, 94, 168, 0.28);
}

body::after {
  right: -18vmax;
  bottom: -22vmax;
  background: rgba(22, 129, 122, 0.24);
  animation-delay: -8s;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-page {
  position: relative;
  z-index: 1;
}

.site-shell {
  width: min(var(--max-width), calc(100% - 28px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 16px 0 0;
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(var(--max-width), calc(100% - 28px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid rgba(13, 94, 168, 0.1);
  border-radius: 999px;
  background: rgba(248, 244, 236, 0.72);
  box-shadow: var(--shadow-md);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(13, 94, 168, 0.18);
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--secondary);
}

.brand-title,
.hero-title,
.section-title,
.metric-value,
.result-title,
.panel-title {
  font-family: var(--font-family);
}

.brand-title {
  font-size: 1.08rem;
  font-weight: 800;
}

.brand-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.local-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.local-links a,
.lang-button,
.ghost-button,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(13, 94, 168, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.82);
  color: var(--primary-strong);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.local-links a:hover,
.lang-button:hover,
.ghost-button:hover,
.chip:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.local-links a.active,
.lang-button.active,
.primary-button {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 38px rgba(13, 94, 168, 0.16);
}

.language-switch {
  display: none;
}

.hero {
  padding: 34px 0 22px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(13, 94, 168, 0.12);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(13, 94, 168, 0.12), rgba(22, 129, 122, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 250, 242, 0.9));
  box-shadow: var(--shadow-lg);
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(13, 94, 168, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 94, 168, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

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

.hero-copy p,
.section-copy,
.result-copy,
.panel-copy,
.fineprint,
.source-copy,
.metric-label,
.empty-state,
.field label,
.inline-note {
  color: var(--ink-soft);
  line-height: 1.6;
}

.hero-actions,
.stat-grid,
.tag-row,
.source-list,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(13, 94, 168, 0.12);
  cursor: pointer;
}

.ghost-button {
  background: rgba(255, 250, 242, 0.8);
}

.hero-panel,
.section-card,
.result-card,
.source-card,
.empty-state,
.loading-card,
.error-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.hero-panel,
.section-card,
.result-card,
.source-card,
.loading-card,
.error-card {
  padding: 22px;
}

.hero-panel {
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(217, 164, 65, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 250, 242, 0.92));
}

.info-block {
  position: relative;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.block-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.block-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
}

.block-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.tool-button {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(13, 94, 168, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.9);
  color: var(--primary-strong);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.tool-button:hover,
.tool-button.active {
  transform: translateY(-1px);
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 26px rgba(13, 94, 168, 0.14);
  color: #fff;
}

.tool-button-info {
  min-width: 38px;
  padding-inline: 0;
}

.block-help {
  display: none;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(13, 94, 168, 0.06);
  border: 1px solid rgba(13, 94, 168, 0.1);
  color: var(--ink-soft);
  line-height: 1.6;
}

.block-help-open > .block-help,
.block-help-open .block-help:first-of-type {
  display: block;
}

.block-is-hidden {
  display: none;
}

.hidden-blocks-dock {
  position: sticky;
  bottom: 16px;
  z-index: 25;
  width: min(var(--max-width), calc(100% - 28px));
  margin: 0 auto 28px;
  padding: 18px 20px;
  border: 1px solid rgba(13, 94, 168, 0.12);
  border-radius: 26px;
  background: rgba(248, 244, 236, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.hidden-blocks-dock.is-empty {
  display: none;
}

.hidden-blocks-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hidden-blocks-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.restore-chip {
  cursor: pointer;
}

.stat-grid {
  margin-top: 18px;
}

.stat-card {
  min-width: 150px;
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(13, 94, 168, 0.08);
}

.metric-label {
  display: block;
  font-size: 0.9rem;
}

.metric-value {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
}

.section {
  padding: 12px 0 24px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: 1.5rem;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.55fr);
  gap: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(13, 94, 168, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.96);
  color: var(--ink);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.result-card {
  overflow: hidden;
}

.result-title,
.panel-title {
  margin: 0;
  font-size: 1.18rem;
}

.result-head,
.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(13, 94, 168, 0.08);
  color: var(--primary-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.pill.warning {
  background: rgba(217, 164, 65, 0.18);
  color: var(--warning);
}

.pill.success {
  background: rgba(47, 133, 90, 0.16);
  color: var(--success);
}

.pill.danger {
  background: rgba(192, 86, 33, 0.14);
  color: var(--danger);
}

.data-points {
  display: grid;
  gap: 10px;
}

.data-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.96rem;
}

.data-line strong {
  color: var(--ink);
}

.tag-row {
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(13, 94, 168, 0.06);
  color: var(--primary-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(13, 94, 168, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  transform-origin: left center;
  animation: grow-bar 900ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.split-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bulletin {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(13, 94, 168, 0.08);
}

.source-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 250, 242, 0.94));
}

.source-list {
  margin-top: 14px;
}

.source-item {
  flex: 1 1 280px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(13, 94, 168, 0.08);
}

.source-code {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 43, 66, 0.08);
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric-stack,
.compare-stack,
.answer-list,
.detail-list,
.timeline-list {
  display: grid;
  gap: 12px;
}

.metric-row,
.timeline-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(13, 94, 168, 0.08);
}

.metric-row header,
.compare-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.compare-grid,
.kpi-grid,
.mini-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare-card,
.quiz-card {
  padding: 18px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(13, 94, 168, 0.08);
}

.comparison-value {
  font-size: 1.24rem;
  font-weight: 800;
}

.metric-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(13, 94, 168, 0.08);
}

.metric-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.tab-row,
.answer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-button,
.answer-button {
  border: 1px solid rgba(13, 94, 168, 0.12);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.92);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.tab-button {
  min-height: 42px;
  padding: 10px 14px;
}

.tab-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.answer-button {
  width: 100%;
  padding: 14px 16px;
  text-align: start;
}

.answer-button.correct {
  border-color: rgba(47, 133, 90, 0.35);
  background: rgba(47, 133, 90, 0.12);
  color: var(--success);
}

.answer-button.wrong {
  border-color: rgba(192, 86, 33, 0.3);
  background: rgba(192, 86, 33, 0.08);
  color: var(--danger);
}

.hero-note,
.stack-note {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.micro-copy {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.site-footer {
  padding: 0 0 36px;
}

.fineprint {
  font-size: 0.92rem;
}

.loading-card,
.error-card,
.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  text-align: center;
}

.error-card {
  color: var(--danger);
}

[dir="rtl"] .site-header-inner,
[dir="rtl"] .site-nav,
[dir="rtl"] .section-header,
[dir="rtl"] .result-head,
[dir="rtl"] .panel-head,
[dir="rtl"] .block-toolbar,
[dir="rtl"] .hidden-blocks-inner,
[dir="rtl"] .data-line,
[dir="rtl"] .bar-meta,
[dir="rtl"] .source-list {
  direction: rtl;
}

[dir="rtl"] .bar-fill {
  transform-origin: right center;
}

@keyframes float-glow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, 18px, 0) scale(1.06);
  }
}

@keyframes grow-bar {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .section-grid,
  .results-grid,
  .split-cards,
  .filter-grid,
  .compare-grid,
  .kpi-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .site-header-inner,
  .site-nav,
  .section-header,
  .hidden-blocks-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hidden-blocks-list {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-shell,
  .site-header-inner {
    width: min(var(--max-width), calc(100% - 18px));
  }

  .hero-shell,
  .hero-panel,
  .section-card,
  .result-card,
  .source-card {
    padding: 18px;
  }

  .stat-grid {
    flex-direction: column;
  }

  .language-switch,
  .block-tools {
    width: 100%;
  }

  .tool-button {
    flex: 1 1 calc(50% - 8px);
  }

  .brand-lockup {
    width: 100%;
    align-items: flex-start;
  }

  .hidden-blocks-dock {
    width: min(var(--max-width), calc(100% - 18px));
  }
}
