:root {
  color-scheme: light dark;
  --bg: light-dark(#fbfaf8, #16140f);
  --fg: light-dark(#1c1b19, #ece9e2);
  --muted: light-dark(#6b6962, #9a968c);
  --accent: light-dark(#a01b0b, #e6694f);
  --card: light-dark(#ffffff, #1f1c16);
  --border: light-dark(#e6e3dd, #322e26);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    16px/1.65 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
}

a {
  color: var(--accent);
}

header {
  margin-bottom: 2.5rem;
}

.logo {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 1rem;
}

h1 {
  font-size: 2.25rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0;
}

h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  padding-top: 1.5rem;

  section:first-of-type & {
    border-top: 0;
    padding-top: 0;
  }
}

ul {
  padding-left: 1.25rem;
}
li {
  margin: 0.35rem 0;
}

code,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  overflow-x: auto;

  code {
    background: none;
    padding: 0;
  }
}

figure {
  margin: 1.5rem 0 0;
}
.shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgb(0 0 0 / 10%);

  /* The options page is near-square; full width would tower over the text. */
  &--narrow {
    max-width: 32rem;
    margin-inline: auto;
  }
}
figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.before-after {
  display: grid;
  gap: 1rem;

  .label {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
  }
}

/* Install — one tile per browser, each linking to its store or build docs. */
.browsers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;

  @media (max-width: 30rem) {
    grid-template-columns: repeat(2, 1fr);
  }
}

a.browser {
  transition:
    border-color 0.05s,
    box-shadow 0.05s,
    transform 0.05s;

  &:hover {
    box-shadow: 0 2px 10px light-dark(rgb(0 0 0 / 10%), rgb(150 150 150 / 10%));
    transform: translateY(-2px);
  }
}

/* CSS */
.browser {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--fg);
  text-decoration: none;
  overflow: hidden;

  position: relative;
  overflow: hidden;
  width: 163px;
  height: 137px;
  border-radius: 12px;

  box-shadow: 0 10px 25px light-dark(rgb(0 0 0 / 10%), rgb(150 150 150 / 10%));

  img {
    width: 90px;
    height: 90px;
  }

  .name {
    font-weight: 600;
    font-size: 0.95rem;
  }

  /* Not a link (e.g. a store listing that isn't live yet). */
  &.disabled img,
  &.disabled .name {
    opacity: 0.3;
  }

  .ribbon {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    top: 20px;
    right: -45px;
    width: 150px;

    min-height: 1.5rem;
    padding: 0.1rem 0;

    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: rotate(45deg);
    box-shadow: 0 2px 1px rgba(0, 0, 0, 0.2);
    z-index: 10;
    line-height: 1;

    /* Variants */
    background: var(--fg);
    color: var(--bg);

    /* The live store listing. */
    &.available {
      background: light-dark(rgb(74, 255, 192), rgb(157, 255, 221));
      color: black;
    }

    /* Submitted, awaiting store approval. */
    &.pending {
      background: light-dark(rgb(254, 251, 112), rgb(248, 246, 153));
      color: black;
    }
  }
}

blockquote {
  margin: 1.25rem 1.5rem;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, var(--border));

  p {
    margin: 0.5rem 0;
  }

  .attribution {
    color: var(--muted);
    font-size: 0.9rem;

    cite {
      font-weight: 600;
      color: var(--fg);
    }
  }

  p:not(.attribution) {
    font-style: oblique;
  }
}

p.aside {
  font-style: oblique;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
