:root {
  color-scheme: dark;
  --bg: #07101d;
  --bg-soft: #0a1626;
  --panel: rgba(15, 29, 47, .92);
  --panel-solid: #0f1d2f;
  --panel-2: #13243a;
  --line: #263a55;
  --line-soft: rgba(148, 163, 184, .16);
  --text: #f5f8fc;
  --muted: #9aabc0;
  --dim: #62738b;
  --cyan: #5dd9e8;
  --cyan-dark: #0e7786;
  --green: #69e1a5;
  --yellow: #f5c764;
  --red: #ff8296;
  --purple: #aa9cff;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% -5%, rgba(34, 186, 202, .16), transparent 31rem),
    radial-gradient(circle at 95% 20%, rgba(117, 92, 246, .12), transparent 30rem),
    var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 30px 30px;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
strong { color: var(--text); }

.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  background: rgba(7, 16, 29, .84);
  backdrop-filter: blur(18px);
}
.nav-wrap { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 850; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: #07101d; background: var(--cyan); box-shadow: 0 0 28px rgba(93,217,232,.25); }
.brand-mark::after { content: "↔"; font-weight: 950; }
.desktop-nav { display: flex; align-items: center; gap: 8px; }
.nav-link, .nav-button { padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 720; transition: .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,.055); }
.nav-button { border: 1px solid rgba(93,217,232,.3); color: var(--cyan); background: rgba(93,217,232,.08); }
.menu-button { display: none; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; }
.mobile-nav { display: none; padding: 0 0 14px; }
.mobile-nav.open { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

.privacy-strip { padding: 10px 0; border-bottom: 1px solid rgba(105,225,165,.16); color: #aaf0cb; background: rgba(38, 145, 96, .09); font-size: 13px; font-weight: 720; }
.privacy-strip .container { display: flex; align-items: center; gap: 9px; }
.privacy-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 15px var(--green); }

.hero { padding: 72px 0 42px; }
.hero.compact { padding: 54px 0 34px; }
.eyebrow { margin: 0 0 12px; color: var(--cyan); font-size: 12px; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 920px; margin-bottom: 18px; font-size: clamp(38px, 6vw, 70px); line-height: 1.02; letter-spacing: -.055em; }
.hero.compact h1 { max-width: 800px; font-size: clamp(34px, 5vw, 56px); }
.hero-copy { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 12px; font-weight: 700; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--panel-2); cursor: pointer; font-weight: 780; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); border-color: #456181; }
.button.primary { border-color: var(--cyan); color: #051116; background: var(--cyan); }
.button.ghost { background: transparent; }
.button.small { min-height: 36px; padding: 7px 11px; border-radius: 10px; font-size: 13px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.section { padding: 24px 0 70px; }
.section-title { margin-bottom: 9px; font-size: clamp(25px, 4vw, 38px); letter-spacing: -.035em; }
.section-copy { max-width: 720px; margin-bottom: 26px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 18px; }
.panel { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.panel-pad { padding: 24px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.panel-head h2, .panel-head h3 { margin: 2px 0 0; font-size: 21px; letter-spacing: -.025em; }
.step { color: var(--dim); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }

.upload-zone { min-height: 450px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 22px; border: 2px dashed #3b536f; border-radius: 17px; text-align: center; background: rgba(4, 12, 22, .55); cursor: pointer; transition: .22s ease; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--cyan); background: rgba(93,217,232,.075); transform: translateY(-2px); }
.upload-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid rgba(93,217,232,.28); border-radius: 18px; color: var(--cyan); background: rgba(93,217,232,.09); font-size: 26px; font-weight: 800; }
.upload-zone h3 { margin-bottom: 5px; font-size: 18px; }
.upload-zone p { margin-bottom: 16px; color: var(--muted); font-size: 14px; }
.upload-formats { color: var(--dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.preview-shell { width: 100%; }
.preview-stage { min-height: 330px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; border-radius: 14px; background-color: #09101a; background-image: linear-gradient(45deg,#15243a 25%,transparent 25%),linear-gradient(-45deg,#15243a 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#15243a 75%),linear-gradient(-45deg,transparent 75%,#15243a 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.preview-stage img { position: relative; z-index: 1; max-height: 370px; object-fit: contain; box-shadow: 0 18px 50px rgba(0,0,0,.42); }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding: 12px 13px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(5,14,25,.65); text-align: left; }
.file-row p { margin: 0; }
.file-name { max-width: 280px; overflow: hidden; color: var(--text) !important; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { margin-top: 2px !important; color: var(--dim) !important; font-size: 12px !important; }

.metric-hero { padding: 21px; border: 1px solid var(--line-soft); border-radius: 16px; background: rgba(5,14,25,.66); }
.metric-label { margin-bottom: 5px; color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.metric-value { margin-bottom: 0; font-size: clamp(25px, 4vw, 34px); font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-sub { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric-card { padding: 16px; border: 1px solid var(--line-soft); border-radius: 15px; background: rgba(5,14,25,.62); }
.metric-card .pill { margin-bottom: 14px; }
.metric-card h3 { margin-bottom: 8px; font-size: 14px; }
.metric-card p { margin: 2px 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.pill.green { color: var(--green); background: rgba(105,225,165,.1); }
.pill.yellow { color: var(--yellow); background: rgba(245,199,100,.1); }
.pill.red { color: var(--red); background: rgba(255,130,150,.1); }
.pill.blue { color: var(--cyan); background: rgba(93,217,232,.1); }
.pill.purple { color: var(--purple); background: rgba(170,156,255,.1); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #cad5e3; font-size: 13px; font-weight: 720; }
.field-hint { color: var(--dim); font-size: 11px; }
.input, .select { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--text); background: #081422; transition: border-color .18s, box-shadow .18s; }
.input:focus, .select:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(93,217,232,.1); }
.input::placeholder { color: #4c5d74; }
.control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 17px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; color: var(--muted); background: rgba(5,14,25,.48); font-size: 13px; }
.check-row input { margin-top: 3px; accent-color: var(--cyan); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 17px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(5,14,25,.58); }
.switch-row p { margin: 0; }
.switch-row .sub { margin-top: 3px; color: var(--dim); font-size: 12px; }
.switch { position: relative; width: 48px; height: 27px; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #34465e; cursor: pointer; transition: .2s; }
.switch span::after { position: absolute; top: 4px; left: 4px; width: 19px; height: 19px; content: ""; border-radius: 50%; background: white; transition: .2s; }
.switch input:checked + span { background: var(--cyan-dark); }
.switch input:checked + span::after { transform: translateX(21px); }

.result-box { margin-top: 18px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 15px; background: rgba(5,14,25,.6); animation: reveal .28s ease both; }
.result-box.success { border-color: rgba(105,225,165,.32); background: rgba(105,225,165,.075); }
.result-box.warning { border-color: rgba(245,199,100,.32); background: rgba(245,199,100,.07); }
.result-box.danger { border-color: rgba(255,130,150,.32); background: rgba(255,130,150,.07); }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.result-value { margin: 3px 0 0; font-size: clamp(24px, 4vw, 34px); font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.result-list { display: grid; gap: 9px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.result-line { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; }
.result-line span:last-child { color: var(--text); font-weight: 760; text-align: right; font-variant-numeric: tabular-nums; }
.notice { padding: 13px 14px; border: 1px solid rgba(93,217,232,.2); border-radius: 12px; color: #bcdce1; background: rgba(93,217,232,.065); font-size: 13px; }
.notice.warning { border-color: rgba(245,199,100,.24); color: #efdba8; background: rgba(245,199,100,.065); }
.notice.danger { border-color: rgba(255,130,150,.24); color: #ffc0cb; background: rgba(255,130,150,.065); }
.mt-10 { margin-top: 10px !important; }
.mt-14 { margin-top: 14px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-18 { margin-top: 18px !important; }
.empty-state { padding: 22px; border: 1px dashed var(--line); border-radius: 14px; color: var(--dim); text-align: center; font-size: 13px; }
.waiting-visual { position: relative; overflow: hidden; }
.waiting-visual::after { position: absolute; inset: -30% auto -30% -35%; width: 55%; content: ""; background: linear-gradient(90deg, transparent, rgba(93,217,232,.045), transparent); transform: rotate(14deg); animation: waitingSweep 5s ease-in-out infinite; }
.waiting-list { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: 17px; }
.waiting-item { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(5,14,25,.48); }
.waiting-number { width: 30px; height: 30px; display: grid; flex: none; place-items: center; border-radius: 9px; color: var(--cyan); background: rgba(93,217,232,.09); font-size: 11px; font-weight: 850; }
.waiting-item h3 { margin: 0 0 2px; font-size: 13px; }
.waiting-item p { margin: 0; color: var(--dim); font-size: 11px; }
.error { margin-top: 12px; padding: 12px; border: 1px solid rgba(255,130,150,.25); border-radius: 11px; color: #ffb2bf; background: rgba(255,130,150,.07); font-size: 13px; }

.preset-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 16px; }
.preset-item { display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(5,14,25,.48); }
.preset-item h4 { margin: 0 0 2px; font-size: 13px; }
.preset-item p { margin: 0; color: var(--dim); font-size: 11px; }
.preset-score { text-align: right; }
.preset-score strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }

.tool-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.tool-card { padding: 26px; }
.side-card { padding: 20px; }
.side-card h3 { margin-bottom: 12px; font-size: 15px; }
.side-links { display: grid; gap: 7px; }
.side-links a { padding: 9px 10px; border-radius: 9px; color: var(--muted); font-size: 13px; transition: .18s; }
.side-links a:hover, .side-links a.active { color: var(--cyan); background: rgba(93,217,232,.07); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.tool-tile { min-height: 180px; padding: 20px; border: 1px solid var(--line-soft); border-radius: 17px; background: rgba(15,29,47,.82); transition: transform .18s, border-color .18s; }
.tool-tile:hover { transform: translateY(-3px); border-color: rgba(93,217,232,.38); }
.tool-index { display: inline-flex; margin-bottom: 24px; color: var(--cyan); font-size: 12px; font-weight: 850; letter-spacing: .12em; }
.tool-tile h3 { margin-bottom: 7px; font-size: 17px; }
.tool-tile p { margin-bottom: 0; color: var(--muted); font-size: 13px; }

.content-section { padding: 34px 0; border-top: 1px solid var(--line-soft); }
.content-section h2 { font-size: 28px; letter-spacing: -.035em; }
.content-section p, .content-section li { color: var(--muted); }
.content-section li + li { margin-top: 8px; }
.formula { overflow-x: auto; padding: 16px; border: 1px solid var(--line-soft); border-radius: 12px; color: #bcebf0; background: #06101c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; white-space: pre-wrap; }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(15,29,47,.7); }
.faq summary { padding: 15px 17px; cursor: pointer; font-weight: 750; }
.faq details p { padding: 0 17px 16px; margin: 0; }

.ad-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; padding: 34px 0; }
.ad-space { min-height: 108px; display: grid; place-items: center; border: 1px dashed #31445d; border-radius: 15px; color: #52647c; background: rgba(20,34,52,.26); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.site-footer { border-top: 1px solid var(--line-soft); padding: 30px 0 42px; color: var(--dim); font-size: 12px; }
.footer-wrap { display: flex; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 15px; }
.footer-links a:hover { color: var(--cyan); }
.toast { position: fixed; z-index: 60; bottom: 20px; left: 50%; padding: 11px 15px; border: 1px solid rgba(105,225,165,.28); border-radius: 11px; color: #abf1cb; background: rgba(5,14,25,.96); box-shadow: var(--shadow); font-size: 13px; font-weight: 760; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.hidden { display: none !important; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes waitingSweep { 0%, 20% { transform: translateX(-40%) rotate(14deg); } 70%, 100% { transform: translateX(310%) rotate(14deg); } }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-button { display: inline-flex; }
  .workspace, .tool-shell { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .side-card { display: none; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 22px, 1180px); }
  .hero { padding: 48px 0 28px; }
  .hero.compact { padding: 38px 0 25px; }
  .panel-pad, .tool-card { padding: 17px; }
  .upload-zone { min-height: 350px; }
  .preview-stage { min-height: 260px; }
  .metric-grid, .form-grid, .form-grid.three, .preset-list, .tool-grid, .ad-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .footer-wrap { flex-direction: column; }
  .result-head, .result-line { flex-direction: column; gap: 5px; }
  .result-line span:last-child { text-align: left; }
  .mobile-nav.open { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
