:root {
  color-scheme: dark;
  --bg: #0b0e15;
  --panel: #141a27;
  --panel-2: #1a2233;
  --text: #eef2ff;
  --muted: #a8b0ca;
  --line: rgba(255,255,255,.1);
  --brand: #a78bff;
  --brand-2: #42dcb3;
  --danger: #ff7ea8;
  --warn: #ffd166;
  --ok: #42dcb3;
  --shadow: 0 24px 72px rgba(0,0,0,.32);
  --radius: 22px;
}

html.i18n-pending #manuscriptcheck-shell {
  visibility: hidden;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(156,124,255,.22), transparent 32rem),
    radial-gradient(circle at 95% 15%, rgba(66,220,179,.16), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

a:hover { color: #fff; }

.hero {
  padding: 24px clamp(20px, 4vw, 64px) 78px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 70px;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-weight: 700;
}

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

.brand { font-weight: 800; letter-spacing: .04em; font-size: 22px; }

.lang-switch { display: inline-flex; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  background: rgba(255,255,255,.05);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.lang-toggle:hover {
  border-color: rgba(66,220,179,.55);
  background: rgba(255,255,255,.08);
}

.lang-icon {
  width: 18px;
  height: 18px;
  color: var(--brand-2);
  display: inline-flex;
}

.lang-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-label {
  min-width: 34px;
  text-align: left;
}

.nav-cta, .primary, .primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #071016;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(69,224,184,.2);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  gap: 36px;
  align-items: center;
  max-width: 1180px;
  margin: auto;
}

.eyebrow {
  color: var(--brand-2);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 13px;
}

h1 {
  max-width: 780px;
  font-size: clamp(40px, 5.8vw, 72px);
  line-height: 1.04;
  margin: 16px 0 22px;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

h1 span {
  display: block;
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  margin: 8px 0;
  letter-spacing: -0.04em;
}

h3 { margin: 0 0 10px; }

.subtitle { max-width: 720px; color: var(--muted); font-size: 20px; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.secondary, .secondary-btn, .ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.ghost-btn:disabled,
.ghost-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: transparent;
  color: var(--muted);
  background: rgba(255,255,255,.02);
}

.ghost-btn:disabled:hover,
.ghost-btn.is-disabled:hover {
  color: var(--muted);
}

.proof { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); }
.proof span { border: 1px solid var(--line); background: rgba(255,255,255,.04); padding: 8px 12px; border-radius: 999px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  min-width: 0;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.hero-metrics > div {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-metrics strong {
  font-size: 28px;
  line-height: 1;
  color: var(--brand);
}

.hero-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.pain-card {
  padding: 28px;
  align-self: center;
}

.pain-card li { margin: 12px 0; color: var(--muted); }

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.workflow-step {
  padding: 22px;
  position: relative;
}

.workflow-step h3 {
  margin-top: 8px;
}

.workflow-step p {
  color: var(--muted);
}

.workflow-step .step-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(167,139,255,.26), rgba(66,220,179,.22));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.section {
  padding: 80px clamp(20px, 4vw, 64px);
  max-width: 1240px;
  margin: auto;
}

.section-title { max-width: 760px; margin-bottom: 28px; }
.section-title p:not(.eyebrow) { color: var(--muted); }

#demo {
  max-width: 1160px;
}

#demo .section-title {
  margin-bottom: 24px;
}

#demo .section-title h2 {
  max-width: 820px;
}

#demo .section-title p:not(.eyebrow) {
  max-width: 720px;
  font-size: 17px;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(340px, .92fr) minmax(420px, 1.08fr);
  gap: 24px;
  align-items: stretch;
  height: clamp(560px, 72vh, 760px);
}

.input-panel,
.report-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2vw, 26px);
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035)),
    rgba(20,26,39,.82);
}

.input-panel label,
.report-header h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
}

label { display: block; font-weight: 800; margin-bottom: 10px; }

.meta-note {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 14px;
}

.content-type-select {
  width: 100%;
  margin: 0 0 22px;
  background: #0b0f18;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.content-type-select:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(66,220,179,.08);
}

textarea {
  width: 100%;
  flex: 1 1 auto;
  height: auto;
  min-height: 260px;
  resize: vertical;
  background: #0b0f18;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  font: inherit;
  outline: none;
}

textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(66,220,179,.08);
}

.controls, .report-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.controls {
  margin-top: 18px;
}

.report-header {
  margin: 2px 0 18px;
}

.report-header h3 {
  margin: 0;
}

.report-header .ghost-btn {
  padding: 10px 14px;
}

.report {
  flex: 1 1 auto;
  background: #0b0f18;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(18px, 2vw, 22px);
  min-height: 0;
  white-space: pre-wrap;
  overflow: auto;
  color: #dce4ff;
}

.report.empty {
  position: relative;
  color: var(--muted);
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding-inline: clamp(24px, 5vw, 72px);
}

