/* Post Preview for X: the page and its privacy policy. Night by default (X's own look), day behind
   [data-theme="light"]. Built from taylor.fyi/map-for-google-photos' sheet. */

:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #e7e9ea;
  --text-2: #a3a9ae;
  --line: #2f3336;
  --edge: #2f3336; /* the 1px edge X draws round a photo in a post */
  --hover: rgba(231, 233, 234, 0.1);
  --img-line: rgba(255, 255, 255, 0.1);
  --button: #e7e9ea;
  --button-hover: #d7dbdc;
  --on-button: #0f1419;
  --avatar: #333639;
  --accent: #1d9bf0;
  --focus: #1d9bf0;
  --band: #16181c; /* every other section: X's own raised grey */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --text: #0f1419;
  --text-2: #536471;
  --line: #eff3f4;
  --edge: #cfd9de;
  --hover: rgba(15, 20, 25, 0.06);
  --img-line: rgba(0, 0, 0, 0.1);
  --button: #0f1419;
  --button-hover: #272c30;
  --on-button: #ffffff;
  --avatar: #cfd9de;
  --band: #eff3f4; /* the day hairline's grey, as a fill */
}

/* the flip between day and night happens at once, not as a hundred transitions */
.no-transition, .no-transition * { transition: none !important; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

code { font-family: var(--mono); font-size: inherit; }

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

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* header: the name goes home, the day/night switch sits at the right */
.top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.mark img { width: 28px; height: 28px; display: block; }
.theme {
  width: 44px; height: 44px; margin-right: -12px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px; background: none; color: var(--text);
  cursor: pointer; transition: background-color 150ms var(--ease);
}
.theme svg { width: 20px; height: 20px; }
.theme [hidden] { display: none; }

/* hero: the pitch at the left, the demo at the right */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 48px;
  align-items: center;
  padding-top: 40px;
}
h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.lead {
  margin: 20px 0 0;
  max-width: 30em;
  font-size: 20px;
  line-height: 1.45;
  color: var(--text-2);
  text-wrap: pretty;
}
.cta { margin-top: 32px; }
.button {
  display: inline-flex; align-items: center;
  height: 44px; padding: 0 22px;
  border-radius: 999px; background: var(--button); color: var(--on-button);
  font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}
.button:active { transform: scale(0.97); }
button.button { border: 0; font: 500 16px/1 var(--font); cursor: pointer; }
/* a phone can't install a Chrome extension: it gets the link to open on a computer instead */
.phone { display: none; }
@media (pointer: coarse) {
  .computer { display: none; }
  .button.phone { display: inline-flex; }
  .steps.phone { display: block; }
}
.steps { margin: 12px 0 0; max-width: 30em; font-size: 14px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.steps code { color: var(--text); }

/* the demo: a post box holding the extension's row, laid out like X's (avatar, then the post's column) */
.post {
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 16px 16px 20px;
}
.who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--avatar); flex: none; }
.ph { font-size: 20px; color: var(--text-2); }
/* the post's own column: the row's padding-bottom share is taken of this width, as on X */
.media { margin-left: 52px; }
.label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; margin-top: 8px;
  font-size: 14px; color: var(--text-2);
}
.is-solved .status { color: var(--text); font-weight: 500; }
.shuffle {
  margin-right: -10px; padding: 0 10px; min-height: 44px;
  border: 0; border-radius: 999px; background: none;
  color: var(--accent); font: 500 14px/1 var(--font); cursor: pointer;
}
.shuffle[hidden], .hint[hidden] { display: none; }
.shuffle:active { scale: 0.97; }
.sizer { position: relative; height: 0; }
.row {
  position: absolute; inset: 0;
  display: flex; gap: 4px;
  margin: 0; padding: 0; list-style: none;
}
.card {
  position: relative;
  flex: none; height: 100%;
  border: 1px solid var(--edge);
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.card { transition: scale 150ms var(--ease); }
.card.is-dragging { z-index: 2; cursor: grabbing; scale: 1.03; outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }

/* proof: real x.com screenshots, with a hairline, never stretched */
figure { margin: 0; }
figure img {
  display: block; width: 100%; height: auto;
  border-radius: 14px;
  outline: 1px solid var(--img-line); outline-offset: -1px;
}
figcaption { margin: 0 0 12px; font-size: 14px; color: var(--text-2); text-align: center; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; max-width: 900px; margin: 0 auto; }
.one { max-width: 434px; margin: 0 auto; }

/* the sections: full-width bands, a hairline between, every other one on the raised grey; the point first, then the proof */
.hero-wrap { padding-bottom: 96px; }
.band { padding: 96px 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--band); }
.band h2 { margin: 0; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; text-align: center; text-wrap: balance; }
.say { margin: 16px auto 48px; max-width: 36em; font-size: 18px; line-height: 1.45; color: var(--text-2); text-align: center; text-wrap: pretty; }

/* privacy, said once, plainly */
.privacy .say { margin-bottom: 0; text-wrap: balance; }
.privacy .more { margin: 16px 0 0; text-align: center; font-size: 16px; font-weight: 500; color: var(--text); }

.foot-band { border-top: 1px solid var(--line); }
.foot {
  padding-top: 24px; padding-bottom: 40px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
  font-size: 14px; color: var(--text-2);
}

/* the privacy policy page */
.doc { max-width: 720px; padding-top: 56px; }
.doc h1 { margin: 0; font-size: clamp(32px, 4vw, 44px); }
.doc .lead { margin: 16px 0 0; max-width: none; }
.doc h2 { margin: 48px 0 0; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.doc p, .doc li { font-size: 18px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.doc p { margin: 12px 0 0; }
.doc ul { margin: 12px 0 0; padding-left: 1.25em; }
.doc li + li { margin-top: 12px; }
.doc .meta { margin-top: 48px; font-size: 14px; }
.doc + .foot-band { margin-top: 96px; }

@media (hover: hover) and (pointer: fine) {
  .theme:hover { background: var(--hover); }
  .button:hover { background: var(--button-hover); }
  .shuffle:hover { background: var(--hover); }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .post { max-width: 520px; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 24px; }
  .lead { font-size: 18px; }
  .post { padding: 12px 12px 16px; }
  .media { margin-left: 0; }
  .band { padding: 64px 0; }
  .hero-wrap { padding-bottom: 64px; }
  .say { margin-bottom: 32px; text-align: left; }
  .band h2 { text-align: left; }
  .privacy .more { text-align: left; }
  .pair { grid-template-columns: 1fr; gap: 32px; max-width: 434px; }
  figure img { border-radius: 10px; }
  .foot { flex-direction: column; align-items: center; }
  .doc { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .button:active { transform: none; }
  .shuffle:active, .card.is-dragging { scale: none; }
}
