/* ============================================================
   1LineArt Poll & Statistics Kit: website design system (v5)
   Design by: Gamal Nabih | 1LineArt Studio | https://1lineart.com

   Elastic layout principles (as in the Kit guide, "Formats and responsiveness"):
   - sizes, type and spacing are fluid (clamp), never fixed to a device
   - grids reflow with auto-fit / minmax, so cells keep their proportions
   - media keeps its aspect ratio; only a few breakpoints change structure
   Sections: 1 fonts, 2 tokens, 3 base, 4 layout, 5 components, 6 sections, 7 utilities
   ============================================================ */

/* ---------- 1. Fonts (Alexandria, SIL OFL 1.1, self-hosted; see fonts/LICENSE) ---------- */
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/alexandria-latin-wght-normal.woff2') format('woff2-variations'), url('fonts/alexandria-latin-wght-normal.woff2') format('woff2');
  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: 'Alexandria';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/alexandria-arabic-wght-normal.woff2') format('woff2-variations'), url('fonts/alexandria-arabic-wght-normal.woff2') format('woff2');
  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;
}

/* ---------- 2. Tokens ---------- */
:root {
  color-scheme: light dark;
  --brand-teal: #49c7b8;
  --brand-yellow: #ffcc4d;
  --brand-magenta: #ba006e;
  --brand-navy: #005273;
  --brand-ink: #0b1f2a;
  --brand-deep: #00222b;

  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef2ef;
  --surface-3: #e1e8e5;
  --line: rgba(11, 31, 42, .11);
  --line-strong: rgba(11, 31, 42, .26);
  --text: #0b1f2a;
  --text-2: #34505e;
  --text-3: #52707d;
  --accent: #b0006a;
  --accent-hover: #8c0054;
  --accent-ink: #ffffff;
  --accent-text: #a30063;
  --accent-soft: rgba(176, 0, 106, .08);
  --teal: #09695f;
  --teal-soft: rgba(11, 122, 110, .10);
  --focus: #005273;
  --nav-bg: rgba(246, 247, 244, .86);
  --stage: #0b2a38;
  --shadow: 0 1px 2px rgba(31, 33, 34, 0.06)), 0 14px 34px -18px rgba(11, 31, 42, .28);
  --shadow-lg: 0 2px 4px rgba(11, 31, 42, .06), 0 30px 60px -28px rgba(11, 31, 42, .42);
  --pattern-opacity: .06;

  --r-xl: 32px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 9px;
  --wrap: 1200px;
  --pad-x: clamp(18px, 4.5vw, 44px);
  --section: clamp(60px, 8.5vw, 112px);
  --gap: clamp(16px, 2.6vw, 30px);
  --nav-h: 68px;
  --f-display: 'Alexandria', 'Avenir Next', 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-body: 'Alexandria', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --f-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fs-h1: clamp(2.15rem, 4.4vw + .5rem, 3.9rem);
  --fs-h2: clamp(1.7rem, 2.6vw + .5rem, 2.6rem);
  --fs-h3: clamp(1.02rem, .4vw + .95rem, 1.18rem);
  --fs-lede: clamp(1rem, .45vw + .9rem, 1.15rem);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0, .009, .117, .281, .483, .699, .907, 1.084, 1.214, 1.289, 1.307, 1.273, 1.2, 1.103, 1, .908, .84, .805, .805, .838, .894, .964, 1.035, 1.094, 1.134, 1.149, 1.138, 1.105, 1.056, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08171f;
    --surface: #0e2530;
    --surface-2: #14313f;
    --surface-3: #1c3f50;
    --line: rgba(226, 240, 242, .11);
    --line-strong: rgba(226, 240, 242, .26);
    --text: #eaf3f4;
    --text-2: #b6cacf;
    --text-3: #8fa9b1;
    --accent: #ffcc4d;
    --accent-hover: #ffd873;
    --accent-ink: #0b1f2a;
    --accent-text: #ffd466;
    --accent-soft: rgba(255, 204, 77, .12);
    --teal: #49c7b8;
    --teal-soft: rgba(73, 199, 184, .13);
    --focus: #ffcc4d;
    --nav-bg: rgba(8, 23, 31, .84);
    --stage: #061218;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -18px rgba(0, 0, 0, .7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 60px -28px rgba(0, 0, 0, .85);
    --pattern-opacity: .08;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08171f;
  --surface: #0e2530;
  --surface-2: #14313f;
  --surface-3: #1c3f50;
  --line: rgba(226, 240, 242, .11);
  --line-strong: rgba(226, 240, 242, .26);
  --text: #eaf3f4;
  --text-2: #b6cacf;
  --text-3: #8fa9b1;
  --accent: #ffcc4d;
  --accent-hover: #ffd873;
  --accent-ink: #0b1f2a;
  --accent-text: #ffd466;
  --accent-soft: rgba(255, 204, 77, .12);
  --teal: #49c7b8;
  --teal-soft: rgba(73, 199, 184, .13);
  --focus: #ffcc4d;
  --nav-bg: rgba(8, 23, 31, .84);
  --stage: #061218;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 60px -28px rgba(0, 0, 0, .85);
  --pattern-opacity: .08;
}

