:root {
  --navy: #07142a;
  --navy-2: #10233f;
  --red: #b3262f;
  --burgundy: #5c0c0f;
  --cream: #f5f1e9;
  --white: #fffdf9;
  --muted: #687182;
  --line: #d9d7d0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--navy);
  background:
    radial-gradient(circle at 8% 12%, rgba(179,38,47,.08), transparent 25rem),
    linear-gradient(180deg, var(--white), var(--cream));
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
button { font: inherit; }
.no-js { max-width: 960px; margin: 18px auto 0; padding: 12px 18px; color: #5A0E12; background: #F0E3E1; border-right: 4px solid var(--red); font-weight: 700; text-align: right; }

.site-header {
  height: 82px;
  max-width: 1120px;
  padding: 18px 28px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(7,20,42,.12);
}
.language-toggle { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); background: rgba(255,255,255,.72); }
.language-toggle button { border: 0; padding: 8px 13px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.language-toggle button.active { background: var(--navy); color: white; }
.brand img { width: 145px; height: 42px; object-fit: contain; object-position: left center; }
.miu-mark { width: 165px; height: 45px; object-fit: contain; object-position: right center; }

main { width: min(960px, calc(100% - 40px)); margin: 0 auto; }
.screen { display: none; min-height: calc(100vh - 152px); padding: 72px 0 48px; animation: enter .35s ease both; }
.screen.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.eyebrow { color: var(--red); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; font-size: .78rem; }
h1 { max-width: 820px; margin: 14px 0 20px; font-size: clamp(2.6rem, 7vw, 5.8rem); line-height: .94; letter-spacing: -.06em; }
h1 span { color: var(--red); }
h2 { margin: 12px 0 0; font-size: clamp(1.8rem, 4.3vw, 3.2rem); line-height: 1.08; letter-spacing: -.035em; }
.lead { max-width: 700px; margin: 0 0 32px; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.6; color: #344055; }

.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 720px; margin: 40px 0; }
.intro-grid article { padding: 20px; border: 1px solid var(--line); background: rgba(255,255,255,.62); }
.intro-grid strong { display: block; color: var(--red); font-size: 2rem; }
.intro-grid span { color: #445066; font-size: .92rem; }

.primary, .secondary, .text-button { border: 0; cursor: pointer; transition: .18s ease; }
.primary { padding: 16px 22px; background: var(--red); color: white; font-weight: 800; box-shadow: 5px 5px 0 var(--navy); }
.primary:hover, .primary:focus-visible { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--navy); }
.secondary { padding: 16px 22px; background: transparent; color: var(--navy); font-weight: 800; border: 1px solid var(--navy); }
.secondary:hover, .secondary:focus-visible { background: var(--navy); color: white; }
.privacy { color: var(--muted); font-size: .86rem; margin-top: 18px; }

.progress-row { display: flex; justify-content: space-between; color: var(--muted); font-size: .86rem; font-weight: 700; }
.progress-track { height: 5px; background: #dedbd4; margin: 10px 0 42px; overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: var(--red); transition: width .25s ease; }
.question-card { background: rgba(255,255,255,.78); border: 1px solid var(--line); padding: clamp(26px, 5vw, 54px); box-shadow: 12px 12px 0 rgba(7,20,42,.08); }
.answer-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 42px; }
.answer-options button { min-height: 104px; padding: 12px 8px; border: 1px solid var(--line); background: white; color: var(--navy); cursor: pointer; }
.answer-options button:hover { transform: translateY(-2px); }
.answer-options button:focus-visible { outline: 3px solid rgba(179,38,47,.35); outline-offset: 2px; }
.answer-options button.selected { border-color: var(--red); background: #fff5f3; transform: translateY(-2px); box-shadow: inset 0 -4px 0 var(--red); }
.answer-options b { display: block; font-size: 1.45rem; margin-bottom: 8px; }
.answer-options span { display: block; font-size: .76rem; line-height: 1.25; color: var(--muted); }
.quiz-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; color: var(--muted); font-size: .86rem; }
.text-button { padding: 10px 0; color: var(--navy); background: transparent; font-weight: 800; }
.text-button:disabled { opacity: .3; cursor: default; }

.result-hero { border-left: 7px solid var(--red); padding-left: 24px; margin-bottom: 42px; }
.result-hero h1 { font-size: clamp(2.7rem, 6vw, 5.2rem); }
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.score-card { padding: 24px; background: white; border: 1px solid var(--line); }
.score-card > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-weight: 800; }
.score-card strong { color: var(--red); font-size: 2rem; }
.score-card strong::after { content: "/100"; color: var(--muted); font-size: .7rem; font-weight: 600; }
.score-track { height: 6px; background: #e8e5de; margin: 16px 0; overflow: hidden; }
.score-track i { display: block; height: 100%; width: 0; background: var(--red); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.score-card p { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 0; }
.next-step { margin: 16px 0; padding: 34px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; background: var(--navy); color: white; }
.next-step .eyebrow { color: #f17676; }
.next-step h2 { font-size: 2rem; }
.next-step ul { margin: 0; padding-left: 20px; line-height: 1.65; }
.next-step li + li { margin-top: 8px; }
.result-actions { display: flex; gap: 14px; margin: 28px 0; }
details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
summary { padding: 20px 0; cursor: pointer; font-weight: 800; }
.method { max-width: 720px; color: #445066; line-height: 1.6; padding-bottom: 18px; }
.disclaimer { max-width: 760px; color: var(--muted); font-size: .83rem; line-height: 1.5; margin: 24px 0 0; }

footer { max-width: 1120px; margin: 0 auto; padding: 20px 28px 30px; display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }

html[dir="rtl"] body { font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
html[dir="rtl"] h1 { line-height: 1.14; letter-spacing: 0; }
html[dir="rtl"] h2 { line-height: 1.28; letter-spacing: 0; }
html[dir="rtl"] .result-hero { border-left: 0; border-right: 7px solid var(--red); padding-left: 0; padding-right: 24px; }
html[dir="rtl"] .next-step ul, html[dir="rtl"] .method ul { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .answer-options button { text-align: center; }

@media (max-width: 720px) {
  .site-header { padding: 14px 20px; height: 72px; }
  .brand img { width: 112px; }
  .miu-mark { width: 128px; }
  .language-toggle button { padding: 7px 8px; font-size: .78rem; }
  main { width: min(100% - 28px, 960px); }
  .screen { padding-top: 46px; }
  h1 { font-size: clamp(2.55rem, 14vw, 4.4rem); }
  .intro-grid { grid-template-columns: 1fr; gap: 7px; margin: 28px 0; }
  .intro-grid article { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
  .intro-grid strong { font-size: 1.5rem; }
  .question-card { padding: 28px 20px; }
  .answer-options { grid-template-columns: 1fr; margin-top: 28px; }
  .answer-options button { min-height: 56px; display: grid; grid-template-columns: 42px 1fr; align-items: center; text-align: left; padding: 8px 14px; }
  html[dir="rtl"] .answer-options button { text-align: right; }
  .answer-options b { margin: 0; }
  .answer-options span { font-size: .88rem; }
  .quiz-actions span { display: none; }
  .scores { grid-template-columns: 1fr; }
  .next-step { grid-template-columns: 1fr; padding: 28px 22px; }
  .result-actions { flex-direction: column; }
  footer { padding: 20px; display: block; }
  footer span { display: block; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
