/* ==========================================================================
   Bytenix — site theme (dark first, light optional)
   ========================================================================== */
@font-face { font-family: "Sora"; src: url("../fonts/sora-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Hind"; src: url("../fonts/hind-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hind"; src: url("../fonts/hind-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Hind"; src: url("../fonts/hind-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #070B18;
  --bg-2: #0B1124;
  --surface: #0F1630;
  --surface-2: #151E3D;
  --surface-3: #1B2650;
  --line: rgba(160, 180, 230, 0.12);
  --line-2: rgba(160, 180, 230, 0.22);
  --text: #E6EAF5;
  --muted: #A3ADC6;
  --heading: #FFFFFF;
  --brand: #19C2A8;
  --brand-ink: #03201B;
  --link: #5FE0CB;
  --danger: #FF7A66;
  --ok: #46D39A;
  --warn: #F2B544;
  --star: #F7C04A;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  --radius: 22px;
  --max: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --body: "Hind", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F4F6FB;
  --bg-2: #EAEFF7;
  --surface: #FFFFFF;
  --surface-2: #F3F6FB;
  --surface-3: #E8EDF6;
  --line: rgba(16, 25, 53, 0.10);
  --line-2: rgba(16, 25, 53, 0.20);
  --text: #1B2440;
  --muted: #4A5468;
  --heading: #101935;
  --brand-ink: #FFFFFF;
  --link: #0A7363;
  --danger: #C2361F;
  --ok: #157A4E;
  --warn: #8A5A00;
  --star: #D89A12;
  --shadow: 0 24px 60px -30px rgba(16, 25, 53, 0.35);
  color-scheme: light;
}
:root[data-theme="light"] .btn-primary { background: #0A7363; }
:root[data-theme="light"] .btn-primary:hover { background: #085E51; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: var(--ease); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.6; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
/* html2canvas (PDF/JPG downloads) measures font baselines with a tiny <img> in an unnamed <div> on <body>; a block img breaks that and shifts text in the download */
body > div:not([class]):not([id]) > img { display: inline; vertical-align: baseline; max-width: none; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--heading); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--heading); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }

/* ---------- Announcement ---------- */
.announce { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 22%, var(--bg)), color-mix(in srgb, #8B7BF0 22%, var(--bg))); color: var(--heading); text-align: center; font-size: 15px; padding: 8px 16px; }
.announce a { color: inherit; font-weight: 600; }
.announce[hidden] { display: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; }
.brand img { height: 28px; width: auto; }
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; transition: color .2s, background .2s; }
.nav a:hover { color: var(--heading); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--heading); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--brand); }
/* "More" dropdown */
.nav-more { position: relative; }
.nav-more-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: none; background: none; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; transition: color .2s, background .2s; }
.nav-more-btn:hover { color: var(--heading); background: var(--surface-2); }
.nav-more-btn svg { transition: transform .2s; }
.nav-more.open .nav-more-btn svg { transform: rotate(180deg); }
.nav-drop { position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s, transform .2s var(--ease), visibility .2s; z-index: 60; }
.nav-more.open .nav-drop { opacity: 1; visibility: visible; transform: none; }
.nav-drop a { display: flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 10px; white-space: nowrap; }
.nav-drop a[aria-current="page"]::after { display: none; }
.nav-drop a[aria-current="page"] { background: var(--surface-2); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 18px; background: var(--bg-2); border-bottom: 1px solid var(--line); transform-origin: top; transform: scaleY(.96); opacity: 0; visibility: hidden; transition: opacity .2s, transform .25s var(--ease), visibility .2s; }
  .nav.open { opacity: 1; transform: none; visibility: visible; }
  .nav a { border-radius: 12px; padding: 0 14px; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { background: var(--surface-2); }
  /* On mobile, "More" items show inline (no floating dropdown) */
  .nav-more-btn { display: none; }
  .nav-drop { position: static; min-width: 0; padding: 0; border-radius: 0; background: none; border: none; box-shadow: none; opacity: 1; visibility: inherit; transform: none; display: flex; flex-direction: column; gap: 4px; }
}

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 14px; font-weight: 600; font-size: 16.5px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .25s var(--ease), background .2s, box-shadow .3s, border-color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { color: var(--brand-ink); box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-ghost { background: var(--surface); color: var(--heading); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--heading); background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 15px; border-radius: 11px; }
.btn-xs { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Badges, chips, stars ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--link); }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.live { color: var(--ok); }
.badge.soon { color: var(--warn); }
.badge.beta { color: #8FB3FF; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.live .dot { position: relative; }
.badge.live .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(3); opacity: 0; } }
.stars { display: inline-flex; gap: 2px; color: var(--star); vertical-align: middle; }
.stars svg { width: 16px; height: 16px; }
.stars .off { color: var(--line-2); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500; cursor: pointer; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.chip:hover { background: var(--surface-2); transform: translateY(-1px); color: var(--heading); }
.chip[aria-pressed="true"] { background: var(--heading); color: var(--bg); border-color: var(--heading); }

/* ---------- Reveal animation ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.word { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(2deg); animation: wordIn .9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes wordIn { to { opacity: 1; transform: none; } }

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(to bottom, transparent, var(--bg)); z-index: -1; pointer-events: none; }
.hero .wrap { min-height: min(86vh, 760px); display: flex; align-items: center; padding-top: 60px; padding-bottom: 90px; }
.hero-copy { max-width: 640px; }
.hero h1 { font-size: clamp(42px, 7vw, 82px); line-height: 1.02; letter-spacing: -0.035em; margin: 22px 0 22px; }
.hero h1 .grad, .hero h1 .grad .word { background: linear-gradient(100deg, var(--brand), #8FB3FF 55%, #B9A8FF); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.hero h1 .grad:has(.word) { background: none; }
.hero .lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 560px; margin-bottom: 34px; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--line-2); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--brand); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section { padding: 88px 0; position: relative; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 48px); margin-top: 12px; }
.section-head p { color: var(--muted); max-width: 560px; margin-top: 10px; }

/* ---------- Category cards (home) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.cat-card { --c: var(--brand); position: relative; display: flex; flex-direction: column; min-height: 360px; border-radius: 28px; padding: 26px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease); }
.cat-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 26%, transparent), transparent 60%); opacity: .55; transition: opacity .4s; }
.cat-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); color: var(--text); }
.cat-card:hover::before { opacity: 1; }
.cat-card .scene { position: relative; height: 150px; margin: -6px -6px 18px; border-radius: 18px; overflow: hidden; background: color-mix(in srgb, var(--c) 9%, var(--bg-2)); }
.cat-card h3 { font-size: 26px; margin-bottom: 6px; }
.cat-card p { color: var(--muted); }
.cat-card .foot { margin-top: auto; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; color: var(--heading); }
.cat-card .go { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--c); color: #07101F; transition: transform .4s var(--ease); }
.cat-card:hover .go { transform: rotate(-45deg) scale(1.06); }

/* Mini scenes (CSS only) */
.scene.orbit .ph { position: absolute; width: 46px; height: 82px; border-radius: 10px; border: 2px solid color-mix(in srgb, var(--c) 80%, white); background: color-mix(in srgb, var(--c) 18%, var(--bg)); animation: float 6s ease-in-out infinite; }
.scene.orbit .ph::after { content: ""; position: absolute; left: 8px; right: 8px; top: 12px; height: 26px; border-radius: 5px; background: color-mix(in srgb, var(--c) 55%, transparent); }
.scene.orbit .ph:nth-child(1) { left: 18%; top: 34px; }
.scene.orbit .ph:nth-child(2) { left: 44%; top: 18px; animation-delay: -2s; transform: scale(1.12); }
.scene.orbit .ph:nth-child(3) { left: 70%; top: 40px; animation-delay: -4s; }
@keyframes float { 0%, 100% { translate: 0 0; rotate: -4deg; } 50% { translate: 0 -12px; rotate: 4deg; } }
.scene.arcade i { position: absolute; top: -20px; width: 16px; height: 16px; border-radius: 4px; background: var(--c); animation: fall 3.2s linear infinite; opacity: .9; }
.scene.arcade i:nth-child(odd) { background: #F2B544; }
.scene.arcade i:nth-child(1) { left: 10%; animation-delay: -.2s; } .scene.arcade i:nth-child(2) { left: 24%; animation-delay: -1.4s; }
.scene.arcade i:nth-child(3) { left: 38%; animation-delay: -2.6s; } .scene.arcade i:nth-child(4) { left: 52%; animation-delay: -.8s; }
.scene.arcade i:nth-child(5) { left: 66%; animation-delay: -2s; } .scene.arcade i:nth-child(6) { left: 80%; animation-delay: -3s; }
.scene.arcade i:nth-child(7) { left: 90%; animation-delay: -1.1s; }
@keyframes fall { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(200px) rotate(270deg); } }
.scene.grid::before, .scene.bits::before { content: ""; position: absolute; inset: -26px 0 0 -26px; background-image: linear-gradient(color-mix(in srgb, var(--c) 30%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--c) 30%, transparent) 1px, transparent 1px); background-size: 26px 26px; animation: gridshift 6s linear infinite; will-change: transform; }
.scene.grid .sheet { position: absolute; left: 50%; top: 50%; width: 64px; height: 84px; margin: -42px 0 0 -32px; border-radius: 8px; background: var(--surface); border: 2px solid var(--c); animation: sheet 4s var(--ease) infinite; }
.scene.grid .sheet::before, .scene.grid .sheet::after { content: ""; position: absolute; left: 10px; right: 10px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--c) 60%, transparent); top: 18px; box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 40%, transparent), 0 20px 0 color-mix(in srgb, var(--c) 40%, transparent); }
.scene.grid .sheet::after { top: auto; bottom: -26px; left: 22px; right: 22px; height: 10px; box-shadow: none; background: var(--c); border-radius: 5px; animation: scanline 2s var(--ease) infinite alternate; }
@keyframes gridshift { to { transform: translate(26px, 26px); } }
@keyframes bitshift { to { transform: translate(18px, 18px); } }
@keyframes sheet { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-6px); } }
@keyframes scanline { from { transform: translateY(-96px); opacity: .2; } to { transform: translateY(-8px); opacity: .9; } }
.scene.pages .pg { position: absolute; left: 50%; top: 28px; width: 70px; height: 94px; margin-left: -35px; border-radius: 6px; background: var(--surface); border: 2px solid var(--c); transform-origin: bottom center; animation: fan 5s var(--ease) infinite; }
.scene.pages .pg:nth-child(1) { --r: -18deg; } .scene.pages .pg:nth-child(2) { --r: 0deg; } .scene.pages .pg:nth-child(3) { --r: 18deg; }
@keyframes fan { 0%, 15%, 100% { transform: rotate(0); } 40%, 75% { transform: rotate(var(--r)); } }
.scene.bits::before { inset: -18px 0 0 -18px; background-image: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, transparent) 1.5px, transparent 2px); background-size: 18px 18px; animation-name: bitshift; animation-duration: 8s; }

