/* Layout: Apple-store style configurator. Options on the left, the code on a soft grey "product" card on the right. */
:root {
  --bg: #f5f5f7;
  --paper: #ffffff;
  --well: #f5f5f7;
  --fill: #e8e8ed;
  --fill-hover: #dcdce1;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 113, 227, 0.16);
  --link: #0066cc;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  --flag-ring: rgba(0, 0, 0, 0.12);
  --hl-ink: #00509e;
  --sc-wall-warm: #f4f1ec; --sc-table: #e4dccf; --sc-wall-cool: #e9ebee; --sc-desk: #dfe3e8;
  --ob-tent: #fbf8f2; --ob-tent-ink: #2b2520; --ob-tent-accent: #8a6d4f;
  --ob-sign: #1d1f22; --ob-sign-edge: transparent;
  --ob-card: #ffffff; --ob-card-ink: #1d1d1f; --ob-card-muted: #6e6e73;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-rim: inset 0 0 0 0.5px rgba(255, 255, 255, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.9), inset 0 -1px 1px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
  --glass-lift: 0 4px 14px rgba(0, 0, 0, 0.06);
  --warn-bg: #fff4d6;
  --warn-ink: #6b4a00;
  --err-bg: #fde4e1;
  --err-ink: #8a1c10;
  --focus: #0071e3;

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Archivo", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", "IBM Plex Mono", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.5rem;
  --step-3: clamp(2rem, 1.3rem + 3vw, 3.25rem);

  --radius: 12px;
  --radius-lg: 18px;
  --pill: 980px;
  --gutter: 16px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --paper: #1c1c1e;
    --well: #2c2c2e;
    --fill: #2c2c2e;
    --fill-hover: #3a3a3c;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: #424245;
    --line-soft: #2c2c2e;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-ink: #ffffff;
    --accent-soft: rgba(41, 151, 255, 0.28);
    --link: #2997ff;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
    --flag-ring: rgba(255, 255, 255, 0.22);
    --hl-ink: #8fc6ff;
    --sc-wall-warm: #26221e; --sc-table: #1b1815; --sc-wall-cool: #1f2023; --sc-desk: #1a1b1e;
    --ob-tent: #322d28; --ob-tent-ink: #f1ebe3; --ob-tent-accent: #c9a982;
    --ob-sign: #2f3237; --ob-sign-edge: rgba(255, 255, 255, 0.08);
    --ob-card: #2c2c2e; --ob-card-ink: #f5f5f7; --ob-card-muted: #a1a1a6;
        --glass: rgba(40, 40, 44, 0.55);
    --glass-rim: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.6);
    --glass-lift: 0 4px 14px rgba(0, 0, 0, 0.35);
    --warn-bg: #3a2f0d;
    --warn-ink: #f5d98a;
    --err-bg: #3d1712;
    --err-ink: #f7b4aa;
    --focus: #2997ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --paper: #1c1c1e;
  --well: #2c2c2e;
  --fill: #2c2c2e;
  --fill-hover: #3a3a3c;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #424245;
  --line-soft: #2c2c2e;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-ink: #ffffff;
  --accent-soft: rgba(41, 151, 255, 0.28);
  --link: #2997ff;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
  --flag-ring: rgba(255, 255, 255, 0.22);
    --hl-ink: #8fc6ff;
    --sc-wall-warm: #26221e; --sc-table: #1b1815; --sc-wall-cool: #1f2023; --sc-desk: #1a1b1e;
    --ob-tent: #322d28; --ob-tent-ink: #f1ebe3; --ob-tent-accent: #c9a982;
    --ob-sign: #2f3237; --ob-sign-edge: rgba(255, 255, 255, 0.08);
    --ob-card: #2c2c2e; --ob-card-ink: #f5f5f7; --ob-card-muted: #a1a1a6;
        --glass: rgba(40, 40, 44, 0.55);
  --glass-rim: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.6);
  --glass-lift: 0 4px 14px rgba(0, 0, 0, 0.35);
  --warn-bg: #3a2f0d;
  --warn-ink: #f5d98a;
  --err-bg: #3d1712;
  --err-ink: #f7b4aa;
  --focus: #2997ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip {
  position: absolute; inset-inline-start: 8px; top: -60px;
  background: var(--paper); color: var(--ink); padding: 8px 12px; border-radius: var(--radius);
  z-index: 40;
}
.skip:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }

.wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Glass: frosted blur, bright rim and a soft sheen (Apple-style material). */
.top, .glass-tag {
  position: relative; isolation: isolate;
  background: var(--glass); box-shadow: var(--glass-rim), var(--glass-lift);
}
.top::before, .glass-tag::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  backdrop-filter: blur(6px) saturate(180%);
}
.top::after, .glass-tag::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 40%);
}

/* Header: floating glass capsule */
.top {
  position: sticky; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 30;
  width: min(1048px, calc(100% - 2 * var(--gutter))); margin: 10px auto 0;
  border-radius: var(--pill); padding: 7px 8px 7px 18px;
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: none; padding: 0; }
[dir="rtl"] .top { padding: 7px 18px 7px 8px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-1);
  color: var(--ink); letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; flex: none; }
/* Language menu: pill button with a flag, opening a frosted list of links */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lang { position: relative; }
.lang summary {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 6px;
  border-radius: var(--pill); cursor: pointer; list-style: none; user-select: none;
  font-size: var(--step--1); font-weight: 500; color: var(--ink);
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-soft);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { box-shadow: inset 0 0 0 1px var(--line); }
.lang[open] summary { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 4px var(--accent-soft); }
.lang .chev { width: 12px; height: 12px; color: var(--muted); flex: none; }
.lang[open] .chev { transform: rotate(180deg); }
.flag { position: relative; display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; }
.flag::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--flag-ring); }
.flag svg { display: block; width: 100%; height: 100%; }
.flag-text::before { content: attr(data-letter); }
.flag-text { background: var(--fill); color: var(--ink); font-family: "IBM Plex Sans Arabic", var(--font-body); font-size: 0.8125rem; font-weight: 600; line-height: 1; }
.lang-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 40;
  min-width: 210px; margin: 0; padding: 6px; list-style: none;
  border-radius: 16px; background: var(--paper);
  box-shadow: 0 0 0 1px var(--line-soft), 0 12px 32px rgba(0, 0, 0, 0.12);
}
.lang-menu a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink); font-size: var(--step-0);
}
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--fill); text-decoration: none; outline: none; }
.lang-menu a:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.lang-menu a[aria-current] { font-weight: 600; }
.lang-menu .lang-label { flex: 1; text-align: left; }
html[dir="rtl"] .lang-menu .lang-label { text-align: right; }
.lang-menu .tick { width: 16px; height: 16px; color: var(--link); flex: none; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .lang-menu { background: color-mix(in srgb, var(--paper) 82%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
}

/* Hero */
.hero { padding-block: 48px 28px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-3);
  line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 14px; text-wrap: balance; max-width: 18ch;
}
.hero p { margin: 0; max-width: 58ch; color: var(--muted); font-size: 1.1875rem; line-height: 1.45; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.badges li {
  font-size: var(--step--1); font-weight: 500;
  padding: 5px 12px; border-radius: var(--pill); background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.badges li.hl { background: var(--accent-soft); color: var(--hl-ink); box-shadow: none; font-weight: 600; }

/* Generator */
.gen {
  display: grid; gap: 20px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  grid-template-areas: "form proof" "design proof";
  padding-bottom: 56px;
}
.panel {
  background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 24px; min-width: 0;
}
.panel-form { grid-area: form; }
.panel-design { grid-area: design; }
.proof { grid-area: proof; position: sticky; top: calc(80px + env(safe-area-inset-top, 0px)); }

.label-caps {
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 600;
  letter-spacing: -0.015em; color: var(--ink); margin: 0 0 14px;
}
.dl-label { font-size: var(--step-0); }

.types { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.types a, .types button {
  font: inherit; font-size: var(--step--1); font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: var(--pill); border: 0;
  background: var(--fill); color: var(--ink); display: inline-block;
}
.types a:hover, .types button:hover { background: var(--fill-hover); text-decoration: none; }
.types [aria-current="page"], .types [aria-current="page"]:hover { background: var(--ink) linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)); color: var(--paper); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }

.fields { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field .lbl { font-size: var(--step--1); font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.hint { font-size: var(--step--1); color: var(--muted); margin: 0; }
input[type="text"], input[type="url"], input[type="email"], input[type="tel"], input[type="password"], textarea, select {
  font: inherit; color: var(--ink); background: var(--paper); width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 8px; font-size: var(--step--1); font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 64px; }
.pw-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: var(--step--1); background: none; border: 0; color: var(--link); cursor: pointer; padding: 4px 8px;
}

/* Disclosure arrow shared by the design sections and the FAQ */
details.sec > summary::after, .faq summary::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-inline-end: 4px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}
details.sec[open] > summary::after, .faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }

/* Design panel */
details.sec { border-top: 1px solid var(--line-soft); }
details.sec:first-of-type { border-top: 0; }
details.sec > summary {
  cursor: pointer; list-style: none; padding: 14px 0; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
details.sec > summary::-webkit-details-marker { display: none; }
.sec-body { padding-bottom: 18px; display: grid; gap: 14px; }

.color-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.color-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 10px 5px 6px; background: var(--paper); }
.color-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.color-input input[type="color"] { width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; border-radius: 8px; }
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line); border-radius: 8px; }
.color-input input[type="text"] { border: 0; padding: 4px; font-family: var(--font-mono); font-size: var(--step--1); outline: none; box-shadow: none; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }

.choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.choice button {
  font: inherit; font-size: var(--step--1); cursor: pointer; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 6px 10px; display: grid; justify-items: center; gap: 6px;
}
.choice button:hover { border-color: var(--muted); }
.choice button svg { width: 32px; height: 32px; color: var(--ink); }
.choice button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* Frame picker */
.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.frames button {
  display: grid; place-items: center; aspect-ratio: 1; padding: 8px; cursor: pointer; color: var(--muted);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.frames button:hover { border-color: var(--muted); }
.frames button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.frame-thumb { display: grid; place-items: center; width: 100%; height: 100%; }
.frame-thumb svg { max-width: 100%; max-height: 52px; width: auto; height: 100%; }
.frames button:first-child .frame-thumb svg { width: 26px; height: 26px; }
.fCf { fill: var(--ink); } .fCs { stroke: var(--ink); } .fPf { fill: var(--paper); } .fPs { stroke: var(--paper); }
.frames button[aria-pressed="true"] .fCf { fill: var(--link); } .frames button[aria-pressed="true"] .fCs { stroke: var(--link); }
#qr.framed { aspect-ratio: auto; }
#qr.framed svg { width: 100% !important; height: auto !important; max-height: 460px; }

.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn {
  font: inherit; font-weight: 500; cursor: pointer; border-radius: var(--pill);
  padding: 10px 18px; border: 0; background: var(--fill); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { background: var(--fill-hover); text-decoration: none; }
.btn-primary, .btn-primary:hover { color: var(--accent-ink); }
.btn-primary { background: var(--accent) linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 0.5px rgba(0, 0, 0, 0.1); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost, .btn-ghost:hover { background: none; color: var(--link); padding-inline: 6px; }
.logo-thumb { width: 40px; height: 40px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: var(--well); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-row { display: flex; justify-content: space-between; font-size: var(--step--1); }
.range-row output { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Proof card */
.proof-card { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; }
.proof-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.proof-head h2 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.025em; margin: 0; }
.sheet {
  position: relative; padding: 28px; margin-inline: auto; width: 100%;
  background-color: var(--well); border-radius: var(--radius-lg);
}
.sheet > .crop { display: none; }
#qr { aspect-ratio: 1 / 1; width: 100%; display: grid; place-items: center; }
#qr svg, #qr canvas {
  width: 100% !important; height: auto !important; display: block;
  border-radius: 6px;
}
.spec {
  font-size: 0.75rem; color: var(--muted); text-align: center;
  margin: 12px 0 0; font-variant-numeric: tabular-nums; min-height: 1.2em;
}
.msg { font-size: var(--step--1); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0 0; }
.msg.warn { background: var(--warn-bg); color: var(--warn-ink); }
.msg.err { background: var(--err-bg); color: var(--err-ink); }
.dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.dl .btn { padding-inline: 6px; }
.dl-label { margin: 22px 0 0; }
.size-pick { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: var(--step--1); color: var(--muted); }
.size-pick select { width: auto; padding: 5px 10px; border-radius: var(--pill); }
.fine { font-size: var(--step--1); color: var(--muted); margin: 14px 0 0; }
.lock { display: flex; gap: 6px; align-items: flex-start; }
.lock svg { flex: none; margin-top: 3px; }

/* Ad spots reserve their final size up front (no layout shift while the ad loads) */
.ad-slot { display: grid; grid-template-rows: auto 280px; gap: 6px; margin-block: 0 48px; }
.content .ad-slot { padding: 0; margin: 0; }
.ad-label { margin: 0; font-size: 0.6875rem; color: var(--muted); text-align: center; }
.ad-slot ins { border-radius: var(--radius); background: var(--fill); overflow: hidden; }

/* Examples: real codes on simple printed objects */
.examples { padding-bottom: 64px; }
.examples h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); letter-spacing: -0.025em; margin: 0 0 20px; }
.ex-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ex h3 { margin: 16px 0 4px; font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; }
.ex p { margin: 0 0 8px; color: var(--muted); font-size: var(--step--1); }
.ex-link { font-size: var(--step--1); font-weight: 500; }
.ex-link::after { content: " \203A"; }
.ex-stage {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden;
  display: grid; place-items: center; background: var(--paper); box-shadow: var(--shadow);
}
.ex-qr { display: block; width: 100%; height: auto; }
.glass-tag {
  position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 2;
  padding: 5px 12px; border-radius: var(--pill); font-size: 0.75rem; font-weight: 600; color: var(--ink);
  --glass-lift: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Table tent card */
.ex-menu { background: linear-gradient(180deg, var(--sc-wall-warm) 72%, var(--sc-table) 72%); }
.tent {
  width: 40%; display: grid; justify-items: center; gap: 4px; padding: 14px 14px 16px;
  background: var(--ob-tent); border-radius: 4px; color: var(--ob-tent-ink); translate: 0 6%;
  box-shadow: 0 1px 2px rgba(60, 40, 20, 0.12), 0 8px 14px -10px rgba(60, 40, 20, 0.3);
}
.tent-name { font-family: Georgia, "Times New Roman", serif; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ob-tent-accent); }
.tent-label { font-family: Georgia, "Times New Roman", serif; font-size: 1.125rem; font-style: italic; margin-bottom: 4px; }
.tent .ex-qr { width: 82%; }

/* Wall sign */
.ex-wifi { background: var(--sc-wall-cool); }
.sign {
  position: relative; width: 42%; display: grid; justify-items: center; gap: 6px; padding: 16px 14px 14px;
  background: var(--ob-sign); color: #f2f2f2; border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--ob-sign-edge), 0 1px 2px rgba(0, 0, 0, 0.15), 0 8px 14px -10px rgba(0, 0, 0, 0.35);
}
.sign i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #8d9196; }
.sign i:nth-child(1) { top: 6px; left: 6px; } .sign i:nth-child(2) { top: 6px; right: 6px; }
.sign i:nth-child(3) { bottom: 6px; left: 6px; } .sign i:nth-child(4) { bottom: 6px; right: 6px; }
.sign-title { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.sign .ex-qr { width: 78%; border-radius: 3px; }
.sign-net { font-family: var(--font-mono); font-size: 0.625rem; color: #b8bcc1; }
.sign-scan { font-size: 0.625rem; color: #8d9196; }

/* Business card on a desk */
.ex-vcard { background: var(--sc-desk); }
.card, .card-back { position: absolute; width: 66%; aspect-ratio: 1.75; border-radius: 4px; }
.card-back { background: #23395b; transform: translate(7%, -11%); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7% 6%;
  background: var(--ob-card); color: var(--ob-card-ink); transform: translate(-3%, 6%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 14px -10px rgba(0, 0, 0, 0.3);
}
.card-text { display: grid; gap: 2px; min-width: 0; }
.card-text b { font-size: 0.875rem; letter-spacing: -0.01em; }
.card-text span { font-size: 0.6875rem; color: var(--ob-card-muted); }
.card-text .card-tel { margin-top: 8px; font-variant-numeric: tabular-nums; }
.card .ex-qr { width: 38%; flex: none; }
[dir="rtl"] .card-text .card-tel { direction: ltr; text-align: end; }
[dir="rtl"] .tent-name { letter-spacing: 0; }
[dir="rtl"] .tent-label { font-family: var(--font-body); font-style: normal; font-weight: 600; }

/* Guide pages: readable text, lists, tables, size calculator */
.prose { display: grid; gap: 36px; max-width: 72ch; }
.prose-sec h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); letter-spacing: -0.025em; margin: 0 0 12px; }
.prose-sec p { margin: 0 0 12px; color: var(--muted); font-size: var(--step-1); line-height: 1.6; }
.prose-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.prose-list li { position: relative; padding-inline-start: 22px; color: var(--muted); font-size: var(--step-1); line-height: 1.55; }
.prose-list li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose-cta { margin: 14px 0 0; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.table-wrap th, .table-wrap td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table-wrap thead th { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.table-wrap tbody th { font-weight: 600; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.guide-page { gap: 40px; }
.calc { display: grid; gap: 14px; max-width: 520px; }
.calc-row { display: flex; align-items: center; gap: 10px; }
.calc-row input { max-width: 160px; font-variant-numeric: tabular-nums; }
.calc-out { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 4px 0 0; padding: 14px 18px; border-radius: var(--radius); background: var(--accent-soft); }
.calc-out span { font-weight: 600; }
.calc-out output { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; color: var(--hl-ink); font-variant-numeric: tabular-nums; }
.others-sub { margin-top: 24px !important; }
.gen + .prose, .content > .prose { margin: 0; }

/* Content */
.content { padding-block: 16px 64px; display: grid; gap: 56px; }
.content h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); letter-spacing: -0.025em; margin: 0 0 18px; text-wrap: balance; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.steps li { counter-increment: s; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px 22px; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 12px;
  border-radius: 50%; background: var(--accent-soft); color: var(--hl-ink); font-size: var(--step--1); font-weight: 600;
}
.steps p { margin: 0; color: var(--ink); line-height: 1.5; }
.guide-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.guide-box { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px 24px; }
.guide-box h3 { margin: 0 0 12px; font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; }
.tips, .mistakes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tips li, .mistakes li { position: relative; padding-inline-start: 28px; color: var(--muted); line-height: 1.5; }
.tips li::before, .mistakes li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.2em; width: 18px; height: 18px; border-radius: 50%;
  background-repeat: no-repeat; background-position: center; background-size: 10px;
}
.tips li::before { background-color: rgba(52, 199, 89, 0.16); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2l2 2 4-4.4' fill='none' stroke='%2328a745' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.mistakes li::before { background-color: rgba(255, 59, 48, 0.14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3 3l4 4M7 3l-4 4' fill='none' stroke='%23e5484d' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.why { max-width: 66ch; }
.why p { margin: 0 0 12px; color: var(--muted); font-size: var(--step-1); }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; max-width: 680px; }
.compare figure { margin: 0; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px; }
.compare figcaption { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.compare .flow { font-size: var(--step--1); line-height: 1.5; }
.faq { max-width: 72ch; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.others ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.others a { display: inline-block; padding: 8px 14px; border-radius: var(--pill); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-soft); color: var(--ink); font-size: var(--step--1); }
.others a:hover { box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }

/* Footer: faded logo and note, three link columns, copyright line */
.foot { border-top: 1px solid var(--line-soft); padding-block: 48px 28px; font-size: var(--step--1); color: var(--muted); background: var(--bg); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 32px 36px; }
.foot-brand .brand { color: var(--muted); }
.foot-brand .brand-mark { opacity: 0.5; transition: opacity 0.2s var(--ease); }
.foot-brand .brand:hover { color: var(--ink); }
.foot-brand .brand:hover .brand-mark { opacity: 1; }
.foot-brand .brand-mark { width: 26px; height: 26px; }
.foot-brand p { margin: 14px 0 0; max-width: 36ch; line-height: 1.55; }
.foot-col h2 { margin: 2px 0 14px; font-size: 0.75rem; font-weight: 600; color: var(--ink); letter-spacing: 0; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-col a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.foot-col a:hover { color: var(--ink); text-decoration: none; }
.foot-langs .flag { width: 16px; height: 16px; font-size: 0.625rem; }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 0.75rem; }
.foot-bottom p { margin: 0; }

/* Article (privacy, 404) */
.article { padding-block: 48px 64px; max-width: 70ch; }
.article h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--step-3); letter-spacing: -0.035em; margin: 0 0 8px; }
.article h2 { font-size: var(--step-1); margin: 28px 0 6px; }
.article p { margin: 0; }
.article .meta { color: var(--muted); font-size: var(--step--1); margin-bottom: 8px; }

/* RTL tweaks: Arabic letters must join, so no letter-spacing, no mono face */
[dir="rtl"] { --font-body: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; --font-display: "IBM Plex Sans Arabic", system-ui, sans-serif; }
[dir="rtl"] body, [dir="rtl"] .brand { letter-spacing: 0; }
[dir="rtl"] .hero h1, [dir="rtl"] .content h2, [dir="rtl"] .article h1, [dir="rtl"] .proof-head h2, [dir="rtl"] .label-caps { font-weight: 600; letter-spacing: 0; }
[dir="rtl"] .badges li, [dir="rtl"] .compare figcaption {
  font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-weight: 600;
}
[dir="rtl"] .color-input input[type="text"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="email"] { direction: ltr; text-align: end; }

@media (max-width: 860px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .gen { grid-template-columns: minmax(0, 1fr); grid-template-areas: "form" "proof" "design"; }
  .proof { position: static; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .guide-cols { grid-template-columns: minmax(0, 1fr); }
  .ex-grid { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top { width: calc(100% - 16px); margin-top: 8px; padding-inline-start: 14px; }
  .lang summary .lang-label { display: none; }
  .lang summary { padding-inline-start: 6px; }
  .fields, .color-row { grid-template-columns: minmax(0, 1fr); }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .panel, .proof-card { padding: 18px; }
  .hero { padding-block: 32px 20px; }
  .sheet { padding: 20px; }
}

/* Motion: small and calm. Everything is skipped for people who turn animations off. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes refresh { from { opacity: 0.55; } to { opacity: 1; } }

  .hero h1, .hero p, .badges, .panel, .proof-card { animation: rise 0.7s var(--ease) both; }
  .hero p { animation-delay: 0.06s; }
  .badges { animation-delay: 0.12s; }
  .panel-form { animation-delay: 0.16s; }
  .proof-card { animation-delay: 0.22s; }
  .panel-design { animation-delay: 0.28s; }

  .types a, .types button, .btn, .choice button, .swatch, .others a, .badges li,
  input, textarea, select, .color-input {
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease),
      box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .btn:active, .types a:active, .types button:active, .choice button:active { transform: scale(0.97); }
  .btn-primary:hover { transform: translateY(-1px); }

  details.sec > summary::after, .faq summary::after { transition: transform 0.25s var(--ease); }
  details[open] > .sec-body, .faq details[open] p { animation: fade 0.3s var(--ease); }

  #qr svg, #qr canvas { animation: refresh 0.3s var(--ease); }

  @keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
  .lang[open] .lang-menu { animation: menu-in 0.18s var(--ease); transform-origin: top right; }
  [dir="rtl"] .lang[open] .lang-menu { transform-origin: top left; }
  .lang .chev { transition: transform 0.2s var(--ease); }
  .lang summary, .lang-menu a { transition: background-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
  .tent, .sign, .card { transition: translate 0.4s var(--ease); }
  .ex:hover .tent, .ex:hover .sign, .ex:hover .card { translate: 0 -4px; }
  .ex:hover .tent { translate: 0 calc(6% - 4px); }

  /* Staggered reveal: when a group scrolls into view its children fade up one after another.
     Only active when the small footer script adds .reveal-on, so without JS everything is simply visible. */
  .reveal-on [data-reveal] > * {
    opacity: 0; translate: 0 16px;
    transition: opacity 0.6s var(--ease), translate 0.6s var(--ease);
    transition-delay: calc(min(var(--i, 0), 8) * 70ms);
  }
  .reveal-on [data-reveal].in > * { opacity: 1; translate: none; }
}
