/* Recluse download site. Same identity as the app: night-blue base, one warm
   lantern accent, a serif for the name and headlines, system fonts only. */

:root {
  color-scheme: dark;
  --bg: #121a2b;
  --bg-deep: #0c1322;
  --bg-2: #162036;
  --surface: #1b253c;
  --surface-2: #232f4b;
  --surface-3: #2b3859;
  --line: #2c3857;
  --line-soft: #222d47;
  --text: #ebeef5;
  --text-2: #a7b0c5;
  --text-3: #8690a8;
  --accent: #f2b65a;
  --accent-hover: #f7c87d;
  --accent-text: #f4be6c;
  --on-accent: #241706;
  --accent-soft: rgba(242, 182, 90, 0.1);
  --code-bg: #0f1727;
  --focus: #f2b65a;
  --glow: rgba(242, 182, 90, 0.3);
  --glow-2: rgba(242, 182, 90, 0.1);
  --glow-blend: screen;
  --card-light: rgba(242, 182, 90, 0.12);
  --shadow-card: 0 34px 70px -34px rgba(0, 0, 0, 0.7);
  --shadow-shot: 0 50px 90px -40px rgba(0, 0, 0, 0.75);
  --bezel: #070b14;
  /* Edges of form fields: at least 3:1 against --surface, --bg, --bg-2 and --bg-deep. */
  --field-line: #66728f;
  --field-line-hover: #7d89a5;
  /* Errors: --danger is text (4.5:1 or more on --bg, --surface and --surface-2/-3),
     --danger-line is borders, the tints are backgrounds. */
  --danger: #f08a78;
  --danger-line: #e0705f;
  --danger-soft: rgba(224, 112, 95, 0.1);
  --danger-tint: rgba(224, 112, 95, 0.16);
  --info-text: #9db9f2;
  --info-tint: rgba(120, 160, 240, 0.16);
  --success-tint: rgba(110, 190, 140, 0.18);
  /* Dark layer over photos (remove button) and behind the photo viewer. */
  --scrim: rgba(7, 11, 20, 0.72);
  --on-scrim: #ffffff;
  --backdrop: rgba(5, 8, 15, 0.8);

  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, "Liberation Mono", "DejaVu Sans Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #eef1f7;
    --bg-deep: #e2e7f1;
    --bg-2: #f7f8fc;
    --surface: #ffffff;
    --surface-2: #e7ebf4;
    --surface-3: #dbe1ee;
    --line: #d5dbe8;
    --line-soft: #dde2ed;
    --text: #131a2c;
    --text-2: #4c5770;
    --text-3: #5f6a84;
    --accent: #eea53f;
    --accent-hover: #f3b65f;
    --accent-text: #8a5206;
    --on-accent: #241706;
    --accent-soft: rgba(214, 140, 30, 0.13);
    --code-bg: #f3f5fa;
    --focus: #b36b05;
    --glow: rgba(238, 165, 63, 0.26);
    --glow-2: rgba(238, 165, 63, 0.08);
    --glow-blend: multiply;
    --card-light: rgba(238, 165, 63, 0.1);
    --shadow-card: 0 30px 60px -36px rgba(20, 30, 60, 0.35);
    --shadow-shot: 0 50px 90px -40px rgba(0, 0, 0, 0.75);
    --bezel: #1b253c;
    --field-line: #7b849c;
    --field-line-hover: #677189;
    --danger: #b3331f;
    --danger-line: #c0412b;
    --danger-soft: rgba(224, 112, 95, 0.1);
    --danger-tint: rgba(224, 112, 95, 0.16);
    --info-text: #2e5aa8;
    --info-tint: rgba(120, 160, 240, 0.16);
    --success-tint: rgba(110, 190, 140, 0.18);
    --scrim: rgba(7, 11, 20, 0.72);
    --on-scrim: #ffffff;
    --backdrop: rgba(5, 8, 15, 0.8);
  }
}

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

/* "hidden" always wins over a component's own display (buttons are inline-flex). */
[hidden] {
  display: none !important;
}

/* overflow-x: clip (not hidden) stops sideways scrolling without making a
   scroll container, so position: sticky keeps working. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  margin: 0;
  min-height: 100vh;
  background: var(--bg) linear-gradient(180deg, var(--bg-deep) 0, var(--bg) 720px) no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.82em;
  white-space: nowrap;
}

b {
  font-weight: 650;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------------------------ */
