/* Subscribe (/subscribe), checkout (/checkout and its result /checkout/done), privacy (/privacy) and the legal pages (Features/Legal). Tokens only (base.css); motion: transform and opacity. */

/* ---------- Subscribe ---------- */
.sub { max-width: 980px; margin: 0 auto; display: grid; gap: var(--space-5); }
.sub-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); }
.sub-hero > div { flex: 1 1 0; min-width: 0; }
.sub-title { margin-bottom: .2em; font-size: var(--fs-2xl); }
.sub-lead { max-width: 52ch; margin: 0; color: var(--text-muted); }
.sub-mascot { width: 72px; height: auto; }
.sub-soon-note { margin: 0; text-align: center; color: var(--text-muted); }
@media (min-width: 37.5em) { .sub-mascot { width: 104px; } }
.sub-perks { flex-basis: 100%; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.sub-perks li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 2px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    font-family: var(--font-title);
    font-size: .95rem;
}
.sub-perks .icon { color: var(--link); }

.sub-plans { display: grid; gap: var(--space-4); padding-top: 12px; }
@media (min-width: 47.5em) {
    .sub-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; }
}
/* Under the plans: the prices are the launch prices (Plans.LaunchPricesNote). */
.sub-launch { margin: 12px 0 0; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }
.sub-plan {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 28px 18px 22px;
    text-align: center;
    transition: transform .15s var(--ease-out);
    animation: sub-in .5s var(--ease-spring) backwards;
}
.sub-plan:nth-child(2) { animation-delay: .1s; }
.sub-plan:nth-child(3) { animation-delay: .2s; }
.sub-plan:hover { transform: translateY(-4px); }
.sub-plan.is-best {
    order: -1;
    background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%), var(--surface);
}
@media (min-width: 47.5em) {
    .sub-plan.is-best { order: 0; padding-block: 40px 32px; }
}
.sub-ribbon {
    width: max-content;
    max-width: calc(100% - 24px);
    text-align: center;
    position: absolute;
    top: -16px;
    left: 50%;
    padding: 4px 18px;
    border: 2px solid var(--accent-edge);
    border-radius: var(--radius-pill);
    background: var(--amber);
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 1.05rem;
    line-height: 1.4;
    box-shadow: 0 3px 0 var(--accent-edge);
    transform: translateX(-50%) rotate(-4deg);
    animation: sub-ribbon 2.6s ease-in-out 1s infinite;
}
@keyframes sub-ribbon {
    0%, 100% { transform: translateX(-50%) rotate(-4deg); }
    50% { transform: translateX(-50%) rotate(3deg) scale(1.06); }
}
.sub-plan-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 4px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--link);
    transform: rotate(-6deg);
}
.sub-plan.is-best .sub-plan-icon { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 var(--accent-edge); }
.sub-plan-name { margin: 0; font-size: var(--fs-lg); }
.sub-price { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.sub-price strong { font-size: 3.2rem; line-height: 1.1; }
.sub-price span { color: var(--text-muted); font-weight: 500; }
.sub-plan.is-best .sub-price strong { color: var(--accent-text); }
.sub-price .sub-old { color: var(--text-muted); font-size: var(--fs-lg); font-weight: 600; text-decoration-thickness: 2px; }
.sub-yours { margin: 0; }
.sub-plan-note { margin: 0; max-width: 28ch; color: var(--text-muted); font-size: var(--fs-sm); }
@keyframes sub-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }

.sub-steps-card { max-width: 720px; width: 100%; margin: 0 auto; }
.sub-steps { list-style: none; counter-reset: step; display: grid; gap: 16px; margin: 0 0 var(--space-4); padding: 0; }
.sub-steps li {
    position: relative;
    counter-increment: step;
    min-height: 44px;
    padding-inline-start: 58px;
    padding-top: 7px;
}
.sub-steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--font-title);
    font-size: 1.25rem;
    box-shadow: 0 3px 0 var(--primary-edge);
}
.sub-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50px;
    bottom: -12px;
    inset-inline-start: 20px;
    width: 4px;
    border-radius: 2px;
    background: repeating-linear-gradient(to bottom, var(--border-strong) 0 5px, transparent 5px 10px);
}
.sub-refund {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--success-soft);
    color: var(--success);
    font-weight: 500;
}
.sub-refund .icon { flex: none; }
.sub-actions { align-items: center; }
.sub-actions-note { flex-basis: 100%; margin: 0; }

