/* Lowfire: the website. Tokens follow the app's FlatRows sheet (chatlet docs/design/flatrows). */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/GeistMono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --page: #FFFFFF;
  --panel: #F2F3F6;
  --rail: #E3E5EB;
  --window: #FFFFFF;
  --line: #E3E5EA;
  --line2: #D2D6DE;
  --fg: #1A1C21;
  --fg2: #535966;
  --fg3: #69707D;
  --cipher: #8A90A0;
  --accent: #4654D1;
  --accent-fg: #3642B8;
  --accent-soft: #E3E6FB;
  --accent-ink: #2B36A0;
  --solid: #1A1C21;
  --solid-hover: #33363E;
  --on-solid: #FFFFFF;
  --chip: #FFFFFF;
  --ember: #E8783A;
  --shadow-window: 0 30px 80px rgba(24, 28, 48, 0.16), 0 4px 14px rgba(24, 28, 48, 0.08);
  --shadow-chip: 0 1px 2px rgba(24, 28, 48, 0.12);
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #121317;
    --panel: #17181C;
    --rail: #0D0E11;
    --window: #17181C;
    --line: #22242A;
    --line2: #2C2F37;
    --fg: #E4E6EA;
    --fg2: #A0A6B1;
    --fg3: #7F8693;
    --cipher: #6C7280;
    --accent: #8B9CFF;
    --accent-fg: #A9B5FF;
    --accent-soft: #262A45;
    --accent-ink: #CBD2FF;
    --solid: #E4E6EA;
    --solid-hover: #FFFFFF;
    --on-solid: #121317;
    --chip: #25272E;
    --ember: #F08A4B;
    --shadow-window: 0 30px 80px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-chip: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--fg); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--page); padding: 8px 12px; z-index: 10; }

/* navigation */
.nav { display: flex; align-items: center; height: 68px; gap: 40px; }
.brand { display: flex; align-items: center; gap: 8px; font: 600 17px/1 var(--sans); letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 20px; height: 20px; fill: var(--ember); }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--fg2); }
.nav ul a { text-decoration: none; }
.nav ul a:hover { color: var(--fg); }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.gh { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--fg2); }
.gh:hover { color: var(--fg); background: var(--panel); }
.gh svg { width: 20px; height: 20px; fill: currentColor; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: 10px; font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--solid); color: var(--on-solid); }
.btn.primary:hover { background: var(--solid-hover); }
.btn.secondary { background: var(--panel); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line2); }
.btn.secondary:hover { background: var(--rail); }
.btn.small { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }

/* hero */
.hero { padding: 72px 0 96px; }
.hero-text { max-width: 760px; }
h1 { font: 600 clamp(44px, 6.2vw, 80px)/1.0 var(--sans); letter-spacing: -0.045em; margin: 0 0 22px; text-wrap: balance; }
.lede { font-size: 20px; line-height: 1.5; color: var(--fg2); max-width: 40ch; margin: 0 0 32px; }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ctas .plain { margin-left: 8px; font-size: 15px; color: var(--fg2); text-underline-offset: 3px; }

/* the window and its two views */
.stage { margin-top: 64px; }
.stage-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.switch button { appearance: none; border: 0; background: none; font: 500 14px/1 var(--sans); color: var(--fg2); height: 32px; padding: 0 14px; border-radius: 8px; cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--chip); color: var(--fg); box-shadow: var(--shadow-chip), 0 0 0 1px var(--line); }
.caption { font-size: 14px; color: var(--fg3); }