/* Lantern mark (same drawing as the app) */

.logo .logo-frame {
  stroke: var(--text);
}

.logo .logo-fill {
  fill: var(--surface);
}

.logo .logo-flame {
  fill: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Header and footer */

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: -4px;
  padding: 4px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand .logo {
  width: 34px;
  height: 34px;
}

.brand .logo-fill {
  fill: var(--bg-deep);
}

.nav {
  display: flex;
  gap: 2px;
  margin-right: -10px;
}

.nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 10px 10px 0 0;
}

.nav-wide {
  display: none;
}

@media (min-width: 560px) {
  .nav-wide {
    display: inline;
  }
}

.site-footer {
  margin-top: 24px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-size: 14px;
}

.footer-row {
  display: grid;
  gap: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
}

.footer-brand .logo {
  width: 26px;
  height: 26px;
}

.footer-brand .logo-fill {
  fill: var(--bg);
}

.footer-note {
  max-width: 56ch;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-nav a {
  color: var(--text-2);
}

@media (min-width: 860px) {
  .footer-row {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
  }
}

/* ------------------------------------------------------------------ */
/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 620;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

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

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

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-3);
}

.btn-lg {
  min-height: 58px;
  font-size: 17px;
  border-radius: 14px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-small {
  min-height: 36px;
  padding: 0 12px;
  gap: 6px;
  border-radius: 10px;
  font-size: 14px;
}

.btn-small .icon {
  width: 17px;
  height: 17px;
}

/* Full-size touch targets on phones. */
@media (max-width: 599.98px) {
  .btn-small {
    min-height: 44px;
  }
}

.btn-text {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 12px;
}

.btn-text > span {
  white-space: nowrap;
}

.btn-meta {
  font-weight: 500;
  opacity: 0.74;
}

.btn:has(.btn-text) {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Placeholder entries: shown, but not clickable. */
.btn.is-pending {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn.is-pending:active {
  transform: none;
}

.btn-primary.is-pending:hover {
  background: var(--accent);
}

.btn-secondary.is-pending:hover {
  background: var(--surface-2);
}

/* ------------------------------------------------------------------ */
/* Preview banner (only while release.json has placeholders) */

.preview {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 8px;
  padding: 12px 16px;
  border: 1px dashed color-mix(in srgb, var(--accent) 60%, var(--line));
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 14px;
}

.preview .icon {
  margin-top: 1px;
  color: var(--accent-text);
}

.preview strong {
  color: var(--text);
}

/* ------------------------------------------------------------------ */
/* Hero */

.hero {
  display: grid;
  gap: 48px;
  padding-top: 36px;
  padding-bottom: 72px;
}

.hero h1 {
  max-width: 16ch;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 1.5rem + 4vw, 3.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.022em;
}

.lede {
  max-width: 36rem;
  margin-top: 20px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.55;
}

.rec-slot {
  margin-top: 64px;
  max-width: 500px;
}

/* Which card shows is decided by detect.js through <html data-platform>. */
.rec {
  display: none;
}

html:not([data-platform]) .rec[data-card="choose"],
html[data-platform="unknown"] .rec[data-card="choose"],
html[data-platform="windows"] .rec[data-card="windows"],
html[data-platform="android"] .rec[data-card="android"],
html[data-platform="iphone"] .rec[data-card="unavailable"],
html[data-platform="ipad"] .rec[data-card="unavailable"],
html[data-platform="mac"] .rec[data-card="unavailable"],
html[data-platform="linux"] .rec[data-card="unavailable"],
html[data-platform="chromeos"] .rec[data-card="unavailable"] {
  display: block;
}

.dev {
  display: none;
}

html[data-platform="iphone"] .dev[data-dev="iphone"],
html[data-platform="ipad"] .dev[data-dev="ipad"],
html[data-platform="mac"] .dev[data-dev="mac"],
html[data-platform="linux"] .dev[data-dev="linux"],
html[data-platform="chromeos"] .dev[data-dev="chromeos"] {
  display: inline;
}

/* The card the lantern hangs over: its light falls on the top-left corner. */
.rec {
  position: relative;
  padding: 44px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(110% 80% at 0% 0%, var(--card-light), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.rec-lantern {
  position: absolute;
  top: -34px;
  left: 16px;
  width: 64px;
  height: 64px;
  z-index: 0;
}

.rec-lantern::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 56%;
  width: 380px;
  height: 380px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--glow), var(--glow-2) 32%, transparent 100%);
  mix-blend-mode: var(--glow-blend);
  pointer-events: none;
}

.rec-lantern .logo {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
}

.rec-for {
  position: relative;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 650;
}

.rec-title {
  position: relative;
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
}

.rec-req {
  position: relative;
  margin: 8px 0 22px;
  color: var(--text-2);
  font-size: 15px;
}

.rec .btn + .btn {
  margin-top: 10px;
}

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.note .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--accent-text);
}

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