/* ---------- Privacy ---------- */
.privacy { display: grid; gap: var(--space-3); }
.privacy-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-2); }
.privacy-head h1 { margin: 0; }
.privacy-head p { margin: 0; }
.privacy-badge {
    display: grid;
    place-items: center;
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 4px 0 var(--primary-edge);
    transform: rotate(-5deg);
}
.privacy-block h2 { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); }
.privacy-block h2::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--amber);
    transform: rotate(45deg);
}
.privacy-block li::marker { color: var(--primary); }
/* A name in the other script (the app, the company) stays on one line, so its marks do not jump to the next line. */
.privacy-name { white-space: nowrap; }
/* The two languages of a policy are two articles on one page, and the tabs above them are fragment links: the Arabic
   article shows until #english is the target, then the English one shows in its place. No script. A browser with no
   :has shows the two articles, the Arabic one first. */
.privacy-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }
.privacy-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 18px;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}
.privacy-tabs a:first-child,
.privacy-tabs:has(~ .privacy-english:target) a:last-child { border-color: var(--primary-edge); background: var(--primary); color: var(--on-primary); }
.privacy-tabs:has(~ .privacy-english:target) a:first-child { border-color: var(--border); background: var(--surface); color: var(--text); }
/* With the English article the tabs go to its side (left), and a tab link stops the scroll above the tabs, not under them. */
.privacy-tabs:has(~ .privacy-english:target) { justify-content: flex-end; }
.privacy-tabs ~ .privacy { scroll-margin-top: calc(44px + var(--space-4) + var(--space-5)); }
.privacy-english { display: none; }
.privacy-english:target { display: grid; }
.privacy:has(~ .privacy-english:target) { display: none; }
.privacy-key { border-color: color-mix(in srgb, var(--primary) 70%, var(--border)); box-shadow: var(--glow), 0 4px 0 var(--primary-edge); }
.sub-active {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 16px;
    border: 2px solid var(--success-edge);
    border-radius: var(--radius);
    background: var(--success-soft);
    color: var(--text);
    font-weight: 500;
}
.sub-active .icon { flex: none; color: var(--success); }

/* ---------- Big contact lines on /contact (ContactLinks.razor); the base list is in layout.css ---------- */
.contact-links-big { display: grid; gap: 4px; font-size: var(--fs-lg); }

