/* The family pages around the playground: landing, styles and docs. Loaded after site.css,
   on every page, so it only adds to it. */
.top nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.use .note,
.styles + .note {
  text-align: left;
  max-width: none;
  margin: 8px 0 0;
}
.badge {
  display: inline-block;
  vertical-align: middle;
  font: 600 0.7rem / 1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--ink-2);
  border: 1px solid var(--control-edge);
}
.badge.stable {
  color: var(--glow);
  border-color: currentColor;
}

/* ---- landing: one seed in every style ---- */
.kin {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 128px);
  gap: 20px;
  padding: 0;
  margin: 0;
}
.kin li,
.kin a {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.kin svg,
.card-art svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--rule);
}
.kin-art {
  display: block;
  width: 128px;
}
.kin-name {
  font: 600 1rem / 1.2 var(--display);
  text-align: center;
}
.kin a:hover .kin-name {
  text-decoration: underline;
}
.story,
.families,
.open,
.page-head {
  padding: 40px 0 8px;
}
.story p,
.open p {
  max-width: 40em;
  font-size: 1.05rem;
}
.story h2,
.families h2,
.open h2 {
  font-size: 2rem;
  margin: 0 0 12px;
}
.cards,
.styles {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 20px;
}
.cards {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card,
.style {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 20px;
}
.card-art {
  width: 96px;
}
.card h3,
.style h2 {
  font-size: 1.25rem;
  margin: 16px 0 8px;
}
.card p,
.style p {
  margin: 0;
  color: var(--ink-2);
}
.teaser {
  font-family: var(--display);
  color: var(--ink);
}

/* ---- styles index ---- */
.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin: 0 0 12px;
}
.strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
}
.strip svg {
  display: block;
  border-radius: 12px;
}
.styles + .note {
  margin: 16px 0 40px;
}

/* ---- docs ---- */
.docs {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  padding: 40px 0 56px;
}
.toc {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 0.92rem;
}
.toc-h {
  font-weight: 600;
  margin: 0 0 8px;
}
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc ul ul {
  padding-left: 12px;
}
.toc li {
  margin: 6px 0;
}
.toc a {
  color: var(--ink-2);
  text-decoration: none;
}
.toc a:hover {
  color: var(--ink);
}
.prose {
  max-width: 46em;
}
.prose h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin: 0 0 12px;
}
.prose h2 {
  font-size: 1.8rem;
  margin: 40px 0 12px;
}
.prose h3 {
  font-size: 1.25rem;
  margin: 28px 0 10px;
}
.prose h2,
.prose h3 {
  scroll-margin-top: 80px;
}
.prose pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--paper-sunk);
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0 0 16px;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  /* Wrap long types rather than scroll: a scrolling region would need to be focusable. */
  overflow-wrap: break-word;
}
.prose td:first-child,
.prose th:first-child {
  white-space: nowrap;
}
/* Long union types may break anywhere, so the table fits a phone. */
.prose td:not(:first-child) code {
  overflow-wrap: anywhere;
}
.callout {
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
}
@media (max-width: 820px) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .toc {
    position: static;
  }
}
@media (max-width: 480px) {
  .kin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kin-art {
    width: 100%;
  }
}
.kin-name .badge {
  display: block;
  width: fit-content;
  margin: 6px auto 0;
}

