/* ─────────────────────────────────────────────────────
   Views — editorial layout
   Cream surfaces. Type does the work. One accent per plan.
   ──────────────────────────────────────────────────── */

/* ───────────── HOME ─────────────────────────────────── */
.view-home { padding: 18px 0 60px; }

.home-hello {
  max-width: var(--container); margin: 0 auto;
  padding: 8px 16px 18px;
}
.home-hello h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.home-hello .home-sub {
  color: var(--muted); margin: 0;
  font-size: 0.95rem;
}

/* Hero strip — 4 editorial cover cards */
.cover-strip {
  display: grid; grid-template-columns: repeat(4, 86%);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  padding: 6px 16px 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cover-strip::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
  .cover-strip {
    grid-template-columns: 1fr 1fr;
    overflow: visible;
    max-width: var(--container);
    margin: 0 auto;
  }
}

.cover-card {
  scroll-snap-align: center;
  position: relative;
  display: flex; flex-direction: column;
  min-height: 320px;
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: border-color 0.15s, transform 0.15s;
}
.cover-card:active { transform: translateY(1px); }
.cover-card:hover { border-color: var(--p-accent, var(--line-strong)); }

.cover-eyebrow {
  font-size: 0.74rem; font-weight: 700;
  color: var(--p-accent, var(--muted));
  letter-spacing: 1.2px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.cover-eyebrow::after {
  content: ""; flex: 1; height: 1px;
  background: var(--p-accent, var(--line));
  opacity: 0.35;
}

.cover-title {
  font-family: var(--font-serif);
  font-size: 1.85rem; line-height: 1.18;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ink);
}

.cover-rule {
  width: 36px; height: 2px;
  background: var(--p-accent, var(--ink));
  margin: 0 0 14px;
}

.cover-tag {
  font-family: var(--font-serif);
  font-size: 1.02rem; line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 18px;
  max-width: 32ch;
}

.cover-foot {
  margin-top: auto;
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}
.cover-foot .cf-cost {
  color: var(--ink); font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Wizard CTA + leaderboard wrapper */
.home-section { max-width: var(--container); margin: 0 auto; padding: 6px 16px; }
.home-section h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem; font-weight: 700; color: var(--ink);
  margin: 26px 0 12px;
  letter-spacing: -0.005em;
}

.wizard-cta {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 16px 0;
  padding: 18px 20px;
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius);
  max-width: calc(var(--container) - 16px);
}
@media (min-width: 720px) {
  .wizard-cta { margin-inline: auto; max-width: var(--container); margin-top: 14px; }
}
.wizard-cta .wc-text { flex: 1; }
.wizard-cta .wc-title { font-weight: 700; font-size: 1.05rem; font-family: var(--font-serif); }
.wizard-cta .wc-sub { font-size: 0.85rem; opacity: 0.75; margin-top: 2px; }
.wizard-cta .wc-btn {
  background: var(--bg); color: var(--ink);
  border: 0; border-radius: 999px;
  padding: 10px 18px; font-weight: 700;
  min-height: 42px;
}

