/* OPENBUILD app styles: tokens, shell, homepage, Live Offers, directory views.
   Palette: black, white and grey only. Accents: red live dot (#ff3b30) and yellow URGENT (#ffd60a).
   Motion: calm fades only; everything stops under prefers-reduced-motion. */

/* ---------------------------------------------------------------- tokens (dark only) */
:root {
  color-scheme: dark;
  /* Non-Latin scripts fall back to good system fonts (no extra webfonts are downloaded).
     --intl is reordered per language below so Han characters use the right regional font. */
  --intl: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans Arabic", "Geeza Pro", "Segoe UI", "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Noto Sans Bengali", "Kohinoor Bangla", "Noto Sans Gurmukhi", "Mukta Mahee", "Noto Sans", system-ui;
  --x-display: "Bricolage Grotesque", "Geist", var(--intl), sans-serif;
  --x-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, var(--intl), sans-serif;
  --text-primary: #ffffff;
  --text-secondary: rgb(255 255 255 / 0.68);
  --text-tertiary: rgb(255 255 255 / 0.3);
  --text-primary-on: #0b0b0b;
  --text-secondary-on: #5c5c60;
  --fill-primary: #ffffff;
  --fill-primary-on: #0b0b0b;
  --fill-secondary: rgb(255 255 255 / 0.5);
  --fill-tertiary: #1d1d1f;
  --fill-segment: #e2e2e4;
  --fill-system-green: #ffffff;
  --fill-system-orange: #ffd60a;
  --fill-system-red: #ff3b30;
  --stroke-primary: rgb(255 255 255 / 0.16);
  --stroke-secondary: rgb(255 255 255 / 0.09);
  --stroke-primary-on: rgb(11 11 11 / 0.1);
  --stroke-composer: rgb(255 255 255 / 0.22);
  --stroke-system-orange: rgb(255 214 10 / 0.15);
  --hover-wash: rgb(255 255 255 / 0.05);
  --hover-wash-primary-on: rgb(11 11 11 / 0.08);
  --hero-surface: #111111;
  --hero-text: #ffffff;
  --hero-text-muted: rgb(255 255 255 / 0.78);
  --hero-scrim-strong: rgb(17 17 17 / 0.78);
  --hero-scrim-soft: rgb(17 17 17 / 0.3);
  --hero-scrim-side: rgb(17 17 17 / 0.45);
  --hero-glass: rgb(17 17 17 / 0.42);
  --hero-glass-faint: rgb(17 17 17 / 0.35);
  --hero-glass-stroke: rgb(255 255 255 / 0.28);
  --mat-regular: rgb(29 29 31 / 0.55);
  --mat-thin: rgb(29 29 31 / 0.4);
  --mat-agent: rgb(29 29 31 / 0.72);
  --ob-shadow: 0 8px 40px rgb(0 0 0 / 0.35);
  --x-surface: #111111;
  --x-panel: #1d1d1f;
  --x-chip-bg: #ffffff;
  --x-chip-fg: #000000;
  --x-glow: 0 0 4px rgba(255, 255, 255, 0.55), 0 0 10px rgba(255, 255, 255, 0.2);
  --x-live: #ff3b30;
  --x-urgent: #ffd60a;
  --x-free: #34c759; /* the owner-approved green (same as .x-tick): FREE tag on the free template */
  --x-free-fg: #000000; /* black on that green: 9.5:1 contrast (AA) */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}
html { background: #0b0b0b; }
[hidden] { display: none !important; }
body { background: #0b0b0b; color: var(--text-primary); min-width: 320px; }

/* ---------------------------------------------------------------- shell */
.page {
  padding-left: max(var(--gutter), var(--safe-l));
  padding-right: max(var(--gutter), var(--safe-r));
  padding-top: calc(var(--safe-t) + 8px);
  padding-bottom: calc(var(--safe-b) + 32px);
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: auto 1fr auto;
}
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r-s); background: #fff; color: #0b0b0b; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(var(--safe-t) + 8px); }
.x-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; min-width: 0; }
.x-brand__home { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); min-height: var(--tap); }
.x-brand__home img, .x-brand__home picture { height: 32px; width: auto; }
.x-brand__word { font-family: var(--x-display); font-weight: 800; letter-spacing: -0.03em; font-size: 20px; }
.x-brand__tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
#view { min-width: 0; outline: none; }
#view > .v { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
#view > .v.v-in { animation: v-fade 200ms var(--ease-out) both; }
@keyframes v-fade { from { opacity: 0; } to { opacity: 1; } }
/* Before the client router runs, the server-rendered homepage shows only on "/". */
html:not([data-route="/"]) #view > .v-home:not(.is-mounted) { display: none; }

/* Install app (Android/desktop) and the iOS Add to Home Screen hint */
.x-net { position: fixed; left: 50%; top: calc(var(--safe-t) + 10px); z-index: 70; transform: translateX(-50%); padding: 6px 12px; border-radius: var(--r-pill); background: #1d1d1f; border: 1px solid var(--stroke-primary); color: var(--text-secondary); font: var(--type-tag); animation: v-fade 300ms ease both; }
.x-net[hidden] { display: none; }

/* Shared footer */
.foot { padding-top: 24px; }
.x-foot-brand { display: grid; gap: 6px; }
.x-foot-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.x-foot-legal a { color: inherit; opacity: .75; text-decoration: none; }
.x-foot-legal a:hover, .x-foot-legal a:focus-visible { opacity: 1; text-decoration: underline; }
.x-foot-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); text-decoration: none; }
.x-foot-mark img { height: 28px; width: auto; }

