/* rupertlibrarian.com: Rupert's own colours (src/app.css), light and dark.
   Layout: a centred column; the home page alternates plain sections with
   tinted bands, each built around one real screen of the app. */

:root {
  --bg: #faf8f5;
  --panel: #f1ede6;
  --band: #f3eee6;
  --card: #fffdfa;
  --text: #2b2723;
  --muted: #7a7168;
  --border: #ddd5ca;
  --accent: #8a5a2b;
  --accent-soft: rgba(138, 90, 43, 0.12);
  --accent-strong: #6b4320;
  --on-accent: #fff;
  --shadow: 0 30px 80px -30px rgba(60, 40, 20, 0.45), 0 8px 24px -12px rgba(60, 40, 20, 0.25);
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Ubuntu, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1c1a;
    --panel: #262321;
    --band: #23201e;
    --card: #2a2724;
    --text: #ece6de;
    --muted: #a79d93;
    --border: #3a3531;
    --accent: #d4a373;
    --accent-soft: rgba(212, 163, 115, 0.16);
    --accent-strong: #e8c39e;
    --on-accent: #1e1c1a;
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--ui);
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

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

/* MARK: Header and footer */

header.site {
  border-bottom: 1px solid var(--border);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

nav.site {
  margin-left: auto;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--text);
}

/* EN · ES · DE */
.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.lang-switch a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 6px;
}

.lang-switch a:hover {
  color: var(--text);
}

.lang-switch a[aria-current="true"] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.25);
}

footer.site {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.home footer.site {
  margin-top: 0;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 24px;
  padding-bottom: 40px;
}

footer.site a {
  color: var(--muted);
}

/* MARK: Type and buttons */

h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: 28px;
  margin: 64px 0 16px;
  line-height: 1.2;
  text-wrap: balance;
}

.lead {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 40em;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.button.primary {
  background: var(--accent);
  color: var(--on-accent);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px var(--accent);
}

/* MARK: Home: hero */

h1,
h2,
.brand {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero2 {
  text-align: center;
  padding-top: 64px;
  padding-bottom: 8px;
}

.hero2 h1 {
  font-size: clamp(36px, 6.4vw, 68px);
  line-height: 1.04;
  max-width: 15em;
  margin: 0 auto 18px;
}

.hero2 h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero2 .lead {
  margin: 0 auto 28px;
  max-width: 34em;
}

.hero2 .buttons {
  justify-content: center;
}

/* Android is announced separately from the available downloads. */
.development-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.875rem;
  font-weight: 600;
}

.android-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 22px 0 0;
  font-size: 1rem;
}

.android-announcement {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.android-announcement > div {
  flex: 1 1 240px;
}

.android-announcement h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}

.android-announcement p {
  margin: 0;
  font-size: 1rem;
}

/* Light and dark: the dark picture is cut along a slanted line that the
   handle moves. */
.daynight-wrap {
  margin-top: 44px;
}

.daynight {
  --split: 30%;
  position: relative;
  border-radius: 14px;
  box-shadow: var(--shadow);
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  aspect-ratio: 1440 / 900;
}

.daynight img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* The cut runs from split + 6 % at the top to split − 6 % at the bottom:
   12 % of the width across the full height (1440 × 900), so the handle
   leans atan(0.12 × 1440 / 900) = 10.87°. */
.daynight .night {
  clip-path: polygon(calc(var(--split) + 6%) 0, 100% 0, 100% 100%, calc(var(--split) - 6%) 100%);
}

.handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 4px;
  margin-left: -2px;
  padding: 0;
  border: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(212, 163, 115, 0.9));
  transform: skewX(-10.87deg);
  transform-origin: center;
  cursor: ew-resize;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
}

.handle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) skewX(10.87deg);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.handle circle:first-child {
  fill: #fffdfa;
  stroke: #d4a373;
  stroke-width: 1.5;
}

.handle .sun {
  fill: none;
  stroke: #c98a2b;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.handle .sun-body {
  fill: #e8a838;
}

