/* Telegrive's website, in the same UI as gramX's site, with Telegrive's own
   colours (DESIGN.md) and type, IBM Plex Sans. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("assets/fonts/plex-sans-700.woff2") format("woff2");
}

/* ── Themes: Dark (default) and Light, as in the app ───────────────────── */

:root {
  color-scheme: dark;
  --bg: #111317;
  --surface: #181b20;
  --surface-2: #20242a;
  --border: #2b3038;
  --text: #eceef2;
  --muted: #a3aab6;
  --link: #8fa9ff;
  --chrome: rgb(17 19 23 / 0.72);
  --bezel: #1f2125;

  --accent: #8fa9ff;
  --accent-hover: #a9bdff;
  --on-accent: #111317;
  --like: #ff8a80;
  --repost: #5cc48e;

  /* Kind hues colour a file's glyph only, lifted for the dark theme. */
  --k-image: #a48fdc;
  --k-video: #d98597;
  --k-audio: #d1a162;
  --k-doc: #759ae0;
  --k-pdf: #d77c7c;
  --k-app: #75b092;

  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Noto Color Emoji";
  --pill: 999px;
  --r-lg: 20px;
  --r-md: 14px;
  --gutter: 16px;
  --max: 1120px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --border: #e1e4e9;
  --text: #15171b;
  --muted: #5a6170;
  --link: #2356e0;
  --chrome: rgb(246 247 249 / 0.72);
  --bezel: #16181c;
  --accent: #2356e0;
  --accent-hover: #1d47bd;
  --on-accent: #ffffff;
  --like: #c23636;
  --repost: #1d8551;
  --k-image: #7353c9;
  --k-video: #c4435f;
  --k-audio: #b86e0e;
  --k-doc: #2a63cf;
  --k-pdf: #c23636;
  --k-app: #2b8657;
}

/* Without JavaScript, follow the device. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eef0f3;
    --border: #e1e4e9;
    --text: #15171b;
    --muted: #5a6170;
    --link: #2356e0;
    --chrome: rgb(246 247 249 / 0.72);
    --bezel: #16181c;
    --accent: #2356e0;
    --accent-hover: #1d47bd;
    --on-accent: #ffffff;
    --like: #c23636;
    --repost: #1d8551;
    --k-image: #7353c9;
    --k-video: #c4435f;
    --k-audio: #b86e0e;
    --k-doc: #2a63cf;
    --k-pdf: #c23636;
    --k-app: #2b8657;
  }
}

/* The brand images come in a version for each surface. */
.on-light { display: none; }
:root[data-theme="light"] .on-dark { display: none; }
:root[data-theme="light"] .on-light { display: inline-block; }

/* ── Base ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Links in running text: the text colour with a brand-blue underline, so the
   blue stays for actions instead of covering the page. */
p a, li a, .variants summary {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
p a:hover, li a:hover { text-decoration-thickness: 2.5px; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }

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

.i {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex: none;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--pill);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.skip:focus { top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn .i { width: 20px; height: 20px; }

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

.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface); }

.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn .i { width: 22px; height: 22px; }

/* ── Header ───────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.2s ease, background-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner { display: flex; align-items: center; gap: 16px; height: 60px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }

.nav-links { display: none; gap: 4px; margin-left: 12px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: var(--pill);
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

@media (min-width: 860px) { .nav-links { display: flex; } }

.theme-toggle .i { display: none; }
:root[data-theme="light"] .theme-toggle .t-light,
:root[data-theme="dark"] .theme-toggle .t-dark,
:root:not([data-theme]) .theme-toggle .t-dark { display: block; }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { padding: 40px 0 64px; }

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

.hero h1 {
  max-width: 13em;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin-top: 20px;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.55;
  text-wrap: pretty;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

@media (max-width: 520px) {
  .hero .cta-row .btn { flex: 1 1 100%; }
}

.cta-meta { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.cta-meta a { white-space: nowrap; }

.platform-note {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  max-width: 30em;
  color: var(--muted);
  font-size: 15px;
}
.platform-note .i { width: 20px; height: 20px; color: var(--accent); }
:root[data-platform="ios"] .platform-note { display: flex; }

/* On an iPhone the iPhone guide leads, and the APK steps back. */
:root[data-platform="ios"] .hero .cta-iphone { order: -1; border-color: transparent; background: var(--accent); color: var(--on-accent); }
:root[data-platform="ios"] .hero .cta-iphone:hover { background: var(--accent-hover); }
:root[data-platform="ios"] .hero .cta-android { border-color: var(--border); background: transparent; color: var(--text); }
:root[data-platform="ios"] .hero .cta-android:hover { background: var(--surface); }

