:root {
  --bg: #07111f;
  --surface: #0d1a2d;
  --surface-2: #12233b;
  --text: #eef6ff;
  --muted: #a8b7ca;
  --accent: #41d6a3;
  --accent-2: #70e9c1;
  --danger: #ff7a8a;
  --border: rgba(255, 255, 255, 0.11);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 4%, rgba(65, 214, 163, 0.13), transparent 28rem),
    radial-gradient(circle at 8% 45%, rgba(45, 104, 184, 0.13), transparent 28rem),
    var(--bg);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
code { color: var(--accent-2); }

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 17, 31, 0.88);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #04140e;
  background: var(--accent);
  font-size: 1rem;
  font-weight: 900;
}

.brand span:last-child { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }

.hero {
  padding: 92px 0 68px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.068em;
}

.hero h1 span,
.page-hero h1 span { color: var(--accent); }

.lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
  background: var(--accent);
  color: #04140e;
}

.button-primary:hover { background: var(--accent-2); }

.button-secondary {
  border-color: var(--border);
  background: rgba(255,255,255,.035);
  color: var(--text);
}

.button-danger {
  border-color: rgba(255, 122, 138, .3);
  background: rgba(255, 122, 138, .08);
  color: #ffd6dc;
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: .88rem;
}

.hero-panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(18,35,59,.92), rgba(13,26,45,.92));
  box-shadow: var(--shadow);
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(65, 214, 163, .09);
  border: 1px solid rgba(65, 214, 163, .21);
  font-size: .84rem;
  font-weight: 700;
}

.flow {
  margin-top: 26px;
  display: grid;
  gap: 12px;
}

.flow-step {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  background: rgba(255,255,255,.025);
}

.flow-number {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #04140e;
  font-weight: 850;
}

.flow-step strong { display: block; }
.flow-step p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }

.section { padding: 74px 0; }
.section-bordered { border-top: 1px solid var(--border); }

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.052em;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(255,255,255,.025);
  display: flex;
  flex-direction: column;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(65,214,163,.35);
  background: rgba(65,214,163,.045);
}

.tool-card .tool-number {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .16em;
}

.tool-card h3 {
  margin: 24px 0 8px;
  font-size: 1.3rem;
  letter-spacing: -.025em;
}

.tool-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.tool-card .card-link { margin-top: auto; padding-top: 24px; color: var(--accent-2); font-weight: 750; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 22px;
  border-left: 2px solid var(--accent);
  background: rgba(255,255,255,.02);
}

.feature h3 { margin: 0 0 7px; }
.feature p { margin: 0; color: var(--muted); }

.page-hero {
  padding: 68px 0 38px;
}

.page-hero h1 {
  font-size: clamp(2.45rem, 6vw, 4.6rem);
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .88rem;
}

.breadcrumb a { color: var(--accent-2); }

.tool-layout {
  padding: 20px 0 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.tool-box,
.info-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(13, 26, 45, .82);
}

.tool-box { padding: 26px; }
.info-box { padding: 21px; }

.info-box + .info-box { margin-top: 16px; }
.info-box h2, .info-box h3 { margin-top: 0; }
.info-box p, .info-box li { color: var(--muted); }
.info-box ul { padding-left: 19px; }

.dropzone {
  min-height: 190px;
  padding: 28px;
  border: 1.5px dashed rgba(112, 233, 193, .46);
  border-radius: 16px;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(65,214,163,.045);
}

.dropzone.dragover { background: rgba(65,214,163,.1); }

.dropzone input[type=file] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.dropzone strong {
  display: block;
  font-size: 1.15rem;
}

.dropzone p {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: .92rem;
}

.form-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-full { grid-column: 1 / -1; }

.field label,
.field > span {
  font-size: .88rem;
  font-weight: 700;
}

.field input[type=text],
.field input[type=number],
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: rgba(255,255,255,.035);
}

.field textarea { min-height: 94px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(65,214,163,.12);
}

.field small { color: var(--muted); }

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.file-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.file-row,
.page-row {
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.file-meta { min-width: 0; }
.file-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta small { color: var(--muted); }

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.page-row {
  grid-template-columns: auto minmax(0,1fr) auto;
}

.page-select {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.page-rotation {
  color: var(--accent-2);
  font-size: .84rem;
  font-weight: 700;
}

.action-bar {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
}

.status:empty { display: none; }
.status.success { color: var(--accent-2); border-color: rgba(65,214,163,.28); background: rgba(65,214,163,.06); }
.status.error { color: #ffd4da; border-color: rgba(255,122,138,.34); background: rgba(255,122,138,.075); }

.loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(4,20,14,.25);
  border-top-color: #04140e;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.is-loading .loader { display: inline-block; }
.is-loading .button-label { opacity: .7; }

@keyframes spin { to { transform: rotate(360deg); } }

.article {
  max-width: 820px;
  padding: 58px 0 90px;
}

.article h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.06em;
}

.article h2 { margin-top: 40px; letter-spacing: -.03em; }
.article p, .article li { color: var(--muted); }
.article a { color: var(--accent-2); }
.article .notice {
  padding: 18px;
  border-left: 3px solid var(--accent);
  background: rgba(65,214,163,.06);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 38px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover { color: var(--text); }

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .tool-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .hero { padding-top: 62px; }
  .tool-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .tool-box { padding: 18px; }
  .file-row, .page-row { grid-template-columns: 1fr; }
  .page-select { justify-self: start; }
  .row-actions { justify-content: flex-start; }
  .footer-inner { flex-direction: column; }
  .button { width: 100%; }
  .row-actions .button { width: auto; }
}
