/* =====================================================================
   Mortis Cloud — the public site. One sheet for every page.

   Identity: "Assemblage" (docs/design-system.md). Graphite neutrals with a
   trace of warmth, one red (the ribbon), Schibsted Grotesk for headings,
   Atkinson Hyperlegible Next for text. A 4 px grid, three radii, one shadow.

   Theme: follows prefers-color-scheme; <html data-theme="light|dark"> set by
   the toggle (remembered in localStorage) overrides it. The dark values are
   written twice — once under the media query, once under the attribute —
   because CSS has no way to share a block between the two.
   ===================================================================== */

/* ---------- Fonts: self-hosted, Latin + Latin Extended ---------- */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/schibsted-grotesk-latin.woff2) format('woff2');
  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: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/schibsted-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/atkinson-next-latin.woff2) format('woff2');
  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: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/atkinson-next-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-mono-latin.woff2) format('woff2');
  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: 'Atkinson Hyperlegible Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens: paper (light) ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f5f2;
  --bg-elevated: #ffffff;
  --bg-hover: #efeeea;
  --bg-active: #e7e5e0;
  --border: #e4e2dd;
  --border-strong: #cfccc5;

  --text: #2a2c30;
  --text-strong: #121315;
  --text-mute: #5e626a;
  --text-faint: #8a8d94;

  --accent: #b4321e;
  --accent-hover: #9f2b19;
  --accent-ink: #a52d1b;
  --accent-soft: rgba(180, 50, 30, 0.09);
  --ok: #23804e;
  --ok-soft: rgba(35, 128, 78, 0.1);
  --info: #2f5f9e;
  --info-soft: rgba(47, 95, 158, 0.09);
  --warn: #9a5b00;
  --warn-soft: rgba(154, 91, 0, 0.1);
  --danger: #c22a2a;

  --shadow: 0 24px 60px -16px rgba(20, 20, 25, 0.22), 0 2px 8px rgba(20, 20, 25, 0.06);
  --shadow-menu: 0 10px 28px -8px rgba(20, 20, 25, 0.18), 0 1px 3px rgba(20, 20, 25, 0.08);

  --font-display: 'Schibsted Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --fast: 110ms;
  --med: 180ms;

  --header-h: 64px;
  --gutter: 20px;
  --maxw: 1200px;

  color-scheme: light;
}

/* ---------- Tokens: graphite (dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #16171a;
    --bg-alt: #111214;
    --bg-elevated: #1d1f23;
    --bg-hover: #23252a;
    --bg-active: #2b2e34;
    --border: #2a2c31;
    --border-strong: #3b3e45;
    --text: #d9d8d4;
    --text-strong: #f3f2ef;
    --text-mute: #9c9fa6;
    --text-faint: #75787f;
    --accent: #c9432b;
    --accent-hover: #d6503a;
    --accent-ink: #f08a73;
    --accent-soft: rgba(240, 138, 115, 0.14);
    --ok: #5cc08a;
    --ok-soft: rgba(92, 192, 138, 0.14);
    --info: #8fb4e8;
    --info-soft: rgba(143, 180, 232, 0.13);
    --warn: #e5a93b;
    --warn-soft: rgba(229, 169, 59, 0.14);
    --danger: #f07373;
    --shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-menu: 0 12px 32px -8px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #16171a;
  --bg-alt: #111214;
  --bg-elevated: #1d1f23;
  --bg-hover: #23252a;
  --bg-active: #2b2e34;
  --border: #2a2c31;
  --border-strong: #3b3e45;
  --text: #d9d8d4;
  --text-strong: #f3f2ef;
  --text-mute: #9c9fa6;
  --text-faint: #75787f;
  --accent: #c9432b;
  --accent-hover: #d6503a;
  --accent-ink: #f08a73;
  --accent-soft: rgba(240, 138, 115, 0.14);
  --ok: #5cc08a;
  --ok-soft: rgba(92, 192, 138, 0.14);
  --info: #8fb4e8;
  --info-soft: rgba(143, 180, 232, 0.13);
  --warn: #e5a93b;
  --warn-soft: rgba(229, 169, 59, 0.14);
  --danger: #f07373;
  --shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-menu: 0 12px 32px -8px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* Scripts the two families do not cover: one system face for the whole line
   rather than Latin letters in one font and the rest in another. */
