/* Instory website. One stylesheet, system fonts, no frameworks.
   Logical properties (inline-start/end) so Arabic mirrors without overrides. */

:root {
  color-scheme: dark;
  --bg: #09080d;
  --bg-raised: #100e15;
  --surface: #15121b;
  --surface-2: #1c1824;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f4f8;
  --muted: #b4adbf;
  --dim: #857e8f;
  --gold: #f7b267;
  --rose: #ee5a8b;
  --violet: #a77bff;
  --ok: #4ade80;
  --gradient: linear-gradient(110deg, var(--gold) 0%, var(--rose) 50%, var(--violet) 100%);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans Arabic", "Geeza Pro", sans-serif;
  --radius: 22px;
  --radius-sm: 14px;
  --page: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The violet glow the App Store images use, fixed behind the page. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 90vh;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(120, 60, 190, 0.32), transparent 70%),
    radial-gradient(35% 40% at 85% 10%, rgba(238, 90, 139, 0.14), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
p a, li a, dd a, td a { color: #fff; }
strong { font-weight: 650; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: #fff; color: #000; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ type */

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.005em; }
h1 em, h2 em {
  font-style: italic;
  font-weight: 500;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-inline-end: 0.06em;
}
:lang(ja) h1, :lang(ja) h2 { letter-spacing: 0.01em; line-height: 1.3; word-break: auto-phrase; line-break: strict; }
:lang(ja) h1 { font-size: clamp(2rem, 5.2vw, 4rem); }
:lang(ja) h2 { font-size: clamp(1.7rem, 3.8vw, 2.8rem); }
:lang(ja) .lead, :lang(ja) p { line-break: strict; }
:lang(ja) h1 em, :lang(ja) h2 em, :lang(ar) h1 em, :lang(ar) h2 em { font-style: normal; }
:lang(ar) h1, :lang(ar) h2 { font-family: var(--sans); font-weight: 700; letter-spacing: 0; line-height: 1.3; }
:lang(ar) body { font-size: 18px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:lang(ja) .eyebrow, :lang(ar) .eyebrow { letter-spacing: 0.06em; }

.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); margin: 22px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 8, 13, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
  padding: 8px 12px; border-radius: 999px; font-size: 0.94rem; color: var(--muted); text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font: 600 0.95rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-light { background: #fff; color: #0b0a10; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Language menu: a <details>, so it works without JavaScript. */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: 0.92rem;
  border: 1px solid var(--line);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { color: var(--text); }
.lang-menu ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 210px; margin: 0; padding: 8px; list-style: none;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.lang-menu li a {
  display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px;
  text-decoration: none; color: var(--muted); font-size: 0.95rem;
}
.lang-menu li a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.lang-menu li a[aria-current="true"] { color: var(--text); }
.lang-menu li a[aria-current="true"]::after { content: "✓"; color: var(--rose); }

/* Mobile menu, also a <details>. */
.menu { display: none; }
.menu summary {
  list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center; border: 1px solid var(--line);
}
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: fixed; inset: 68px 0 auto; z-index: 55;
  padding: 12px var(--gutter) 24px; background: #0c0a11;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid var(--line);
}
.menu-panel a {
  display: block; padding: 14px 4px; font-size: 1.1rem; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.menu-panel .btn { margin-top: 18px; width: 100%; }

@media (max-width: 920px) {
  .nav, .header-actions > .btn { display: none; }
  .menu { display: block; }
  .header-actions { margin-inline-start: auto; }
}

/* ------------------------------------------------------------------ store button */

.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 22px 10px 18px; border-radius: 16px;
  background: #fff; color: #0b0a10; text-decoration: none;
  box-shadow: 0 10px 40px rgba(167, 123, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 14px 50px rgba(238, 90, 139, 0.32); }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
.store small { font-size: 0.74rem; font-weight: 500; opacity: 0.75; }
.store strong { font-size: 1.28rem; font-weight: 650; letter-spacing: -0.01em; }
/* Apple's badge: at least 40 px tall, with clear space of a quarter of its height. */
.badge { display: inline-flex; padding: 0; border-radius: 12px; transition: transform 0.15s ease; }
.badge:hover { transform: translateY(-2px); }
.badge img { height: 56px; width: auto; }
.footer-brand .badge img { height: 46px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 34px; }
.cta-note { color: var(--dim); font-size: 0.9rem; }
.center .cta-row { justify-content: center; }

/* ------------------------------------------------------------------ sections */

main { display: block; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.center { text-align: center; }
.center .section-head, .section-head.center { margin-inline: auto; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Hero */
.hero { padding-top: clamp(56px, 9vw, 112px); text-align: center; }
.hero .lead { max-width: 760px; margin-inline: auto; }
.hero .cta-row { justify-content: center; }
.hero-art { margin: clamp(40px, 6vw, 72px) auto 0; max-width: 1280px; position: relative; }
.hero-art img { width: 100%; border-radius: clamp(14px, 2vw, 28px); }
.hero-art::after {
  content: ""; position: absolute; inset: auto 8% -30px; height: 60px;
  background: radial-gradient(closest-side, rgba(167, 123, 255, 0.35), transparent);
  filter: blur(20px); z-index: -1;
}

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trust > div { background: var(--bg-raised); padding: 26px 24px; }
.trust h3 { font-size: 1rem; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.trust p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.icon { width: 22px; height: 22px; flex: none; color: var(--rose); }
@media (max-width: 860px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }

/* Feature rows: text beside a phone screenshot */
.feature {
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center;
  gap: clamp(32px, 6vw, 96px); padding-block: clamp(40px, 6vw, 72px);
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .feature-media { order: -1; }
.feature-text .lead { margin-top: 18px; }
.feature-media { display: flex; justify-content: center; }
.phone {
  width: min(100%, 360px); border-radius: 34px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--surface);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 10px rgba(255, 255, 255, 0.02);
}
.phone img { width: 100%; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
  .phone { width: min(100%, 320px); }
}

.checks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%;
  background: var(--gradient);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm4.6 7.3-5.3 5.9a1 1 0 0 1-1.5 0L5.4 10.7a1 1 0 1 1 1.5-1.4l1.7 1.8 4.6-5.1a1 1 0 0 1 1.4 1.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm4.6 7.3-5.3 5.9a1 1 0 0 1-1.5 0L5.4 10.7a1 1 0 1 1 1.5-1.4l1.7 1.8 4.6-5.1a1 1 0 0 1 1.4 1.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.more-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 26px; font-weight: 600; text-decoration: none; }
.more-link::after { content: "→"; transition: transform 0.15s ease; }
[dir="rtl"] .more-link::after { content: "←"; }
.more-link:hover::after { transform: translateX(3px); }
[dir="rtl"] .more-link:hover::after { transform: translateX(-3px); }
.pv-note { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }

/* Two small feature cards (messages, extras) */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px);
}
.card h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.card .lead { font-size: 1.02rem; }
.card-media { margin-top: 26px; display: flex; justify-content: center; }
.card-media .phone { width: min(100%, 300px); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

/* Screenshot carousel */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 24px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.shots figure { margin: 0; scroll-snap-align: center; }
.shots img { border-radius: 24px; border: 1px solid var(--line); width: 100%; }
.shots figcaption { margin-top: 12px; color: var(--muted); font-size: 0.88rem; }

/* Grid of small cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.tile {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 24px;
}
.tile h3 { margin-bottom: 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.tile .icon { margin-bottom: 14px; }
@media (max-width: 960px) { .grid, .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid, .grid.two, .grid.four { grid-template-columns: 1fr; } }

/* Privacy band */
.band {
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(70% 80% at 0% 0%, rgba(167, 123, 255, 0.16), transparent 70%),
    radial-gradient(60% 70% at 100% 100%, rgba(238, 90, 139, 0.12), transparent 70%),
    var(--bg-raised);
  padding: clamp(28px, 5vw, 64px);
}

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 18px;
  grid-template-columns: repeat(3, 1fr); }
.steps li { counter-increment: step; background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 26px 24px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px;
  border-radius: 50%; background: var(--gradient); color: #0b0a10; font-weight: 700;
}
.steps p { margin: 6px 0 0; color: var(--muted); font-size: 0.96rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Notes */
.topic-title { margin: 56px 0 18px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
a.tile { display: block; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
a.tile:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.notes li { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--bg-raised);
  border: 1px solid var(--line); color: var(--muted); }
.callout { padding: 20px 22px; border-radius: var(--radius-sm); border: 1px solid rgba(167, 123, 255, 0.35);
  background: rgba(167, 123, 255, 0.08); }
.callout p { margin: 0; }

/* FAQ accordions */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 54px 18px 22px; position: relative;
  font-weight: 600; font-size: 1.03rem;
}
[dir="rtl"] .faq summary { padding: 18px 22px 18px 54px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; inset-inline-end: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 300; color: var(--muted); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 22px 20px; color: var(--muted); }
.faq .answer p { margin: 0; }
.faq-section + .faq-section { margin-top: 48px; }
.faq-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 18px; }

/* Help topics */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; color: var(--muted); font-size: 0.92rem; }
.toc a:hover { color: var(--text); border-color: var(--line-strong); }
.topic { padding: 28px 0; border-top: 1px solid var(--line); }
.topic h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 14px; }
.topic ol, .topic ul, .prose ol, .prose ul { padding-inline-start: 1.3em; margin: 0; color: var(--muted); }
.topic li, .prose li { margin: 8px 0; }
.topic p { color: var(--muted); }

/* Pro table */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 16px 20px; text-align: start; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--surface-2); font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 22%; }
.compare tbody tr:nth-child(odd) td { background: rgba(255, 255, 255, 0.015); }
.compare .pro-col { color: var(--text); }
.yes, .no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.yes { background: rgba(74, 222, 128, 0.14); color: var(--ok); }
.no { background: rgba(255, 255, 255, 0.06); color: var(--dim); }
.cell-text { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 640px) {
  .compare th, .compare td { padding: 12px 10px; font-size: 0.9rem; }
}

