/* =========================================================================
   Streamfront design system
   One family (Readex Pro, Latin + Arabic), logical properties throughout so
   the same stylesheet serves LTR (en/fr/de) and RTL (ar).
   ========================================================================= */

/* ---- Fonts (self-hosted: no third-party requests, GDPR-friendly) ------- */
@font-face {
  font-family: "Readex";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url(../fonts/readex-pro-latin-full-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Readex";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url(../fonts/readex-pro-latin-ext-full-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Readex";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url(../fonts/readex-pro-arabic-full-normal.woff2) format("woff2-variations");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* colour — light theme */
  --bg: #f6f7fb;           /* page */
  --surface: #ffffff;      /* cards, panels */
  --surface-2: #eef0f8;    /* hover / selected surface */
  --band: #eef1fa;         /* alternate section band */
  --rule: #dde1ee;         /* borders, dividers */
  --text: #121834;         /* primary text (16:1 on --bg) */
  --mute: #4c5576;         /* secondary text (7.2:1 on --bg) */
  --signal: #5a48e8;       /* primary action (white text 5.7:1) */
  --signal-hover: #4636d0;
  --signal-ink: #ffffff;   /* text on --signal */
  --signal-soft: rgba(90, 72, 232, .09);
  --sky: #1d63c8;          /* focus ring, inline links */
  --ok: #10805b;
  --warn: #8a5300;
  --warn-soft: #fff1d6;
  --danger: #c42b45;

  /* type: modular scale 1.25, base 17px */
  --font: "Readex", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --fs-0: .875rem;
  --fs-1: 1.0625rem;
  --fs-2: 1.3rem;
  --fs-3: 1.65rem;
  --fs-4: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --fs-5: clamp(2.1rem, 1.2rem + 4vw, 4.5rem);
  --lh-body: 1.6;
  --lh-tight: 1.08;
  --wide: "HEXP" 30;       /* Readex hyper-expansion axis: display only */

  /* space & shape */
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --measure: 66ch;
  --s-1: .5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2.5rem; --s-5: 4rem; --s-6: clamp(4rem, 7vw, 6.5rem);
  --r-screen: 28px;        /* the "TV" frame */
  --r-card: 14px;
  --r-field: 10px;
  --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Arabic reads better slightly larger with more line height */
:lang(ar) { --fs-1: 1.125rem; --lh-body: 1.8; --lh-tight: 1.3; --wide: "HEXP" 10; }

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-1)/var(--lh-body) var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); text-underline-offset: .2em; }
a:hover { color: var(--text); }
h1, h2, h3, h4 { line-height: var(--lh-tight); margin: 0 0 var(--s-2); font-weight: 600; text-wrap: balance; overflow-wrap: break-word; hyphens: manual; }
h1 { font-size: var(--fs-5); font-variation-settings: var(--wide); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: var(--fs-4); font-variation-settings: var(--wide); letter-spacing: -.025em; }
h3 { font-size: var(--fs-2); }
:lang(ar) h1, :lang(ar) h2 { letter-spacing: 0; }
p { margin: 0 0 var(--s-2); max-width: var(--measure); }
@media (max-width: 480px) { p { hyphens: auto; } }
ul, ol { padding-inline-start: 1.2em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s-4) 0; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