:root:lang(ru) {
  --font-display: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
:root:lang(ja) {
  --font-display: 'Hiragino Sans', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans JP', system-ui, sans-serif;
  --font-body: 'Hiragino Sans', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans JP', system-ui, sans-serif;
}
:root:lang(zh) {
  --font-display: 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Restoring a non-English page: hold the first paint until the dictionary is
   applied, so nobody reads a paragraph of English that then changes under
   them. i18n.js lifts this; the head script lifts it after 1.2 s regardless. */
.i18n-wait body { visibility: hidden; }

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
p, ul, ol, dl, dd, figure, h1, h2, h3, h4 { margin: 0; }
ul, ol { padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: 700;
  text-wrap: balance;
}
h1, h2 { letter-spacing: -0.022em; line-height: 1.08; }
h3, h4 { letter-spacing: -0.01em; line-height: 1.3; }
:root:lang(ja) :is(h1, h2, h3, h4),
:root:lang(zh) :is(h1, h2, h3, h4),
:root:lang(ru) :is(h1, h2, h3, h4) { letter-spacing: 0; }
:root:lang(ja) { line-break: strict; }
:root:lang(ja) :is(h1, h2, h3, h4) { word-break: auto-phrase; }

p { text-wrap: pretty; }
strong, b { font-weight: 700; color: var(--text-strong); }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

code, kbd, .mono { font-family: var(--font-mono); font-size: 0.875em; }
code {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
  color: var(--text-strong);
}

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

::selection { background: var(--accent-soft); color: var(--text-strong); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
}
.skip:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- 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(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-elevated); border-color: var(--border-strong); color: var(--text-strong); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-quiet { background: transparent; color: var(--text-strong); }
.btn-quiet:hover { background: var(--bg-hover); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.6; cursor: default; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
  transition: background-color var(--fast) var(--ease);
}
.icon-btn:hover { background: var(--bg-hover); }
.icon-btn svg { width: 18px; height: 18px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-mute);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- Select (language) ---------- */
.select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select select {
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-strong);
  font-size: 0.875rem;
  cursor: pointer;
}
.select select:hover { background: var(--bg-hover); }
.select::after {
  content: '';
  position: absolute;
  right: 12px; top: 50%;
  width: 6px; height: 6px;
  margin-top: -5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
  color: var(--text-mute);
}
.select option { background: var(--bg-elevated); color: var(--text-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 16px;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}
.brand svg { width: 22px; height: 28px; flex: none; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { background: var(--bg-hover); color: var(--text-strong); }
.nav a[aria-current='page'] { color: var(--text-strong); font-weight: 700; }

.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-extra { display: none; }

.theme-toggle .i-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .i-moon { display: none; }
}

.menu-btn { display: none; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded='true'] .i-close { display: block; }
.menu-btn[aria-expanded='true'] .i-menu { display: none; }

@media (max-width: 1199px) {
  .menu-btn { display: inline-grid; }
  .header-tools .select,
  .header-tools .btn { display: none; }
  .nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 32px;
    background: var(--bg);
    overflow-y: auto;
    border-top: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 1.0625rem;
  }
  .nav a:hover { background: transparent; }
  .nav-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
  }
  .nav-extra .btn { flex: 1 1 auto; }
}
@media (max-width: 1199px) and (min-width: 600px) {
  .header-tools .btn { display: inline-flex; }
}

/* ---------- Sections ---------- */
.sec {
  padding-block: 72px;
  border-top: 1px solid var(--border);
}
.sec-alt { background: var(--bg-alt); }
@media (min-width: 960px) {
  .sec { padding-block: 104px; }
}

.h-display { font-size: clamp(2.25rem, 1.35rem + 3.3vw, 3.75rem); }
.h-section { font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.625rem); }
.h-sub { font-size: 1.25rem; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--text);
  max-width: 38em;
}
@media (min-width: 960px) { .lede { font-size: 1.25rem; } }