/* Facts table (about, press) */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.facts dt, .facts dd { margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--dim); background: var(--bg-raised); }
.facts dd { color: var(--text); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 2px; } }

/* Press downloads */
.logo-tile { display: grid; place-items: center; min-height: 160px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); padding: 26px; }
.logo-tile.light { background: #f6f4f8; }
.logo-tile.dark { background: #0b0a10; }
.logo-tile img { max-height: 70px; width: auto; }
.downloads { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.downloads a { font-size: 0.88rem; }
blockquote.quote { margin: 0; padding: 22px 26px; border-inline-start: 3px solid var(--rose);
  background: var(--bg-raised); border-radius: var(--radius-sm); color: var(--text); }

/* Breadcrumb */
.breadcrumb { margin: 0 0 22px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 0.88rem; color: var(--dim); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; color: var(--dim); }
.breadcrumb a { color: var(--muted); text-decoration: none; }

/* Page hero for inner pages */
.page-hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(24px, 4vw, 48px); }
.page-hero.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .page-hero.split { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; }
.field .hint { color: var(--dim); font-size: 0.85rem; margin-top: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg-raised); border: 1px solid var(--line-strong);
}
.field textarea { min-height: 180px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(167, 123, 255, 0.25); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.errors { padding: 16px 20px; border-radius: 12px; background: rgba(238, 90, 139, 0.1);
  border: 1px solid rgba(238, 90, 139, 0.4); }
.errors ul { margin: 0; padding-inline-start: 1.2em; }
.success { text-align: center; padding: clamp(32px, 6vw, 64px); }
.success .icon { width: 48px; height: 48px; margin: 0 auto 18px; color: var(--ok); }
.form button[disabled] { opacity: 0.6; cursor: progress; }
.side-links { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.side-links a { color: var(--text); }

/* Prose (legal pages) */
.prose { color: var(--muted); }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); color: var(--text); margin: 44px 0 14px; }
.prose h3 { color: var(--text); margin: 26px 0 8px; }
.prose p { margin: 12px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.93rem; }
.prose th, .prose td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); }
.prose .summary { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px 24px; color: var(--text); }
.table-scroll { overflow-x: auto; }

