@import url("https://fonts.googleapis.com/css2?family=Miriam+Libre:wght@400;700&display=swap");

:root {
  color-scheme: light;
  --ink: #0f2745;
  --muted: #5d718a;
  --line: #d9e6f7;
  --surface: #ffffff;
  --surface-2: #f5f9ff;
  --surface-3: #eaf3ff;
  --teal: #0b66d8;
  --teal-dark: #084a9b;
  --coral: #1d8cff;
  --amber: #f5a524;
  --blue: #1c7ed6;
  --good: #15803d;
  --shadow: 0 18px 42px rgba(15, 39, 69, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    "Miriam Libre",
    Miriam_Libre,
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(11, 102, 216, 0.08), transparent 36%),
    linear-gradient(180deg, #ffffff, transparent 260px),
    var(--surface-2);
}

body.rtl {
  direction: rtl;
}

body.ltr {
  direction: ltr;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 22px;
  color: #eef6ff;
  background:
    linear-gradient(180deg, #0f4c9f, #0c2d61 74%),
    #0c2d61;
}

.brand-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.brand-logo {
  display: grid;
  width: 90px;
  height: 90px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(4, 27, 58, 0.28);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 6px;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.72;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-top: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.whatsapp-link:hover {
  background: rgba(255, 255, 255, 0.22);
}

.market-proof {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.language-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: #dcecff;
  background: transparent;
  font-weight: 800;
}

.language-button.active,
.language-button:hover {
  color: var(--teal-dark);
  background: #ffffff;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2vw, 2.2rem);
  line-height: 1.15;
}

h3 {
  margin-bottom: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.data-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.tabs {
  display: grid;
  gap: 8px;
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #dcecff;
  background: transparent;
  text-align: start;
}

.tab-button.active,
.tab-button:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.tab-icon {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #0c2d61;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.progress-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #edf7f6;
  font-size: 0.9rem;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
}

.progress-track span {
  display: block;
  width: 16.66%;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  transition: width 180ms ease;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.workspace > .topline .eyebrow {
  color: var(--teal-dark);
}

.client-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 560px;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1d3655;
  background: var(--surface);
  font-size: 0.86rem;
  box-shadow: 0 8px 20px rgba(15, 39, 69, 0.06);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.quiz-panel,
.preview-panel,
.compare-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quiz-panel {
  min-height: 620px;
  padding: 28px;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.step-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.step-heading .eyebrow,
.result-toolbar .eyebrow,
.catalog-toolbar .eyebrow,
.compare-head .eyebrow,
.summary-card .eyebrow {
  color: var(--teal-dark);
}

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

.category-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.choice-card,
.toggle-card,
.field-card,
.product-card,
.catalog-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.choice-card,
.toggle-card {
  min-height: 88px;
  padding: 16px;
  text-align: start;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.choice-card:hover,
.toggle-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 39, 69, 0.09);
}

.choice-card.active,
.toggle-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 102, 216, 0.14);
}

.choice-card strong,
.toggle-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.choice-card span,
.toggle-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.choice-card .choice-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.choice-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.budget-box {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.budget-box > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.budget-box label {
  color: var(--muted);
}

.budget-box output {
  font-size: 1.7rem;
  font-weight: 900;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.budget-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.preset-button,
.ghost-button,
.primary-button,
.secondary-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.preset-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.preset-button.active {
  color: #ffffff;
  border-color: var(--teal);
  background: var(--teal);
}

.priority-list {
  display: grid;
  gap: 12px;
}

.priority-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 48px;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.priority-row label {
  color: #1d3655;
  font-weight: 800;
}

.priority-row output {
  color: var(--teal-dark);
  font-weight: 900;
  text-align: end;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.field-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.field-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

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

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.ghost-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
}

.ghost-button {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.primary-button {
  min-width: 148px;
  color: #ffffff;
  background: var(--teal);
}

.primary-button:hover,
.secondary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  color: #ffffff;
  background: var(--teal);
}

.preview-panel {
  position: sticky;
  top: 28px;
  overflow: hidden;
}

.device-visual {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(11, 102, 216, 0.16), rgba(255, 255, 255, 0.88)),
    #eef6ff;
}

.device-visual img {
  width: min(270px, 100%);
  height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 22px 24px rgba(15, 39, 69, 0.22));
}

.summary-card {
  padding: 20px;
}

.summary-card h3 {
  margin-bottom: 14px;
}

.summary-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-card li {
  display: flex;
  gap: 8px;
  color: #28405f;
  line-height: 1.35;
}

.summary-card li::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.result-toolbar,
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 39, 69, 0.08);
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.post-result-band {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 102, 216, 0.08), rgba(255, 255, 255, 0.96)),
    var(--surface);
  box-shadow: 0 12px 32px rgba(15, 39, 69, 0.08);
}

