/* ==========================================================================
   Crty – site styles (landing, legal, 404).  The public profile page uses assets/crty.css.
   Same design language as the profile page: Cairo, glass cards, pastel gradient, calm "art" background.
   Tokens = the "default" theme of crty-public-page/themes.json (light + dark).
   ========================================================================== */

/* ---- Fonts (self-hosted Cairo variable font, SIL OFL 1.1 – see fonts/Cairo-OFL.txt) ---- */
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/cairo-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; }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/cairo-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/cairo-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; }

:root {
  color-scheme: light;
  --font: "Cairo", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Segoe UI", Roboto, sans-serif;
  --bg: #F6F6F9;
  --text: #17171B;
  --muted: #5C5C66;
  --surface: rgba(255,255,255,0.72);
  --surface-2: rgba(255,255,255,0.92);
  --border: rgba(23,23,27,0.08);
  --border-2: rgba(23,23,27,0.14);
  --grad: linear-gradient(135deg, #F9FBC9 0%, #CDEFF8 50%, #D3D0F5 100%);
  --grad-text: linear-gradient(120deg, #6F63D8 0%, #2E9CC4 100%);
  --on-accent: #17171B;
  --badge: #6F63D8;
  --badge-check: #FFFFFF;
  --ok: #1E7A46;
  --bad: #B3261E;
  --shadow: 0 16px 40px rgba(60,60,90,0.10);
  --shadow-lg: 0 30px 80px rgba(60,60,90,0.16);
  --ring: conic-gradient(from 210deg, #F9FBC9, #CDEFF8, #D3D0F5, #F9FBC9);
  --art: radial-gradient(70% 40% at 0% 0%, rgba(205,239,248,0.95) 0%, transparent 70%),
         radial-gradient(60% 40% at 100% 6%, rgba(211,208,245,0.95) 0%, transparent 70%),
         radial-gradient(90% 30% at 50% 100%, rgba(249,251,201,0.9) 0%, transparent 70%);
  --r-card: 28px;
  --r-row: 20px;
  --glass: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111114;
    --text: #F6F6F8;
    --muted: #A6A6B0;
    --surface: rgba(255,255,255,0.06);
    --surface-2: rgba(255,255,255,0.09);
    --border: rgba(255,255,255,0.12);
    --border-2: rgba(255,255,255,0.2);
    --grad-text: linear-gradient(120deg, #F9FBC9 0%, #CDEFF8 50%, #D3D0F5 100%);
    --badge: #CDEFF8;
    --badge-check: #111114;
    --ok: #9BE7B9;
    --bad: #FF9B9B;
    --shadow: 0 20px 50px rgba(0,0,0,0.35);
    --shadow-lg: 0 30px 80px rgba(0,0,0,0.5);
    --art: radial-gradient(70% 40% at 0% 0%, rgba(205,239,248,0.20) 0%, transparent 70%),
           radial-gradient(60% 40% at 100% 6%, rgba(211,208,245,0.22) 0%, transparent 70%),
           radial-gradient(90% 30% at 50% 100%, rgba(249,251,201,0.08) 0%, transparent 70%);
  }
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background-color: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  position: relative; isolation: isolate; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: -6%; z-index: -1; pointer-events: none;
  background-image: var(--art); animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(0,-2%,0) scale(1.04); } }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--badge); outline-offset: 3px; border-radius: 10px; }
.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.card, .f-card, .step, .legal-in, .nf-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(var(--glass)); backdrop-filter: blur(var(--glass));
}