.handle .moon {
  fill: #3a3531;
}

.mode-tag {
  position: absolute;
  top: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.mode-tag.day {
  left: 12%;
  background: rgba(255, 253, 250, 0.9);
  color: #6b4320;
}

.night-tag {
  right: 12%;
  background: rgba(30, 28, 26, 0.85);
  color: #e8c39e;
}

.caption {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 14px 0 0;
}

/* MARK: Home: bands */

.band {
  background: var(--band);
  border-block: 1px solid var(--border);
  margin-top: 96px;
  padding-block: 72px;
}

.band h2 {
  margin-top: 0;
}

.home h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
}

/* MARK: Home: Ask Rupert */

.ask-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

.ask-copy p {
  color: var(--muted);
  max-width: 32em;
}

.langs,
.platforms {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin: 10px 0 18px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.langs button,
.platforms button {
  font: 600 15px var(--ui);
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 9px;
  padding: 8px 16px;
  cursor: pointer;
}

.langs button[aria-selected="true"],
.platforms button[aria-selected="true"] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.25);
}

/* Five platforms wrap on narrow phones: keep both rows centred. */
.platforms {
  justify-content: center;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
  color: var(--muted);
}

.ticks li {
  padding-left: 26px;
  position: relative;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* The chat, drawn like Rupert's own panel. */
.chat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 470px;
  display: flex;
  flex-direction: column;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.chat-head strong {
  display: block;
  font-size: 17px;
}

.model {
  font-size: 13px;
  color: var(--muted);
}

.owl-stage {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
}

.owl-pic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.85) rotate(-6deg);
  transition:
    opacity 0.45s,
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat[data-lang="en"] .owl-pic[data-outfit="en"],
.chat[data-lang="es"] .owl-pic[data-outfit="es"],
.chat[data-lang="de"] .owl-pic[data-outfit="de"],
.chat:not([data-lang]) .owl-pic[data-outfit="en"] {
  opacity: 1;
  transform: none;
}

.chat-body {
  flex: 1;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15.5px;
  line-height: 1.5;
}

.bubble.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 5px;
}

.bubble.bot {
  align-self: flex-start;
  background: var(--panel);
  border-bottom-left-radius: 5px;
  min-height: 3em;
}

.steps {
  font-size: 12.5px;
  color: var(--muted);
}

.chat.in .bubble.user {
  animation: rise 0.4s ease-out both;
}

