:root {
  --white: #FFFFFF; --palm: #0B5D3B; --sand: #D8C69E; --sand-tint: #F4EFE4; --graphite: #23272B; --grey: #5E656B;
  --line: #E6E1D6; --code: #0E2A20; --danger: #9A3B2E;
  --r-sm: 6px; --r-md: 10px;
  --f: 'Kufi', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-family: var(--f); color: var(--graphite); background: var(--white); line-height: 1.8; }
html[lang="en"] body { line-height: 1.6; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--palm); outline-offset: 3px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
section.wrap { padding-block: 88px; }
.band { background: var(--sand-tint); }

nav { display: flex; align-items: center; gap: 28px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; font-size: 24px; text-decoration: none; color: var(--palm); }
nav ul { list-style: none; display: flex; gap: 24px; padding: 0; margin-inline-start: auto; font-size: 15px; }
nav ul a { text-decoration: none; }
nav ul a:hover { color: var(--palm); }

/* Pixel wordmark */
#pixelmark { margin-block: 40px 8px; min-height: 120px; }
#pixelmark svg { width: 100%; max-width: 900px; height: auto; display: block; margin-inline: auto; }
#pixelmark rect { fill: var(--palm); animation: drop .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #pixelmark rect { animation: none; } }

.intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; padding-block: 24px 72px; align-items: end; }
h1 { font-weight: 800; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.5; }
.lead { font-size: 18px; color: var(--grey); max-width: 32em; }
.actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn { display: inline-block; font: 800 15px var(--f); padding: 12px 24px; border-radius: var(--r-sm); text-decoration: none; border: 2px solid var(--palm); color: var(--palm); background: var(--white); cursor: pointer; }
.btn-main { background: var(--palm); color: var(--white); }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .6; cursor: progress; }

h2 { font-weight: 800; font-size: 32px; line-height: 1.5; color: var(--palm); }
.sub { font-size: 17px; color: var(--grey); margin-top: 10px; max-width: 40em; }
.note { font-size: 14px; color: var(--grey); margin-top: 18px; }

