:root {
  --bg: #f8fafc;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --surface-strong: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0ea5e9;
  --primary-strong: #0284c7;
  --success: #22c55e;
  --success-strong: #16a34a;
  --border: #e2e8f0;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
  --shadow-soft: 0 16px 42px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --radius-sm: 16px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.ecosystem-page {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-x: hidden;
}

.ecosystem-page a {
  color: inherit;
}

.ecosystem-page code {
  padding: 2px 6px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: calc(100% - 40px);
  max-width: var(--max);
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.site-nav a {
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  background: #e0f2fe;
  color: #0369a1;
}

.header-cta {
  min-height: 40px;
  padding: 0 16px;
}

.section {
  padding: 80px 0;
}

.section.alt {
  background: var(--surface);
}

.container {
  width: calc(100% - 40px);
  max-width: var(--max);
  margin: 0 auto;
}

.hero {
  padding: 76px 0 88px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(14, 165, 233, 0.16), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(430px, 1.06fr);
  align-items: center;
  gap: 52px;
}

.hero-grid > *,
.mockup,
.panel-mockup-body,
.font-mockup-body,
.catalog-hero-mockup,
.panel-content,
.font-preview-area {
  min-width: 0;
}

.hero-copy {
  min-width: 0;
}

.badge,
.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #0369a1;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.badge {
  min-height: 34px;
  padding: 0 12px;
  background: #ecfeff;
  border-color: #bae6fd;
}

.chip {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
}

.tag {
  min-height: 28px;
  padding: 0 10px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
}

.hero h1 {
  margin: 18px 0 0;
  max-width: 780px;
  color: var(--text);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero .lead {
  max-width: 670px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.68;
}

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

.button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

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

.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.24);
}

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