.chat.in .steps {
  animation: rise 0.4s 0.45s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.chat-input {
  margin: 0 14px 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 15px;
}

/* MARK: Home: one library, every screen */

.everywhere {
  text-align: center;
  padding-top: 96px;
}

.everywhere h2 {
  margin-top: 0;
}

.lead.small {
  font-size: 18px;
  margin: 0 auto 8px;
  max-width: 36em;
}

.device-stage {
  display: grid;
  place-items: center;
  margin-top: 8px;
}

/* The window (its frame drawn for each desktop platform) and the phone share
   one spot: switching to a phone shrinks the window away as the phone rises. */
.device,
.handset {
  grid-area: 1 / 1;
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.device {
  position: relative;
  width: min(100%, 980px);
  aspect-ratio: 1440 / 900;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.handset {
  width: min(56vw, 290px);
  opacity: 0;
  transform: translateY(40px) scale(0.92);
  pointer-events: none;
}

.handset img {
  display: block;
  border-radius: clamp(26px, 7vw, 44px);
  outline: clamp(6px, 1.6vw, 10px) solid #1d1b19;
  outline-offset: -1px;
  box-shadow: var(--shadow);
}

/* Android phones: squarer corners and a punch-hole camera over the status bar. */
.handset.android {
  position: relative;
}

.handset.android img {
  border-radius: clamp(18px, 5vw, 30px);
}

.handset.android::after {
  content: "";
  position: absolute;
  top: 1.6%;
  left: 50%;
  width: 3.4%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #1d1b19;
  transform: translateX(-50%);
}

.device-stage[data-platform="phone"] .device,
.device-stage[data-platform="android"] .device {
  opacity: 0;
  transform: scale(0.86);
}

.device-stage[data-platform="phone"] .handset.iphone,
.device-stage[data-platform="android"] .handset.android {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}

.chrome {
  position: relative;
  height: 3.1%;
  min-height: 18px;
  display: flex;
  align-items: center;
  padding: 0 1.2%;
  font-size: clamp(9px, 1vw, 13px);
  font-weight: 600;
  background: #ebe5dd;
  color: #4d453e;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.3s, height 0.3s;
}

@media (prefers-color-scheme: dark) {
  .chrome {
    background: #2b2826;
    color: #d8d0c6;
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }
}

.lights {
  display: flex;
  gap: 0.55em;
}

.lights i {
  width: 0.95em;
  height: 0.95em;
  border-radius: 50%;
  background: #ff5f57;
}

.lights i:nth-child(2) {
  background: #febc2e;
}

.lights i:nth-child(3) {
  background: #28c840;
}

.win-title {
  margin-left: 0.9em;
}

.win-controls,
.gnome-close {
  display: none;
}

.screen {
  position: absolute;
  inset: 3.1% 0 0;
  transition: top 0.3s;
}

.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Windows 11: title at the left, three square controls at the right. */
.device-stage[data-platform="win"] .device {
  border-radius: 8px;
}

.device-stage[data-platform="win"] .chrome {
  background: #f3f3f3;
  color: #1f1f1f;
  font-weight: 400;
  height: 4%;
}

.device-stage[data-platform="win"] .screen {
  top: 4%;
}

.device-stage[data-platform="win"] .lights {
  display: none;
}

.device-stage[data-platform="win"] .win-title {
  margin-left: 0.6em;
}

.device-stage[data-platform="win"] .win-title::before {
  content: "";
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.7em;
  vertical-align: -0.2em;
  border-radius: 3px;
  background: url("/img/icon.png") center / cover;
}

.device-stage[data-platform="win"] .win-controls {
  display: flex;
  margin-left: auto;
  height: 100%;
}

.win-controls i {
  width: 3.4em;
  height: 100%;
  position: relative;
}

.win-controls i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.win-controls .min::before {
  width: 0.8em;
  border-top: 1px solid currentColor;
}

.win-controls .max::before {
  width: 0.75em;
  height: 0.75em;
  border: 1px solid currentColor;
  border-radius: 1px;
}

.win-controls .close::before,
.win-controls .close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.95em;
  border-top: 1px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.win-controls .close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (prefers-color-scheme: dark) {
  .device-stage[data-platform="win"] .chrome {
    background: #202020;
    color: #f0f0f0;
  }
}

/* GNOME: title centred in a header bar, a round close button at the right. */
.device-stage[data-platform="linux"] .device {
  border-radius: 14px 14px 10px 10px;
}

.device-stage[data-platform="linux"] .chrome {
  justify-content: center;
  background: #ebebeb;
  color: #2e2e2e;
  height: 4.6%;
}

.device-stage[data-platform="linux"] .screen {
  top: 4.6%;
}

.device-stage[data-platform="linux"] .lights {
  display: none;
}

.device-stage[data-platform="linux"] .win-title {
  margin: 0;
  font-weight: 700;
}

.device-stage[data-platform="linux"] .gnome-close {
  display: block;
  position: absolute;
  right: 1.2%;
  top: 50%;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  transform: translateY(-50%);
}

.gnome-close::before,
.gnome-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.7em;
  border-top: 1.5px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.gnome-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (prefers-color-scheme: dark) {
  .device-stage[data-platform="linux"] .chrome {
    background: #303030;
    color: #eee;
  }
  .device-stage[data-platform="linux"] .gnome-close {
    background: rgba(255, 255, 255, 0.1);
  }
}

.platform-note {
  color: var(--muted);
  font-size: 15px;
  margin: 18px auto 0;
  max-width: 34em;
  min-height: 3em;
}

/* MARK: Home: scanning */

.scan-story {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.38fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 0;
  margin-top: 40px;
}

.scan-story figure {
  margin: 0;
}

.phone-shot img {
  border-radius: 32px;
  outline: 8px solid #1d1b19;
  outline-offset: -1px;
  box-shadow: var(--shadow);
  display: block;
}

.mac-shot img {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}

.flight {
  position: relative;
  height: 160px;
  margin-inline: -6%;
}

.flight svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.flight path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 4 7;
  vector-effect: non-scaling-stroke;
  opacity: 0.6;
}

.sheet {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 44px;
  margin: -22px 0 0 -17px;
  background: #fffdfa;
  border: 1px solid #ddd5ca;
  border-radius: 3px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 6px;
  offset-path: path("M6 140 C 60 -12, 150 -12, 210 140");
  offset-rotate: 0deg;
  offset-distance: 50%;
}

.sheet i {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: #c9bfb2;
}

.sheet i:nth-child(2) {
  width: 70%;
}

.scan-story.go .sheet {
  animation: fly 3.2s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

@keyframes fly {
  0% {
    offset-distance: 0%;
    opacity: 0;
    transform: scale(0.7);
  }
  12% {
    opacity: 1;
  }
  80% {
    opacity: 1;
    transform: scale(1);
  }
  92%,
  100% {
    offset-distance: 100%;
    opacity: 0;
    transform: scale(0.8);
  }
}

.steps-row {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 44px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.steps-row li {
  counter-increment: step;
  color: var(--muted);
  font-size: 15.5px;
  padding-top: 46px;
  position: relative;
}

.steps-row li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 15px var(--ui);
  color: var(--on-accent);
  background: var(--accent);
}

.steps-row b {
  color: var(--text);
}

/* MARK: Home: everything else */

.more {
  padding-top: 96px;
}

.more h2 {
  margin-top: 0;
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}

.cell.wide {
  grid-column: span 2;
}

.cell h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.cell p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.cell.private {
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--panel);
}

/* MARK: Home: download */

.download-band {
  margin-bottom: 0;
}

.get {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
}

.get-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.get h2 {
  margin: 0 0 4px;
}

.get-sub {
  margin: 0 0 18px;
  color: var(--muted);
}

.button.big {
  font-size: 18px;
  padding: 14px 26px;
  border-radius: 12px;
}

.get-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 48px;
}

.pf {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 4px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.pf:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px -14px var(--accent);
}

.pf svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  margin-bottom: 6px;
}