.qr-card {
  display: none;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 0.5px solid var(--border);
  max-width: 26em;
}
.qr-card p { color: var(--muted); font-size: 14px; line-height: 1.45; }
.qr-card strong { color: var(--text); font-weight: 700; }
:root[data-platform="desktop"] .qr-card { display: flex; }

.qr {
  flex: none;
  width: 96px;
  height: 96px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
}
.qr svg { width: 100%; height: 100%; }

.hero-visual { margin: 0; display: grid; place-items: center; }

@media (min-width: 980px) {
  .hero { padding: 56px 0 88px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 32px; }
}

/* A phone holding a real screenshot. The status bar is drawn here so the
   screenshot carries none of the phone's own notifications. */
.phone {
  width: min(300px, 82vw);
  padding: 9px;
  border-radius: 46px;
  background: var(--bezel);
}
.screen {
  overflow: hidden;
  border-radius: 37px;
  background: #000;
}
.shot-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 2px 22px 0;
  color: #e7e9ea;
  font-size: 12px;
  font-weight: 600;
}
.shot-status .camera {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: #111316;
}
.sb-icons { display: flex; align-items: center; gap: 5px; }
.sb-icons svg { width: auto; height: 10px; fill: currentColor; }
.shot { width: 100%; height: auto; }
@media (min-width: 1200px) { .phone { width: 340px; } }

