/* Packages registry page (lingo-lang.org/packages/).
   The page MARKUP is generated by ../publish.lingo (data-driven: one card per
   published package, read from each lingo.lson manifest). This file is that
   page's static styling, kept as real CSS rather than a string literal inside
   publish.lingo so it can be edited normally. Shared foundation is base.css
   (tokens/fonts/reset); shared nav + footer are styles.css.
   Load order on the page: base.css -> styles.css -> packages.css. */

html { font-size: 16px; }
body {
  font-family: 'Familjen Grotesk', 'Martlingo Prompt', sans-serif;
  background-color: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; border-radius: 2px; }
.chev { color: var(--accent); font-weight: 700; display: inline-block; }

/* The packages page nav is in-flow (app-shell style); overrides the fixed shared nav. */
nav { position: static; flex-shrink: 0; }

main { flex: 1; max-width: 860px; margin: 0 auto; padding: clamp(48px, 8vw, 80px) clamp(20px, 4vw, 60px); width: 100%; }

.page-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.section-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .15em; color: var(--muted-light); margin-bottom: 16px; }
.page-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 16px; }
.page-desc { font-size: 1rem; color: var(--muted-light); line-height: 1.6; max-width: 560px; }
.page-desc code { font-family: var(--mono); font-size: .88em; color: var(--accent-hover); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 2px 7px; border-radius: 3px; }

.pkg-list { display: flex; flex-direction: column; gap: 20px; }
.pkg-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 24px 28px; transition: border-color .2s ease-out; }
.pkg-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.pkg-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.pkg-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; color: var(--white); }
.pkg-version { font-family: var(--mono); font-size: .78rem; font-weight: 500; color: var(--muted-light); background: color-mix(in srgb, var(--muted-light) 10%, transparent); padding: 3px 8px; border-radius: 4px; }
.pkg-desc { font-size: .9rem; color: var(--muted-light); line-height: 1.5; margin-bottom: 20px; }
.pkg-import { background: var(--code-bg); border: 1px solid var(--code-border); border-radius: 6px; padding: 12px 16px; font-family: var(--mono); font-size: .875rem; color: var(--white); margin-bottom: 16px; overflow-x: auto; white-space: nowrap; }
.tok-kw { color: #c792ea; } .tok-str { color: #c3e88d; } .tok-op { color: var(--accent-hover); }
.pkg-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pkg-sha { font-family: var(--mono); font-size: .72rem; color: var(--muted-light); overflow-wrap: anywhere; min-width: 0; }
.pkg-sha span { color: var(--muted-light); }
.pkg-links { display: flex; gap: 16px; }
.pkg-link { font-size: .82rem; font-weight: 500; color: var(--accent-hover); text-decoration: none; transition: color .2s ease-out; }
.pkg-link:hover { color: var(--white); }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 48px; font-size: .875rem; font-weight: 500; color: var(--muted-light); text-decoration: none; transition: color .2s ease-out; }
.back-link:hover { color: var(--white); }

@media (max-width: 480px) {
  .pkg-import { font-size: .78rem; }
  .pkg-footer { flex-direction: column; align-items: flex-start; }
}