.sec-head { max-width: 760px; }
.sec-head .lede { margin-top: 20px; }

.split {
  display: grid;
  gap: 48px;
}
/* Grid items default to min-width: auto, so one long unbreakable line (a
   path in the file tree, an email in the member list) would widen the whole
   column past the screen. */
.split > *, .hero-grid > *, .free-grid > *, .contact-grid > *,
.feat-groups > *, .two-up > *, .foot-grid > *, .docs > * { min-width: 0; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: start; }
  .split-rev > :first-child { order: 2; }
  .split-narrow { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
  .sticky-col { position: sticky; top: calc(var(--header-h) + 40px); }
}

.fine { color: var(--text-mute); font-size: 0.9375rem; line-height: 1.55; }
.fine a { color: inherit; }

/* Plain list with hairlines: the house style for facts. */
.facts { list-style: none; border-top: 1px solid var(--border); }
.facts li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.facts li b { display: block; margin-bottom: 2px; }
.facts li span { color: var(--text-mute); }

/* ---------- Hero ---------- */
.hero { padding-top: 56px; overflow-x: clip; }
@media (min-width: 960px) { .hero { padding-top: 88px; } }

.hero-grid {
  display: grid;
  gap: 40px;
}
.hero-text .lede { margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 16px; color: var(--text-mute); font-size: 0.9375rem; }

.spec { border-top: 1px solid var(--border-strong); }
.spec div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.spec dt { color: var(--text-mute); }
.spec dd { color: var(--text-strong); }

.shot-wrap { position: relative; margin-top: 8px; padding-bottom: 16px; }
.shot-wrap::before {
  content: '';
  position: absolute;
  left: -50vw; right: -50vw;
  top: 38%; bottom: 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  z-index: -1;
}
.hero { position: relative; z-index: 0; }
.shot-cap { margin-top: 16px; color: var(--text-mute); font-size: 0.875rem; }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 56px; }
  .hero-text { grid-column: 1 / span 7; }
  .hero-spec { grid-column: 8 / span 5; align-self: end; }
  .shot-wrap { grid-column: 1 / -1; margin-top: 0; padding-bottom: 24px; }
}
@media (min-width: 1200px) {
  .hero-spec { grid-column: 9 / span 4; }
}
@media (max-width: 959px) {
  .hero-spec { order: 3; }
  .shot-wrap { order: 2; }
  .shot-wrap { padding-bottom: 8px; }
  .shot-wrap::before { top: 30%; }
}

/* =====================================================================
   The app, drawn in HTML. It mirrors the redesigned app (refonte/v1:
   src/styles/layout.css, tree.css, editor.css, ai.css and the Sharing
   dialog), with the same sizes and the same tokens, so the site and the
   app look like each other. --bg-alt here is the app's --bg-sidebar.
   ===================================================================== */
.am {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 300px;
  height: 700px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  user-select: none;
}
.am svg, .am-ai svg, .am-dlg svg { width: 16px; height: 16px; flex: none; }
.am-ib {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  color: var(--text-mute);
}

