/* Apps page. */

.bar,
.page,
.footer {
  width: min(100% - 2 * var(--gutter), 64rem);
  margin-inline: auto;
}

/* ---- Header ------------------------------------------------------------- */

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-size: var(--step-1);
  font-stretch: 108%;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.lockup img {
  width: 36px;
  height: 36px;
}

.bar__nav {
  display: flex;
  gap: 1.5rem;
}

.bar__nav a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.bar__nav a:hover {
  text-decoration: underline;
}

/* ---- Intro -------------------------------------------------------------- */

.intro {
  padding: clamp(3rem, 10vh, 6rem) 0 clamp(3rem, 8vh, 5rem);
}

.intro h1 {
  max-width: 20ch;
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-stretch: 108%;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.intro p {
  max-width: var(--measure);
  margin: 0;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

/* ---- Sections: title in a narrow left column ---------------------------- */

.section {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1rem var(--gutter);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  border-top: 1px solid var(--rule);
}

.section__title {
  margin: 0;
  font-size: var(--step-0);
  font-stretch: 108%;
  font-weight: 600;
  line-height: 1.4;
}

.portal__message {
  margin: 0;
  color: var(--muted);
}

/* App rows */

/* The list is pulled out by the rows' padding so their contents line up
   with the section title while the hover background extends past them. */
.app-list {
  display: grid;
  gap: 0.25rem;
  margin: -1rem;
  padding: 0;
  list-style: none;
}

.app {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
}

.app:hover {
  background: var(--surface);
}

.app__icon {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 15px;
}

.app__icon--blank {
  background: var(--surface);
  border: 1px solid var(--rule);
}

.app__body {
  display: grid;
  gap: 0.15rem;
}

.app__title {
  font-size: var(--step-1);
  font-stretch: 108%;
  font-weight: 650;
  line-height: 1.2;
}

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

.app__meta {
  color: var(--muted);
  font-size: var(--step--1);
}

.app__status {
  padding: 0.2rem 0.65rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--accent);
  font-size: var(--step--1);
  font-weight: 500;
  white-space: nowrap;
}

/* Principles */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem var(--gutter);
}

.principles h3 {
  margin: 0 0 0.4rem;
  font-size: var(--step-0);
  font-stretch: 108%;
  font-weight: 600;
  line-height: 1.3;
}

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

/* ---- Footer ------------------------------------------------------------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--step--1);
}

.footer p {
  margin: 0;
}

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

/* ---- Long-form pages (privacy policy) ----------------------------------- */

.doc {
  width: min(100% - 2 * var(--gutter), var(--measure));
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 5rem) 0 clamp(3rem, 8vh, 5rem);
}

.doc h1 {
  margin: 0;
  font-size: var(--step-3);
  font-stretch: 108%;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.doc__meta {
  margin: 0.5rem 0 2.5rem;
  color: var(--muted);
}

.doc h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: var(--step-1);
  font-stretch: 108%;
  font-weight: 650;
  line-height: 1.25;
}

.doc p,
.doc ul {
  margin: 0 0 1rem;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 0.4rem;
}

.doc strong {
  font-weight: 600;
}

/* ---- Narrow screens ----------------------------------------------------- */

@media (max-width: 48rem) {
  .section {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 36rem) {
  .app {
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
  }

  .app__icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
  }

  .app__status {
    grid-column: 2;
    justify-self: start;
  }
}

/* ---- Not-found page ----------------------------------------------------- */

.notfound {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  gap: 0.5rem;
  padding: var(--gutter);
  text-align: center;
}

.notfound h1 {
  margin: 0;
  font-size: var(--step-1);
  font-weight: 500;
}

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

/* ---- App pages (/<key>/) ------------------------------------------------ */

.product {
  padding: clamp(3rem, 12vh, 7rem) 0 clamp(4rem, 12vh, 7rem);
}

.product__icon {
  display: block;
  width: 112px;
  height: 112px;
  margin-bottom: 1.5rem;
  border-radius: 26px;
}

.product h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-stretch: 108%;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.product__lede {
  max-width: var(--measure);
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: var(--step-1);
}

.product__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: var(--muted);
  font-size: var(--step--1);
}