.report.empty::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: block;
  background:
    linear-gradient(135deg, rgba(167,139,255,.32), rgba(66,220,179,.24)),
    radial-gradient(circle at 68% 30%, rgba(255,255,255,.4), transparent 8px);
  box-shadow: 0 18px 44px rgba(66,220,179,.08);
  opacity: .78;
}

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.metric { padding: 12px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.metric b { display: block; font-size: 24px; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-right: 6px;
}
.badge.ok { background: rgba(66,220,179,.18); color: var(--ok); }
.badge.warn { background: rgba(255,209,102,.18); color: var(--warn); }
.badge.danger { background: rgba(255,126,168,.18); color: var(--danger); }

.feature-grid, .pricing-grid, .capabilities-grid, .faq-grid { display: grid; gap: 18px; align-items: start; }
.features-layout {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.features .section-title {
  max-width: 520px;
  margin-bottom: 0;
}

.features .section-title h2 {
  max-width: 520px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
}

.features .section-title p:not(.eyebrow) {
  max-width: 480px;
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.65;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.pricing-grid, .capabilities-grid { grid-template-columns: repeat(3, 1fr); }
.faq-section {
  max-width: 1120px;
  padding-top: 64px;
}

.faq-section .section-title {
  max-width: none;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.faq-section h2 {
  max-width: 720px;
  font-size: clamp(28px, 3.2vw, 42px);
}

.faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  counter-reset: faq;
}

.faq-card {
  position: relative;
  min-height: 148px;
  padding: 22px 24px 22px 66px;
  box-shadow: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.028)),
    rgba(20,26,39,.72);
}

.faq-card::before {
  counter-increment: faq;
  content: counter(faq, decimal-leading-zero);
  position: absolute;
  left: 22px;
  top: 24px;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.faq-card h3 {
  margin-bottom: 12px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.2;
}

.faq-card p {
  margin: 0;
  line-height: 1.55;
}

.feature-grid .card, .price, .capability { padding: 24px; }
.feature-grid .card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.feature-grid h3 {
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.2;
}

.feature-grid p {
  margin: 10px 0 0;
  line-height: 1.6;
}
.feature-grid p, .price p, .capability p, .faq-grid p { color: var(--muted); }

.price strong, .capability strong { display: block; font-size: 28px; margin: 12px 0; color: var(--brand-2); }
.featured { outline: 2px solid rgba(66,220,179,.45); }

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

footer { padding: 40px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
footer p { margin: 6px 0; }
footer p:first-child { color: var(--text); font-weight: 800; }
footer .muted { max-width: 720px; margin-left: auto; margin-right: auto; }

@media (max-width: 900px) {
  .hero {
    padding: 20px clamp(16px, 4vw, 24px) 44px;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    font-size: 20px;
    white-space: nowrap;
  }

  .lang-switch {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 6px;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }

  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }

  .hero-grid,
  .app-grid,
  .features-layout,
  .capabilities-grid,
  .pricing-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .features .section-title {
    max-width: 760px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-actions {
    margin-top: 22px;
    flex-direction: row;
  }

  h1 {
    font-size: clamp(34px, 8.2vw, 56px);
    line-height: 1.05;
  }

  .subtitle {
    font-size: 18px;
  }

  .input-panel,
  .report-panel {
    min-height: auto;
  }

  .app-grid {
    height: auto;
    align-items: start;
  }

  .report {
    min-height: 280px;
  }

  textarea {
    height: min(300px, 56vh);
  }

  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding-top: 52px; padding-bottom: 52px; }
  .hero-grid { gap: 20px; }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 16px;
    padding-bottom: 32px;
  }

  .brand {
    font-size: 19px;
  }

  h1 {
    font-size: clamp(28px, 11.5vw, 44px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    margin: 12px 0;
  }

  .subtitle {
    font-size: 16px;
    line-height: 1.45;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid .card {
    min-height: 0;
  }

  .hero-metrics > div {
    padding: 9px 10px;
  }

  .hero-metrics strong {
    font-size: 22px;
  }

  .hero-metrics span {
    font-size: 11px;
  }

  .hero-actions {
    margin-top: 12px;
    gap: 10px;
  }

  .proof {
    margin-top: 16px;
    gap: 6px;
  }

  .proof span {
    font-size: 12px;
    padding: 7px 10px;
  }

  .app-grid {
    gap: 16px;
  }

  .section { padding-top: 42px; padding-bottom: 44px; }
}

@media (max-width: 420px) {
  .hero {
    padding-left: 12px;
    padding-right: 12px;
  }

  .lang-toggle {
    padding: 8px 10px;
    min-width: 72px;
    font-size: 13px;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
  }

  .lang-switch {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    justify-self: end;
    flex: 0 0 auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    gap: 7px;
    margin: 0;
    padding-bottom: 0;
  }

  .nav-links::-webkit-scrollbar,
  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    font-size: 11px;
  }

  .brand {
    font-size: 18px;
  }

  .lang-switch {
    margin-left: 4px;
    flex: 0 0 auto;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .hero-metrics > div {
    padding: 8px 9px;
  }

  .hero-metrics > div:last-child {
    grid-column: 1 / -1;
  }

  .hero-metrics strong {
    font-size: 20px;
  }

  .hero-metrics span {
    font-size: 10px;
  }

  h1 {
    font-size: clamp(26px, 12vw, 39px);
    line-height: 1.06;
    letter-spacing: -0.03em;
    margin: 10px 0;
  }

  .subtitle {
    font-size: 15px;
    line-height: 1.38;
  }

  .hero-actions {
    margin-top: 12px;
    gap: 8px;
  }

  .hero-actions .primary,
  .hero-actions .secondary {
    padding: 10px 12px;
    font-size: 14px;
  }

  .proof {
    margin-top: 12px;
  }
}