/* Final call to action */
.final { text-align: center; }
.final .band { padding-block: clamp(48px, 7vw, 96px); }
.final .lead { max-width: 640px; margin-inline: auto; }

/* ------------------------------------------------------------------ footer */

.site-footer { border-top: 1px solid var(--line); margin-top: clamp(48px, 8vw, 96px); padding: 56px 0 40px;
  background: #07060a; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-grid h2 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 14px; }
:lang(ja) .footer-grid h2, :lang(ar) .footer-grid h2 { letter-spacing: 0.04em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-grid a.store, .footer-grid a.store:hover { color: #0b0a10; }
.footer-brand img { height: 28px; width: auto; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); margin: 0 0 18px; max-width: 320px; }
.social-title { margin: 26px 0 10px; color: var(--dim); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; }
:lang(ja) .social-title, :lang(ar) .social-title { letter-spacing: 0.04em; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.social a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.social a:hover { color: var(--text); }
.social .icon { color: currentColor; width: 20px; height: 20px; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--line); }
.footer-langs a { color: var(--dim); text-decoration: none; font-size: 0.88rem; }
.footer-langs a[aria-current="true"] { color: var(--text); }
.footer-legal { margin-top: 22px; color: var(--dim); font-size: 0.82rem; }
.footer-legal p { margin: 6px 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ page transitions */
/* Browsers that support cross-document view transitions (Safari 18.2+, Chrome 126+)
   fade the page between links while the header stays in place. Others just navigate. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
.cursor-glow { view-transition-name: cursor-glow; }
::view-transition-group(site-header), ::view-transition-group(cursor-glow) { animation-duration: 0.45s; }
::view-transition-old(root) { animation: page-out 0.22s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: page-in 0.42s cubic-bezier(0, 0, 0.2, 1) 0.06s both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-10px) scale(0.995); filter: blur(3px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } }

/* ------------------------------------------------------------------ cursor glow */
.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: -1;
  width: 720px; height: 720px; margin: -360px 0 0 -360px; border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(167, 123, 255, 0.13), rgba(238, 90, 139, 0.06) 45%, rgba(247, 178, 103, 0.025) 65%, transparent);
  pointer-events: none; opacity: 0; transition: opacity 0.6s ease; will-change: transform;
}
.cursor-glow.on { opacity: 1; }

/* ------------------------------------------------------------------ screenshot viewer */
.shot-link {
  display: block; border-radius: 24px; cursor: zoom-in;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}
.shot-link:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.shot-link:focus-visible { outline-offset: 4px; border-radius: 26px; }
html.viewer-open { overflow: hidden; }

.viewer {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--text); overflow: hidden;
}
.viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.viewer::backdrop {
  background: rgba(6, 5, 9, 0.88);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  opacity: var(--viewer-fade, 1);
  animation: viewer-fade 0.3s ease both;
}
.viewer.closing::backdrop { animation: viewer-fade 0.3s ease reverse both; }
.viewer-stage {
  display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden;
  padding: calc(68px + env(safe-area-inset-top)) 84px 8px; touch-action: none; user-select: none;
}
.viewer-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; min-width: 0; min-height: 0; border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); -webkit-user-drag: none; cursor: grab;
}
.viewer-bar { padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); text-align: center; }
.viewer-caption { margin: 0 auto; max-width: 520px; font-size: 0.98rem; }
.viewer-meta { margin: 6px 0 0; display: flex; justify-content: center; align-items: center; gap: 16px; }
.viewer-count { color: var(--dim); font-size: 0.82rem; font-variant-numeric: tabular-nums; direction: ltr; }
.viewer-download {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.85rem; text-decoration: none;
}
.viewer-download:hover { color: var(--text); }
.viewer-download[hidden] { display: none; }
.viewer-download svg { width: 16px; height: 16px; }
.viewer-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.25s ease;
}
.viewer-btn:hover { background: rgba(255, 255, 255, 0.16); }
.viewer-btn:active { transform: scale(0.94); }
.viewer-btn svg { width: 22px; height: 22px; }
.viewer-close { top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 14px; }
.viewer-prev, .viewer-next { top: 50%; margin-top: -24px; }
.viewer-prev { inset-inline-start: 18px; }
.viewer-next { inset-inline-end: 18px; }
[dir="rtl"] .viewer-prev svg, [dir="rtl"] .viewer-next svg { transform: scaleX(-1); }
.viewer.closing .viewer-btn, .viewer.closing .viewer-bar { opacity: 0; transition: opacity 0.2s ease; }
@media (max-width: 700px) {
  .viewer-stage { padding: calc(64px + env(safe-area-inset-top)) 14px 4px; }
  .viewer-prev, .viewer-next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); margin-top: 0; width: 44px; height: 44px; }
  .viewer-bar { padding-inline: 70px; }
}
@keyframes viewer-fade { from { opacity: 0; } }

