:root {
  color-scheme: dark;
  --blue: #0071e3; --blue-button: #0066cc; --blue-light: #65afff;
  --ink: #f5f5f7; --sub: #a9a9b0; --faint: #6e6e73;
  --line: #2a2a2e; --line-soft: #1f1f23; --bg: #0a0a0a; --bg-alt: #0f0f12; --card: #141416;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4, p, fieldset { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible, .option input:focus-visible + span, .scene input:focus-visible + span {
  outline: 2px solid var(--blue-light); outline-offset: 3px;
}

/* ── Plan & Proposal (Configurator) ── */
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: clamp(16px, 3vw, 28px); }
.top {
  position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line);
  background: rgb(10 10 10 / 88%); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.top .wrap { min-height: 56px; display: flex; align-items: center; gap: 16px; }
.top a { color: var(--sub); text-decoration: none; font-size: 14px; transition: color .18s; }
.top a:hover { color: var(--ink); }
.top span { font-size: 14px; font-weight: 600; margin-left: auto; color: var(--sub); }
.hero { padding-block: clamp(26px, 5vw, 52px) 25px; }
h1 { font-size: clamp(27px, 4vw, 40px); letter-spacing: -.025em; line-height: 1.18; }
.hero p { margin-top: 9px; color: var(--sub); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 26px; align-items: start; padding-bottom: 48px; }
.questions { display: grid; min-width: 0; gap: 14px; }
.question, .card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.question { min-inline-size: 0; padding: 17px 20px 20px; }
.question legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-weight: 600; font-size: 17px; }
.scenario-question { position: relative; }
.scenario-question legend { padding-right: 100px; }
.gallery-controls { position: absolute; right: 14px; top: 4px; display: flex; gap: 4px; }
.gallery-controls button {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); cursor: pointer; font-size: 24px; line-height: 1;
}
.gallery-controls button:hover:not(:disabled) { background: #242426; }
.gallery-controls button:disabled { color: var(--faint); cursor: default; }
.options, .scene-gallery { clear: both; display: flex; gap: 10px; }
.options { flex-wrap: wrap; }
.option, .scene { position: relative; cursor: pointer; }
.option input, .scene input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.option span, .scene span { border: 1px solid var(--line); background: #101012; transition: background-color .15s, border-color .15s; }
.option span { display: flex; align-items: center; min-height: 44px; padding: 8px 15px; border-radius: 11px; font-size: 14px; }
.option:hover span, .scene:hover span { border-color: #616166; }
.option input:checked + span, .scene input:checked + span {
  border-color: var(--blue); background-color: #102135; color: var(--blue-light);
}
.scene-gallery { overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 4px 9px; scrollbar-color: #525257 var(--card); }
.scene { flex: 0 0 143px; scroll-snap-align: start; scroll-margin-inline: 4px; }
.scene span { display: block; overflow: hidden; border-radius: 12px; }
.scene img { width: 100%; height: 73px; object-fit: cover; display: block; }
.scene b { display: block; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.result { position: sticky; top: 76px; }
.card { padding: 20px; }
.card-label { font-size: 13px; color: var(--sub); font-weight: 600; margin-bottom: 7px; }
.card h2 { font-size: clamp(23px, 3vw, 30px); letter-spacing: -.02em; line-height: 1.2; }
.card p { margin-top: 10px; color: var(--sub); font-size: 15px; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; min-height: 46px;
  padding: 10px 20px; border: 1px solid transparent; border-radius: 999px; background: var(--blue);
  color: #fff; font-size: 15px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .18s, border-color .18s, transform .18s;
}
.btn:hover { background: #147ce5; }
.btn.secondary, .btn-l { background: transparent; border-color: #3a3a40; color: var(--ink); }
.btn.secondary:hover, .btn-l:hover { background: #1c1c20; border-color: #616168; }
.acts .btn { flex: 1 0 auto; border-radius: 12px; }
.proposal { max-width: 900px; padding-bottom: 48px; }
.proposal .card { padding: clamp(20px, 4vw, 30px); }
.proposal .acts .btn { flex: 0 1 auto; }
.top .proposal { padding-bottom: 0; }

/* ── Scenario Hub & 7 Detail Pages (.tk-scene) ── */
.tk-scene { line-height: 1.62; display: flex; flex-direction: column; min-height: 100vh; }
.tk-scene main { flex: 1; }
.tk-scene a { text-decoration: none; }
.tk-scene .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; color: var(--blue-light); text-transform: uppercase; }
.tk-scene header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(10 10 10 / 88%); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.tk-scene .nav { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.tk-scene .navL { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tk-scene .navR { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.tk-scene .nav-home { font-size: 13.5px; color: var(--sub); white-space: nowrap; transition: color .18s; }
.tk-scene .nav-home:hover { color: var(--ink); }
.tk-scene .nav .tag { font-size: 13px; color: var(--faint); white-space: nowrap; }
.tk-scene .nav .btn { min-height: 36px; padding: 7px 16px; font-size: 13.5px; }
.tk-scene .burger {
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #141416;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; padding: 0;
  transition: border-color .18s, background-color .18s;
}
.tk-scene .burger:hover { border-color: #48484f; background: #1c1c20; }
.tk-scene .burger span { width: 16px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; display: block; }
.tk-scene .burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.tk-scene .burger.open span:nth-child(2) { opacity: 0; }
.tk-scene .burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.tk-scene .crumb { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-scene .crumb a { color: var(--sub); transition: color .18s; }
.tk-scene .crumb a:hover { color: var(--ink); }
.tk-scene .crumb .sep { color: var(--faint); font-weight: 400; }
.tk-scene .crumb .cur { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.tk-scene .menu {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  border-bottom: 1px solid var(--line); background: rgb(16 16 18 / 98%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px rgb(0 0 0 / 55%);
}
.tk-scene .menu.open { display: block; }
.tk-scene .menu .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2px 18px; padding-block: 10px 16px; }
.tk-scene .menu a {
  padding: 11px 10px; border-radius: 9px; font-size: 14.5px; font-weight: 500; color: var(--sub);
  transition: background-color .15s, color .15s;
}
.tk-scene .menu a:hover { background: #1f1f24; color: var(--ink); }
.tk-scene .menu a.on { background: #102135; color: var(--blue-light); font-weight: 600; }

/* Hub & Detail Hero */
.tk-scene .hero {
  position: relative; overflow: hidden; background: #050507; border-bottom: 1px solid var(--line-soft);
  padding-block: clamp(56px, 9vh, 100px); display: flex; align-items: center;
}
.tk-scene .hero.has-bg { min-height: min(68vh, 540px); }
.tk-scene .hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .44; }
.tk-scene .hero.has-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(5 5 7 / 92%) 0%, rgb(5 5 7 / 74%) 48%, rgb(5 5 7 / 28%) 100%);
}
.tk-scene .hero .wrap { position: relative; z-index: 2; width: 100%; }
.tk-scene .hero h1 { font-size: clamp(30px, 4.8vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1.14; margin-top: 12px; max-width: 16em; }
.tk-scene .hero p { font-size: clamp(15px, 1.6vw, 18px); color: #c7c7cc; max-width: 34em; margin-top: 14px; line-height: 1.65; }
.tk-scene .hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* Hub Cards */
.tk-scene .secs { padding-block: clamp(44px, 7vh, 80px); }
.tk-scene .secs .head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.tk-scene .secs h2, .tk-scene h2.t { font-size: clamp(22px, 3vw, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.24; }
.tk-scene .secs .head p { font-size: 15px; color: var(--sub); }
.tk-scene .scenario-promo {
  margin-top: 22px; padding: 20px 24px; border: 1px solid #243b56; border-radius: 18px;
  background: linear-gradient(135deg, #101926 0%, #121318 100%);
  display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.tk-scene .scenario-promo .promo-t { font-size: 16.5px; font-weight: 600; color: var(--ink); }
.tk-scene .scenario-promo .promo-d { font-size: 13.5px; color: var(--sub); margin-top: 4px; }
.tk-scene .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.tk-scene a.sc-card {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card);
  display: flex; flex-direction: column; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.tk-scene a.sc-card:hover { transform: translateY(-3px); border-color: #45454d; box-shadow: 0 16px 36px rgb(0 0 0 / 45%); }
.tk-scene .sc-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #0d0d10; }
.tk-scene .sc-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tk-scene a.sc-card:hover .thumb img { transform: scale(1.03); }
.tk-scene .sc-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.tk-scene .sc-card h3 { font-size: 18.5px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; color: var(--ink); }
.tk-scene .sc-card p { font-size: 14px; color: var(--sub); flex: 1; line-height: 1.6; }
.tk-scene .sc-card .foot { margin-top: 16px; display: flex; align-items: center; justify-content: flex-end; }
.tk-scene .sc-card .go { font-size: 13.5px; font-weight: 600; color: var(--blue-light); }

/* Detail Checkpoints (.pain) & Bottom CTA (.final) */
.tk-scene .pain { padding-block: clamp(48px, 7vh, 80px); background: var(--bg-alt); border-bottom: 1px solid var(--line-soft); }
.tk-scene .pain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.tk-scene .pcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 24px; }
.tk-scene .pcard .n { font-size: 12px; font-weight: 700; color: var(--blue-light); letter-spacing: .8px; margin-bottom: 8px; }
.tk-scene .pcard h3 { font-size: 17.5px; font-weight: 700; color: var(--ink); }
.tk-scene .pcard p { font-size: 14px; color: var(--sub); margin-top: 8px; line-height: 1.6; }
.tk-scene .final { padding-block: clamp(52px, 8vh, 84px); background: var(--bg); text-align: center; }
.tk-scene .final h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; letter-spacing: -.02em; }
.tk-scene .final p { color: var(--sub); font-size: 15px; margin-top: 10px; }
.tk-scene .final .cta-row { margin-top: 24px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.tk-scene footer { border-top: 1px solid var(--line-soft); background: #050507; color: var(--faint); font-size: 12.5px; padding-block: 24px; }
.tk-scene footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.tk-scene footer a { color: var(--sub); }
.tk-scene footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .result { position: static; }
  .tk-scene .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-scene .pain-grid { grid-template-columns: 1fr; }
  .tk-scene .hero.has-bg::after { background: linear-gradient(180deg, rgb(5 5 7 / 62%), rgb(5 5 7 / 92%)); }
}
@media (max-width: 600px) {
  .tk-scene .card-grid { grid-template-columns: 1fr; }
  .tk-scene .nav .tag, .tk-scene .nav-home { display: none; }
}
@media (max-width: 460px) {
  .question { padding-inline: 15px; }
  .proposal .acts .btn { flex: 1 0 auto; }
  .tk-scene header .crumb > a, .tk-scene header .crumb .sep { display: none; }
  .tk-scene .crumb .cur { font-size: 13.5px; }
  .tk-scene .nav .btn { padding-inline: 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
html[dir="rtl"] .top span { margin-left: 0; margin-inline-start: auto; }
html[dir="rtl"] .question legend { float: right; }
html[dir="rtl"] .scenario-question legend { padding-right: 0; padding-left: 100px; }
html[dir="rtl"] .gallery-controls { right: auto; left: 14px; }
html[dir="rtl"] .tk-scene .hero.has-bg::after { background: linear-gradient(270deg, rgb(5 5 7 / 92%) 0%, rgb(5 5 7 / 74%) 48%, rgb(5 5 7 / 28%) 100%); }
html[dir="rtl"] .tk-scene .sc-card .body, html[dir="rtl"] .tk-scene .pcard, html[dir="rtl"] .card { text-align: right; }
html[lang="ar"] body { font-family: "Geeza Pro", "SF Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; line-height: 1.72; }
html[lang="ar"] h1, html[lang="ar"] .tk-scene .hero h1 { letter-spacing: 0; line-height: 1.32; }
html[lang="ur"] body { font-family: "Geeza Pro", "SF Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; line-height: 1.76; }
html[lang="ur"] h1, html[lang="ur"] .tk-scene .hero h1 { letter-spacing: 0; line-height: 1.36; }
@media print {
  :root { color-scheme: light; --ink: #111214; --sub: #5c6066; --faint: #6e6e73; --line: #ccc; --line-soft: #ddd; --bg: white; --bg-alt: white; --card: white; }
  .top, .acts, .tk-scene header, .tk-scene .final { display: none; }
}
