:root {
  --paper: #eef2ed;
  --ink: #10231f;
  --muted: #53645f;
  --signal: #c6f04d;
  --rule: #b8c5bf;
  --white: #ffffff;
  --radius: 14px;
  color-scheme: light;
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 85% 14%, rgba(198, 240, 77, 0.24), transparent 19rem),
    var(--paper);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.wordmark [aria-hidden="true"] {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: var(--signal);
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}

.demo-label {
  color: var(--muted);
  font-size: 0.78rem;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: start;
  padding-block: clamp(64px, 9vw, 126px);
}

.article {
  min-width: 0;
}

.article-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.4rem, 7.1vw, 6rem);
  line-height: 0.91;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.dek {
  max-width: 580px;
  margin: 34px 0 0;
  color: #304640;
  font-size: clamp(1.18rem, 1.9vw, 1.52rem);
  line-height: 1.45;
}

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  font-size: 0.7rem;
  font-weight: 800;
}

.article-copy {
  max-width: 65ch;
  margin: 68px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  color: #304640;
  font-size: 1rem;
  line-height: 1.7;
}

.sharing-panel {
  position: sticky;
  top: 32px;
  min-width: 0;
  margin-top: 12px;
}

.share-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.share-intro p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 750;
}

.signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px rgba(198, 240, 77, 0.25);
}

.share-actions {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: 10px 12px 28px rgba(16, 35, 31, 0.18);
  animation: share-rail-in 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.share-button {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  border: 0;
  border-bottom: 1px solid #36504a;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    padding 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.share-button:last-child {
  border-bottom: 0;
}

.share-button:hover {
  padding-left: 28px;
  background: var(--signal);
  color: var(--ink);
}

.share-button:focus-visible,
.wordmark:focus-visible {
  outline: 3px solid #477400;
  outline-offset: 4px;
}

.share-button:focus-visible {
  position: relative;
  z-index: 1;
  outline-offset: -5px;
}

.share-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.arrow {
  font-size: 1.15rem;
  transition: transform 180ms ease;
}

.share-button:hover .arrow {
  transform: translate(2px, -2px);
}

.share-button--copy {
  color: #c0cfca;
}

.copy-state {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 500;
}

.share-button--copy.is-copied .copy-state::after {
  content: "opied";
}

.share-status {
  min-height: 42px;
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.implementation-note {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.implementation-note p {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 750;
}

.implementation-note code {
  display: block;
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 10px;
  background: #dce4df;
  color: #18342c;
  font: 0.76rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.implementation-note span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-block: 26px 34px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.72rem;
}

@keyframes share-rail-in {
  from {
    clip-path: inset(0 0 100% 0 round var(--radius));
    filter: blur(5px);
    transform: translateY(14px);
  }
  to {
    clip-path: inset(0 0 0 0 round var(--radius));
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .site-header,
  main,
  footer {
    width: min(100% - 32px, 680px);
  }

  .site-header {
    min-height: 76px;
  }

  main {
    grid-template-columns: 1fr;
    gap: 54px;
    padding-block: 58px 76px;
  }

  .sharing-panel {
    position: static;
    margin-top: 0;
  }

  .article-copy {
    margin-top: 48px;
  }
}

@media (max-width: 480px) {
  .demo-label {
    max-width: 120px;
    text-align: right;
  }

  h1 {
    font-size: clamp(3.1rem, 17vw, 4.5rem);
  }

  .dek {
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .share-actions {
    animation: none;
  }

  .share-button,
  .arrow {
    transition: none;
  }
}
