/* HomeBox website. One dark look, in the family of the self-hosting sites it
   sits next to: full-width bands split by hairlines, Space Grotesk headings,
   small mono labels, violet accent. Logical properties throughout
   (margin-inline, inset-inline) so the Hebrew pages mirror correctly under
   dir="rtl" without a second stylesheet. Latin fonts carry no Hebrew glyphs,
   so every stack falls through to Heebo for Hebrew text. */

:root {
  --bg: #0b0b10;
  --bg-alt: #101018;
  --surface: #20202b;
  --surface-2: #292935;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --violet: #7c3aed;
  --violet-hi: #8250f0;
  --accent: #a78bfa;
  --accent-line: rgba(167, 139, 250, 0.32);
  --accent-soft: rgba(124, 58, 237, 0.14);
  --green: #4ade80;
  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --radius: 14px;
  --font: Inter, Heebo, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Space Grotesk", Heebo, Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, Heebo, monospace;
  color-scheme: dark;
}
/* Hebrew reads better set in Heebo throughout; Latin words inside still get it too. */
:root:lang(he) { --font: Heebo, Inter, system-ui, sans-serif; --display: Heebo, "Space Grotesk", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--surface); border: 1px solid var(--line); padding: 0.05em 0.38em; border-radius: 6px; }
pre { background: var(--bg-alt); color: var(--text-2); border: 1px solid var(--line); padding: 1rem 1.1rem; border-radius: 10px; overflow-x: auto; direction: ltr; text-align: left; }
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 0.85rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
:lang(he) h1, :lang(he) h2, :lang(he) h3 { letter-spacing: -0.01em; }
[hidden] { display: none !important; }
::selection { background: var(--violet); color: #fff; }

.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 0.8rem; border-radius: 8px; z-index: 60; }