/* Sidebar */
.am-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
}
.am-head { display: flex; align-items: center; gap: 4px; padding: 10px 10px 6px; }
.am-vault {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.am-vault > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am .am-vault .mk { width: 17px; height: 22px; }
.am .am-vault .caret { width: 12px; height: 12px; color: var(--text-faint); }
.am-new { width: 32px; height: 32px; }
.am-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  margin: 4px 10px 8px;
  padding: 0 7px 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-faint);
}
.am .am-search svg { width: 14px; height: 14px; }
.am-search > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.am-kbd {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}
.am-nav { display: flex; flex-direction: column; gap: 1px; padding: 0 6px 8px; }
.am-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.am-item svg { color: var(--text-mute); }
.am-sec {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  margin-top: 2px;
  padding: 8px 8px 0 16px;
  border-top: 1px solid var(--border);
}
.am-sec b { flex: 1; color: var(--text-mute); font-size: 12px; font-weight: 700; letter-spacing: 0.01em; }
.am-tools { display: flex; gap: 10px; padding-right: 6px; opacity: 0.55; color: var(--text-mute); }
.am .am-tools svg { width: 14px; height: 14px; }
.am-tree { flex: 1; min-height: 0; overflow: hidden; padding: 2px 6px 10px; }
.am-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  margin: 1px 0;
  padding: 0 8px 0 4px;
  border-radius: var(--radius);
  white-space: nowrap;
  overflow: hidden;
}
.am-row > span:not(.am-badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.am .am-row .cv { width: 12px; height: 12px; color: var(--text-faint); }
.am-row .ic { color: var(--text-faint); }
.am-dir .ic { color: var(--text-mute); }
.am-dir span { font-weight: 500; }
.am-in { padding-left: 22px; }
.am-row.on { background: var(--bg-active); color: var(--text-strong); font-weight: 600; }
.am-row.on::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: var(--accent); }
.am-row.on .ic { color: var(--accent-ink); }
.am-tags { margin-top: 8px; border-top: 1px solid var(--border); border-radius: 0; padding-top: 2px; height: 34px; }
.am-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border-radius: var(--radius-sm);
  background: var(--bg-active);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.am-foot { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-top: 1px solid var(--border); }
.am-account { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 2px 0 6px; }
.am-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}
.am-email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-mute); font-size: 12px; }
.am-account .am-ib { width: 26px; height: 26px; }
.am .am-account svg { width: 15px; height: 15px; }

/* Editor */
.am-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.am-mbar { display: none; }
.am-tabs { display: flex; flex: none; height: 38px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.am-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-right: 1px solid var(--border);
  color: var(--text-mute);
  white-space: nowrap;
}
.am-tab.on { padding-right: 6px; background: var(--bg); color: var(--text-strong); }
.am-tab.on::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); }
.am-tab.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--bg); }
.am-tab .x { display: inline-grid; place-items: center; width: 20px; height: 20px; color: var(--text-faint); font-size: 15px; line-height: 1; }
.am-pres {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 32px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 12px;
}
.am-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.am-dot.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-faint); }
.am-bar { display: flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 6px 12px 6px 20px; }
.am-crumbs { display: flex; flex: 1; min-width: 0; overflow: hidden; color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.am-crumbs span + span::before { content: '/'; margin: 0 6px; color: var(--border-strong); }
.am-crumbs span:last-child { color: var(--text-mute); }
.am-acts { display: flex; gap: 2px; }
.am-acts i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius); color: var(--text-mute); }
.am-acts i.on { background: var(--bg-active); color: var(--text-strong); }
.am-note {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  max-width: calc(46rem + 64px);
  margin: 0 auto;
  padding: 0 32px 24px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.72;
}
.am-note p { margin: 0.6em 0; }
.am-note .am-t0 { margin: 0 0 0.2em; color: var(--text-faint); font-size: 12px; font-weight: 600; line-height: 1.5; }
.am-note .am-h1, .am-note .am-h2 { color: var(--text-strong); font-family: var(--font-display); font-weight: 700; line-height: 1.25; }
.am-note .am-h1 { margin: 0.5em 0 0.3em; font-size: 1.75em; letter-spacing: -0.02em; }
.am-note .am-h2 { margin: 1.15em 0 0.35em; font-size: 1.4em; letter-spacing: -0.01em; }
.am .wl, .am-ai .wl {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-ink);
  text-decoration-color: color-mix(in srgb, var(--accent-ink) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.am .tag { padding: 0 4px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); font-size: 0.9em; font-weight: 600; }