:root[data-theme="light"] {
  color-scheme: light;
}

/* ---------- 3. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.7 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--f-display);
  color: var(--text);
  margin: 0;
  letter-spacing: -.015em;
  text-wrap: balance;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: var(--f-mono);
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .08em .4em;
  overflow-wrap: anywhere;
}

strong {
  font-weight: 700;
}

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

::selection {
  background: var(--brand-yellow);
  color: var(--brand-ink);
}

[hidden] {
  display: none !important;
}

.ico {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 4. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -120px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .65rem 1.1rem;
  border-radius: var(--r-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}

.skip-link:focus {
  top: 12px;
  color: var(--accent-ink);
}

.block {
  padding-block: var(--section);
  scroll-margin-top: var(--nav-h);
  border-top: 1px solid var(--line);
}

.block:nth-of-type(even) {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.block-head {
  margin-bottom: clamp(26px, 4vw, 48px);
  max-width: 68ch;
}

.block-head h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.025em;
}

.block-head h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 6px;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-teal) 0 50%, var(--brand-yellow) 50% 100%);
}

.lede {
  color: var(--text-2);
  font-size: var(--fs-lede);
  line-height: 1.65;
  max-width: 62ch;
}

.block-head .lede {
  margin-top: 1rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}

.split>.block-head {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  margin: 0;
}

.split .block-head h2 {
  font-size: clamp(1.55rem, 2vw + .6rem, 2.1rem);
}

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  min-width: 0;
}

.stack[data-tabs] {
  gap: 0;
}

.stack>div>p:not(.callout):not(.status) {
  color: var(--text-2);
}

.stack p+.step-list {
  margin-top: 1rem;
}

.sub-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--gap);
}

.grid-top {
  margin-top: clamp(26px, 4vw, 44px);
}

.p-gap {
  margin-top: .8rem;
}

/* ---------- 5. Components ---------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}

.top-nav.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -18px rgba(11, 31, 42, .35);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font: 700 1rem/1.1 var(--f-display);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: var(--text);
}

.logo {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-nav nav {
  margin-inline: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  padding: .5rem .8rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-links a.is-active {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.nav-menu-cta {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.nav-toggle {
  display: none;
  height: 42px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 700 .9rem var(--f-body);
  cursor: pointer;
}

.progress {
  height: 3px;
}

.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-yellow));
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 50px;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 700 .95rem/1.2 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}

.btn-sm {
  min-height: 42px;
  padding: .45rem 1.05rem;
  font-size: .88rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 20px -10px var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-3);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font: 600 .82rem var(--f-body);
}

.chip img,
.resolve-badge img {
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 6px;
  background: var(--brand-deep);
  box-sizing: content-box;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.3rem;
  padding: .35rem .95rem .35rem .4rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: 600 .85rem var(--f-body);
}

.eyebrow-ico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-deep);
}

.callout {
  padding: 1.05rem 1.3rem;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text);
  font-size: .98rem;
}

.callout-gap {
  margin-top: 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(18px, 3vw, 32px);
  box-shadow: var(--shadow);
}

.panel>p {
  color: var(--text-2);
}

.block:nth-of-type(even) .panel {
  background: var(--bg);
  box-shadow: none;
}

.panel-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.card {
  display: grid;
  gap: .55rem;
  align-content: start;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  transition: transform .25s var(--spring), border-color .2s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.block:nth-of-type(even) .card {
  background: var(--bg);
  box-shadow: none;
}

.card p {
  color: var(--text-2);
  font-size: .95rem;
  line-height: 1.65;
}

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: .3rem;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal);
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  gap: 2px;
  background: var(--surface-2);
  border-radius: 999px;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 40px;
  padding: .4rem .95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: 600 .88rem var(--f-body);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 0 0 1px var(--line);
}

.seg-count {
  font: 500 .76rem var(--f-mono);
  color: var(--text-3);
}

.field {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.field>span {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-2);
}

input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: .5rem .95rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: 400 .95rem var(--f-body);
}

input[type="search"]::placeholder {
  color: var(--text-3);
  opacity: 1;
}

.block:nth-of-type(even) input[type="search"] {
  background: var(--surface-2);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.3rem;
}

.tab {
  min-height: 44px;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  font: 600 .9rem var(--f-body);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.tab:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.tab[aria-selected="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.tab-note {
  margin-bottom: .9rem;
  color: var(--text-3);
  font-size: .9rem;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.block:nth-of-type(even) .table-wrap {
  background: var(--bg);
}

.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  min-width: 30rem;
}

.spec th {
  text-align: start;
  padding: .7rem 1rem;
  font: 700 .76rem var(--f-body);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.spec td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--text-2);
}

.spec tr:last-child td {
  border-bottom: 0;
}

.spec td:first-child {
  color: var(--text);
  font-weight: 700;
  width: 28%;
}

.step-list {
  display: grid;
  counter-reset: step;
}

.step-item {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding-block: 1.15rem;
  border-top: 1px solid var(--line);
}

.step-item:last-child {
  border-bottom: 1px solid var(--line);
}

.step-item::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 .95rem var(--f-display);
  margin-top: .1rem;
}

.step-body {
  min-width: 0;
  color: var(--text-2);
}

.step-body strong {
  color: var(--text);
}

.font-btn {
  margin-top: .8rem;
}

.path-block {
  position: relative;
  margin-top: .6rem;
  padding: .6rem 5.4rem .6rem .95rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: 400 .8rem/1.6 var(--f-mono);
  color: var(--text);
  overflow-wrap: anywhere;
}

.copy-btn {
  position: absolute;
  top: .55rem;
  right: .55rem;
  min-height: 34px;
  padding: .2rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: 700 .78rem var(--f-body);
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--text-3);
}

.copy-btn.is-done {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal);
}

.bullets {
  display: grid;
  gap: .65rem;
}

.bullets li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-2);
}

.bullets li::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .7em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand-teal);
  transform: rotate(45deg);
}

.bullets strong {
  color: var(--text);
}

.faq {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  min-height: 56px;
  padding: 1.1rem 0;
  background: none;
  border: 0;
  text-align: start;
  color: var(--text);
  font: 600 1.02rem/1.4 var(--f-display);
  cursor: pointer;
}

.faq-q:hover {
  color: var(--accent-text);
}

.faq-icon {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font: 400 1.25rem/1 var(--f-body);
  transition: transform .3s var(--spring), background .2s, color .2s, border-color .2s;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .3s ease, visibility 0s .3s;
}

.faq-a>p {
  overflow: hidden;
  min-height: 0;
  color: var(--text-2);
  max-width: 64ch;
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows .3s ease, visibility 0s;
}

.faq-item.is-open .faq-a>p {
  padding-bottom: 1.3rem;
}

/* ---------- 6. Sections ---------- */
.hero {
  position: relative;
  padding-block: clamp(36px, 6vw, 88px) clamp(52px, 8vw, 104px);
  overflow: clip;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 80%;
  z-index: -2;
  background: radial-gradient(60% 70% at 85% 10%, color-mix(in srgb, var(--brand-teal) 22%, transparent), transparent 70%), radial-gradient(45% 55% at 5% 0%, color-mix(in srgb, var(--brand-yellow) 22%, transparent), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image: url('chart.svg');
  background-position: center top;
  background-size: 100% auto;
  background-repeat: no-repeat;

  opacity: var(--pattern-opacity);

  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%,
      #000 20%,
      transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%,
      #000 20%,
      transparent 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: var(--fs-h1);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.03em;
  max-width: 16ch;
}

.hero .lede {
  margin-top: 1.4rem;
  max-width: 52ch;
}

.hero .btn-row {
  margin-top: 2rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
  gap: 10px;
  margin: 2.4rem 0 0;
}

.facts div {
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.facts dt {
  font-size: .72rem;
  color: var(--text-3);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.facts dd {
  margin: .15rem 0 0;
  font-weight: 600;
  font-size: .93rem;
  line-height: 1.4;
}

.hero-stage {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 640px;
}

.hero-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--stage);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-strong);
}

