:root {
  --canvas: #ffffff;
  --ink: #000000;
  --ink-2: rgb(0 0 0 / 64%);
  --ink-3: rgb(0 0 0 / 44%);
  --line: rgb(0 0 0 / 10%);
  --line-strong: rgb(0 0 0 / 18%);
  --hover: rgb(0 0 0 / 5%);
  --pressed: rgb(0 0 0 / 9%);
  --fill: rgb(0 0 0 / 4%);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Inter Variable", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

h1,
h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.masthead {
  padding: 40px 48px 32px;
  border-bottom: 1px solid var(--line);
}

h1 {
  font-size: 28px;
}

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 158px);
}

.sites {
  padding: 24px 24px 48px 48px;
  border-right: 1px solid var(--line);
}

.nav-label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
}

.sites ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sites li + li {
  margin-top: 8px;
}

.sites button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  color: var(--ink-2);
  font-weight: 500;
}

.sites button:hover {
  color: var(--ink);
}

.sites button[aria-current="page"] {
  color: var(--ink);
}

.stage {
  padding: 24px 48px 56px;
  min-width: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

h2 {
  font-size: 22px;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.seg {
  display: flex;
  padding: 2px;
  background: rgb(118 118 128 / 12%);
  border-radius: 9px;
}

.seg button {
  flex: 1;
  min-height: 28px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  border-radius: 7px;
}

.seg button[aria-pressed="true"] {
  background: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .seg button:hover:not([aria-pressed="true"]) {
    color: rgb(0 0 0 / 72%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .seg button {
    transition: background-color 160ms ease, color 160ms ease;
  }
}

.compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

figure {
  margin: 0;
}

figcaption {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.frame {
  border: 1px solid var(--line);
  background: var(--fill);
  overflow: hidden;
}

.frame.pending {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.frame.pending::after {
  content: "Not captured yet";
  font-size: 13px;
  color: var(--ink-3);
}

.compare img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.compare.mobile .frame {
  background: var(--canvas);
  display: flex;
  justify-content: center;
}

.compare.mobile img {
  width: min(390px, 100%);
  height: auto;
}

/* Pair the shots once each one still has room to be read. The two viewports
   reach that point at very different widths: a mobile capture is 390px wide
   and pairs comfortably here, while a desktop capture is 1440px and would be
   scaled past legibility at the same breakpoint. */
@media (min-width: 1000px) {
  .compare.mobile {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
  }
}

@media (min-width: 1600px) {
  .compare {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
  }
}

.hint {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

@media (max-width: 960px) {
  .masthead,
  .sites,
  .stage {
    padding-left: 24px;
    padding-right: 24px;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sites {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
  }

  .sites ol {
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }

  .sites li + li {
    margin-top: 0;
  }

  .sites button {
    width: auto;
    white-space: nowrap;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
