:root {
  --bg: #f7f4f8;
  --ink: #1b2430;
  --muted: #5c6b7a;
  --line: #d9e1ea;
  --card: #ffffff;
  --orange: #f95a38;
  --orange-2: #fc792e;
  --orange-3: #ff9823;
  --cta: linear-gradient(135deg, #f95a38 0%, #fc792e 50%, #ff9823 100%);
  --shadow: 0 18px 50px rgba(53, 71, 90, 0.12);
  --radius: 24px;
  --focus: 0 0 0 3px rgba(249, 90, 56, 0.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: hidden; }
[hidden] { display: none !important; }
body {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(0deg, #fff 12%, transparent 72%),
    linear-gradient(90deg, #ffe1cc, #ffccf7 53%, #d2f4ff);
  background-attachment: fixed;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--orange); }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 40; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: none; box-shadow: var(--focus); }

.site-header {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.6);
  position: sticky; top: 0; z-index: 40;
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 72px; position: relative; }
.logo { text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; display: flex; align-items: baseline; }
.logo-mark { color: var(--orange); }
.logo-word { color: var(--ink); }
.logo.light .logo-word { color: #fff; }
.header-nav { display: flex; align-items: center; gap: 18px; }
.header-nav > a, .mega-btn, .linkish {
  color: var(--ink); text-decoration: none; font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer;
}
.header-search { flex: 1; position: relative; max-width: 280px; margin-left: auto; }
.header-search input {
  width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font: inherit; background: #fff;
}
.header-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; }
.mobile-nav { flex-direction: column; gap: 10px; padding: 8px 16px 16px; background: #fff; }
.mobile-nav:not([hidden]) { display: flex; }

.tools-catalog { padding-bottom: 48px; }
.tools-catalog-group { margin-top: 28px; }
.tools-catalog-group h2 { margin: 0 0 4px; font-size: 1.35rem; }
.tools-catalog-group > .muted { margin: 0 0 12px; }
.tools-catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tools-catalog-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; border-radius: 16px; text-decoration: none; color: inherit;
  background: #fff; box-shadow: var(--shadow); border: 1px solid transparent;
}
.tools-catalog-card:hover { border-color: color-mix(in srgb, var(--orange) 45%, #fff); }
.tools-catalog-card strong { display: block; font-size: 1rem; }
.tools-catalog-card small { display: block; color: var(--muted); font-weight: 500; line-height: 1.4; margin-top: 2px; }

.btn {
  border: 0; border-radius: 999px; padding: 11px 18px; font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none; color: var(--ink); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.btn.primary { background: var(--cta); color: #fff; box-shadow: 0 8px 20px rgba(249,90,56,.28); }
.btn.lg { padding: 14px 28px; font-size: 1.05rem; }
.btn.sm { padding: 8px 14px; font-size: .92rem; }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; }
.btn.is-busy,
.ed-save.is-busy { cursor: wait; }
.btn.is-busy::after,
.ed-save.is-busy::after {
  content: "";
  display: inline-block;
  width: .9em;
  height: .9em;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: spin .7s linear infinite;
}
.spinner.sm { width: 18px; height: 18px; border-width: 2px; margin: 0; }
.suggest-loading { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; font-weight: 600; }

.hero-stage { padding: 48px 0 28px; }
.hero-center { text-align: center; }
.brand-kicker {
  margin: 0 0 8px; font-size: .95rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--orange);
}
.hero-center h1, .hero-stage h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; margin: 0 0 12px; letter-spacing: -.03em;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 720px; margin: 0 auto 24px; }
.center { text-align: center; }
.crumb { color: var(--muted); font-size: .9rem; }
.crumb a { color: var(--muted); text-decoration: none; }

.dropzone, .dropzone-cta {
  display: block; width: min(760px, 100%); margin: 0 auto;
  background: #fff; border: 2px dashed #b7c6d8; border-radius: 28px;
  padding: 48px 24px; text-align: center; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); min-height: 280px;
}
.dropzone.drag, .dropzone-cta:hover { border-color: var(--orange); background: #fff8f5; }
.drop-title { font-size: 1.45rem; font-weight: 800; margin: 8px 0 4px; }
.hint, .muted { color: var(--muted); }
.cloud { margin-bottom: 4px; }

.trust-row {
  list-style: none; padding: 0; margin: 28px auto 0; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 10px 22px; color: var(--muted); font-weight: 600; font-size: .95rem;
}
.trust-row li::before { content: "✓ "; color: var(--orange); font-weight: 800; }
.trust-row.compact { margin-top: 8px; margin-bottom: 22px; }

.band { padding: 28px 0 48px; }
.icon-rail {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 18px 14px; margin-top: 24px;
}
.icon-tool { text-decoration: none; color: var(--ink); text-align: center; width: 96px; }
.icon-tool > span:not(.ticon) {
  display: block; font-size: .78rem; font-weight: 700; margin-top: 8px; line-height: 1.25;
}
.ticon {
  width: 64px; height: 64px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ticon) 16%, #fff); margin: 0 auto;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ticon) 25%, #fff);
  transition: transform .15s ease; color: var(--ticon);
  flex-shrink: 0;
}
.ticon svg {
  display: block; width: 34px; height: 34px;
  flex: 0 0 auto; margin: 0;
}
.icon-tool:hover .ticon { transform: translateY(-3px); }
.ticon-sm { width: 28px; height: 28px; }
.ticon-sm svg { width: 16px; height: 16px; }
.ticon-md { width: 64px; height: 64px; }
.ticon-md svg { width: 34px; height: 34px; }

.steps-section { padding: 12px 0 48px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.steps article {
  background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); text-align: left;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cta); color: #fff; font-weight: 800; margin-bottom: 10px;
}
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-bottom: 40px; }
.feature-split article, .tool-card, .price-card, .auth-card, .plain-card {
  background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.check-list { padding-left: 0; list-style: none; }
.check-list li { margin: 8px 0; }
.check-list li::before { content: "✓ "; color: var(--orange); font-weight: 800; }

.uploader.single-file.has-file .dropzone[hidden],
.uploader.single-file.has-file .dropzone { display: none !important; }

.file-list {
  list-style: none; padding: 0; margin: 18px auto 0; width: min(760px, 100%);
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.file-list:not([hidden]) { display: grid; }
.uploader.single-file .file-list:not([hidden]) {
  grid-template-columns: 1fr;
  max-width: 420px;
}
.file-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  display: flex; flex-direction: column; gap: 6px; text-align: left; position: relative;
}
.file-list .fname { font-weight: 700; font-size: .9rem; word-break: break-all; padding-right: 28px; }
.file-tile-icon { width: 40px; height: 48px; border-radius: 6px; background: #fff1ec; color: var(--orange); display: grid; place-items: center; font-weight: 800; font-size: .7rem; }
.file-list .rm { position: absolute; top: 6px; right: 6px; }
.file-list .replace-file {
  margin-top: 4px; align-self: flex-start; font-size: .85rem; padding: 4px 10px;
}

.tool-actions { margin: 18px 0 8px; }
.tool-options { width: min(1120px, 100%); margin: 16px auto 0; text-align: left; }
.options-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.options-row label { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 600; }
.page-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin: 16px 0; }
.page-thumbs button { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; cursor: pointer; font-weight: 700; }
.page-thumbs button.sel { border-color: var(--orange); background: #fff4ef; }

.result-box {
  width: min(760px, 100%); margin: 16px auto 0; background: #fff; border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); text-align: left;
}
.upload-error { color: #b42318; font-weight: 700; }
.flash { width: min(1120px, calc(100% - 32px)); margin: 12px auto; padding: 12px 16px; border-radius: 12px; }
.flash.error { background: #fef3f2; color: #b42318; }
.flash.ok { background: #edfcf2; color: #067647; }

.process-overlay {
  position: fixed; inset: 0; background: rgba(27,36,48,.45); place-items: center; z-index: 200;
}
.process-overlay:not([hidden]) { display: grid; }
.process-card { background: #fff; border-radius: 24px; padding: 32px; width: min(420px, calc(100% - 32px)); text-align: center; box-shadow: var(--shadow); }
.spinner {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px;
  border: 4px solid #ffe1d6; border-top-color: var(--orange); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-wrap { margin: 16px 0; }
.progress { height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--cta); transition: width .2s; }

.faq-block { max-width: 760px; margin: 0 auto 56px; }
.faq { background: #fff; border-radius: 16px; margin: 10px 0; padding: 4px 16px; box-shadow: 0 8px 24px rgba(53,71,90,.06); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 32px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tool-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.tool-card span { color: var(--muted); font-size: .92rem; }
.page { padding: 32px 0 64px; }
.content-page { background: #fff; border-radius: var(--radius); padding: 32px; margin: 32px auto 64px; box-shadow: var(--shadow); }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.price-card.featured { outline: 2px solid var(--orange); }
.plan-kicker { color: var(--orange); font-weight: 800; text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; }
.price { font-size: 2.4rem; font-weight: 800; margin: 0; }
.search-page { display: flex; gap: 8px; justify-content: center; }
.search-page input { width: min(420px, 100%); border-radius: 999px; border: 1px solid var(--line); padding: 12px 16px; font: inherit; }
.auth-shell { min-height: 60vh; display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(420px, 100%); }
.stack-form { display: grid; gap: 12px; }
.stack-form input, .stack-form textarea, .stack-form select {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit;
}
.suggest {
  position: absolute; top: 110%; left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow); text-align: left; z-index: 55;
}
.suggest:not([hidden]) { display: block; }
.suggest a { display: flex; gap: 8px; align-items: center; padding: 10px 12px; color: inherit; text-decoration: none; }

.site-footer { background: #1b2430; color: #cbd5e1; padding: 48px 0 24px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 24px; }
.site-footer a { display: block; color: #e2e8f0; text-decoration: none; margin: 6px 0; font-size: .92rem; }
.site-footer h2 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.fineprint, .fine-inline { color: #94a3b8; font-size: .85rem; }
.plain-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(90deg, #ffe1cc, #ffccf7 53%, #d2f4ff); }
.plain-card { padding: 32px; width: min(520px, calc(100% - 32px)); }
.ad-slot { margin: 16px auto; width: min(760px, 100%); }

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .header-nav, .header-search { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .header-cta .linkish { display: none; }
  .steps, .feature-split, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .tools-catalog-grid { grid-template-columns: 1fr; }
  .dropzone, .dropzone-cta { min-height: 220px; padding: 32px 16px; }
}
