/* Addon pages (apage.js). --ac is the addon's own accent (from its logo), set on <main>. Colors otherwise from
   app.css. Class names use the ap- prefix; none may contain "ad", "banner" or "sponsor" (ad blockers hide those). */
.ap { max-width: 900px; --ac: var(--gold); }
.ap a { color: var(--field); }
.ap a:hover { color: var(--gold); }
.ap code { font: 13px/1.4 var(--code); }
.ap p, .ap dd { line-height: 1.6; }

/* hero: the addon's art in a tile lit by its accent, name and install beside it */
.ap-hero {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center;
  padding: 26px 28px; border-radius: 18px; border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--ac) 22%, transparent), transparent 60%),
    var(--panel);
}
.ap-art { display: grid; place-items: center; }
.ap-logo { width: 168px; height: 168px; filter: drop-shadow(0 14px 30px color-mix(in srgb, var(--ac) 45%, transparent)); }
.ap h1 { margin: 0; font-size: clamp(26px, 4.4vw, 38px); line-height: 1.1; letter-spacing: -0.025em; }
.ap-pitch { margin: 10px 0 16px; font-size: 16.5px; color: var(--text); max-width: 56ch; }
.ap-small { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.ap-intro { margin: 26px 0 0; font-size: 15.5px; max-width: 70ch; }

.ap-get { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-btn, .ap a.ap-btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 9px; cursor: pointer;
  font: 600 14px var(--ui); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); background: var(--raise); color: var(--text);
}
.ap-btn:hover, .ap a.ap-btn:hover { border-color: var(--ac); color: var(--text); }
.ap-btn:focus-visible { outline: 2px solid var(--field); outline-offset: 2px; }
.ap-go, .ap a.ap-go { background: var(--gold); border-color: var(--gold); color: #1a1405; }
.ap-go:hover, .ap a.ap-go:hover { color: #1a1405; filter: brightness(1.08); }
.ap-btn.done { border-color: var(--str); color: var(--str); background: var(--raise); }

.ap-sec { margin-top: 38px; }
.ap h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: -0.01em; }
.ap h3 { margin: 18px 0 4px; font-size: 15.5px; }
.ap-sec > p { max-width: 70ch; }

/* features: two columns of short entries, each marked by the accent */
.ap-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 28px; margin: 0; }
.ap-feats div { border-left: 3px solid var(--ac); padding-left: 14px; }
.ap-feats dt { font-weight: 650; font-size: 15.5px; }
.ap-feats dd { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

.ap-cmds { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.ap-cmds th, .ap-cmds td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
.ap-cmds th { font-weight: 400; white-space: nowrap; width: 1%; padding-right: 22px; }
.ap-cmds code { color: var(--ac); }
.ap-cmds td { white-space: normal; max-width: none; overflow: visible; } /* app.css cuts table cells to one line; a long command explanation wraps */

.ap-install, .ap-fb { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.ap-install p:first-of-type, .ap-fb p { margin-top: 0; }
.ap-install code { background: var(--raise); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }

/* screenshots */
.ap-shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ap-shots p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.ap-shot { display: block; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; background: none; width: 100%; }
.ap-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; background: #0c0e12; }
.ap-rendered { display: block; margin-top: 2px; font-size: 12.5px; opacity: .8; }
.ap-shot:hover { border-color: var(--ac); }
.ap-view { padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); max-width: min(1400px, 96vw); }
.ap-view::backdrop { background: rgba(0, 0, 0, .75); }
.ap-view img { display: block; max-width: 100%; max-height: 86vh; }
.ap-view .ap-btn { position: absolute; top: 10px; right: 10px; }

/* other addons */
.ap-others { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ap-others a {
  display: block; height: 100%; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); border-top: 3px solid var(--ac); background: var(--panel);
}
.ap-others a:hover { color: var(--text); border-color: var(--ac); }
.ap-others b { display: block; font-size: 14.5px; }
.ap-others span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* illustrations for the addons without a logo */
.ap-demo { width: 190px; height: 168px; border-radius: 14px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); position: relative; overflow: hidden; }
.ap-craft { height: auto; }
.ap-craft p { margin: 0; padding: 8px 14px 0; font: 600 11px var(--ui); color: #fff; opacity: .8; }
.ap-craft ul { list-style: none; margin: 0; padding: 4px 14px 10px; font: 600 12.5px/1.75 var(--ui); }
.ap-craft li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-c-o { color: var(--r-orange); } .ap-c-y { color: var(--r-yellow); } .ap-c-g { color: var(--r-green); } .ap-c-x { color: var(--r-gray); }

/* real screenshots as hero art (Lattice's party frames, Whack's numbers, the app's window) */
.ap-snap { display: block; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 14px 30px color-mix(in srgb, var(--ac) 25%, transparent); max-width: 100%; height: auto; }
.ap-snap-tall { width: 110px; }
/* Whack: two crops of one screenshot, the incoming and outgoing areas side by side as on screen */
.ap-wk { display: flex; align-items: center; gap: 12px; }
.ap-hero-wide { grid-template-columns: 340px 1fr; }

/* the Auctions tooltip, in the game's tooltip colours */
.ap-tip { padding: 9px 10px; font: 11px/1.45 var(--ui); color: #fff; background: rgba(8, 10, 20, .92); border-color: #4a5470; width: 220px; height: auto; }
.ap-tip p { margin: 0; }
.ap-t-name { color: #1eff00; font-weight: 650; font-size: 12px; }
.ap-t-row { display: flex; justify-content: space-between; gap: 6px; }
.ap-t-row b, .ap-t-row span { font-weight: 400; white-space: nowrap; }
.ap-t-ah span { color: #ffd100; }
.ap-t-dim span { color: #999; } .ap-t-dim b { color: #ccc; } .ap-t-dim b.ap-t-w { color: #fff; }
.ap-t-dim:first-of-type span { padding-left: 8px; }
.ap-g, .ap-s { font-style: normal; font-size: 10px; margin-left: 1px; }
.ap-g { color: #ffd100; } .ap-s { color: #c7c7cf; }

/* the Collector's chat line and save button */
.ap-chat { padding: 12px 12px; font: 12px/1.5 var(--ui); color: #fff; height: auto; min-height: 150px; }
.ap-chat p { margin: 0 0 6px; text-shadow: 0 1px 0 #000; }
.ap-chat b { color: #ffd200; font-weight: 400; }
.ap-ch-me { color: #aab; }
@media (max-width: 640px) {
  .ap-hero, .ap-hero-wide { grid-template-columns: 1fr; padding: 20px 18px; gap: 16px; }
  .ap-art { justify-items: start; }
  .ap-logo { width: 96px; height: 96px; }
  .ap-demo { width: 100%; height: 140px; }
  .ap-tip, .ap-chat, .ap-craft { height: auto; }
  .ap-cmds th { white-space: normal; }
}
.ap-os { font-weight: 400; opacity: .8; margin-left: .3em; }
.ap-appline { margin: 8px 0 0; }
.ap-appline a { color: var(--field); }
.ap-hero.ap-hero-solo { grid-template-columns: 1fr; }
