:root {
  color-scheme: light;
  --ink: #15212f;
  --muted: #627184;
  --line: #d8e0e8;
  --paper: #f6f8fb;
  --panel: #ffffff;
  --teal: #087f8c;
  --teal-dark: #06616b;
  --coral: #f26d5b;
  --gold: #f5b841;
  --green: #2d9f72;
  --shadow: 0 18px 50px rgba(18, 32, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(216, 224, 232, 0.82);
  background: rgba(246, 248, 251, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-size: 14px;
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 14px;
}

.auth-button,
.close-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-button {
  min-height: 38px;
  padding: 0 14px;
}

.primary-auth {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: clamp(30px, 6vw, 74px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(54px, 7vw, 92px) clamp(18px, 5vw, 72px) 46px;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.13), transparent 44%),
    linear-gradient(315deg, rgba(242, 109, 91, 0.13), transparent 38%),
    #f7fafc;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 630px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.58;
}

.hero-actions,
.controls,
.section-head {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  background: #fff;
}

.button.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.hero-panel {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid rgba(8, 127, 140, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.file-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.file-stack span {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  font-size: 28px;
  font-weight: 900;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.pipeline span,
.pipeline strong {
  padding: 16px 8px;
}

.pipeline strong {
  color: #fff;
  background: var(--coral);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.metrics div {
  padding: 28px clamp(18px, 4vw, 52px);
  background: #fff;
}

.metrics strong {
  display: block;
  font-size: 32px;
}

.metrics span,
.muted,
.roadmap p,
.tool-card p,
.result-panel dd {
  color: var(--muted);
}

.section {
  padding: clamp(54px, 8vw, 94px) clamp(18px, 5vw, 72px);
}

.section-head {
  justify-content: space-between;
  margin-bottom: 26px;
}

.search {
  display: grid;
  gap: 8px;
  min-width: min(100%, 330px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

input[type="color"] {
  min-height: 44px;
  padding: 4px;
}

input[type="range"] {
  padding: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.tool-card {
  display: block;
  min-height: 154px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.tool-card h3 {
  margin-bottom: 8px;
}

.tool-card p {
  font-size: 14px;
  line-height: 1.5;
}

.tag {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.tag.server {
  background: var(--gold);
  color: #4a3300;
}

.workspace-section {
  background: #fff;
}

.exchangers-section {
  background: #fff;
}

.exchange-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: 18px;
}

.exchange-panel,
.exchange-suggestions {
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(18, 32, 48, 0.08);
}

.exchange-panel {
  display: grid;
  gap: 16px;
}

.exchange-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.exchange-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.exchange-result {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
}

.exchange-result span {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.08;
}

.exchange-result small {
  color: rgba(255, 255, 255, 0.82);
}

.exchange-suggestions ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.special-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.special-panel {
  display: none;
  gap: 12px;
}

.special-panel.active {
  display: grid;
}

.special-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.special-panel strong {
  display: block;
  padding: 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--coral);
  font-size: 18px;
}

.pricing-section {
  background: #f7fafc;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.price-card {
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(18, 32, 48, 0.08);
}

.price-card.featured {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.price-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.price-card h3 {
  margin-bottom: 8px;
  font-size: clamp(34px, 5vw, 56px);
}

.price-card small {
  color: var(--muted);
  font-size: 18px;
}

.price-card ul {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  padding-left: 20px;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.tool-picker {
  display: grid;
  align-content: start;
  gap: 1px;
  background: var(--line);
}

.tool-option {
  min-height: 54px;
  border: 0;
  padding: 0 18px;
  background: #f9fbfd;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.tool-option.active,
.tool-option:hover {
  color: #fff;
  background: var(--teal);
}

.converter {
  display: grid;
  gap: 20px;
  padding: clamp(18px, 4vw, 28px);
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 2px dashed #9ab5c9;
  border-radius: 8px;
  background: #f7fafc;
  text-align: center;
}

.dropzone.dragover {
  border-color: var(--teal);
  background: rgba(8, 127, 140, 0.08);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

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

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.editor-controls {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.editor-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.mini-button.active,
.mini-button:hover {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.editor-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
}

.preview-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

.preview {
  display: grid;
  min-height: 320px;
  place-items: center;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--muted);
  padding: 18px;
}

.preview img,
.preview canvas {
  max-width: 100%;
  max-height: 520px;
  border-radius: 4px;
}

.preview.editor-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  background:
    linear-gradient(45deg, #e5ebf1 25%, transparent 25%),
    linear-gradient(-45deg, #e5ebf1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5ebf1 75%),
    linear-gradient(-45deg, transparent 75%, #e5ebf1 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  background-color: #f7fafc;
}

.preview.editor-stage canvas {
  max-height: 680px;
  box-shadow: 0 10px 32px rgba(18, 32, 48, 0.22);
}

.preview pre {
  width: 100%;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.result-panel dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.result-panel div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-panel dt {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.result-panel dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.auth-modal {
  width: min(92vw, 460px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.auth-modal::backdrop {
  background: rgba(21, 33, 47, 0.42);
  backdrop-filter: blur(5px);
}

.auth-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 28px;
  background: #fff;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.roadmap article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.roadmap span {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--coral);
  font-weight: 850;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero,
  .workspace,
  .preview-area,
  .exchange-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .metrics,
  .controls,
  .editor-grid,
  .exchange-row,
  .exchange-suggestions ul,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .tool-picker {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 40px;
  }
}
