/* Onboarding (/start). Uses the tokens of site.css; logical properties keep Arabic right-to-left layouts correct. */
.start { padding-block: 28px 0; min-height: 70vh; }
.start-wrap { max-width: 1040px; }
.start-top { margin-bottom: 8px; }
.start-top .eyebrow { margin-bottom: .5rem; }
.steps-bar { margin-bottom: 10px; }
.steps-bar span.skip { background: repeating-linear-gradient(90deg, var(--stone) 0 3px, transparent 3px 6px); }
.start-count { font-size: .9rem; color: var(--slate); margin-bottom: 18px; }
.start-step { min-height: 320px; }
.step-head { margin-bottom: 20px; }
.step-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); outline: none; }
.step-head .lead { font-size: 1.08rem; }

/* Option cards */
.option { display: flex; flex-direction: column; gap: 2px; padding-inline-end: 40px; }
.option .field-icon { margin-bottom: 8px; }
.option .opt-text { display: block; line-height: 1.45; }
.option .opt-meta { display: block; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.option .opt-plans { display: block; font-size: .78rem; color: var(--emerald-deep); }
.option[disabled] { cursor: not-allowed; opacity: .62; background: #FBFAF6; }
.option:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.options.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.options.compact .option { padding: 12px 14px; padding-inline-end: 38px; }
.options.compact .opt-text { font-size: .84rem; }
.options.levels { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.options.langs { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.options.langs strong { font-size: 1.15rem; }
.fields-grid .option strong { font-family: var(--serif-head); font-size: 1.02rem; }

.opt-group { margin-block: 26px 10px; }
.opt-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.opt-group-head h2 { font-size: 1.2rem; margin: 0; }
.sub-head { font-size: 1.2rem; margin: 30px 0 12px; }
.group-tools { gap: 8px 12px; }

/* Level badges, from foundations (sage) to specialist (navy) */
.badge.lv-complete_beginner { background: var(--sage-soft); color: var(--emerald-deep); }
.badge.lv-beginner { background: #DCEBE2; color: var(--emerald-deep); }
.badge.lv-intermediate { background: var(--gold-soft); color: #7A5B1E; }
.badge.lv-advanced { background: #E3E8EE; color: var(--navy); }
.badge.lv-expert { background: var(--navy); color: #fff; }

/* Topic search and custom topics */
.topic-search { margin-bottom: 8px; }
.topic-search label { display: flex; align-items: center; gap: 6px; }
.search-results { margin-top: 10px; }
.hit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 340px; overflow: auto; }
.hit { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: start; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font: inherit; color: inherit; cursor: pointer; }
.hit:hover { border-color: var(--sage); }
.hit .tick { flex: none; margin-top: 4px; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #CDD2CC; }
.hit[aria-pressed='true'] { border-color: var(--emerald); background: #F3F8F5; }
.hit[aria-pressed='true'] .tick { background: var(--emerald); border-color: var(--emerald); box-shadow: inset 0 0 0 3px #fff; }
.custom-box { margin-top: 28px; }
.custom-box summary { cursor: pointer; list-style-position: inside; }
.custom-box[open] summary { margin-bottom: 12px; }
.custom-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.custom-row .field { margin-bottom: 0; }
.custom-pending { margin-top: 16px; }
.custom-msg:empty { display: none; }
.custom-msg { margin-top: 12px; }

/* Delivery */
.days .chip { min-width: 52px; justify-content: center; }
.times { display: grid; gap: 8px; justify-items: start; }
.time-row { display: flex; gap: 8px; align-items: center; }
.time-row input { width: 9.5rem; }
.tz select { margin-top: 8px; height: auto; }
.tz p { margin-bottom: 8px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.linkish:hover { color: var(--emerald-deep); }
.advanced { margin-top: 20px; }
.advanced summary { cursor: pointer; }
.advanced[open] summary { margin-bottom: 12px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
label.check input { width: 18px; height: 18px; accent-color: var(--emerald); }
.split-card h3 { font-size: 1.05rem; }

/* Review */
.summary { margin: 0 0 32px; padding: 6px 22px; }
.sum-row { display: grid; grid-template-columns: 220px 1fr; gap: 6px 20px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: 0; }
.sum-row dt { font-weight: 600; color: var(--navy); display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.sum-row dd { margin: 0; min-width: 0; }
.sum-fields, .sum-sub { margin: 0; padding-inline-start: 1.1em; }
.sum-fields > li { margin-bottom: 8px; }
.sum-sub { font-size: .92rem; color: var(--slate); }
.edit { font-size: .85rem; font-weight: 500; }
.edit-more { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; }
.review-part { margin-top: 36px; }
.sequence { list-style: none; counter-reset: seq; margin: 0; padding: 0; display: grid; gap: 8px; }
.sequence li { counter-increment: seq; position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; padding-inline-start: 52px; }
.sequence li::before { content: counter(seq); position: absolute; inset-inline-start: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font: 600 .8rem/26px var(--sans); text-align: center; }
.seq-title { font: 600 1rem/1.4 var(--serif); color: var(--navy); }
.seq-meta { font-size: .85rem; margin-top: 4px; }
.fit .notice { margin-bottom: 14px; }
.fit-card.best { border-color: var(--emerald); box-shadow: inset 0 0 0 1px var(--emerald); }
.reasons { margin: 0; padding-inline-start: 1.1em; color: #6B4E0F; }
span.reasons { display: block; padding: 0; margin-top: 6px; }

/* Payment */
.options.plans { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan-option .price { display: block; font: 700 1.05rem var(--serif-head); color: var(--navy); margin-block: 10px 6px; }
.highlights { margin: 4px 0 0; padding-inline-start: 1.1em; color: var(--slate); }
.auth { max-width: 520px; }
.auth h3 { margin-bottom: .3em; }
.finish { margin-top: 18px; display: grid; gap: 12px; }
.finish-log { margin: 0; padding-inline-start: 1.1em; }

/* Learning mode step and requests in the subscriber's own words */
.mode-extra { margin-top: 28px; align-items: start; }
.mode-extra .pw-preview { margin-top: 0; }
.req-box summary { cursor: pointer; }
.req-box[open] summary { margin-bottom: 12px; }
.req-form textarea { width: 100%; min-height: 84px; margin-block: 8px 10px; }
.req-form .row { gap: 10px 14px; align-items: center; }
.req-msg:empty { display: none; }
.req-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.req-card { padding: 16px; }
.req-card.confirmed { border-color: var(--emerald); }
.req-title { font-size: 1.15rem; margin-bottom: 6px; }
.req-text { color: var(--slate); font-style: italic; overflow-wrap: anywhere; }
.req-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; margin: 10px 0; }
.req-facts dt { font-weight: 600; color: var(--muted); font-size: .78rem; }
.req-facts dd { margin: 0; color: var(--navy); }
.req-options { margin-bottom: 12px; }
.req-actions { gap: 8px; margin-top: 8px; }
.topics-step .req-box, .custom-box { margin-top: 20px; }
.lens-box { margin-bottom: 12px; padding: 12px; border-radius: var(--radius); background: var(--gold-soft, #F6EFDD); }
.lens-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* Back / Next */
.start-nav { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 12px; margin-top: 36px; padding-block: 14px; background: linear-gradient(to top, var(--ivory) 75%, rgba(248, 246, 240, 0)); border-top: 1px solid var(--line); }
.start-nav #next { margin-inline-start: auto; }
.start-why { margin: 0; font-size: .86rem; color: var(--muted); flex: 1; text-align: end; }
.start-why:empty { display: none; }
.start-nav [hidden] { display: none; }
.start + .site-foot, main.start ~ .site-foot { margin-top: 48px; }

@media (max-width: 640px) {
  .start { padding-top: 18px; }
  .options, .options.compact, .options.levels, .options.langs { grid-template-columns: 1fr; }
  .fields-grid .option { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 12px 14px; padding-inline-end: 40px; }
  .fields-grid .option .field-icon { grid-row: span 3; margin: 0; width: 36px; height: 36px; }
  .fields-grid .option .opt-text { font-size: .84rem; }
  .custom-row { grid-template-columns: 1fr; }
  .sum-row { grid-template-columns: 1fr; }
  .start-nav { flex-wrap: wrap; gap: 8px; }
  .start-why { order: -1; flex-basis: 100%; text-align: start; }
  .start-nav .btn { flex: 1; }
  .start-nav #back[hidden] + .start-why + #next, .start-nav #next { flex: 1; }
}
