/* =====================================================================
   Diwan Consulting · UAE Company Setup Simulator
   Diwan design system: navy #022355, blue #145db1, green #01af95
   ===================================================================== */
:root {
  --navy: #022355; --blue: #145db1; --green: #01af95; --ink: #1d2b3e; --muted: #5b6b80;
  --line: #dfe5ec; --soft: #f5f7fa; --radius: 14px;
  --serif: "Source Serif 4", Georgia, serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --deep: radial-gradient(130% 120% at 0% 0%, #0e8c86 0%, #145db1 20%, #0b3a78 36%, #022355 52%, #010d22 72%, #000 100%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--soft); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.sm-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.sm-hdr { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.sm-hdr__in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.sm-hdr__logo img { height: 36px; width: auto; }
.sm-hdr__tag { padding-left: 20px; border-left: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sm-hdr__lang { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none; border: 1px solid var(--line); padding: 8px 14px; }
.sm-hdr__lang:hover { border-color: var(--navy); }

/* Hero band */
.sm-hero { background: var(--deep); color: #fff; padding: 56px 0 120px; text-align: center; }
.sm-hero__k { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6fe3cf; }
.sm-hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; margin: 0 auto 14px; max-width: 820px; }
.sm-hero__p { max-width: 680px; margin: 0 auto; color: rgba(255, 255, 255, .85); font-size: 17px; }

/* Card */
.sm-main { padding: 0 16px 80px; margin-top: -80px; position: relative; }
.sm-box { max-width: 760px; margin: 0 auto; background: #fff; border-radius: 22px; padding: 40px 44px 36px; box-shadow: 0 30px 70px rgba(2, 35, 85, .16); }
.sm-step { display: none; }
.sm-step.is-active { display: block; animation: smIn .35s ease; }
@keyframes smIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sm-k { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.sm-step h2 { font-family: var(--sans); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.25; font-weight: 700; color: #0b1424; margin: 0 0 8px; letter-spacing: -.01em; }
.sm-lead { margin: 0 0 24px; color: var(--muted); font-size: 16.5px; }

/* Progress */
.sm-prog { padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.sm-prog p { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.sm-prog b { color: var(--blue); font-weight: 600; }
.sm-prog__bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sm-prog__bar { height: 5px; border-radius: 5px; background: #e3e9f0; transition: background .3s; }
.sm-prog__bar.is-done { background: var(--blue); }

/* Option cards */
.sm-list { display: grid; gap: 12px; }
.sm-list--scroll { max-height: 470px; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); scrollbar-width: thin; }
.sm-list--2 { grid-template-columns: 1fr 1fr; }
.sm-card { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.sm-card:hover { border-color: #b8c7da; }
.sm-card input, .sm-row input, .sm-pill input { position: absolute; opacity: 0; pointer-events: none; }
.sm-card__ic { width: 46px; height: 46px; border-radius: 12px; background: #eef3f9; color: var(--navy); display: flex; align-items: center; justify-content: center; flex: none; transition: background .2s, color .2s; }
.sm-card__tx { flex: 1; min-width: 0; }
.sm-card__tx strong { display: block; font-size: 16.5px; font-weight: 600; color: #0b1424; }
.sm-card__tx span { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.sm-radio { width: 26px; height: 26px; border-radius: 50%; border: 1.6px solid #9aa8b8; flex: none; position: relative; transition: border-color .2s; }
.sm-radio::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--blue); transform: scale(0); transition: transform .2s; }
.sm-card:has(input:checked), .sm-row:has(input:checked) { border-color: var(--blue); background: #f4f8fd; box-shadow: 0 0 0 1px var(--blue); }
.sm-card:has(input:checked) .sm-card__ic { background: var(--blue); color: #fff; }
.sm-card:has(input:checked) .sm-radio, .sm-row:has(input:checked) .sm-radio { border-color: var(--blue); }
.sm-card:has(input:checked) .sm-radio::after, .sm-row:has(input:checked) .sm-radio::after { transform: scale(1); }
.sm-card:has(input:focus-visible), .sm-row:has(input:focus-visible), .sm-pill:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }

/* Groups */
.sm-group { margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.sm-step > .sm-group:first-of-type { margin-top: 0; }
.sm-q { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16.5px; font-weight: 600; color: #0b1424; }
.sm-q svg { color: var(--muted); }
.sm-rows { display: grid; gap: 10px; }
.sm-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 15px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 16px; transition: border-color .2s, background .2s; }
.sm-pills { display: grid; gap: 10px; }
.sm-pills--8 { grid-template-columns: repeat(8, 1fr); }
.sm-pills--4 { grid-template-columns: repeat(4, 1fr); }
.sm-pills--2 { grid-template-columns: 1fr 1fr; }
.sm-pill { position: relative; display: flex; }
.sm-pill span { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 8px 10px; background: #fff; border: 1px solid #cdd6e1; border-radius: 12px; font-size: 16px; cursor: pointer; transition: all .2s; }
.sm-pill span:hover { border-color: var(--navy); }
.sm-pill input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.sm-other { margin-top: 14px; }
.sm-deps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sm-visit { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Compare table */
.sm-cmp-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 0; background: none; border: 0; font: inherit; font-size: 16px; font-weight: 500; color: var(--blue); cursor: pointer; }
.sm-cmp-btn svg { width: 18px; height: 18px; transition: transform .2s; }
.sm-cmp-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.sm-cmp { margin-top: 14px; }
.sm-cmp table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 15px; }
.sm-cmp th, .sm-cmp td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.sm-cmp tr:last-child th, .sm-cmp tr:last-child td { border-bottom: 0; }
.sm-cmp thead th { color: var(--blue); font-weight: 600; }
.sm-cmp tbody th { font-weight: 500; color: #0b1424; }
.sm-cmp tbody td { color: var(--muted); }
.sm-cmp p { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* Form fields */
.sm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sm-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; font-size: 14.5px; font-weight: 600; color: #0b1424; }
.sm-field input, .sm-field select, .sm-phone select, .sm-phone input {
  width: 100%; height: 52px; padding: 0 14px; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  background: #fff; border: 1px solid #cdd6e1; border-radius: 12px; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
.sm-field select, .sm-phone select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23022355' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
.sm-field input:focus, .sm-field select:focus, .sm-phone select:focus, .sm-phone input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20, 93, 177, .15); }
.sm-phone { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.sm-err { font-style: normal; font-size: 13px; font-weight: 500; color: #b4324a; min-height: 0; }
.sm-err:empty { display: none; }
.sm-field.is-invalid input, .sm-field.is-invalid select { border-color: #b4324a; }
.sm-check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 6px 0 4px; font-size: 14px; color: var(--muted); }
.sm-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); }
.sm-check .sm-err { grid-column: 2; }
.sm-hp { position: absolute; left: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.sm-note { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.sm-step-err { margin: 14px 0 0; color: #b4324a; font-size: 14.5px; font-weight: 500; }
.sm-step-err:empty { display: none; }

/* Buttons */
.sm-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.sm-foot--one { justify-content: flex-end; }
.sm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 30px; border-radius: 14px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, transform .1s; }
.sm-btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.sm-btn:active { transform: translateY(1px); }
.sm-btn[disabled] { opacity: .7; cursor: wait; }
.sm-btn--ghost { background: #fff; color: var(--navy); border-color: #cdd6e1; }
.sm-btn--ghost:hover { background: #fff; color: var(--navy); border-color: var(--navy); }

/* Modal */
.sm-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(1, 10, 28, .72); }
.sm-modal__box { max-width: 520px; width: 100%; background: #fff; border-radius: 22px; padding: 44px 40px 38px; text-align: center; border-top: 5px solid var(--green); animation: smIn .35s ease; }
.sm-modal__ic { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%; background: rgba(1, 175, 149, .12); color: var(--green); display: flex; align-items: center; justify-content: center; }
.sm-modal__ic svg { width: 34px; height: 34px; stroke-width: 2.4; }
.sm-modal h2 { font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.25; color: var(--navy); margin: 0 0 14px; }
.sm-modal p { color: var(--muted); margin: 0 0 10px; }
.sm-modal .sm-btn { margin-top: 18px; width: 100%; }

/* Responsive */
@media (max-width: 760px) {
  .sm-hdr__tag { display: none; }
  .sm-hero { padding: 40px 0 100px; }
  .sm-box { padding: 28px 20px 24px; border-radius: 18px; }
  .sm-grid2, .sm-deps, .sm-list--2 { grid-template-columns: 1fr; gap: 0 14px; }
  .sm-list--2 { gap: 10px; }
  .sm-deps { gap: 0; }
  .sm-pills--8 { grid-template-columns: repeat(4, 1fr); }
  .sm-pills--4 { grid-template-columns: 1fr 1fr; }
  .sm-group { padding: 16px; }
  .sm-card { padding: 14px; gap: 12px; }
  .sm-card__ic { width: 40px; height: 40px; }
  .sm-list--scroll { max-height: 420px; padding: 8px; }
  .sm-phone { grid-template-columns: 118px 1fr; }
  .sm-foot .sm-btn { flex: 1; padding: 0 14px; font-size: 15.5px; white-space: nowrap; }
  .sm-foot #smBack { flex: 0 0 auto; }
  .sm-foot .sm-btn svg { width: 18px; height: 18px; }
  .sm-foot--one .sm-btn { flex: 1; }
  .sm-cmp th, .sm-cmp td { padding: 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .sm-step.is-active, .sm-modal__box { animation: none; } }

/* Regulated activity sub-question (Finance / Web3) */
.sm-reg { margin-top: 22px; padding: 18px 18px 6px; background: #f4f8fd; border: 1px solid #d7e3f3; border-left: 4px solid var(--blue); border-radius: 12px; }
.sm-reg .sm-q { margin-bottom: 6px; }
.sm-hint { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.sm-pills--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .sm-pills--3 { grid-template-columns: 1fr; } }