/* Demo */
.demo { margin-top: 36px; }
[role="tablist"] { display: flex; gap: 4px; border-bottom: 2px solid var(--palm); max-width: 420px; }
[role="tab"] { flex: 1; font: 800 15px var(--f); padding: 10px; border: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--sand-tint); color: var(--palm); cursor: pointer; }
[role="tab"][aria-selected="true"] { background: var(--palm); color: var(--white); }
.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-top: 24px; }
.panel[hidden] { display: none; }
.input { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.input label { font-weight: 800; font-size: 15px; }
textarea, input[type="url"] { width: 100%; font: 13px/1.7 ui-monospace, Consolas, monospace; color: #E6EFE9; background: var(--code); border: 0; border-inline-start: 6px solid var(--sand); padding: 14px 16px; border-radius: var(--r-sm); }
textarea { min-height: 360px; resize: vertical; }
input[type="url"] { font-size: 15px; }
/* Demo frame: border made of small squares */
.output { padding: 12px; border-radius: var(--r-md); background: conic-gradient(var(--palm) 25%, transparent 0 50%, var(--palm) 0 75%, transparent 0) 0 0 / 12px 12px; }
.view { position: relative; background: var(--white); height: 420px; overflow: hidden; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.view img, .view iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; object-position: top; }
.output figcaption { font-size: 14px; padding: 10px 14px; border-radius: 0 0 var(--r-sm) var(--r-sm); background: var(--sand-tint); color: var(--grey); }
.output figcaption.error { color: var(--danger); }
.output figcaption a { color: var(--palm); font-weight: 800; margin-inline-start: 8px; }

/* Code samples on a dark background so they read as code */
.swap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.swap figure { background: var(--code); color: #E6EFE9; padding: 22px 26px; border-inline-start: 6px solid var(--sand); border-radius: var(--r-md); }
.swap figcaption { font-size: 14px; color: #A9C2B5; margin-bottom: 10px; }
pre { direction: ltr; text-align: left; font: 14.5px/2 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.del { color: #F0A497; }
.add { color: #8EE3B5; font-weight: 700; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 40px; }
.facts div { padding-inline: 28px; }
.facts div:first-child { padding-inline-start: 0; }
.facts div + div { border-inline-start: 1px solid var(--line); }
.facts h3 { font-weight: 800; font-size: 19px; }
.facts h3::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: var(--sand); margin-inline-end: 10px; }
.facts p { color: var(--grey); margin-top: 6px; font-size: 15.5px; }
.facts small { display: block; font-size: 12px; color: #8A9096; margin-top: 6px; }
html[dir="rtl"] .facts small { text-align: right; }

.prices { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 36px; background: var(--white); border-radius: var(--r-md); overflow: hidden; }
.prices div { padding: 26px 22px; }
.prices div + div { border-inline-start: 1px solid var(--line); }
.prices .hl { background: var(--palm); color: var(--white); }
.prices h3 { font-size: 16px; font-weight: 800; }
.prices strong { display: block; font-size: 34px; font-weight: 800; margin-block: 8px 4px; }
.prices span { font-size: 14px; opacity: .8; }

footer.wrap { padding-block: 32px 48px; text-align: center; font-size: 14px; color: var(--grey); }

@media (max-width: 900px) {
  .intro, .panel, .swap, .facts { grid-template-columns: 1fr; }
  .intro { gap: 16px; padding-bottom: 48px; }
  .prices { grid-template-columns: 1fr 1fr; }
  .prices div:nth-child(3) { border-inline-start: 0; }
  .facts div { padding: 18px 0; }
  .facts div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
  textarea { min-height: 220px; }
  .view { height: 340px; }
  nav ul li:not(:last-child) { display: none; }
  section.wrap { padding-block: 64px; }
}

/* Screenshots keep their 16:10 ratio so nothing is cropped */
#panel-take .view { height: auto; aspect-ratio: 1280 / 800; }
#panel-take .view img { object-fit: contain; }
@media (max-width: 900px) { .prices strong { font-size: 26px; white-space: nowrap; } }

/* Loading overlay: translucent layer, pixel loader, shimmering wait text */
.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(3px); animation: fade .2s ease-out both; }
@keyframes fade { from { opacity: 0; } }
.loading .px { display: grid; grid-template-columns: repeat(3, 14px); gap: 4px; margin-bottom: 6px; }
.loading .px i { width: 14px; height: 14px; border-radius: 3px; background: var(--palm); animation: pulse 1.2s ease-in-out infinite; }
.loading .px i:nth-child(3n+2) { animation-delay: .15s; }
.loading .px i:nth-child(3n+3) { animation-delay: .3s; }
.loading .px i:nth-child(n+4) { animation-delay: .45s; }
.loading .px i:nth-child(n+7) { animation-delay: .6s; }
@keyframes pulse { 0%, 100% { opacity: .15; transform: scale(.8); } 50% { opacity: 1; transform: none; } }
.loading .shimmer { font-weight: 800; font-size: 26px; line-height: 1.6;
  background: linear-gradient(90deg, var(--palm) 0 35%, var(--sand) 50%, var(--palm) 65% 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sweep 1.8s linear infinite; }
html[dir="rtl"] .loading .shimmer { animation-direction: reverse; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
.loading .small { font-size: 14px; color: var(--grey); }
@media (prefers-reduced-motion: reduce) {
  .loading, .loading .px i, .loading .shimmer { animation: none; }
  .loading .px i { opacity: .6; }
  .loading .shimmer { color: var(--palm); background: none; }
}

/* Error state on top of the previous result */
.failed { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(3px); }
.failed p { max-width: 28em; text-align: center; font-weight: 800; font-size: 17px; color: var(--danger);
  background: var(--white); border: 2px solid var(--danger); border-radius: var(--r-md); padding: 16px 20px; }

/* Card logos */
.paycards { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; font-size: 13px; color: var(--grey); }
.paycards span { margin-inline-end: 4px; }
.paycards svg { width: 46px; height: 30px; display: block; border-radius: 4px; box-shadow: 0 0 0 1px rgba(10, 20, 40, .14); }

/* Demo option */
.check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; font-size: 14px !important; color: var(--grey); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--palm); }

/* Footer */
.site-foot { background: var(--code); color: #CFE0D7; margin-top: 0; }
.site-foot a { color: #FFFFFF; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 56px 32px; }
.foot-grid h2 { font-size: 15px; color: var(--sand); margin-bottom: 10px; line-height: 1.6; }
.foot-grid ul { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.foot-grid p { font-size: 14px; margin-top: 10px; }
.foot-grid .small { font-size: 12px; color: #9DB5A8; }
.site-foot .brand { color: #FFFFFF; font-size: 26px; }
.site-foot .paycards { color: #CFE0D7; }
.ltr-block { direction: ltr; text-align: start; }
html[dir="rtl"] .ltr-block { text-align: right; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
.trademarks { font-size: 12px; color: #9DB5A8; padding-bottom: 32px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-company { grid-column: 1 / -1; } }

/* Legal pages */
.doc main.prose { max-width: 760px; padding-block: 48px 88px; }
.prose h1 { color: var(--palm); font-size: clamp(30px, 4vw, 40px); }
.prose h2 { font-size: 22px; margin-top: 36px; color: var(--graphite); }
.prose h3 { font-size: 17px; margin-top: 18px; }
.prose p, .prose li, .prose dd { font-size: 16px; color: #3A4046; margin-top: 10px; }
.prose ul { padding-inline-start: 22px; }
.prose a { color: var(--palm); font-weight: 800; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin-top: 12px; }
.prose dt { font-weight: 800; }
.prose dd { margin: 0; }
.updated { color: var(--grey); font-size: 14px !important; }
.ar-note { background: var(--sand-tint); border-radius: var(--r-sm); padding: 10px 14px; font-size: 14px !important; margin-bottom: 20px; }
