:root {
  color-scheme: light;
  --ink: #132b31;
  --muted: #536970;
  --line: #c8d7d7;
  --surface: #ffffff;
  --soft: #edf5f3;
  --teal: #0b777a;
  --teal-dark: #07575d;
  --blue: #2c5da8;
  --coral: #c95945;
  --amber: #93600d;
  --green: #28714d;
  --grey: #68777c;
  --shadow: 0 14px 34px rgba(18, 55, 63, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: #eaf2f1; }
body { margin: 0; color: var(--ink); background: #f4f8f7; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { min-height: 42px; }
a { color: var(--teal-dark); }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.page { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 32px; }
.topbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand-text { display: grid; gap: 1px; }
.brand-name { font-size: 15px; font-weight: 850; }
.brand-sub { color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.nav-link { display: inline-flex; min-height: 40px; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 0 13px; color: var(--ink); font-size: 13px; font-weight: 750; text-decoration: none; }
.nav-link:hover { border-color: var(--teal); color: var(--teal-dark); }

.language-menu { position: relative; z-index: 20; }
.language-menu summary { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); box-shadow: 0 5px 14px rgba(15, 55, 63, .10); cursor: pointer; list-style: none; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu-list { position: absolute; top: 48px; right: 0; display: grid; grid-template-columns: 40px; gap: 4px; width: 52px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); padding: 6px; }
.language-menu-list a { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; text-decoration: none; }
.language-menu-list a:hover, .language-menu-list a[aria-current="true"] { background: #ddf0ee; outline: 2px solid rgba(11, 119, 122, .18); }
.flag-circle { display: grid; width: 28px; height: 28px; place-items: center; overflow: hidden; border: 1px solid rgba(16, 42, 52, .20); border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); }
.flag-circle::before { content: none; }
.flag-en { background: linear-gradient(33deg, transparent 0 42%, #fff 42% 47%, #c8102e 47% 53%, #fff 53% 58%, transparent 58%), linear-gradient(-33deg, transparent 0 42%, #fff 42% 47%, #c8102e 47% 53%, #fff 53% 58%, transparent 58%), linear-gradient(90deg, transparent 0 42%, #fff 42% 46%, #c8102e 46% 54%, #fff 54% 58%, transparent 58%), linear-gradient(0deg, transparent 0 38%, #fff 38% 44%, #c8102e 44% 56%, #fff 56% 62%, transparent 62%), #012169; }
.flag-de { background: linear-gradient(#000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66%); }
.flag-fr { background: linear-gradient(90deg, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66%); }
.flag-es { background: linear-gradient(#aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%); }
.flag-zh { background: radial-gradient(circle at 35% 35%, #ffde00 0 3px, transparent 3.5px), #de2910; }
.flag-ru { background: linear-gradient(#fff 0 33.33%, #0039a6 33.33% 66.66%, #d52b1e 66.66%); }
.flag-bg { background: linear-gradient(#fff 0 33.33%, #00966e 33.33% 66.66%, #d62612 66.66%); }

.tool-intro { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); gap: 24px; align-items: center; padding: 24px 0 20px; }
.tool-intro h1 { max-width: 760px; margin: 6px 0 11px; font-size: 42px; line-height: 1.06; letter-spacing: 0; }
.eyebrow, .section-label { margin: 0; color: var(--teal-dark); font-size: 12px; font-weight: 850; letter-spacing: 0; text-transform: uppercase; }
.lead { max-width: 720px; margin: 0; color: #405a62; font-size: 18px; line-height: 1.55; }
.trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.trust span { border: 1px solid #b8d2cf; border-radius: 6px; background: #ebf7f4; padding: 7px 9px; color: #18565b; font-size: 12px; font-weight: 800; }
.tool-intro > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid #b7ccce; border-radius: 8px; background: #091b2c; box-shadow: var(--shadow); }

.workspace { min-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .97); box-shadow: var(--shadow); padding: 20px; }
.checker-app { min-height: 378px; }
.loading { padding: 40px 12px; color: var(--muted); text-align: center; }
.checker-card { min-height: 378px; border: 1px solid #d1dfde; border-radius: 8px; background: var(--surface); }
.intro-screen { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr); }
.intro-main, .intro-aside, .question-screen, .result-screen { padding: 24px; }
.intro-main { display: grid; align-content: center; }
.intro-main h2, .result-hero h2 { margin: 5px 0 10px; font-size: 29px; line-height: 1.15; }
.intro-main > p:not(.section-label), .question-description { max-width: 720px; color: var(--muted); line-height: 1.6; }
.trust-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; list-style: none; }
.trust-list li { min-height: 54px; border: 1px solid #c6ded8; border-radius: 7px; background: #eff8f5; padding: 10px; color: #24594e; font-size: 13px; font-weight: 750; }
.legal-warning { border-left: 4px solid var(--coral); background: #fff1ed; padding: 11px 13px; color: #713326; font-size: 13px; line-height: 1.55; }
.button-row, .question-actions, .result-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 16px; }
button.primary, button.secondary, .secondary-link { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid var(--teal); border-radius: 6px; padding: 0 14px; font-weight: 800; text-decoration: none; cursor: pointer; }
button.primary { background: var(--teal); color: #fff; }
button.primary:hover { background: var(--teal-dark); }
button.secondary, .secondary-link { background: #f3f8f7; color: var(--ink); }
button.secondary:hover, .secondary-link:hover { background: #e4f1ef; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgba(44, 93, 168, .25); outline-offset: 2px; }

.intro-aside { display: grid; gap: 9px; align-content: center; border-left: 1px solid var(--line); background: #f5f9f8; }
.intro-aside button { display: grid; gap: 4px; width: 100%; min-height: 76px; border: 1px solid #c9d9d8; border-radius: 7px; background: #fff; padding: 12px; color: var(--ink); text-align: left; cursor: pointer; }
.intro-aside button:hover { border-color: var(--teal); background: #ecf7f5; }
.intro-aside button span { color: var(--muted); font-size: 12px; line-height: 1.4; }

.progress-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 750; }
.progress-track { height: 8px; overflow: hidden; margin: 8px 0 24px; border-radius: 99px; background: #dce8e6; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .18s ease; }
.question-screen h2 { max-width: 850px; margin: 5px 0 8px; font-size: 27px; line-height: 1.2; }
.question-screen h2:focus { outline: 0; }
fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 18px; }
.answer-card { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; min-height: 62px; align-items: center; border: 1px solid #c7d8d7; border-radius: 7px; background: #fbfdfc; padding: 10px 12px; color: var(--ink); text-align: left; cursor: pointer; }
.answer-card:hover { border-color: var(--teal); background: #edf8f5; }
.answer-card.is-selected { border-color: var(--green); background: #e7f5ed; }
.answer-indicator { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #9eb5b4; border-radius: 50%; font-size: 13px; font-weight: 900; }
.answer-card.is-selected .answer-indicator { border-color: var(--green); background: var(--green); color: #fff; }
.answer-card span:last-child { overflow-wrap: anywhere; font-size: 14px; font-weight: 750; line-height: 1.35; }
.help-text { margin: 13px 0 0; color: #49656b; font-size: 13px; line-height: 1.55; }
.validation-message { min-height: 20px; margin: 8px 0 0; color: #9b3d2e; font-size: 13px; font-weight: 750; }
.question-actions { justify-content: space-between; }

.result-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.result-hero > div:first-child > p:not(.section-label) { max-width: 720px; color: var(--muted); line-height: 1.55; }
.overall-box { display: grid; min-height: 150px; align-content: center; border: 1px solid #c5d7d6; border-left: 5px solid var(--grey); border-radius: 7px; background: #f7faf9; padding: 15px; }
.overall-box span, .overall-box small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.overall-box strong { margin: 5px 0; font-size: 21px; }
.status-action .overall-box, .decision-card.status-action, .evidence-panel.status-action { border-left-color: var(--coral); }
.status-review .overall-box, .decision-card.status-review, .evidence-panel.status-review { border-left-color: var(--amber); }
.status-addressed .overall-box, .decision-card.status-addressed, .evidence-panel.status-addressed { border-left-color: var(--green); }
.status-not_triggered .overall-box, .decision-card.status-not_triggered, .evidence-panel.status-not_triggered { border-left-color: var(--grey); }
.count-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.count-grid div { border: 1px solid #d2dfde; border-radius: 7px; background: #f5f9f8; padding: 10px; }
.count-grid strong { display: block; font-size: 23px; }
.count-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.decision-section { margin-top: 22px; }
.decision-section > h2, .evidence-panel h2 { margin: 0 0 6px; font-size: 22px; }
.decision-section > p { color: var(--muted); line-height: 1.55; }
.decision-grid { display: grid; gap: 10px; margin-top: 12px; }
.decision-card { border: 1px solid #d0dddd; border-left: 5px solid var(--grey); border-radius: 7px; background: #fbfdfc; padding: 14px; }
.decision-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.decision-head h3 { margin: 2px 0 0; font-size: 17px; }
.article-ref { margin: 0; color: var(--blue); font-size: 12px; font-weight: 850; }
.status-badge { display: inline-flex; min-height: 28px; align-items: center; border: 1px solid #cbd9d8; border-radius: 99px; background: #fff; padding: 3px 9px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.decision-card > p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.decision-inputs { display: grid; gap: 5px; padding: 0; list-style: none; }
.decision-inputs li { display: grid; grid-template-columns: minmax(120px, .32fr) minmax(0, 1fr); gap: 8px; border-top: 1px solid #e0e9e8; padding-top: 5px; font-size: 12px; }
.decision-inputs span { color: var(--muted); }
.decision-inputs strong { overflow-wrap: anywhere; }
.deadline, .next-action { margin-bottom: 0; }
.next-action { color: var(--ink) !important; }
.evidence-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; border: 1px solid #d0dddd; border-left: 5px solid var(--grey); border-radius: 7px; background: #f6faf9; padding: 14px; }
.evidence-panel p:not(.section-label) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.review-meta, .runtime-status { color: var(--muted); font-size: 12px; line-height: 1.5; }

.content-section { display: grid; min-width: 0; margin-top: 24px; border-top: 1px solid var(--line); background: var(--surface); }
.content-section > section { min-width: 0; border-bottom: 1px solid var(--line); padding: 28px 4px; }
.content-section h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.2; }
.content-section h3 { margin: 0 0 6px; font-size: 17px; }
.content-section p, .content-section li { color: #425c63; line-height: 1.68; }
.content-section ul, .content-section ol { padding-left: 23px; }
.table-wrap { min-width: 0; overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { border-bottom: 1px solid #dce6e5; padding: 11px; text-align: left; vertical-align: top; font-size: 13px; line-height: 1.5; }
thead th { background: #e9f3f1; color: #24484d; font-size: 12px; }
tbody th { color: var(--ink); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.numbered-steps ol { display: grid; gap: 9px; counter-reset: steps; padding: 0; list-style: none; }
.numbered-steps li { position: relative; min-height: 44px; border-left: 3px solid var(--teal); background: #f0f7f5; padding: 10px 12px 10px 48px; counter-increment: steps; }
.numbered-steps li::before { position: absolute; top: 9px; left: 13px; color: var(--teal-dark); content: counter(steps, decimal-leading-zero); font-weight: 900; }
.example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.example-grid article { border: 1px solid var(--line); border-radius: 7px; background: #f6faf9; padding: 14px; }
.limitations { border-left: 4px solid var(--coral); padding-left: 18px !important; }
.sources ul { display: grid; gap: 9px; padding: 0; list-style: none; }
.sources li { display: grid; gap: 3px; border-bottom: 1px solid #e0e9e8; padding-bottom: 9px; }
.sources a { font-weight: 800; }
.sources span { color: var(--muted); font-size: 13px; }
.faq-list { display: grid; gap: 8px; }
.faq-list details { border: 1px solid var(--line); border-radius: 7px; padding: 12px 14px; }
.faq-list summary { color: var(--ink); font-weight: 800; cursor: pointer; }
.faq-list p { margin-bottom: 0; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 0 0; color: var(--muted); font-size: 12px; }
.footer nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.footer button { min-height: auto; border: 0; background: none; padding: 0; color: var(--teal-dark); text-decoration: underline; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .progress-track span { transition: none; } }
@media (max-width: 900px) {
  .tool-intro, .intro-screen, .result-hero { grid-template-columns: 1fr; }
  .intro-aside { border-top: 1px solid var(--line); border-left: 0; }
  .trust-list, .example-grid { grid-template-columns: 1fr; }
  .tool-intro h1 { font-size: 35px; }
}
@media (max-width: 640px) {
  .page { width: min(100% - 20px, 1120px); padding-top: 10px; }
  .brand-sub { display: none; }
  .nav-link { max-width: 132px; white-space: normal; text-align: center; }
  .tool-intro { gap: 14px; padding-top: 12px; }
  .tool-intro h1 { font-size: 30px; }
  .lead { font-size: 16px; }
  .workspace { padding: 10px; }
  .intro-main, .intro-aside, .question-screen, .result-screen { padding: 15px; }
  .answer-grid, .count-grid { grid-template-columns: 1fr; }
  .question-screen h2 { font-size: 22px; }
  .question-actions, .result-actions { align-items: stretch; flex-direction: column; }
  .question-actions button, .result-actions button { width: 100%; }
  .decision-head, .evidence-panel, .footer { align-items: stretch; flex-direction: column; }
  .status-badge { align-self: flex-start; white-space: normal; }
  .decision-inputs li { grid-template-columns: 1fr; }
  .footer nav { justify-content: flex-start; }
}
@media (max-width: 390px) {
  .page { width: min(100% - 14px, 1120px); }
  .topbar { gap: 8px; }
  .brand-name { font-size: 13px; }
  .nav-link { max-width: 108px; padding: 0 8px; font-size: 11px; }
  .tool-intro h1 { font-size: 27px; }
}
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .topbar, .tool-intro, .content-section, .footer, .intro-screen, .question-screen, .result-actions, .xe-related-tools, .chatbot, .support-button { display: none !important; }
  .page, .workspace, .checker-app { width: 100%; max-width: none; margin: 0; border: 0; box-shadow: none; padding: 0; }
  .result-screen { display: block !important; border: 0; padding: 0; }
  .decision-card, .evidence-panel, .overall-box { break-inside: avoid; background: #fff; box-shadow: none; }
}
