:root {
  --blue-950: #062338;
  --blue-900: #093653;
  --blue-700: #0d557a;
  --blue-100: #e6f1f7;
  --yellow-500: #d9b431;
  --yellow-100: #fff6d6;
  --ink: #122230;
  --muted: #647282;
  --line: #d9e2ea;
  --surface: #ffffff;
  --background: #f5f8fb;
  --shadow: 0 18px 45px rgba(6, 35, 56, 0.11);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

html[dir="rtl"] body {
  direction: rtl;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.91);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  direction: ltr;
  align-items: center;
  gap: 12px;
  color: var(--blue-900);
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(6, 35, 56, 0.18);
}

.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.language-required .topbar-actions {
  display: none;
}

.utility-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-900);
  background: var(--surface);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.utility-link:hover {
  border-color: var(--blue-700);
  background: var(--blue-100);
}

button.utility-link {
  cursor: pointer;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  max-width: 800px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(6, 35, 56, 0.08);
}

.language-menu {
  position: relative;
}

.language-current-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue-900);
  box-shadow: 0 10px 30px rgba(6, 35, 56, 0.08);
  cursor: pointer;
  font-weight: 900;
}

.language-current-button .flag {
  font-size: 30px;
  line-height: 1;
}

.language-current-button:hover,
.language-current-button[aria-expanded="true"] {
  border-color: var(--blue-700);
  background: var(--blue-100);
}

.language-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

html[dir="rtl"] .language-menu-panel {
  right: auto;
  left: 0;
}

.language-menu-panel .language-title {
  display: block;
  margin: 0 0 10px;
}

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

.language-title {
  flex: 1 0 100%;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue-900);
  cursor: pointer;
  font-weight: 900;
}

.language-button .flag {
  font-size: 28px;
  line-height: 1;
}

.language-button:hover,
.language-button.is-active {
  border-color: var(--blue-700);
  background: var(--blue-100);
  box-shadow: inset 0 0 0 2px rgba(13, 85, 122, 0.16);
}

.language-gate {
  display: grid;
  min-height: calc(100vh - 74px);
  place-items: center;
  padding: clamp(22px, 5vw, 64px);
}

.language-gate-card {
  width: min(980px, 100%);
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at 85% 12%, rgba(217, 180, 49, 0.18), transparent 34%);
  box-shadow: var(--shadow);
  text-align: center;
}

.language-gate-card h1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.15em;
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.typewriter-text {
  display: inline-block;
}

.typewriter-caret {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-inline-start: 8px;
  border-radius: 999px;
  background: var(--blue-700);
  animation: caretBlink 900ms steps(1) infinite;
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .typewriter-caret {
    animation: none;
  }
}

.language-gate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.language-gate-button {
  justify-content: center;
  min-height: 88px;
  padding: 14px;
  font-size: 18px;
}

.language-gate-button .flag {
  font-size: 38px;
}

main {
  padding: clamp(20px, 4vw, 54px);
}

.language-required main {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: clamp(20px, 4vw, 48px);
  align-items: stretch;
  margin: 0 auto 28px;
  max-width: 1320px;
  min-height: 340px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(6, 35, 56, 0.96), rgba(13, 85, 122, 0.88)),
    radial-gradient(circle at 88% 20%, rgba(217, 180, 49, 0.32), transparent 30%);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.hero-simple {
  grid-template-columns: 1fr;
  min-height: 300px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding: clamp(30px, 5vw, 64px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow-500);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.contact-box h3 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 700px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.96;
}

.hero p:not(.eyebrow) {
  max-width: 610px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.secondary-button,
.outline-on-dark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.secondary-button {
  border: 1px solid var(--yellow-500);
  background: var(--yellow-500);
  color: var(--blue-950);
}

.outline-on-dark-button {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.hero-panel {
  display: grid;
  gap: 1px;
  min-height: 100%;
  background: rgba(255, 255, 255, 0.18);
}

.hero-panel > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.12);
}

.metric-value {
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 900;
}

.metric-label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 24px;
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
}

.workspace.survey-only {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.stats-dashboard {
  max-width: 1320px;
  margin: 0 auto;
}

.survey-form,
.summary-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.survey-form {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
}

.summary-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
  padding: 24px;
}