.am-tasks { list-style: none; margin: 0.4em 0; padding: 0; }
.am-tasks li { display: flex; align-items: center; gap: 8px; margin: 0.2em 0; }
.am-cb { position: relative; flex: none; width: 15px; height: 15px; border: 1.5px solid var(--border-strong); border-radius: 3px; background: var(--bg); }
.am-cb.x { background: var(--accent); border-color: var(--accent); }
.am-cb.x::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.am-callout { margin: 1em 0; padding: 12px 16px; border: 1px solid var(--border); border-left: 3px solid var(--ok); border-radius: var(--radius); background: var(--ok-soft); }
.am-callout b { display: block; margin-bottom: 4px; color: var(--text-strong); font-size: 0.92em; }
.am-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  height: 28px;
  padding: 0 16px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
  white-space: nowrap;
}
.am-status .wc { margin-left: 12px; overflow: hidden; text-overflow: ellipsis; }
.am-sync { display: inline-flex; align-items: center; gap: 6px; color: var(--text-mute); font-weight: 500; }
.am-sync::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* Right panel */
.am-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-alt); border-left: 1px solid var(--border); }
.am-rtabs { display: flex; flex: none; height: 38px; padding: 0 6px; border-bottom: 1px solid var(--border); }
.am-rtabs > span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
  padding: 0 6px;
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.am-rtabs > .on { color: var(--text-strong); }
.am-rtabs > .on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.am-outline { list-style: none; margin: 0; padding: 4px 6px 8px; }
.am-outline li { height: 28px; padding: 0 8px; overflow: hidden; border-radius: var(--radius); color: var(--text); font-weight: 500; line-height: 28px; text-overflow: ellipsis; white-space: nowrap; }
.am-outline .o1 { font-weight: 600; }
.am-outline .o2 { padding-left: 22px; }

@media (max-width: 1139px) {
  .am { grid-template-columns: 240px minmax(0, 1fr); }
  .am-right { display: none; }
}
/* A phone: the app's mobile layout, a bar with the note's name instead of
   the sidebar and the tabs. */
@media (max-width: 719px) {
  .am { grid-template-columns: minmax(0, 1fr); height: auto; }
  .am-side, .am-tabs, .am-crumbs, .am-split { display: none; }
  .am-mbar { display: flex; align-items: center; gap: 4px; flex: none; height: 48px; padding: 0 6px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
  .am-mb { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--text); }
  .am .am-mb svg { width: 21px; height: 21px; }
  .am-mtitle { flex: 1; min-width: 0; overflow: hidden; color: var(--text-strong); font-family: var(--font-display); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .am-bar { padding: 4px 6px; }
  .am-acts { margin-left: auto; }
  .am-note { padding: 0 16px 16px; font-size: 15px; }
  .am-pres { padding: 6px 12px; }
}

/* The assistant, as the right panel's Assistant tab (ai.css). */
.am-ai {
  display: flex;
  flex-direction: column;
  max-width: 380px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  user-select: none;
}
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 6px 12px; }
.ai-prov {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 600;
}
.ai-prov .am-dot { width: 7px; height: 7px; }
.am-ai .ai-prov svg { width: 12px; height: 12px; color: var(--text-faint); }
.ai-scope { display: flex; gap: 2px; margin: 0 12px 8px; padding: 2px; border-radius: var(--radius); background: var(--bg-hover); }
.ai-scope span {
  display: inline-grid;
  place-items: center;
  flex: 1;
  height: 26px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.ai-scope .on { background: var(--bg-elevated); color: var(--text-strong); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 0 0 1px var(--border); }
.ai-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.ai-acts span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.ai-thread { display: flex; flex-direction: column; gap: 10px; padding: 8px 12px 12px; border-top: 1px solid var(--border); }
.ai-user { align-self: flex-end; max-width: 90%; padding: 7px 11px; border-radius: 10px 10px 4px 10px; background: var(--bg-active); color: var(--text-strong); }
.ai-ans { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); line-height: 1.6; }
.ai-src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 12px; }
.ai-aacts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 10px; }
.ai-aacts .b2, .ai-aacts .bg { display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--radius); font-size: 12px; white-space: nowrap; }
.ai-aacts .b2 { background: var(--bg-elevated); border-color: var(--border-strong); color: var(--text-strong); font-weight: 600; }
.ai-aacts .bg { color: var(--text-mute); font-weight: 500; }
.ai-model { margin-left: auto; color: var(--text-faint); font-size: 11px; }
.ai-in { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--border); }
.ai-in .ta { flex: 1; min-height: 38px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--text-faint); }
.ai-in .send { display: inline-flex; align-items: center; height: 38px; padding: 0 12px; border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 600; opacity: 0.45; }