/* ---------- Checkout (/checkout) ---------- */
.checkout { max-width: 980px; margin: 0 auto; display: grid; gap: var(--space-4); }
.checkout-plans { display: flex; flex-wrap: wrap; gap: 8px; }
.checkout-plans .chip { min-height: 44px; padding-inline: 18px; }
.checkout-note { text-align: center; }
.checkout-grid { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 47.5em) { .checkout-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.checkout-sum dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.checkout-sum dt { color: var(--text-muted); }
.checkout-sum dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.checkout-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: var(--space-4) 0 0; padding-top: var(--space-3); border-top: 2px dashed var(--border); }
.checkout-total strong { font-family: var(--font-title); font-size: 2.4rem; line-height: 1.1; }
.checkout-total .sub-old { margin-inline-end: 6px; }
.checkout-fine { margin: 4px 0 0; font-size: var(--fs-sm); }
.checkout-fine.checkout-who { margin-top: var(--space-3); }
.checkout-pay { display: grid; gap: var(--space-3); }
.checkout-pay h2, .checkout-pay > p { margin: 0; }
.checkout-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.checkout-methods li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 2px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    font-weight: 500;
}
.checkout-methods .icon { color: var(--link); }
.checkout-form { display: grid; gap: var(--space-3); }
.checkout-agree { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
.checkout-agree input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--primary); }
.checkout-login-hint { margin: 0; text-align: center; }
.checkout-period { display: flex; gap: 8px; align-items: flex-start; margin: var(--space-3) 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.6; }
.checkout-period .icon { flex: none; margin-top: 2px; color: var(--link); }
.checkout-hold { display: flex; gap: 8px; align-items: flex-start; margin: var(--space-3) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.checkout-hold .icon { flex: none; margin-top: 3px; color: var(--accent-text); }
.checkout-secure { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.6; }
.checkout-secure .icon { flex: none; margin-top: 2px; color: var(--link); }

/* The method cards of /checkout with Paymob on: radios in a static form, so the checked one is styled with :has, no script. */
.methods { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.methods legend { margin-bottom: 8px; padding: 0; }
.method { display: flex; align-items: flex-start; gap: 12px; min-height: 64px; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.method input { flex: none; width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--primary-edge); }
.method:has(input:checked) { border-color: var(--primary-edge); background: var(--primary-soft); box-shadow: 0 3px 0 var(--primary-edge); }
.method:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.method-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--link); }
.method:has(input:checked) .method-icon { background: var(--primary); color: var(--on-primary); }
.method-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.method-name { font-family: var(--font-title); font-size: 1.1rem; line-height: 1.3; }
.method-brands { color: var(--text-muted); font-size: .85rem; line-height: 1.5; }
/* A browser without :has drops the rules with :has, so it shows only the card and hour lines. */
.checkout-secure-wallet { display: none; }
.checkout-grid:has(input[value="wallet"]:checked) .checkout-secure-wallet { display: flex; }
.checkout-grid:has(input[value="wallet"]:checked) .checkout-secure-online,
.checkout-grid:has(input[value="instapay"]:checked) .checkout-secure-online,
.checkout-grid:has(input[value="instapay"]:checked) .checkout-hold-hour { display: none; }
.sub-plan-buy { margin-top: var(--space-2); min-width: 140px; }

/* ---------- Checkout result (/checkout/done): one centred state, phone first ---------- */
.pay-done { max-width: 520px; margin: 0 auto; padding-top: var(--space-4); }
.pay-state { display: grid; justify-items: center; gap: var(--space-3); text-align: center; }
.pay-state h1 { margin: 0; font-size: 1.75rem; }
.pay-state p { margin: 0; }
.pay-badge { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; transform: rotate(-5deg); }
.pay-badge-ok { background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 0 var(--primary-edge); }
.pay-badge-bad { border: 2px solid var(--danger-edge); background: var(--danger-soft); color: var(--danger); box-shadow: 0 4px 0 var(--danger-edge); }
.pay-spinner { width: 64px; height: 64px; border: 6px solid var(--surface-3); border-top-color: var(--primary); border-radius: 50%; animation: pay-spin 1s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
.pay-card { width: 100%; padding: 12px 16px; }
.pay-facts { display: grid; grid-template-columns: auto 1fr; margin: 0; text-align: start; }
.pay-facts dt, .pay-facts dd { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.pay-facts dt:last-of-type, .pay-facts dd:last-of-type { border-bottom: 0; }
.pay-facts dt { padding-inline-end: 12px; color: var(--text-muted); }
.pay-facts dd { margin: 0; font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.pay-ref { direction: ltr; unicode-bidi: isolate; font-family: var(--font-code); font-weight: 600; }
.pay-actions { display: grid; gap: var(--space-3); width: 100%; }
.pay-actions .btn-whatsapp { --btn-bg: var(--success); --btn-fg: var(--surface); --btn-border: var(--success); --btn-edge: var(--success-edge); }
.pay-note { display: flex; gap: 8px; align-items: flex-start; text-align: start; color: var(--text); }
.pay-note .icon { flex: none; margin-top: 3px; color: var(--link); }
.pay-state .sub-refund { text-align: start; }
.pay-state > .btn-block { justify-self: stretch; }