.hero-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stage figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  counter-reset: pipe;
}

.pipeline li {
  counter-increment: pipe;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem 1rem .45rem .5rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
}

.pipeline li::before {
  content: counter(pipe);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-yellow);
  color: var(--brand-ink);
  font: 700 .78rem var(--f-display);
}

.gallery {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  padding: clamp(16px, 3vw, 32px);
  border-radius: var(--r-xl);
  background: var(--stage);
  color: #eaf3f4;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.gallery-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 24px;
}

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery .seg {
  background: rgba(255, 255, 255, .08);
}

.gallery .seg-btn {
  color: #c6d5da;
}

.gallery .seg-btn:hover {
  color: #fff;
}

.gallery .seg-btn.is-active {
  background: var(--brand-yellow);
  color: var(--brand-ink);
  box-shadow: none;
}

.gallery .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .4);
}

.gallery .btn-ghost:hover {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
  color: #fff;
}

.gallery .btn-primary {
  background: var(--brand-yellow);
  color: var(--brand-ink);
  box-shadow: none;
}

.gallery :focus-visible {
  outline-color: var(--brand-yellow);
}

.gallery-nav {
  display: flex;
  gap: 10px;
}

/* the three formats share one height, so each width follows its aspect ratio */
.gallery-stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(10px, 2vw, 22px);
}