.screen-reader-text, .sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link:focus {
  position: fixed; inset-block-start: 12px; inset-inline-start: 12px; z-index: 100;
  width: auto; height: auto; clip: auto; margin: 0; padding: .7em 1em;
  background: var(--text); color: var(--bg); border-radius: var(--r-field);
}

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: var(--s-6); }
.section--rule { border-block-start: 1px solid var(--rule); }
.section--band { background: var(--band); border-block: 1px solid var(--rule); }
.section--band + .section--rule, .section--band + .section { border-block-start: 0; }
.section__head { margin-block-end: var(--s-4); }
.section__head p { color: var(--mute); font-size: var(--fs-2); line-height: 1.45; }
.lede { color: var(--mute); font-size: var(--fs-2); line-height: 1.45; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  --_bg: var(--signal); --_fg: var(--signal-ink); --_bd: var(--signal);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7em 1.4em;
  border: 1.5px solid var(--_bd); border-radius: var(--r-pill);
  background: var(--_bg); color: var(--_fg);
  font: 600 var(--fs-1)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { --_bg: var(--signal-hover); --_bd: var(--signal-hover); color: var(--_fg); }
.btn--ghost { --_bg: transparent; --_fg: var(--text); --_bd: #c5cbe0; }
.btn--ghost:hover { --_bg: var(--surface); --_bd: var(--text); --_fg: var(--text); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---- Badges ------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .25em .7em; border-radius: var(--r-pill);
  font-size: var(--fs-0); font-weight: 500; line-height: 1.4;
  background: var(--surface-2); color: var(--mute); border: 1px solid var(--rule);
}
.badge--signal { background: var(--signal-soft); color: #3d2fc0; border-color: transparent; }
.badge--example { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge--ok { background: #e3f6ee; color: var(--ok); border-color: transparent; }

/* ---- Forms -------------------------------------------------------------- */
.field { display: grid; gap: .4em; margin-block-end: var(--s-2); }
.field label, .label { font-size: var(--fs-0); font-weight: 500; color: var(--mute); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"],
input[type="number"], select, textarea, .input {
  width: 100%; min-height: 48px; padding: .7em .9em;
  background: var(--surface); color: var(--text);
  border: 1.5px solid #c5cbe0; border-radius: var(--r-field);
  font: inherit; font-size: max(16px, var(--fs-1)); /* 16px+ prevents iOS zoom */
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 3px rgba(29, 99, 200, .2); }
input[aria-invalid="true"] { border-color: var(--danger); }
.check { display: flex; gap: .7em; align-items: flex-start; font-size: var(--fs-0); color: var(--mute); }
.check input {
  appearance: none; inline-size: 22px; block-size: 22px; margin: .05em 0 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--mute); border-radius: 6px; background: var(--bg); display: grid; place-content: center;
}
.check input::after { content: ""; inline-size: 11px; block-size: 6px; border-inline-start: 2px solid var(--signal-ink); border-block-end: 2px solid var(--signal-ink); transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.check input:checked { background: var(--signal); border-color: var(--signal); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.hp-field { position: absolute; inset-inline-start: -9999px; }
.notice { padding: var(--s-2); border-radius: var(--r-field); border: 1px solid var(--rule); background: var(--surface); }
.notice--ok { border-color: var(--ok); }
.notice--error { border-color: var(--danger); }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: rgba(246, 247, 251, .9);
  backdrop-filter: saturate(140%) blur(12px);
  border-block-end: 1px solid var(--rule);
}
.site-header__bar { display: flex; align-items: center; gap: var(--s-3); min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6em; color: var(--text); text-decoration: none; flex: none; }
.brand__mark { inline-size: 30px; block-size: 30px; }
.brand__name { font-weight: 600; font-size: 1.15rem; font-variation-settings: "HEXP" 80; letter-spacing: -.01em; }
:lang(ar) .brand__name { font-variation-settings: "HEXP" 40; }
.brand img { max-height: 40px; width: auto; }

.nav-primary { margin-inline-start: auto; }
.nav-primary ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-primary a {
  display: block; padding: .55em .85em; border-radius: var(--r-pill);
  color: var(--mute); text-decoration: none; font-weight: 500;
}
.nav-primary a:hover, .nav-primary .current-menu-item > a, .nav-primary a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.header-tools { display: flex; align-items: center; gap: .35rem; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  inline-size: 44px; block-size: 44px; border-radius: var(--r-pill);
  color: var(--text); background: transparent; border: 0; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { inline-size: 22px; block-size: 22px; }
.cart-count {
  position: absolute; inset-block-start: 4px; inset-inline-end: 2px;
  min-inline-size: 18px; block-size: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--signal); color: var(--signal-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }

/* Language switcher: native <details>, works without JS */
.lang { position: relative; }
.lang > summary {
  list-style: none; display: inline-flex; align-items: center; gap: .4em;
  min-height: 44px; padding: 0 .8em; border-radius: var(--r-pill);
  border: 1px solid var(--rule); color: var(--text); cursor: pointer; font-weight: 500; font-size: var(--fs-0);
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover { background: var(--surface-2); }
.lang > summary svg { inline-size: 16px; block-size: 16px; }
.lang__menu {
  position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0; min-inline-size: 190px;
  margin: 0; padding: .4rem; list-style: none;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-card);
  box-shadow: 0 18px 40px rgba(18, 24, 52, .14);
}
.lang__menu a { display: flex; justify-content: space-between; gap: 1em; padding: .6em .8em; border-radius: var(--r-field); color: var(--text); text-decoration: none; }
.lang__menu a:hover { background: var(--surface-2); }
.lang__menu a[aria-current="true"] { color: var(--signal); }
.lang__menu .lang__code { color: var(--mute); font-size: var(--fs-0); }

.nav-toggle { display: none; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; }
  .nav-primary {
    position: fixed; inset: 72px 0 auto 0; margin: 0;
    background: var(--bg); border-block-end: 1px solid var(--rule);
    padding: var(--s-2) var(--gutter) var(--s-3);
    display: none;
  }
  .nav-primary.is-open { display: block; }
  .nav-primary ul { flex-direction: column; }
  .nav-primary a { padding: .9em 1em; font-size: var(--fs-2); border-radius: var(--r-field); }
  .header-tools { margin-inline-start: auto; }
}
@media (max-width: 420px) {
  .lang__label { display: none; }
  .site-header__bar { gap: var(--s-1); }
}

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6rem); overflow: clip; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero h1 { margin-block-end: var(--s-3); max-width: 13ch; }
.hero .lede { margin-block-end: var(--s-4); max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.hero__facts { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); margin: var(--s-4) 0 0; padding: 0; list-style: none; color: var(--mute); font-size: var(--fs-0); }
.hero__facts li { display: inline-flex; align-items: center; gap: .5em; }
.hero__facts svg { inline-size: 18px; block-size: 18px; color: var(--ok); flex: none; }
@media (max-width: 880px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }

/* The screen: a TV frame holding a programme guide. It bleeds off the
   inline-end edge on wide screens (left edge in Arabic). */
.screen { position: relative; inline-size: 112%; }
.screen::before {
  content: ""; position: absolute; inset: -18% -10% -25%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(90, 72, 232, .16), transparent 70%);
}
@media (max-width: 880px) { .screen { inline-size: 100%; } }
.screen__frame {
  position: relative; aspect-ratio: 16 / 10;
  border-radius: var(--r-screen);
  background: #0c1430;
  border: 1px solid #2a3768;
  box-shadow: 0 0 0 10px #10162e, 0 0 0 11px #2a3352, 0 50px 90px -30px rgba(18, 24, 52, .55);
  overflow: hidden; padding: 5% 4.5% 4.5%;
  display: grid; grid-template-rows: auto 1fr; gap: 4.5%;
}
.screen__stand { inline-size: 26%; block-size: 14px; margin: 20px auto 0; border-radius: 0 0 10px 10px; background: #10162e; }
.guide__times { display: grid; grid-template-columns: 16% repeat(4, 1fr); margin-block-end: 2%; color: var(--mute); font-size: clamp(9px, 1vw, 12px); font-variant-numeric: tabular-nums; padding-inline-start: 2%; }
.guide__times span:first-child { visibility: hidden; }
.guide__rows { display: grid; grid-template-rows: repeat(5, 1fr); gap: 4%; }
.guide__row { display: grid; grid-template-columns: 16% 1fr; gap: 2.5%; align-items: stretch; }
.guide__chan { border-radius: 9px; background: #18224a; display: grid; place-items: center; }
.guide__chan i { inline-size: 42%; aspect-ratio: 1; border-radius: 6px; border: 2px solid rgba(238, 241, 250, .28); }
.guide__slots { display: grid; gap: 2%; }
.guide__slot {
  position: relative; overflow: hidden; border-radius: 9px; background: #151f45;
  display: flex; flex-direction: column; justify-content: center; gap: 12%; padding-inline: 7%;
}
.guide__slot i { display: block; block-size: clamp(3px, .45vw, 6px); inline-size: 72%; border-radius: 3px; background: rgba(238, 241, 250, .2); }
.guide__slot i + i { inline-size: 42%; background: rgba(238, 241, 250, .1); }
.guide__slot b { position: absolute; inset-block-end: 0; inset-inline-start: 0; block-size: 3px; background: var(--signal); }
.guide__slot--live { background: #231f5c; box-shadow: inset 0 0 0 1px rgba(138, 124, 255, .7); }
.guide__slot--live i { background: rgba(238, 241, 250, .75); }
.guide__slot--live i + i { background: rgba(238, 241, 250, .35); }
.guide__now {
  position: absolute; inset-block: 14% 4.5%; inset-inline-start: 48%;
  inline-size: 2px; background: var(--signal);
  box-shadow: 0 0 18px 2px rgba(138, 124, 255, .55);
}
.guide__nowtag {
  position: absolute; inset-block-start: 0; inset-inline-start: 50%; transform: translate(-50%, -50%);
  padding: .15em .6em; border-radius: var(--r-pill); background: var(--signal); color: var(--signal-ink);
  font-size: clamp(8px, .85vw, 11px); font-weight: 600; white-space: nowrap;
}
[dir="rtl"] .guide__nowtag { transform: translate(50%, -50%); }
@media (max-width: 640px) {
  .guide__nowtag { font-size: 0; padding: 0; inline-size: 9px; block-size: 9px; }
}
@media (prefers-reduced-motion: no-preference) {
  .guide__now { animation: sweep 2.4s .3s var(--ease) both; }
  .guide__slot--live { animation: tune .5s 2.3s var(--ease) both; }
  .guide__slot b { animation: grow 2.4s .3s var(--ease) both; }
  @keyframes sweep { from { inset-inline-start: 22%; opacity: 0; } 12% { opacity: 1; } to { inset-inline-start: 48%; } }
  @keyframes tune { from { background: #151f45; box-shadow: none; } }
  @keyframes grow { from { inline-size: 0; } }
}

/* ---- Prose blocks / services ------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); }
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); } }
.def-list { display: grid; gap: 0; margin: 0; }
.def-list > div { display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--s-2); padding-block: var(--s-3); border-block-end: 1px solid var(--rule); }
.def-list > div:first-child { padding-block-start: 0; }
.def-list svg { inline-size: 28px; block-size: 28px; color: var(--signal); }
.def-list dt { font-weight: 600; font-size: var(--fs-2); margin-block-end: .25em; }
.def-list dd { margin: 0; color: var(--mute); }

/* ---- Plans -------------------------------------------------------------- */
.duration {
  display: inline-flex; padding: 4px; gap: 2px; margin-block-end: var(--s-4);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-pill);
}
.duration button {
  min-height: 44px; padding: 0 1.15em; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--mute); font: 500 var(--fs-0)/1 var(--font); cursor: pointer;
}
.duration button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-3); align-items: stretch; }
/* Subgrid keeps names, summaries, prices and feature lists on shared rows. */
.plan {
  display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: var(--s-2); align-content: start;
  padding: var(--s-4) var(--s-3) var(--s-3);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-card);
  box-shadow: 0 1px 2px rgba(18, 24, 52, .04);
}
.plan--featured { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal), 0 24px 48px -24px rgba(90, 72, 232, .35); }
.plan__top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-1); flex-wrap: wrap; }
.plan__name { font-size: var(--fs-3); font-variation-settings: var(--wide); margin: 0; }
.plan__summary { color: var(--mute); margin: 0; }
.plan__price { display: flex; align-items: baseline; gap: .4em; margin-block: var(--s-1) 0; }
.plan__amount { font-size: var(--fs-4); font-weight: 600; font-variant-numeric: tabular-nums; font-variation-settings: var(--wide); }
.plan__period { color: var(--mute); font-size: var(--fs-0); }
.plan__permonth { color: var(--mute); font-size: var(--fs-0); margin: 0; min-block-size: 1.6em; }
.plan__features { list-style: none; padding: 0; margin: var(--s-1) 0 var(--s-2); display: grid; gap: .65em; }
.plan__features li { display: grid; grid-template-columns: 20px 1fr; gap: .7em; }
.plan__features svg { inline-size: 18px; block-size: 18px; margin-block-start: .25em; color: var(--ok); }
.plan__pricing { display: grid; gap: var(--s-1); align-content: start; }
.plan__pricing[hidden] { display: none; }
.plan__pricing .plan__permonth { margin-block-end: var(--s-1); }
.plan__example {
  margin: 0; min-height: 48px; display: grid; place-items: center; text-align: center;
  border: 1.5px dashed #e0b56a; border-radius: var(--r-pill);
  color: var(--warn); font-size: var(--fs-0); font-weight: 500; max-width: none;
}
.plans-note { margin-block-start: var(--s-3); color: var(--mute); font-size: var(--fs-0); max-width: none; }
.compare-block { margin-block-start: var(--s-5); }
.compare-title { font-size: var(--fs-2); margin-block-end: var(--s-2); }

/* ---- Comparison table --------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface); }
.compare { inline-size: 100%; min-inline-size: 620px; border-collapse: collapse; }
.compare caption { text-align: start; padding: var(--s-2) var(--s-3); color: var(--mute); font-size: var(--fs-0); caption-side: bottom; }
.compare th, .compare td { padding: 1em var(--s-3); text-align: start; border-block-end: 1px solid var(--rule); vertical-align: top; }
.compare thead th { background: var(--bg); font-weight: 600; font-size: var(--fs-1); }
.compare tbody th { font-weight: 400; color: var(--mute); }
.compare tbody tr:last-child > * { border-block-end: 0; }
.compare .is-featured { background: rgba(90, 72, 232, .05); }
.compare thead .is-featured { background: #ecebfe; color: #3d2fc0; box-shadow: inset 0 3px 0 var(--signal); }
.compare tbody .is-featured { color: var(--text); }
.compare .yes { color: var(--ok); }
.compare .no { color: var(--mute); }

/* ---- Devices ------------------------------------------------------------ */
.devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; }
.device { background: var(--surface); padding: var(--s-3); display: grid; gap: .6rem; align-content: start; }
.device svg { inline-size: 34px; block-size: 34px; color: var(--text); }
.device strong { font-weight: 600; }
.device span { color: var(--mute); font-size: var(--fs-0); }
.requirements { margin-block-start: var(--s-3); display: flex; gap: var(--s-2); align-items: flex-start; color: var(--mute); }
.requirements svg { flex: none; inline-size: 22px; block-size: 22px; color: var(--sky); margin-block-start: .2em; }