/* Leaderboard */
.leaderboard {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: grid; gap: 8px;
}
.lb-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.lb-row.is-leader { border-color: var(--p-accent, var(--ink)); }
.lb-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--surface-2); color: var(--p-accent, var(--ink));
  border-radius: 8px; font-weight: 800; font-size: 0.95rem;
  font-family: var(--font-serif);
}
.lb-row.is-leader .lb-num { background: var(--p-accent, var(--ink)); color: #fff; }
.lb-meta { min-width: 0; }
.lb-name { font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.lb-stats { display: flex; gap: 12px; font-size: 0.82rem; color: var(--muted); }
.lb-stats strong { color: var(--ink); font-weight: 700; }
.lb-bar {
  position: relative; width: 100%; height: 4px;
  background: var(--surface-2); border-radius: 999px; overflow: hidden;
  margin-top: 6px;
}
.lb-bar > span {
  display: block; height: 100%;
  background: var(--p-accent, var(--ink));
}
.lb-pct { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Comparison table (collapsed details) */
.compare-details {
  margin: 14px 16px;
  max-width: calc(var(--container) - 16px);
}
@media (min-width: 720px) { .compare-details { margin-inline: auto; max-width: var(--container); } }
.compare-details > summary {
  cursor: pointer; user-select: none;
  list-style: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 700;
  font-family: var(--font-serif);
}
.compare-details > summary::-webkit-details-marker { display: none; }
.compare-details > summary::before { content: "↘  "; color: var(--muted); }
.compare-details[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.compare-table-wrap {
  border: 1px solid var(--line); border-top: 0;
  border-bottom-left-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm);
  background: var(--surface); overflow-x: auto;
}
.compare-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.88rem; }
.compare-table th, .compare-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  text-align: start; vertical-align: top;
}
.compare-table thead th { background: var(--surface-2); font-weight: 700; color: var(--ink); }
.compare-table tbody th { background: var(--surface-2); font-weight: 700; color: var(--ink-2); white-space: nowrap; }

.home-footer {
  text-align: center; color: var(--muted); font-size: 0.85rem;
  padding: 28px 16px;
}

/* ───────────── PLAN DETAIL ──────────────────────────── */
.view-plan { padding: 0; }

.plan-back {
  position: sticky; top: var(--topbar-h); z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.plan-back .pb-arrow {
  background: transparent; border: 0; padding: 4px 8px;
  font-size: 1.3rem; color: var(--ink);
}
.plan-back .pb-name {
  font-weight: 700; color: var(--ink);
}

/* Editorial cover — cream surface, big serif, single accent */
.plan-cover {
  position: relative;
  padding: 28px 20px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.plan-cover .pc-eyebrow {
  font-size: 0.78rem; font-weight: 700;
  color: var(--p-accent);
  letter-spacing: 1.5px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.plan-cover .pc-eyebrow::after {
  content: ""; flex: 1; height: 1px;
  background: var(--p-accent);
  opacity: 0.4;
}
.plan-cover .pc-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 700; line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 16px;
  max-width: 12ch;
}
.plan-cover .pc-rule {
  width: 48px; height: 2px;
  background: var(--p-accent);
  margin: 0 0 16px;
}
.plan-cover .pc-feel {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 3vw, 1.22rem);
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 12px;
  max-width: 38ch;
}
.plan-cover .pc-best-for {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.6;
}
.plan-cover .pc-best-label {
  color: var(--p-accent); font-weight: 700;
}

/* Editorial fact list on cover — plain label·value, no chips */
.pc-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.pc-facts .pcf-label { color: var(--muted); font-weight: 600; }
.pc-facts .pcf-value { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Sticky tab strip */
.plan-tabs {
  position: sticky;
  top: calc(var(--topbar-h) + 45px);
  z-index: 25;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.plan-tabs-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; gap: 4px;
  padding: 8px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  scroll-padding-inline-start: 16px;
}
.plan-tabs-inner::-webkit-scrollbar { display: none; }
.plan-tab {
  scroll-snap-align: start;
  flex: 0 0 auto;
  background: transparent; color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 14px;
  font-size: 0.9rem; font-weight: 700;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.plan-tab:hover { color: var(--ink); }
.plan-tab.is-active {
  color: var(--p-accent);
  border-bottom-color: var(--p-accent);
}

/* Plan sections */
.plan-sections {
  max-width: var(--container); margin: 0 auto;
  padding: 14px 16px 40px;
}
.plan-section {
  scroll-margin-top: calc(var(--topbar-h) + 100px);
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
}
.plan-section:last-child { border-bottom: 0; }
.plan-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.section-eyebrow {
  color: var(--p-accent, var(--muted));
  font-size: 0.74rem; font-weight: 700; letter-spacing: 1.5px;
  margin-bottom: 6px;
}

/* Per-plan accent scoping */
[data-plan="plan1"] { --p-accent: #2f5d4f; }
[data-plan="plan2"] { --p-accent: #1f2a44; }
[data-plan="plan3"] { --p-accent: #1c4a6b; }
[data-plan="plan4"] { --p-accent: #a04a2f; }

/* Plan section content helpers */
.plan-intro,
.plan-header-note {
  font-family: var(--font-serif);
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0 0 10px;
}
.plan-header-note {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  margin-top: 14px;
}
.section-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 12px;
  line-height: 1.6;
}
.cost-total-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 10px 0 0;
  font-style: italic;
}

/* Practical list — editorial sectioned */
.practical-list {
  display: grid; gap: 0;
}
.p-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.p-item:last-child { border-bottom: 0; }
.p-item-title {
  font-family: var(--font-serif);
  font-size: 1.05rem; font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}
.p-item-title::before {
  content: "—"; color: var(--p-accent);
  margin-inline-end: 8px; font-weight: 400;
}
.p-item-text {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.75;
}

/* Activities by city (plan 1 footnote) */
.activities {
  display: grid; gap: 18px;
}
.activity-group { padding: 4px 0; }
.activity-city {
  font-family: var(--font-serif);
  font-size: 1.02rem; font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.activity-items {
  list-style: none; padding: 0; margin: 0;
}
.activity-items li {
  padding: 6px 0;
  font-size: 0.93rem;
  color: var(--ink-2);
  line-height: 1.65;
  border-bottom: 1px dashed var(--line);
}
.activity-items li:last-child { border-bottom: 0; }

/* Landmark notes (plan 3) */
.landmark-notes { display: grid; gap: 14px; }
.landmark-note {
  padding: 12px 16px;
  border-inline-start: 2px solid var(--p-accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.landmark-note h3 {
  font-family: var(--font-serif);
  font-size: 1.02rem; font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}
.landmark-note p {
  margin: 0; color: var(--ink-2);
  font-size: 0.94rem; line-height: 1.7;
}

/* Summary note (plan 2 الخلاصة) */
.summary-note {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.summary-note p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.6;
}

/* ───────────── INTRO ───────────────────────────────── */
.view-intro {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 24px 18px 80px;
}

.intro-hero { padding: 8px 0 22px; }
.intro-eyebrow {
  font-size: 0.78rem; font-weight: 700;
  color: var(--muted);
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}
.intro-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: var(--ink);
}
.intro-lede {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
  max-width: 38ch;
}

.intro-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin: 18px 0 0;
  position: relative;
}
.intro-step-num {
  position: absolute;
  top: -14px;
  inset-inline-start: 18px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--bg);
  border-radius: 8px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
}
.intro-step-title {
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 700;
  margin: 4px 0 6px;
  color: var(--ink);
}
.intro-step-sub {
  color: var(--ink-2);
  margin: 0 0 14px;
  font-size: 0.94rem;
  line-height: 1.65;
}

.intro-name-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.intro-name-input:focus { border-color: var(--ink); }

.intro-steps {
  margin: 0;
  padding-inline-start: 22px;
  color: var(--ink-2);
  line-height: 1.85;
  font-size: 0.96rem;
}
.intro-steps li { margin: 4px 0; }
.intro-steps li::marker {
  color: var(--muted);
  font-weight: 700;
  font-family: var(--font-serif);
}

.intro-suggest-text {
  width: 100%; resize: vertical;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  min-height: 110px;
  outline: none;
  transition: border-color 0.15s;
}
.intro-suggest-text:focus { border-color: var(--ink); }
.intro-suggest-foot {
  display: flex; justify-content: flex-end;
  margin-top: 8px;
}
.intro-suggest-submit {
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 40px;
}
.intro-suggest-submit:hover { border-color: var(--ink); }
.intro-suggest-submit:disabled { opacity: 0.5; }

.intro-cta {
  margin: 28px 0 0;
  display: flex; justify-content: center;
}
.intro-start {
  background: var(--ink); color: var(--bg);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 18px 28px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  min-height: 56px;
  cursor: pointer;
  width: 100%;
  max-width: 360px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform 0.1s;
}
.intro-start:active { transform: scale(0.98); }
.intro-start.is-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.intro-start-arrow { font-size: 1.2rem; }

/* ───────────── DONE ────────────────────────────────── */
.view-done {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 24px 18px 80px;
}

.done-hero { padding: 8px 0 22px; }

.done-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin: 18px 0 0;
}
.done-vote {
  border-color: var(--p-accent, var(--ink-2));
  background: color-mix(in srgb, var(--p-accent, var(--ink)) 6%, var(--surface));
}
.done-vote-missing {
  border-style: dashed;
}

.booking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.booking-item {
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.booking-plan {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  font-size: 0.98rem;
}
.booking-text {
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.65;
}

.done-cta { margin-top: 32px; }
