:root {
  --bg: #f7f8fb;
  --paper: #ffffff;
  --ink: #111827;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #dbe3ee;
  --line-strong: #bcc9d9;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #0f9f6e;
  --amber: #d97706;
  --red: #d83b32;
  --code-bg: #0f172a;
  --code-line: #1e293b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  --max: 1180px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 248, 251, 0.9) 48%, #eef3f8),
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(15, 159, 110, 0.08), transparent 26%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 227, 238, 0.84);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #c6d3e4;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 159, 110, 0.1)),
    #fff;
  color: var(--blue);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.brand-mark svg,
.icon svg {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 620;
}

.nav-links a {
  padding: 8px 0;
}

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

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: #0b1220;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.button.secondary:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.button.blue {
  background: var(--blue);
}

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

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
}

.button.ghost:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink);
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding-top: 44px;
  padding-bottom: 72px;
}

.hero.compact {
  min-height: auto;
  padding-top: 90px;
}

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

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

h1 {
  margin-bottom: 22px;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 820;
}

.design-page h1 {
  font-size: clamp(46px, 7vw, 80px);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 800;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 760;
}

.lede {
  max-width: 720px;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

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

.microcopy {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.hero-panel,
.output-panel,
.form-panel,
.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

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

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #cbd5e1;
}

.window-dots span:nth-child(1) {
  background: #f87171;
}

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

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

.browser-line {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.url-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 620;
}

.url-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.preview-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
}

.side-list {
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #fbfdff;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.file-row.active {
  background: rgba(37, 99, 235, 0.09);
  color: var(--blue);
}

.file-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.file-row.active .file-dot {
  background: var(--blue);
}

.code-preview {
  padding: 18px;
  background: var(--code-bg);
  color: #dbeafe;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow: hidden;
}

.code-preview pre {
  margin: 0;
  white-space: pre-wrap;
}

.code-key {
  color: #93c5fd;
}

.code-value {
  color: #bbf7d0;
}

.code-comment {
  color: #94a3b8;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
}

.stat {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
  line-height: 1;
}

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

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

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

.section-head p {
  color: var(--ink-soft);
  font-size: 18px;
}

.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: start;
}

.problem-list {
  display: grid;
  gap: 14px;
}

.problem-item,
.principle,
.tool-card,
.step,
.user-card,
.use-case,
.responsible-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.problem-item {
  padding: 18px;
}

.problem-item p,
.principle p,
.tool-card p,
.step p,
.user-card p,
.use-case p,
.responsible-note p,
.article-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.statement {
  padding: 28px;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.statement strong {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}

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

.tool-card {
  display: flex;
  min-height: 250px;
  padding: 20px;
  flex-direction: column;
}

.tool-card.featured {
  border-color: rgba(37, 99, 235, 0.4);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.88)),
    #fff;
}

.tool-card .status {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.tool-card.featured .status {
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--blue);
}

.tool-card a {
  margin-top: auto;
  color: var(--blue);
  font-size: 14px;
  font-weight: 760;
}

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

.principle {
  padding: 24px;
}

.icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue);
}

.design-entry {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.token-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.token {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.token small {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.swatches {
  display: flex;
  gap: 7px;
}

.swatches span {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
}

.form-panel {
  padding: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

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

.form-field label {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 720;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

.form-field input,
.form-field select {
  min-height: 44px;
  padding: 0 12px;
}

.form-field textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.form-message {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.package-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
}

.output-panel {
  overflow: hidden;
}

.package-list {
  display: grid;
  gap: 10px;
}

.package-list .file-row {
  border: 1px solid var(--line);
  background: #fff;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  min-height: 228px;
  padding: 24px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.comparison {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.comparison table {
  width: 100%;
  border-collapse: collapse;
}

.comparison th,
.comparison td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.comparison th {
  background: #f8fafc;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 780;
}

.comparison tr:last-child td {
  border-bottom: 0;
}

.comparison td:nth-child(2),
.comparison td:nth-child(3),
.comparison th:nth-child(2),
.comparison th:nth-child(3) {
  text-align: center;
}

.yes {
  color: var(--green);
  font-weight: 800;
}

.no {
  color: var(--red);
  font-weight: 800;
}

.planned {
  color: var(--amber);
  font-weight: 800;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.user-card,
.use-case,
.responsible-note {
  padding: 20px;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.responsible-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  border-color: rgba(217, 119, 6, 0.36);
  background: #fffaf0;
}

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

.article-card {
  min-height: 220px;
  padding: 22px;
}

.article-card a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 780;
}

.article {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
}

.article h1 {
  font-size: clamp(42px, 6vw, 70px);
}

.article p,
.article li {
  color: var(--ink-soft);
  font-size: 18px;
}

.article a {
  color: var(--blue);
  font-weight: 720;
}

.article hr {
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 40px));
  min-height: 96px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
}

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

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero,
  .hero.compact,
  .two-col,
  .design-entry,
  .package-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 64px;
  }

  .hero-panel {
    max-width: 720px;
  }

  .tool-grid,
  .steps,
  .user-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .principles,
  .use-case-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    width: min(var(--max), calc(100% - 28px));
    min-height: 64px;
  }

  .nav-actions .button.secondary {
    display: none;
  }

  .section,
  .article {
    width: calc(100% - 28px);
    padding: 64px 0;
  }

  h1,
  .design-page h1 {
    font-size: clamp(40px, 14vw, 58px);
  }

  h2 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .preview-grid,
  .stats-strip,
  .tool-grid,
  .steps,
  .user-grid,
  .use-case-grid,
  .form-grid,
  .token-board {
    grid-template-columns: 1fr;
  }

  .side-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .design-entry {
    padding: 22px;
  }

  .comparison {
    overflow-x: auto;
  }

  .comparison table {
    min-width: 640px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 0;
  }
}
