/* Proposal pages — built on main.css tokens. */
.proposal main { padding-top: var(--header-h); }
/* Numbers here are often mixed with Arabic units ("35.1 شهرًا"), so keep the page's RTL direction. */
.proposal .num { direction: inherit; }
.proposal .num[dir="ltr"] { direction: ltr; }
.proposal main > .p-hero { padding: 72px 56px 40px; }
.proposal main > .p-sec { padding: 56px 56px; }
.proposal .topbar nav a { font-size: 14px; padding: 8px 12px; white-space: nowrap; }
.proposal .topbar nav .nl-short { display: none; }
@media (max-width: 1360px) and (min-width: 861px) {
  .proposal .topbar nav .nl-full { display: none; }
  .proposal .topbar nav .nl-short { display: inline; }
}
@media (max-width: 1040px) and (min-width: 861px) {
  .proposal .topbar .brand-text small { display: none; }
  .proposal .topbar .btn-ghost { display: none; }
}
.proposal .topbar nav .pn { color: var(--faint); font-size: 12px; }
.proposal .topbar nav a.active .pn { color: var(--accent); }

.p-hero { padding: 72px 56px 40px; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 400px at 85% -10%, rgba(58, 155, 255, .16), transparent 60%), var(--bg); }
.p-hero .wrap { max-width: 1200px; }
.p-hero .kicker { display: inline-flex; gap: 10px; align-items: center; color: var(--accent); font-weight: 600; font-size: 14px; }
.p-hero .kicker .num { color: var(--faint); }
.p-hero h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; margin-top: 12px; max-width: 900px; }
.p-hero p.lead { color: var(--muted); font-size: 18px; margin-top: 14px; max-width: 820px; }

.p-sec { padding: 56px 56px; }
.p-sec + .p-sec { border-top: 1px solid var(--line); }
.p-sec .wrap { max-width: 1200px; }
.p-sec h2 { font-size: clamp(22px, 2.3vw, 30px); font-weight: 700; }
.p-sec h2 + .sub { color: var(--muted); margin-top: 8px; max-width: 820px; }
.p-sec h3 { font-size: 18px; font-weight: 700; }
.sec-head { margin-bottom: 28px; }

.grid { display: grid; gap: 16px; }
.grid > *, .qual > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.stat { padding: 20px; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; font-size: 26px; font-weight: 700; margin-top: 4px; line-height: 1.25; }
.stat em { font-style: normal; color: var(--faint); font-size: 13px; }

.list { margin: 12px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; color: var(--muted); }
.list li::marker { color: var(--accent); }
.list.tight { gap: 3px; font-size: 14px; }

/* Tables */
.t-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.t { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.t th, .t td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.t thead th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 13px; position: sticky; top: 0; }
.t tbody tr:last-child td { border-bottom: 0; }
.t td.n, .t th.n { text-align: end; white-space: nowrap; }
.t td.c, .t th.c { text-align: center; }
.t .muted { color: var(--muted); }
.t tr.hl td { background: rgba(58, 155, 255, .06); }

/* Source chips & status tags */
.src {
  display: inline-block; margin-inline-start: 4px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); text-decoration: none; white-space: nowrap; vertical-align: 1px;
}
.src:hover { background: rgba(58, 155, 255, .26); }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.tag.ok { color: var(--ok); border-color: rgba(61, 220, 151, .4); }
.tag.part { color: var(--warn); border-color: rgba(245, 184, 65, .4); }
.tag.no { color: var(--alert); border-color: rgba(255, 107, 94, .4); }
.tag.prop { color: var(--steel); border-color: var(--line-strong); }
.tag.hi { color: var(--alert); border-color: rgba(255, 107, 94, .4); }
.tag.mid { color: var(--warn); border-color: rgba(245, 184, 65, .4); }
.tag.lo { color: var(--ok); border-color: rgba(61, 220, 151, .4); }

.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.callout b { color: var(--text); }
.callout.warn { border-color: rgba(245, 184, 65, .35); background: rgba(245, 184, 65, .07); color: var(--warn-text); }
.callout.info { border-color: rgba(58, 155, 255, .35); background: rgba(58, 155, 255, .07); }
.callout p + p { margin-top: 6px; }