/* ------------------------------------------------------------------ human check */
.human-check {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 16px;
  padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong); transition: border-color 0.25s ease, background 0.25s ease;
}
.human-check[hidden] { display: none; }
.human-check[data-state="done"] { border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.05); }
.hc-box {
  display: inline-flex; align-items: center; gap: 14px; padding: 4px 10px 4px 4px; margin: -4px;
  border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  text-align: start;
}
.hc-box:focus-visible { outline-offset: 2px; }
.hc-mark {
  position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 9px; border: 1.5px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.hc-box:hover .hc-mark { border-color: rgba(255, 255, 255, 0.55); }
.hc-box:active .hc-mark { transform: scale(0.92); }
.hc-ring { position: absolute; inset: -4px; width: 36px; height: 36px; opacity: 0; }
.hc-ring circle { fill: none; stroke: var(--violet); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 28 70; }
.hc-tick { width: 20px; height: 20px; }
.hc-tick path {
  fill: none; stroke: #0b0a10; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.35s ease 0.1s;
}
[data-state="checking"] .hc-mark { border-color: transparent; background: rgba(167, 123, 255, 0.1); }
[data-state="checking"] .hc-ring { opacity: 1; animation: hc-spin 0.8s linear infinite; }
[data-state="checking"] .hc-box { cursor: progress; }
[data-state="done"] .hc-mark { background: var(--ok); border-color: var(--ok); animation: hc-pop 0.35s ease; }
[data-state="done"] .hc-tick path { stroke-dashoffset: 0; }
[data-state="done"] .hc-box { cursor: default; }
.hc-side { justify-self: end; display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 0.78rem; }
.hc-side .icon { width: 15px; height: 15px; }
.hc-hint { grid-column: 1 / -1; margin: 0; color: var(--dim); font-size: 0.85rem; }
.hc-status { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; color: var(--muted); }
.hc-status:empty { display: none; }
[data-state="done"] .hc-status { color: var(--ok); }
[data-state="failed"] .hc-status, .hc-nudge .hc-status { color: var(--rose); }
.human-check.hc-nudge { border-color: rgba(238, 90, 139, 0.6); animation: hc-nudge 0.42s ease; }
@media (max-width: 480px) { .hc-side { display: none; } }
@keyframes hc-spin { to { transform: rotate(360deg); } }
@keyframes hc-pop { 50% { transform: scale(1.12); } }
@keyframes hc-nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot-link:hover { transform: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