/* Team Working, as the app's Sharing dialog. */
.am-dlg {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  user-select: none;
}
.dlg-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.dlg-title { margin-right: 4px; color: var(--text-strong); font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.sx { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius); color: var(--text-mute); white-space: nowrap; }
.sx.on { background: var(--bg); border-color: var(--border-strong); color: var(--text-strong); }
.dlg-sum { flex: 1; min-width: 0; overflow: hidden; color: var(--text-mute); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.dlg-head .am-ib { font-size: 18px; line-height: 1; }
.dlg-body { padding: 8px; }
.sp { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.sp-head { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 28px; }
.sp-head svg { color: var(--text-mute); }
.sp-name { color: var(--text-strong); font-weight: 600; }
.role-b { flex: none; padding: 1px 7px; border-radius: var(--radius-sm); background: var(--bg-hover); color: var(--text-mute); font-size: 11px; line-height: 18px; }
.sp-path { flex: 1; min-width: 0; overflow: hidden; color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bm {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.bm.danger { background: transparent; color: var(--danger); }
.inv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0 24px; }
.inv-role { display: inline-flex; align-items: center; gap: 6px; color: var(--text-mute); font-size: 12px; }
.sel { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 26px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--text); font-size: 12px; }
.am-dlg .sel svg { width: 12px; height: 12px; color: var(--text-faint); }
.em { display: flex; gap: 6px; margin: 8px 0 4px 24px; }
.em-in { display: flex; align-items: center; flex: 1; min-width: 0; height: 28px; padding: 0 10px; border: 1px solid var(--accent-ink); border-radius: var(--radius); background: var(--bg); color: var(--text-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
.mem { list-style: none; margin: 6px 0 0; padding: 0; }
.mem li { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 2px 0 2px 24px; }
.mem li + li { border-top: 1px solid var(--border); }
.mem .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem .rt { flex: none; color: var(--text-mute); font-size: 12px; }
.mem .since { flex: none; color: var(--text-faint); font-size: 11px; white-space: nowrap; }
@media (max-width: 560px) {
  .dlg-sum, .mem .since, .sp-path { display: none; }
  .inv, .em, .mem li { margin-left: 0; padding-left: 0; }
}

/* File tree and a note's source */
.files-mock { display: grid; gap: 16px; }
.source {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  overflow: hidden;
}
.source-bar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-mute);
  font-size: 13px;
}
.source pre {
  margin: 0;
  padding: 16px 22px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
}
.source .t-dim { color: var(--text-mute); }
.source .t-acc { color: var(--accent-ink); }
.tree {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}
.tree .t-dir { color: var(--text-strong); }
.tree .t-dim { color: var(--text-mute); }
.tree .t-acc { color: var(--accent-ink); }

/* ---------- Features index ---------- */
.feat-groups {
  display: grid;
  gap: 48px 64px;
  margin-top: 56px;
}
@media (min-width: 860px) { .feat-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feat-group h3 { font-size: 1.25rem; padding-bottom: 12px; border-bottom: 1px solid var(--border-strong); }
.feat-group dl > div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.feat-group dt { font-weight: 700; color: var(--text-strong); }
.feat-group dt .badge { margin-left: 8px; vertical-align: 2px; }
.feat-group dd { margin-top: 2px; color: var(--text-mute); }

/* ---------- Security table ---------- */
.ledger {
  width: 100%;
  margin-top: 48px;
  border-collapse: collapse;
  font-size: 1rem;
}
.ledger th, .ledger td {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.ledger thead th {
  padding-top: 0;
  border-bottom-color: var(--border-strong);
  color: var(--text-mute);
  font-size: 0.9375rem;
  font-weight: 600;
}
.ledger tbody th { width: 30%; color: var(--text-strong); font-weight: 700; }
.ledger td:nth-child(2) { width: 28%; }
.ledger td:last-child { color: var(--text-mute); padding-right: 0; }
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-strong); }
.state::before { content: ''; width: 8px; height: 8px; border-radius: 2px; flex: none; }
.state-enc::before { background: var(--ok); }
.state-clear::before { background: var(--warn); }
.state-never::before { background: var(--text-strong); border-radius: 50%; }
.state-hash::before { background: var(--info); }
@media (max-width: 759px) {
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; width: auto !important; }
  .ledger tr { padding: 16px 0; border-bottom: 1px solid var(--border); }
  .ledger th, .ledger td { padding: 0; border: 0; }
  .ledger td { margin-top: 6px; }
}

.callout {
  display: grid;
  gap: 8px;
  margin-top: 40px;
  padding: 20px 24px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--bg-elevated);
}
.callout h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.125rem; }
.callout p { color: var(--text); }

