/* ludofax.com — the /apps section.
   Layout only, like site.css: every colour, face and offset comes from
   tokens.css. Radius 0, hard offsets, and an offset element always carries a
   matching bottom/right margin (system doc §3).

   Oxide budget: one mark per view. On a product page that mark is the download
   button, which is why nothing else here reaches for --lf-action. */

/* ── masthead nav ─────────────────────────────────────────────────────── */

.masthead__nav { display: flex; gap: 22px; align-items: center; }
.masthead__nav a {
  font-family: var(--lf-font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--lf-ink-muted); text-decoration: none;
  padding: 3px 0; border-bottom: 1px solid transparent;
}
.masthead__nav a:hover { color: var(--lf-ink); border-bottom-color: var(--lf-brass); }
.masthead__nav a[aria-current="page"] { color: var(--lf-ink); border-bottom-color: var(--lf-brass); }

/* ── breadcrumb ───────────────────────────────────────────────────────── */

.crumb {
  padding: 26px 0 0;
  font-family: var(--lf-font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--lf-ink-muted);
}
.crumb a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--lf-hairline); }
.crumb a:hover { border-bottom-color: var(--lf-brass); color: var(--lf-ink); }
.crumb span { margin: 0 9px; color: var(--lf-brass); }

/* ── apps index ───────────────────────────────────────────────────────── */

.applist {
  display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr);
  background: var(--lf-brass);
  border: 1px solid var(--lf-border-strong);
  box-shadow: var(--lf-elev-1);
  margin: 0 3px 3px 0;   /* the offset needs room to land in (§3) */
}
.appcard {
  background: var(--lf-surface); padding: 30px 28px 32px;
  display: flex; flex-direction: column; text-decoration: none;
}
.appcard__top { display: flex; align-items: flex-start; gap: 18px; }
.appcard__icon { width: 62px; height: 62px; flex: none; display: block; }
.appcard__name {
  margin: 0;
  font-family: var(--lf-font-display);
  font-variation-settings: 'wdth' 88, 'wght' 700;
  font-size: 19px; line-height: 1.15; color: var(--lf-ink);
  text-transform: uppercase; letter-spacing: .01em;
}
.appcard__jp { margin: 5px 0 0; font-size: 11px; font-weight: 500; letter-spacing: .12em; color: var(--lf-ink-muted); }
.appcard__body { margin: 18px 0 0; color: var(--lf-ink-secondary); text-wrap: pretty; flex: 1; }
.appcard__foot {
  margin-top: 22px; padding-top: 14px; border-top: 1px dotted var(--lf-hairline);
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-family: var(--lf-font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--lf-ink-muted);
}
.appcard__go { color: var(--lf-ink); border-bottom: 1px solid var(--lf-brass); }
a.appcard:hover .appcard__go { border-bottom-width: 3px; }

/* Status is a stated fact, not a badge. Built-but-unreleased reads differently
   from available, and the site's practice note forbids blurring the two. */
.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 7px; height: 7px; background: var(--lf-ink-muted); flex: none; }
.status--live { color: var(--lf-ok); }
.status--live::before { background: var(--lf-ok); }

/* ── product hero ─────────────────────────────────────────────────────── */

.prod { padding: 44px 0 66px; }
.prod__lockup { display: flex; align-items: center; gap: 30px; }
.prod__icon { width: 128px; height: 128px; flex: none; display: block; }
.prod__name {
  margin: 0;
  font-family: var(--lf-font-display);
  font-variation-settings: 'wdth' 110, 'wght' 800;
  font-size: clamp(40px, 6.5vw, 62px); line-height: .95; letter-spacing: -.015em;
  text-transform: uppercase; color: var(--lf-ink);
}
.prod__rule { width: 46px; height: 3px; background: var(--lf-brass); margin: 16px 0 13px; }
.prod__eyebrow { margin: 0 0 6px; }
.prod__jp { margin: 0; font-size: 13px; color: var(--lf-ink-secondary); }
.prod__statement {
  margin: 48px 0 0;
  font-family: var(--lf-font-display);
  font-variation-settings: 'wdth' 84, 'wght' 700;
  font-size: clamp(24px, 3.2vw, 33px); line-height: 1.14;
  max-width: 20ch; color: var(--lf-ink); text-wrap: balance;
}
.prod__lede { margin: 24px 0 0; max-width: 60ch; font-size: 14px; line-height: 1.85; color: var(--lf-ink-secondary); text-wrap: pretty; }

/* ── download panel ───────────────────────────────────────────────────── */

