/* dacker.ir — shared base for the Home prototypes (A/B). Colours come from the variant file. */

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-var.dd08f88dae.woff2") format("woff2");
  font-weight: 300 800;
  font-display: optional;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrainsmono-var.c99b2d0937.woff2") format("woff2");
  font-weight: 400 700;
  font-display: optional;
}

:root {
  --sans: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --fs-xs: 0.8125rem;
  --fs-s: 0.9375rem;
  --fs-m: 1.0625rem;
  --fs-l: 1.25rem;
  --gutter: 1rem;
  --radius: 10px;
  --radius-s: 6px;
}

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-m);
  line-height: 1.8;
  overflow-wrap: break-word;
}

h1, h2, h3 { margin: 0; line-height: 1.35; }
p { margin: 0 0 0.75em; }
a { color: var(--accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ltr, code, pre, kbd {
  font-family: var(--mono);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
.ltr { direction: ltr; unicode-bidi: isolate; font-size: 0.9em; }
.nowrap { white-space: nowrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--max, 72rem); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; inset-inline-start: var(--gutter); top: -3rem; z-index: 10;
  background: var(--text); color: var(--bg); padding: 0.25rem 0.75rem; border-radius: var(--radius-s);
}
.skip:focus { top: 0.5rem; }

/* ---------- header ---------- */

.top .wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  direction: ltr;
  letter-spacing: -0.01em;
}
.brand::before {
  content: "";
  width: 0.7rem; height: 0.7rem;
  border-radius: 2px;
  background: var(--accent);
}
.nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; margin-inline-start: auto; font-size: var(--fs-s); }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { font-weight: 600; }
.theme-toggle {
  font: inherit; font-size: var(--fs-xs);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); margin-top: 5rem; font-size: var(--fs-xs); color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; padding-block: 1.75rem 2.5rem; align-items: baseline; }
.foot a { color: var(--muted); }
.foot .fp { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; letter-spacing: 0.02em; color: var(--text); }
.foot-links { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; margin-inline-start: auto; }

/* ---------- run (one product × distro result) ---------- */

.run-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 0.9rem;
}
.run-title { font-weight: 700; font-size: var(--fs-l); display: inline-flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.run-title .ver { font-family: var(--mono); font-weight: 600; color: var(--accent-text); }
.run-facts { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; list-style: none; margin: 0; padding: 0; font-size: var(--fs-xs); color: var(--muted); }
.run-facts .ok::before { content: "✓ "; color: var(--accent-text); font-weight: 700; }
.run-more { margin-inline-start: auto; font-size: var(--fs-s); white-space: nowrap; }

/* ---------- term (the command block) ---------- */

.term {
  background: var(--term-bg);
  color: var(--term-fg);
  border-radius: var(--radius);
  border: 1px solid var(--term-line);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--term-line);
  font-size: var(--fs-xs);
  color: var(--term-muted);
}
.term-bar .ltr { font-size: 1em; }
.term-body { list-style: none; margin: 0; padding: 0.4rem 0 0.6rem; }
.tstep { padding: 0.35rem 0.9rem 0.2rem; }
.tstep + .tstep { border-top: 1px dashed var(--term-line); }
.tstep-h {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--term-muted);
  min-height: 1.75rem;
}
.tstep-h .n {
  font-family: var(--mono);
  color: var(--term-accent);
  font-weight: 700;
}
.tstep pre {
  margin: 0;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  font-size: var(--fs-s);
  line-height: 1.7;
  padding-bottom: 0.25rem;
}
.tstep code { display: block; }
/* long commands wrap with a hanging indent under the prompt; copying uses the text, not the layout */
.ln { display: block; white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 2ch; text-indent: -2ch; }
.ln:not(.cm)::before { content: "$ "; color: var(--term-accent); user-select: none; }
.ln.cm { color: var(--term-muted); }

.copy {
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--term-fg);
  background: transparent;
  border: 1px solid var(--term-line);
  border-radius: var(--radius-s);
  padding: 0.1rem 0.65rem;
  cursor: pointer;
  white-space: nowrap;
}
.copy:hover { border-color: var(--term-muted); }
.copy-step { margin-inline-start: auto; opacity: 0.75; }
.tstep:hover .copy-step, .copy-step:focus-visible { opacity: 1; }
.copy-all { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.copy-all:hover { filter: brightness(1.08); border-color: var(--accent); }
.copy.is-copied { background: var(--term-fg); color: var(--term-bg); border-color: var(--term-fg); }
.copy.is-copied .copy-label { display: inline-block; animation: press 160ms ease-out; }

@keyframes press {
  from { transform: scale(1.25); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.run-notes { list-style: none; margin: 0.9rem 0 0; padding: 0; font-size: var(--fs-s); color: var(--muted); }
.run-notes li { padding-inline-start: 0.9rem; position: relative; margin-bottom: 0.3rem; }
.run-notes li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.7em; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--accent); }

.run-alt { margin-top: 0.75rem; font-size: var(--fs-s); }
.run-alt summary { cursor: pointer; color: var(--muted); }
.run-alt[open] summary { margin-bottom: 0.6rem; }

.run-na {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: var(--surface);
}
.run-na strong { display: block; margin-bottom: 0.35rem; }
.run-na ul { margin: 0 0 0.5rem; padding-inline-start: 1.1rem; font-size: var(--fs-s); color: var(--muted); }
.run-na p:last-child { margin: 0; }

.fallback-note { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.tstep-note { margin: 0 0 0.35rem; font-size: var(--fs-xs); color: var(--term-fg); opacity: 0.85; }

/* JS-only controls keep their space (no layout shift) and appear once theme.js marks <html class="js">. */
.js-only { visibility: hidden; }
.js .js-only { visibility: visible; }
.js .no-js { display: none; }

.credit { flex-basis: 100%; margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.credit a { color: var(--muted); }
.term-bar { min-height: 2.6rem; }