.stats-board {
  position: static;
}

.stats-board .stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-grid article {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.kpi-grid article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
}

.kpi-card-blue::before {
  background: var(--blue-700);
}

.kpi-card-green::before {
  background: #2f9d68;
}

.kpi-card-yellow::before {
  background: var(--yellow-500);
}

.kpi-card-purple::before {
  background: #7067cf;
}

.stats-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 24px;
}

.language-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

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

.language-stat-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.language-stat-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-950);
}

.language-stat-flag {
  font-size: 28px;
  line-height: 1;
}

.language-stat-values {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.section-heading h2 {
  color: var(--blue-950);
  font-size: clamp(25px, 3vw, 34px);
}

.section-heading .eyebrow {
  margin-bottom: 6px;
}

.question-card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.question-card legend,
.legend-like {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  width: 100%;
  color: var(--blue-900);
  font-size: 18px;
}

.question-card legend span,
.legend-like span:first-child {
  display: inline-grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--yellow-500);
  color: var(--blue-950);
  font-size: 15px;
  font-weight: 900;
}

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

.option-grid label,
.rating-row label,
.score-row label {
  cursor: pointer;
}

.option-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.option-grid label:has(input:checked),
.rating-row label:has(input:checked),
.score-row label:has(input:checked) span {
  border-color: var(--blue-700);
  background: var(--blue-100);
  color: var(--blue-950);
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--blue-700);
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.rating-row label {
  display: grid;
  gap: 8px;
  min-height: 78px;
  align-content: center;
  justify-items: center;
  padding: 10px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.rating-row input {
  margin: 0;
}

.rating-stars {
  color: var(--yellow-500);
  font-size: 18px;
  line-height: 1;
}

.text-question {
  display: grid;
  gap: 14px;
}

textarea,
input[type="email"],
input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

textarea {
  min-height: 116px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.5;
}

input[type="email"],
input[type="text"],
input[type="password"] {
  min-height: 48px;
  margin-top: 7px;
  padding: 0 13px;
  direction: ltr;
  text-align: left;
}

textarea:focus,
input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--blue-700);
  outline: 3px solid rgba(13, 85, 122, 0.16);
}

.score-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.score-row input {
  position: absolute;
  opacity: 0;
}

.score-row span {
  display: grid;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue-900);
  font-size: 22px;
  font-weight: 900;
}

.score-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.contact-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
  gap: 16px 22px;
  align-items: center;
  padding: 18px;
  border-radius: 10px;
  background: var(--yellow-100);
  border: 1px solid #eedb8a;
}

.contact-box p:not(.eyebrow) {
  margin: 8px 0 0;
  color: #5f5222;
  line-height: 1.45;
}

.contact-box label span {
  color: var(--blue-950);
  font-weight: 800;
}

.check-consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #473f25;
  font-size: 14px;
}

.privacy-summary {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border: 1px solid rgba(13, 85, 122, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #3a4a57;
  font-size: 13px;
  line-height: 1.5;
}

.privacy-summary strong {
  display: block;
  margin-bottom: 5px;
  color: var(--blue-950);
}

.privacy-summary p {
  margin: 0 0 8px;
}

.inline-link {
  color: var(--blue-700);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
}

.primary-button,
.ghost-button {
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--blue-900);
  background: var(--blue-900);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--blue-700);
}

.excel-button {
  border-color: #2f9d68;
  background: #2f9d68;
  color: #ffffff;
}

.excel-button:hover {
  border-color: #268456;
  background: #268456;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--blue-900);
}

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

.stat-grid article {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.stat-grid strong {
  color: var(--blue-900);
  font-size: 28px;
  line-height: 1;
}

.stat-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.chart-section {
  display: grid;
  gap: 12px;
}

.chart-section h3 {
  margin: 0;
  color: var(--blue-950);
  font-size: 18px;
}

.chart-hint {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

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

.bar-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--blue-100);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-700), var(--yellow-500));
}

.daily-trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 10px;
  min-height: 188px;
  padding: 14px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(13, 85, 122, 0.06) 1px, transparent 1px) 0 0 / 100% 25%,
    #ffffff;
}