.scene.neural { display: grid; place-items: center; }
.scene.neural svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene.neural .ln path { fill: none; stroke: color-mix(in srgb, var(--c) 45%, transparent); stroke-width: 1.4; }
.scene.neural .nd circle { fill: var(--surface); stroke: var(--c); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: nodeBlink 3.2s ease-in-out infinite; }
.scene.neural .nd circle:nth-child(2) { animation-delay: -.8s; } .scene.neural .nd circle:nth-child(3) { animation-delay: -1.6s; } .scene.neural .nd circle:nth-child(4) { animation-delay: -2.4s; }
.scene.neural .nd circle:nth-child(5) { animation-delay: -.4s; } .scene.neural .nd circle:nth-child(6) { animation-delay: -1.2s; } .scene.neural .nd circle:nth-child(7) { animation-delay: -2s; } .scene.neural .nd circle:nth-child(8) { animation-delay: -2.8s; }
@keyframes nodeBlink { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }
.scene.neural .chip-ai { position: relative; width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; font: 700 18px/1 Sora, sans-serif; color: var(--c); background: var(--surface); border: 2px solid var(--c); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 45%, transparent); animation: chipGlow 2.6s ease-in-out infinite; }
@keyframes chipGlow { 50% { transform: scale(1.08); } }

