/* The guide pages: how-tos and explainers under /guides/. They share the home page's colours,
   cards and footer, and add a small top bar, a reading column and numbered steps. */

/* A short page's background runs to the bottom of the window, below the footer. */
html {
  min-height: 100%;
}

.guide-bar {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.guide-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.guide-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.guide-brand .wordmark {
  font-size: 1.35rem;
}

.guide-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  font-size: 0.98rem;
}

.guide-nav a:hover {
  color: var(--accent-strong);
}

.guide-nav__app {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(98, 176, 255, 0.45);
  background: rgba(98, 176, 255, 0.12);
  color: var(--accent-strong);
}

.guide {
  padding: 36px 0 24px;
}

.guide-shell {
  width: min(calc(100% - 40px), 860px);
  margin: 0 auto;
}

.guide-crumbs a {
  color: var(--accent-strong);
}

/* The opening: what the page is, beside its video or picture. */
.guide-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: center;
  padding-bottom: 40px;
}

.guide-intro--shot {
  grid-template-columns: minmax(0, 1fr) 340px;
}

/* The title and the words start level with the top of the tall video or screenshot. */
.guide-intro--video,
.guide-intro--tall {
  align-items: start;
}

/* The steps as links, filling the space beside the video. Left out on phones, where the steps follow at once. */
.guide-toc {
  margin-top: 34px;
}

.guide-toc li::marker {
  color: var(--muted);
}

.guide-toc a {
  color: var(--accent-strong);
}

.guide-toc a:hover {
  text-decoration: underline;
}

.guide-intro--text {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
}

.guide-kicker {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Two classes, so the colour holds against the paragraph colours further down. */
.guide .guide-kicker,
.guide-card .guide-kicker {
  color: var(--accent-strong);
}

.guide h1,
.guide h2,
.guide h3 {
  text-wrap: balance;
}

.guide h1 {
  margin: 0 0 18px;
  font-family: "Montserrat", "Inter", sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.guide-video {
  justify-self: center;
  width: 100%;
  max-width: 280px;
}

.guide-video video {
  width: 100%;
  background: #05070b;
}

.guide p.guide-video__note {
  margin: 16px 0 0;
  text-align: center;
}

/* Body text. */
.guide-body {
  max-width: 680px;
}

.guide h2 {
  margin: 44px 0 14px;
  font-family: "Montserrat", "Inter", sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 1.95rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.guide h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.guide p,
.guide li {
  color: #d3dae6;
  font-size: 1.06rem;
  line-height: 1.65;
}

.guide p {
  margin: 0 0 16px;
}

.guide ul,
.guide ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.guide li + li {
  margin-top: 6px;
}

.guide strong {
  color: var(--text);
}

.guide a.muted-link {
  font-weight: 600;
}

/* Numbered steps: words beside a piece of the phone's screen, which swaps sides each step. */
.guide .guide-steps {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.guide-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  counter-increment: step;
}

.guide .guide-step + .guide-step {
  margin-top: 0;
}

.guide-step:nth-child(even) {
  grid-template-columns: 340px minmax(0, 1fr);
}

.guide-step:nth-child(even) .guide-step__text {
  order: 2;
}

.guide-step__text h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 14px;
}

.guide-step__text h2::before {
  content: counter(step);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #5ecbff 0%, #169cff 60%, #005fbc 100%);
  color: #06101c;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
  transform: translateY(-3px);
}

.guide-step__text ul {
  list-style: disc;
}

.guide-step__text > :last-child {
  margin-bottom: 0;
}

.guide-shot {
  justify-self: center;
  width: 100%;
  max-width: 340px;
  margin: 0;
}

.guide-shot--tall {
  max-width: 180px;
}

/* A piece of a screenshot. --t and --b are where the piece starts and ends down the screenshot,
   --l and --r across it, each from 0 to 1. The screenshots are 660 by 1434. */
.guide-crop {
  --l: 0;
  --r: 1;
  overflow: hidden;
  aspect-ratio: calc((var(--r) - var(--l)) * 660) / calc((var(--b) - var(--t)) * 1434);
  border-radius: 18px;
  background: #eef4fb;
  box-shadow: 0 0 0 1.5px rgba(170, 205, 255, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
}

.guide-crop img {
  display: block;
  max-width: none;
  width: calc(100% / (var(--r) - var(--l)));
  height: auto;
  margin-left: calc(var(--l) / (var(--r) - var(--l)) * -100%);
  margin-top: calc(var(--t) / (var(--r) - var(--l)) * -217.2727%);
}

.guide-shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
}

/* Words beside a picture, outside the numbered steps. */
.guide-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: center;
  margin: 60px 0;
}

.guide-pair h2 {
  margin-top: 0;
}

/* The same, with the picture on the left. */
.guide-pair--flip {
  grid-template-columns: 340px minmax(0, 1fr);
}

.guide-pair--flip > div {
  order: 2;
}

.guide-pair > div > :last-child {
  margin-bottom: 0;
}

/* Two screens side by side inside the reading column. */
.guide-shots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin: 26px 0 30px;
}

.guide-shots .guide-shot {
  max-width: 320px;
}

/* A tip or a rule of thumb. */
.guide-note {
  margin: 22px 0;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(98, 176, 255, 0.3);
  background: rgba(98, 176, 255, 0.08);
}

