/* Public permanent page (/l/<code>) and its previews: shared layout, components and motion. Each theme in
   landing-themes.css only changes the tokens below and adds its own details. Fonts are self-hosted (OFL, web/fonts). */
@font-face { font-family: Onest; src: url(fonts/onest-cyrillic.woff2?v=37268be) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(fonts/onest-latin.woff2?v=37268be) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Unbounded; src: url(fonts/unbounded-cyrillic.woff2?v=37268be) format("woff2"); font-weight: 200 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; src: url(fonts/unbounded-latin.woff2?v=37268be) format("woff2"); font-weight: 200 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Oswald; src: url(fonts/oswald.woff2?v=37268be) format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-regular.woff2?v=37268be) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-bold.woff2?v=37268be) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Velvet Serif"; src: url(fonts/velvet-serif-italic.woff2?v=37268be) format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Studio Serif"; src: url(fonts/studio-serif-regular.woff2?v=37268be) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Studio Serif"; src: url(fonts/studio-serif-semibold.woff2?v=37268be) format("woff2"); font-weight: 600; font-display: swap; }

/* The standalone page (src/web/permalink-page.js): the server names the theme on <html>, so the first paint already
   has the right background before the script renders the page. */
html.link-document { background: #1c1c1e; color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.link-document[data-theme="neon"] { background: #04060c; }
html.link-document[data-theme="aurora"] { background: #0b0d1c; }
html.link-document[data-theme="studio"] { background: #eceef1; color-scheme: light; }
html.link-document[data-theme="poster"] { background: #e8462f; color-scheme: light; }
html.link-document[data-theme="terminal"] { background: #0f0b06; }
html.link-document[data-theme="velvet"] { background: #160910; }
html.link-document[data-theme="poster"][data-accent="cobalt"] { background: #2547f0; }
html.link-document[data-theme="poster"][data-accent="sun"] { background: #f5c12e; }
html.link-document[data-theme="poster"][data-accent="paper"] { background: #e7e7e4; }
html.link-document[data-theme="terminal"][data-accent="green"] { background: #06100a; }
html.link-document[data-theme="terminal"][data-accent="ice"] { background: #060b12; }
.link-body { margin: 0; min-height: 100svh; }
.link-loading { min-height: 100svh; }
.link-noscript { max-width: 440px; margin: 0 auto; padding: 48px 16px; color: #8e8e97; font: 16px/1.5 system-ui, sans-serif; }

.landing-page {
  --bg: #1c1c1e; --surface: #242427; --surface-2: #2c2c30; --line: #38383e; --line-strong: #4a4a52;
  --text: #f4f4f5; --text-2: #c9c9cf; --muted: #8e8e97; --ok: #5ac48f; --warn: #e4ae4f; --idle: #9a9aa2;
  --cta: #1a7bbe; --cta-hover: #1f88d0; --cta-ink: #fff; --chip: #303035; --chip-ink: #e9e9ec; --focus: #8ec5ff;
  --font-title: Unbounded, Onest, system-ui, sans-serif; --font-text: Onest, system-ui, -apple-system, "Segoe UI", sans-serif; --font-ui: var(--font-text);
  --title-weight: 600; --title-tracking: -.01em; --title-leading: 1.1; --title-s: 34px; --title-m: 28px; --title-l: 23px; --title-xl: 20px;
  --avatar: 88px; --avatar-radius: 26px; --radius-cta: 18px; --radius-button: 18px; --radius-tile: 16px; --icon-radius: 12px; --sheet-max: 440px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  position: relative; isolation: isolate; box-sizing: border-box; width: 100%; min-height: 100svh; display: flex; flex-direction: column; align-items: center;
  padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); overflow-x: clip;
  background: var(--bg); color: var(--text); font-family: var(--font-text); font-size: 16px; line-height: 1.5; text-align: start;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.landing-page *, .landing-page *::before, .landing-page *::after { box-sizing: border-box; }
.landing-page :where(h1, p) { margin: 0; }
:where(.landing-page) a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.landing-page :where(a, button):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.landing-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }

/* The language switch (live page only) and the platform footer. */
.landing-top { width: 100%; max-width: var(--sheet-max); min-height: 38px; display: flex; justify-content: flex-end; align-items: center; }
.landing-lang { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--text); font: 600 12.5px/1 var(--font-ui); letter-spacing: .02em; cursor: pointer; }
.landing-lang span { color: var(--muted); font-weight: 500; }
.landing-foot { width: 100%; max-width: var(--sheet-max); margin-top: auto; padding-top: 44px; display: flex; justify-content: space-between; gap: 12px;
  color: var(--muted); font: 500 13px/1.4 var(--font-ui); }
.landing-foot a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }

.landing-sheet { width: 100%; max-width: var(--sheet-max); display: flex; flex-direction: column; padding-top: 18px; }
.landing-hero { display: flex; flex-direction: column; align-items: flex-start; }
.landing-avatar { position: relative; width: var(--avatar); height: var(--avatar); flex: none; display: grid; place-items: center; margin-bottom: 18px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--avatar-radius); background: var(--surface); }
.landing-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.landing-initial { width: 100%; height: 100%; display: grid; place-items: center; border-radius: inherit; color: var(--text-2);
  font: var(--title-weight) calc(var(--avatar) * .4)/1 var(--font-title); }
.landing-title { max-width: 100%; font: var(--title-weight) var(--title-s)/var(--title-leading) var(--font-title); letter-spacing: var(--title-tracking);
  overflow-wrap: anywhere; text-wrap: balance; }
.landing-title[data-size="m"] { font-size: var(--title-m); }
.landing-title[data-size="l"] { font-size: var(--title-l); }
.landing-title[data-size="xl"] { font-size: var(--title-xl); }
.landing-handle { margin-top: 8px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.landing-status { margin-top: 14px; display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); font: 500 13.5px/1.35 var(--font-ui); }
.landing-status.is-paused { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.landing-status.is-idle { background: color-mix(in srgb, var(--idle) 14%, transparent); color: var(--idle); }
.landing-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.landing-description { margin-top: 18px; color: var(--text-2); font-size: 16px; line-height: 1.58; overflow-wrap: anywhere; }

.landing-actions { margin-top: 24px; display: grid; gap: 10px; }
.landing-glyph { width: 22px; height: 22px; display: block; flex: none; }
.landing-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: var(--icon-radius); background: var(--chip); color: var(--chip-ink); }
.landing-cta { position: relative; min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 22px 9px 9px;
  border-radius: var(--radius-cta); background: var(--cta); color: var(--cta-ink); font: 650 17px/1.2 var(--font-ui); text-align: center;
  transition: transform .18s var(--ease), background-color .18s var(--ease), box-shadow .25s var(--ease); }
.landing-cta .landing-icon { background: color-mix(in srgb, var(--cta-ink) 16%, transparent); color: var(--cta-ink); }
.landing-label { min-width: 0; flex: 1; padding-inline-end: 42px; overflow-wrap: anywhere; }
.landing-button { min-height: 66px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 14px 11px 11px;
  border: 1px solid var(--line); border-radius: var(--radius-button); background: var(--surface); color: var(--text);
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .25s var(--ease); }
.landing-text { min-width: 0; }
.landing-text strong { display: block; font: 600 16px/1.3 var(--font-ui); overflow-wrap: anywhere; }
.landing-text small { display: block; margin-top: 2px; color: var(--muted); font: 400 13.5px/1.35 var(--font-text); overflow-wrap: anywhere; }
.landing-chevron { color: var(--muted); }
.landing-chevron .landing-glyph { width: 18px; height: 18px; }
.landing-missing { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-button); background: var(--surface); color: var(--text-2); }

/* The small utility row (platform channel, partner chat, support): equal columns, so three fit one phone row. */
.landing-extras { margin-top: 14px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.landing-chip { min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 9px 6px; border: 1px solid var(--line);
  border-radius: var(--radius-tile, 16px); color: var(--text-2); font: 500 13px/1.2 var(--font-ui); text-align: center;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.landing-chip > span:last-child { max-width: 100%; overflow-wrap: anywhere; }
.landing-chip-icon { display: grid; place-items: center; color: var(--muted); }
.landing-chip-icon .landing-glyph { width: 20px; height: 20px; }

.landing-save { margin-top: 22px; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 14px;
  color: var(--text-2); font-size: 14px; line-height: 1.45; }
.landing-save .landing-glyph { width: 18px; height: 18px; margin-top: 1px; color: var(--muted); }
.landing-footnote { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }

@media (hover: hover) {
  .landing-cta:hover { background: var(--cta-hover); }
  .landing-button:hover { border-color: var(--line-strong); background: var(--surface-2); }
  .landing-chip:hover { border-color: var(--line-strong); color: var(--text); }
}
.landing-page :is(.landing-cta, .landing-button, .landing-chip):active { transform: scale(.985); }

/* Desktop: the column stays phone-sized and the theme's background carries the width. */
@media (min-width: 760px) {
  .landing-page { padding-top: 28px; }
  .landing-sheet { padding-top: 40px; }
}

/* One orchestrated entrance: picture, name, then the buttons in reading order. */
@keyframes landing-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes landing-pop { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
.landing-page:not(.is-preview) :is(.landing-hero > *, .landing-description, .landing-actions > *, .landing-extras, .landing-save) {
  animation: landing-rise .6s var(--ease) both; animation-delay: calc(var(--order, 0) * 55ms + 40ms); }
.landing-page:not(.is-preview) .landing-hero > .landing-avatar { animation-name: landing-pop; }
.landing-hero > :nth-child(2) { --order: 1; }
.landing-hero > :nth-child(3) { --order: 2; }
.landing-hero > :nth-child(4) { --order: 3; }
.landing-description { --order: 4; }
.landing-actions > :nth-child(1) { --order: 5; }
.landing-actions > :nth-child(2) { --order: 6; }
.landing-actions > :nth-child(3) { --order: 7; }
.landing-actions > :nth-child(4) { --order: 8; }
.landing-actions > :nth-child(n + 5) { --order: 9; }
.landing-extras { --order: 10; }
.landing-save { --order: 11; }

/* The owner's designer shows the same markup inert, inside its own frame: no entrance, decoration scoped to the frame. */
.landing.is-preview { min-height: 100%; padding: 16px 16px 22px; overflow: hidden; }
.landing.is-preview .landing-bg { position: absolute; }
.landing.is-preview .landing-sheet { padding-top: 10px; }
.landing.is-thumb { width: 390px; min-height: 720px; pointer-events: none; user-select: none; }
.landing.is-thumb *, .landing.is-thumb *::before, .landing.is-thumb *::after { animation: none !important; transition: none !important; }

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

@media (max-width: 600px) { .landing-lang { min-height: 44px; min-width: 44px; } }
