:root {
  color-scheme: dark;
  --background: #151515;
  --surface: #1e1e1e;
  --surface-raised: #242424;
  --foreground: #f5f2ee;
  --muted: #aaa6a0;
  --border: #343434;
  --primary: #f18a45;
  --good: #69cb8e;
  --warn: #efc05f;
  --bad: #ed7770;
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 75% -20%, rgba(241, 138, 69, .11), transparent 42rem),
    var(--background);
  color: var(--foreground);
  line-height: 1.55;
}

a { color: inherit; }
button, input, select { font: inherit; }

.site-shell {
  width: min(100% - 40px, 1060px);
  min-height: 100vh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: var(--primary);
  font-size: .95rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-decoration: none;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .85rem;
}

.language-picker select {
  max-width: 160px;
  padding: 8px 30px 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--foreground);
}

main { flex: 1; }

.hero { padding-block: 66px 54px; }
.eyebrow {
  color: var(--primary);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .25em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
.hero h1, .information-page h1 {
  max-width: 820px;
  margin-block: 14px;
  font-size: clamp(2.4rem, 7vw, 4.35rem);
  line-height: 1.07;
  letter-spacing: -.045em;
}

.hero-copy, .page-intro {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

.analysis-form { max-width: 780px; margin-top: 32px; }
.analysis-form > label { display: block; margin-bottom: 9px; font-size: .92rem; font-weight: 650; }
.form-row { display: flex; gap: 12px; }
.form-row input {
  min-width: 0;
  flex: 1;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--foreground);
  font-size: 1.05rem;
}

.form-row input:focus, .language-picker select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(241, 138, 69, .18);
}

.form-row button, .contact-button {
  border: 0;
  border-radius: 10px;
  padding: 14px 22px;
  background: var(--primary);
  color: #20150f;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s ease, transform .2s ease;
}

.form-row button:hover, .contact-button:hover { opacity: .9; transform: translateY(-1px); }
.form-row button:disabled { opacity: .6; cursor: wait; transform: none; }
.form-error { margin-top: 14px; color: var(--bad); }

.ad-slot { width: 100%; margin-block: 10px 24px; }
.ad-label { margin-bottom: 6px; color: var(--muted); font-size: .63rem; letter-spacing: .16em; text-transform: uppercase; }
.ad-placeholder {
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px dashed #3b3b3b;
  border-radius: 10px;
  background: rgba(30, 30, 30, .45);
  color: #918d87;
  font-size: .76rem;
  text-align: center;
}

.ad-creative { display: block; overflow: hidden; border-radius: 10px; }
.ad-creative img { display: block; width: 100%; max-height: 150px; object-fit: contain; }
.report { margin-block: 22px 40px; scroll-margin-top: 18px; }
.report[hidden] { display: none; }
.score-card, .signals-card, .category-card, .suggestion {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.score-card { display: flex; align-items: center; gap: 26px; padding: 25px; }
.score-ring { flex: 0 0 auto; width: 140px; height: 140px; }
.ring-background { stroke: #383838; }
.ring-progress { stroke: currentColor; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-label { fill: var(--foreground); font-size: 31px; font-weight: 750; }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.score-caption { margin-bottom: 2px; font-size: .85rem; }
.report-url { margin-bottom: 5px; overflow-wrap: anywhere; font-size: clamp(1.05rem, 3vw, 1.5rem); font-weight: 700; }
.report-meta { margin-bottom: 0; font-size: .8rem; }
.muted { color: var(--muted); }

.signals-card { margin-top: 18px; padding: 23px; }
.signals-card h2 { margin-bottom: 7px; font-size: 1.18rem; }
.signals-card h3 { margin-bottom: 5px; font-size: .9rem; }
.detected-value { margin-bottom: 16px; overflow-wrap: anywhere; color: var(--muted); }
.detected-value.small { font-size: .9rem; }
.signals-heading { margin-top: 24px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0 0; }
.metric { padding: 12px; border-radius: 9px; background: var(--background); }
.metric dt { color: var(--muted); font-size: .72rem; }
.metric dd { margin: 3px 0 0; font-size: 1.35rem; font-weight: 700; }
.audit-scope { margin: 15px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.6; }

.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.category-card { padding: 20px; }
.category-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.category-heading h2 { margin: 0; font-size: 1.15rem; }
.category-score { font-size: 1.75rem; font-weight: 750; }
.check-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.check-item { display: flex; align-items: baseline; gap: 9px; font-size: .86rem; }
.check-icon { font-weight: 800; }
.check-icon.pass { color: var(--good); }
.check-icon.fail { color: var(--bad); }
.check-label { color: var(--muted); }

.suggestions { margin-top: 34px; }
.suggestions-title { margin-bottom: 17px; font-size: 1.8rem; letter-spacing: -.025em; }
.all-good { color: var(--good); }
.suggestion-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.suggestion { display: flex; align-items: flex-start; gap: 16px; padding: 16px; }
.suggestion-number { color: var(--primary); font-size: 1.3rem; font-weight: 750; }
.suggestion-label { margin-bottom: 4px; color: var(--muted); font-size: .73rem; letter-spacing: .05em; text-transform: uppercase; }
.suggestion-tip { margin: 0; }

.information-page { min-height: 65vh; max-width: 780px; padding-block: 64px 32px; }
.information-page h1 { font-size: clamp(2.3rem, 6vw, 3.5rem); }
.page-intro { margin-top: 20px; }
.information-sections { display: grid; gap: 27px; margin-top: 38px; }
.information-sections h2 { margin-bottom: 7px; font-size: 1.25rem; }
.information-sections p { margin-bottom: 0; color: var(--muted); line-height: 1.75; }
.contact-button { display: inline-flex; margin-top: 30px; }
.back-link { margin-top: 34px; font-size: .86rem; }
.back-link a { color: var(--primary); text-underline-offset: 4px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 45px;
  padding-block: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .75rem;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--foreground); }

html[dir="rtl"] .site-footer, html[dir="rtl"] .category-heading { direction: rtl; }
html[dir="rtl"] .suggestion { direction: rtl; }

@media (max-width: 650px) {
  .site-shell { width: min(100% - 30px, 1060px); }
  .hero { padding-block: 48px 40px; }
  .form-row { flex-direction: column; }
  .form-row button { width: 100%; }
  .score-card { flex-direction: column; align-items: flex-start; gap: 15px; }
  .score-ring { width: 118px; height: 118px; }
  .category-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