.two-up { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 860px) { .two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
.two-up h3 { font-size: 1.125rem; margin-bottom: 6px; }
.two-up p { color: var(--text-mute); }

/* ---------- Free ---------- */
.free-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .free-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; } }
.free-points { list-style: none; display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--border); }
.free-points li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.free-points svg { width: 20px; height: 20px; color: var(--ok); flex: none; margin-top: 3px; }
.maker {
  align-self: start;
  padding: 28px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}
.maker h3 { font-size: 1.25rem; }
.maker p { margin-top: 12px; color: var(--text); }
.maker .btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.maker .fine { margin-top: 16px; }

/* ---------- Compare ---------- */
.table-scroll { margin-top: 40px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9375rem; }
.cmp th, .cmp td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cmp thead th { border-bottom-color: var(--border-strong); font-family: var(--font-display); font-size: 1rem; color: var(--text-strong); }
.cmp tbody th { font-weight: 600; color: var(--text-strong); width: 28%; }
.cmp td { color: var(--text-mute); }
.cmp .us { color: var(--text-strong); font-weight: 600; }
.cmp thead .us { color: var(--accent-ink); }

/* ---------- Download ---------- */
.dl { list-style: none; margin-top: 40px; border-top: 1px solid var(--border-strong); }
.dl li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.dl h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.25rem; }
.dl p { color: var(--text-mute); }
.dl .btn { justify-self: start; }
@media (min-width: 760px) {
  .dl li { grid-template-columns: 15rem minmax(0, 1fr) auto; align-items: center; gap: 24px; }
  .dl .btn { justify-self: end; min-width: 172px; }
}
.dl li.mine { background: transparent; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border-strong); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  position: relative;
  display: block;
  padding: 20px 40px 20px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  position: absolute;
  right: 8px; top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 1.5px solid var(--text-mute);
  border-bottom: 1.5px solid var(--text-mute);
  transform: rotate(45deg);
  transition: transform var(--med) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 40px 22px 0; color: var(--text); max-width: 46em; }

/* ---------- Closing ---------- */
.closing { padding-block: 88px; border-top: 1px solid var(--border); }
@media (min-width: 960px) { .closing { padding-block: 120px; } }
.closing .wrap { display: grid; gap: 32px; }
@media (min-width: 960px) { .closing .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; } }
.closing p { margin-top: 16px; }
.closing .hero-actions { margin-top: 0; }
@media (min-width: 960px) { .closing .hero-actions { justify-content: flex-end; } }

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 0.9375rem;
}
.foot-grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)) minmax(0, 4fr); gap: 32px; } }
.foot-grid h2 { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0; color: var(--text-strong); margin-bottom: 12px; }
.foot-grid ul { list-style: none; display: grid; gap: 8px; }
.foot-grid a { color: var(--text); text-decoration: none; }
.foot-grid a:hover { color: var(--text-strong); text-decoration: underline; }
.foot-tag { margin-top: 12px; color: var(--text-mute); max-width: 22em; }
.news p { color: var(--text-mute); margin-bottom: 12px; }
.news-row { display: flex; gap: 8px; }
.input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-strong);
}
.input::placeholder { color: var(--text-mute); opacity: 0.85; }
.input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 0; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
}
.foot-base .select select { height: 32px; }

