:root {
  --bg: #fafaf7;
  --panel: #ffffff;
  --ink: #171717;
  --muted: #65625c;
  --faint: #918d84;
  --line: rgba(23, 23, 23, .11);
  --line-strong: rgba(23, 23, 23, .2);
  --accent: #315f54;
  --accent-2: #8f433b;
  --warm: #ece2cc;
  --shadow: 0 24px 80px rgba(23, 23, 23, .14);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 247, .88);
  backdrop-filter: blur(18px);
}

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

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a,
.pill-button,
.lang-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(23, 23, 23, .05);
}

.lang-toggle {
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}

.lang-toggle:hover {
  color: var(--ink);
  background: rgba(23, 23, 23, .05);
}

.pill-button {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 620;
}

.pill-button.secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(250,250,247,.22), rgba(250,250,247,.9) 74%, var(--bg)),
    url("./assets/icon.svg") center 18% / min(58vw, 620px) no-repeat,
    var(--warm);
}

.hero-inner {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 96px 0 56px;
  display: grid;
  gap: 28px;
}

.hero-copy {
  max-width: 720px;
  display: grid;
  gap: 18px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 9vw, 112px);
  line-height: .92;
  font-weight: 760;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

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

.app-preview {
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: 42px 1fr;
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e46f61;
}

.dot:nth-child(2) {
  background: #e4b152;
}

.dot:nth-child(3) {
  background: #5ab66a;
}

.preview-body {
  display: grid;
  grid-template-columns: 240px 1fr 1fr;
  min-height: 260px;
}

.preview-sidebar {
  border-right: 1px solid var(--line);
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: #f5f1e8;
}

.preview-row {
  height: 28px;
  border-radius: 6px;
  background: rgba(23, 23, 23, .06);
}

.preview-row.active {
  background: rgba(49, 95, 84, .18);
}

.preview-editor,
.preview-render {
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.preview-editor {
  border-right: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #4b4945;
}

.line {
  height: 11px;
  border-radius: 999px;
  background: rgba(23, 23, 23, .1);
}

.line.short {
  width: 62%;
}

.preview-render h3 {
  margin: 0;
  font-size: 26px;
}

.preview-render p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.section {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-header {
  display: grid;
  gap: 10px;
  max-width: 680px;
  margin-bottom: 28px;
}

.section-header h2 {
  margin: 0;
  font-size: 34px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.feature-grid,
.pricing-grid,
.channel-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature,
.price,
.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}

.feature h3,
.price h3,
.panel h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

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

.price {
  display: grid;
  gap: 14px;
}

.channel-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.amount {
  font-size: 34px;
  font-weight: 760;
}

.amount span {
  color: var(--faint);
  font-size: 14px;
  font-weight: 560;
}

.steps {
  display: grid;
  gap: 10px;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 720;
  font-size: 13px;
}

.step strong {
  display: block;
  margin-bottom: 3px;
}

.step span {
  color: var(--muted);
  line-height: 1.5;
}

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

.channel-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.channel-panel h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.channel-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.channel-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.channel-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.channel-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.notice {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f5f1e8;
  padding: 14px 16px;
  color: var(--muted);
  line-height: 1.55;
  display: flex;
  gap: 8px;
}

.notice strong {
  color: var(--ink);
  white-space: nowrap;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--ink);
}

.icp-link {
  white-space: nowrap;
}

.legal-shell {
  width: min(900px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 72px 0;
}

.legal-hero {
  display: grid;
  gap: 12px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
}

.legal-hero p {
  margin: 0;
  color: var(--muted);
}

.legal-content {
  display: grid;
  gap: 30px;
  padding-top: 34px;
}

.legal-content section {
  display: grid;
  gap: 10px;
}

.legal-content h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.legal-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-shell {
  min-height: calc(100vh - 64px);
  width: min(1280px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.admin-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-title h1 {
  font-size: 34px;
  line-height: 1.1;
}

.admin-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.upload-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 16px;
}

.file-input {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.metric {
  display: grid;
  gap: 6px;
}

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

.metric strong {
  font-size: 30px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.search {
  flex: 1;
  min-width: 220px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 12px;
}

.select {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-weight: 680;
  background: #f5f1e8;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(49, 95, 84, .12);
  color: var(--accent);
  font-weight: 680;
  font-size: 12px;
}

.status-pill.unused {
  color: var(--faint);
  background: rgba(23, 23, 23, .06);
}

.status-pill.full {
  color: var(--accent-2);
  background: rgba(143, 67, 59, .12);
}

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

@media (max-width: 820px) {
  .topbar {
    padding: 0 16px;
  }

  .nav a:not(.pill-button) {
    display: none;
  }

  .hero-inner,
  .section,
  .legal-shell {
    width: min(100vw - 32px, 1120px);
  }

  .preview-body,
  .feature-grid,
  .pricing-grid,
  .channel-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .notice {
    display: grid;
  }

  .preview-sidebar {
    display: none;
  }
}