.rec-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 14px;
}

.steps-title {
  margin: 24px 0 0;
  font-size: 15px;
  font-weight: 650;
}

/* Numbered steps: used only where the order matters. */
.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 15px;
}

.steps > li {
  counter-increment: step;
  position: relative;
  min-height: 26px;
  padding-left: 38px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

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

.steps-after {
  margin-top: 12px;
  color: var(--text-3);
  font-size: 14px;
}

.hero-shot {
  display: none;
  margin: 0;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 80px;
    align-items: center;
    padding-top: 56px;
    padding-bottom: 96px;
  }

  .hero-shot {
    display: block;
    justify-self: end;
  }

  .hero-shot img {
    display: block;
    width: 300px;
    height: auto;
    border: 9px solid var(--bezel);
    border-radius: 40px;
    box-shadow: 0 0 0 1px var(--line), var(--shadow-shot);
  }
}

/* ------------------------------------------------------------------ */
/* Sections */

.section {
  padding: 64px 0;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
}

.section-lede {
  max-width: 40rem;
  margin-top: 10px;
  color: var(--text-2);
}

/* All downloads */

.dl-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.dl {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.dl-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.dl-icon .icon {
  width: 22px;
  height: 22px;
}

/* h2 on /guide, h3 under the home page's section title. */
.dl h2,
.dl h3 {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
}

.dl-main > p {
  max-width: 54ch;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 15px;
}

.dl-main > .dl-file {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 14px;
}

.dl-file code {
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.dl-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 18px;
}

.dl-check {
  font-size: 14px;
}

.dl-none .dl-main > p {
  color: var(--text-3);
}

.howto {
  margin-top: 12px;
}

.howto summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.howto[open] summary {
  margin-bottom: 4px;
}

@media (min-width: 760px) {
  .dl {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 20px;
  }

  .dl-actions {
    grid-column: 3;
    grid-row: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    text-align: center;
    min-width: 150px;
  }

  .dl-check {
    padding: 4px;
  }
}

/* Protection and limits */

.protect-grid {
  display: grid;
  gap: 48px;
}

.points {
  display: grid;
  gap: 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.points > li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
}

.pt-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.pt-icon .icon {
  width: 22px;
  height: 22px;
}

.points h3 {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
}

.points p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 15.5px;
}

.limits {
  padding: 28px 22px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-2);
}

.limits .pt-icon {
  background: var(--surface-2);
  color: var(--text-2);
}

@media (min-width: 920px) {
  .protect-grid {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
  }

  .protect {
    padding-top: 28px;
  }

  .limits {
    padding: 28px 32px 32px;
  }
}

/* ------------------------------------------------------------------ */
/* Verify page */

.page {
  max-width: 800px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.page-text {
  max-width: 62ch;
  margin-top: 14px;
  color: var(--text-2);
}

.page-text code {
  color: var(--text);
  white-space: nowrap;
}

.muted {
  color: var(--text-3);
}

.vsec {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 12px;
}

.vsec-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.3rem + 0.9vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
}

.file {
  margin-top: 22px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  scroll-margin-top: 16px;
}

.file:target {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.file h3 {
  font-size: 18px;
  font-weight: 650;
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 4px;
  color: var(--text-3);
  font-size: 14px;
}

.file-meta code {
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.hash-label {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.hash-label .muted {
  font-weight: 400;
}

.hash-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
}

.hash {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 2px 0.75em;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 600px) {
  .hash {
    grid-template-columns: repeat(4, max-content);
  }
}

.hash-pending {
  flex: 1;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--text-3);
  font-size: 14px;
}

.hash-row .copy {
  margin-top: 4px;
}

.copy.is-done {
  color: var(--accent-text);
}

.file-check {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 15px;
}

.file-check > p + .cmd,
.file-check > .cmd + p {
  margin-top: 10px;
}

.file.is-pending .file-check {
  display: none;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--code-bg);
}