.window { border-radius: 14px; overflow: hidden; background: var(--window); box-shadow: var(--shadow-window), 0 0 0 1px var(--line2); display: grid; grid-template-columns: 64px 240px 1fr; height: 520px; font-size: 14px; }
.w-rail { background: var(--rail); padding: 44px 0 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.w-rail .org { width: 38px; height: 38px; border-radius: 10px; background: var(--window); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--fg2); box-shadow: 0 0 0 1px var(--line2); }
.w-rail .org.on { box-shadow: 0 0 0 2px var(--accent); }
.w-side { background: var(--panel); border-right: 1px solid var(--line); padding: 44px 10px 0; }
.w-side h2 { margin: 0 8px 12px; font: 600 15px/1.2 var(--sans); letter-spacing: 0; }
.w-side .group { font-size: 12px; color: var(--fg3); margin: 18px 8px 6px; }
.row { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 7px; color: var(--fg2); white-space: nowrap; overflow: hidden; }
.row.on { background: var(--accent-soft); color: var(--fg); font-weight: 500; }
.hash { color: var(--fg3); width: 12px; text-align: center; flex: none; }
/* avatar tints, one per person, as in the app */
.t-maja { background: #F2C38B; }
.t-theo { background: #9FC7F0; }
.t-you { background: #B9A6F0; }
.dot { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.w-main { display: flex; flex-direction: column; min-width: 0; }
.w-head { height: 52px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 20px; gap: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.w-head small { font-weight: 400; color: var(--fg3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.msgs { flex: 1; padding: 18px 20px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.msg { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.msg .av { width: 36px; height: 36px; border-radius: 10px; }
.msg .who { font-weight: 600; margin-right: 8px; }
.msg time { color: var(--fg3); font-size: 12px; }
.msg p { margin: 2px 0 0; line-height: 1.5; }
.file { margin-top: 8px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line2); }
.file .ic { width: 32px; height: 38px; border-radius: 6px; background: var(--accent-soft); flex: none; }
.file b { font-weight: 500; display: block; }
.file span { color: var(--fg3); font-size: 12px; display: block; }
.composer { margin: 0 20px 18px; height: 44px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line2); display: flex; align-items: center; padding: 0 14px; color: var(--fg3); }

/* each element carries both views; the window's class picks one */
.window .s { display: none; }
.window.server .u { display: none; }
.window.server .s { display: inline; font-family: var(--mono); font-size: 12.5px; color: var(--fg3); letter-spacing: -0.01em; }
.window.server p.s, .window.server .file .s { display: block; }
.window.server .cipher { color: var(--cipher); word-break: break-all; }
.window.server .av, .window.server .dot { background: var(--line2); }
.window.server .file .ic { background: var(--line); }
.window.server .row.on { background: var(--line); font-weight: 400; }
.window.server .w-head { font-weight: 400; }
.window .msgs, .window .w-side, .window .w-head, .window .composer { transition: opacity .18s ease; }
.window.swapping .msgs, .window.swapping .w-side, .window.swapping .w-head, .window.swapping .composer { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .window .msgs, .window .w-side, .window .w-head, .window .composer { transition: none; }
}

/* sections */
section.band { padding: 112px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.band h2 { font: 600 clamp(32px, 3.6vw, 44px)/1.08 var(--sans); letter-spacing: -0.035em; margin: 0 0 16px; max-width: 20ch; text-wrap: balance; }
.band .intro { color: var(--fg2); font-size: 18px; max-width: 54ch; margin: 0 0 56px; }
.band .intro a, .three a { color: var(--accent-fg); text-underline-offset: 3px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.three h3 { font: 600 18px/1.3 var(--sans); letter-spacing: -0.015em; margin: 0 0 8px; }
.three p { margin: 0; color: var(--fg2); }

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 500; color: var(--fg3); font-size: 13px; padding: 0 16px 12px 0; border-bottom: 1px solid var(--line2); }
.table td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td:first-child { width: 34%; font-weight: 500; padding-right: 24px; }
.table td:nth-child(2) { width: 96px; }
.table td:last-child { color: var(--fg2); }
.tag { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; }
.tag.sealed { background: var(--accent-soft); color: var(--accent-ink); }
.tag.seen { background: var(--panel); color: var(--fg2); box-shadow: inset 0 0 0 1px var(--line2); }
.tag.none { background: transparent; color: var(--fg3); box-shadow: inset 0 0 0 1px var(--line); }

.get { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.get > div { padding: 32px; border-radius: 16px; background: var(--panel); display: flex; flex-direction: column; align-items: flex-start; }
.get h3 { font: 600 22px/1.2 var(--sans); letter-spacing: -0.02em; margin: 0 0 8px; }
.get p { color: var(--fg2); margin: 0 0 24px; max-width: 40ch; }
.get pre { align-self: stretch; margin: 0 0 24px; font: 13px/1.6 var(--mono); background: var(--window); border-radius: 10px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14px; color: var(--fg3); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }

@media (max-width: 980px) {
  .window { grid-template-columns: 200px 1fr; }
  .w-rail { display: none; }
  .three, .get { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav ul { display: none; }
  .wrap { padding: 0 20px; }
  .hero { padding: 40px 0 72px; }
  .window { grid-template-columns: 1fr; height: 500px; }
  .w-side { display: none; }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; border-bottom: 1px solid var(--line); padding: 14px 0; }
  .table td, .table td:first-child, .table td:nth-child(2) { width: auto; border: 0; padding: 0; }
  .table td:last-child { grid-column: 1 / -1; padding-top: 4px; }
}

/* ---- the other pages: a title, a lede, then sections of prose (security, self-host, download, privacy) */
.doc { padding-top: 72px; padding-bottom: 96px; } /* the header's grid (.wrap), like the home page: text is held to a readable measure, not the column */
.doc-head { margin-bottom: 48px; max-width: 760px; } /* as wide as the home page's headline */
.doc-head h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 16px; }
.doc-head .lede { max-width: 40ch; margin: 0; }
.doc section { padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.doc section > h2 { max-width: 64ch; }
.doc h2 { font: 600 24px/1.25 var(--sans); letter-spacing: -0.02em; margin: 0 0 12px; }
.doc h3 { font: 600 17px/1.35 var(--sans); letter-spacing: -0.01em; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--fg2); max-width: 64ch; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc a { color: var(--accent-fg); text-underline-offset: 3px; }
.doc code { font: 13.5px/1.5 var(--mono); background: var(--panel); padding: 1px 5px; border-radius: 5px; color: var(--fg); }
.doc pre { max-width: 760px; margin: 12px 0 16px; font: 13px/1.65 var(--mono); background: var(--panel); border-radius: 10px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; }
.doc pre code { background: none; padding: 0; }
.note { margin: 16px 0; padding: 14px 16px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg2); max-width: 64ch; }
.note strong { color: var(--fg); }
.note.draft { background: var(--accent-soft); box-shadow: none; color: var(--accent-ink); }
.note.draft strong { color: var(--accent-ink); }
.platforms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 8px 0 40px; max-width: 760px; }
.platform { padding: 20px; border-radius: 14px; background: var(--panel); }
.platform h3 { margin: 0 0 4px; }
.platform p { margin: 0 0 16px; font-size: 15px; }
.platform.soon p { margin: 0; }
.nav ul a[aria-current="page"] { color: var(--fg); }
@media (max-width: 680px) {
  .doc { padding-top: 40px; } /* as the home page's hero */
  .platforms { grid-template-columns: 1fr; }
}

/* ---- pricing: three tiers, the same features in each */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 16px; }
.tier { padding: 24px; border-radius: 16px; background: var(--panel); display: flex; flex-direction: column; }
.tier h2 { font: 600 20px/1.2 var(--sans); margin: 0 0 4px; }
.tier .size { color: var(--fg2); font-size: 15px; margin: 0 0 20px; }
.tier .price { font: 600 40px/1 var(--sans); letter-spacing: -0.03em; color: var(--fg); margin: 0; }
.tier .price small { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--fg2); }
.tier .billed { color: var(--fg3); font-size: 14px; margin: 6px 0 20px; }
.tier .btn { align-self: stretch; margin-top: auto; }
.doc .tiers-note { color: var(--fg3); font-size: 14px; margin: 0 0 48px; max-width: none; text-wrap: pretty; }
.doc .tiers-lead { margin: 0 0 24px; }
.included { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 32px; padding-left: 20px; }
@media (max-width: 860px) {
  .tiers { grid-template-columns: 1fr; }
  .included { grid-template-columns: 1fr; }
}

/* ---- the changelog: a day per entry, its date beside it (changelog/build.py writes the pages) */
.changelog .doc-head { margin-bottom: 8px; }
.doc .feed-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font-size: 15px; }
.doc .feed-links a { color: var(--fg2); text-decoration: none; }
.doc .feed-links a:hover { color: var(--fg); }
.nav .rss { font-size: 14px; color: var(--fg2); text-decoration: none; }
.nav .rss:hover { color: var(--fg); }
.doc .crumb { margin: 0 0 8px; font-size: 15px; }
.doc .crumb a { color: var(--fg2); text-decoration: none; }
.doc .crumb a::before { content: "← "; }
.doc .crumb a:hover { color: var(--fg); }
.day { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.doc-head + .day, .crumb + .day { border-top: 0; }
.when { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; font-size: 15px; }
.doc .when a { color: var(--fg); font-weight: 600; text-decoration: none; }
.when span { color: var(--fg3); font-size: 14px; }
.day-body { max-width: 64ch; min-width: 0; }
.day h2 { font: 600 28px/1.2 var(--sans); letter-spacing: -0.025em; margin: 0 0 10px; text-wrap: balance; }
.doc .day h2 a { color: inherit; text-decoration: none; }
.doc .day h2 a:hover { color: var(--accent-fg); }
.doc .day-lede { font-size: 18px; line-height: 1.55; color: var(--fg2); margin: 0 0 32px; }
.shot { margin: 0 0 40px; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow-window), 0 0 0 1px var(--line2); }
.shot.portrait img { max-width: 320px; }
.shot figcaption { font-size: 14px; color: var(--fg3); margin-top: 12px; }
.shot .for-dark { display: none; } /* a day's screenshot in each appearance: the one that matches the reader's shows */
@media (prefers-color-scheme: dark) {
  .shot .for-light { display: none; }
  .shot .for-dark { display: block; }
}
.headline { margin: 0 0 28px; }
.headline .tag { margin-bottom: 8px; }
.doc .headline h3 { font: 600 18px/1.35 var(--sans); letter-spacing: -0.015em; margin: 0 0 4px; }
.doc .headline p { margin: 0; }
.day h4 { font: 600 15px/1.3 var(--sans); margin: 36px 0 4px; }
.doc .changes { list-style: none; margin: 0; padding: 0; }
.doc .changes li { margin: 0; max-width: none; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.55; scroll-margin-top: 24px; }
.changes li b { color: var(--fg); font-weight: 600; }
.changes li:target, .headline:target { background: var(--accent-soft); box-shadow: -8px 0 0 var(--accent-soft), 8px 0 0 var(--accent-soft); }
.day details { margin-top: 8px; border-bottom: 1px solid var(--line); }
.day h4 + .changes + details, .day .changes + details { margin-top: 28px; }
.day summary { cursor: pointer; padding: 12px 0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; list-style: none; }
.day summary::-webkit-details-marker { display: none; }
.day summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 1.5px solid var(--fg3); border-bottom: 1.5px solid var(--fg3); transform: rotate(-45deg); }
.day details[open] summary::after { transform: rotate(45deg); }
.day summary .muted { color: var(--fg3); }
.day details .changes li:last-child { border-bottom: 0; }
.doc .more { margin: 24px 0 0; font-size: 15px; }
.doc .more a { color: var(--accent-fg); text-decoration: none; }
.doc .more a::after { content: " →"; }
.doc .more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc .correction { margin-top: 24px; font-size: 15px; }
.adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 32px; border-top: 1px solid var(--line); }
.adjacent a { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-radius: 12px; background: var(--panel); color: var(--fg); text-decoration: none; font-weight: 500; }
.adjacent a:hover { background: var(--rail); }
.adjacent a span { font-size: 14px; font-weight: 400; color: var(--fg3); }
.adjacent .newer { grid-column: 2; text-align: right; }
.screenshots .switch { margin-top: 24px; }
.screenshots section { padding: 40px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.screenshots .doc-head { margin-bottom: 24px; }
.screenshots section > p { margin: 0 0 20px; }
.shots { display: grid; grid-template-columns: 1fr; gap: 32px; max-width: 900px; }
.shots:has(.portrait) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shots .shot { margin: 0; }
.shots .shot.portrait img { max-width: none; }
.screenshots.light-only figure[data-appearance="dark"], .screenshots.dark-only figure[data-appearance="light"] { display: none; }
@media (max-width: 760px) {
  .day { grid-template-columns: 1fr; gap: 6px; padding: 36px 0; }
  .when { position: static; flex-direction: row; align-items: baseline; gap: 8px; }
  .day h2 { font-size: 24px; }
  .adjacent { grid-template-columns: 1fr; }
  .adjacent .newer { grid-column: 1; grid-row: 1; text-align: left; }
  .shots:has(.portrait) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