/* ---------------------------------------------------------------- shared atoms (from the OPENBUILD homepage) */
.x-display { font-family: var(--x-display); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
h2.x-h2, h1.x-h2 { font-family: var(--x-display); font-weight: 800; letter-spacing: -0.045em; line-height: 1; font-size: clamp(34px, 5vw, 56px); }
.x-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); background: #1d1d1f; border: 1px solid rgb(255 255 255 / 0.7); color: #fff; font: var(--weight-bold) var(--size-caption)/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.x-label { display: inline-block; padding: 4px 8px; border-radius: 6px; background: var(--x-chip-bg); color: var(--x-chip-fg); font: 800 12px/1.1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; box-shadow: var(--x-glow); white-space: nowrap; }
.x-status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--stroke-primary); background: var(--fill-tertiary); font: var(--type-tag); color: var(--text-secondary); }
.x-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }
.x-status--live { color: var(--text-primary); border-color: var(--text-secondary); }
.x-status--live::before { background: var(--x-live); box-shadow: none; animation: x-pulse 2.4s ease-in-out infinite; }
.x-livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--x-live); animation: x-pulse 2.4s ease-in-out infinite; }
.x-urgent-pill { display: inline-block; padding: 4px 8px; border-radius: 6px; background: var(--x-urgent); color: #000; font: 800 12px/1.1 var(--sans); letter-spacing: 0.06em; }
@keyframes x-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.x-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.x-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 18px; border-radius: var(--r-s); font: var(--weight-bold) var(--size-body)/1.1 var(--sans); text-decoration: none; border: 1px solid transparent; max-width: 100%; cursor: pointer; transition: transform var(--dur-quick) var(--ease-out), background-color var(--dur-quick) ease, border-color var(--dur-quick) ease; }
.x-btn--primary { background: #fff; color: #0b0b0b; }
.x-btn--ghost { background: #1d1d1f; color: #fff; border-color: rgb(255 255 255 / 0.4); }
.x-btn--ghost:hover { border-color: #fff; }
.x-btn--ink { background: var(--fill-primary); color: var(--text-primary-on); }
.x-btn--sm { min-height: 36px; padding: 8px 14px; font-size: var(--size-small); }
.x-btn--off { background: transparent; color: var(--text-secondary); border: 1px dashed var(--stroke-primary); cursor: default; }
a.x-btn:hover { transform: translateY(-2px); }
a.x-btn[target="_blank"]::after { content: "\2197"; font-size: 0.85em; opacity: 0.6; }
@media (max-width: 599px) { .x-btn--sm { min-height: var(--tap); } }

/* ---------------------------------------------------------------- homepage */
.x-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); background: #111; color: #fff; border: 1px solid rgb(255 255 255 / 0.16); padding: clamp(22px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 44px); }
.x-hero__pic { position: absolute; inset: 0; z-index: -2; }
.x-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; transition: opacity 600ms ease; }

.x-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #111 0%, #111 30%, rgb(17 17 17 / 0.82) 52%, rgb(17 17 17 / 0.25) 100%); }
@media (max-width: 760px) { .x-hero::before { background: linear-gradient(180deg, rgb(17 17 17 / 0.55) 0%, rgb(17 17 17 / 0.88) 45%, #111 100%); } }
.x-hero__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; justify-items: start; max-width: 640px; min-width: 0; }
.x-hero__mark { height: clamp(52px, 7vw, 76px); width: auto; }
.x-hero h1 { font-size: clamp(56px, 8vw, 104px); }
@media (max-width: 400px) { .x-hero h1 { font-size: 14vw; } }
.x-hero h1, .x-dir-head h1 { max-width: 100%; }
.x-hero__sub { font-size: var(--size-lede); line-height: 1.4; color: rgb(255 255 255 / 0.78); max-width: 52ch; }
.x-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
@media (max-width: 380px) { .x-tiles { grid-template-columns: minmax(0, 1fr); } }
.x-tile { position: relative; display: grid; align-content: start; gap: 6px; padding: 16px; border-radius: var(--r-m); background: rgb(17 17 17 / 0.62); border: 1px solid rgb(255 255 255 / 0.16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; text-decoration: none; transition: transform var(--dur-quick) var(--ease-out), border-color var(--dur-quick) ease, background-color var(--dur-quick) ease; }
.x-tile:hover { transform: translateY(-3px); border-color: rgb(255 255 255 / 0.5); background: rgb(29 29 31 / 0.78); }
.x-tile svg { width: 40px; height: 40px; margin-bottom: 6px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.x-tile__name { font: var(--weight-bold) var(--size-body)/1.2 var(--sans); }
.x-tile__tag { font-size: var(--size-meta); line-height: 1.3; color: rgb(255 255 255 / 0.68); }
.x-tile__live { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: #fff; color: #000; font: 800 12px/1.1 var(--sans); letter-spacing: 0.06em; }
.x-hero :focus-visible { outline-color: #fff; }
@keyframes x-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.x-svcs { display: grid; gap: clamp(40px, 6vw, 72px); }
.x-svc { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 24px clamp(24px, 4vw, 56px); align-items: start; padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--stroke-secondary); scroll-margin-top: 24px; }
.x-svc__about { display: grid; gap: 12px; justify-items: start; }
.x-svc__num { font: 400 var(--size-small)/1 var(--x-mono); color: var(--text-secondary); }
.x-svc h3 { font-family: var(--x-display); font-weight: 800; letter-spacing: -0.04em; font-size: clamp(28px, 3.4vw, 40px); line-height: 1; }
.x-svc__tag { font-size: var(--size-prose); color: var(--text-secondary); max-width: 40ch; }
@media (max-width: 860px) { .x-svc { grid-template-columns: minmax(0, 1fr); } }

.x-card { position: relative; border-radius: var(--r-l); background: var(--x-surface); border: 1px solid var(--stroke-primary); padding: clamp(18px, 3vw, 28px); display: grid; gap: 18px; min-width: 0; transition: transform var(--dur-quick) var(--ease-out), border-color var(--dur-quick) ease; }
.x-card:hover { transform: translateY(-2px); border-color: var(--text-secondary); }
.x-card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font: 400 var(--size-caption)/1.2 var(--x-mono); color: var(--text-secondary); }
.x-fields { margin: 0; display: grid; gap: 14px; }
.x-fields > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; align-items: center; }
.x-fields dt { margin: 0; }
.x-fields dd { margin: 0; font-size: var(--size-body); color: var(--text-primary); min-width: 0; overflow-wrap: anywhere; }
.x-fields .x-ph { color: var(--text-secondary); }
@media (max-width: 520px) { .x-fields > div { grid-template-columns: minmax(0, 1fr); } }
.x-mono { font-family: var(--x-mono); font-size: var(--size-small); }

.x-receipt { background: var(--x-panel); overflow: hidden; }
.x-receipt__hole { position: absolute; top: 20px; right: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--fill-primary-on); border: 1px solid var(--stroke-primary); }
.x-perf { position: relative; height: 0; border-top: 2px dashed var(--stroke-primary); margin-inline: calc(-1 * clamp(18px, 3vw, 28px)); }
.x-perf::before, .x-perf::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--fill-primary-on); }
.x-perf::before { left: -11px; } .x-perf::after { right: -11px; }
.x-receipt s { color: var(--text-secondary); }
.x-receipt .x-card__top { padding-right: 30px; }
.x-receipt__now { font-family: var(--x-display); font-weight: 800; letter-spacing: -0.03em; font-size: 22px; }

.x-tree { padding-left: calc(clamp(18px, 3vw, 28px) + 34px); }
.x-tree__rail { position: absolute; left: clamp(18px, 3vw, 28px); top: 28px; bottom: 28px; width: 26px; height: calc(100% - 56px); fill: none; stroke: var(--text-secondary); stroke-width: 1.5; stroke-linecap: round; }
.x-tree .x-fields > div { position: relative; }
.x-tree .x-fields > div::before { content: ""; position: absolute; left: -26px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; background: var(--fill-primary-on); border: 1.5px solid var(--text-primary); }
@media (max-width: 520px) { .x-tree .x-fields > div::before { top: 10px; margin-top: 0; } }

.x-term { background: #0b0b0b; border-color: rgb(255 255 255 / 0.16); color: #fff; padding: 0; gap: 0; overflow: hidden; }
.x-term__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgb(255 255 255 / 0.12); background: #111; font: 400 var(--size-caption)/1 var(--x-mono); color: rgb(255 255 255 / 0.6); }
.x-term__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 0.22); }
.x-term__bar span { margin-left: 8px; }
.x-term__body { padding: clamp(18px, 3vw, 28px); display: grid; gap: 18px; min-width: 0; }
.x-term__prompt { font: 400 var(--size-small)/1.9 var(--x-mono); color: rgb(255 255 255 / 0.85); overflow-wrap: anywhere; white-space: pre-wrap; }
.x-term__prompt .x-ps { color: rgb(255 255 255 / 0.5); }
.x-var { display: inline-block; padding: 0 6px; border-radius: 5px; background: #fff; color: #000; line-height: 1.5; box-shadow: 0 0 4px rgba(255, 255, 255, 0.55), 0 0 10px rgba(255, 255, 255, 0.2); }
.x-cursor { display: inline-block; width: 0.6em; height: 1.1em; vertical-align: -0.2em; background: #fff; margin-left: 2px; }

.x-box { margin-top: 18px; background: var(--x-panel); }
.x-box__handle { position: absolute; top: -18px; left: 50%; width: 96px; height: 18px; margin-left: -48px; border: 1.5px solid var(--stroke-primary); border-bottom: 0; border-radius: 12px 12px 0 0; }
.x-box__latches { display: flex; justify-content: space-between; }
.x-box__latches i { width: 28px; height: 8px; border-radius: 3px; border: 1.5px solid var(--stroke-primary); }
.x-cmd { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-s); background: #0b0b0b; color: #fff; border: 1px solid rgb(255 255 255 / 0.16); font: 400 var(--size-small)/1.4 var(--x-mono); overflow-x: auto; white-space: nowrap; }
.x-cmd b { font-weight: 400; color: rgb(255 255 255 / 0.5); }

.x-diagram { width: 100%; height: auto; max-height: 150px; fill: none; stroke: var(--text-primary); stroke-width: 1.5; stroke-linecap: round; }
.x-diagram .x-cable { stroke: var(--text-secondary); stroke-dasharray: 4 5; }
.x-diagram text { fill: var(--text-secondary); stroke: none; font: 400 12px var(--x-mono); }
.x-diagram .x-node-main { fill: var(--fill-primary); stroke: none; }
.x-diagram .x-node-main-t { fill: var(--text-primary-on); font-weight: 400; }
.x-snippet { margin: 0; padding: 10px 12px; border-radius: var(--r-s); background: #0b0b0b; color: rgb(255 255 255 / 0.85); border: 1px solid rgb(255 255 255 / 0.16); font: 400 var(--size-caption)/1.5 var(--x-mono); white-space: pre-wrap; overflow-wrap: anywhere; }

.x-demo { background: var(--x-panel); }
.x-demo__flags { display: flex; align-items: center; gap: 10px; }
.x-demo__title { font-family: var(--x-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.1; }
.x-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.x-cats li { padding: 6px 10px; border-radius: var(--r-pill); border: 1px solid var(--stroke-primary); background: var(--fill-tertiary); font: var(--type-tag); }

.x-cta { position: relative; overflow: hidden; border-radius: var(--r-xl); background: #111; color: #fff; border: 1px solid rgb(255 255 255 / 0.16); padding: clamp(32px, 6vw, 64px); display: grid; gap: 20px; justify-items: start; }
.x-cta h2 { font-size: clamp(36px, 6vw, 72px); }
.x-cta p { color: rgb(255 255 255 / 0.7); }

/* ---------------------------------------------------------------- Live Offers view */
.x-offer { display: flex; flex-direction: column; position: relative; }
.x-offer dl { margin: 0 0 18px; }
.x-offer dt {
  display: inline-block; width: fit-content; margin: 0 0 8px; padding: 3px 8px 2px; border-radius: 6px;
  font: 800 12px/1.3 var(--sans); color: #0b0b0b; background: #fff; text-transform: uppercase; letter-spacing: 0.08em;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.55), 0 0 10px rgba(255, 255, 255, 0.2);
}
.x-offer dd { margin: 2px 0 12px; font: var(--type-body); color: var(--text-primary); overflow-wrap: break-word; }
.x-offer dd:first-of-type { font-weight: 700; font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; }
.x-offer dd:last-of-type { margin-bottom: 0; }
.x-offer__go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: auto 0 0; }

section.hero.x-banner {
  --hero-text: #fff; --hero-text-muted: rgb(255 255 255 / 0.78);
  --hero-glass: rgb(255 255 255 / 0.08); --hero-glass-faint: rgb(255 255 255 / 0.06); --hero-glass-stroke: rgb(255 255 255 / 0.24);
  min-height: clamp(380px, 40vw, 520px);
  background: #111;
  border: 1px solid rgb(255 255 255 / 0.16);
}
/* The banner is its own layer that fades in once the image has loaded; it never blocks first paint. */
.x-banner__bg {
  position: absolute; inset: 0; z-index: -2; opacity: 0; transition: opacity 600ms ease;
  background: #111 url("../img/banner-1584.jpg") right center / cover no-repeat;
  background-image: image-set(url("../img/banner-1584.webp") type("image/webp"), url("../img/banner-1584.jpg") type("image/jpeg"));
}
.x-banner__bg.is-loaded { opacity: 1; }
section.hero.x-banner::after {
  background: linear-gradient(to right, #111 0%, rgb(17 17 17 / 0.88) 30%, rgb(17 17 17 / 0.35) 62%, rgb(17 17 17 / 0) 85%),
    linear-gradient(to top, rgb(17 17 17 / 0.7) 0%, rgb(17 17 17 / 0) 45%);
}
.x-banner__title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.x-banner__title .hero__eyebrow {
  letter-spacing: 0.08em; background: #0d0d0e; color: #fff; border-color: rgb(255 255 255 / 0.4);
  text-shadow: 0 0 4px #fff, 0 0 10px rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.22), 0 0 22px rgba(255, 255, 255, 0.1);
}
section.hero.x-banner h1 {
  position: relative; margin: 0; padding-bottom: 14px;
  font-family: var(--x-display); font-weight: 800;
  font-size: clamp(56px, 8vw, 104px); line-height: 0.95; letter-spacing: -0.045em; color: #fff;
  max-width: 100%; overflow-wrap: break-word;
}
section.hero.x-banner .hero__copy { min-width: 0; }
section.hero.x-banner h1::after {
  content: ""; position: absolute; left: 2px; right: 8%; bottom: 0; height: 12px; opacity: 0.55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 40 3, 80 10, 120 6 S 200 2, 240 7 S 285 9, 298 4' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
@media (max-width: 760px) {
  section.hero.x-banner { min-height: 0; }
  .x-banner__bg { background-image: url("../img/banner-800.jpg"); background-image: image-set(url("../img/banner-800.webp") type("image/webp"), url("../img/banner-800.jpg") type("image/jpeg")); background-position: right top; background-size: auto 280px; }
  section.hero.x-banner::after { background: linear-gradient(to bottom, rgb(17 17 17 / 0.1) 0, rgb(17 17 17 / 0.55) 150px, #111 280px); }
  section.hero.x-banner .hero__copy { padding-top: 150px; }
}
@media (max-width: 480px) {
  section.hero.x-banner h1 { font-size: clamp(38px, 12vw, 56px); }
  .x-banner__bg { background-size: auto 240px; }
  section.hero.x-banner::after { background: linear-gradient(to bottom, rgb(17 17 17 / 0.1) 0, rgb(17 17 17 / 0.55) 130px, #111 240px); }
  section.hero.x-banner .hero__copy { padding-top: 130px; }
}
.x-hero-side {
  flex: none; align-self: flex-start; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-end;
  width: min(320px, calc(100% - 32px));
  margin: clamp(16px, 2.4vw, 24px) clamp(16px, 2.4vw, 24px) clamp(16px, 2.4vw, 24px) auto;
}
.x-hero-side > .callout { width: 100%; max-width: none; box-sizing: border-box; }
.callout__head img { height: 14px; width: auto; }
.x-callout__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-width: 0; }
section.hero.x-banner .x-callout__foot .hero__meta { display: flex; align-items: baseline; gap: 0 6px; flex: none; margin: 0 0 0 auto; max-width: 100%; text-align: right; color: #fff; }
.x-count__n { font: 800 40px/0.9 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: #fff; }
.x-count__l { font: 600 var(--size-body)/1 var(--sans); color: #fff; }
@media (max-width: 760px) { .x-hero-side { align-self: stretch; align-items: stretch; width: auto; margin: 0 12px 12px; } }

/* Live dot on the title: red glow with a slow, calm breathing fade. */
.x-live {
  position: relative; display: inline-block; width: 0.48em; height: 0.48em; margin-left: 0.04em;
  vertical-align: top; top: -0.04em; border-radius: 50%; line-height: 0; white-space: nowrap;
  background: #ff1a1a radial-gradient(circle at 35% 35%, #ff8a8a 0, #ff2b2b 35%, #ff0000 100%);
  box-shadow: 0 0 10px #ff2020, 0 0 24px rgba(255, 30, 30, 0.8), 0 0 48px rgba(255, 30, 30, 0.45);
  animation: x-breathe 2.8s ease-in-out infinite;
}
@keyframes x-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* URGENT tag: yellow, static glow (no flashing). */
.x-offer.is-urgent { padding-top: 50px; }
.x-urgent {
  position: absolute; top: 14px; right: 14px; padding: 2px 8px; border: 1px solid rgba(255, 214, 10, 0.7); border-radius: 6px;
  font: 800 12px/1.4 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: #ffd60a; background: #0b0b0b;
  text-shadow: 0 0 4px #ffd60a, 0 0 10px rgba(255, 214, 10, 0.6);
  box-shadow: 0 0 8px rgba(255, 214, 10, 0.45), inset 0 0 6px rgba(255, 214, 10, 0.25);
}

/* Filters (Live Offers and directories) */
.x-filter {
  position: sticky; top: 0; z-index: 20; display: grid; gap: 10px;
  margin-inline: calc(var(--gutter) * -1); padding: 12px var(--gutter);
  background: var(--fill-primary-on); border-bottom: 1px solid var(--stroke-secondary);
}
.x-filter__search { position: relative; max-width: 480px; }
.x-filter__search input {
  width: 100%; box-sizing: border-box; min-height: var(--tap); margin: 0; padding: 0 44px 0 14px;
  border: 1px solid var(--stroke-primary); border-radius: var(--r-s); background: var(--fill-primary-on);
  color: var(--text-primary); font: var(--type-body); font-size: 16px; -webkit-appearance: none; appearance: none;
  transition: border-color var(--dur-quick) ease;
}
.x-filter__search input::placeholder { color: var(--text-secondary); opacity: 1; }
.x-filter__search input:focus { border-color: var(--text-secondary); outline: none; }
.x-filter__search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.x-filter__clear {
  position: absolute; top: 0; right: 0; width: var(--tap); height: var(--tap); padding: 0; border: 0;
  border-radius: var(--r-s); background: none; color: var(--text-secondary); font: var(--weight-regular) var(--size-heading)/1 var(--sans);
  cursor: pointer; transition: color var(--dur-quick) ease;
}
.x-filter__clear:hover { color: var(--text-primary); }
.x-filter__clear[hidden] { display: none; }
.x-filter__chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; overflow: visible; }
.x-fchip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 100%; min-height: 32px; margin: 0; padding: 4px 12px;
  border: 1px solid transparent; border-radius: var(--r-pill); background: var(--fill-tertiary); color: var(--text-secondary);
  font: var(--type-tag); white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-quick) ease, color var(--dur-quick) ease, border-color var(--dur-quick) ease;
}
.x-fchip:hover { color: var(--text-primary); }
.x-fchip__n { font-weight: var(--weight-regular); font-variant-numeric: tabular-nums; }
.x-fchip--urgent { border-color: var(--stroke-primary); background: var(--fill-primary-on); }
.x-fchip--urgent::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--x-urgent); }
.x-fchip[aria-pressed="true"] { border-color: transparent; background: var(--fill-primary); color: var(--text-primary-on); }
.x-filter__sep { flex: none; width: 1px; margin: 6px 2px; background: var(--stroke-primary); }
.x-fchip__short { display: none; }
@media (pointer: coarse), (max-width: 599px) { .x-fchip { min-height: var(--tap); } }
@media (max-width: 760px) {
  .x-filter__chips { gap: 6px; }
  .x-fchip { gap: 4px; padding: 4px 10px; font: var(--type-caption); font-weight: var(--weight-medium); }
  .x-fchip--urgent::before { width: 6px; height: 6px; }
  .x-filter__sep { margin: 8px 1px; }
  .x-fchip__full:has(+ .x-fchip__short) { display: none; }
  .x-fchip__short { display: inline; }
}
@media (max-width: 760px), (max-height: 640px) { .x-filter { position: relative; } }
.x-offer, .x-offer a { scroll-margin-top: calc(var(--x-bar-h, 0px) + 12px); }
.x-filter__status { overflow-wrap: anywhere; }
.cards > .x-offer.x-off { display: none; }
.x-offer.x-in { animation: v-fade 220ms var(--ease-out); }
.x-note { font-size: var(--size-small); color: var(--text-secondary); }

/* Loading placeholders: calm grey blocks, no shimmer. */
.x-skel { min-height: 260px; border-radius: var(--r-m); background: var(--fill-tertiary); opacity: 0.6; }

/* ---------------------------------------------------------------- directory views (coming soon) */
.x-dir-head { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 24px clamp(24px, 4vw, 56px); align-items: start; padding: clamp(22px, 4vw, 48px); border-radius: var(--r-xl); background: #111; border: 1px solid rgb(255 255 255 / 0.16); }
.x-dir-head h1 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1; overflow-wrap: break-word; hyphens: manual; }
@media (max-width: 860px) { .x-dir-head h1 { font-size: clamp(38px, 10vw, 64px); } }
.x-dir-head .x-svc__about { gap: 16px; }
.x-dir-head .x-card:hover { transform: none; }
@media (max-width: 860px) { .x-dir-head { grid-template-columns: minmax(0, 1fr); } }
.x-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.x-dir-grid .x-fields > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.x-empty { display: grid; gap: 14px; justify-items: start; max-width: 62ch; padding: clamp(22px, 4vw, 32px); border: 1.5px dashed var(--stroke-primary); border-radius: var(--r-l); }
.x-empty h3 { font-family: var(--x-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(24px, 3vw, 32px); line-height: 1.05; }
.x-empty p { color: var(--text-secondary); }
.x-more { display: flex; justify-content: center; align-items: center; margin: clamp(28px, 4vw, 44px) auto 8px; min-inline-size: min(440px, 100%); min-block-size: 68px; padding-inline: 48px; font-size: 20px; font-weight: 600; border-radius: 999px; }
.x-more[hidden] { display: none; }
.x-copy { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  a.x-btn:hover, .x-tile:hover, .x-card:hover { transform: none; }
  .js .x-hero__img:not(.is-loaded), .x-banner__bg { opacity: 1; }
}

/* Hero headline: "BUILD THE" solid, "FUTURE" outlined (Montserrat Black) */
.x-future { font-family: "Montserrat", var(--x-display); font-weight: 900; letter-spacing: -0.01em; line-height: 0.98; text-transform: uppercase; display: flex; flex-direction: column; align-items: flex-start; }
.x-future__solid { color: #fff; }
.x-future__outline { color: #fff; -webkit-text-fill-color: transparent; -webkit-text-stroke: 2px #fff; padding-left: 0.95em; }
@supports not (-webkit-text-stroke: 1px #fff) { .x-future__outline { -webkit-text-fill-color: #fff; } }
@media (max-width: 480px) { .x-future__outline { -webkit-text-stroke-width: 1.5px; padding-left: 0.6em; } }
.x-hero h1.x-future { font-size: clamp(48px, 7.4vw, 104px); }
@media (max-width: 400px) { .x-hero h1.x-future { font-size: 12.5vw; } }
/* Homepage hero: headline pulled up so "BUILD THE" sits just under the box's top edge */
.x-hero:has(#hero-title) { padding-top: clamp(8px, 1.2vw, 14px); }
.x-hero h1.x-future { margin-top: -0.1em; }
/* Homepage hero: service tiles sit right under the two CTA buttons */
.x-hero:has(#hero-title) { row-gap: 10px; }

/* Hero film: looping, muted, feathered into the chalk background (top right on desktop, under the buttons on smaller screens) */
.x-reel { margin: 0; position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #111 url("/img/hero-poster.webp") center / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 58%, rgb(0 0 0 / 0.55) 80%, transparent 100%);
          mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 58%, rgb(0 0 0 / 0.55) 80%, transparent 100%);
  }
.x-reel__video { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.04); pointer-events: none; }
.x-reel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgb(17 17 17 / 0.35) 100%); }
@media (min-width: 1024px) {
  .x-hero:has(#hero-title) { position: relative; }
  .x-hero:has(#hero-title) .x-reel { position: absolute; z-index: 0; top: clamp(8px, 1.2vw, 14px); right: 24px; width: min(34%, 480px); }
  .x-hero:has(#hero-title) .x-hero__copy { max-width: 60%; }
  .x-future > span { white-space: nowrap; }
  .x-hero:has(#hero-title) .x-hero__copy, .x-hero:has(#hero-title) .x-tiles { position: relative; z-index: 1; }
}
@media (max-width: 1023.98px) { .x-reel { max-width: 640px; } }
@media (prefers-reduced-motion: reduce) { .x-reel { animation: none; } }

/* Speed: paint the hero at once, let the browser skip off-screen sections until they scroll near */
#view > .v-home > .section { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* Brand glow: logo mark and OPENBUILD wordmark pulse slowly with a soft white glow (header only) */
@keyframes x-brand-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgb(255 255 255 / 0)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 6px rgb(255 255 255 / 0.55)) drop-shadow(0 0 14px rgb(255 255 255 / 0.25)); transform: scale(1.04); }
}
@keyframes x-word-glow {
  0%, 100% { text-shadow: 0 0 0 rgb(255 255 255 / 0); }
  50% { text-shadow: 0 0 8px rgb(255 255 255 / 0.6), 0 0 18px rgb(255 255 255 / 0.25); }
}
.x-brand .x-brand__home picture { animation: x-brand-glow 2.8s ease-in-out infinite; transform-origin: center; will-change: filter, transform; }
.x-brand .x-brand__word { animation: x-word-glow 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .x-brand .x-brand__home picture { animation: none; filter: drop-shadow(0 0 5px rgb(255 255 255 / 0.4)); }
  .x-brand .x-brand__word { animation: none; text-shadow: 0 0 6px rgb(255 255 255 / 0.4); }
}


/* ================================================================ languages (17), RTL, header controls */
:root:lang(ja) { --intl: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "PingFang SC", "Noto Sans SC", system-ui; }
:root:lang(ko) { --intl: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans SC", system-ui; }
:root:lang(zh) { --intl: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui; }
:root:lang(ar) { --intl: "Noto Sans Arabic", "Geeza Pro", "Segoe UI", "Tahoma", system-ui; }
:root:lang(hi) { --intl: "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", system-ui; }
:root:lang(bn) { --intl: "Noto Sans Bengali", "Kohinoor Bangla", "Nirmala UI", "Vrinda", system-ui; }
:root:lang(pa) { --intl: "Noto Sans Gurmukhi", "Mukta Mahee", "Nirmala UI", "Raavi", system-ui; }
.x-future { font-family: "Montserrat", var(--x-display); }
/* Joined and syllabic scripts break with negative letter-spacing; CJK and these scripts have no case. */
:root:is(:lang(ar), :lang(hi), :lang(bn), :lang(pa)) *, :root:is(:lang(ar), :lang(hi), :lang(bn), :lang(pa)) *::before { letter-spacing: 0 !important; }
:root:is(:lang(ar), :lang(hi), :lang(bn), :lang(pa), :lang(zh), :lang(ja), :lang(ko)) .x-future { line-height: 1.18; }
:root:is(:lang(ar), :lang(hi), :lang(bn), :lang(pa)) :is(.x-display, h2.x-h2, .x-svc h3) { line-height: 1.25; }

/* Another language's dictionary is loading: hide translatable text briefly (max 2.5 s, see the boot script). */
.i18n-wait #view, .i18n-wait .x-brand__tools, .i18n-wait .foot { visibility: hidden; }

/* Long translated hero titles scale down to fit (--hero-fit is set by i18n.js from the line length). */
.x-hero__copy { container-type: inline-size; }
.x-hero h1.x-future { font-size: min(clamp(48px, 7.4vw, 104px), var(--hero-fit, 999px)); }
@media (max-width: 400px) { .x-hero h1.x-future { font-size: min(12.5vw, var(--hero-fit, 999px)); } }
.x-future > span { max-width: 100%; }

/* ---- language switcher */
.x-lang { position: relative; flex: none; }
.x-lang__btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 10px 6px 8px;
  border-radius: var(--r-pill); border: 1px solid var(--stroke-primary); background: var(--fill-tertiary); color: var(--text-primary);
  font: 600 var(--size-small)/1 var(--x-mono); letter-spacing: 0.02em; cursor: pointer;
  transition: border-color var(--dur-quick) ease, background-color var(--dur-quick) ease;
}
.x-lang__btn:hover, .x-lang.is-open .x-lang__btn { border-color: rgb(255 255 255 / 0.5); }
.x-lang.is-busy .x-lang__btn { opacity: 0.6; }
.x-lang__flag { flex: none; width: 20px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18); background: #2a2a2d url("/img/flags/gb.svg") center / cover no-repeat; }
[data-lang="es"] .x-lang__flag { background-image: url("/img/flags/es.svg"); }
[data-lang="fr"] .x-lang__flag { background-image: url("/img/flags/fr.svg"); }
[data-lang="zh"] .x-lang__flag { background-image: url("/img/flags/cn.svg"); }
[data-lang="ko"] .x-lang__flag { background-image: url("/img/flags/kr.svg"); }
[data-lang="ja"] .x-lang__flag { background-image: url("/img/flags/jp.svg"); }
[data-lang="ar"] .x-lang__flag { background-image: url("/img/flags/sa.svg"); }
[data-lang="hi"] .x-lang__flag, [data-lang="pa"] .x-lang__flag { background-image: url("/img/flags/in.svg"); }
[data-lang="bn"] .x-lang__flag { background-image: url("/img/flags/bd.svg"); }
[data-lang="ru"] .x-lang__flag { background-image: url("/img/flags/ru.svg"); }
[data-lang="id"] .x-lang__flag { background-image: url("/img/flags/id.svg"); }
[data-lang="vi"] .x-lang__flag { background-image: url("/img/flags/vn.svg"); }
[data-lang="tr"] .x-lang__flag { background-image: url("/img/flags/tr.svg"); }
[data-lang="nl"] .x-lang__flag { background-image: url("/img/flags/nl.svg"); }
[data-lang="pt"] .x-lang__flag { background-image: url("/img/flags/pt.svg"); }
[data-lang="it"] .x-lang__flag { background-image: url("/img/flags/it.svg"); }
.x-lang__chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; transition: transform var(--dur-quick) ease; }
.x-lang.is-open .x-lang__chev { transform: rotate(180deg); }
.x-lang__list {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 80; box-sizing: border-box;
  width: min(300px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px; list-style: none; border-radius: var(--r-m); background: #161617; border: 1px solid var(--stroke-primary);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.55); animation: v-fade 160ms ease both; outline: none;
}
.x-lang__opt {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-height: var(--tap);
  padding: 6px 10px; border-radius: 10px; color: var(--text-primary); cursor: pointer; outline: none;
}
.x-lang__opt:hover, .x-lang__opt.is-active, .x-lang__opt:focus-visible { background: rgb(255 255 255 / 0.08); }
.x-lang__opt:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
.x-lang__oflag { width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18); object-fit: cover; }
.x-lang__names { display: grid; gap: 1px; min-width: 0; }
.x-lang__native { font: 600 var(--size-body)/1.25 var(--sans); overflow-wrap: anywhere; }
.x-lang__en { font: 400 var(--size-caption)/1.2 var(--sans); color: var(--text-secondary); }
.x-lang__tick { width: 16px; height: 16px; }
.x-lang__opt[aria-selected="true"] .x-lang__tick { background: center / 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.x-lang__opt[aria-selected="true"] .x-lang__native { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---- account button: white pill, compact */
.x-acct {
  display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 36px; max-width: 280px; padding: 6px 14px;
  border-radius: var(--r-pill); background: #fff; color: #0b0b0b; border: 1px solid #fff; text-decoration: none; white-space: nowrap;
  font: var(--weight-bold) var(--size-small)/1.1 var(--sans); transition: transform var(--dur-quick) var(--ease-out), background-color var(--dur-quick) ease;
}
.x-acct:hover { background: #e6e6e6; }
.x-acct > span { overflow: hidden; text-overflow: ellipsis; }
.x-acct__short, .x-acct__dash { display: none; }
[data-auth] .x-acct__full, [data-auth] .x-acct__short { display: none; }
[data-auth] .x-acct__dash { display: inline; }
.x-brand__tools { gap: 8px; flex-wrap: nowrap; }
@media (pointer: coarse), (max-width: 599px) { .x-lang__btn, .x-acct { min-height: var(--tap); } }
@media (max-width: 600px) {
  /* Install becomes icon-only; the menu drops below the header across the screen. */
  .x-lang__list { position: fixed; top: calc(var(--safe-t) + 66px); inset-inline: 12px; width: auto; max-height: calc(100dvh - var(--safe-t) - 90px); }
}
@media (max-width: 520px) {
  .x-acct { max-width: 132px; padding: 6px 12px; }
  html:not([data-auth]) .x-acct__full { display: none; }
  html:not([data-auth]) .x-acct__short { display: inline; }
}
@media (max-width: 400px) {
  .x-brand { gap: 8px; }
  .x-brand__home { gap: 7px; }
  .x-brand__home img, .x-brand__home picture { height: 26px; }
  .x-brand__word { font-size: 17px; }
  .x-brand__tools { gap: 6px; }
  .x-lang__btn { padding: 6px 9px; gap: 0; }
  .x-lang__code, .x-lang__chev { display: none; }
  .x-lang__flag { width: 22px; height: 16px; }
  .x-acct { max-width: 104px; padding: 6px 11px; font-size: var(--size-meta); }
}
@media (max-width: 350px) { .x-brand__word { display: none; } }

/* ---- per-card machine translation note */
.x-tr { margin: 0 0 14px; font: var(--type-caption); color: var(--text-secondary); }
.x-tr__btn { padding: 0; border: 0; background: none; color: var(--text-primary); font: inherit; font-weight: var(--weight-medium); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 24px; }
.x-card .x-tr, .x-term__body .x-tr { margin: 0; }

/* ================================================================ accounts: sign up / sign in / settings */
.x-auth, .x-settings {
  display: grid; gap: 18px; justify-items: start; width: 100%; max-width: 680px; box-sizing: border-box; margin-inline: auto;
  padding: clamp(24px, 5vw, 48px); border-radius: var(--r-xl); background: #111; border: 1px solid rgb(255 255 255 / 0.16);
}
.x-auth__title { font-size: clamp(36px, 6vw, 60px); line-height: 1; outline: none; overflow-wrap: break-word; max-width: 100%; }
.x-auth__lead { font-size: var(--size-lede); line-height: 1.45; color: rgb(255 255 255 / 0.78); max-width: 52ch; }
.x-auth__cta { min-width: min(100%, 260px); }
.x-auth__cta:disabled, .x-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.x-auth__alt { color: var(--text-secondary); font-size: var(--size-small); }
.x-auth__link { color: var(--text-primary); text-underline-offset: 3px; }
.x-auth__err { padding: 10px 14px; border-radius: var(--r-s); border: 1px solid rgb(255 255 255 / 0.4); background: #1d1d1f; color: #fff; font-size: var(--size-small); max-width: 100%; }

.x-key { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label label" "value copy"; align-items: center; gap: 6px 12px; width: 100%; padding: 14px 16px; box-sizing: border-box; border-radius: var(--r-m); background: #0b0b0b; border: 1px solid var(--stroke-primary); }
.x-key__label { grid-area: label; font: 800 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.x-key__value { grid-area: value; margin: 0; font: 400 clamp(22px, 5.4vw, 34px)/1.15 var(--x-mono); letter-spacing: 0.04em; color: #fff; overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; text-align: start; user-select: all; }
.x-key__value--sm { font-size: clamp(18px, 4vw, 24px); }
.x-key .x-copybtn { grid-area: copy; }
.x-copybtn { flex: none; min-width: 84px; }
@media (max-width: 420px) { .x-key { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "value" "copy"; } .x-key .x-copybtn { justify-self: start; } }
.x-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-weight: var(--weight-medium); line-height: 1.4; }
.x-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: #fff; cursor: pointer; }
.x-form { display: grid; gap: 16px; width: 100%; }
.x-field { display: grid; gap: 8px; }
.x-field__label { font: 800 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.x-input {
  width: 100%; box-sizing: border-box; min-height: 48px; margin: 0; padding: 0 14px; border-radius: var(--r-s);
  border: 1px solid var(--stroke-primary); background: #0b0b0b; color: #fff; font: 400 16px/1.2 var(--sans);
  -webkit-appearance: none; appearance: none; transition: border-color var(--dur-quick) ease;
}
.x-input:focus { border-color: #fff; outline: none; }
.x-input[aria-invalid="true"] { border-color: #fff; border-style: dashed; }
.x-input--mono { font-family: var(--x-mono); letter-spacing: 0.05em; direction: ltr; text-align: start; }
.x-select { padding-inline-end: 40px; background: #0b0b0b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; }
[dir="rtl"] .x-select { background-position: left 12px center; }
.x-pass { position: relative; }
.x-pass .x-input { padding-inline-end: 84px; }
.x-pass__toggle { position: absolute; top: 4px; bottom: 4px; inset-inline-end: 4px; min-width: 70px; padding: 0 12px; border: 0; border-radius: 9px; background: #1d1d1f; color: #fff; font: 600 var(--size-small)/1 var(--sans); cursor: pointer; }
.x-form__line { display: flex; flex-wrap: wrap; gap: 10px; }
.x-form__line .x-input { flex: 1 1 220px; width: auto; }
.x-form--inline { gap: 8px; }

.x-settings { max-width: 760px; }
.x-setting { display: grid; gap: 10px; width: 100%; padding-top: 18px; border-top: 1px solid var(--stroke-secondary); }
.x-setting__title { font: 800 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.x-setting__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.x-setting__value { font-size: var(--size-prose); overflow-wrap: anywhere; }
.x-setting__note { font-size: var(--size-small); color: var(--text-secondary); }
.x-setting__msg { font-size: var(--size-small); min-height: 1.3em; }
.x-setting__msg:empty { display: none; }

/* ================================================================ dashboard */
.v-dashboard { gap: clamp(18px, 3vw, 28px) !important; }
.x-dash__banner { display: block; border-radius: var(--r-xl); overflow: hidden; border: 1px solid rgb(255 255 255 / 0.16); background: #111; aspect-ratio: 1600 / 534; }
.x-dash__banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.x-dash__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; }
.x-dash__title { font-size: clamp(40px, 6vw, 72px); line-height: 1; }
.x-fpchip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 8px 8px 16px; border-radius: var(--r-m); background: #111; border: 1px solid var(--stroke-primary); max-width: 100%; box-sizing: border-box; }
[dir="rtl"] .x-fpchip { padding: 8px 16px 8px 8px; }
.x-fpchip__label { font: 800 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.x-fpchip__value { font: 400 var(--size-prose)/1.2 var(--x-mono); letter-spacing: 0.05em; direction: ltr; unicode-bidi: isolate; }
.x-dash__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
@media (max-width: 860px) { .x-dash__top { grid-template-columns: minmax(0, 1fr); } }
.x-dash__balance { gap: 8px; align-content: center; background: #111; }
.x-dash__balance:hover { transform: none; }
.x-dash__label { font: 800 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.x-dash__big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.x-dash__num { font: 800 clamp(56px, 9vw, 96px)/0.95 var(--x-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.x-dash__unit { font: 600 var(--size-heading)/1 var(--sans); color: var(--text-secondary); }
.x-dash__note { font-size: var(--size-small); color: var(--text-secondary); }

/* "Non-expiry + Monthly Rollover" badge: white on near-black, slow calm glow (off with reduced motion). */
.x-badge {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px 22px;
  padding: clamp(20px, 3.4vw, 32px); border-radius: var(--r-l); background: radial-gradient(120% 140% at 0% 0%, #2a2a2d 0%, #111 55%, #0b0b0b 100%);
  border: 1px solid rgb(255 255 255 / 0.55); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06) inset, 0 18px 50px rgb(0 0 0 / 0.45);
}
[dir="rtl"] .x-badge { background: radial-gradient(120% 140% at 100% 0%, #2a2a2d 0%, #111 55%, #0b0b0b 100%); }
.x-badge__mark { display: grid; place-items: center; width: clamp(68px, 10vw, 88px); aspect-ratio: 1; border-radius: 50%; background: #0b0b0b; border: 1.5px solid #fff; box-shadow: 0 0 10px rgb(255 255 255 / 0.35), 0 0 26px rgb(255 255 255 / 0.12); animation: x-badge-glow 3.6s ease-in-out infinite; }
.x-badge__icon { width: 64%; height: 64%; overflow: visible; fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.x-badge__ring { stroke-width: 3.2; }
.x-badge__arrow { stroke-width: 3.2; }
.x-badge__inf { stroke-width: 3; }
.x-badge__title { font: 800 clamp(22px, 3vw, 30px)/1.1 var(--x-display); letter-spacing: -0.02em; color: #fff; }
.x-badge__sub { margin-top: 6px; font-size: var(--size-prose); line-height: 1.45; color: rgb(255 255 255 / 0.78); }
@keyframes x-badge-glow { 0%, 100% { box-shadow: 0 0 10px rgb(255 255 255 / 0.3), 0 0 26px rgb(255 255 255 / 0.1); } 50% { box-shadow: 0 0 14px rgb(255 255 255 / 0.5), 0 0 36px rgb(255 255 255 / 0.18); } }
@media (max-width: 420px) { .x-badge { grid-template-columns: minmax(0, 1fr); } }

.x-usage__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.x-usage__card { display: grid; gap: 12px; padding: 18px; border-radius: var(--r-m); background: #111; border: 1px solid var(--stroke-primary); }
.x-usage__name { font: var(--weight-bold) var(--size-body)/1.2 var(--sans); }
.x-bar { position: relative; height: 8px; border-radius: var(--r-pill); background: #2a2a2d; overflow: hidden; }
.x-bar__fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: #fff; min-inline-size: 0; transition: inline-size 600ms var(--ease-out); }
.x-usage__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: var(--size-small); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.x-usage__left { color: var(--text-tertiary); }
.x-dash__links { padding-top: 4px; }
@media (prefers-reduced-motion: reduce) { .x-badge__mark { animation: none; } }

/* ================================================================ right-to-left (Arabic) */
[dir="rtl"] .skip { left: auto; right: 8px; }
[dir="rtl"] .x-tile__live { right: auto; left: 12px; }
[dir="rtl"] .x-urgent { right: auto; left: 14px; }
[dir="rtl"] .x-receipt__hole { right: auto; left: 22px; }
[dir="rtl"] .x-receipt .x-card__top { padding-right: 0; padding-left: 30px; }
[dir="rtl"] .x-future__outline { padding-left: 0; padding-right: 0.95em; }
@media (max-width: 480px) { [dir="rtl"] .x-future__outline { padding-right: 0.6em; } }
[dir="rtl"] .x-hero__img { object-position: left center; transform: scaleX(-1); }
[dir="rtl"] .x-hero::before { background: linear-gradient(270deg, #111 0%, #111 30%, rgb(17 17 17 / 0.82) 52%, rgb(17 17 17 / 0.25) 100%); }
@media (max-width: 760px) { [dir="rtl"] .x-hero::before { background: linear-gradient(180deg, rgb(17 17 17 / 0.55) 0%, rgb(17 17 17 / 0.88) 45%, #111 100%); } }
@media (min-width: 1024px) { [dir="rtl"] .x-hero:has(#hero-title) .x-reel { right: auto; left: 24px; } }
[dir="rtl"] .x-filter__search input { padding: 0 14px 0 44px; }
[dir="rtl"] .x-filter__clear { right: auto; left: 0; }
[dir="rtl"] .x-tree { padding-left: clamp(18px, 3vw, 28px); padding-right: calc(clamp(18px, 3vw, 28px) + 34px); }
[dir="rtl"] .x-tree__rail { left: auto; right: clamp(18px, 3vw, 28px); transform: scaleX(-1); }
[dir="rtl"] .x-tree .x-fields > div::before { left: auto; right: -26px; }
[dir="rtl"] .x-term__bar span { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .x-term__prompt, [dir="rtl"] .x-cmd, [dir="rtl"] .x-snippet { direction: ltr; text-align: left; }
[dir="rtl"] section.hero.x-banner::after {
  background: linear-gradient(to left, #111 0%, rgb(17 17 17 / 0.88) 30%, rgb(17 17 17 / 0.35) 62%, rgb(17 17 17 / 0) 85%),
    linear-gradient(to top, rgb(17 17 17 / 0.7) 0%, rgb(17 17 17 / 0) 45%);
}
@media (max-width: 760px) { [dir="rtl"] section.hero.x-banner::after { background: linear-gradient(to bottom, rgb(17 17 17 / 0.1) 0, rgb(17 17 17 / 0.55) 150px, #111 280px); } }
@media (max-width: 480px) { [dir="rtl"] section.hero.x-banner::after { background: linear-gradient(to bottom, rgb(17 17 17 / 0.1) 0, rgb(17 17 17 / 0.55) 130px, #111 240px); } }
[dir="rtl"] section.hero.x-banner h1::after { left: 8%; right: 2px; }
[dir="rtl"] .x-hero-side { margin-left: clamp(16px, 2.4vw, 24px); margin-right: auto; }
@media (max-width: 760px) { [dir="rtl"] .x-hero-side { margin: 0 12px 12px; } }
[dir="rtl"] section.hero.x-banner .x-callout__foot .hero__meta { margin: 0 auto 0 0; text-align: left; }
[dir="rtl"] .head__sub { text-align: left; }
@media (max-width: 900px) { [dir="rtl"] .head__sub { text-align: right; } }
[dir="rtl"] .hero:not(:has(.hero__img))::after { background: linear-gradient(to left, var(--hero-scrim-side) 0%, transparent 60%); }
[dir="rtl"] a.x-btn[target="_blank"]::after { content: "\2196"; }

/* Dashboard banner: match the artwork's own rounded corners (radius ~150px on 2000x667 = 7.5% / 22.5%), no frame behind it */
.x-dash__banner { border: 0; background: transparent; border-radius: 7.5% / 22.5%; }
.x-dash__banner, .x-dash__banner picture, .x-dash__banner img { border-radius: 7.5% / 22.5%; }
.x-dash__banner img { display: block; width: 100%; height: 100%; object-fit: cover; }

.x-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.x-dash__signout { margin-top: calc(-1 * clamp(6px, 1.5vw, 14px)); }

/* ================================================================ Free Courses (/courses)
   Black, white and grey only; calm fades; 44px targets; motion off with reduced motion. */
.x-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.x-ico--play { fill: currentColor; stroke-width: 1.2; }
[dir="rtl"] .x-ico--prev, [dir="rtl"] .x-ico--next, [dir="rtl"] .x-ico--back { transform: scaleX(-1); }
.x-fc-head .x-fc-summary { align-content: start; gap: 14px; background: #0b0b0b; }
.x-fc-head .x-fc-summary:hover { transform: none; border-color: var(--stroke-primary); }
.x-fc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.x-fc-stats dd { margin: 4px 0 0; }
.x-fc-stat { font: 800 clamp(30px, 4.4vw, 44px)/1 var(--x-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.x-fc-link { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: var(--tap); }
.x-fc-filter { gap: 10px; }
.x-fc-chip { min-height: var(--tap); }
.x-fc-grid { align-items: stretch; }
a.x-fc-card { color: var(--text-primary); text-decoration: none; align-content: start; grid-template-rows: auto auto 1fr auto; gap: 12px; }
a.x-fc-card:focus-visible, .x-fc-row:focus-visible, .x-fc-poster:focus-visible, .x-fc-back:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.x-fc-card__title { font: 800 clamp(22px, 2.6vw, 28px)/1.1 var(--x-display); letter-spacing: -0.02em; }
.x-fc-card__desc { color: var(--text-secondary); font-size: var(--size-small); line-height: 1.45; }
.x-fc-card__foot { display: grid; gap: 10px; align-self: end; }
.x-fc-card.is-done { border-color: rgb(255 255 255 / 0.4); }
.x-fc-count { font-variant-numeric: tabular-nums; color: var(--text-primary); }
.x-fc-soon { color: var(--text-tertiary); }
.x-fc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: var(--r-pill); background: #fff; color: #0b0b0b; font: var(--weight-bold) var(--size-caption)/1.2 var(--sans); }
.x-fc-badge .x-ico { width: 16px; height: 16px; stroke-width: 2.4; }

.x-fc-course { display: grid; gap: clamp(16px, 2.4vw, 24px); min-width: 0; }
.x-fc-back { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: var(--tap); padding: 0 14px 0 8px; border-radius: var(--r-pill); border: 1px solid var(--stroke-primary); color: var(--text-primary); text-decoration: none; font: var(--weight-medium) var(--size-small)/1 var(--sans); }
.x-fc-back:hover { border-color: var(--text-secondary); }
.x-fc-course__head { display: grid; gap: 10px; max-width: 860px; }
.x-fc-course__title { font-size: clamp(34px, 6vw, 64px); line-height: 1; overflow-wrap: anywhere; }
.x-fc-course__progress { display: grid; gap: 8px; max-width: 420px; }
.x-fc-done { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: var(--r-l); border: 1px solid rgb(255 255 255 / 0.4); background: #111; animation: v-fade 400ms ease both; }
.x-fc-done__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #0b0b0b; }
.x-fc-done__mark .x-ico { stroke-width: 2.4; }
.x-fc-done__title { font: 800 clamp(20px, 2.4vw, 24px)/1.1 var(--x-display); }
.x-fc-done__text { color: var(--text-secondary); font-size: var(--size-small); margin-top: 2px; }
@media (max-width: 560px) { .x-fc-done { grid-template-columns: auto minmax(0, 1fr); } .x-fc-done .x-btn { grid-column: 1 / -1; justify-self: start; } }

.x-fc-course__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 980px) { .x-fc-course__body { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); } }
.x-fc-stage { display: grid; gap: 12px; min-width: 0; }
.x-fc-player { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--r-l); overflow: hidden; background: #111; border: 1px solid var(--stroke-primary); }
.x-fc-player iframe, .x-fc-player .x-fc-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.x-fc-player.is-loading::after { content: ""; position: absolute; inset: 0; background: #1d1d1f; opacity: 0.6; }
.x-fc-poster { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: #111; color: #fff; cursor: pointer; }
.x-fc-poster__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.72); }
.x-fc-poster__play { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgb(11 11 11 / 0.72); border: 1.5px solid #fff; transition: transform var(--dur-quick) var(--ease-out), background-color var(--dur-quick) ease; }
.x-fc-poster__play .x-ico { width: 30px; height: 30px; margin-inline-start: 4px; }
.x-fc-poster:hover .x-fc-poster__play { background: #fff; color: #0b0b0b; }
.x-fc-player.is-soon { display: grid; place-items: center; background: repeating-linear-gradient(135deg, #111 0 14px, #141414 14px 28px); }
.x-fc-soonbox { display: grid; justify-items: center; gap: 8px; padding: 20px; text-align: center; max-width: 34ch; color: var(--text-secondary); }
.x-fc-soonbox .x-ico { width: 32px; height: 32px; color: #fff; }
.x-fc-soonbox__title { font: 800 clamp(20px, 3vw, 28px)/1.1 var(--x-display); color: #fff; }
.x-fc-soonbox__text { font-size: var(--size-small); }
.x-fc-now { display: grid; gap: 4px; }
.x-fc-now__meta { font: 400 var(--size-caption)/1.2 var(--x-mono); color: var(--text-secondary); }
.x-fc-now__title { font: 800 clamp(20px, 2.6vw, 26px)/1.15 var(--x-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.x-fc-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 10px; }
.x-fc-controls .x-btn { min-height: var(--tap); }
.x-fc-toggle { grid-column: 1 / -1; order: -1; }
@media (min-width: 600px) { .x-fc-controls { grid-template-columns: auto minmax(0, 1fr) auto; } .x-fc-toggle { grid-column: auto; order: 0; } }
.x-fc-toggle:disabled { opacity: 0.45; cursor: not-allowed; }
.x-fc-nav.is-off { opacity: 0.35; pointer-events: none; }
.x-fc-msg { font-size: var(--size-small); color: var(--text-secondary); min-height: 1.3em; }
.x-fc-msg:empty { display: none; }

.x-fc-list { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-l); background: #111; border: 1px solid var(--stroke-primary); min-width: 0; }
.x-fc-list__title { font: 800 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); padding: 4px 6px 0; }
.x-fc-videos { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.x-fc-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border-radius: var(--r-s); color: var(--text-primary); text-decoration: none; border: 1px solid transparent; transition: background-color var(--dur-quick) ease, border-color var(--dur-quick) ease; }
.x-fc-row:hover { background: var(--hover-wash); }
.x-fc-row.is-current { background: #1d1d1f; border-color: var(--stroke-primary); }
.x-fc-row__n { font: 400 var(--size-caption)/1 var(--x-mono); color: var(--text-secondary); text-align: center; font-variant-numeric: tabular-nums; }
.x-fc-row__t { font-size: var(--size-small); line-height: 1.3; overflow-wrap: anywhere; }
.x-fc-row__tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--stroke-primary); color: transparent; }
.x-fc-row__tick .x-ico { width: 14px; height: 14px; stroke-width: 2.6; }
.x-fc-row.is-watched .x-fc-row__tick { background: #fff; border-color: #fff; color: #0b0b0b; }
.x-fc-missing { margin-top: 8px; }

/* Homepage concept card */
.x-fc-preview__screen { display: grid; place-items: center; aspect-ratio: 16 / 7; border-radius: var(--r-m); background: repeating-linear-gradient(135deg, #161616 0 14px, #1a1a1a 14px 28px); border: 1px solid var(--stroke-primary); }
.x-fc-preview__play { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid #fff; }
.x-fc-preview__play svg { width: 22px; height: 22px; fill: #fff; margin-inline-start: 3px; }
.x-fc-dash__card { display: grid; align-content: start; gap: 12px; padding: 18px; border-radius: var(--r-m); background: #111; border: 1px solid var(--stroke-primary); }
.x-fc-dash__card .x-btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  .x-fc-done { animation: none; }
  .x-fc-poster__play, .x-fc-row { transition: none; }
}

/* ================================================================ Pro-Tips (/pro-tips) */
.x-pt-preview__doc { display: grid; gap: 9px; align-content: center; aspect-ratio: 16 / 7; padding: 18px 22px; border-radius: var(--r-m); background: #0b0b0b; border: 1px solid var(--stroke-primary); }
.x-pt-preview__doc i { display: block; height: 8px; border-radius: var(--r-pill); background: #2a2a2d; }
.x-pt-preview__doc i:first-child { width: 55%; height: 12px; background: #fff; }
.x-pt-preview__doc i:nth-child(3) { width: 82%; }
.x-pt-preview__doc i:last-child { width: 38%; }
.x-pt-head .x-pt-summary { align-content: start; gap: 14px; background: #0b0b0b; }
.x-pt-head .x-pt-summary:hover { transform: none; border-color: var(--stroke-primary); }
.x-pt-filter { gap: 10px; }
.x-pt-chip { min-height: var(--tap); }
.x-pt-grid { align-items: stretch; }
a.x-pt-card { color: var(--text-primary); text-decoration: none; align-content: start; grid-template-rows: auto auto auto 1fr auto; gap: 12px; }
a.x-pt-card:focus-visible, .x-pt-thumb:focus-visible, .x-pt-back:focus-visible, .x-pt-yt__btn:focus-visible, .x-pt-body a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.x-pt-card__cover, .x-pt-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-m); background: #1d1d1f; filter: grayscale(1); }
.x-pt-card__title { font: 800 clamp(22px, 2.6vw, 28px)/1.1 var(--x-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.x-pt-card__excerpt { color: var(--text-secondary); font-size: var(--size-small); line-height: 1.45; }
.x-pt-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; align-self: end; font-size: var(--size-small); color: var(--text-secondary); }
.x-pt-card__read { margin-inline-start: auto; color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.x-pt-ph { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-pill); border: 1px dashed var(--stroke-primary); color: var(--text-secondary); font: var(--type-tag); }
.x-pt-cat { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-pill); background: var(--fill-tertiary); color: var(--text-primary); font: var(--type-tag); }
.x-pt-file { align-content: start; grid-template-rows: auto; gap: 12px; }
.x-card.x-pt-file:hover { transform: none; }
.x-pt-thumb { display: block; border-radius: var(--r-m); }
.x-pt-video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-m); background: #0b0b0b; border: 1px solid var(--stroke-primary); }
.x-pt-audio { display: block; width: 100%; min-height: var(--tap); }
.x-pt-file__top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.x-pt-file__ico { position: relative; display: grid; place-items: center; flex: none; width: 48px; height: 52px; color: #fff; }
.x-pt-ico { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.x-pt-file__ext { position: absolute; inset-inline: 0; bottom: 0; text-align: center; font: 600 10px/1 var(--x-mono); letter-spacing: 0.04em; color: #0b0b0b; background: #fff; border-radius: 4px; padding: 2px 0; }
.x-pt-file__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 400 var(--size-caption)/1.3 var(--x-mono); color: var(--text-secondary); }
.x-pt-file__title { font: 800 clamp(19px, 2.2vw, 23px)/1.15 var(--x-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.x-pt-file__desc { color: var(--text-secondary); font-size: var(--size-small); line-height: 1.45; }
.x-pt-file__info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--size-caption); color: var(--text-secondary); }
.x-pt-file__acts { display: flex; flex-wrap: wrap; gap: 8px; align-self: end; }
.x-pt-file__acts .x-btn, .x-pt-back { min-height: var(--tap); }
.x-pt-missing { margin-top: 8px; }

/* Article page */
.x-pt-article { display: grid; gap: clamp(16px, 2.4vw, 24px); min-width: 0; }
.x-pt-back { justify-self: start; }
.x-pt-article__head { display: grid; gap: 12px; max-width: 860px; }
.x-pt-article__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.x-pt-article__title { font-size: clamp(34px, 6vw, 64px); line-height: 1; overflow-wrap: anywhere; }
.x-pt-article__lede { font-size: var(--size-lede); line-height: 1.45; color: rgb(255 255 255 / 0.78); max-width: 60ch; }
.x-pt-cover { margin: 0; max-width: 960px; }
.x-pt-cover img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: var(--r-l); border: 1px solid var(--stroke-primary); background: #1d1d1f; }
.x-pt-notice { max-width: 760px; padding: 10px 14px; border-radius: var(--r-s); border: 1px dashed var(--stroke-primary); color: var(--text-secondary); font-size: var(--size-small); }
.x-pt-body { max-width: 760px; min-width: 0; font-size: var(--size-prose); line-height: 1.7; color: rgb(255 255 255 / 0.88); overflow-wrap: anywhere; }
.x-pt-body > * + * { margin-top: 1em; }
.x-pt-body :is(h2, h3, h4, h5, h6) { font-family: var(--x-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #fff; margin-top: 1.6em; }
.x-pt-body h2 { font-size: clamp(26px, 3.4vw, 34px); }
.x-pt-body h3 { font-size: clamp(22px, 2.8vw, 27px); }
.x-pt-body :is(h4, h5, h6) { font-size: 20px; }
.x-pt-body a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.x-pt-body strong { color: #fff; font-weight: 700; }
.x-pt-body :is(ul, ol) { padding-inline-start: 1.4em; display: grid; gap: 0.35em; }
.x-pt-body li > :is(ul, ol) { margin-top: 0.35em; }
.x-pt-body code { font-family: var(--x-mono); font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: #1d1d1f; border: 1px solid var(--stroke-secondary); }
.x-pt-body pre { margin: 0; padding: 14px 16px; border-radius: var(--r-s); background: #0b0b0b; border: 1px solid var(--stroke-primary); overflow-x: auto; direction: ltr; text-align: left; }
.x-pt-body pre code { padding: 0; border: 0; background: none; font-size: var(--size-small); line-height: 1.6; white-space: pre; }
.x-pt-body blockquote { margin: 0; padding: 4px 0 4px 16px; border-inline-start: 3px solid #fff; padding-inline-start: 16px; color: var(--text-secondary); }
.x-pt-body img { display: block; max-width: 100%; height: auto; border-radius: var(--r-m); border: 1px solid var(--stroke-primary); }
.x-pt-body hr { border: 0; border-top: 1px solid var(--stroke-primary); }
.x-pt-yt { position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: var(--r-l); overflow: hidden; background: #111; border: 1px solid var(--stroke-primary); }
.x-pt-yt__btn { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: #111; color: #fff; cursor: pointer; }
.x-pt-body .x-pt-yt__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; filter: grayscale(1) brightness(0.72); }
.x-pt-yt__play { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgb(11 11 11 / 0.72); border: 1.5px solid #fff; transition: background-color var(--dur-quick) ease; }
.x-pt-yt__play svg { width: 30px; height: 30px; fill: currentColor; margin-inline-start: 4px; }
.x-pt-yt__btn:hover .x-pt-yt__play { background: #fff; color: #0b0b0b; }
.x-pt-yt__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.x-pt-attached { display: grid; gap: 16px; margin-top: 8px; }
.x-pt-attached__title { font-size: clamp(28px, 4vw, 40px); }
[dir="rtl"] .x-pt-body blockquote { padding: 4px 16px 4px 0; }

/* ================================================================ Admin (/admin, owner only) */
.x-admin-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid rgb(255 255 255 / 0.5); background: #0b0b0b; color: #fff; text-decoration: none; font: var(--weight-bold) var(--size-small)/1.1 var(--sans); }
.x-admin-btn:hover { border-color: #fff; }
.x-admin-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (pointer: coarse), (max-width: 599px) { .x-admin-btn { min-height: var(--tap); } }
@media (max-width: 420px) { .x-admin-btn { padding: 6px 9px; font-size: var(--size-meta); } }
.x-adm-head .x-adm-side { align-content: start; gap: 14px; background: #0b0b0b; }
.x-adm-head .x-adm-side:hover { transform: none; border-color: var(--stroke-primary); }
.x-adm-facts { display: grid; gap: 12px; margin: 0; }
.x-adm-facts dd { margin: 4px 0 0; }
.x-adm-fact { font: 600 var(--size-body)/1.3 var(--x-mono); overflow-wrap: anywhere; }
.x-adm-gate { margin-top: 8px; }
.x-adm-gate__title { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; }
.x-adm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--stroke-primary); overflow-x: auto; }
.x-adm-tab { min-height: var(--tap); padding: 0 18px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-secondary); font: var(--weight-bold) var(--size-body)/1 var(--sans); cursor: pointer; }
.x-adm-tab[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }
.x-adm-tab:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.x-adm-live { min-height: 1.4em; font-size: var(--size-small); color: var(--text-secondary); }
.x-adm-live:empty { display: none; }
.x-adm-live.is-err { padding: 8px 12px; border: 1px dashed rgb(255 255 255 / 0.6); border-radius: var(--r-s); color: #fff; }
.x-adm-panel { display: grid; gap: 16px; min-width: 0; }
.x-adm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.x-adm-h2 { font: 800 clamp(24px, 3vw, 32px)/1.1 var(--x-display); letter-spacing: -0.02em; }
.x-adm-empty, .x-adm-hint { color: var(--text-secondary); font-size: var(--size-small); }
.x-adm-hint { font-size: var(--size-caption); line-height: 1.4; }
.x-adm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.x-adm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 14px 16px; border-radius: var(--r-m); background: #111; border: 1px solid var(--stroke-primary); min-width: 0; }
.x-adm-file { grid-template-columns: auto minmax(0, 1fr) auto; }
.x-adm-row__main { display: grid; gap: 6px; min-width: 0; }
.x-adm-row__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; overflow-wrap: anywhere; }
.x-adm-row__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: var(--size-caption); color: var(--text-secondary); overflow-wrap: anywhere; }
.x-adm-row__acts, .x-adm-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.x-adm-row .x-btn, .x-adm-acts .x-btn, .x-adm-pick { min-height: var(--tap); }
.x-adm-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: var(--tap); }
.x-adm-inline { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--stroke-secondary); }
@media (max-width: 640px) {
  .x-adm-row { grid-template-columns: minmax(0, 1fr); }
  .x-adm-file { grid-template-columns: auto minmax(0, 1fr); }
  .x-adm-file .x-adm-row__acts { grid-column: 1 / -1; }
}
.x-adm-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--stroke-primary); color: var(--text-secondary); font: var(--type-tag); white-space: nowrap; }
.x-adm-pill.is-pub { background: #fff; border-color: #fff; color: #0b0b0b; }
.x-adm-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--size-caption); color: var(--text-secondary); }
.x-adm-back { cursor: pointer; background: none; }
.x-adm-form { gap: 18px; }
.x-adm-grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 760px) { .x-adm-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
textarea.x-adm-textarea { min-height: 72px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
textarea.x-adm-body { min-height: 360px; font: 400 14px/1.6 var(--x-mono); }
.x-adm-md { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 980px) { .x-adm-md { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.x-adm-md__pane { display: grid; gap: 8px; align-content: start; min-width: 0; }
.x-adm-preview { max-width: none; min-height: 360px; max-height: 70vh; overflow: auto; padding: 16px 18px; border-radius: var(--r-s); background: #111; border: 1px solid var(--stroke-primary); }
.x-adm-fieldset { display: grid; gap: 10px; margin: 0; padding: 14px 16px; border: 1px solid var(--stroke-primary); border-radius: var(--r-m); min-width: 0; }
.x-adm-fieldset legend { padding: 0 6px; }
.x-adm-cover { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.x-adm-cover__img { width: 160px; height: 90px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--stroke-primary); filter: grayscale(1); }
.x-adm-filter { min-height: var(--tap); }
.x-adm-checks { display: grid; gap: 2px; max-height: 260px; overflow: auto; }
.x-adm-check { align-items: center; min-height: var(--tap); padding: 0 6px; border-radius: var(--r-s); font-weight: var(--weight-regular); overflow-wrap: anywhere; }
.x-adm-check:hover { background: var(--hover-wash); }
.x-adm-danger { border-style: dashed; }
.x-adm-upload { gap: 14px; }
.x-card.x-adm-upload:hover { transform: none; border-color: var(--stroke-primary); }
.x-adm-drop { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 170px; padding: 20px; border-radius: var(--r-m); border: 1.5px dashed rgb(255 255 255 / 0.4); background: #0b0b0b; text-align: center; cursor: pointer; transition: border-color var(--dur-quick) ease, background-color var(--dur-quick) ease; }
.x-adm-drop .x-pt-ico { width: 40px; height: 40px; color: #fff; }
.x-adm-drop__t { font: 800 clamp(18px, 2.2vw, 22px)/1.2 var(--x-display); }
.x-adm-drop:hover, .x-adm-drop.is-over { border-color: #fff; border-style: solid; background: #161616; }
input.x-sr-only:focus-visible + .x-adm-drop, input.x-sr-only:focus-visible + .x-adm-pick { outline: 2px solid #fff; outline-offset: 3px; }
.x-adm-pick { cursor: pointer; }
.x-adm-picked { font-size: var(--size-small); color: var(--text-secondary); overflow-wrap: anywhere; }
.x-adm-progress { display: flex; align-items: center; gap: 12px; }
.x-adm-progress .x-adm-bar { flex: 1; }
.x-adm-progress__t { font: 400 var(--size-caption)/1.2 var(--x-mono); color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-adm-upload > .x-btn { justify-self: start; }
.x-adm-upload > .x-btn:disabled, .x-adm-acts .x-btn:disabled { opacity: 0.45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .x-pt-yt__play, .x-adm-drop { transition: none; } }

/* ================================================================ Hero service tiles: static white neon edge glow (no pulsing) */
.x-tile { border-color: rgb(255 255 255 / 0.9); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35), 0 0 8px rgb(255 255 255 / 0.55), 0 0 18px rgb(255 255 255 / 0.35), inset 0 0 8px rgb(255 255 255 / 0.12); transition: transform var(--dur-quick) var(--ease-out), border-color var(--dur-quick) ease, background-color var(--dur-quick) ease, box-shadow var(--dur-quick) ease; }
.x-tile:hover, .x-tile:focus-visible { border-color: #fff; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.5), 0 0 10px rgb(255 255 255 / 0.75), 0 0 26px rgb(255 255 255 / 0.45), inset 0 0 10px rgb(255 255 255 / 0.16); }
/* .x-hero clips (overflow: hidden, padding >= 22px): a few px of extra room keeps the outer glow from being cut off. */
.x-hero .x-tiles { padding: 6px; }
/* Eight tiles: 4 + 4 on wide screens instead of 5 + 3. */
@media (min-width: 900px) { .x-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- Install OpenBuild (#install)
   Brushed-silver platform cards; each opens #install-dlg with three steps. Greys only; the white edge glow is static. */
.x-inst__grid { display: grid; gap: 18px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.x-os {
  grid-column: span 2; position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-block-size: 330px; padding: 28px 30px; border-radius: 26px; text-align: start; color: #111111; cursor: pointer;
  font: inherit; border: 1px solid rgb(255 255 255 / 0.7);
  background:
    repeating-linear-gradient(90deg, rgb(0 0 0 / 0.028) 0 1px, rgb(255 255 255 / 0.035) 1px 3px),
    linear-gradient(118deg, rgb(255 255 255 / 0) 28%, rgb(255 255 255 / 0.62) 44%, rgb(255 255 255 / 0) 58%),
    linear-gradient(158deg, #f6f6f6 0%, #c4c4c4 20%, #ececec 38%, #a8a8a8 60%, #e8e8e8 80%, #b9b9b9 100%);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.5), 0 0 26px rgb(255 255 255 / 0.16), 0 18px 40px rgb(0 0 0 / 0.45),
    inset 0 1px 0 rgb(255 255 255 / 0.95), inset 0 -3px 8px rgb(0 0 0 / 0.16);
  transition: box-shadow 0.35s ease, filter 0.35s ease;
}
.x-os--wide { grid-column: span 3; min-block-size: 290px; }
.x-os:hover { filter: brightness(1.04); box-shadow: 0 0 0 1px rgb(0 0 0 / 0.5), 0 0 34px rgb(255 255 255 / 0.24), 0 18px 40px rgb(0 0 0 / 0.45), inset 0 1px 0 rgb(255 255 255 / 0.95), inset 0 -3px 8px rgb(0 0 0 / 0.16); }
.x-os:focus-visible { outline: 3px solid #ffffff; outline-offset: 4px; }
.x-os__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.x-os__ic { inline-size: 72px; block-size: 72px; fill: #111111; flex: none; }
.x-os__pill {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #1d1d1f;
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgb(0 0 0 / 0.6); background: rgb(255 255 255 / 0.4);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.8); white-space: nowrap;
}
.x-os__body { display: grid; gap: 10px; }
.x-os__name { font-weight: 700; font-size: clamp(30px, 3.2vw, 38px); letter-spacing: -0.02em; line-height: 1.05; color: #111111; }
.x-os__req { font-size: 16px; color: #2c2c2e; }
.x-os__go { display: inline-flex; align-items: center; gap: 8px; margin-block-start: 14px; font-size: 19px; color: #111111; }
.x-os__arrow { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .x-os__arrow { transform: scaleX(-1); }
.x-inst__links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-block-start: 26px; color: var(--text-secondary); font-size: 15px; }
.x-inst__links span:first-child { margin-inline-end: 10px; }
.x-inst__links button {
  font: inherit; color: var(--text-primary); background: none; border: 0; cursor: pointer;
  min-block-size: var(--tap, 44px); padding: 0 10px; border-radius: 10px;
}
.x-inst__links button:hover { background: var(--hover-wash); }
.x-inst__links button:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.x-inst__sep { inline-size: 1px; block-size: 18px; background: var(--stroke-primary); margin-inline: 8px; }
@media (max-width: 900px) {
  .x-inst__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-os, .x-os--wide { grid-column: span 1; min-block-size: 260px; }
  .x-os:nth-child(3) { grid-column: span 2; }
}
@media (max-width: 600px) {
  .x-inst__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .x-os, .x-os--wide, .x-os:nth-child(3) { grid-column: auto; min-block-size: 0; gap: 28px; padding: 22px 22px 20px; border-radius: 22px; }
  .x-os__ic { inline-size: 52px; block-size: 52px; }
  .x-os__go { margin-block-start: 6px; font-size: 17px; }
}

/* Install guide dialog */
.x-idlg {
  inline-size: min(560px, calc(100vw - 32px)); max-block-size: calc(100dvh - 32px); padding: 0; margin: auto;
  border: 1px solid rgb(255 255 255 / 0.16); border-radius: 24px; background: #161616; color: #f5f5f7;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.6), 0 0 30px rgb(255 255 255 / 0.06); overflow: auto;
}
.x-idlg[open] { animation: x-idlg-in 0.25s ease; }
.x-idlg::backdrop { background: rgb(0 0 0 / 0.62); backdrop-filter: blur(6px); }
@keyframes x-idlg-in { from { opacity: 0; } to { opacity: 1; } }
.x-idlg__head {
  display: flex; align-items: center; gap: 16px; padding: 20px 18px 20px 24px; color: #111111;
  background:
    repeating-linear-gradient(90deg, rgb(0 0 0 / 0.028) 0 1px, rgb(255 255 255 / 0.035) 1px 3px),
    linear-gradient(158deg, #f4f4f4 0%, #c8c8c8 35%, #ededed 60%, #b4b4b4 100%);
  border-block-end: 1px solid rgb(0 0 0 / 0.4);
}
[dir="rtl"] .x-idlg__head { padding: 20px 24px 20px 18px; }
.x-idlg__ic { inline-size: 34px; block-size: 34px; fill: #111111; flex: none; }
.x-idlg__titles { flex: 1; min-inline-size: 0; }
.x-idlg__titles h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: #111111; }
.x-idlg__titles p { font-size: 14px; color: #3a3a3c; margin-block-start: 2px; }
.x-idlg__x {
  inline-size: var(--tap, 44px); block-size: var(--tap, 44px); flex: none; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: rgb(255 255 255 / 0.35); cursor: pointer; color: #111111;
}
.x-idlg__x:hover { background: rgb(255 255 255 / 0.6); }
.x-idlg__x:focus-visible { outline: 2px solid #111111; outline-offset: 2px; }
.x-idlg__x svg { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.x-idlg__steps { list-style: none; counter-reset: idlg; display: grid; gap: 20px; padding: 26px 24px 6px; margin: 0; }
.x-idlg__steps li { counter-increment: idlg; display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; row-gap: 4px; }
.x-idlg__steps li::before {
  content: counter(idlg); grid-row: span 2; inline-size: 34px; block-size: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono, ui-monospace, monospace); font-weight: 600; font-size: 15px; color: #111111;
  background: linear-gradient(158deg, #f4f4f4, #b9b9b9); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 0 0 1px rgb(0 0 0 / 0.5);
}
.x-idlg__steps strong { font-weight: 600; font-size: 16px; color: #f5f5f7; padding-block-start: 6px; }
.x-idlg__steps span { font-size: 15px; color: rgb(245 245 247 / 0.78); line-height: 1.45; }
.x-idlg__foot { display: grid; gap: 14px; justify-items: start; padding: 18px 24px 24px; }
.x-idlg__note { font-size: 13px; color: rgb(245 245 247 / 0.6); line-height: 1.45; }
@media (prefers-reduced-motion: reduce) {
  .x-os { transition: none; }
  .x-idlg[open] { animation: none; }
}
/* Install heading: description under the title, as in the platform-card layout */
.x-inst .head { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 16px; }
.x-inst .head__sub, [dir="rtl"] .x-inst .head__sub { justify-self: start; text-align: start; max-inline-size: 46ch; margin: 0; }

/* ---------------------------------------------------------------- Launch splash (#ob-splash)
   Shown once per browser session on launch (boot script adds html.splash-on; never under reduced motion).
   The polished logo spins 360° into place, the arrows shoot out the way they point, white envelops the rest and
   fades to the page. Pieces are /img/splash-*.webp; positions are percentages of the source artwork (867 × 484). */
.ob-splash { display: none; }
html.splash-on .ob-splash {
  display: block; position: fixed; inset: 0; z-index: 2147483000; overflow: hidden; background: #0b0b0b;
  pointer-events: auto; contain: strict;
}
html.splash-off .ob-splash { display: none; }
.ob-splash__stage { position: absolute; inset: 0; display: grid; place-items: center; perspective: 1400px; }
.ob-splash__logo { position: relative; inline-size: min(70vw, 440px); aspect-ratio: 867 / 484; opacity: 0; transform-style: preserve-3d; }
.ob-splash__logo img { position: absolute; block-size: auto; max-inline-size: none; user-select: none; }
.ob-splash__l { left: 0; top: 18.18%; width: 28.72%; }
.ob-splash__b { left: 31.14%; top: 0; width: 38.06%; }
.ob-splash__r { left: 71.16%; top: 18.18%; width: 28.84%; }
.ob-splash__white {
  position: absolute; left: 50%; top: 50%; inline-size: 300vmax; block-size: 300vmax; margin: -150vmax 0 0 -150vmax;
  border-radius: 50%; background: radial-gradient(circle, #ffffff 0 58%, rgb(255 255 255 / 0) 70%); transform: scale(0);
}
html.splash-go .ob-splash { animation: ob-splash-out 0.7s cubic-bezier(0.4, 0, 0.2, 1) 3.75s forwards; }
html.splash-go .ob-splash__logo { animation: ob-splash-spin 1.8s cubic-bezier(0.33, 0.1, 0.2, 1) forwards; }
html.splash-go .ob-splash__l { animation: ob-splash-left 0.85s cubic-bezier(0.45, 0, 0.55, 0.3) 2.15s forwards; }
html.splash-go .ob-splash__r { animation: ob-splash-right 0.85s cubic-bezier(0.45, 0, 0.55, 0.3) 2.15s forwards; }
html.splash-go .ob-splash__b { animation: ob-splash-glow 0.9s cubic-bezier(0.4, 0, 0.2, 1) 2.8s forwards; }
html.splash-go .ob-splash__white { animation: ob-splash-envelop 0.95s cubic-bezier(0.4, 0, 0.2, 1) 2.85s forwards; }
@keyframes ob-splash-spin {
  0% { opacity: 0; transform: rotateY(-360deg) scale(0.55); }
  25% { opacity: 1; }
  100% { opacity: 1; transform: rotateY(0deg) scale(1); }
}
@keyframes ob-splash-left {
  0% { transform: translateX(0); opacity: 1; }
  28% { transform: translateX(8%); opacity: 1; }
  100% { transform: translateX(-130vw); opacity: 0.4; }
}
@keyframes ob-splash-right {
  0% { transform: translateX(0); opacity: 1; }
  28% { transform: translateX(-8%); opacity: 1; }
  100% { transform: translateX(130vw); opacity: 0.4; }
}
@keyframes ob-splash-glow {
  from { filter: brightness(1); transform: scale(1); }
  to { filter: brightness(2.6); transform: scale(1.12); }
}
@keyframes ob-splash-envelop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes ob-splash-out { from { opacity: 1; } to { opacity: 0; visibility: hidden; pointer-events: none; } }
html.splash-go .ob-splash__logo, html.splash-go .ob-splash__logo img, html.splash-go .ob-splash__white { will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) { html.splash-on .ob-splash { display: none; } }

/* ---------------------------------------------------------------- Install bar (#install-bar)
   Under the header for visitors who can install and have not: Chromium after beforeinstallprompt, iOS Safari and
   macOS Safari 17+. Never in the installed app; closing it is remembered on this device (localStorage). */
.x-ibar {
  display: flex; align-items: center; gap: 12px; margin-block: 2px 14px; padding-block: 8px; padding-inline: 10px 6px;
  border-radius: var(--r-l); background: var(--fill-tertiary); border: 1px solid var(--stroke-primary);
  animation: x-ibar-in 0.4s ease;
}
.x-ibar[hidden] { display: none; }
@keyframes x-ibar-in { from { opacity: 0; } to { opacity: 1; } }
.x-ibar__ic { flex: none; display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 12px; background: #0b0b0b; border: 1px solid rgb(255 255 255 / 0.14); }
.x-ibar__ic img { inline-size: 30px; block-size: auto; }
.x-ibar__txt { flex: 1; min-inline-size: 0; display: grid; gap: 2px; }
.x-ibar__txt strong { font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--text-primary); }
.x-ibar__txt span { font-size: 13px; line-height: 1.3; color: var(--text-secondary); }
.x-ibar__go { flex: none; min-block-size: 40px; padding: 8px 16px; border-radius: var(--r-pill); font-size: 14px; }
.x-ibar__x {
  flex: none; display: grid; place-items: center; inline-size: var(--tap); block-size: var(--tap); padding: 0;
  border: 0; border-radius: 12px; background: none; color: var(--text-secondary); cursor: pointer;
}
.x-ibar__x:hover { background: var(--hover-wash); color: var(--text-primary); }
.x-ibar__x:focus-visible, .x-ibar__go:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.x-ibar__x svg { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 420px) {
  .x-ibar { gap: 10px; }
  .x-ibar__ic { inline-size: 40px; block-size: 40px; }
  .x-ibar__txt span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .x-ibar { animation: none; } }

/* ---------------------------------------------------------------- Sign-up set-up screen (.x-setup)
   17 s while the account is created: the polished logo turns slowly, liquid metal fills the bar, two steps
   advance. Colours follow the logo artwork: near-black ground, brushed and mirror silver. Owner-approved motion;
   under reduced motion the logo rests, the metal does not flow and the bar fills in steps. */
html.x-setup-open { overflow: hidden; }
.x-setup {
  position: fixed; inset: 0; z-index: 2147482000; display: grid; place-content: center; justify-items: center;
  gap: clamp(18px, 4vh, 36px); padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 38%, #1c1c1c 0%, #0b0b0b 55%, #050505 100%); color: #f5f5f7;
  animation: x-setup-in 0.5s ease both; outline: none; overflow-y: auto;
}
.x-setup.is-leaving { animation: x-setup-out 0.45s ease forwards; }
@keyframes x-setup-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes x-setup-out { from { opacity: 1; } to { opacity: 0; } }
.x-setup__stage { position: relative; perspective: 1600px; inline-size: min(68vw, 380px); }
.x-setup__stage::after { /* soft reflection pool under the logo */
  content: ""; position: absolute; inset-inline: 12%; inset-block-end: -14%; block-size: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0)); filter: blur(6px);
}
.x-setup__logo {
  display: block; inline-size: 100%; block-size: auto; transform-style: preserve-3d;
  filter: drop-shadow(0 18px 30px rgb(0 0 0 / 0.65)) drop-shadow(0 0 22px rgb(255 255 255 / 0.08));
  animation: x-setup-turn 8.5s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
}
@keyframes x-setup-turn {
  0% { transform: rotateY(0deg) translateY(0); }
  50% { transform: rotateY(180deg) translateY(-6px); }
  100% { transform: rotateY(360deg) translateY(0); }
}
.x-setup__panel { inline-size: min(88vw, 440px); display: grid; gap: 16px; justify-items: stretch; text-align: center; }
.x-setup__title { font: 800 clamp(24px, 4.2vw, 32px)/1.1 var(--x-display); letter-spacing: -0.03em; color: #ffffff; }
.x-setup__steps { list-style: none; margin: 0; padding: 0; display: grid; justify-items: center; gap: 6px; }
.x-setup__step { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 500; color: rgb(245 245 247 / 0.42); transition: color 0.5s ease; }
.x-setup__step.is-active, .x-setup__step.is-done { color: #f5f5f7; }
.x-setup__dot {
  position: relative; flex: none; inline-size: 22px; block-size: 22px; border-radius: 50%;
  border: 1.5px solid rgb(245 245 247 / 0.35); transition: border-color 0.5s ease, background 0.5s ease;
}
.x-setup__step.is-active .x-setup__dot { border-color: #f5f5f7; border-block-start-color: rgb(245 245 247 / 0.15); animation: x-setup-orbit 1.1s linear infinite; }
.x-setup__step.is-done .x-setup__dot { border-color: transparent; background: linear-gradient(150deg, #ffffff, #b7b7b7 55%, #e9e9e9); box-shadow: 0 0 12px rgb(255 255 255 / 0.25); }
.x-setup__step.is-done .x-setup__dot::after { content: ""; position: absolute; inset-inline-start: 7px; inset-block-start: 3.5px; inline-size: 5px; block-size: 10px; border: solid #111111; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes x-setup-orbit { to { transform: rotate(360deg); } }
.x-setup__arrow { font-size: 18px; line-height: 1; color: rgb(245 245 247 / 0.45); }
/* Liquid-metal progress bar */
.x-setup__bar {
  position: relative; block-size: 16px; margin-block-start: 6px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(180deg, #050505, #1a1a1a); border: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.85), 0 1px 0 rgb(255 255 255 / 0.06);
}
.x-setup__fill {
  position: relative; block-size: 100%; inline-size: 0; border-radius: inherit;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.85) 0%, rgb(255 255 255 / 0) 42%, rgb(0 0 0 / 0) 60%, rgb(0 0 0 / 0.35) 100%),
    linear-gradient(100deg, #6f6f6f 0%, #d9d9d9 12%, #ffffff 18%, #8e8e8e 30%, #c8c8c8 42%, #f4f4f4 50%, #7c7c7c 62%, #dedede 74%, #ffffff 80%, #8a8a8a 92%, #6f6f6f 100%);
  background-size: 100% 100%, 260% 100%;
  box-shadow: 0 0 14px rgb(255 255 255 / 0.25);
  animation: x-setup-flow 2.6s linear infinite;
}
@keyframes x-setup-flow { from { background-position: 0 0, 0% 0; } to { background-position: 0 0, -260% 0; } }
.x-setup__drop { /* the molten leading edge */
  position: absolute; inset-inline-end: -7px; inset-block-start: 50%; inline-size: 18px; block-size: 18px; margin-block-start: -9px;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff, #d0d0d0 45%, #7a7a7a 100%);
  box-shadow: 0 0 12px rgb(255 255 255 / 0.55); animation: x-setup-melt 1.6s ease-in-out infinite;
}
@keyframes x-setup-melt { 0%, 100% { transform: scale(1, 0.92); } 50% { transform: scale(0.9, 1.06); } }
[dir="rtl"] .x-setup__fill { background-position: 0 0, 100% 0; }
.x-setup__pct { font: 500 14px/1 var(--x-mono); letter-spacing: 0.06em; color: rgb(245 245 247 / 0.7); }
.x-setup__note { font-size: 13px; color: rgb(245 245 247 / 0.5); }
@media (prefers-reduced-motion: reduce) {
  .x-setup, .x-setup__logo, .x-setup__fill, .x-setup__drop, .x-setup__step.is-active .x-setup__dot { animation: none; }
}

/* ---------------------------------------------------------------- The Passkey, shown once (.x-keys) */
.x-keys__warn {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-m);
  background: #ffffff; color: #0b0b0b; border: 2px solid #ffffff; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.12);
}
.x-keys__warnic { flex: none; inline-size: 28px; block-size: 28px; fill: none; stroke: #0b0b0b; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-block-start: 2px; }
.x-keys__warntext { display: grid; gap: 6px; }
.x-keys__warntext strong { font: 800 18px/1.25 var(--sans); text-transform: none; }
.x-keys__warntext p { margin: 0; font-size: var(--size-prose); line-height: 1.5; color: #1d1d1f; }
.x-passkey {
  display: grid; gap: 14px; padding: 20px 18px; border-radius: var(--r-l); text-align: start;
  background: linear-gradient(160deg, #161616, #0b0b0b); border: 1px solid rgb(255 255 255 / 0.18);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}
.x-passkey__label { font: 800 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); }
.x-passkey__value {
  margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; direction: ltr; unicode-bidi: isolate;
  font: 500 clamp(20px, 5.2vw, 30px)/1.3 var(--x-mono); letter-spacing: 0.05em; color: #ffffff; user-select: all; -webkit-user-select: all;
}
.x-passkey__dash { color: rgb(255 255 255 / 0.35); padding-inline: 2px; }
.x-passkey__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.x-passkey__actions .x-btn { flex: 1 1 160px; }

/* ---------------------------------------------------------------- Website Templates cards (.x-tpl) */
.x-tpl__bar {
  display: flex; align-items: center; gap: 6px; margin: -4px -4px 4px; padding: 8px 12px; border-radius: var(--r-s);
  background: #0b0b0b; border: 1px solid var(--stroke-primary); font: 400 12px/1 var(--x-mono); color: var(--text-secondary);
}
.x-tpl__bar i { inline-size: 8px; block-size: 8px; border-radius: 50%; background: rgb(255 255 255 / 0.28); }
.x-tpl__bar span { margin-inline-start: 8px; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.x-tpl__wire { display: block; inline-size: 100%; block-size: auto; }
.x-tpl__wire rect { fill: rgb(255 255 255 / 0.07); stroke: rgb(255 255 255 / 0.22); stroke-width: 1; }
.x-tpl__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.x-tpl--paid { align-self: start; }
.x-tpl__ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.x-tpl__ctl .x-btn { min-block-size: var(--tap); }
/* Live Demo before purchase: dead (grey, flat, no hover, no press) */
.x-tpl__live.is-locked, .x-tpl__live.is-locked:hover, .x-tpl__live.is-locked:active { background: #1c1c1c; color: #5c5c5c; border-color: rgb(255 255 255 / 0.08); box-shadow: none; transform: none; cursor: not-allowed; filter: none; }
.x-tpl__more { display: grid; gap: 16px; animation: x-tpl-reveal 0.35s ease; }
.x-tpl__more[hidden] { display: none; }
@keyframes x-tpl-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .x-tpl__more { animation: none; } }

/* ---------------------------------------------------------------- Paid templates, Templates MCP panel, agent keys */
.x-tpl__shot { display: block; overflow: hidden; border-radius: var(--r-m); border: 1px solid var(--stroke-primary); aspect-ratio: 16 / 10; background: #0b0b0b; }
.x-tpl__shot img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.x-tpl__shot:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }
.x-tpl__shot.has-video { position: relative; }
.x-hp, .x-hp[hidden] { display: none !important; }
/* Human check for previews: shown only when Cloudflare Turnstile asks for a click. */
.x-verify { position: fixed; inset-block-end: max(16px, env(safe-area-inset-bottom)); inset-inline: 0; margin-inline: auto; z-index: 60; inline-size: max-content; max-inline-size: calc(100% - 32px);
  display: grid; justify-items: center; gap: 8px; padding: 14px 16px; border-radius: var(--r-m); background: #111111; border: 1px solid rgb(255 255 255 / 0.18); box-shadow: 0 12px 40px rgb(0 0 0 / 0.5); }
.x-verify[hidden] { display: none; }
.x-verify__label { margin: 0; font-size: 14px; color: var(--text-primary); }
/* Owner-approved exception to greyscale thumbnails: template display videos (and their poster) are shown in full colour. */
.x-tpl__shot.has-video img { filter: none; }
.x-tpl__video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.x-tpl__shot.is-playing .x-tpl__video { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .x-tpl__video { display: none; } }
.x-tpl__owned { align-self: center; }
.x-tpl__paid { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-m); background: #0b0b0b; border: 1px solid var(--stroke-primary); }
.x-tpl__paid[hidden] { display: none; }
.x-tpl__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.x-tpl__row .x-label { min-inline-size: 64px; }
.x-tpl__paid > .x-btn { justify-self: start; }
.x-tpl__note { margin: 0; min-block-size: 1.3em; font-size: 13px; color: var(--text-secondary); }
.x-mcp { display: grid; gap: 16px; margin-block: clamp(24px, 4vw, 48px); padding: clamp(20px, 3vw, 36px); border-radius: var(--r-xl); background: #111111; border: 1px solid rgb(255 255 255 / 0.14); }
.x-mcp .x-h2 { font-size: clamp(28px, 4vw, 44px); }
.x-pack__left { margin: 0; font-size: 15px; color: var(--text-primary); }
.x-pack { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(24px, 4vw, 56px); }
.x-pack__main { display: grid; gap: 16px; min-inline-size: 0; }
.x-pack .x-mcp__lead { white-space: pre-line; }
@media (max-width: 640px) { .x-pack { grid-template-columns: 1fr; } }
/* "Get" checklist. The green tick is an owner-approved accent (like the red live dot and yellow URGENT). */
.x-get { display: grid; gap: 10px; }
.x-get__title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--text-primary); }
.x-get__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.x-get__list li { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.x-tick { position: relative; flex: none; inline-size: 22px; block-size: 22px; border-radius: 6px; background: #34c759; }
.x-tick::after { content: ""; position: absolute; inset-inline-start: 8px; inset-block-start: 4px; inline-size: 5px; block-size: 10px; border: solid #ffffff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
[dir="rtl"] .x-tick::after { transform: rotate(45deg) scaleX(-1); }
.x-get--pack { padding: clamp(18px, 2.4vw, 26px) clamp(20px, 3vw, 32px); border-radius: var(--r-l, 20px); background: #0b0b0b; border: 1px solid var(--stroke-primary); }
.x-get--pack .x-get__title { font-size: 18px; }
.x-get--pack .x-get__list li { font-size: 18px; }
.x-pack__left[hidden] { display: none; }
/* The free template's card: a green FREE pill at the top-right corner of its display (owner-approved green). */
.x-tpl--free .x-tpl__shot { position: relative; }
.x-tpl--free { padding-block-start: max(26px, clamp(18px, 3vw, 28px)); }
.x-tpl__free { position: absolute; z-index: 3; inset-block-start: 4px; inset-inline-end: clamp(18px, 3vw, 28px); display: inline-flex; align-items: center; min-block-size: 18px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--x-free); color: var(--x-free-fg); font: 800 11px/1 var(--sans); letter-spacing: 0.08em; pointer-events: none; }
.x-tpl__freenote { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-primary); }
/* Credit packs in the pack panel: credits + USD each; buying is disabled until a checkout exists. */
.x-cpacks { display: grid; gap: 10px; padding-block-start: 16px; border-block-start: 1px solid var(--stroke-primary); }
.x-cpacks__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.x-cpacks__title { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.x-cpacks__rate { font-size: 13px; color: var(--text-secondary); }
.x-cpacks__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.x-tpl .x-cpacks__list { grid-template-columns: minmax(0, 1fr); }
.x-cpack { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 12px 14px; border-radius: var(--r-m); background: #0b0b0b; border: 1px solid var(--stroke-primary); }
.x-cpack__credits { grid-column: 1 / -1; font-size: 15px; font-weight: 700; color: var(--text-primary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.x-cpack__usd { grid-row: 2; font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.x-cpack__buy { grid-row: 2; grid-column: 2; }
.x-cpack__buy:disabled { opacity: 0.55; cursor: not-allowed; }
.x-cpacks__soon { margin: 0; font-size: 13px; color: var(--text-secondary); }
@media (max-width: 640px) { .x-cpacks__list { grid-template-columns: 1fr; } }
.x-pack__badge { justify-self: start; margin: 0; cursor: default; user-select: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 16px; border-radius: var(--r-pill); background: #ffffff; color: #0b0b0b; font: 800 15px/1.1 var(--sans); letter-spacing: 0.01em; text-decoration: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 6px 24px rgba(255, 255, 255, 0.12); }
.x-pack__badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #0b0b0b; flex: none; }
.x-agentcard { position: relative; padding-inline-end: max(var(--pad, 24px), 72px); }
.x-agentcard:not([hidden]) { animation: x-agentcard-in 240ms ease both; }
@keyframes x-agentcard-in { from { opacity: 0; } to { opacity: 1; } }
.x-agentcard__close { position: absolute; top: 18px; inset-inline-end: 18px; display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: #ffffff; color: #0b0b0b; cursor: pointer; }
.x-agentcard__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.x-agentcard__close:hover { background: #e9e9e9; }
.x-agentcard__close:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.x-agentcard #mcp-title:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .x-agentcard:not([hidden]) { animation: none; } }
/* How to connect your agent: step-by-step guide */
.x-guide { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 22px; }
.x-guide__step { display: grid; gap: 10px; padding-block-start: 18px; border-block-start: 1px solid var(--stroke-primary); min-inline-size: 0; }
.x-guide__h { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--x-display); font-weight: 800; font-size: clamp(19px, 2vw, 23px); letter-spacing: -0.02em; color: var(--text-primary); }
.x-guide__n { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #ffffff; color: #0b0b0b; font: 800 15px/1 var(--sans); }
.x-guide__sub { margin-block-start: 14px; padding-block-start: 18px; border-block-start: 1px solid var(--stroke-primary); }
.x-guide__p { margin: 0; max-inline-size: 72ch; color: var(--text-secondary); line-height: 1.6; overflow-wrap: anywhere; }
.x-guide__muted { font-size: var(--size-small); }
.x-guide__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.x-guide__pane { display: grid; gap: 10px; min-inline-size: 0; }
.x-guide__panetop { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.x-guide__panetop .x-guide__p { flex: 1 1 320px; }
.x-guide__pane .x-snippet { white-space: pre-wrap; overflow-wrap: anywhere; }
.x-guide__ex { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--text-primary); }
.x-guide__tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.x-guide__tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 13em); gap: 6px 16px; align-items: baseline; padding: 12px 14px; border-radius: var(--r-m); border: 1px solid var(--stroke-primary); }
.x-guide__tool-name { font: 500 13px/1.4 var(--x-mono); color: var(--text-primary); overflow-wrap: anywhere; direction: ltr; }
.x-guide__tool-what { color: var(--text-secondary); font-size: var(--size-small); line-height: 1.5; }
.x-guide__tool-cost { font: 600 13px/1.4 var(--sans); color: var(--text-primary); text-align: end; }
@media (max-width: 720px) { .x-guide__tool { grid-template-columns: 1fr; } .x-guide__tool-cost { text-align: start; } }
.x-guide__notes { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; color: var(--text-secondary); line-height: 1.6; }
.x-pack__side { display: grid; gap: 14px; justify-items: stretch; }
.x-pack__count { margin: 0; font-family: var(--x-display); font-weight: 800; font-size: clamp(34px, 3.6vw, 52px); line-height: 1; letter-spacing: -0.02em; color: var(--text-primary); font-variant-numeric: tabular-nums; text-align: center; }
.x-pack__count[hidden] { display: none; }
.x-mcp__lead, .x-mcp__price { margin: 0; color: var(--text-secondary); max-inline-size: 70ch; line-height: 1.5; }
.x-mcp__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.x-mcp__url { font: 500 14px/1.4 var(--x-mono); padding: 8px 12px; border-radius: var(--r-s); background: #0b0b0b; border: 1px solid var(--stroke-primary); overflow-wrap: anywhere; direction: ltr; }
.x-mcp__cfg { margin: 0; max-inline-size: 100%; overflow-x: auto; direction: ltr; text-align: start; }
.x-mcp > .x-btn { justify-self: start; }
/* Admin page (standalone /admin): its own bar, no public navigation */
.x-adm-bar__tag { margin-inline-start: 10px; padding: 3px 10px; border: 1px solid var(--stroke-primary); border-radius: var(--r-pill); font: var(--type-tag); color: var(--text-secondary); }
.x-adm-bar .x-brand__home { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
/* Admin: Telegram two-factor screen */
.x-adm-2fa__body { display: grid; gap: 14px; justify-items: center; margin-top: 8px; }
.x-adm-2fa__steps { display: grid; gap: 12px; margin: 0; padding-inline-start: 20px; text-align: start; }
.x-adm-2fa__steps li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.x-adm-2fa__steps code { font: 500 14px/1.4 var(--x-mono); overflow-wrap: anywhere; }
.x-adm-2fa__form { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 10px; }
.x-adm-2fa__form .x-field__label { flex-basis: 100%; text-align: center; }
.x-adm-2fa__code { width: 9.5em; text-align: center; font: 600 22px/1.2 var(--x-mono); letter-spacing: .3em; }
/* Dashboard: My templates (purchase history) */
.x-mytpl__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.x-mytpl__item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 14px; border-radius: var(--r-m); border: 1px solid var(--stroke-primary); }
.x-mytpl__info { min-width: 0; flex: 1 1 220px; }
.x-mytpl__name { margin: 0; font-weight: var(--weight-medium); color: var(--text-primary); overflow-wrap: anywhere; }
.x-mytpl__meta { margin: 0; font: var(--type-caption); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.x-mytpl__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.x-mytpl__more { margin-top: 10px; }
.x-mytpl__h3 { margin: 20px 0 8px; font: var(--type-tag); text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); }
.x-mytpl > .x-btns { margin-top: 14px; }
.x-keyscard__url { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.x-keyscard__url code, .x-keyscard__key { font: 500 14px/1.4 var(--x-mono); overflow-wrap: anywhere; direction: ltr; }
.x-keyscard__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-block: 12px; }
.x-keyscard__form .x-field__label { flex-basis: 100%; }
.x-keyscard__form .x-input { flex: 1 1 220px; }
.x-keyscard__fresh { display: grid; gap: 10px; justify-items: start; padding: 14px 16px; border-radius: var(--r-m); background: #ffffff; color: #0b0b0b; }
.x-keyscard__fresh[hidden] { display: none; }
.x-keyscard__fresh .x-btn { background: #0b0b0b; color: #ffffff; }
.x-keyscard__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.x-keyscard__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); border: 1px solid var(--stroke-primary); }
.x-keyscard__item div { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.x-keyscard__item code { font: 500 13px/1.3 var(--x-mono); color: var(--text-secondary); }

/* Live Offers: Telegram bot banner. Telegram blue is an owner-approved exception (only .x-tgcta, exactly #2aabee and #229ed9). */
.x-tgcta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 24px; margin-block: 0 clamp(28px, 4vw, 44px); padding: clamp(16px, 2.4vw, 24px) clamp(18px, 3vw, 32px); border-radius: var(--r-xl); background: linear-gradient(135deg, rgb(42 171 238 / 0.16), rgb(34 158 217 / 0.06)); border: 1px solid rgb(42 171 238 / 0.45); color: var(--text-primary); text-decoration: none; transition: border-color var(--dur-quick) ease, background-color var(--dur-quick) ease; }
.x-tgcta:hover { border-color: #2aabee; }
.x-tgcta:focus-visible { outline: 2px solid #2aabee; outline-offset: 3px; }
.x-tgcta__art svg { display: block; width: clamp(64px, 7vw, 88px); height: auto; }
.x-tgcta__text { display: grid; gap: 4px; min-inline-size: 0; }
.x-tgcta__title { font-family: var(--x-display); font-weight: 800; font-size: clamp(22px, 2.9vw, 36px); line-height: 1.02; letter-spacing: -0.02em; text-transform: uppercase; overflow-wrap: anywhere; }
.x-tgcta__sub { font-weight: 700; font-size: clamp(16px, 1.7vw, 20px); color: #2aabee; }
.x-tgcta__btn { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 12px 20px; border-radius: var(--r-pill); background: #229ed9; color: #ffffff; font: var(--weight-bold) var(--size-body)/1.1 var(--sans); white-space: nowrap; }
.x-tgcta__btn svg { width: 20px; height: 20px; flex: none; }
.x-tgcta:hover .x-tgcta__btn { background: #2aabee; }
@media (max-width: 720px) { .x-tgcta { grid-template-columns: auto minmax(0, 1fr); } .x-tgcta__btn { grid-column: 1 / -1; justify-self: start; } }

/* @component tplwall: Website Templates hero background (public/js/lib/tplwall.js). A turning wall of our own template
   previews behind the header and the hero card (owner-approved motion and full-colour exception, AGENTS.md). The
   logo, the language and account buttons and the hero card keep solid black backgrounds above it. */
.x-tplwall { position: absolute; top: 0; left: 0; width: 100%; z-index: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.x-tplwall.is-on { opacity: 1; }
.x-tplwall canvas { display: block; }
.x-tplwall__fade { position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(to bottom, rgb(11 11 11 / 0), #0b0b0b); }
.x-tplwall--flat { background-size: cover; background-position: center; }
.has-tplwall .page { position: relative; z-index: 1; }
.has-tplwall .x-brand__home, .has-tplwall .x-brand__tools { background: #0b0b0b; box-shadow: 0 0 0 12px #0b0b0b; border-radius: 16px; }
.has-tplwall .x-pack { position: relative; background: #111111; isolation: isolate; }
@media (prefers-reduced-motion: reduce) { .x-tplwall { transition: none; } }
/* Dashboard "Top up credits" button and modal (credit packs) */
.x-paybar { position: fixed; z-index: 60; inset-inline: 0; inset-block-end: max(16px, env(safe-area-inset-bottom)); margin-inline: auto; width: fit-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: #1a1a1a; color: #f2f2f2; border: 1px solid #333; font: 600 14px/1.4 var(--sans); }
.x-paybar--ok { border-color: #34c759; }
.x-dash__topup { margin-block-start: 6px; justify-self: start; }
.x-topup__body { display: grid; gap: 12px; padding: 22px 24px 24px; }
.x-topup__list { grid-template-columns: minmax(0, 1fr); }

/* Factory status chip (admin): is the cloud factory working? Greys plus the red live dot only; calm, and still under reduced motion. */
.x-fchip { display: inline-flex; align-items: center; gap: 8px; max-inline-size: 100%; margin-inline-end: 10px; padding: 4px 12px; border: 1px solid var(--stroke-primary); border-radius: var(--r-pill); font: var(--type-tag); color: var(--text-secondary); }
.x-fchip__dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--text-secondary); }
.x-fchip.is-working { color: var(--text-primary); border-color: var(--text-secondary); }
.x-fchip.is-working .x-fchip__dot { background: var(--x-live); animation: x-pulse 2.4s ease-in-out infinite; }
.x-fchip.is-failed .x-fchip__dot { background: transparent; border: 1px solid var(--text-secondary); }
.x-fchip__text { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-fchip__link { flex: none; color: inherit; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .x-fchip.is-working .x-fchip__dot { animation: none; } }