/* ---- Clarity: points + sample receipt --------------------------------- */
.clarity { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
@media (max-width: 880px) { .clarity { grid-template-columns: minmax(0, 1fr); } }
.points { margin: 0; display: grid; }
.points > div { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--s-1) var(--s-3); padding-block: var(--s-3); border-block-start: 1px solid var(--rule); }
.points > div:last-child { border-block-end: 1px solid var(--rule); }
.points dt { font-weight: 600; }
.points dd { margin: 0; color: var(--mute); }
@media (max-width: 640px) { .points > div { grid-template-columns: minmax(0, 1fr); } }

.receipt { margin: 0; position: sticky; inset-block-start: 110px; }
.receipt__paper {
  --edge: 10px;
  background: #ffffff; color: #141a33;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2rem) calc(clamp(1.5rem, 3vw, 2.25rem) + var(--edge));
  border-radius: 6px 6px 0 0;
  /* torn, perforated bottom edge */
  -webkit-mask: radial-gradient(circle at 50% 100%, transparent calc(var(--edge) - .5px), #000 var(--edge)) 0 100% / calc(var(--edge) * 2.4) var(--edge) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--edge) + 1px) no-repeat;
          mask: radial-gradient(circle at 50% 100%, transparent calc(var(--edge) - .5px), #000 var(--edge)) 0 100% / calc(var(--edge) * 2.4) var(--edge) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--edge) + 1px) no-repeat;
  transform: rotate(-1.2deg);
  box-shadow: 0 1px 0 #e3e6f0, 0 30px 60px -24px rgba(18, 24, 52, .28);
  border: 1px solid #e3e6f0; border-block-end: 0;
}
[dir="rtl"] .receipt__paper { transform: rotate(1.2deg); }
.receipt__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-1); padding-block-end: var(--s-2); border-block-end: 1.5px dashed #b9c0d8; }
.receipt__head .brand__name { font-size: 1rem; color: #141a33; }
.receipt .badge--example { background: var(--warn-soft); color: var(--warn); }
.receipt__lines { margin: 0; padding-block: var(--s-2); display: grid; gap: .7rem; font-size: var(--fs-0); }
.receipt__lines div { display: flex; justify-content: space-between; gap: var(--s-2); }
.receipt__lines dt { color: #59617f; }
.receipt__lines dd { margin: 0; font-weight: 500; text-align: end; }
.receipt__total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); padding-block-start: var(--s-2); border-block-start: 1.5px dashed #b9c0d8; font-weight: 600; }
.receipt__total strong { font-size: var(--fs-3); font-variation-settings: var(--wide); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.receipt__note { margin: var(--s-1) 0 0; font-size: var(--fs-0); color: #59617f; max-width: none; }
@media (max-width: 880px) { .receipt { position: static; max-width: 440px; } }

/* ---- Steps (a real sequence → numbered) -------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-block-start: var(--s-4); border-block-start: 2px solid var(--rule); }
.steps li::before {
  content: counter(step); position: absolute; inset-block-start: -1.15em; inset-inline-start: 0;
  inline-size: 2.2em; block-size: 2.2em; display: grid; place-items: center;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--signal); color: var(--text); font-weight: 600;
}
.steps li:first-child { border-block-start-color: var(--signal); }
.steps h3 { margin-block-end: .35em; }
.steps p { color: var(--mute); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: var(--s-5); } }

/* ---- FAQ ---------------------------------------------------------------- */
.faq { border-block-start: 1px solid var(--rule); }
.faq details { border-block-end: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s-2); align-items: center;
  padding-block: var(--s-3); font-size: var(--fs-2); font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; inline-size: 12px; block-size: 12px;
  border-inline-end: 2px solid var(--mute); border-block-end: 2px solid var(--mute);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq details > div { padding-block-end: var(--s-3); color: var(--mute); }

/* ---- Support + newsletter ---------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-card); padding: clamp(1.5rem, 4vw, 3rem); }
.support { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.support { align-items: start; }
.support__channels { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); font-size: var(--fs-0); color: var(--mute); }
.support__channels li { display: inline-flex; align-items: center; gap: .5em; }
.support__channels svg, .support__topics svg { inline-size: 20px; block-size: 20px; color: var(--signal); flex: none; }
.support__topics { background: var(--bg); border-radius: var(--r-card); padding: var(--s-3); }
.support__topics h3 { font-size: var(--fs-1); margin-block-end: var(--s-2); }
.support__topics ul { list-style: none; margin: 0 0 var(--s-2); padding: 0; display: grid; gap: .8rem; }
.support__topics li { display: flex; gap: .75em; align-items: center; }
.support__topics p { margin: 0; color: var(--mute); font-size: var(--fs-0); }
@media (max-width: 760px) { .support { grid-template-columns: minmax(0, 1fr); } }

.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-4); align-items: start; }
.newsletter__row { display: flex; gap: var(--s-1); }
.newsletter__row input { flex: 1; }
@media (max-width: 760px) { .newsletter { grid-template-columns: 1fr; } .newsletter__row { flex-direction: column; } }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  --bg: #0f1834; --surface: #16214a; --text: #eef1fa; --mute: #aab3d2; --rule: #26315c; --signal: #9d92ff;
  background: var(--bg); color: var(--mute);
  border-block-start: 1px solid var(--rule); padding-block: var(--s-5) var(--s-3); color: var(--mute); font-size: var(--fs-0); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s-4); }
.footer__grid h2 { font-size: var(--fs-1); font-variation-settings: normal; color: var(--text); margin-block-end: var(--s-2); letter-spacing: 0; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6em; }
.footer__grid a { color: var(--mute); text-decoration: none; }
.footer__grid a:hover { color: var(--text); text-decoration: underline; }
.footer__about p { max-width: 36ch; }
.footer__langs { display: flex; flex-wrap: wrap; gap: .4rem; margin-block-start: var(--s-2); }
.footer__langs a { padding: .35em .8em; border: 1px solid var(--rule); border-radius: var(--r-pill); color: var(--text); text-decoration: none; }
.footer__langs a[aria-current="true"] { border-color: var(--signal); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); margin-block-start: var(--s-5); padding-block-start: var(--s-3); border-block-start: 1px solid var(--rule); }
.footer__base p { margin: 0; }
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__about { grid-column: 1 / -1; } }

/* ---- Generic pages ------------------------------------------------------ */
.page-hero { padding-block: var(--s-5) var(--s-4); border-block-end: 1px solid var(--rule); }
.page-hero h1 { font-size: var(--fs-4); margin: 0; }
.breadcrumbs { font-size: var(--fs-0); color: var(--mute); margin-block-end: var(--s-2); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4em; }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: .4em; color: var(--rule); }
.breadcrumbs a { color: var(--mute); }
.prose { padding-block: var(--s-5); }
.prose > * { max-width: var(--measure); }
.prose h2 { font-size: var(--fs-3); font-variation-settings: normal; margin-block-start: var(--s-4); }
.prose h3 { margin-block-start: var(--s-3); }
.prose li { margin-block-end: .4em; }
.prose table { border-collapse: collapse; inline-size: 100%; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .6em .8em; text-align: start; }
.prose .placeholder, .prose mark { background: rgba(255, 197, 107, .15); color: var(--warn); padding: 0 .2em; border-radius: 3px; }
.not-found { padding-block: var(--s-6); }
.not-found .big { font-size: clamp(5rem, 20vw, 12rem); font-weight: 600; line-height: 1; font-variation-settings: "HEXP" 80; color: var(--surface-2); margin: 0 0 var(--s-2); }

/* Posts list */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-4) var(--s-3); padding-block: var(--s-5); }
.post-card a { text-decoration: none; color: inherit; }
.post-card img { border-radius: var(--r-card); aspect-ratio: 16 / 9; object-fit: cover; margin-block-end: var(--s-2); }
.post-card h2 { font-size: var(--fs-2); font-variation-settings: normal; letter-spacing: 0; }
.post-card time, .entry-meta { color: var(--mute); font-size: var(--fs-0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
