:root {
  --bg-color: #f4f4f2;
  --card-color: #ffffff;
  --ink-color: #171717;
  --muted-color: #646464;
  --border-color: #e7e7e2;
  --accent-color: #ffd600;
  --radius: 18px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: clip;
}

body {
  background:
    radial-gradient(circle at top right, #fef8cc 0%, rgba(254, 248, 204, 0) 42%), var(--bg-color);
  color: var(--ink-color);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

code {
  font-family: var(--font-mono);
  font-size: 12px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.viewport {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero,
.card {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.hero {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-logo {
  width: clamp(74px, 12vw, 104px);
  height: auto;
  flex: 0 0 auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.brand {
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.intro-text {
  max-width: 70ch;
  font-size: clamp(17px, 2.1vw, 23px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.intro-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.cta-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
}

.cta-link {
  background: var(--accent-color);
  color: #111;
}

.secondary-link {
  background: #f6f6f2;
  border: 1px solid var(--border-color);
}

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

.card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-color);
  color: #111;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.card-copy {
  font-size: 15px;
  line-height: 1.5;
}

.list-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

.tool-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tool-grid li {
  background: #f8f8f6;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.tool-grid li code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.snippet {
  background: #f8f8f5;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.snippet code {
  display: block;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.snippet pre {
  margin: 0;
}

.copy-button {
  border: 1px solid var(--border-color);
  background: #f4f4f0;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  color: #3a3a3a;
}

.copy-button.copied {
  background: var(--accent-color);
  color: #111;
}

.dark {
  background: #111;
  border-color: #111;
  color: #fff;
}

.dark .mono {
  color: #969696;
}

.dark .card-copy {
  color: #e8e8e8;
}

.creator-line {
  margin-top: 2px;
}

.inline-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dark .cta-link {
  margin-top: 6px;
}

@media (min-width: 760px) {
  .feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .viewport {
    padding: 10px;
    gap: 10px;
  }

  .hero {
    padding: 18px;
    gap: 16px;
  }

  .hero-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-logo {
    width: 74px;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .cta-link,
  .hero-actions .secondary-link {
    width: 100%;
  }

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

  .copy-button {
    min-height: 34px;
  }
}