.cmd code {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cmd .copy {
  flex: none;
}

.steps-lg {
  gap: 16px;
  margin-top: 20px;
  font-size: 16px;
}

.steps-lg > li {
  min-height: 28px;
  padding-left: 42px;
}

.steps-lg > li::before {
  width: 28px;
  height: 28px;
}

.steps .cmd {
  margin-top: 10px;
}

.plain-list {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--text-2);
}

.plain-list li + li {
  margin-top: 8px;
}

.plain-list b {
  color: var(--text);
}

.page-404 {
  min-height: 52vh;
}

.actions-404 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* ------------------------------------------------------------------ */
/* Feedback form (/feedback) and the owner's inbox (/inbox) */

.fb {
  margin-top: 28px;
}

.fb fieldset {
  padding: 0;
  border: 0;
  min-width: 0;
}

.fb-field,
.fb-group,
.fb-report {
  margin: 26px 0 0;
}

.fb-kinds {
  margin: 0;
}

.fb-grid .fb-field {
  margin-top: 0;
}

.fb-label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
}

.fb-sublabel {
  display: block;
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.fb-opt {
  margin-left: 6px;
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 500;
}

.fb-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* no zoom on focus in mobile browsers */
  line-height: 1.45;
  transition: border-color 0.15s ease; /* hover only: focus switches off the transition */
}

textarea.fb-input {
  min-height: 0;
  resize: vertical;
}

select.fb-input {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.fb-input::placeholder {
  color: var(--text-3);
  opacity: 1;
}

.fb-input:hover {
  border-color: var(--field-line-hover);
}

/* The same ring as every other control, shown at once. */
.fb-input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-color: var(--focus);
  transition: none;
}

.fb-input[aria-invalid="true"] {
  border-color: var(--danger-line);
}

.fb-mono {
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.fb-hint {
  margin-top: 7px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.5;
}

.fb-hint b {
  color: var(--text-2);
}

.fb-err {
  margin-top: 7px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 550;
}

.fb-kind-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 720px) {
  .fb-kind-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.fb-kind {
  position: relative;
  display: block;
  cursor: pointer;
}

.fb-kind input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.fb-kind-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 14px 14px 13px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.fb-kind-box .icon {
  width: 22px;
  height: 22px;
  margin-bottom: 6px;
  color: var(--text-3);
}

.fb-kind-name {
  font-weight: 650;
}

.fb-kind-hint {
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.35;
}

.fb-kind:hover .fb-kind-box {
  border-color: var(--field-line-hover);
}

.fb-kind input:checked + .fb-kind-box {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.fb-kind input:checked + .fb-kind-box .icon {
  color: var(--accent-text);
}

.fb-kind input:focus-visible + .fb-kind-box {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.fb-grid {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--bg-2);
}

@media (min-width: 640px) {
  .fb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fb-report {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--bg-2);
}

.fb-report summary {
  cursor: pointer;
  font-weight: 650;
}

.fb-report .fb-input {
  margin-top: 10px;
}

.fb-drop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1.5px dashed var(--field-line);
  border-radius: 14px;
  background: var(--bg-2);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.fb-drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.fb-drop.is-full {
  opacity: 0.6;
}

.fb-drop-text {
  color: var(--text-3);
  font-size: 14px;
}

.fb-drop input:focus-visible + label {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.fb-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.fb-previews:empty {
  display: none;
}

.fb-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.fb-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--scrim);
  color: var(--on-scrim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* A 44px touch target around the 32px button, without changing its look. */
.fb-remove::before {
  content: "";
  position: absolute;
  inset: -6px;
}

.fb-remove:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.fb-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fb-alert {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--danger-line);
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--text);
  font-size: 15px;
}

.fb-send {
  width: 100%;
  margin-top: 24px;
}

@media (min-width: 560px) {
  .fb-send {
    width: auto;
    min-width: 240px;
  }
}

/* Disabled only while sending ("Sending…"): muted fill, label still readable. */
.fb-send:disabled,
.fb-send:disabled:hover {
  background: var(--surface-3);
  color: var(--text-2);
  cursor: progress;
  transform: none;
}

.fb-done {
  margin-top: 36px;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  outline: none;
}

.fb-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.fb-ref {
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 650;
  letter-spacing: 0.04em;
  user-select: all;
}

/* Inbox */

.ib-page {
  max-width: 1120px;
}

.ib-login {
  max-width: 560px;
}

.ib-key-form .fb-field {
  margin-top: 18px;
}

.ib-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
  color: var(--text-2);
  font-size: 15px;
}

