:root {
  --canvas: #f4f3ef;
  --surface: #ffffff;
  --ink: #12333d;
  --muted: #526269;
  --hairline: #d6dcd9;
  --accent: #11727a;
  --device-width: min(280px, 72vw);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.masthead {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 18px;
  text-align: center;
}

.masthead-logo {
  display: block;
  width: min(88px, 24vw);
  height: auto;
  margin: 0 auto 12px;
}

.masthead h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(26px, 4.5vw, 36px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.finder {
  position: sticky;
  top: 0;
  z-index: 8;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 20px 14px;
}

.finder-field {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 14px;
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

.finder-icon { color: var(--muted); display: flex; }

#flow-search {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  min-width: 0;
}

#flow-search::placeholder { color: var(--muted); }

.flow-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 960px;
  margin: 12px auto 0;
}

.flow-chip {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}

.flow-chip:hover,
.flow-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--canvas);
}

.finder-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 32px 20px;
}

.flow-head h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
}

.comparisons {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 48px;
}

.compare-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 36px;
}

.compare-card { display: grid; gap: 10px; }

.compare-card h3 {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  justify-items: center;
}

@media (max-width: 720px) {
  .compare-pair { grid-template-columns: 1fr; }
}

.compare-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.flow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 0 8px;
}

.flow[hidden] { display: none; }

.flow-head {
  text-align: center;
  margin-bottom: 12px;
  padding: 0 20px;
}

.filmstrip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  padding: 8px 20px 28px;
  -webkit-overflow-scrolling: touch;
}

.filmstrip::-webkit-scrollbar { height: 0; }

.filmstrip-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.slide-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.device {
  position: relative;
  width: var(--device-width);
  aspect-ratio: 1350 / 2760;
  overflow: hidden;
}

.device-screen {
  position: absolute;
  overflow: hidden;
  background: transparent;
  line-height: 0;
  left: var(--screen-left);
  top: var(--screen-top);
  width: var(--screen-width);
  height: var(--screen-height);
  /* The bezel PNG already rounds the hole. A CSS radius larger than that
     clips the shot and shows the well behind it — most visible on Obsidian. */
  border-radius: 0;
}

.device-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

.device-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.compare-pair .device { --device-width: min(260px, 42vw); }