.dl {
  margin: 44px 3px 3px 0;
  background: var(--lf-inset);
  border: 1px solid var(--lf-border-strong);
  box-shadow: var(--lf-elev-1);
  padding: 30px 30px 26px;
  max-width: 700px;
}
.dl__btn {
  display: inline-block; text-decoration: none;
  font-family: var(--lf-font-mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; padding: 15px 26px;
  background: var(--lf-action); color: var(--lf-on-action);
  box-shadow: 3px 3px 0 0 var(--lf-shade);
  transition: transform var(--lf-motion-detent), box-shadow var(--lf-motion-detent);
}
.dl__btn:active { transform: translate(3px, 3px); box-shadow: none; }
.dl__meta {
  margin: 22px 0 0; padding-top: 16px; border-top: 1px dotted var(--lf-hairline);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.dl__meta dt {
  font-family: var(--lf-font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--lf-ink-muted);
}
.dl__meta dd {
  margin: 6px 0 0;
  font-family: var(--lf-font-mono); font-size: 12px; letter-spacing: .04em; color: var(--lf-ink);
}
.dl__hash {
  margin: 18px 0 0;
  font-family: var(--lf-font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--lf-ink-muted); word-break: break-all; line-height: 1.7;
}
.dl__note { margin: 16px 0 0; font-size: 12px; color: var(--lf-ink-secondary); max-width: 56ch; }

/* Interim state while the release is being signed. Stating the reason is the
   point — a greyed button with no explanation reads as a broken page. */
.dl--pending { background: var(--lf-surface); }
.dl__pending-title {
  margin: 0;
  font-family: var(--lf-font-display);
  font-variation-settings: 'wdth' 88, 'wght' 700;
  font-size: 19px; line-height: 1.15; color: var(--lf-ink);
}

/* ── feature grid ─────────────────────────────────────────────────────── */

.feats {
  display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr);
  background: var(--lf-brass);
  border: 1px solid var(--lf-border-strong);
}
.feat { background: var(--lf-surface); padding: 26px 24px 28px; }
.feat__name {
  margin: 0;
  font-family: var(--lf-font-display);
  font-variation-settings: 'wdth' 88, 'wght' 700;
  font-size: 16px; line-height: 1.2; color: var(--lf-ink);
}
.feat__body { margin: 12px 0 0; font-size: 12px; line-height: 1.75; color: var(--lf-ink-secondary); text-wrap: pretty; }

/* ── install steps ────────────────────────────────────────────────────── */

.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--lf-hairline); }
.step {
  display: grid; grid-template-columns: 62px 1fr; gap: 0 24px;
  padding: 26px 0; border-bottom: 1px dotted var(--lf-hairline);
}
.step__num { font-family: var(--lf-font-mono); font-size: 12px; letter-spacing: .16em; color: var(--lf-brass); padding-top: 3px; }
.step__name {
  margin: 0;
  font-family: var(--lf-font-display);
  font-variation-settings: 'wdth' 88, 'wght' 700;
  font-size: 17px; line-height: 1.2; color: var(--lf-ink);
}
.step__body { margin: 9px 0 0; max-width: 64ch; color: var(--lf-ink-secondary); text-wrap: pretty; }
.step__body + .step__body { margin-top: 11px; }
.step__body code, .path {
  font-family: var(--lf-font-mono); font-size: 11px; letter-spacing: .02em;
  background: var(--lf-inset); color: var(--lf-ink); padding: 2px 6px;
  border: 1px solid var(--lf-hairline);
}

/* ── permission table ─────────────────────────────────────────────────── */

.perms { width: 100%; border-collapse: collapse; margin-top: 8px; }
.perms caption { text-align: left; margin-bottom: 18px; color: var(--lf-ink-secondary); max-width: 62ch; text-wrap: pretty; }
.perms th, .perms td { text-align: left; padding: 15px 18px 15px 0; border-bottom: 1px dotted var(--lf-hairline); vertical-align: top; }
.perms thead th {
  font-family: var(--lf-font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--lf-ink-muted); font-weight: 400;
  border-bottom: 1px solid var(--lf-hairline);
}
.perms tbody th {
  font-family: var(--lf-font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--lf-ink); font-weight: 400; white-space: nowrap;
}
.perms td { color: var(--lf-ink-secondary); font-size: 12px; line-height: 1.7; }
.perms td:first-of-type { white-space: nowrap; font-family: var(--lf-font-mono); font-size: 11px; color: var(--lf-ink-muted); }

/* ── plain prose block inside a product page ──────────────────────────── */

.prose { max-width: 64ch; }
.prose p { margin: 16px 0 0; color: var(--lf-ink-secondary); text-wrap: pretty; }
.prose ul { margin: 16px 0 0; padding-left: 18px; }
.prose li { margin: 7px 0; color: var(--lf-ink-secondary); }
.prose a { color: var(--lf-ink); text-decoration: none; border-bottom: 1px solid var(--lf-brass); }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .applist { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr; }
  .prod { padding: 32px 0 48px; }
  .prod__lockup { gap: 20px; }
  .prod__icon { width: 92px; height: 92px; }
  .prod__statement { margin-top: 36px; max-width: none; }
  .masthead__nav { gap: 16px; }
  .dl { padding: 24px 22px 22px; }
  .dl__meta { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .prod__lockup { flex-direction: column; align-items: flex-start; gap: 18px; }
  .step { grid-template-columns: 1fr; gap: 8px; }
  .step__num { padding-top: 0; }
  .dl__meta { grid-template-columns: 1fr; }
  .appcard__foot { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* A three-column table cannot shrink honestly, so each row becomes a block. */
  .perms, .perms tbody, .perms tr, .perms td, .perms th { display: block; width: 100%; }
  .perms thead { display: none; }
  .perms tr { padding: 16px 0; border-bottom: 1px dotted var(--lf-hairline); }
  .perms th, .perms td { border: 0; padding: 0 0 5px; white-space: normal; }
}

@media print {
  .masthead__nav, .toggle, .dl__btn { display: none; }
  .applist, .dl { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dl__btn { transition: none; }
}