.eyebrow, .mono-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
:lang(he) .eyebrow, :lang(he) .mono-label { letter-spacing: 0.06em; }
.eyebrow { margin: 0 0 1rem; }
.mono-label.accent { color: var(--accent); }
.accent { color: var(--accent); }
.muted { color: var(--muted); font-size: 0.92rem; }
.note { background: var(--accent-soft); border-inline-start: 3px solid var(--accent); padding: 0.6rem 0.9rem; border-radius: 8px; color: var(--text-2); font-size: 0.93rem; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 16, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 1.6rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 600; color: var(--text); font-size: 1.02rem; letter-spacing: -0.01em; }
.brand img { border-radius: 6px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 1.3rem; font-size: 14px; }
.nav a { color: var(--text-2); white-space: nowrap; }
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); }
.top-end { margin-inline-start: auto; display: flex; gap: 0.9rem; align-items: center; font-size: 14px; }
.lang, .gh { color: var(--text-2); white-space: nowrap; }
.lang:hover, .gh:hover { text-decoration: none; color: var(--accent); }
.nav-cta { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; font-weight: 600; font-size: 13.5px; border-radius: 8px; background: var(--violet); color: #fff; white-space: nowrap; }
.nav-cta:hover { background: var(--violet-hi); text-decoration: none; }

/* ----------------------------------------------------------------- bands */
.band { padding: 104px 0; border-bottom: 1px solid var(--line); }
.band.alt { background: var(--bg-alt); }
.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; margin-bottom: 44px; }
.band-title { max-width: 600px; }
.band-title h2 { text-wrap: balance; margin: 0; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.band-side { margin: 0; max-width: 380px; font-size: 15.5px; color: var(--muted); }
.more-line { margin: 22px 0 0; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ hero */
.hero { padding: 84px 0 80px; text-align: center; background:
  radial-gradient(56rem 26rem at 50% -6rem, rgba(124, 58, 237, 0.22), transparent 70%),
  var(--bg); }
.hero-in { display: flex; flex-direction: column; align-items: center; }
.eyebrow.live { display: inline-flex; align-items: center; gap: 10px; letter-spacing: 0.2em; margin-bottom: 26px; }
:lang(he) .eyebrow.live { letter-spacing: 0.06em; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); } 50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
.hero h1 { font-size: clamp(2.3rem, 7vw, 4rem); line-height: 1; letter-spacing: -0.035em; margin: 0; max-width: 20ch; text-wrap: balance; }
.lead { color: var(--text-2); font-size: 1.1rem; line-height: 1.6; max-width: 620px; }
.hero .lead { margin: 22px auto 40px; font-size: 18px; }

.install-card { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 26px; text-align: start; box-shadow: 0 30px 80px -40px rgba(124, 58, 237, 0.55); }
.install-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.badge { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.terminal { display: flex; align-items: baseline; margin-top: 16px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; font-family: var(--mono); font-size: 13px; color: var(--text-2); overflow-x: auto; white-space: nowrap; text-align: left; }
.terminal code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.prompt { color: var(--accent); user-select: none; margin-inline-end: 0.6ch; }
.btn-primary { width: 100%; margin-top: 14px; background: var(--violet); color: #fff; border: 0; font: 600 14.5px var(--font); padding: 12px 18px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: var(--violet-hi); }
.mono-meta { margin: 14px 0 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--muted); }
:lang(he) .mono-meta { font-family: var(--font); font-size: 13px; }

/* The plain install line used in guides and the closing band. */
.install { display: flex; align-items: stretch; max-width: 640px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; direction: ltr; }
.install .terminal { flex: 1; min-width: 0; margin: 0; border: 0; border-radius: 0; background: none; }
.copy { border: 0; border-inline-start: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 13.5px var(--font); padding: 0 1.1rem; cursor: pointer; }
.copy:hover { background: var(--violet); color: #fff; }

/* ----------------------------------------------------------------- stats */
.stats-band { border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 28px 24px; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stat strong { font-family: var(--display); font-weight: 600; font-size: 2.1rem; line-height: 1; letter-spacing: -0.03em; }
.stat span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
:lang(he) .stat span { font-family: var(--font); font-size: 13px; letter-spacing: 0; text-transform: none; }

/* ------------------------------------------------------------- features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color 0.15s, background 0.15s; }
.feature:hover { border-color: var(--accent-line); background: var(--surface-2); }
.feature h3 { margin: 14px 0 8px; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.shots figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.shots img { display: block; width: 100%; }

/* ------------------------------------------------------------------ apps */
.app-grid.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 10px; }
.app-card { display: flex; align-items: center; gap: 11px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; color: var(--text); min-width: 0; transition: border-color 0.15s, background 0.15s; }
.app-card:hover { text-decoration: none; border-color: rgba(167, 139, 250, 0.4); background: var(--surface-2); }
.app-card .app-icon { width: 24px; height: 24px; flex: none; padding: 0; background: none; border-radius: 5px; }
/* Some logos are black on transparent and would disappear on this page; a
   faint light outline keeps their shape without boxing every icon in a plate. */
.app-card img.app-icon { filter: drop-shadow(0 0 0.6px rgba(255, 255, 255, 0.55)); }
.app-icon { object-fit: contain; }
.app-emoji { display: grid; place-items: center; font-size: 1.1rem; line-height: 1; }
.app-text { display: flex; flex-direction: column; min-width: 0; }
/* App names are English: in a Hebrew tile they still truncate at their own end. */
.app-title { direction: ltr; text-align: start; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-tag { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:lang(he) .app-title { text-align: right; }
:lang(he) .app-tag { font-family: var(--font); font-size: 12px; }

.page { padding: 72px 0 88px; }
.page h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 0 0 0.7rem; }
.page .eyebrow { margin-bottom: 0.9rem; }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; letter-spacing: 0.04em; }
:lang(he) .crumbs { font-family: var(--font); font-size: 13px; }

.filters { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin: 2rem 0 1.4rem; }
.search { flex: 1 1 240px; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0.65rem 0.9rem; font: 0.95rem var(--font); }
.search::placeholder { color: var(--muted); }
.search:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--text-2); border-radius: 999px; padding: 0.32rem 0.8rem; font: 13px var(--font); cursor: pointer; }
.chip:hover { border-color: var(--accent-line); }
.chip span { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-inline-start: 0.25rem; }
.chip[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }
.chip[aria-pressed="true"] span { color: rgba(255, 255, 255, 0.8); }
.empty { color: var(--muted); }

.app-page { max-width: 880px; }
.app-head { display: flex; gap: 1.2rem; align-items: center; margin: 1rem 0 1.2rem; }
.app-head .app-icon { width: 72px; height: 72px; flex: none; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.app-head img.app-icon { filter: drop-shadow(0 0 0.6px rgba(255, 255, 255, 0.55)); }
.app-head .app-emoji { font-size: 2rem; }
.app-head h1 { margin: 0; }
.app-head .lead { margin: 0.35rem 0 0; }
.desc { font-size: 1.04rem; color: var(--text-2); line-height: 1.7; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.6rem 0 0.5rem; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.95rem; display: flex; flex-direction: column; gap: 2px; }
.facts span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
:lang(he) .facts span { font-family: var(--font); font-size: 12px; letter-spacing: 0; }
.facts code { background: none; border: 0; padding: 0; }
.app-page h2 { font-size: 1.45rem; margin: 2.6rem 0 0.8rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: start; padding: 0.75rem 0.95rem; border-bottom: 1px solid var(--line); font-size: 0.93rem; vertical-align: top; }
th { font-family: var(--mono); color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; background: var(--bg-alt); }
:lang(he) th { font-family: var(--font); font-size: 12.5px; letter-spacing: 0; }
tr:last-child td { border-bottom: 0; }
.tips { padding-inline-start: 1.2rem; color: var(--text-2); text-align: left; }
.tips li { margin-bottom: 0.55rem; }
.tips li::marker { color: var(--accent); }
.source-link { margin-top: 2.6rem; font-size: 0.92rem; }

/* A card for one app (Radarr) links to its row on the module page: land below the sticky header and mark the row. */
tr[id^="svc-"] { scroll-margin-top: 96px; }
tr[id^="svc-"]:target td { background: var(--accent-soft); }

/* ---------------------------------------------------------------- guides */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.guide-card { display: flex; flex-direction: column; gap: 0.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; color: var(--text); transition: border-color 0.15s, background 0.15s; }
.guide-card:hover { text-decoration: none; border-color: var(--accent-line); background: var(--surface-2); }
.guide-card .mono-label { margin-bottom: 6px; color: var(--accent); }
.guide-title { font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.015em; }
.guide-sum { color: var(--muted); font-size: 0.92rem; }

.prose { max-width: 780px; }
.prose h2 { font-size: 1.55rem; margin: 2.6rem 0 0.8rem; }
.prose h3 { font-size: 1.15rem; margin: 1.9rem 0 0.5rem; }
.prose p, .prose li { color: var(--text-2); }
.prose ol, .prose ul { padding-inline-start: 1.3rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--accent); }
.prose .install { margin: 1.1rem 0; max-width: none; }
.prose .callout { background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent); border-radius: 10px; padding: 0.9rem 1.05rem; margin: 1.3rem 0; }
.prose .callout.warn { border-inline-start-color: #fbbf24; }
.prose .callout p { margin: 0.2rem 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.2rem; padding-top: 1.3rem; border-top: 1px solid var(--line); font-weight: 600; }

/* ------------------------------------------------------------- changelog */
.releases { list-style: none; padding: 0; margin: 2rem 0 0; }
.release { border-bottom: 1px solid var(--line); padding: 1.3rem 0; }
.release-head { display: flex; align-items: baseline; gap: 0.9rem; }
.release-head h2 { font-size: 1.1rem; margin: 0; font-family: var(--mono); letter-spacing: 0; color: var(--accent); }
.release-head time { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.release-body { text-align: left; }
.release-body p { color: var(--text-2); margin: 0.5rem 0 0; }

/* ------------------------------------------------------------ closing cta */
.cta { text-align: center; background: radial-gradient(40rem 18rem at 50% 120%, rgba(124, 58, 237, 0.22), transparent 70%), var(--bg); border-bottom: 0; }
.cta-in { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.cta h2 { margin: 0; font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -0.035em; }
.cta .install { width: min(640px, 100%); }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; padding: 1.8rem 0; color: var(--muted); font-size: 13.5px; }
.foot p { margin: 0; }
.foot a { color: var(--text-2); }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  /* The bar is two rows on a phone: brand and actions on top, the menu under
     them. One row was wider than the screen, which pushed the whole page
     sideways and cut the headline off at the edge. */
  .wrap { width: calc(100% - 2.5rem); }
  .top-in { flex-wrap: wrap; height: auto; padding: 0.6rem 0; row-gap: 0.35rem; column-gap: 0.9rem; }
  .nav { order: 3; width: 100%; gap: 1.2rem; }
  .gh { display: none; }
  .nav-cta { height: 32px; }
  .band { padding: 68px 0; }
  .band-head { margin-bottom: 30px; gap: 1rem; }
  .hero { padding: 56px 0 60px; }
  .hero .lead { font-size: 16.5px; margin-bottom: 30px; }
  .install-card { padding: 18px; }
  .app-grid.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 20px 14px; }
  .stat strong { font-size: 1.7rem; }
  .page { padding: 48px 0 64px; }
}