.shot {
  margin: 0;
  min-width: 0;
}

.shot-16x9 {
  flex: 640 1 0;
}

.shot-9x16 {
  flex: 203 1 0;
}

.shot-1x1 {
  flex: 360 1 0;
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  background: #0a0a0e;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}

.shot figcaption {
  margin-top: .55rem;
  text-align: center;
  font: 500 .76rem var(--f-mono);
  color: #9fb7bf;
}

.gallery-info {
  max-width: 70ch;
}

.gallery-info h3 {
  color: #fff;
  font-size: clamp(1.15rem, 1vw + 1rem, 1.45rem);
  margin-top: .2rem;
}

.gallery-info p:last-child {
  color: #c6d5da;
  margin-top: .4rem;
  font-size: .96rem;
}

.gallery-count {
  font: 500 .78rem var(--f-mono);
  color: #9fb7bf;
}

.finder-tools {
  display: grid;
  gap: 14px;
  margin-bottom: 1.4rem;
}

.finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 10px;
}

.finder-item {
  display: grid;
  gap: .2rem;
  align-content: start;
  padding: .85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.block:nth-of-type(even) .finder-item {
  background: var(--surface-2);
}

.finder-item strong {
  font-family: var(--f-display);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
}

.finder-item span {
  color: var(--text-2);
  font-size: .85rem;
  line-height: 1.55;
}

.finder-empty {
  padding: 1.4rem;
  text-align: center;
  color: var(--text-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
}

.status {
  color: var(--text-3);
  font-size: .88rem;
  margin-top: 1rem;
}

.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
  padding: clamp(28px, 5vw, 60px);
  border-radius: var(--r-xl);
  background: var(--brand-ink);
  color: #fff;
  isolation: isolate;
}

.cta-art {
  position: absolute;
  z-index: -1;
  right: clamp(-60px, -3vw, -20px);
  top: 50%;
  width: clamp(180px, 26vw, 320px);
  aspect-ratio: 1;
  translate: 0 -50%;
  opacity: .14;
  pointer-events: none;
}

.cta-art img {
  width: 100%;
  height: 100%;
}

:root[data-theme="dark"] .cta {
  background: var(--surface-2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cta {
    background: var(--surface-2);
  }
}

.cta h2 {
  color: #fff;
  font-size: clamp(1.6rem, 2.4vw + .7rem, 2.4rem);
  line-height: 1.15;
  font-weight: 800;
  max-width: 20ch;
}

.cta .lede {
  color: #c6d5da;
  margin-top: .8rem;
  max-width: 46ch;
}

.cta .btn-primary {
  background: var(--brand-yellow);
  color: var(--brand-ink);
  box-shadow: none;
}

.cta .btn-primary:hover {
  background: #ffd873;
  color: var(--brand-ink);
}

.cta .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
}

.cta .btn-ghost:hover {
  background: rgba(255, 255, 255, .1);
  border-color: #fff;
  color: #fff;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 76px) 28px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.footer-brand {
  grid-column: span 2;
}

.footer-name {
  display: flex;
  align-items: center;
  gap: .65rem;
  font: 700 1.05rem var(--f-display);
}

.footer-name img {
  width: 28px;
  height: 28px;
}

.footer-tagline {
  margin-top: .9rem;
  color: var(--text-2);
  max-width: 46ch;
}

.resolve-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: .35rem;
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.3rem;
}

