/* ===========================================================
   Inkline — styles (v2)
   لتغيير الألوان: عدّل المتغيرات في [data-theme="dark"] و [data-theme="light"]
   =========================================================== */
:root {
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --letter: "Comic Neue", "Comic Sans MS", "Chalkboard SE", sans-serif;
  --jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --wrap: 1200px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
[data-theme="dark"] {
  --bg: #0b0b14;
  --bg-2: #10101c;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .075);
  --border: rgba(255, 255, 255, .09);
  --border-2: rgba(255, 255, 255, .16);
  --text: #eeedf7;
  --muted: #9b99b3;
  --brand: #7c6cff;
  --brand-2: #3ef2c0;
  --brand-ink: #0b0b14;
  --glow: rgba(124, 108, 255, .35);
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --ok: #3ef2c0;
  --err: #ff6b81;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f6fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f0f7;
  --border: rgba(16, 16, 40, .09);
  --border-2: rgba(16, 16, 40, .16);
  --text: #13121d;
  --muted: #5f5d74;
  --brand: #5a48f5;
  --brand-2: #0bb98f;
  --brand-ink: #ffffff;
  --glow: rgba(90, 72, 245, .22);
  --shadow: 0 20px 50px rgba(30, 28, 70, .12);
  --ok: #0a8f6e;
  --err: #d6334d;
  color-scheme: light;
}
:root { --grad: linear-gradient(115deg, var(--brand) 0%, var(--brand-2) 100%); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.65;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
code { font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .98rem/1 var(--body); padding: 14px 22px; border-radius: 999px;
  border: 1px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, opacity .2s;
}
.btn-sm { padding: 10px 16px; font-size: .9rem; }
.btn-primary { background: var(--grad); color: #0b0b14; box-shadow: 0 8px 28px var(--glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px var(--glow); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: #fff; color: #0b0b14; }
.btn-light:hover { transform: translateY(-1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { background: var(--surface-2); }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { 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(--border);
}
.nav { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.logo-sm { font-size: 1rem; }
.nav-links { display: flex; gap: 28px; margin-inline-start: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 12px; }

/* ---------------- hero ---------------- */
.hero { position: relative; padding: 72px 0 0; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg::before {                    /* halftone dots fading out */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--border-2) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
}
.hero-bg::after {                     /* two soft glows */
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 110%;
  background:
    radial-gradient(40% 45% at 78% 28%, color-mix(in srgb, var(--brand) 38%, transparent), transparent 70%),
    radial-gradient(30% 35% at 18% 70%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 70%);
  filter: blur(20px);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr .98fr; gap: 64px; align-items: center; }
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.3rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em;
  max-width: 13ch;
}
.lead { margin-top: 22px; font-size: 1.15rem; color: var(--muted); max-width: 46ch; }

/* tool card */
.tool-card {
  margin-top: 34px; padding: 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border-2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow); max-width: 580px; position: relative;
}
.tool-card::before {                  /* gradient hairline */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 70%, transparent), transparent 40%, transparent 65%, color-mix(in srgb, var(--brand-2) 60%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.drop {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  border: 1.5px dashed var(--border-2); border-radius: var(--r-md); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.is-over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.drop.has-files { border-style: solid; border-color: color-mix(in srgb, var(--brand-2) 60%, transparent); }
.drop-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #0b0b14; }
.drop-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.drop-text strong { font-size: 1.02rem; }
.drop-text span { font-size: .85rem; color: var(--muted); }
.tool-row { display: flex; align-items: end; gap: 10px; margin-top: 12px; }
.select { flex: 1; min-width: 0; }
.select label { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; margin: 0 0 4px 4px; }
.select select {
  width: 100%; font: 500 .95rem var(--body); color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 36px 12px 14px;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.swap { padding-bottom: 12px; color: var(--muted); }
.tool-go { padding: 13px 26px; }
.advanced { margin-top: 10px; padding: 0 6px; font-size: .9rem; }
.advanced summary { cursor: pointer; color: var(--muted); font-weight: 600; width: fit-content; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::after { content: " +"; }
.advanced[open] summary::after { content: " −"; }
.advanced[open] summary { margin-bottom: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; margin-right: 20px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.mode-note { margin: 10px 6px 2px; font-size: .82rem; color: var(--muted); }

/* demo */
.demo { position: relative; justify-self: center; width: 100%; max-width: 460px; padding: 0 10px; }
.demo-tabs {
  display: flex; gap: 4px; width: fit-content; margin: 0 auto 16px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 999px;
}
.demo-tabs button {
  font: 600 .82rem var(--body); color: var(--muted); background: none; border: 0;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s;
}
.demo-tabs button[aria-selected="true"] { background: var(--grad); color: #0b0b14; }
.compare {
  position: relative; margin: 0; aspect-ratio: 600 / 860; border-radius: 18px; overflow: hidden;
  background: #fff; box-shadow: 0 0 0 1px var(--border-2), 0 40px 90px -20px var(--glow), var(--shadow);
  user-select: none; touch-action: pan-y;
}
.compare .layer { position: absolute; inset: 0; }
.page-art { width: 100%; height: 100%; }
.layer-tr { clip-path: inset(0 50% 0 0); }
.layer-src .tr, .layer-tr .jp { display: none; }
.page-art .jp { font-family: var(--jp); font-weight: 900; fill: #000; }
.page-art .tr { font-family: var(--letter); font-weight: 700; fill: #000; }
.page-art .tr.sfxt { font-family: var(--display); font-weight: 800; }
.page-art .sfxt { fill: #fff; stroke: #000; stroke-width: 5px; paint-order: stroke; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 0 18px var(--brand); pointer-events: none; }
.compare-handle span {
  position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(255,255,255,.9), 0 8px 24px rgba(0,0,0,.35);
}
.compare-handle span::before, .compare-handle span::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 6px solid transparent; margin-top: -6px;
}
.compare-handle span::before { left: 7px; border-right-color: #0b0b14; }
.compare-handle span::after { right: 7px; border-left-color: #0b0b14; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare input[type=range]:focus-visible ~ .compare-handle span { outline: 3px solid var(--brand-2); }
.corner {
  position: absolute; top: 12px; font: 600 .72rem var(--body); padding: 5px 10px; border-radius: 999px;
  background: rgba(11,11,20,.78); color: #fff; backdrop-filter: blur(6px); pointer-events: none;
}
.corner-l { left: 12px; }
.corner-r { right: 12px; }
.chip {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; font-size: .82rem; font-weight: 600;
  background: color-mix(in srgb, var(--bg-2) 82%, transparent); border: 1px solid var(--border-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.chip b { font-family: var(--display); font-size: .78rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 10px var(--brand-2); }
.chip-a { bottom: 190px; left: -44px; }
.chip-b { top: 118px; right: -36px; animation-delay: -3s; flex-direction: column; align-items: flex-start; gap: 0; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* results tray */
.studio {
  position: relative; z-index: 1; margin-top: 56px; padding: 22px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border-2); backdrop-filter: blur(18px);
}
.studio-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.studio-head h2 { font-size: 1.15rem; }
.studio-actions { display: flex; gap: 10px; }
.queue { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card { border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); display: flex; flex-direction: column; }
.card-thumb { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; width: 100%; background: var(--surface-2); cursor: zoom-in; overflow: hidden; }
.card-thumb:disabled { cursor: default; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); transform-origin: left; animation: load 1.4s ease-in-out infinite; }
.card-body { padding: 10px 12px 12px; font-size: .82rem; }
.card-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 2px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.is-working::before { background: var(--brand); animation: pulse 1s infinite; }
.status.is-done { color: var(--ok); } .status.is-done::before { background: var(--ok); }
.status.is-error { color: var(--err); } .status.is-error::before { background: var(--err); }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card-actions a, .card-actions button {
  font: 600 .76rem var(--body); color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 999px; cursor: pointer; text-decoration: none;
}
.card-actions a:hover, .card-actions button:hover { border-color: var(--brand); }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes load { 0% { transform: scaleX(0); } 70% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* marquee */
.marquee {
  position: relative; z-index: 1; margin-top: 80px; padding: 22px 0; overflow: hidden;
  border-block: 1px solid var(--border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 56px; }
.marquee span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- sections ---------------- */
.section { padding: 120px 0 0; }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.1rem; }
.section-head a { color: var(--text); }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
.steps::before { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 1px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); opacity: .5; }
.steps li { position: relative; }
.step-n {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  background: var(--bg); border: 1px solid var(--border-2); margin-bottom: 22px;
}
.steps li:first-child .step-n { background: var(--grad); color: #0b0b14; border: 0; }
.steps h3 { font-size: 1.2rem; margin-bottom: 8px; }
.steps p { color: var(--muted); max-width: 32ch; }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 28px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 230px;
  transition: border-color .3s;
}
.tile:hover { border-color: var(--border-2); }
.tile h3 { font-size: 1.12rem; margin-bottom: 8px; }
.tile p { color: var(--muted); font-size: .96rem; max-width: 40ch; }
.tile-visual { margin-bottom: auto; padding-bottom: 20px; }
.t-detect { grid-column: span 4; grid-row: span 2; }
.t-detect .tile-visual svg { width: min(440px, 100%); }
.v-bubble { fill: #fff; stroke: #0b0b14; stroke-width: 3; }
[data-theme="dark"] .v-bubble { fill: #f4f4f8; stroke: #f4f4f8; }
.v-cover { stroke: #fff; stroke-width: 5; }
[data-theme="dark"] .v-cover { stroke: #f4f4f8; }
.v-box { fill: color-mix(in srgb, var(--brand) 10%, transparent); stroke: var(--brand); stroke-width: 2; stroke-dasharray: 6 5; animation: dash 1.2s linear infinite; }
.v-box-2 { stroke: var(--brand-2); fill: color-mix(in srgb, var(--brand-2) 10%, transparent); }
.v-label { font: 600 11px var(--body); fill: var(--muted); }
@keyframes dash { to { stroke-dashoffset: -22; } }
.t-context { grid-column: span 2; background: var(--grad); border: 0; }
.t-context h3, .t-context p { color: #0b0b14; }
.t-context p { opacity: .78; }
.t-clean { grid-column: span 2; }
.clean-visual { position: relative; height: 70px; }
.clean-visual span {
  position: absolute; left: 0; top: 0; padding: 10px 18px; border-radius: 40px / 30px;
  background: #fff; color: #0b0b14; font-weight: 900; font-size: 1.2rem; box-shadow: 0 0 0 2px #0b0b14;
  animation: swap 5s ease-in-out infinite;
}
.clean-before { font-family: var(--jp); }
.clean-after { font-family: var(--letter); animation-delay: -2.5s !important; }
@keyframes swap { 0%, 40% { opacity: 1; filter: blur(0); } 50%, 90% { opacity: 0; filter: blur(6px); } 100% { opacity: 1; filter: blur(0); } }
.t-sfx { grid-column: span 2; }
.sfx-word {
  position: absolute; top: 18px; right: 22px; font-family: var(--display); font-weight: 800; font-size: 3.4rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--brand-2); transform: rotate(-8deg); opacity: .9;
}
.t-letter { grid-column: span 2; }
.t-batch { grid-column: span 2; }
.batch-bars { display: grid; gap: 7px; margin-bottom: auto; padding-bottom: 22px; }
.batch-bars i { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); position: relative; overflow: hidden; }
.batch-bars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--grad); border-radius: inherit; }
.t-letter { background-image: radial-gradient(color-mix(in srgb, var(--brand) 30%, transparent) 1px, transparent 1.3px); background-size: 10px 10px; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.plan h3 { font-size: 1.05rem; }
.price { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.price span { font-family: var(--display); font-weight: 700; font-size: 2.6rem; color: var(--text); margin-right: 6px; letter-spacing: -.03em; }
.plan-sub { color: var(--muted); margin-top: 4px; font-size: .95rem; }
.plan ul { list-style: none; margin: 22px 0 28px; padding: 0; display: grid; gap: 10px; font-size: .95rem; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.plan .btn { margin-top: auto; }
.plan-pop { background: color-mix(in srgb, var(--brand) 9%, var(--bg-2)); border-color: transparent; box-shadow: 0 30px 70px -30px var(--glow); }
.plan-pop::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.plan-badge { position: absolute; top: 26px; right: 26px; font-size: .74rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--grad); color: #0b0b14; }

/* faq */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0; font-weight: 600; font-size: 1.08rem;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-2);
  background: linear-gradient(currentColor 0 0) center/10px 1.6px no-repeat, linear-gradient(currentColor 0 0) center/1.6px 10px no-repeat;
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 48px 22px 0; color: var(--muted); }

/* cta */
.cta-section { padding-bottom: 120px; }
.cta {
  position: relative; overflow: hidden; border-radius: 32px; padding: 72px 56px;
  background: var(--grad); display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(11,11,20,.22) 1.3px, transparent 1.5px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000); mask-image: linear-gradient(100deg, transparent 35%, #000);
}
.cta h2 { position: relative; z-index: 1; color: #0b0b14; font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 16ch; }
.cta .btn { position: relative; z-index: 1; background: #0b0b14; color: #fff; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer-inner { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-inner p { color: var(--muted); font-size: .9rem; }
.footer-inner nav { margin-left: auto; display: flex; gap: 22px; }
.footer-inner nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.footer-inner nav a:hover { color: var(--text); }

/* viewer */
.viewer { width: min(1000px, 94vw); max-width: none; padding: 0; border: 1px solid var(--border-2); border-radius: var(--r-lg); background: var(--bg-2); color: var(--text); overflow: hidden; }
.viewer::backdrop { background: rgba(5,5,12,.7); backdrop-filter: blur(4px); }
.viewer-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.viewer-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-2); }
.seg button { font: 600 .8rem var(--body); color: var(--muted); background: none; border: 0; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--bg-2); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.viewer-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; max-height: 80vh; overflow: auto; }
.viewer-body figure { margin: 0; }
.viewer-body figcaption { font-size: .78rem; font-weight: 600; color: var(--muted); margin: 0 0 6px 4px; }
.viewer-body img { width: 100%; border-radius: 10px; background: #fff; }
.viewer-body.single { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
.viewer-body figure.is-hidden { display: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: 90vw;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 14px; font-size: .92rem; font-weight: 500;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border-2); box-shadow: var(--shadow);
  transition: .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- responsive ---------------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .tool-card { max-width: none; }
  .chip-a { left: -10px; } .chip-b { right: -10px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .t-detect { grid-column: span 2; grid-row: auto; }
  .t-context, .t-clean, .t-sfx, .t-letter, .t-batch { grid-column: span 1; }
  .t-batch { grid-column: span 2; }
  .plans { grid-template-columns: 1fr; max-width: 520px; }
  .faq-grid { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .steps::before { top: 28px; bottom: 28px; left: 27px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
  .steps li { padding-left: 80px; }
  .step-n { position: absolute; left: 0; top: 0; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .wrap { padding-inline: 16px; }
  .nav { gap: 12px; height: 60px; }
  .nav-end .btn { padding: 9px 14px; font-size: .85rem; }
  .hero { padding-top: 44px; }
  .tool-card { padding: 10px; }
  .drop { padding: 16px; gap: 12px; }
  .drop .btn { display: none; }
  .tool-row { flex-wrap: wrap; }
  .select { flex: 1 1 calc(50% - 30px); }
  .tool-go { flex: 1 1 100%; }
  .chip { display: none; }
  .section { padding-top: 88px; }
  .bento { grid-template-columns: 1fr; }
  .t-detect, .t-context, .t-clean, .t-sfx, .t-letter, .t-batch { grid-column: auto; }
  .tile { min-height: 0; padding: 24px; }
  .t-sfx { padding-top: 80px; }
  .cta { padding: 44px 26px; border-radius: 24px; }
  .footer-inner nav { margin-left: 0; }
  .viewer-body { grid-template-columns: 1fr; }
  .viewer-head { flex-wrap: wrap; }
  .queue { grid-template-columns: repeat(2, 1fr); }
  .faq details p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
