/* 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);
  --bezel: #070b14;

  --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);
    --bezel: #1b253c;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  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;
}

.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;
  animation: breathe 7s ease-in-out infinite;
}

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

@keyframes breathe {
  0%,
  100% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(0.96);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

.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), 0 50px 90px -40px rgba(0, 0, 0, 0.75);
  }
}

/* ------------------------------------------------------------------ */
/* 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;
}

.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;
}

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

@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;
  }
}
