:root {
  --bg: #f7f5ef;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #181715;
  --muted: #6d675c;
  --line: #ded8cb;
  --brand: #1c6b61;
  --brand-dark: #0f453e;
  --blue: #295f98;
  --rose: #a74258;
  --gold: #af7b24;
  --green-soft: #dbeee9;
  --blue-soft: #dbe9f7;
  --rose-soft: #f5dfe4;
  --gold-soft: #f3e5c8;
  --shadow: 0 16px 48px rgba(39, 33, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(247, 245, 239, 0.98)),
    radial-gradient(circle at top left, rgba(28, 107, 97, 0.14), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(222, 216, 203, 0.86);
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 760;
}

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

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.nav button,
.ghost-button,
.icon-button,
.primary-button,
.secondary-button,
.filter-chip {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.nav button {
  padding: 0 12px;
  color: var(--muted);
}

.nav button.active {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(39, 33, 22, 0.06);
}

.account {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 28px;
  align-items: stretch;
  min-height: 420px;
  padding: clamp(26px, 5vw, 56px) 0 24px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

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

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

h1 {
  max-width: 900px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(17px, 2.3vw, 22px);
  line-height: 1.55;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 720;
}

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

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

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

.ghost-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.icon-button {
  width: 38px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface-strong);
}

.product-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.traffic {
  display: flex;
  gap: 6px;
}

.traffic span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.preview-body {
  padding: 18px;
}

.spotlight-project {
  display: grid;
  gap: 18px;
}

.project-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.project-logo {
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--brand-dark);
  font-weight: 850;
}

.project-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-title h3 {
  font-size: 22px;
}

.project-title p,
.meta,
.muted {
  color: var(--muted);
}

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

.stat {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf7ef;
}

.stat strong {
  display: block;
  font-size: 22px;
}

.meter {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #ede7dc;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 16px;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-head p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.55;
}

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

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

.card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 10px 30px rgba(39, 33, 22, 0.06);
}

.project-card {
  padding: 16px;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tag-list,
.link-list,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.link-pill,
.status-pill,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.tag {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill {
  background: var(--green-soft);
  color: var(--brand-dark);
}

.status-pill.gold {
  background: var(--gold-soft);
  color: #714909;
}

.status-pill.rose {
  background: var(--rose-soft);
  color: var(--rose);
}

.link-pill {
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}

.filter-chip {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--muted);
}

.filter-chip.active {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--green-soft);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.panel h3 {
  margin-bottom: 12px;
}

.form {
  display: grid;
  gap: 12px;
}

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

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 100px;
  resize: vertical;
  padding: 10px 11px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(28, 107, 97, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 14px;
}

.markdown-box {
  color: var(--muted);
  line-height: 1.68;
}

.feedback-list,
.topic-list,
.payments-list {
  display: grid;
  gap: 10px;
}

.feedback-item,
.topic-item,
.payment-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.feedback-item {
  display: grid;
  gap: 10px;
}

.vote-button {
  min-width: 54px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--brand-dark);
  font-weight: 800;
}

.topic-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.sdk-code {
  overflow-x: auto;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #171a1a;
  color: #e8f0ed;
  font-size: 13px;
  line-height: 1.65;
}

.about-band {
  display: grid;
  gap: 20px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(28, 107, 97, 0.11), rgba(175, 123, 36, 0.1)),
    var(--surface-strong);
}

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

.principle {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(120%);
  transition: transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
}

.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .account,
  .brand {
    justify-content: center;
  }

  .hero,
  .split,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .main {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

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

  .section-head,
  .card-row,
  .topic-item {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .project-grid,
  .principles,
  .stat-row {
    grid-template-columns: 1fr;
  }

  .actions .primary-button,
  .actions .secondary-button,
  .actions .ghost-button {
    width: 100%;
  }

  h1 {
    font-size: 44px;
  }
}