.daily-point {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.daily-plot {
  position: relative;
  min-height: 116px;
  border-radius: 8px;
}

.daily-count-bar {
  position: absolute;
  right: 30%;
  bottom: 0;
  left: 30%;
  height: var(--bar-height);
  min-height: 4px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--blue-700), var(--blue-100));
}

.daily-score-dot {
  position: absolute;
  top: var(--score-y);
  left: 50%;
  z-index: 1;
  width: 13px;
  height: 13px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 7px 16px rgba(6, 35, 56, 0.22);
  transform: translate(-50%, -50%);
}

.is-positive {
  background: #2f9d68;
}

.is-negative {
  background: #d9534f;
}

.is-neutral {
  background: var(--yellow-500);
}

.daily-point strong {
  color: var(--blue-950);
  font-size: 14px;
}

.daily-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.daily-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.daily-table th,
.daily-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.daily-table th {
  color: var(--blue-950);
  background: var(--blue-100);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-table td {
  color: #34485a;
  font-weight: 800;
}

.delta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.response-list {
  display: grid;
  gap: 10px;
}

.response-item {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.response-item strong {
  color: var(--blue-900);
}

.response-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.answers-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.answers-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.answers-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.answers-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.answers-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}

.answers-table th,
.answers-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

.answers-table th {
  color: var(--blue-900);
  background: var(--blue-100);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.answers-table tr:last-child td {
  border-bottom: 0;
}

.answers-table a {
  color: var(--blue-700);
  font-weight: 900;
}

.table-language {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.rating-stack {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-weight: 800;
}

.mail-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--blue-700);
  border-radius: 8px;
  background: var(--blue-100);
  text-decoration: none;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.delete-response-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #b32626;
  border-radius: 8px;
  background: #fff0f0;
  color: #8f2626;
  cursor: pointer;
  font-weight: 900;
}

.delete-response-button:hover {
  background: #ffe2e2;
}

.comment-translate-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: start;
  line-height: 1.4;
}

.comment-translate-button:hover {
  color: var(--blue-700);
  text-decoration: underline;
}

.comment-translate-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.translated-label {
  display: block;
  margin-bottom: 5px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.muted-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--blue-950);
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(18px, 5vw, 54px);
}

.login-card {
  display: grid;
  width: min(520px, 100%);
  gap: 24px;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.login-card p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  color: var(--blue-950);
  font-size: 14px;
  font-weight: 900;
}

.login-button {
  width: 100%;
}

.login-error {
  padding: 12px 14px;
  border: 1px solid #efb5b5;
  border-radius: 8px;
  background: #fff0f0;
  color: #8f2626 !important;
  font-weight: 800;
}

.legal-page {
  max-width: 980px;
  margin: 0 auto;
}

.legal-card {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-card h1 {
  max-width: 780px;
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.legal-intro {
  max-width: 760px;
  margin: 16px 0 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.legal-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 10px;
  color: var(--blue-950);
  font-size: 20px;
}

.legal-section p {
  margin: 0 0 10px;
  color: #354657;
  line-height: 1.65;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

@media (max-width: 1040px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .stats-board .stat-grid,
  .language-stats,
  .stats-columns {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .language-menu,
  .language-current-button {
    width: 100%;
  }

  .language-menu-panel {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  .utility-link {
    justify-content: center;
  }

  .language-switcher {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .language-title {
    min-width: max-content;
    flex: 0 0 auto;
    align-self: center;
  }

  .language-button {
    flex: 0 0 auto;
    justify-content: center;
  }

  main {
    padding: 14px;
  }

  .language-gate {
    min-height: calc(100vh - 91px);
    padding: 14px;
  }

  .language-gate-card {
    padding: 22px;
  }

  .language-gate-grid {
    grid-template-columns: 1fr;
  }

  .language-gate-button {
    min-height: 72px;
  }

  .hero {
    border-radius: 10px;
  }

  .hero-copy {
    padding: 28px 22px;
  }

  .hero-panel,
  .stat-grid,
  .option-grid,
  .rating-row,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .score-row {
    gap: 7px;
  }

  .score-row span {
    height: 48px;
  }

  .form-actions {
    justify-content: stretch;
  }

  .primary-button,
  .ghost-button,
  .secondary-button,
  .outline-on-dark-button {
    width: 100%;
  }
}
