:root {
  color-scheme: light;
  --ink: #12243c;
  --ink-strong: #081a33;
  --muted: #60728a;
  --blue: #246fe5;
  --blue-soft: #eaf2fd;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --line: #d8e1ec;
  --green: #18734b;
  --green-soft: #edf8f2;
  --amber: #8a5d11;
  --amber-soft: #fff8e9;
  font-family: var(--bb-font-sans, "Avenir Next", Avenir, "Helvetica Neue", "Noto Sans Arabic", Tahoma, Arial, sans-serif);
}

* { box-sizing: border-box; }
[hidden], .payment-loading[hidden], #paymentContent[hidden], #paymentUnavailable[hidden] { display: none !important; }
html { background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); }
a { color: inherit; }
.payment-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 56px; }
.topbar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { flex: 0 0 30px; }
.brand > span { display: grid; gap: 1px; }
.brand strong { color: var(--ink-strong); font-size: 1rem; }
.brand small { color: var(--muted); font-size: .73rem; font-weight: 650; }
.back-link { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 0 14px; background: var(--surface); color: var(--ink-strong); font-size: .85rem; font-weight: 750; text-decoration: none; }
.back-link:hover { border-color: #aebed1; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.public-locale-selector { display: flex; align-items: center; gap: 7px; }
.public-locale-selector__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.public-locale-selector__select { min-height: 40px; max-width: 180px; border: 1px solid var(--line); border-radius: 9px; padding: 0 32px 0 11px; background: var(--surface); color: var(--ink-strong); font: inherit; font-size: .82rem; font-weight: 700; }
.payment-loading { display: grid; gap: 14px; min-height: 420px; align-content: center; padding: 30px 0; }
.loading-line { height: 18px; border-radius: 5px; background: #e3e9f1; animation: loading 1.2s ease-in-out infinite alternate; }
.loading-kicker { width: 180px; height: 12px; }
.loading-title { width: min(650px, 86%); height: 56px; }
.loading-copy { width: min(760px, 94%); }
@keyframes loading { to { background: #f0f3f7; } }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); gap: 44px; align-items: end; padding: 64px 0 34px; }
.hero-copy { max-width: 730px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 16px; color: var(--ink-strong); font-size: clamp(2.7rem, 6vw, 5.2rem); font-weight: 520; letter-spacing: -.055em; line-height: .98; }
.hero-copy > p:last-child { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.62; }
.amount-panel { display: grid; min-height: 196px; align-content: space-between; border: 1px solid #aac9f2; border-radius: 18px; padding: 22px; background: #dceafe; }
.amount-panel span { color: #234a78; font-size: .77rem; font-weight: 800; text-transform: uppercase; }
.amount-panel strong { color: var(--ink-strong); font-size: clamp(3rem, 7vw, 4.8rem); font-weight: 650; letter-spacing: -.06em; line-height: .95; }
.amount-panel strong.is-hidden-amount { font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.2; }
.amount-panel small { color: #234a78; font-size: .85rem; font-weight: 650; }
.project-context { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.project-mark { width: 12px; height: 12px; border: 4px solid var(--blue); border-radius: 50%; }
.project-context > span:nth-child(2) { display: grid; gap: 2px; }
.project-context small { color: var(--muted); font-size: .72rem; }
.project-context strong { color: var(--ink-strong); font-size: .95rem; }
.published-state { border: 1px solid #b6dfcb; border-radius: 999px; padding: 5px 9px; background: var(--green-soft); color: var(--green); font-size: .69rem; font-weight: 800; text-transform: uppercase; }
.source-language-notice { margin: 12px 0 0; border: 1px solid #c8d7e8; border-radius: 9px; padding: 10px 12px; background: #edf3fa; color: #385575; font-size: .78rem; line-height: 1.5; }
.terms-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.term-summary { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 20px; }
.term-summary + .term-summary { border-left: 1px solid var(--line); }
.summary-number { color: var(--blue); font-size: .72rem; font-weight: 850; }
.term-summary div { display: grid; gap: 5px; }
.term-summary small { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.term-summary strong { color: var(--ink-strong); font-size: .93rem; line-height: 1.45; }
.terms-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 310px); gap: 22px; align-items: start; margin-top: 22px; }
.terms-main { display: grid; gap: 14px; }
.terms-section { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: var(--surface); }
.terms-section > header { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 18px; }
.terms-section > header > span { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #bfd3ee; border-radius: 8px; color: var(--blue); font-size: .7rem; font-weight: 850; }
.terms-section header p { margin: 0 0 2px; color: var(--muted); font-size: .7rem; font-weight: 750; text-transform: uppercase; }
.terms-section h2 { margin: 0; color: var(--ink-strong); font-size: 1.35rem; line-height: 1.2; }
.answer-list { margin: 0; border-top: 1px solid var(--line); }
.answer-list > div { display: grid; grid-template-columns: minmax(150px, .65fr) minmax(0, 1.35fr); gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.answer-list dt { color: var(--muted); font-size: .8rem; font-weight: 700; }
.answer-list dd { margin: 0; color: var(--ink-strong); font-size: .9rem; font-weight: 650; line-height: 1.5; }
.criteria-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.criteria-list li { position: relative; padding: 12px 10px 12px 34px; border-top: 1px solid var(--line); color: var(--ink); font-size: .9rem; line-height: 1.55; }
.criteria-list li::before { position: absolute; top: 18px; left: 8px; width: 8px; height: 8px; border: 2px solid var(--green); border-radius: 50%; content: ""; }
.criteria-list.is-caution li::before { border-color: var(--amber); }
.redo-note { display: grid; gap: 4px; margin-top: 16px; border: 1px solid #ead6aa; border-radius: 10px; padding: 14px 16px; background: var(--amber-soft); }
.redo-note strong { color: #65430b; font-size: .88rem; }
.redo-note span { color: #76561c; font-size: .82rem; line-height: 1.5; }
.verification-note { margin: 14px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.support-panel { position: sticky; top: 20px; border: 1px solid #bad1ee; border-radius: 14px; padding: 22px; background: var(--blue-soft); }
.support-panel h2 { margin: 0 0 10px; color: var(--ink-strong); font-size: 1.4rem; }
.support-panel > p:not(.eyebrow) { color: #435d7c; font-size: .85rem; line-height: 1.55; }
.support-panel a { display: inline-flex; min-height: 42px; align-items: center; border-radius: 8px; padding: 0 12px; background: var(--ink-strong); color: white; font-size: .82rem; font-weight: 750; text-decoration: none; }
.support-panel small { display: block; margin-top: 16px; color: #5b7391; font-size: .7rem; }
.unavailable-panel { max-width: 760px; padding: 80px 0; }
.unavailable-panel h1 { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(2.1rem, 6vw, 4rem); }
.unavailable-panel > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.unavailable-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.unavailable-panel a,
.unavailable-panel button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--ink-strong); border-radius: 8px; padding: 0 14px; font: inherit; font-weight: 750; cursor: pointer; }
.unavailable-panel a { background: var(--ink-strong); color: white; text-decoration: none; }
.unavailable-panel button { background: var(--surface); color: var(--ink-strong); }
.unavailable-panel button:focus-visible,
.unavailable-panel a:focus-visible { outline: 3px solid rgba(36, 111, 229, 0.28); outline-offset: 3px; }
.resource-footer { display: grid; grid-template-columns: minmax(200px, .7fr) minmax(0, 1.3fr); gap: 26px; margin-top: 36px; border-top: 1px solid var(--line); padding: 24px 0 0; }
.resource-footer > div { display: grid; align-content: start; gap: 5px; }
.resource-footer > div strong { color: var(--ink-strong); }
.resource-footer > div span { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.resource-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.resource-footer nav a { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--surface); text-decoration: none; }
.resource-footer nav a:hover { border-color: #a9bad0; }
.resource-footer nav span { color: var(--ink-strong); font-size: .8rem; font-weight: 750; }
.resource-footer nav small { color: var(--muted); font-size: .7rem; }
a:focus-visible { outline: 3px solid rgba(36, 111, 229, .28); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { .loading-line { animation: none; } }
@media (max-width: 840px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 46px; }
  .amount-panel { min-height: 150px; }
  .terms-overview { grid-template-columns: 1fr; }
  .term-summary + .term-summary { border-top: 1px solid var(--line); border-left: 0; }
  .terms-layout { grid-template-columns: 1fr; }
  .support-panel { position: static; }
}
@media (max-width: 620px) {
  .payment-shell { width: min(100% - 24px, 1120px); padding-top: 14px; }
  .topbar { align-items: flex-start; }
  .topbar-actions { align-items: flex-end; flex-direction: column-reverse; }
  .public-locale-selector__select { max-width: 142px; }
  .brand small { display: none; }
  .back-link { padding: 0 10px; }
  .hero { padding-top: 36px; }
  h1 { font-size: clamp(2.45rem, 13vw, 3.7rem); }
  .amount-panel { min-height: 140px; padding: 18px; }
  .project-context { grid-template-columns: 28px minmax(0, 1fr); }
  .published-state { grid-column: 2; justify-self: start; }
  .terms-section { padding: 18px 15px; }
  .answer-list > div { grid-template-columns: 1fr; gap: 4px; }
  .resource-footer { grid-template-columns: 1fr; gap: 16px; }
  .resource-footer nav { grid-template-columns: 1fr; }
}
@media (max-width: 350px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .topbar-actions { width: 100%; align-items: stretch; flex-direction: row; }
  .public-locale-selector { min-width: 0; flex: 1 1 auto; }
  .public-locale-selector__select { width: 100%; min-width: 0; max-width: none; }
  .back-link { flex: 0 0 auto; }
}