.ib-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.ib-app {
  margin-top: 24px;
}

.ib-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ib-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.ib-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.ib-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.ib-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  text-align: center;
}

.ib-count.is-new {
  background: var(--accent);
  color: var(--on-accent);
}

.ib-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ib-select {
  width: auto;
  min-width: 150px;
  min-height: 40px;
  padding-top: 7px;
  padding-bottom: 7px;
  background-position: calc(100% - 20px) 17px, calc(100% - 15px) 17px;
}

.ib-search {
  flex: 1 1 220px;
  width: auto;
  min-height: 40px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.ib-split {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 900px) {
  .ib-split.is-detail {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    align-items: start;
  }

  .ib-back {
    display: none;
  }
}

@media (max-width: 899px) {
  .ib-split.is-detail .ib-listwrap {
    display: none;
  }
}

.ib-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ib-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ib-row:hover {
  border-color: var(--surface-3);
}

.ib-row.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.ib-row.is-new .ib-row-title {
  font-weight: 750;
}

.ib-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 12.5px;
}

.ib-row-title {
  font-size: 15.5px;
  font-weight: 620;
  line-height: 1.35;
}

.ib-row-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}

.ib-row-meta {
  color: var(--text-3);
  font-size: 13px;
}

.ib-when {
  margin-left: auto;
  color: var(--text-3);
}

.ib-kind,
.ib-status {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 650;
}

.ib-kind-problem {
  background: var(--danger-tint);
  color: var(--danger);
}

.ib-kind-idea {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.ib-kind-question {
  background: var(--info-tint);
  color: var(--info-text);
}

.ib-status-new {
  background: var(--accent);
  color: var(--on-accent);
}

.ib-status-fixed {
  background: var(--success-tint);
  color: var(--text);
}

.ib-detail {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  scroll-margin-top: 12px;
}

.ib-back {
  margin-bottom: 14px;
}

.ib-ref {
  font-family: var(--font-mono);
  font-weight: 650;
  user-select: all;
}

.ib-title {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ib-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-2);
  font-size: 14.5px;
}

.ib-facts dt {
  color: var(--text-3);
}

.ib-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ib-h {
  margin-top: 22px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 650;
}

.ib-text {
  margin-top: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ib-pre {
  max-height: 420px;
  margin: 10px 0 0;
  padding: 12px 14px;
  overflow: auto;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ib-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.ib-photo {
  width: 128px;
  height: 128px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: zoom-in;
}

.ib-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ib-report {
  margin-top: 22px;
}

.ib-report summary {
  cursor: pointer;
  font-weight: 650;
}

.ib-report .btn {
  margin-top: 10px;
}

.ib-manage {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.ib-manage .fb-input {
  margin-bottom: 14px;
}

.ib-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ib-delete {
  margin-left: auto;
  color: var(--danger);
}

.ib-viewer {
  max-width: min(96vw, 1200px);
  max-height: 94vh;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}

.ib-viewer::backdrop {
  background: var(--backdrop);
}

.ib-viewer img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 80px);
  margin: 0 auto 10px;
  border-radius: 10px;
}

/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .btn,
  .rec,
  .file,
  .cmd,
  .hash {
    border: 1px solid CanvasText;
  }

  .rec-lantern::before {
    display: none;
  }
}

/* User guide */

.guide-toc {
  margin: 20px 0 0;
  padding-left: 1.7em;
  columns: 2 20rem;
  column-gap: 44px;
  color: var(--text-3);
}

.guide-toc li {
  padding: 6px 0 6px 4px;
  break-inside: avoid;
}

.guide-toc li::marker {
  font-variant-numeric: tabular-nums;
}

.guide-toc b {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.guide-toc span {
  display: block;
  margin-top: 1px;
  color: var(--text-2);
  font-size: 14px;
}