/* Brief */
.toc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.toc a { display: block; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.toc a:hover { border-color: var(--accent); transform: translateY(-2px); }
.toc .num { color: var(--accent); font-weight: 700; font-size: 14px; }
.toc b { display: block; font-size: 18px; margin-top: 4px; }
.toc p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* Competitors */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filters button {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--muted); font-weight: 600; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.comp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.comp { display: flex; flex-direction: column; gap: 12px; }
.comp[hidden] { display: none; }
.comp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.comp-top h3 { font-size: 19px; }
.comp-top .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.comp-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.comp .facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.comp .facts li::before { content: "•"; color: var(--accent); margin-inline-end: 8px; }
.sw { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sw > div { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.sw h4 { font-size: 13px; margin-bottom: 6px; }
.sw ul { margin: 0; padding-inline-start: 16px; display: grid; gap: 3px; }
.sw .s { background: rgba(61, 220, 151, .07); border: 1px solid rgba(61, 220, 151, .22); }
.sw .s h4 { color: var(--ok); }
.sw .w { background: rgba(255, 107, 94, .06); border: 1px solid rgba(255, 107, 94, .22); }
.sw .w h4 { color: var(--alert); }
.opp { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid rgba(58, 155, 255, .3); font-size: 14px; }
.opp h4 { color: var(--accent); font-size: 13px; margin-bottom: 6px; }
.opp ul { margin: 0; padding-inline-start: 16px; display: grid; gap: 3px; }
.comp .srcs { font-size: 12px; color: var(--faint); }
.comp .srcs a { color: var(--faint); }
.matrix td.c { font-size: 16px; }
.yes { color: var(--ok); font-weight: 700; }
.no-x { color: var(--faint); }

/* Segments */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tier { border-top: 3px solid var(--line-strong); }
.tier.t1 { border-top-color: var(--steel); }
.tier.t2 { border-top-color: var(--accent); }
.tier.t3 { border-top-color: var(--ok); }
.tier.t4 { border-top-color: var(--sun); }
.tier-grid.four { grid-template-columns: repeat(4, 1fr); }
.tier .range { font-size: 22px; font-weight: 700; margin-top: 6px; }
.tier .lbl { color: var(--muted); font-size: 13px; }
.qual { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.qual-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qual-row label { font-weight: 600; }
.qual-row .w { color: var(--faint); font-size: 12px; }
.qual-row .hint { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.qual-row input[type="range"] { grid-column: 1 / -1; }
.qual-row output { color: var(--accent); font-weight: 700; }
.qual-row select {
  grid-column: 1 / -1; width: 100%; min-height: 44px; padding: 0 12px; margin-top: 6px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
}
.qual-row select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.score-card { position: sticky; top: calc(var(--header-h) + 16px); text-align: center; }
.score-card .big { font-size: 64px; font-weight: 700; line-height: 1; margin-top: 8px; }
.score-card .big small { font-size: 22px; color: var(--muted); }
.score-card .prio { display: inline-block; margin-top: 12px; padding: 4px 14px; border-radius: 999px; font-weight: 700; }
.prio.p1 { background: rgba(61, 220, 151, .14); color: var(--ok); }
.prio.p2 { background: rgba(245, 184, 65, .14); color: var(--warn); }
.prio.p3 { background: rgba(255, 107, 94, .14); color: var(--alert); }
.score-card .advice { color: var(--muted); margin-top: 12px; font-size: 14px; }
.score-card .route { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }

/* Package */
.cf-chart svg { width: 100%; height: auto; display: block; }
.check-ok { color: var(--ok); font-weight: 700; }
.check-bad { color: var(--alert); font-weight: 700; }

/* Phases */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; }
.timeline .dot { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--surface-3); color: var(--accent); border: 1px solid var(--line-strong); }
.timeline li.done .dot { background: rgba(61, 220, 151, .14); color: var(--ok); border-color: rgba(61, 220, 151, .35); }
.timeline .card { padding: 18px 20px; }
.timeline .head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.timeline .dur { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }
.timeline .out { margin-top: 10px; font-size: 14px; color: var(--steel); }
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: j; list-style: none; padding: 0; margin: 0; }
.journey li { counter-increment: j; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.journey li::before { content: counter(j); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
.journey b { display: block; margin-top: 8px; }
.journey p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.journey .who { color: var(--faint); font-size: 12px; margin-top: 8px; }

.pager { display: flex; justify-content: space-between; gap: 12px; padding: 32px 56px 48px; max-width: 1312px; margin: 0 auto; }
.pager a { display: grid; padding: 14px 20px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; min-width: 220px; }
.pager a small { color: var(--faint); font-weight: 500; }
.pager a:hover { border-color: var(--accent); }
.pager a.next { text-align: end; margin-inline-start: auto; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(700px 400px at 50% 0%, rgba(58, 155, 255, .18), transparent 70%), var(--bg); }
.login { width: min(420px, 100%); display: grid; gap: 16px; }
.login .brand-mark { width: 48px; height: 48px; color: var(--accent); }
.login h1 { font-size: 24px; }
.login p { color: var(--muted); }
.login input[type="password"] {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2);
}
.login input[type="password"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login .err { color: var(--alert); font-size: 14px; }

@media (max-width: 1100px) {
  .proposal .topbar nav a { padding: 8px 8px; font-size: 13px; }
  .proposal .topbar nav .pn { display: none; }
}
@media (max-width: 960px) {
  .g3, .g4, .toc, .tier-grid, .tier-grid.four { grid-template-columns: repeat(2, 1fr); }
  .comp-grid, .qual, .g2 { grid-template-columns: 1fr; }
  .journey { grid-template-columns: repeat(2, 1fr); }
  .score-card { position: static; }
}
@media (max-width: 860px) {
  .proposal .topbar .btn-ghost { display: none; }
  .proposal .topbar .theme-btn { margin-inline-start: auto; }
  .proposal .topbar nav .pn { display: inline; }
  .proposal main > .p-hero { padding: 48px 16px 28px; }
  .proposal main > .p-sec { padding: 40px 16px; }
  .pager { padding: 24px 16px 40px; }
  .pager a { min-width: 0; flex: 1; }
}
@media (max-width: 560px) {
  .g3, .g4, .toc, .tier-grid, .tier-grid.four, .journey { grid-template-columns: 1fr; }
  .sw { grid-template-columns: 1fr; }
  .stat strong { font-size: 22px; }
}
@media print {
  .topbar, .pager, .site-footer, .filters { display: none !important; }
  body { background: #fff; color: #111; }
  .proposal main { padding-top: 0; }
}