/* ---- Buttons ---- */
.btn {
  height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-grad { background: var(--grad); color: var(--on-accent); }
.btn-grad:hover { box-shadow: 0 10px 28px rgba(160,150,230,.35); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-glass { background: var(--surface-2); border-color: var(--border); }

/* ---- Reveal (CSS only) ---- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
@supports (animation-timeline: view()) {
  main .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  .hero .reveal { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; animation-timeline: auto; }
}

/* ---- Navigation ---- */
.nav { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.nav-logo img { border-radius: 50%; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 500; color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); }
@media (max-width: 760px) { .nav-links a:not(.btn):not(.nav-lang) { display: none; } .nav-links { gap: 14px; } }

/* ---- Hero ---- */
.hero { padding: 60px 0 30px; overflow-x: clip; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero-in > * { min-width: 0; }
@media (max-width: 920px) { .hero-in { grid-template-columns: minmax(0, 1fr); gap: 48px; } .hero { padding-top: 32px; } }
.kicker {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 600;
}
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 3px rgba(205,239,248,.35); }
.hero-title { font-size: clamp(40px, 6.6vw, 74px); font-weight: 800; line-height: 1.04; }
[dir="rtl"] .hero-title { line-height: 1.3; }
.hero-text { margin: 20px 0 28px; max-width: 34em; font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); }

.claim { max-width: 520px; width: 100%; }
.claim-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.claim-box {
  display: flex; align-items: center; gap: 6px; padding: 6px; padding-inline-start: 18px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.claim-box:focus-within { border-color: var(--badge); box-shadow: 0 0 0 4px color-mix(in srgb, var(--badge) 18%, transparent); }
.claim-prefix { color: var(--muted); font-weight: 600; }
.claim-box input { flex: 1; min-width: 0; width: 100%; height: 44px; border: 0; outline: 0; background: transparent; font-size: 17px; font-weight: 700; }
.claim-box input::placeholder { color: var(--muted); font-weight: 500; opacity: .8; }
.claim-msg { min-height: 24px; margin: 10px 4px 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.claim-msg.ok { color: var(--ok); } .claim-msg.bad { color: var(--bad); }

.store { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.appstore { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 16px; border-radius: 14px;
  background: #000; color: #fff; border: 1px solid rgba(255,255,255,.2); transition: transform .15s ease; }
.appstore:hover { transform: translateY(-2px); }
.appstore svg { width: 26px; height: 26px; fill: currentColor; }
.appstore span { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.appstore small { font-size: 11px; opacity: .8; }
.appstore strong { font-size: 19px; font-weight: 700; }
.appstore.is-soon { opacity: .78; cursor: default; }
.appstore.is-soon:hover { transform: none; }

/* phone mockup – same look as the real profile page */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 600px; }
.peek { position: absolute; width: 168px; height: auto; border-radius: 22px; box-shadow: var(--shadow-lg); }
.peek-1 { inset-inline-start: 2%; top: 70px; transform: rotate(-9deg); }
.peek-2 { inset-inline-end: 2%; bottom: 60px; transform: rotate(8deg); }
@media (max-width: 520px) { .peek { width: 120px; } .peek-1 { inset-inline-start: -4%; } .peek-2 { inset-inline-end: -4%; } }
.phone {
  position: relative; z-index: 1; width: 300px; height: 600px; padding: 11px; border-radius: 50px;
  background: linear-gradient(160deg, #2c2c33, #0c0c0e); box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255,255,255,.14), 0 0 0 1px #000;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { translate: 0 -10px; } }
.phone-notch { position: absolute; top: 21px; left: 50%; translate: -50% 0; width: 90px; height: 26px; border-radius: 20px; background: #000; z-index: 2; }
.phone-screen {
  height: 100%; border-radius: 40px; overflow: hidden; padding: 56px 12px 12px; color: #F6F6F8; background: #111114;
  background-image: radial-gradient(90% 40% at 0% 0%, rgba(205,239,248,.24) 0%, transparent 70%), radial-gradient(80% 40% at 100% 8%, rgba(211,208,245,.26) 0%, transparent 70%);
  display: flex; flex-direction: column; gap: 8px;
}
.m-card { display: flex; flex-direction: column; align-items: center; padding: 16px 12px 12px; border-radius: 22px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.m-ring { width: 66px; height: 66px; padding: 3px; border-radius: 50%; background: conic-gradient(from 210deg, #F9FBC9, #CDEFF8, #D3D0F5, #F9FBC9); display: flex; }
.m-avatar { flex: 1; border-radius: 50%; border: 3px solid #111114; background: #26262D; display: grid; place-items: center; font: 800 20px/1 var(--font); }
.m-name { margin: 8px 0 0; display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 15px; }
.m-verified { width: 15px; height: 15px; } .m-verified circle { fill: #CDEFF8; } .m-verified path { stroke: #111114; }
.m-pro { height: 16px; padding: 0 6px; border-radius: 8px; background: var(--grad); color: #17171B; font: 800 8.5px/16px var(--font); letter-spacing: 1px; }
.m-pill { margin-top: 6px; height: 22px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  font-size: 10.5px; color: #A6A6B0; display: inline-flex; align-items: center; }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin-top: 10px; }
.m-btn { height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.m-btn-primary { background: var(--grad); color: #17171B; border: 0; }
.m-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.m-links li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 15px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.m-links li:nth-child(2) { animation-delay: .1s } .m-links li:nth-child(3) { animation-delay: .2s } .m-links li:nth-child(4) { animation-delay: .3s }
.m-ic { width: 32px; height: 32px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: none; }
.m-ic img { width: 20px; height: 20px; }
.m-txt { display: grid; min-width: 0; text-align: start; }
.m-txt small { font-size: 9.5px; color: #A6A6B0; }
.m-txt b { font-size: 12.5px; font-weight: 700; direction: ltr; unicode-bidi: isolate; text-align: start; }
[dir="rtl"] .m-txt b { text-align: right; }
@media (max-width: 420px) { .phone { width: 268px; height: 540px; } .hero-visual { min-height: 560px; } }

/* ---- Platforms marquee ---- */
.marquee-sec { padding: 36px 0 10px; }
.sec-kicker { text-align: center; margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .sec-kicker { letter-spacing: 0; text-transform: none; font-size: 15px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.m-item { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px 0 7px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 14px; white-space: nowrap; }
.m-item img { width: 32px; height: 32px; padding: 5px; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* ---- Sections ---- */
.features, .themes, .pro, .how, .cta { padding: 84px 0 10px; }
.sec-title { text-align: center; font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; margin-bottom: 14px; }
.sec-text { text-align: center; max-width: 36em; margin: 0 auto 38px; color: var(--muted); }
.features .sec-title, .how .sec-title { margin-bottom: 40px; }
.f-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 920px) { .f-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .f-grid { grid-template-columns: 1fr; } }
.f-card { padding: 24px; transition: transform .25s ease; }
.f-card:hover { transform: translateY(-3px); }
.f-ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; margin-bottom: 16px; background: var(--grad); color: #17171B; }
.f-ic svg { width: 24px; height: 24px; }
.f-card h3 { font-size: 19px; margin-bottom: 6px; }
.f-card p { margin: 0; color: var(--muted); }

/* themes showcase */
.t-grid { list-style: none; margin: 0; padding: 4px 2px 10px; display: grid; grid-template-columns: repeat(9, 168px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; justify-content: start; scrollbar-width: none; }
.t-grid::-webkit-scrollbar { display: none; }
@media (min-width: 1140px) { .t-grid { display: flex; flex-wrap: wrap; justify-content: center; overflow: visible; gap: 22px; } .t-tile { width: 186px; } }
.t-tile { scroll-snap-align: start; display: grid; gap: 10px; }
.t-tile img { width: 100%; height: auto; border-radius: 22px; box-shadow: var(--shadow); transition: transform .25s ease; }
.t-tile:hover img { transform: translateY(-4px) rotate(-1deg); }
.t-label { display: flex; align-items: center; justify-content: space-between; font-weight: 700; padding-inline: 4px; }
.t-label small { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.t-free { color: var(--ok); } .t-pro { color: var(--badge); }

/* Crty Pro */
.pro-card { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 36px; align-items: center;
  padding: clamp(26px, 5vw, 52px); border-radius: 36px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(var(--glass)); backdrop-filter: blur(var(--glass)); overflow: hidden; }
.pro-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad); opacity: .22; }
@media (max-width: 860px) { .pro-card { grid-template-columns: minmax(0, 1fr); } }
.pro-head h2 { font-size: clamp(28px, 3.8vw, 42px); font-weight: 800; }
.pro-text { color: var(--muted); margin: 12px 0 18px; }
.pro-once { display: inline-flex; height: 34px; padding: 0 14px; align-items: center; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 700; }
.pro-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pro-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-row); background: var(--surface-2); border: 1px solid var(--border); }
.p-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--grad); color: #17171B; }
.p-ic svg { width: 21px; height: 21px; }
.pro-list b { display: block; font-size: 16px; }
.pro-list small { display: block; font-size: 14px; color: var(--muted); line-height: 1.45; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 26px; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 16px; background: var(--grad); color: #17171B; font-weight: 800; font-size: 20px; }
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); }

.cta { padding-bottom: 84px; }
.cta-card { position: relative; overflow: hidden; text-align: center; padding: 54px 24px; border-radius: 36px; display: grid; justify-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.cta-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad); opacity: .3; }
.cta-mark { width: 84px; height: 84px; padding: 4px; border-radius: 50%; background: var(--ring); display: grid; place-items: center; margin-bottom: 6px; }
.cta-mark img { border-radius: 50%; border: 3px solid var(--bg); }
.cta-card h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.cta-card p { margin: 0 0 12px; color: var(--muted); }

/* ---- Footer ---- */
.site-foot { border-top: 1px solid var(--border); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 14px; font-weight: 500; }
.foot-links a:hover { color: var(--text); }
.foot-copy { margin: 0; margin-inline-start: auto; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .foot-copy { margin-inline-start: 0; width: 100%; } }

/* ---- Legal ---- */
.legal { padding: 36px 0 80px; }
.legal-in { max-width: 820px; padding: clamp(24px, 5vw, 54px); }
.legal h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; }
.legal h2 { font-size: 20px; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin: 0 0 10px; }
.legal ul { padding-inline-start: 22px; }
.legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal-meta { font-size: 14px; margin-top: 8px !important; }
.legal-note { padding: 12px 16px; border-radius: 14px; background: var(--surface-2); color: var(--text) !important; }
.legal-sum, .legal-toc { margin: 24px 0 0; padding: 18px 22px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); }
.legal-sum h2, .legal-toc h2 { margin: 0 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
[dir="rtl"] .legal-sum h2, [dir="rtl"] .legal-toc h2 { text-transform: none; letter-spacing: 0; }
.legal-sum ul { margin: 0; }
.legal-sum li { color: var(--text); margin: 4px 0; }
.legal-toc ol { margin: 0; padding-inline-start: 22px; columns: 2 220px; column-gap: 28px; }
.legal-toc li { margin: 3px 0; break-inside: avoid; }
.legal-toc a { color: var(--muted); text-decoration: none; }
.legal-toc a:hover { color: var(--text); text-decoration: underline; }
.legal-sec { scroll-margin-top: 90px; }
.legal-n { color: var(--muted); font-weight: 600; }
.legal li { margin: 4px 0; }

/* ---- 404 ---- */
.nf { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 40px 16px; }
.nf-card { max-width: 480px; padding: 42px 28px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.nf-code { margin: 0; font: 800 92px/1 var(--font); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf h1 { font-size: 26px; }
.nf p { margin: 0; color: var(--muted); }
.nf-claim { font-size: 18px; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); margin: 6px 0 10px !important; }
.nf-claim b { color: var(--text); }

/* ---- Toast ---- */
.toast { position: fixed; inset-inline: 0; bottom: calc(24px + env(safe-area-inset-bottom)); margin: 0 auto; width: max-content; max-width: 90vw; z-index: 50;
  padding: 10px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

/* language switch (no reload): short fade while the other language loads */
html.lang-switching body > * { opacity: .45; transition: opacity .15s ease; }

/* ---- Motion & print ---- */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { body::before, .nav, .site-foot, .toast, .legal-toc { display: none !important; } body { background: #fff; color: #000; } .legal p, .legal li { color: #000; } }