.guide-note p {
  margin: 0;
  color: var(--text);
}

.guide-note p + p {
  margin-top: 10px;
}

/* A term, what it means and an example, one row each in a panel. */
.guide-defs {
  margin: 18px 0 60px;
  padding: 4px 26px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(26, 32, 47, 0.96), rgba(19, 24, 36, 0.96));
}

.guide-def {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 30px;
  align-items: start;
  padding: 22px 0;
}

.guide-def + .guide-def {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-def h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.55;
}

.guide-def p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

.guide-def p.guide-def__more {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.guide-def p.guide-def__eg {
  padding-left: 14px;
  border-left: 2px solid rgba(98, 176, 255, 0.5);
  color: var(--muted);
}

/* Two cards to compare, side by side. */
.guide-versus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 680px;
  margin: 8px 0;
}

.guide-versus > div {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(26, 32, 47, 0.96), rgba(19, 24, 36, 0.96));
}

.guide-versus ul {
  margin: 0;
}

.guide-versus li {
  font-size: 1rem;
  color: var(--muted);
}

/* The list of guides. */
.guide-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 8px 0 0;
}

.guide-card {
  display: block;
  padding: 26px;
  transition: border-color 0.15s ease;
}

.guide-card:hover {
  border-color: rgba(98, 176, 255, 0.45);
}

.guide-card h2,
.guide-card h3 {
  margin: 0 0 10px;
  font-family: "Montserrat", "Inter", sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

/* A card on its side: the picture beside the words. */
.guide-card--row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.guide-card--row .guide-card__shot {
  margin-bottom: 0;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.guide-card .guide-kicker {
  margin-bottom: 10px;
}

.guide-card__shot {
  margin-bottom: 22px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(170, 205, 255, 0.25);
}

.guide-next {
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-next__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.guide-next h2 {
  margin: 0;
}

.guide-next .guide-card + .guide-card {
  margin-top: 16px;
}

/* The page a wrong address gets. */
.notfound {
  padding: 56px 0 72px;
  text-align: center;
}

.notfound .guide-lead {
  margin-bottom: 30px;
}

.notfound .hero-actions {
  font-weight: 600;
}

/* The app's own question about a missed shot, with the answer chosen. */
.notfound__tag {
  display: inline-block;
  margin: 12px 0 28px;
  padding: 16px 20px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(170, 205, 255, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
  text-align: left;
}

.guide .notfound__tag p {
  margin: 0 0 12px;
  color: #10151d;
  font-size: 0.98rem;
  font-weight: 500;
}

.notfound__tag div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notfound__tag span {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #dfe7f1;
  color: #0a5fc2;
  font-size: 0.92rem;
  font-weight: 500;
}

.notfound__tag span.is-on {
  border-color: #0a5fc2;
  background: #0a5fc2;
  color: #fff;
}

/* The guide pages end as the home page does: a blue band, then the footer with no line above it. */
.guide-cta {
  margin-top: 64px;
  padding: 64px 0;
  background: linear-gradient(180deg, #1c4f90, #143d73);
}

.guides .guide {
  padding-bottom: 0;
}

.guides .site-footer {
  background: #090b10;
}

.guides .site-footer__inner {
  padding-top: 0;
  border-top: 0;
}

/* The list of guides sits on the home page's navy, with its lighter cards. The page itself takes
   the footer's colour, so a window taller than the page shows footer below it, not a navy strip. */
.guides--list {
  background: #090b10;
}

.guides--list .guide-bar,
.guides--list .guide {
  background: #121927;
}

.guides--list .guide-card {
  background: linear-gradient(180deg, rgba(30, 37, 54, 0.96), rgba(22, 28, 42, 0.96));
}

.guide-cta__inner {
  text-align: center;
}

.guide-cta h2 {
  margin-top: 0;
}

.guide-cta .section-intro {
  margin: 0 auto 24px;
}

@media (max-width: 760px) {
  .guide-intro,
  .guide-step,
  .guide-step:nth-child(even),
  .guide-pair,
  .guide-pair--flip,
  .guide-card--row {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .guide-pair--flip > div,
  .guide-step:nth-child(even) .guide-step__text {
    order: 0;
  }

  /* A guide's title stays on the left edge with its breadcrumb and lead; the guides list, whose
     lead is centered, centers its title too. */
  .guide-intro--text h1 {
    text-align: center;
  }

  /* Larger on phones than the desktop clamp gives, so the title leads the page. */
  .guide h1 {
    margin-bottom: 22px;
    font-size: 2.45rem;
  }

  .guide-def {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 0;
  }

  .guide-defs {
    padding: 2px 20px;
  }

  .guide-intro--text .guide-lead {
    text-align: center;
  }

  .guide-intro {
    padding-bottom: 28px;
  }

  .guide-intro--tall .guide-shot {
    max-width: 260px;
  }

  .guide-toc {
    display: none;
  }

  .notfound {
    padding: 36px 0 20px;
  }

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

  .guide-step {
    padding: 28px 0;
  }

  .guide-nav {
    gap: 14px;
    font-size: 0.92rem;
  }

  .guide-brand .wordmark {
    font-size: 1.1rem;
  }

  .guide-brand img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 420px) {
  .guide-nav__guides {
    display: none;
  }
}
