/* The same palette and type the tools use, so arriving at one from here does
   not feel like leaving a site. Mobile first, like everything else. */

:root {
  --ink: #1b1b1f;
  --ink-soft: #55555f;
  --page: #fbfaf7;
  --card: #ffffff;
  --rule: #e2ded5;
  --accent: #3f4a55;
  --accent-pressed: #2b333b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece9e2;
    --ink-soft: #a6a29a;
    --page: #17171a;
    --card: #202024;
    --rule: #33333a;
    --accent: #a8b6c4;
    --accent-pressed: #8b9aa8;
  }
}

* {
  box-sizing: border-box;
}

html {
  overscroll-behavior: contain;
}

body {
  margin: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: var(--page);
  color: var(--ink);
  font:
    17px/1.55 ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

#app {
  max-width: 34rem;
  margin: 0 auto;
  padding: calc(1.75rem + env(safe-area-inset-top))
    calc(1.25rem + env(safe-area-inset-right)) calc(4rem + env(safe-area-inset-bottom))
    calc(1.25rem + env(safe-area-inset-left));
}

h1 {
  font-size: clamp(1.6rem, 1.15rem + 2vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.standfirst {
  color: var(--ink-soft);
  margin: 0 0 2.25rem;
}

.ways-in {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.ways-in li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
}

.ways-in a {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

/* The whole card is the hit area, not just the words. */
.ways-in a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.ways-in p {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
}

.ways-in .who {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}

.ways-in a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ways-in li:active {
  border-color: var(--accent-pressed);
}

@media (hover: hover) and (pointer: fine) {
  .ways-in li:hover {
    border-color: var(--accent);
  }
}

@media (min-width: 48rem) {
  #app {
    max-width: 44rem;
    padding-top: calc(3rem + env(safe-area-inset-top));
  }

  .ways-in {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  }
}