.lead-panel,
.trust-panel {
  min-width: 0;
}

.lead-panel h3,
.trust-panel h3 {
  margin-bottom: 8px;
}

.lead-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.4;
}

.lead-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
}

.lead-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.lead-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 9px 11px;
  outline: none;
}

.lead-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 102, 216, 0.14);
}

.lead-form .primary-button {
  min-height: 44px;
  white-space: nowrap;
}

.lead-whatsapp-button {
  min-height: 44px;
  white-space: nowrap;
  text-decoration: none;
}

.trust-panel ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-panel li {
  position: relative;
  padding-inline-start: 18px;
  color: #28405f;
  font-weight: 800;
  line-height: 1.35;
}

.trust-panel li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.feature-sections {
  display: grid;
  gap: 12px;
}

.feature-section-title {
  color: var(--ink);
  font-weight: 900;
}

.advanced-toggle {
  justify-self: start;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal-dark);
  background: #ffffff;
  font-weight: 900;
}

.advanced-toggle:hover {
  border-color: rgba(11, 102, 216, 0.42);
  background: #eef6ff;
}

.advanced-feature-grid.hidden {
  display: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #28405f;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 39, 69, 0.07);
}

.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.product-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15, 39, 69, 0.08);
}

.product-accent {
  height: 6px;
  background: var(--teal);
}

.product-card.budget .product-accent {
  background: var(--good);
}

.product-card.premium .product-accent {
  background: var(--amber);
}

.product-card.alt .product-accent {
  background: var(--blue);
}

.product-media,
.catalog-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 154px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(11, 102, 216, 0.12), rgba(255, 255, 255, 0.86)),
    var(--surface-2);
}

.product-media img,
.catalog-media img {
  width: min(180px, 78%);
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(15, 39, 69, 0.18));
}

.mkt-badge {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid rgba(15, 39, 69, 0.08);
  border-radius: 8px;
  color: #1d3655;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 900;
}

.product-main {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.product-label {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--teal-dark);
  background: #e7f1ff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-card.budget .product-label {
  color: #12643e;
  background: #e6f5ec;
}

.product-card.premium .product-label {
  color: #7a5200;
  background: #fff3d9;
}

.product-card.alt .product-label {
  color: #0d5cb6;
  background: #e8f1fb;
}

.product-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.product-title h4 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.price {
  white-space: nowrap;
  color: var(--ink);
  font-weight: 900;
}

.price-box {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: end;
}

.source-link {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.score-line {
  display: grid;
  gap: 7px;
}

.score-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.score-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-3);
}

.score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.why-model {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(11, 102, 216, 0.16);
  border-radius: 8px;
  background: #f4f9ff;
}

.why-model strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.why-model p {
  margin: 0;
  color: #28405f;
  font-size: 0.88rem;
  line-height: 1.4;
}

.reason-list,
.spec-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  color: #28405f;
  line-height: 1.38;
}

.spec-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.spec-list li {
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-2);
}

.spec-list span {
  color: var(--muted);
  font-size: 0.78rem;
}

.spec-list strong {
  font-size: 0.88rem;
}

.compare-panel {
  padding: 20px;
}

.site-footer {
  margin-top: 24px;
  padding: 14px 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.compare-head {
  margin-bottom: 16px;
}

.comparison-table {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

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

th {
  color: #28405f;
  font-size: 0.84rem;
  text-transform: uppercase;
}

td {
  color: #1d3655;
}

.catalog-filter {
  display: flex;
  min-width: 240px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

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

.catalog-item {
  display: grid;
  gap: 12px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 39, 69, 0.07);
}

.catalog-item > :not(.catalog-media) {
  margin-right: 16px;
  margin-left: 16px;
}

.catalog-item > :last-child {
  margin-bottom: 16px;
}

.catalog-media {
  min-height: 128px;
  padding: 14px;
}

.catalog-media img {
  height: 92px;
}

.catalog-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.catalog-item h4 {
  margin: 0 0 4px;
}

.catalog-item p {
  margin: 0;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #28405f;
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

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

  .progress-panel {
    margin-top: 0;
  }

  .workspace {
    padding: 20px;
  }

  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }

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

  .post-result-band,
  .lead-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topline,
  .result-toolbar,
  .catalog-toolbar,
  .budget-box > div,
  .product-title {
    align-items: stretch;
    flex-direction: column;
  }

  .client-summary {
    justify-content: flex-start;
  }

  .tabs,
  .option-grid,
  .toggle-grid,
  .category-grid,
  .feature-grid,
  .details-grid,
  .recommendation-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .quiz-panel {
    min-height: auto;
    padding: 18px;
  }

  .step-heading {
    display: block;
  }

  .priority-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

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

  .catalog-filter {
    min-width: 0;
  }
}