/* ---- shared page pieces ---- */
.kicker {
  margin: 0 0 8px;
  font: 700 0.8rem / 1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glow);
}
.sub {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 40em;
  margin: 0 0 28px;
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover {
  filter: brightness(1.1);
}
a.btn {
  text-decoration: none;
}
.install {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* ---- landing ---- */
.glance {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.glance li {
  padding: 20px 24px;
  color: var(--ink-2);
  font-size: 0.92rem;
}
.glance li + li {
  border-left: 1px solid var(--rule);
}
.glance strong {
  display: block;
  font: 600 1.9rem / 1.2 var(--display);
  color: var(--ink);
  margin-bottom: 2px;
}
.built,
.why,
.start {
  padding: 64px 0 8px;
}
.built h2,
.why h2,
.start h2,
.open h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 12px;
}
.uses,
.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.uses h3,
.features h3 {
  font: 700 1.05rem / 1.3 var(--sans);
  margin: 0 0 6px;
}
.uses p,
.features p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.why > p:last-child {
  margin: 24px 0 0;
}
/* Little product mock-ups, drawn with real avatars: decoration, hidden from screen readers. */
.mock {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 18px;
  min-height: 132px;
  align-content: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 0.82rem;
}
.mock svg {
  display: block;
  border-radius: 6px;
}
.mock p {
  margin: 0;
  font-size: 0.82rem;
}
.msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.msg b {
  display: block;
  color: var(--ink);
}
.msg.reply {
  padding-left: 28px;
}
.mock-board {
  background: #17151f;
  border-color: #17151f;
  color: #ece9f6;
}
.mock-board .row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mock-board i {
  width: 12px;
  font-style: normal;
  color: #aaa6bd;
}
.mock-board b {
  flex: 1;
  font-weight: 500;
}
.mock-board code {
  background: none;
  color: #7ee8d0;
}
.mock-team p {
  font-weight: 700;
  color: var(--ink-2);
}
.stack {
  display: flex;
}
.stack > * {
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--paper);
}
.stack > * + * {
  margin-left: -8px;
}
.stack i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font: 700 0.8rem / 1 var(--sans);
  font-style: normal;
  background: var(--paper-sunk);
  color: var(--ink);
}
.start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 40px;
  align-items: start;
}
.open {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 64px auto;
  padding: 32px 36px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.open .ctas {
  margin: 0;
}
@media (max-width: 900px) {
  .uses,
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
  .glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .glance li:nth-child(3) {
    border-left: 0;
  }
  .glance li:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
  .start {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

/* ---- about ---- */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
  padding: 64px 0 24px;
}
.about-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 16px;
}
.about-art {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  gap: 12px;
}
.about-art svg,
.story-card svg,
.sizes-row svg {
  display: block;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--rule);
}
.promises,
.compare {
  padding: 56px 0 8px;
}
.promises h2,
.compare h2,
.story-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 20px;
}
.features.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.features .card h2 {
  font: 700 1.25rem / 1.3 var(--sans);
  margin: 0 0 8px;
}
.features .card p + p {
  margin-top: 12px;
}
ol.features {
  counter-reset: promise;
}
ol.features > li::before {
  counter-increment: promise;
  content: "0" counter(promise);
  display: block;
  margin-bottom: 8px;
  font: 700 0.95rem / 1 var(--display);
  color: var(--glow);
}
.sizes-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.table-box {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
/* Wraps rather than scrolls on a phone: a scrolling region would need to be focusable. */
@media (max-width: 720px) {
  .compare table {
    font-size: 0.78rem;
  }
  .compare th,
  .compare td {
    padding: 8px 6px;
    overflow-wrap: anywhere;
  }
  .compare tbody th {
    white-space: normal;
  }
}
.compare th,
.compare td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
}
.compare tbody tr:last-child > * {
  border-bottom: 0;
}
.compare thead th {
  font-size: 0.85rem;
  color: var(--ink-2);
}
.compare tbody th {
  font-weight: 600;
  white-space: nowrap;
}
/* Seedkin's own column. */
.compare tr > :nth-child(2) {
  background: var(--accent-soft);
  font-weight: 600;
}
.compare .na {
  color: var(--ink-2);
  font-style: italic;
}
.compare .note {
  text-align: left;
  max-width: none;
  margin-top: 12px;
}
.story-card {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  margin: 56px auto;
  padding: 36px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.story-card > div {
  flex: 999 1 380px;
}
.story-card p {
  color: var(--ink-2);
  max-width: 40em;
}
@media (max-width: 820px) {
  .about-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-art {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .about-art svg {
    width: 100%;
    height: auto;
  }
  .features.two {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- 404 ---- */
.lost {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 72px 0 96px;
}
.lost svg {
  display: block;
  margin-bottom: 24px;
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--rule);
}
.lost h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 12px;
}
.lost .ctas {
  justify-content: center;
}

/* ---- the playground on every style page (playground.js) ---- */
.play-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 40px 0 24px;
}
.play-head > div {
  flex: 1 1 32rem;
}
.play-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 12px;
}
.play-head .lede {
  margin: 0;
}
.style-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--rule);
}
.style-tabs a {
  padding: 10px 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.style-tabs a:hover {
  color: var(--ink);
}
.style-tabs a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
}
.preview {
  display: grid;
  gap: 16px;
}
/* The avatar and its code stay in view while the options scroll, where the screen is tall
   enough to hold them. */
@media (min-width: 901px) and (min-height: 860px) {
  .preview {
    position: sticky;
    top: 80px;
  }
}
.stage {
  display: grid;
  justify-items: center;
  gap: 16px;
}
.stage .seed {
  justify-self: stretch;
}
.output .code {
  margin-bottom: 14px;
}
.output .status:empty {
  display: none;
}
.output .status {
  margin-top: 10px;
}
.options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
}
.options-head h2 {
  font-size: 1.5rem;
  margin: 0;
}
.options .group {
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}
.options .group:last-child {
  padding-bottom: 4px;
}
.options legend {
  font: 700 0.8rem / 1.2 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 10px;
}
/* On a narrow screen: a compact avatar pinned under the header, the options, then the code. */
@media (max-width: 900px) {
  .play {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .preview {
    display: contents;
  }
  .stage {
    position: sticky;
    top: 62px;
    z-index: 5;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    box-shadow: 0 8px 16px -12px rgb(23 21 31 / 0.4);
  }
  .stage .big {
    grid-row: 1;
    grid-column: 1;
  }
  .stage .big svg,
  .stage .big img {
    width: 88px;
  }
  .stage .seed {
    grid-column: 2;
  }
  .stage .seed label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .stage .sizes,
  .stage .note {
    display: none;
  }
  .options {
    order: 1;
  }
  .output {
    order: 2;
  }
}

/* Last, so a sample with a Copy button keeps room for it whatever page styles its <pre>. */
.codebox > pre {
  margin: 0;
  padding-right: 84px;
}