/* ---------- Product cards ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.prod-card { --c: var(--brand); position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transform-style: preserve-3d; transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease), background .3s; will-change: transform; }
.prod-card:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); box-shadow: var(--shadow); color: var(--text); background: var(--surface-2); }
.prod-card .top { display: flex; align-items: center; gap: 14px; }
.p-icon { flex: none; width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 18%, var(--surface-2)); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); overflow: hidden; }
.p-icon img { width: 100%; height: 100%; object-fit: cover; }
.p-icon.lg { width: 104px; height: 104px; border-radius: 28px; }
.prod-card h3 { font-size: 19px; }
.prod-card .tag { color: var(--muted); font-size: 15.5px; }
.prod-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; font-size: 14px; color: var(--muted); }
.prod-card .open { display: inline-flex; align-items: center; gap: 6px; color: var(--heading); font-weight: 600; font-size: 15px; }
.prod-card .open svg { transition: transform .3s var(--ease); }
.prod-card:hover .open svg { transform: translateX(4px); }

/* ---------- Category hero ---------- */
.cat-hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.cat-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.cat-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 18%, color-mix(in srgb, var(--bg) 40%, transparent) 60%, transparent); pointer-events: none; }
.cat-hero .wrap { min-height: 460px; display: flex; flex-direction: column; justify-content: center; padding-top: 56px; padding-bottom: 56px; }
.cat-hero h1 { font-size: clamp(40px, 6vw, 70px); margin: 18px 0 14px; max-width: 760px; }
.cat-hero .lead { color: var(--muted); font-size: 19px; max-width: 600px; }
.cat-hero .count { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search input { width: 100%; min-height: 48px; padding: 0 16px 0 46px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.empty { text-align: center; padding: 56px 24px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.empty h3 { margin-bottom: 8px; font-size: 24px; }
.empty .btn-row { justify-content: center; margin-top: 20px; }

/* ---------- Product page ---------- */
.crumbs { font-size: 15px; color: var(--muted); padding-top: 28px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.p-hero { padding: 26px 0 40px; position: relative; isolation: isolate; }
.p-hero::before { content: ""; position: absolute; inset: -120px 0 auto 0; height: 520px; z-index: -1; background: radial-gradient(600px 300px at 18% 30%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); pointer-events: none; }
.p-hero .wrap { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: flex-start; }
.p-main { flex: 999 1 520px; min-width: 0; }
.p-title { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.p-title h1 { font-size: clamp(34px, 5vw, 56px); }
.p-title .tagline { color: var(--muted); font-size: 19px; margin-top: 6px; }
.p-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 26px; }
.p-side { flex: 1 1 300px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.p-side h2 { font-size: 17px; margin-bottom: 14px; }
.p-side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15.5px; }
.p-side dt { color: var(--muted); }
.p-side dd { margin: 0; color: var(--heading); font-weight: 500; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); }
.prose p { margin-bottom: 14px; color: var(--text); }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.features li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.features li svg { flex: none; color: var(--brand); margin-top: 3px; }
.gallery { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.gallery img { flex: none; height: 380px; width: auto; border-radius: 18px; border: 1px solid var(--line); scroll-snap-align: start; }
.game-frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 10; max-height: 78vh; width: 100%; }
.game-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .game-frame { aspect-ratio: 3 / 4; } }
.stack { display: flex; flex-direction: column; gap: 26px; }
.h-sec { font-size: 26px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }

/* Reviews */
.reviews { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 26px; align-items: start; }
@media (max-width: 820px) { .reviews { grid-template-columns: 1fr; } }
.r-summary { text-align: center; }
.r-summary .big { font-family: var(--display); font-size: 56px; font-weight: 700; color: var(--heading); line-height: 1; }
.r-bars { margin-top: 18px; display: grid; gap: 6px; font-size: 14px; }
.r-bar { display: grid; grid-template-columns: 14px 1fr 30px; gap: 8px; align-items: center; color: var(--muted); }
.r-bar .track { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.r-bar .fill { height: 100%; background: var(--star); border-radius: 4px; transform-origin: left; animation: grow 1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.r-list { display: grid; gap: 14px; }
.r-item { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.r-item .who { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; color: #07101F; background: var(--brand); flex: none; }
.r-item .when { color: var(--muted); font-size: 14px; }
.r-item .src { font-size: 12.5px; }
.r-reply { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--brand); font-size: 15.5px; }
.r-reply b { font-family: var(--display); font-size: 14px; color: var(--heading); display: block; margin-bottom: 2px; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-weight: 600; font-size: 15px; color: var(--heading); }
.field .hint { font-size: 13.5px; color: var(--muted); }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label { cursor: pointer; color: var(--line-2); padding: 2px; transition: transform .15s, color .15s; }
.rating-input label svg { width: 30px; height: 30px; }
.rating-input label:hover, .rating-input label:hover ~ label, .rating-input input:checked ~ label { color: var(--star); }
.rating-input label:hover { transform: scale(1.15); }
.rating-input input:focus-visible + label { outline: 3px solid var(--brand); border-radius: 6px; }
.hp { position: absolute; left: -5000px; }
.note { padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); color: var(--text); }
.note.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.note.err { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

/* ---------- Tools UI ---------- */
.tool { display: grid; gap: 18px; }
.tool > * { min-width: 0; }   /* wide tables and tool bars scroll inside the tool instead of widening the page */
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px; padding: 28px; border-radius: 20px; border: 2px dashed var(--line-2); background: color-mix(in srgb, var(--c, var(--brand)) 5%, var(--bg-2)); text-align: center; cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.drop:hover, .drop.over { border-color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 10%, var(--bg-2)); }
.drop.over { transform: scale(1.01); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .big-ic { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c, var(--brand)) 20%, transparent); color: var(--c, var(--brand)); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.files { display: grid; gap: 10px; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); animation: slideIn .35s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } }
.file .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .size { color: var(--muted); font-size: 14px; }
.file img.th { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.opts .field { margin: 0; min-width: 160px; }
.progress { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #8FB3FF); border-radius: 6px; transition: width .3s var(--ease); }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); animation: slideIn .4s var(--ease); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.thumb { position: relative; padding: 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 8px; justify-items: center; animation: slideIn .35s var(--ease); }
.thumb canvas, .thumb img { max-height: 180px; width: auto; border-radius: 6px; background: #fff; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); transition: transform .3s var(--ease); }
.thumb .n { font-size: 13px; color: var(--muted); }
.thumb .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.thumb .acts button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.thumb .acts button:hover { background: var(--surface-3); }
.thumb.sel { outline: 2px solid var(--brand); }
.editor-stage { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px -12px rgba(0,0,0,.6); }
.editor-stage canvas { max-width: 100%; height: auto; background: #fff; }
.editor-stage .mark { position: absolute; transform: translate(0, -100%); white-space: pre; pointer-events: none; font-family: Helvetica, Arial, sans-serif; line-height: 1; }
/* PDF editor v2: tool bar, overlays */
.ed-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ed-tool { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.ed-tool:hover { border-color: var(--brand); }
.ed-tool[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.ed-props { margin-bottom: 8px; align-items: flex-end; min-height: 74px; }
[data-stage-wrap] [data-hint] { min-height: 42px; }
.ed-props .field { min-width: 0; }
.ed-props [aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.editor-stage .ed-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.editor-stage[data-tool="select"] .ed-svg, .editor-stage[data-tool="edit"] .ed-svg { cursor: default; }
.editor-stage[data-tool="text"] .ed-svg, .editor-stage[data-tool="note"] .ed-svg { cursor: text; }
.editor-stage .ed-svg .on { filter: drop-shadow(0 0 2px #3b82f6) drop-shadow(0 0 2px #3b82f6); }
.editor-stage .mbox { position: absolute; cursor: move; touch-action: none; box-sizing: border-box; outline: 1px dashed transparent; }
.editor-stage .mbox:hover, .editor-stage .mbox.on { outline-color: #3b82f6; }
.editor-stage .mbox img { width: 100%; height: 100%; display: block; pointer-events: none; }
.editor-stage .mbox .grip { position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px; background: #3b82f6; border-radius: 50%; cursor: nwse-resize; border: 2px solid #fff; }
.editor-stage .mtext { padding: 0; }
.editor-stage .medit { cursor: text; padding: 0 1px; }
.editor-stage .runbox { position: absolute; padding: 0; background: transparent; border: 1px dashed color-mix(in srgb, #3b82f6 55%, transparent); border-radius: 2px; cursor: text; }
.editor-stage .runbox:hover, .editor-stage .runbox:focus-visible { background: rgba(59,130,246,.12); border-color: #3b82f6; outline: none; }
@media (max-width: 640px) { .ed-tools { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; max-width: calc(100vw - 40px); } .ed-tool { flex: none; } .ed-props .field { flex: 1 1 45%; } }
.editor-stage .ed-input { position: absolute; z-index: 5; border: 1px solid #3b82f6; border-radius: 3px; padding: 1px 3px; box-shadow: 0 4px 14px rgba(0,0,0,.25); outline: none; }
.out-text { width: 100%; min-height: 240px; font-family: var(--body); font-size: 16px; line-height: 1.6; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); }
.doc-preview { background: #fff; color: #111; padding: 40px; border-radius: 10px; max-height: 70vh; overflow: auto; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.5; }
.doc-preview img { max-width: 100%; height: auto; }
.doc-preview table { border-collapse: collapse; } .doc-preview td, .doc-preview th { border: 1px solid #999; padding: 4px 8px; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tabs button { min-height: 40px; padding: 0 16px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--heading); box-shadow: 0 4px 14px -6px rgba(0,0,0,.4); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Prose pages (policies) ---------- */
.prose-wrap { max-width: 800px; margin: 0 auto; padding: 64px 20px 90px; }
.prose-wrap h1 { font-size: clamp(34px, 5vw, 50px); margin-bottom: 10px; }
.prose-wrap .updated { color: var(--muted); margin-bottom: 34px; }
.prose-wrap .prose h2 { font-size: 23px; margin: 38px 0 12px; }
.prose-wrap .prose p, .prose-wrap .prose ul { margin: 0 0 14px; }
.prose-wrap .prose li { margin-bottom: 6px; }
.prose-wrap .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin: 0 0 14px; }
.unset { background: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--heading); border-radius: 4px; padding: 0 4px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact-card h2 { font-size: 19px; margin-bottom: 6px; }
.contact-card p { color: var(--muted); margin-bottom: 12px; }
.contact-card a.big { font-family: var(--display); font-weight: 600; font-size: 18px; word-break: break-all; }

/* ---------- Why / features strip ---------- */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.why > div { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.why .ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); margin-bottom: 16px; }
.why h3 { font-size: 20px; margin-bottom: 6px; }
.why p { color: var(--muted); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 12px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); color: var(--muted); }
.site-footer .wrap { padding-top: 60px; padding-bottom: 30px; }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.foot-brand img { height: 28px; width: auto; margin-bottom: 14px; }
.foot-col h2 { font-size: 15px; color: var(--heading); margin-bottom: 12px; letter-spacing: 0; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 34px; }
.foot-col a:hover { color: var(--heading); }
.foot-base { border-top: 1px solid var(--line); padding-top: 22px; font-size: 14.5px; display: grid; gap: 6px; }
.socials { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- Toast & modal ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 10px; }
.toast { padding: 12px 16px; border-radius: 14px; background: var(--surface-3); color: var(--heading); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: toastIn .4s var(--ease); max-width: 360px; }
.toast.err { border-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.demo-flag { position: fixed; left: 14px; bottom: 14px; z-index: 60; font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--warn); color: #2B1D00; font-weight: 600; box-shadow: var(--shadow); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero .wrap { min-height: 640px; padding-top: 190px; padding-bottom: 80px; align-items: flex-start; }
  .btn-row .btn { flex: 1 1 auto; }
  .cat-card { min-height: 320px; }
  .gallery img { height: 300px; }
  .doc-preview { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .word { opacity: 1; transform: none; filter: none; }
}

/* ---------- Dialog ---------- */
.dlg { width: min(520px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 28px; border: 1px solid var(--line-2); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 0 40px 120px -30px rgba(0,0,0,.8); }
.dlg.wide { width: min(860px, calc(100vw - 28px)); }
.dlg[open] { animation: dlgIn .45s var(--ease); }
.dlg::backdrop { background: rgba(3, 6, 15, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .3s; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes fadeIn { from { opacity: 0; } }
.dlg h2 { font-size: 26px; padding-right: 40px; }
.dlg-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.pay-opts { display: grid; gap: 12px; }
.pay-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color .2s, transform .2s var(--ease), background .2s; }
.pay-opt:hover { border-color: var(--brand); transform: translateY(-2px); }
.pay-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--bg-2)); }
.pay-opt b { display: block; color: var(--heading); }
.pay-opt small { color: var(--muted); font-size: 14px; }
.pay-opt .po-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); flex: none; }
.pay-opt .po-price { margin-left: auto; font-family: var(--display); font-weight: 700; color: var(--heading); white-space: nowrap; }

/* ---------- Plans ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s, border-color .3s; }
.plan:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.plan.hl { border-color: color-mix(in srgb, var(--brand) 60%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), var(--surface) 60%); }
.plan-flag { position: absolute; top: -12px; right: 20px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 20px -8px var(--brand); }
.plan-cat { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plan h3 { font-size: 22px; }
.plan-price b { font-family: var(--display); font-size: 32px; color: var(--heading); display: block; }
.plan-price small { color: var(--muted); font-size: 14px; }
.plan ul { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 8px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { color: var(--brand); flex: none; margin-top: 3px; }
.plan .btn { margin-top: auto; }
.plan-group { margin-bottom: 48px; }

/* ---------- Locked / ads / account ---------- */
.locked { text-align: center; padding: 40px 24px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--c, var(--brand)) 40%, transparent); background: radial-gradient(400px 200px at 50% 0%, color-mix(in srgb, var(--c, var(--brand)) 16%, transparent), transparent 70%), var(--surface); }
.locked h3 { font-size: 24px; margin: 14px 0 8px; }
.locked p { max-width: 560px; margin: 0 auto 20px; }
.lk-ic { width: 64px; height: 64px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c, var(--brand)) 18%, transparent); color: var(--c, var(--brand)); }
.ad-slot { margin: 10px 0; padding: 10px; border-radius: 16px; border: 1px dashed var(--line); min-height: 100px; }
.ad-label { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.acct-init { font-family: var(--display); font-weight: 700; color: var(--heading); }
.acct-wrap { max-width: 980px; margin: 0 auto; padding: 56px 20px 90px; display: grid; gap: 40px; }
.acct-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.acct-list { display: grid; gap: 12px; }
.acct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.acct-row b { color: var(--heading); font-family: var(--display); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--muted); padding: 12px 14px; background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.premium-hero { text-align: center; padding: 72px 20px 28px; position: relative; }
.premium-hero h1 { font-size: clamp(40px, 6vw, 64px); margin: 16px 0 14px; }
.premium-hero p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0 auto; }
.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 30px; }
.promise div { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.promise b { display: block; color: var(--heading); font-family: var(--display); margin-bottom: 4px; }

/* ==========================================================================
   App pages: bytenix.in/apps/<app>  (privacy, delete data, terms, support)
   ========================================================================== */
.ap { --c: var(--brand); }
.ap-anim { animation: apUp .7s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes apUp { from { opacity: 0; transform: translateY(16px); } }
.ap-hero { position: relative; isolation: isolate; overflow: hidden; padding: 4px 0 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, var(--bg)), var(--bg)); }
.ap-orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ap-orbs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: apDrift 18s ease-in-out infinite alternate; }
.ap-orbs i:nth-child(1) { width: 420px; height: 420px; left: -120px; top: -180px; background: color-mix(in srgb, var(--c) 45%, transparent); }
.ap-orbs i:nth-child(2) { width: 340px; height: 340px; right: -80px; top: -120px; background: color-mix(in srgb, #8B7BF0 35%, transparent); animation-duration: 22s; }
.ap-orbs i:nth-child(3) { width: 260px; height: 260px; left: 45%; bottom: -200px; background: color-mix(in srgb, #4F8CFF 30%, transparent); animation-duration: 26s; }
:root[data-theme="light"] .ap-orbs i { opacity: .28; }
@keyframes apDrift { to { transform: translate(40px, 30px) scale(1.08); } }
.ap-head { display: flex; gap: 22px; align-items: center; padding: 22px 0 26px; }
.ap-head .p-icon.lg { box-shadow: 0 18px 50px -18px color-mix(in srgb, var(--c) 70%, transparent); }
.ap-titles { min-width: 0; }
.ap-kicker { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
:root[data-theme="light"] .ap-kicker { color: color-mix(in srgb, var(--c) 60%, #101935); }
.ap-titles h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 10px; }
.ap-lead { color: var(--text); font-size: 18px; max-width: 720px; }
.ap-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--muted); font-size: 15px; }
.ap-meta span { display: inline-flex; align-items: center; gap: 7px; }
.ap-meta svg { color: var(--c); }
.ap-pkg { font-family: var(--mono); font-size: 14px; }
.ap-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
.ap-tabs::-webkit-scrollbar { display: none; }
.ap-tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 16px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; border-radius: 12px 12px 0 0; transition: color .2s, background .2s; }
.ap-tabs a:hover { color: var(--heading); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.ap-tabs a[aria-current="page"] { color: var(--heading); }
.ap-tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--c); animation: grow .5s var(--ease); }
.ap-wrap { padding-top: 34px; padding-bottom: 90px; display: grid; gap: 28px; }
.ap-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.ap-gl { display: grid; gap: 4px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.ap-gl:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.ap-gl .ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); margin-bottom: 8px; }
.ap-gl b { color: var(--heading); font-family: var(--display); font-size: 16px; }
.ap-gl > span:last-child { color: var(--muted); font-size: 15px; line-height: 1.45; }
.ap-hi { position: relative; padding: 18px 20px 18px 22px; border-radius: 18px; background: color-mix(in srgb, var(--c) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); font-family: "Hind", "Noto Sans Devanagari", "Nirmala UI", sans-serif; font-size: 17.5px; }
.ap-hi-tag { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; color: var(--c); margin-bottom: 4px; }
:root[data-theme="light"] .ap-hi-tag { color: color-mix(in srgb, var(--c) 55%, #101935); }
.ap-note { padding: 14px 18px; border-radius: 16px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); margin: 0 0 16px; }
.ap-who { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); margin: 0 0 14px; }
.ap-who svg { flex: none; color: var(--c); margin-top: 3px; }
.ap-doc-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; align-items: start; }
.ap-doc-grid.single { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.ap-toc { position: sticky; top: 92px; }
.ap-toc summary { font-family: var(--display); font-weight: 600; color: var(--heading); cursor: pointer; list-style: none; margin-bottom: 10px; font-size: 15px; }
.ap-toc summary::-webkit-details-marker { display: none; }
.ap-toc ol { list-style: none; margin: 0; padding: 0 0 0 2px; border-left: 2px solid var(--line); counter-reset: t; }
.ap-toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.35; transition: color .2s, border-color .2s; }
.ap-toc li a:hover, .ap-toc li a.on { color: var(--heading); border-left-color: var(--c); }
.ap-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3.4vw, 40px); min-width: 0; }
.ap-article h2 { font-size: 22px; margin: 0 0 12px; display: flex; gap: 10px; align-items: baseline; }
.ap-sec { padding: 22px 0; border-top: 1px solid var(--line); scroll-margin-top: 92px; }
.ap-sec:first-child { border-top: 0; padding-top: 0; }
.ap-sec:last-child { padding-bottom: 0; }
.ap-article p, .ap-article ul, .ap-article ol { margin: 0 0 12px; }
.ap-article ul, .ap-article ol { padding-left: 22px; }
.ap-article li { margin-bottom: 6px; }
.ap-article li::marker { color: var(--c); }
.ap-article > :last-child > :last-child, .ap-sec > :last-child { margin-bottom: 0; }
.ap-article .table-wrap { margin: 4px 0 14px; }
.ap-article code { font-family: var(--mono); font-size: .86em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.ap-article h3 { font-size: 18px; margin: 18px 0 8px; }
.ap-faqs { display: grid; gap: 10px; }
.ap-faq { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); transition: border-color .25s; }
.ap-faq[open] { border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.ap-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 12px 18px; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 600; color: var(--heading); }
.ap-faq summary::-webkit-details-marker { display: none; }
.ap-faq summary svg { flex: none; color: var(--c); transition: transform .3s var(--ease); }
.ap-faq[open] summary svg { transform: rotate(90deg); }
.ap-faq-body { padding: 0 18px 16px; animation: slideIn .3s var(--ease); }
.ap-faq-body p:last-child { margin-bottom: 0; }
.ap-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ap-doc { position: relative; display: grid; gap: 6px; align-content: start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; overflow: hidden; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.ap-doc::before { content: ""; position: absolute; inset: auto -40% -60% auto; width: 200px; height: 200px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, transparent); filter: blur(30px); opacity: 0; transition: opacity .35s; }
.ap-doc:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: var(--shadow); color: var(--text); }
.ap-doc:hover::before { opacity: 1; }
.ap-doc .ic { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); margin-bottom: 8px; }
.ap-doc b { font-family: var(--display); color: var(--heading); font-size: 19px; }
.ap-doc > span:not(.ic):not(.go) { color: var(--muted); font-size: 15.5px; }
.ap-doc .go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--link); font-weight: 600; font-size: 15px; }
.ap-doc:hover .go svg { transform: translateX(4px); }
.ap-doc .go svg { transition: transform .25s var(--ease); }
.ap-shot-row { display: flex; align-items: flex-start; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.ap-shot { flex: none; scroll-snap-align: start; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); transition: transform .3s var(--ease); }
.ap-shot:hover { transform: translateY(-3px); }
.ap-shot img { height: 380px; width: auto; }
.ap-shot.feature img { height: 220px; }
.ap-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ap-file { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .25s, transform .25s var(--ease); }
.ap-file:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-2px); color: var(--text); }
.ap-file img, .ap-file .ic { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.ap-file .ic { display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.ap-file .nm { display: grid; min-width: 0; }
.ap-file .nm b { color: var(--heading); }
.ap-file .nm small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-form-card { max-width: 860px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 10%, var(--surface)), var(--surface) 60%); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line)); }
.ap-form-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.ap-form-head .ic { flex: none; width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.ap-form-head h2 { font-size: 23px; margin-bottom: 4px; }
.ap-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ap-form .full { grid-column: 1 / -1; }
.ap-form-foot { display: flex; flex-wrap: wrap; gap: 12px; }
.ap-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ap-form-msg:empty { display: none; }
.ap-form-msg { grid-column: 1 / -1; margin-top: 4px; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.ap-form-msg.err { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.ap-next { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-next a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--heading); text-decoration: none; font-weight: 500; transition: border-color .2s, transform .25s var(--ease); }
.ap-next a:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-2px); }
.ap-next a svg { color: var(--c); }
.ap-contact { text-align: center; }
@media (max-width: 900px) {
  .ap-doc-grid { grid-template-columns: minmax(0, 1fr); }
  .ap-toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
  .ap-toc summary { margin-bottom: 0; }
  .ap-toc details[open] summary { margin-bottom: 10px; }
}
@media (max-width: 640px) {
  .ap-head { flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px 0 18px; }
  .ap-head .p-icon.lg { width: 76px; height: 76px; border-radius: 22px; }
  .ap-lead { font-size: 16.5px; }
  .ap-form { grid-template-columns: 1fr; }
  .ap-shot img { height: 300px; }
  .ap-tabs a { padding: 0 12px; }
  .ap-glance { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ap-gl { padding: 14px; }
  .ap-gl .ic { width: 36px; height: 36px; margin-bottom: 4px; }
  .ap-gl b { font-size: 15px; }
  .ap-gl > span:last-child { font-size: 14px; }
}
@media print {
  .site-header, .site-footer, .ap-tabs, .ap-toc, .ap-form-card, .ap-next, .ap-orbs, .demo-flag { display: none !important; }
  .ap-article { border: 0; padding: 0; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Android app (the app shows this website; see assets/js/app.js)
   ========================================================================== */
.get-app { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 16px 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--heading); text-decoration: none; line-height: 1.1; font-weight: 600; transition: border-color .2s, transform .2s var(--ease); }
.get-app:hover { border-color: var(--brand); transform: translateY(-2px); }
.get-app span { display: grid; font-size: 16px; }
.get-app small { font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
/* ---------- AI Tools & Agents ---------- */
.ai-tool .ai-quota { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ai-h { font-size: 17px; margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; color: var(--heading); }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.warn-text { color: var(--warn); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-2, var(--line)); border-radius: 999px; background: var(--surface-2); font-size: 14px; cursor: pointer; }
.chip-check input { accent-color: var(--c, #FF8A3D); }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.badge.err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.ai-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ai-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); min-width: 0; }
.ai-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ai-pre { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.6; }
.ai-todo { margin: 4px 0 8px 20px; line-height: 1.7; }
.ai-more { margin: 10px 0; }
.ai-more > summary { cursor: pointer; font-weight: 600; color: var(--heading); padding: 6px 0; }
.ai-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ai-tabs button { border: 0; background: none; color: var(--muted); padding: 10px 12px; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.ai-tabs button[aria-selected="true"] { color: var(--heading); border-bottom-color: var(--c, #FF8A3D); }
.ai-tabpanel, .ai-md { line-height: 1.65; overflow-wrap: anywhere; }
.ai-md h2, .ai-md h3, .ai-md h4, .ai-md h5 { margin: 16px 0 6px; font-size: 18px; }
.ai-md ul, .ai-md ol { margin: 6px 0 10px 22px; }
.ai-md p { margin: 6px 0; }
.ai-md code, .ai-formula { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.ai-code { background: var(--bg-2, #0B1022); border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow: auto; font-size: 13px; line-height: 1.5; margin: 10px 0; white-space: pre; }
.ai-code code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.ai-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.ai-kpi { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ai-kpi b { font-family: var(--display); font-size: 22px; color: var(--heading); overflow-wrap: anywhere; }
.ai-kpi .muted { font-size: 13px; }
.ai-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ai-chart { width: 100%; height: auto; display: block; }
.ai-chart .bar { fill: var(--c, #FF8A3D); }
.ai-chart .line { fill: none; stroke: var(--c, #FF8A3D); stroke-width: 2.5; }
.ai-chart .dot { fill: var(--c, #FF8A3D); }
.ai-chart .axis { stroke: var(--line-2, var(--line)); }
.ai-chart .lbl, .ai-chart .val { fill: var(--muted); font-size: 13px; font-family: var(--body); }
.ai-askrow { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-askrow .input { flex: 1 1 260px; min-width: 0; }
.ai-answer { margin-top: 12px; }
.ai-thread { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.ai-turn { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.ai-q { margin-bottom: 8px; color: var(--heading); }
.ai-docs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.ai-rule { display: grid; grid-template-columns: minmax(120px, 1fr) 120px minmax(160px, 2fr) auto auto 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 760px) { .ai-rule { grid-template-columns: 1fr 1fr; } .ai-rule .ai-rule-w { grid-column: 1 / -1; } }
.ai-meter { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ai-meter b { font-family: var(--display); font-size: 34px; color: var(--heading); }
.ai-checks { list-style: none; margin: 0; padding: 0; line-height: 1.9; }
.ai-checks li { display: flex; gap: 8px; align-items: center; }
.ai-checks .ok svg { color: var(--ok); } .ai-checks .bad svg { color: var(--danger); }
.ai-edit td[contenteditable] { outline: none; cursor: text; }
.ai-edit td[contenteditable]:focus { box-shadow: inset 0 0 0 2px var(--c, #FF8A3D); }
.tbl.ai-wrap td { white-space: normal; min-width: 200px; }
.ai-dash-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.ai-tool, .ai-tool .panel, .ai-result, .ai-grid2 > *, .ai-kpis > *, .ai-cards > * { min-width: 0; max-width: 100%; }
.ai-tool .tbl-wrap { max-width: 100%; }
.tool.ai-tool { grid-template-columns: minmax(0, 1fr); }
.ai-chart { max-width: 720px; }
.ai-more > summary { display: flex; align-items: center; gap: 8px; list-style: none; }
.ai-more > summary::-webkit-details-marker { display: none; }
.ai-more > summary::before { content: "▸"; color: var(--muted); transition: transform .2s; }
.ai-more[open] > summary::before { transform: rotate(90deg); }
.ai-h svg, .ai-quota svg { flex: none; }

/* ---------- AI tools, Nov 2026: rewrite, photo studio, slides, background remover, credit packs ---------- */
.ai-out { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); max-height: 520px; overflow: auto; }
.ai-diff ins, .ai-todo ins { background: rgba(25,194,168,.22); text-decoration: none; border-radius: 4px; padding: 0 2px; }
.ai-diff del, .ai-todo del { background: rgba(239,68,68,.18); color: var(--muted); border-radius: 4px; padding: 0 2px; }
.ph-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ph-preset { position: relative; cursor: pointer; }
.ph-preset input { position: absolute; opacity: 0; pointer-events: none; }
.ph-preset span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 14px; min-height: 48px; }
.ph-preset span b { font-weight: 600; line-height: 1.25; }
.ph-preset input:checked + span { border-color: var(--c, #FF8A3D); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, #FF8A3D) 35%, transparent); }
.ph-preset input:focus-visible + span { outline: 2px solid var(--c, #FF8A3D); outline-offset: 2px; }
.ph-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.ph-compare figure { margin: 0; min-width: 0; }
.ph-compare img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.ph-compare figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 12px 0; }
.sl-card { aspect-ratio: 16 / 9; background: var(--sb); color: var(--sf); border-radius: 10px; padding: 12px 14px; overflow: hidden; position: relative; font-size: 11px; line-height: 1.35; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); min-width: 0; }
.sl-card > b { font-size: 13px; border-bottom: 2px solid var(--sa); padding-bottom: 3px; align-self: flex-start; }
.sl-card ul { margin: 0 0 0 14px; padding: 0; }
.sl-card q, .sl-card i { color: var(--sm); }
.sl-card .sl-n { position: absolute; right: 8px; bottom: 6px; color: var(--sm); font-size: 10px; }
.sl-title { justify-content: center; border-left: 6px solid var(--sa); }
.sl-title .sl-big { font-size: 16px; border: 0; }
.sl-title .sl-sub { color: var(--sm); }
.sl-sec { background: var(--s2); justify-content: center; align-items: center; text-align: center; }
.sl-sec > b { border: 0; font-size: 16px; align-self: center; }
.sl-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sl-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.sl-stats span { flex: 1; min-width: 60px; background: var(--s2); border-radius: 6px; padding: 6px; display: flex; flex-direction: column; }
.sl-stats b { color: var(--sa); font-size: 14px; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.bg-item { margin: 0; min-width: 0; }
.bg-checker { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background-color: #fff; background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%), linear-gradient(-45deg, #e5e7eb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e7eb 75%), linear-gradient(-45deg, transparent 75%, #e5e7eb 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.bg-checker img { width: 100%; height: auto; display: block; }
.bg-item figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; margin-top: 6px; }
.bg-item figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pp-canvas { max-width: 100%; max-height: 380px; width: auto; height: auto; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px -12px rgba(0,0,0,.4); }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.pack-card { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; position: relative; min-width: 0; }
.pack-card.best { border-color: var(--c, #FF8A3D); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, #FF8A3D) 30%, transparent); }
.pack-card .pk-credits { font-family: var(--display); font-size: 30px; color: var(--heading); line-height: 1.1; }
.pack-card .pk-price { font-size: 20px; font-weight: 700; }
.pack-card .pk-tag { position: absolute; top: -11px; left: 16px; background: var(--c, #FF8A3D); color: #111; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.credit-table { width: 100%; }
.credit-table td:last-child { text-align: right; white-space: nowrap; }
.ai-tool [hidden], .tool [hidden] { display: none !important; }

/* AI Detector */
.det-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.det-head { flex: 1; min-width: 240px; }
.det-gauge { width: 132px; height: 132px; flex: none; }
.det-track { fill: none; stroke: var(--line); stroke-width: 12; }
.det-bar { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.det-bar.det-human { stroke: #22c58b; } .det-bar.det-mixed { stroke: #f2b544; } .det-bar.det-ai { stroke: #ef5a5a; }
.det-num { fill: var(--heading); font: 700 26px var(--display, system-ui); }
.det-cap { fill: var(--muted); font-size: 12px; }
.det-human-bg { background: rgba(34,197,139,.18) !important; } .det-mixed-bg { background: rgba(242,181,68,.2) !important; } .det-ai-bg { background: rgba(239,90,90,.2) !important; }
.det-text { line-height: 1.9; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); max-height: 480px; overflow: auto; overflow-wrap: anywhere; }
.det-s { border-radius: 4px; padding: 1px 2px; cursor: pointer; }
.det-s.d1 { background: rgba(34,197,139,.16); } .det-s.d2 { background: rgba(242,181,68,.22); } .det-s.d3 { background: rgba(255,138,61,.3); } .det-s.d4 { background: rgba(239,90,90,.35); }
.det-s:focus-visible { outline: 2px solid var(--c, #FF8A3D); }
.det-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.det-sigs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.det-sigs li { display: flex; gap: 10px; align-items: flex-start; }
.det-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; }
.det-dot.det-ai { background: #ef5a5a; } .det-dot.det-human { background: #22c58b; } .det-dot.det-mixed { background: #f2b544; }
.det-links { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }

/* Category sub-category groups (Tools hub and any category with subs) */
.subcat-chips{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 28px}
.subchip{display:inline-flex;align-items:center;gap:7px;padding:9px 15px;border-radius:999px;border:1px solid rgba(127,127,127,.32);background:transparent;color:inherit;font:600 14px/1 var(--font-body,inherit);cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.subchip:hover{border-color:var(--c,#4F8CFF)}
.subchip.on{background:var(--c,#4F8CFF);border-color:var(--c,#4F8CFF);color:#06101f}
.subcat-group{margin:0 0 42px}
.subcat-group:last-child{margin-bottom:0}
.subcat-head{display:flex;align-items:center;gap:10px;font-size:20px;margin:0 0 18px;color:var(--c,#4F8CFF)}
.sub-linkcard{display:inline-flex;align-items:center;gap:10px;padding:16px 22px;border-radius:16px;border:1px dashed var(--c,#4F8CFF);color:inherit;text-decoration:none;font-weight:600;transition:background .15s}
.sub-linkcard:hover{background:color-mix(in srgb,var(--c,#4F8CFF) 12%,transparent)}


/* Excel/CSV tools: column picker and table preview */
.chk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px;margin-top:8px}
.chk{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid rgba(127,127,127,.28);border-radius:10px;font-size:14px;cursor:pointer}
.chk input{width:16px;height:16px;flex:none}
.tbl-wrap{overflow:auto;border:1px solid rgba(127,127,127,.22);border-radius:12px;max-height:340px}
.tbl{border-collapse:collapse;font-size:13px;width:100%;white-space:nowrap}
.tbl th,.tbl td{border:1px solid rgba(127,127,127,.18);padding:6px 10px;text-align:left}
.tbl th{position:sticky;top:0;background:var(--c,#4F8CFF);color:#06101f;font-weight:600}


/* FAQ accordion (SEO tool pages) */
.faq-list{display:flex;flex-direction:column;gap:10px;max-width:820px}
.faq-item{border:1px solid rgba(127,127,127,.22);border-radius:12px;padding:0 16px}
.faq-item summary{cursor:pointer;padding:15px 0;font-weight:600;list-style:none;display:flex;justify-content:space-between;gap:12px}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"+";color:var(--c,#4F8CFF);font-weight:700;font-size:20px;line-height:1}
.faq-item[open] summary::after{content:"\2013"}
.faq-item p{margin:0 0 15px;line-height:1.6;opacity:.85}


/* All tools directory (/all-tools) */
.all-tools section{margin:26px 0}
.all-tools h2{font-size:22px;margin:0 0 8px}.all-tools h2 small{font-size:14px;font-weight:400}
.all-tools h3{font-size:15px;color:var(--muted);margin:14px 0 6px}
.all-tools ul{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px 18px}
.all-tools li{display:flex;flex-direction:column;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.all-tools li[hidden],.all-tools section[hidden]{display:none}
.all-tools li a{font-weight:600}
.all-tools li span{font-size:13px;color:var(--muted)}
.cat-guide .prose h2{margin-top:22px}

/* toggle switch (also used by public tools, not only admin) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .tr { width: 44px; height: 26px; border-radius: 13px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background .2s; }
.switch input:checked + .tr { background: color-mix(in srgb, var(--brand) 40%, var(--surface-3)); }
.switch input:checked + .tr::after { transform: translateX(18px); background: var(--brand); }
.switch input:focus-visible + .tr { outline: 3px solid var(--brand); outline-offset: 2px; }
/* Link lists on the home page (All tools and guides, Latest guides): roomy enough to tap */
.link-list { columns: 2; column-gap: 40px; }
.link-list li { margin: 0; padding: 3px 0; }
.link-list a, .link-list h3 a { display: inline-block; min-height: 24px; padding: 2px 0; }
@media (max-width: 640px) { .link-list { columns: 1; } .link-list li { padding: 5px 0; } }

/* Rotate PDF: page previews */
.rt-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 12px; }
.rt-grp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rt-grp > .muted { font-size: 14px; margin-right: 2px; }
.rt-range { margin: 4px 0 12px; }
.rt-range summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.rt-range .opts { margin-top: 10px; }
.rt-help { font-size: 14px; margin: 0 0 12px; }
.rt-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.rt-pick { appearance: none; border: 0; background: none; padding: 0; width: var(--rt, 150px); height: var(--rt, 150px); display: grid; place-items: center; cursor: pointer; border-radius: 10px; }
.rt-pick:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rt-page { display: grid; place-items: center; background: #fff; border-radius: 4px; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); transition: transform .3s var(--ease); color: #666; font-size: 12px; text-align: center; overflow: hidden; }
.rt-page canvas { display: block; max-height: none; box-shadow: none; border-radius: 0; height: auto; }
.rt-turn { color: var(--brand); font-weight: 600; }
.rt-thumb.sel { outline: 2px solid var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface-2)); }
@media (max-width: 560px) { .rt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .rt-thumb { padding: 8px; } .rt-bar { gap: 8px 12px; } }
@media (prefers-reduced-motion: reduce) { .rt-page { transition: none; } }
/* Header & Footer tool */
.hf-grid { display: grid; gap: 8px; margin-bottom: 4px; }
.hf-row { display: grid; grid-template-columns: 70px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
.hf-row b { font-size: 14px; color: var(--heading); }
.hf-prev { margin-top: 16px; }
.hf-prev canvas { max-width: 100%; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }
[data-tok], [data-pre] { cursor: pointer; font-size: 13px; padding: 3px 9px; }
@media (max-width: 640px) { .hf-row { grid-template-columns: 1fr; } }
/* PDF bookmarks & contents */
.toc-list { display: grid; gap: 6px; max-height: 520px; overflow: auto; padding-right: 4px; }
.toc-row { display: grid; grid-template-columns: 24px 110px minmax(0, 1fr) 96px 36px; gap: 8px; align-items: center; }
.toc-row.lv2 { padding-left: 18px; } .toc-row.lv3 { padding-left: 36px; }
.toc-row.off { opacity: .5; }
.toc-row.lv1 [data-f="title"] { font-weight: 600; }
.toc-row .input { padding: 6px 8px; min-height: 0; }
.toc-row .pg { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .toc-row { grid-template-columns: 24px 1fr 36px; } .toc-row select, .toc-row .pg { grid-column: 2; } .toc-row [data-f="title"] { grid-column: 1 / -1; } }
/* Watermark / crop previews */
.wm-prev canvas, .cr-prev canvas { max-width: 100%; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); display: block; }
.cr-stage { position: relative; display: inline-block; max-width: 100%; line-height: 0; touch-action: none; }
.cr-stage canvas { max-width: 100%; height: auto; display: block; background: #fff; border-radius: 4px; }
.cr-box { position: absolute; border: 2px solid #3b82f6; box-shadow: 0 0 0 9999px rgba(10,14,25,.55); }
.cr-stage { overflow: hidden; border-radius: 6px; }
.cr-box i { position: absolute; width: 18px; height: 18px; background: #fff; border: 2px solid #3b82f6; border-radius: 50%; touch-action: none; }
.cr-box .h-n { top: -10px; left: calc(50% - 9px); cursor: ns-resize; } .cr-box .h-s { bottom: -10px; left: calc(50% - 9px); cursor: ns-resize; }
.cr-box .h-w { left: -10px; top: calc(50% - 9px); cursor: ew-resize; } .cr-box .h-e { right: -10px; top: calc(50% - 9px); cursor: ew-resize; }
.cr-box .h-nw { left: -10px; top: -10px; cursor: nwse-resize; } .cr-box .h-se { right: -10px; bottom: -10px; cursor: nwse-resize; }
.cr-box .h-ne { right: -10px; top: -10px; cursor: nesw-resize; } .cr-box .h-sw { left: -10px; bottom: -10px; cursor: nesw-resize; }

/* ---------- Home: tool search (assets/js/search.js) ---------- */
.hero.hs-active { overflow: visible; z-index: 5; }
.hero.hs-top { z-index: 300; }
.hero .hero-copy:has(.hs) { max-width: 760px; }
.hs-slot { margin-top: 30px; min-height: 66px; }
.hs { position: relative; max-width: 720px; }
.hs [hidden] { display: none !important; }
.hs-box { display: flex; align-items: center; gap: 8px; height: 66px; padding: 0 9px 0 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .55); transition: border-color .2s, box-shadow .25s; }
.hs-box:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line-2)); }
.hs-box:focus-within { border-color: color-mix(in srgb, var(--brand) 70%, transparent); box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .55), 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.hs-glass { display: inline-flex; color: var(--muted); flex: none; }
.hs-box:focus-within .hs-glass { color: var(--brand); }
.hs-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--heading); font: inherit; font-size: 18px; padding: 0 4px; }
.hs-box input::placeholder { color: var(--muted); opacity: .85; }
.hs-box input::-webkit-search-cancel-button, .hs-box input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.hs-clear, .hs-back { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.hs-clear:hover, .hs-back:hover { background: var(--surface-2); color: var(--heading); }
.hs-back { display: none; margin-left: -8px; }
.hs-kbd, .hs-foot kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface-2); color: var(--muted); font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.hs-box:focus-within .hs-kbd { display: none; }
.hs-go { min-height: 48px; padding: 0 22px; border-radius: 13px; flex: none; }
.hs-panel { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 30; display: flex; flex-direction: column; max-height: min(66vh, 560px); border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6); overflow: hidden; animation: hs-in .16s var(--ease); }
@keyframes hs-in { from { opacity: 0; transform: translateY(-6px); } }
.hs-tabs { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.hs-tabs::-webkit-scrollbar { display: none; }
.hs-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.hs-tab b { font-weight: 600; color: var(--muted); font-size: 12px; }
.hs-tab:hover { background: var(--surface-2); }
.hs-tab[aria-pressed="true"] { background: var(--heading); color: var(--bg); border-color: var(--heading); }
.hs-tab[aria-pressed="true"] b { color: inherit; opacity: .7; }
.hs-list { overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 8px; min-height: 0; }
.hs-group { padding: 12px 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hs-opt { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 9px 10px; border-radius: 14px; color: var(--text); text-decoration: none; scroll-margin: 8px; }
.hs-opt[aria-selected="true"] { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: inset 0 0 0 1px var(--line-2); }
.hs-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.hs-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hs-name { font-weight: 600; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-name mark { background: none; color: var(--link); }
.hs-sub { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-meta { display: flex; align-items: center; gap: 8px; }
.hs-cat { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.hs-badge { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.hs-badge.free { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.hs-enter { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--brand); color: var(--brand-ink); font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .12s; }
.hs-opt[aria-selected="true"] .hs-enter { opacity: 1; }
.hs-recent { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 10px 6px; }
.hs-rc { display: inline-flex; align-items: center; }
.hs-rc .chip { min-height: 34px; padding: 0 12px; font-size: 14px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.hs-rc-x { display: inline-flex; align-items: center; justify-content: center; height: 34px; width: 30px; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 999px 999px 0; background: var(--surface); color: var(--muted); cursor: pointer; }
.hs-rc-x:hover { color: var(--heading); background: var(--surface-2); }
.hs-empty { padding: 28px 18px 24px; text-align: center; color: var(--muted); }
.hs-empty svg { opacity: .6; }
.hs-empty p { margin: 8px 0 0; }
.hs-empty b { color: var(--heading); }
.hs-link { border: 0; background: none; padding: 0; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.hs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex: none; }
.hs-foot a { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--link); font-weight: 600; text-decoration: none; }
.hs-keys { display: inline-flex; align-items: center; gap: 5px; }
.hs-keys kbd + kbd { margin-left: -1px; }
.hs-pop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; }
.hs-pop .chip { min-height: 34px; padding: 0 13px; font-size: 14px; }
.hs-browse { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.hs-browse a { color: var(--link); font-weight: 600; text-decoration: none; }
.hs-browse a .arrow { vertical-align: -3px; }
html.hs-lock, html.hs-lock body { overflow: hidden; }
@media (max-width: 640px) {
  .hs-slot { margin-top: 24px; min-height: 58px; }
  .hs-box { height: 58px; padding: 0 6px 0 14px; border-radius: 16px; }
  .hs-box input { font-size: 16px; }                 /* 16px stops iPhone from zooming in */
  .hs-go, .hs-kbd { display: none; }
  .hs-cat { display: none; }
  .hs-opt { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 9px 8px; }
  .hs-ic { width: 40px; height: 40px; border-radius: 12px; }
  .hs-enter { display: none; }
  .hs-pop .muted { width: 100%; }
  /* opened on a phone: full-screen search sheet */
  .hs.hs-sheet { position: fixed; inset: 0; z-index: 200; max-width: none; display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 12px 0; background: var(--bg); }
  .hs.hs-sheet .hs-box { flex: none; height: 54px; box-shadow: none; padding-left: 4px; }
  .hs.hs-sheet .hs-back { display: inline-flex; margin-left: 0; }
  .hs.hs-sheet .hs-glass { display: none; }
  .hs.hs-sheet .hs-panel { position: static; flex: 1; max-height: none; min-height: 0; margin: 8px -12px 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; animation: none; }
  .hs.hs-sheet .hs-tabs { padding: 4px 12px 10px; }
  .hs.hs-sheet .hs-list { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .hs.hs-sheet .hs-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hs-panel { animation: none; } }

/* ---------- Crop Image tool ---------- */
.ic-wrap { text-align: center; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.ic-stage { padding: 11px; }
.ic-stage canvas { background: repeating-conic-gradient(#d9dee8 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.ic-box { border-color: #fff; outline: 1px solid rgba(0,0,0,.35); cursor: move; outline-offset: 0;
  background-image: linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.55) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.55) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
                    linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.55) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.55) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.ic-box:focus-visible { outline: 3px solid var(--brand); }
.ic-box.round { border-radius: 50%; }
.ic-box.round i { border-radius: 50%; }
.ic-num { max-width: 130px; }
.ic-out img { display: block; max-width: min(260px, 100%); max-height: 260px; margin-top: 12px; border-radius: 12px; border: 1px solid var(--line); background: repeating-conic-gradient(#d9dee8 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
@media (max-width: 640px) { .ic-wrap { padding: 6px; margin: 0 -4px; } .ic-num { max-width: none; flex: 1 1 40%; } }

/* ---------- Watermark Images tool ---------- */
.iw-prev { padding: 12px; border-radius: 16px; background: var(--surface-2); text-align: center; }
.iw-prev .row { justify-content: center; }
.iw-prev canvas { display: block; margin: 0 auto; max-width: 100%; height: auto; border-radius: 8px; cursor: crosshair; touch-action: none; background: repeating-conic-gradient(#d9dee8 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
@media (max-width: 640px) { .iw-prev { padding: 6px; margin: 0 -4px; } }