.pf-name {
  font-weight: 700;
  font-size: 17px;
}

.pf-req {
  font-size: 13.5px;
  color: var(--muted);
}

.pf-file {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.pf-file::after {
  content: " →";
}

.pf.yours {
  border-color: var(--accent);
  background: linear-gradient(160deg, var(--accent-soft), transparent 60%), var(--card);
}

.fineprint {
  margin: 28px auto 0;
  max-width: 46em;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* MARK: Text pages (privacy, support) */

article.text {
  max-width: 760px;
  padding-top: 40px;
}

article.text h1 {
  font-size: 34px;
}

article.text h2 {
  font-size: 22px;
  margin: 36px 0 10px;
}

article.text li {
  margin-bottom: 6px;
}

article.text code {
  font-size: 0.9em;
  background: var(--panel);
  padding: 1px 5px;
  border-radius: 5px;
}

/* MARK: Narrow screens */

@media (max-width: 860px) {
  .ask-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .scan-story {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
    gap: 18px;
  }
  .flight {
    display: none;
  }
  .steps-row,
  .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }
  .cell.wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .hero2 {
    padding-top: 40px;
  }
  .band {
    margin-top: 64px;
    padding-block: 52px;
  }
  .scan-story {
    grid-template-columns: minmax(0, 1fr);
  }
  .phone-shot {
    width: 60%;
    margin: 0 auto !important;
  }
  .get {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    justify-items: center;
  }
  .steps-row,
  .platform-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mode-tag {
    display: none;
  }
  .handset {
    width: min(36vw, 200px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