.status { min-height: 1.5em; margin-top: 8px; font-size: 0.9375rem; }
.status.ok { color: var(--ok); }
.status.err { color: var(--accent-ink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Inner pages ---------- */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--border); }
@media (min-width: 960px) { .page-head { padding: 80px 0 56px; } }
.page-head .lede { margin-top: 16px; }

.contact-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; } }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 0.9375rem; font-weight: 700; color: var(--text-strong); }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form .btn { justify-self: start; }
.form .input { font-weight: 400; font-size: 1rem; }
.sec-tight { padding-top: 48px; }
@media (min-width: 960px) { .sec-tight { padding-top: 64px; } }
.aside-list { list-style: none; border-top: 1px solid var(--border-strong); }
.aside-list li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.aside-list h2 { font-size: 1.0625rem; margin-bottom: 4px; }
.aside-list p { color: var(--text-mute); }

/* Docs */
.docs { display: grid; gap: 40px; padding-block: 48px 96px; }
@media (min-width: 1024px) { .docs { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-top: 56px; } }
.toc { align-self: start; }
@media (min-width: 1024px) { .toc { position: sticky; top: calc(var(--header-h) + 32px); } }
.toc h2 { font-family: var(--font-body); font-size: 0.9375rem; letter-spacing: 0; margin-bottom: 8px; }
.toc ol { list-style: none; border-left: 1px solid var(--border); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 12px;
  border-left: 2px solid transparent;
  color: var(--text-mute);
  font-size: 0.9375rem;
  text-decoration: none;
}
.toc a:hover { color: var(--text-strong); }
.toc a.active { color: var(--text-strong); border-left-color: var(--accent); font-weight: 700; }
@media (max-width: 1023px) {
  .toc { padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-alt); }
  .toc ol { columns: 2; column-gap: 24px; border-left: 0; }
  .toc a { padding: 4px 0; border-left: 0; margin-left: 0; }
}
.doc { max-width: 760px; min-width: 0; }
.doc section { padding: 40px 0; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 16px); }
.doc section:first-child { padding-top: 0; border-top: 0; }
.doc h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: 16px; }
.doc h3 { font-size: 1.125rem; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol.steps { margin: 12px 0; padding-left: 22px; display: grid; gap: 8px; }
.doc ol.steps li::marker { font-family: var(--font-display); font-weight: 700; color: var(--accent-ink); }
.note {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.note p { color: var(--text); }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-strong);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.keys { width: 100%; border-collapse: collapse; margin-top: 8px; }
.keys td { padding: 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.keys td:first-child { width: 42%; padding-right: 16px; }
.keys td:last-child { color: var(--text); }
kbd.mod::before { content: 'Ctrl'; }
kbd.alt::before { content: 'Alt'; }
html[data-os='mac'] kbd.mod::before { content: 'Cmd'; }
html[data-os='mac'] kbd.alt::before { content: 'Option'; }
.seg {
  display: inline-flex;
  gap: 2px;
  margin: 8px 0 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.seg button {
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-mute);
  font-size: 0.9375rem;
  cursor: pointer;
}
.seg button[aria-pressed='true'] { background: var(--bg-elevated); color: var(--text-strong); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

/* Legal */
.legal { padding-block: 56px 96px; }
.legal > * { max-width: 760px; }
.legal h2 { font-size: 1.5rem; margin: 48px 0 12px; }
.legal h3 { font-size: 1.125rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; display: grid; gap: 8px; margin: 8px 0; }
.legal .fine { margin-top: 12px; }
.lang-note { margin-top: 16px; }
html[lang='fr'] .lang-note { display: none; }

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

/* The desktop app's easter egg, kept here too. */
html[data-rgb] body { filter: invert(1) hue-rotate(180deg); }

@media print {
  .site-header, .site-footer, .shot-wrap, .closing { display: none; }
  .sec { border: 0; padding-block: 24px; }
}

/* ---------- Small spacing utilities (4 px grid) ---------- */
.mt-20 { margin-top: 20px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.no-rule { border-top: 0; }

/* Mock-up placement. */
@media (min-width: 960px) { .split-rev .am-ai { margin-left: auto; } }
@media (max-width: 719px) { .shot-cap { display: none; } }