/* Trust strip */
.trust { border-block: 0.5px solid var(--border); }
.trust ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: 0;
  padding-block: 0;
  list-style: none;
}
.trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.trust li strong { color: var(--text); font-weight: 700; }
.trust .i { width: 22px; height: 22px; color: var(--accent); }
@media (min-width: 860px) {
  .trust ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trust li { justify-content: center; padding: 22px 8px; font-size: 15px; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */

/* Single-column grids are pinned to the screen, so a row of unwrapped text
   (a chat preview, a post header) can't widen the page on a phone. */
.compare, .bento, .points, .guest, .steps { grid-template-columns: minmax(0, 1fr); }

.section { padding: clamp(72px, 10vw, 120px) 0; }
.section + .section { padding-top: 0; }

.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

.h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Post rows, as post_card.dart lays them out */
.post {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
}
.post:last-child { border-bottom: 0; }
.av {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  font-style: normal;
}
.post-main { flex: 1; min-width: 0; }
.post-head {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}
.post-head b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.post-head .vb { width: 16px; height: 16px; color: var(--accent); }
.post-head .h { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.post-head .t { flex: none; color: var(--muted); }
.post-head .unread { flex: none; width: 7px; height: 7px; margin-left: 2px; border-radius: 50%; background: var(--accent); }
.ptext { margin-top: 4px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.ptext .tag { color: var(--link); }

/* Before / after */
.compare { display: grid; gap: 16px; margin-top: 48px; align-items: stretch; }
@media (min-width: 860px) {
  .compare { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: center; }
}
.compare .card { padding: 20px 24px; }
.compare-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
}
.compare-arrow .i { transform: rotate(90deg); }
@media (min-width: 860px) { .compare-arrow .i { transform: none; } }

.compare-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.compare-label b { font-size: 17px; font-weight: 800; }
.compare-label span { color: var(--muted); font-size: 14px; }

.chatrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}
.chatrow:last-child { border-bottom: 0; }
.chatrow .av { width: 44px; height: 44px; }
.chatrow-main { flex: 1; min-width: 0; }
.chatrow-main b { display: block; font-size: 15px; font-weight: 700; }
.chatrow-main span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  flex: none;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* Features */
.bento { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento > .b-wide, .bento > .b-shot { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; }
  .bento > .b-wide { grid-column: span 4; }
  .bento > .b-third { grid-column: span 2; }
  .bento > .b-half { grid-column: span 3; }
  .bento > .b-shot { grid-column: span 3; grid-row: span 2; }
}

.feature { display: flex; flex-direction: column; padding: 24px; overflow: hidden; }
.feature h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; }
.feature p { margin-top: 8px; max-width: 36em; color: var(--muted); font-size: 15px; line-height: 1.55; }
.feature-visual { margin-top: auto; padding-top: 24px; }

.feature-shot {
  width: calc(100% + 48px);
  max-width: none;
  height: auto;
  max-height: 440px;
  margin: 24px -24px -24px;
  border-top: 1px solid var(--border);
  object-fit: cover;
  object-position: top;
  /* The crop ends mid-page, so let it fade rather than cut. */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
@media (min-width: 1024px) {
  .b-shot .feature-shot { margin-top: auto; }
  .b-shot p { margin-bottom: 24px; }
}

.folder-tabs {
  display: flex;
  gap: 4px;
  overflow: hidden;
  border-bottom: 0.5px solid var(--border);
  font-size: 15px;
}
.folder-tabs span { position: relative; padding: 12px 12px 14px; color: var(--muted); white-space: nowrap; }
.folder-tabs span.on { color: var(--text); font-weight: 700; }
.folder-tabs span.on::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.feature .caught { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.feature .caught .i { width: 28px; height: 28px; color: var(--accent); }
.feature .caught b { display: block; color: var(--text); font-size: 16px; font-weight: 800; }

.mini-list { display: grid; }
.mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 14px;
}
.mini-row:last-child { border-bottom: 0; }
.mini-row .av { width: 36px; height: 36px; font-size: 15px; }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-row .grow b { font-weight: 700; }
.mini-row .grow span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-row .unread-badge {
  min-width: 22px;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.kind { position: relative; }
.kind .i {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 50%;
  background: var(--surface);
}

.compose-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.compose-tools span {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* Themes: the tiles in the app's settings */
.themes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 380px;
  margin: 40px auto 0;
}
.theme-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 8px;
  border: 1px solid var(--tile-line);
  border-radius: var(--r-md);
  background: var(--tile);
  color: var(--tile-text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.theme-tile[data-theme-pick="light"] { --tile: #f6f7f9; --tile-text: #15171b; --tile-line: #e1e4e9; }
.theme-tile[data-theme-pick="dark"] { --tile: #111317; --tile-text: #eceef2; --tile-line: #2b3038; }
.radio { width: 20px; height: 20px; border: 2px solid var(--tile-line); border-radius: 50%; }
.theme-tile[aria-checked="true"] { outline: 2px solid var(--accent); outline-offset: -2px; }
.theme-tile[aria-checked="true"] .radio { border: 6px solid var(--accent); }

/* Points: privacy and support, as columns rather than cards */
.points { display: grid; gap: 32px; margin-top: 48px; }
@media (min-width: 860px) {
  .points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
}
.point { padding-top: 20px; border-top: 1px solid var(--border); }
.point h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.point h3 .i { width: 22px; height: 22px; color: var(--accent); }
.point p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.point .btn { margin-top: 20px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.share-row .btn { margin-top: 0; }
.share-row .i-x { width: 16px; height: 16px; }

.guest {
  display: grid;
  gap: 32px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  align-items: center;
}
@media (min-width: 860px) {
  .guest { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
}
.guest h3 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.guest p { margin-top: 12px; max-width: 34em; color: var(--muted); font-size: 16px; line-height: 1.55; }
.guest-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.guest-banner .i { width: 22px; height: 22px; color: var(--accent); }
.guest-banner div { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.guest-banner b { display: block; font-size: 15px; }
.guest-banner span { color: var(--muted); }
.guest-banner em { color: var(--link); font-style: normal; font-weight: 700; font-size: 14px; }
.guest .post { padding-inline: 4px; }

/* Install */
.steps {
  display: grid;
  gap: 40px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
}
.step { display: flex; flex-direction: column; }
.step-visual {
  display: grid;
  place-items: center;
  min-height: 284px;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.step h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.step-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 800;
}
.step p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.step .btn { margin-top: 20px; align-self: flex-start; }

/* Inside a step: drawn by background alone, no border or shadow. */
.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
}
.file-chip img { width: 40px; height: 40px; border-radius: 10px; }
.file-chip div { flex: 1; min-width: 0; font-size: 13px; }
.file-chip b { display: block; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.file-chip span { color: var(--muted); }
.file-chip .done { width: 22px; height: 22px; color: var(--repost); }
.progress { height: 4px; margin-top: 6px; border-radius: 2px; background: var(--border); overflow: hidden; }
.progress i { display: block; width: 100%; height: 100%; background: var(--accent); }

.sys-dialog {
  width: 100%;
  max-width: 280px;
  padding: 22px 20px 14px;
  border-radius: 26px;
  background: var(--surface);
  text-align: center;
}
.sys-dialog img { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 10px; }
.sys-dialog b { display: block; font-size: 17px; font-weight: 700; }
.sys-dialog p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.sys-dialog .row { display: flex; justify-content: flex-end; gap: 4px; margin-top: 16px; }
.sys-dialog .row span { padding: 8px 12px; border-radius: var(--pill); color: var(--link); font-size: 14px; font-weight: 700; }

/* Sign-in screen: auth_selection_page.dart */
.auth-mini { width: 100%; max-width: 280px; text-align: center; }
.auth-mini img { width: 56px; height: 56px; margin: 0 auto 10px; }
.auth-mini b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.auth-mini small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.auth-mini .a-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  margin-top: 8px;
  border-radius: 19px;
  font-size: 13px;
  font-weight: 700;
}
.auth-mini .a-btn .i { width: 18px; height: 18px; }
.auth-mini .a-fill { margin-top: 14px; background: var(--accent); color: var(--on-accent); }
.auth-mini .a-line { border: 1.2px solid var(--border); }
.auth-mini .a-text { min-height: 0; margin-top: 4px; color: var(--link); }

.variants { margin-top: 16px; font-size: 15px; }
.variants summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.variants summary::-webkit-details-marker { display: none; }
.variants summary .i { width: 18px; height: 18px; transition: transform 0.2s ease; }
.variants[open] summary .i { transform: rotate(180deg); }
.variants ul { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.variants li { color: var(--muted); line-height: 1.45; }
.variants li a { font-weight: 600; }

.update-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 40em;
  margin-top: 48px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.update-note .i { width: 22px; height: 22px; color: var(--accent); }
.update-note b { color: var(--text); }

/* FAQ */
.faq { max-width: 760px; margin: 32px auto 0; }
.faq details { border-bottom: 0.5px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { width: 24px; height: 24px; color: var(--muted); transition: transform 0.2s ease; }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq .answer { max-width: 36em; padding: 0 4px 24px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.faq .answer p + p { margin-top: 10px; }

/* Final call */
.final { text-align: center; }
.final .mark { width: 92px; height: auto; margin: 0 auto 16px; }
.final .lead { margin-inline: auto; }
.final .cta-row { justify-content: center; }

/* Footer */
.footer {
  padding: 40px 0 48px;
  border-top: 0.5px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer .fine { margin-top: 24px; max-width: 34em; line-height: 1.6; }

/* ── Download sheet (app_sheet.dart) ──────────────────────────────────── */

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 32px);
  margin: auto auto 0;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  color: var(--text);
  overflow: auto;
}
.sheet::backdrop { background: rgb(0 0 0 / 0.6); }
:root[data-theme="dark"] .sheet { background: var(--surface); }
.sheet[open] { animation: sheet-up 0.28s var(--ease); }
@keyframes sheet-up {
  from { transform: translateY(32px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (min-width: 640px) {
  .sheet { margin: auto; border-radius: 24px; padding-bottom: 24px; }
}
.sheet-handle { width: 36px; height: 4px; margin: 4px auto 12px; border-radius: 2px; background: var(--border); }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet-head h2 { flex: 1; font-size: 22px; font-weight: 800; letter-spacing: -0.015em; }
.sheet-head p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.sheet-head .icon-btn { margin: -6px -10px 0 0; }
.sheet ol { display: grid; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: s; }
.sheet li { display: flex; gap: 12px; font-size: 15px; line-height: 1.5; counter-increment: s; }
.sheet li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
:root[data-theme="dark"] .sheet li::before { background: var(--bg); }
.sheet li span { color: var(--muted); }
.sheet li b { color: var(--text); }
.sheet .btn { width: 100%; margin-top: 24px; }
.sheet .again { display: block; margin-top: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.sheet-qr {
  display: none;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 0.5px solid var(--border);
}
.sheet-qr p { color: var(--muted); font-size: 14px; line-height: 1.45; }
.sheet-qr b { color: var(--text); }
:root[data-platform="desktop"] .sheet-qr { display: flex; }
.sheet-ios { display: none; margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.sheet-ios .btn { margin-top: 16px; }
.sheet[data-mode="ios"] .sheet-ios { display: block; }
.sheet[data-mode="ios"] .sheet-file,
.sheet[data-mode="ios"] ol,
.sheet[data-mode="ios"] > .btn[data-close],
.sheet[data-mode="ios"] .again { display: none; }

/* ── Legal pages ──────────────────────────────────────────────────────── */

.doc { max-width: 720px; padding-block: 48px 24px; }
.doc .back, .guide .back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.doc .back .i, .guide .back .i { width: 18px; height: 18px; transform: rotate(180deg); }
.doc h1, .guide h1 { margin-top: 24px; font-size: clamp(34px, 6vw, 46px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.doc .updated { margin-top: 10px; color: var(--muted); font-size: 14px; }
.doc .summary, .guide .summary { margin-top: 24px; color: var(--text); font-size: 19px; line-height: 1.55; }
.doc h2 { margin-top: 40px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.doc p { margin-top: 12px; max-width: 38em; color: color-mix(in srgb, var(--text) 76%, var(--bg)); font-size: 16px; line-height: 1.7; }
.doc p a { overflow-wrap: anywhere; }
.doc ul { margin: 12px 0 0; padding-left: 22px; color: color-mix(in srgb, var(--text) 76%, var(--bg)); font-size: 16px; line-height: 1.7; }
.doc li + li { margin-top: 6px; }

/* ── iPhone guide ─────────────────────────────────────────────────────── */

.guide { max-width: 760px; padding-block: 48px 24px; }
.guide > h2, .howto > h2 {
  margin-top: 56px;
  font-size: clamp(24px, 3.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.guide > p { margin-top: 12px; max-width: 38em; color: var(--muted); font-size: 16px; line-height: 1.6; }

.open-both {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.open-both > div:first-child { flex: 1; }
.open-both p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.open-both b { color: var(--text); }
.open-both .btn { margin-top: 12px; }
.open-both .qr { display: none; }
:root[data-platform="desktop"] .open-both .qr { display: block; }

.checklist { display: grid; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 12px; }
.checklist .i { flex: none; width: 22px; height: 22px; color: var(--repost); }
.checklist p { color: var(--muted); font-size: 16px; line-height: 1.55; }
.checklist b { color: var(--text); }

/* A route through the iPhone's Settings, kept together as one chip. */
.path {
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.94em;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.path i { margin: 0 5px; color: var(--muted); font-style: normal; font-weight: 400; }

.callout {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.callout .i { flex: none; width: 22px; height: 22px; color: var(--accent); }
.callout p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.callout p + p { margin-top: 10px; }
.callout b { color: var(--text); }

.picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 20px; }
@media (min-width: 720px) {
  .picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pick {
  display: block;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pick:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.pick[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pick b { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; }
.pick em {
  padding: 2px 8px;
  border-radius: var(--pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.pick span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* One numbering runs through a guide's computer and iPhone steps. */
.howto { counter-reset: step; }
.where {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.where .i { width: 18px; height: 18px; }
.howto ol { display: grid; gap: 20px; margin: 16px 0 0; padding: 0; list-style: none; }
.howto li { position: relative; padding-left: 42px; counter-increment: step; }
.howto li::before {
  content: counter(step);
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 800;
}
.howto li p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.howto li b { color: var(--text); }
.howto li .btn { margin-top: 14px; }
.howto li .file-meta { margin-top: 8px; font-size: 14px; }

.weekly { margin-top: 32px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--r-lg); }
.weekly h3 { font-size: 17px; font-weight: 800; }
.weekly p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.55; }

.guide .faq { margin-top: 12px; }

/* Each step shows the screen it happens on: beside the text when there is
   room, under it on a phone. Tapping a screen opens it large. */
.howto li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 24px; }
.step-shot { margin: 0; }
.step-shot a {
  display: block;
  width: min(100%, 300px);
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.step-shot img { display: block; width: 100%; height: auto; }
@media (min-width: 720px) {
  .guide { max-width: 860px; }
  .howto li { grid-template-columns: minmax(0, 1fr) 236px; align-items: start; }
  .step-shot a { width: 100%; }
}
@media (min-width: 900px) {
  .howto li { grid-template-columns: minmax(0, 1fr) 264px; }
}
.lightbox {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
}
.lightbox::backdrop { background: rgb(0 0 0 / 0.72); }
.lightbox img { display: block; width: min(92vw, 560px); height: auto; padding: 16px; }
.lightbox [data-close] { position: absolute; top: 10px; right: 10px; }

/* ── Motion ───────────────────────────────────────────────────────────── */
/* site.js hides only what starts below the fold, so the page stays
   readable if the script never runs. */

.reveal { transition: opacity 0.6s ease, transform 0.6s var(--ease); }
.reveal.pending { opacity: 0; transform: translateY(20px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Telegrive's own pieces ───────────────────────────────────────────── */

/* Wins over any display a class sets, so script can hide things. */
[hidden] { display: none !important; }

/* The app's screens are light, so the drawn status bar is too. */
.screen.light { background: #f6f7f9; }
.screen.light .shot-status { color: #15171b; }
.screen.light .shot-status .camera { background: #16181c; }

/* A file as the app lists it: its kind's glyph in a soft square. */
.slot {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}
.slot .i { width: 22px; height: 22px; }
.k-image { color: var(--k-image); }
.k-video { color: var(--k-video); }
.k-audio { color: var(--k-audio); }
.k-doc { color: var(--k-doc); }
.k-pdf { color: var(--k-pdf); }
.k-app { color: var(--k-app); }
.chatrow .slot { width: 44px; height: 44px; }
.chatrow-main span { font-variant-numeric: tabular-nums; }
.chatrow .badge.warn { background: color-mix(in srgb, var(--like) 12%, transparent); color: color-mix(in srgb, var(--like) 75%, var(--text)); }
.mini-row .slot { width: 36px; height: 36px; border-radius: 8px; }
.mini-row .slot .i { width: 20px; height: 20px; }
.mini-row .ok { width: 22px; height: 22px; color: var(--repost); }

/* A search field, as the app draws it. */
.search-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 15px;
}
.search-mini .i { width: 20px; height: 20px; color: var(--muted); }

/* A file stored in parts: one segment a part. */
.parts { display: flex; gap: 3px; margin-top: 12px; }
.parts i { flex: 1; height: 8px; border-radius: 2px; background: var(--accent); }
.parts-meta { margin-top: 8px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* The player's controls, at rest. */
.player-mini { display: grid; gap: 12px; }
.player-mini .bar { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.player-mini .bar i { display: block; width: 38%; height: 100%; background: var(--accent); }
.player-mini .times { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* A message in the channel holding a file, with the details Telegrive
   reads back folded under a spoiler. */
.attach {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.attach .disc {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}
.attach .disc .i { width: 22px; height: 22px; }
.attach b { display: block; font-size: 15px; }
.attach span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ptext .name { font-weight: 700; }
.post .details { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.post .details small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.spoiler {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: start;
  word-break: break-all;
  cursor: pointer;
}
.spoiler span { filter: blur(5px); transition: filter 0.2s ease; }
.spoiler[aria-pressed="true"] span { filter: none; }

.final .mark { width: 96px; height: 96px; border-radius: 22px; }

/* Running text in the guides keeps to about 75 characters a line. */
.guide p { max-width: 36em; }
.callout p,
.weekly p,
.open-both p,
.checklist p { max-width: 31em; }
