:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #f1f3f9;
  --border: #e4e7ef;
  --text: #161a23;
  --muted: #6b7280;
  --accent: #5b6cf6;
  --accent-2: #6a5cf0;
  --grad: linear-gradient(135deg, #4f7cff 0%, #8b5cf6 100%);
  --good: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(26,35,70,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1100px 560px at 50% -8%, #ecefff 0%, var(--bg) 55%) no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.page { padding: 32px 0 64px; }
.section-title { font-size: clamp(24px, 4vw, 34px); margin: 0 0 6px; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.hero { max-width: 680px; margin: 0 auto; text-align: center; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .inner { display: flex; align-items: center; gap: 18px; height: 62px; }
.nav .brand { font-weight: 800; letter-spacing: -.02em; font-size: 18px; color: var(--text); }
.nav .brand:hover { text-decoration: none; }
.nav .spacer { flex: 1; }
.nav a.link { color: var(--muted); font-size: 14px; font-weight: 600; }
.nav a.link:hover { color: var(--text); text-decoration: none; }
.nav .quota {
  font-size: 13px; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px;
}
.nav .quota b { color: var(--text); }

/* ---- Cards / panels ---- */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

/* ---- Forms ---- */
label.field { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,108,246,.15); }
.form-row + .form-row { margin-top: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---- Buttons ---- */
button, .btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  border-radius: 10px; padding: 11px 18px; border: 1px solid transparent; transition: .15s;
}
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(91,108,246,.30); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-pill { border-radius: 999px; }
.btn-google { background: #fff; color: #1f2430; border-color: #d6dae2; gap: 10px; }
.btn-google:hover { background: #f3f5f9; text-decoration: none; }

/* "or" divider between password form and OAuth button */
.oauth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.oauth-sep::before, .oauth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---- Flash / alerts ---- */
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.flash.info    { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.flash.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash.error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ---- Usage bar ---- */
.usage-bar { height: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.usage-bar > span { display: block; height: 100%; background: var(--grad); }
.usage-bar.full > span { background: linear-gradient(90deg, var(--danger), #f97362); }

/* ---- Plan cards ---- */
.plan { position: relative; display: flex; flex-direction: column; }
.plan.current { border-color: var(--accent); box-shadow: 0 6px 22px rgba(91,108,246,.16); }
.plan .tag { position: absolute; top: -11px; right: 16px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { margin: 0 0 4px; font-size: 20px; }
.plan .price { font-size: 30px; font-weight: 800; margin: 6px 0; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 12px 0 18px; color: var(--muted); font-size: 14px; }
.plan ul li { padding: 5px 0; border-bottom: 1px dashed var(--border); }
.plan .cta { margin-top: auto; }

/* ---- Tool stage (shared by tools) ---- */
.stage {
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; border-radius: 10px;
  background-color: #fafbfd;
  background-image:
    linear-gradient(45deg, #e9ecf4 25%, transparent 25%),
    linear-gradient(-45deg, #e9ecf4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e9ecf4 75%),
    linear-gradient(-45deg, transparent 75%, #e9ecf4 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.stage img { max-width: 100%; max-height: 100%; display: block; }
.stage .placeholder { color: var(--muted); font-size: 14px; padding: 20px; }

.drop {
  display: block; border: 2px dashed #cdd3e2; border-radius: var(--radius); background: #fff;
  padding: 40px 24px; text-align: center; cursor: pointer; transition: .2s;
}
.drop:hover, .drop.dragover { border-color: var(--accent); background: #f5f7ff; }
.drop.big { padding: 56px 24px; }
.drop input { display: none; }

.bar { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar > span { display: block; height: 100%; width: 0%; background: var(--grad); transition: width .2s; }
.bar.indeterminate > span { width: 35%; transition: none; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

.icon { vertical-align: middle; }
.t-icon { color: var(--accent); margin-right: 9px; vertical-align: middle; }

/* ---- Home hero (two-column, remove.bg-style) ---- */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; padding: 28px 0 8px; }
.hero-grid h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 14px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; } }
.upload-box { display: block; border: 2px dashed #cdd3e2; border-radius: 16px; background: #fff; padding: 28px 22px; text-align: center; cursor: pointer; transition: .2s; }
.upload-box:hover { border-color: var(--accent); background: #f5f7ff; }
.samples { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 860px) { .samples { justify-content: center; } }
.samples .thumb { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: center; }
.samples .thumb svg { width: 84%; }
.hero-art { position: relative; aspect-ratio: 4 / 5; max-width: 400px; margin: 0 0 0 auto; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); display: flex; align-items: flex-end; justify-content: center; }
@media (max-width: 860px) { .hero-art { margin: 0 auto; } }
.hero-art .subject { width: 86%; }
.hero-art .before { position: absolute; left: 14px; bottom: 14px; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.18); display: flex; align-items: flex-end; justify-content: center; }
.hero-art .before svg { width: 84%; }
.upload-box.dragover { border-color: var(--accent); background: #f5f7ff; }
.checker {
  background-color: #fafbfd;
  background-image:
    linear-gradient(45deg, #e9ecf4 25%, transparent 25%),
    linear-gradient(-45deg, #e9ecf4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e9ecf4 75%),
    linear-gradient(-45deg, transparent 75%, #e9ecf4 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}

/* ---- Before/after slider ---- */
.ba-slider { position: relative; max-width: 560px; margin: 0 auto; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); user-select: none; touch-action: none; }
.ba-layer { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.ba-layer svg { width: 40%; }
.ba-before { clip-path: inset(0 50% 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; }
.ba-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; color: var(--accent); cursor: ew-resize; }

/* ---- Use-case cards ---- */
.use-card { text-decoration: none; color: inherit; transition: .15s; }
.use-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.use-card h3 { margin: 10px 0 6px; font-size: 18px; }
.use-card .ic { color: var(--accent); }

/* ---- Value props ---- */
.vp { text-align: center; padding: 8px; }
.vp .ic { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: #eef0ff; color: var(--accent); margin-bottom: 12px; }
.vp h3 { margin: 0 0 6px; font-size: 18px; }
.vp p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- FAQ (native accordion) ---- */
.faq details { border: 1px solid var(--border); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.faq summary { padding: 15px 18px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .ans { padding: 14px 18px; color: var(--muted); font-size: 15px; }

/* ---- CTA band ---- */
.cta-band { background: var(--grad); color: #fff; border-radius: 20px; padding: 44px 24px; text-align: center; }
.cta-band h2 { color: #fff; margin: 0 0 8px; font-size: clamp(24px,3.4vw,32px); }
.cta-band p { color: rgba(255,255,255,.9); margin: 0 0 20px; }
.cta-band .btn { background: #fff; color: var(--accent-2); }
.cta-band .btn:hover { filter: brightness(.97); }

/* ---- Rich footer ---- */
.foot { border-top: 1px solid var(--border); margin-top: 56px; padding: 36px 0 8px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
.foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.foot a { display: block; color: var(--text); font-size: 14px; padding: 4px 0; }
.foot a:hover { color: var(--accent); }

footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; margin-top: 40px; }

/* ---- Bulk / batch tool queue (BeamBatch) ---- */
.bq-drop { border: 2px dashed var(--border, #d5d9e0); border-radius: 14px; padding: 26px 18px; text-align: center; cursor: pointer; transition: .15s; background: var(--card, #fff); }
.bq-drop.dragover { border-color: var(--accent, #6d28d9); background: rgba(109,40,217,.05); }
.bq-drop input { display: none; }
.bq-bar-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.bq-count { margin-left: auto; font-size: 13px; color: var(--muted, #667085); }
.bq-list { display: flex; flex-direction: column; gap: 10px; }
.bq-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 10px 12px; background: var(--card, #fff); }
.bq-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #f1f2f5 url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%2710%27%3E%3Crect width=%275%27 height=%275%27 fill=%27%23e9ecf1%27/%3E%3Crect x=%275%27 y=%275%27 width=%275%27 height=%275%27 fill=%27%23e9ecf1%27/%3E%3C/svg%3E"); flex: none; }
.bq-meta { min-width: 0; flex: 1; }
.bq-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bq-sub { font-size: 12px; color: var(--muted, #667085); margin-top: 2px; }
.bq-mini { height: 5px; border-radius: 4px; background: #eceef2; overflow: hidden; margin-top: 6px; max-width: 220px; }
.bq-mini > span { display: block; height: 100%; width: 0; background: var(--accent, #6d28d9); transition: width .2s; }
.bq-mini.indet > span { width: 40%; animation: bqslide 1s linear infinite; }
@keyframes bqslide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.bq-state { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex: none; }
.bq-state.queued { background: #eef1f6; color: #5b6472; }
.bq-state.processing { background: rgba(109,40,217,.12); color: var(--accent, #6d28d9); }
.bq-state.done { background: rgba(22,163,74,.12); color: #16a34a; }
.bq-state.error { background: rgba(220,38,38,.12); color: #dc2626; }
.bq-row-actions { display: flex; gap: 6px; flex: none; }
.bq-iconbtn { border: 1px solid var(--border, #e5e7eb); background: var(--card, #fff); border-radius: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted, #667085); font-size: 15px; line-height: 1; }
.bq-iconbtn:hover { color: var(--text, #111); border-color: var(--accent, #6d28d9); }
.bq-iconbtn:disabled { opacity: .4; cursor: default; }
.bq-empty { color: var(--muted, #667085); font-size: 14px; text-align: center; padding: 12px; }

/* ---- Launch-offer announcement bar ---- */
.promobar { background: linear-gradient(90deg, #4f7cff 0%, #6a5cf0 50%, #8b5cf6 100%); color: #fff; text-align: center; font-size: 13.5px; font-weight: 500; padding: 9px 16px; line-height: 1.5; }
.promobar .promobar-tag { display: inline-block; background: rgba(255,255,255,.22); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; margin-right: 8px; vertical-align: middle; }
.promobar b { font-weight: 800; }
.promobar a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.promobar a:hover { opacity: .85; }
@media (max-width: 560px) { .promobar { font-size: 12.5px; } .promobar .promobar-hide { display: none; } }

/* ---- Homepage bulk-mode showcase ---- */
.bulk-wrap { border: 1px solid var(--border); border-radius: 20px; padding: 28px; background: linear-gradient(180deg, rgba(109,40,217,.05), rgba(109,40,217,0)); }
.bulk-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; }
.bulk-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(109,40,217,.1); color: var(--accent); font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 999px; }
.bulk-mock { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: 0 18px 50px -22px rgba(31,41,55,.45); }
.bulk-mock .bq-thumb { display: inline-block; }
@media (max-width: 760px) { .bulk-grid { grid-template-columns: 1fr; gap: 24px; } .bulk-wrap { padding: 22px; } }

/* ---- Homepage "More free tools" cards ---- */
.tool-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:16px; }
.tool-card { display:flex; flex-direction:column; align-items:flex-start; padding:22px; border:1px solid var(--border); border-radius:16px; background:var(--card,#fff); text-decoration:none; color:var(--text); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.tool-card:hover { transform:translateY(-5px); box-shadow:0 20px 44px -22px rgba(31,41,55,.45); border-color:transparent; }
.tool-ic { width:48px; height:48px; border-radius:13px; display:flex; align-items:center; justify-content:center; color:#fff; margin-bottom:15px; box-shadow:0 8px 18px -8px rgba(31,41,55,.5); }
.tool-ic svg { width:24px; height:24px; }
.tool-card h3 { margin:0 0 5px; font-size:17px; }
.tool-card p { margin:0; font-size:14px; color:var(--muted); line-height:1.5; }
.tool-more { margin-top:16px; font-size:13px; font-weight:700; color:var(--accent); display:inline-flex; align-items:center; gap:5px; transition:gap .16s ease; }
.tool-card:hover .tool-more { gap:10px; }
.ti-blue { background:linear-gradient(135deg,#4f7cff,#6a95ff); }
.ti-violet { background:linear-gradient(135deg,#7c5cff,#9b6cff); }
.ti-teal { background:linear-gradient(135deg,#0ea5a0,#1fc39d); }
.ti-coral { background:linear-gradient(135deg,#f9736a,#fb9a5a); }
