/* ================================================================
   BigLedger — /applets/ card catalog (dark theme)
   Loaded only by layouts/applets/list.html; safe to style body here.
================================================================ */

:root {
  --ac-bg: #100b0d;
  --ac-card: #1d1518;
  --ac-border: #2e2226;
  --ac-text: #f4eff0;
  --ac-text-2: #b3a6aa;
  --ac-red: #e5333f;
}

html, body { background: var(--ac-bg); }
body {
  color: var(--ac-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.bl-network-bg { display: none; }

.ac-red { color: var(--ac-red); }

/* ── Sticky nav ─────────────────────────────────────────────── */
.ac-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(16, 11, 13, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--ac-border);
}
.ac-nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; gap: 24px;
}
.ac-logo { display: flex; align-items: center; flex-shrink: 0; }
.ac-logo img { height: 32px; width: auto; transition: opacity 0.2s; }
.ac-logo:hover img { opacity: 0.85; }

.ac-links { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.ac-links a {
  color: var(--ac-text-2); font-size: 13.5px; font-weight: 500;
  text-decoration: none; padding: 8px 12px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.ac-links a:hover { color: var(--ac-text); background: rgba(255, 255, 255, 0.05); }
.ac-links a.active { color: var(--ac-red); font-weight: 600; }

.ac-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.ac-lang { position: relative; }
.ac-lang > button {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--ac-border); border-radius: 8px;
  color: var(--ac-text-2); font: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 10px; cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.ac-lang > button:hover { color: var(--ac-text); border-color: #453338; }
.ac-lang svg { width: 15px; height: 15px; }
.ac-lang .ac-caret { width: 10px; height: 10px; transition: transform 0.15s; }
.ac-lang.open .ac-caret { transform: rotate(180deg); }
.ac-lang-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 150px; padding: 6px;
  background: var(--ac-card); border: 1px solid var(--ac-border); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.ac-lang.open .ac-lang-menu { display: block; }
.ac-lang-menu a {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: var(--ac-text-2); font-size: 13.5px; text-decoration: none;
}
.ac-lang-menu a:hover { color: var(--ac-text); background: rgba(255, 255, 255, 0.05); }
.ac-lang-menu a.active { color: var(--ac-red); font-weight: 600; }

.ac-btn {
  display: inline-flex; align-items: center;
  background: var(--ac-red); color: #fff;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  padding: 9px 18px; border-radius: 10px; white-space: nowrap;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.ac-btn:hover {
  background: #f04450; transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(229, 51, 63, 0.35);
}

.ac-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 9px;
  background: none; border: 1px solid var(--ac-border); border-radius: 8px; cursor: pointer;
}
.ac-burger span {
  display: block; height: 2px; width: 100%;
  background: var(--ac-text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s;
}
.ac-nav.open .ac-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ac-nav.open .ac-burger span:nth-child(2) { opacity: 0; }
.ac-nav.open .ac-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Page container ─────────────────────────────────────────── */
.ac-page { max-width: 1200px; margin: 0 auto; padding: 0 24px 96px; }

/* ── Hero ───────────────────────────────────────────────────── */
.ac-hero { text-align: center; padding: 72px 0 40px; }
.ac-crumb {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13.5px; color: var(--ac-text-2); margin-bottom: 22px;
}
.ac-crumb a { color: var(--ac-text-2); text-decoration: none; transition: color 0.15s; }
.ac-crumb a:hover { color: var(--ac-text); }
.ac-crumb-sep { color: #6d5c61; }
.ac-hero h1 {
  font-size: clamp(38px, 6vw, 58px); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.08; color: var(--ac-text); margin: 0 0 20px;
}
.ac-hero-intro {
  max-width: 720px; margin: 0 auto;
  font-size: 17px; line-height: 1.7; color: var(--ac-text-2);
}

/* ── Search + pills ─────────────────────────────────────────── */
.ac-controls { padding: 8px 0 8px; }
.ac-search {
  position: relative; max-width: 560px; margin: 0 auto 22px;
}
.ac-search svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--ac-text-2); pointer-events: none;
}
.ac-search input {
  width: 100%; padding: 13px 18px 13px 44px;
  background: var(--ac-card); border: 1px solid var(--ac-border); border-radius: 12px;
  color: var(--ac-text); font: inherit; font-size: 15px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.ac-search input::placeholder { color: #8d7d82; }
.ac-search input:focus {
  border-color: var(--ac-red);
  box-shadow: 0 0 0 3px rgba(229, 51, 63, 0.18);
}
.ac-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ac-pill {
  padding: 8px 16px; border-radius: 999px;
  background: transparent; border: 1px solid var(--ac-border);
  color: var(--ac-text-2); font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.ac-pill:hover { color: var(--ac-text); border-color: #453338; }
.ac-pill.active {
  background: var(--ac-red); border-color: var(--ac-red);
  color: #fff; font-weight: 600;
}

/* ── Feature tiles ──────────────────────────────────────────── */
.ac-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px; padding: 34px 0 8px;
}
.ac-tile {
  background: var(--ac-card); border: 1px solid var(--ac-border); border-radius: 14px;
  padding: 20px 22px;
}
.ac-tile h3 { font-size: 15px; font-weight: 700; color: var(--ac-text); margin: 0 0 6px; }
.ac-tile h3::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ac-red); margin-right: 9px; vertical-align: 2px; }
.ac-tile p { font-size: 13.5px; line-height: 1.55; color: var(--ac-text-2); margin: 0; }

/* ── Many-to-many note strip ────────────────────────────────── */
.ac-note {
  margin: 22px 0 10px;
  padding: 18px 22px;
  background: rgba(229, 51, 63, 0.08);
  border: 1px solid rgba(229, 51, 63, 0.28);
  border-left: 3px solid var(--ac-red);
  border-radius: 14px;
  font-size: 14.5px; line-height: 1.65; color: var(--ac-text-2);
}
.ac-note strong { color: var(--ac-text); }

/* ── Catalog sections ───────────────────────────────────────── */
.ac-section { padding-top: 46px; }
.ac-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ac-section-head h2 {
  font-size: 21px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ac-text); margin: 0;
}
.ac-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 22px; padding: 0 8px;
  background: rgba(229, 51, 63, 0.14); border: 1px solid rgba(229, 51, 63, 0.3);
  border-radius: 999px; color: var(--ac-red);
  font-size: 12px; font-weight: 700;
}

.ac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.ac-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--ac-card); border: 1px solid var(--ac-border); border-radius: 14px;
  padding: 20px 22px 40px;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ac-card:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 51, 63, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.ac-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ac-card h3 {
  font-size: 15.5px; font-weight: 600; line-height: 1.35;
  color: var(--ac-text); margin: 0;
}
.ac-badge {
  flex-shrink: 0;
  padding: 3px 9px; border-radius: 999px;
  background: var(--ac-red); color: #fff;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}
.ac-card p {
  font-size: 13.5px; line-height: 1.55; color: var(--ac-text-2); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-arrow {
  position: absolute; right: 20px; bottom: 14px;
  color: var(--ac-red); font-size: 18px;
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.ac-card:hover .ac-arrow { opacity: 1; transform: translateX(0); }

/* ── Empty state ────────────────────────────────────────────── */
.ac-empty { padding: 70px 0; text-align: center; }
.ac-empty p { color: var(--ac-text-2); font-size: 16px; margin: 0; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .ac-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 66px;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 20px 18px;
    background: rgba(16, 11, 13, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--ac-border);
  }
  .ac-nav.open .ac-links { display: flex; }
  .ac-links a { padding: 12px 14px; font-size: 15px; }
  .ac-burger { display: flex; }
  .ac-lang { display: none; }
}
@media (max-width: 560px) {
  .ac-nav-inner { padding: 0 18px; }
  .ac-page { padding: 0 18px 72px; }
  .ac-hero { padding: 52px 0 32px; }
  .ac-btn { padding: 8px 13px; font-size: 12.5px; }
  .ac-grid { grid-template-columns: 1fr; }
}