.footer-title {
  font: 700 .75rem var(--f-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .9rem;
  color: var(--text-3);
}

.site-footer ul {
  display: grid;
  gap: .5rem;
}

.site-footer li a {
  display: inline-block;
  padding-block: .25rem;
  color: var(--text-2);
  text-decoration: none;
}

.site-footer li a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: .88rem;
}

.footer-bottom a {
  color: var(--text-2);
}

.footer-bottom img {
  display: inline;
  width: 20px;
  height: 20px;
  vertical-align: -5px;
  margin-right: .3rem;
  padding: 2px;
  border-radius: 5px;
  background: var(--brand-deep);
  box-sizing: content-box;
}

/* ---------- 7. Utilities and responsive ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s;
}

.to-top svg {
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
}

.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

#ays_tooltip {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(.96);
  transition: opacity .25s ease, transform .25s ease;
}

#ays_tooltip.is-visible {
  opacity: 1;
  transform: scale(1);
}

#ays_tooltip_block {
  max-width: min(90vw, 500px);
  padding: 18px 28px;
  border-radius: 14px;
  background: rgba(11, 31, 42, .96);
  color: #fff;
  font-size: .95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

#ays_tooltip_block p {
  text-align: center;
}

@media (max-width: 1120px) {
  .nav-links a {
    padding: .5rem .55rem;
    font-size: .86rem;
  }
}

@media (max-width: 1000px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 10px var(--pad-x) 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: .85rem .95rem;
    font-size: 1rem;
    border-radius: var(--r-sm);
  }

  .nav-menu-cta {
    display: block !important;
    margin-top: 8px;
    text-align: center;
    background: var(--accent);
    color: var(--accent-ink) !important;
  }

  .nav-actions {
    margin-left: auto;
  }

  .hero-grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    max-width: 18ch;
  }

  .split>.block-head {
    position: static;
    margin-bottom: 0;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .brand span {
    font-size: .9rem;
    max-width: 15ch;
    white-space: normal;
    line-height: 1.15;
  }

  .btn-row .btn,
  .footer-cta .btn {
    flex: 1 1 100%;
  }

  .step-item {
    gap: 14px;
  }

  .path-block {
    padding-right: .95rem;
    padding-bottom: 3rem;
  }

  .copy-btn {
    top: auto;
    bottom: .55rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .seg {
    border-radius: var(--r-md);
  }

  /* vertical + square formats sit side by side below the landscape one */
  .gallery-stage {
    flex-wrap: wrap;
  }

  .shot-16x9 {
    flex: 1 1 100%;
  }

  .shot-9x16 {
    flex: 203 1 0;
  }

  .shot-1x1 {
    flex: 360 1 0;
  }

  .spec {
    min-width: 0;
  }

  .spec thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .spec tr,
  .spec td {
    display: block;
  }

  .spec td {
    border-bottom: 0;
    padding: 0 1rem;
  }

  .spec td:first-child {
    width: auto;
    padding-top: .8rem;
    padding-bottom: .15rem;
  }

  .spec td+td {
    padding-bottom: .8rem;
  }

  .spec tr+tr {
    border-top: 1px solid var(--line);
  }

  .gallery-nav {
    width: 100%;
  }

  .gallery-nav .btn {
    flex: 1;
  }
}

@media (max-width: 380px) {
  .brand span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .card:hover,
  .btn-primary:hover {
    transform: none;
  }
}

@media (forced-colors: active) {

  .btn-primary,
  .seg-btn.is-active,
  .tab[aria-selected="true"] {
    border: 2px solid ButtonText;
  }
}

@media print {

  .top-nav,
  .to-top,
  #ays_tooltip,
  .finder-tools,
  .gallery-controls,
  .gallery-nav,
  .hero-frame video {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero::before,
  .hero::after,
  .cta-art {
    display: none;
  }

  .block {
    padding-block: 24px;
    border: 0;
    background: #fff !important;
    break-inside: avoid-page;
  }

  .faq-a {
    visibility: visible;
    grid-template-rows: 1fr;
  }
}