.button.secondary {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.button.secondary:hover {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.button.disabled,
.button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.58;
}

.hero-chips,
.chip-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mockup {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mockup-bar {
  min-height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  background: #0f172a;
  color: #fff;
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
}

.window-dots span:nth-child(2) {
  background: #22c55e;
}

.window-dots span:nth-child(3) {
  background: #f59e0b;
}

.mockup-title {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-mockup-body {
  min-height: 430px;
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) 210px;
  background: #f8fafc;
}

.panel-sidebar,
.panel-guide,
.catalog-sidebar {
  padding: 16px;
  border-right: 1px solid var(--border);
  background: #ffffff;
}

.panel-guide {
  border-right: 0;
  border-left: 1px solid var(--border);
}

.panel-pill {
  min-height: 34px;
  margin-bottom: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.panel-pill.active {
  background: #e0f2fe;
  color: #0369a1;
}

.panel-content {
  padding: 16px;
}

.search-fake {
  min-height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: #94a3b8;
  font-size: 13px;
}

.mock-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.mock-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.mock-row h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.mock-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mock-row-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.mini-badge {
  min-height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
}

.panel-guide h3,
.guide-card h3 {
  margin: 0;
  font-size: 17px;
}

.panel-guide p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.run-button {
  width: 100%;
  min-height: 40px;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--success);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.mockup-icons {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.section h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-desc {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.28;
}

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

.card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 900;
}

.steps-grid {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-card {
  position: relative;
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 900;
}

.step-card h3 {
  margin: 0;
  font-size: 19px;
}

.step-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 22px;
  align-items: stretch;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.release-item {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
}

.release-item dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.release-item dd {
  margin: 8px 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 850;
}

.release-actions {
  display: grid;
  align-content: center;
  gap: 12px;
}

.release-note {
  margin: 16px 0 0;
  color: var(--muted);
}

.release-note a {
  color: var(--primary-strong);
  font-weight: 800;
  text-decoration: none;
}

.callout {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  background: #f0f9ff;
  color: #075985;
  font-weight: 750;
}

.font-mockup-body {
  min-height: 430px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  background: #f8fafc;
}

.font-groups {
  padding: 16px;
  border-right: 1px solid var(--border);
  background: #fff;
}

.font-preview-area {
  padding: 18px;
}

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

.font-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

.font-sample {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.font-sample-serif {
  font-family: Georgia, serif;
}

.font-meta {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.font-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.small-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 850;
}

.principle {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(300px, 1fr);
  gap: 28px;
  align-items: center;
}

.quote-card {
  padding: 30px;
  border-radius: 28px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow);
}

.quote-card h2 {
  color: #fff;
}

.quote-card p,
.quote-card li {
  color: #cbd5e1;
}

.quote-card ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

.catalog-hero-mockup {
  padding: 18px;
  background: #f8fafc;
}

.catalog-search {
  min-height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: #94a3b8;
  font-weight: 750;
}

.catalog-cards {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.catalog-mini-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

.catalog-mini-card h4 {
  margin: 0;
  font-size: 15px;
}

.catalog-mini-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.catalog-controls {
  position: sticky;
  top: 74px;
  z-index: 8;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.catalog-search-input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.catalog-search-input:focus {
  border-color: #7dd3fc;
  outline: 3px solid rgba(14, 165, 233, 0.16);
}

.category-chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.category-chip:hover,
.category-chip.active {
  border-color: #bae6fd;
  background: #e0f2fe;
  color: #0369a1;
}

.catalog-summary-row {
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

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

.script-card {
  min-height: 230px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.script-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.script-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.script-original {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.script-summary {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.script-meta {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-card,
.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
  color: transparent !important;
  border-radius: 12px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.64), transparent);
  animation: shimmer 1.25s infinite;
}

.skeleton-card {
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.skeleton-line {
  height: 14px;
  margin-top: 12px;
  border-radius: 999px;
}

.skeleton-line.title {
  width: 72%;
  height: 22px;
  margin-top: 0;
}

.skeleton-line.short {
  width: 42%;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.site-footer {
  padding: 58px 0 34px;
  border-top: 1px solid var(--border);
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  width: calc(100% - 40px);
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.footer-brand h2,
.footer-col h3 {
  margin: 0;
  color: #fff;
  font-size: 17px;
}

.footer-brand p,
.footer-bottom {
  color: #94a3b8;
}

.footer-brand p {
  max-width: 320px;
  margin: 12px 0 0;
}

.footer-col a {
  margin-top: 10px;
  display: block;
  color: #cbd5e1;
  font-size: 14px;
  text-decoration: none;
}

.footer-col a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  width: calc(100% - 40px);
  max-width: var(--max);
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.12);
  font-size: 13px;
}

@media (max-width: 1040px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-grid,
  .principle {
    grid-template-columns: 1fr;
  }

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

  .panel-mockup-body {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .panel-guide {
    display: none;
  }

  .download-card {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .container,
  .header-inner,
  .footer-grid,
  .footer-bottom {
    width: calc(100vw - 32px);
    max-width: var(--max);
  }

  .hero-grid {
    width: 100%;
    max-width: calc(100vw - 32px);
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy,
  .hero .lead,
  .section-head,
  .mockup,
  .hero-actions,
  .hero-chips {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(34px, 9.6vw, 40px);
    overflow-wrap: break-word;
  }

  .hero,
  .section {
    padding: 54px 0;
  }

  .hero-grid {
    gap: 34px;
  }

  .hero h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .hero .lead,
  .section-desc {
    font-size: 16px;
  }

  .header-cta {
    display: none;
  }

  .site-nav a {
    padding: 0 10px;
  }

  .panel-mockup-body,
  .font-mockup-body,
  .release-grid,
  .grid.three,
  .grid.four,
  .script-grid,
  .steps-grid,
  .catalog-cards {
    grid-template-columns: 1fr;
  }

  .panel-sidebar,
  .font-groups {
    display: none;
  }

  .mockup {
    border-radius: 20px;
  }

  .hero-actions .button {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .hero-chips .chip {
    max-width: 100%;
  }

  .download-card,
  .card,
  .step-card,
  .script-card,
  .quote-card {
    border-radius: 18px;
    padding: 20px;
  }

  .catalog-controls {
    position: static;
  }

  .catalog-summary-row {
    align-items: flex-start;
    flex-direction: column;
  }

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