/* Software section: the category page and each program's page. Everything shared
   (variables, nav, footer, category cards) comes from /assets/site.css. */

main.sw, main.sw * { -webkit-user-select: text; user-select: text; }
main.sw a { color: var(--red); }
main.sw a:hover { color: #fca5a5; }

/* Arcanum ID chip in the nav, same rules as games/community/index.html */
.nav-auth { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.auth-chip, .profile-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 0.4rem 1rem; border-radius: 100px;
  border: 1px solid rgba(181,149,64,0.4);
  background: rgba(181,149,64,0.08);
  color: #d4b968; text-decoration: none; font-size: 0.8rem;
  letter-spacing: 0.02em; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.auth-chip[hidden], .profile-chip[hidden] { display: none; }
.auth-chip:hover, .profile-chip:hover {
  border-color: rgba(181,149,64,0.75);
  background: rgba(181,149,64,0.16); color: #e6d28f;
}
.auth-chip:focus-visible, .profile-chip:focus-visible {
  outline: 2px solid rgba(181,149,64,0.8); outline-offset: 3px;
}
.auth-chip svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.profile-chip img {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 1px solid rgba(181,149,64,0.5);
}
@media (max-width: 640px) {
  .auth-chip, .profile-chip { padding: 0.35rem 0.7rem; font-size: 0.72rem; }
  .auth-chip svg { display: none; }
}

.sw-hero { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 0.4rem; }
.sw-hero img { width: 96px; height: 96px; border-radius: 22px; flex-shrink: 0; }
.sw-hero .page-title { margin-bottom: 0.15rem; }
.sw-hero .page-sub { margin-bottom: 0; }
.sw-lead { font-size: 1.02rem; line-height: 1.65; color: var(--text); margin: 1.6rem 0 0; }

.sw-download { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.4rem 1.5rem; margin: 2rem 0 0.5rem; }
.sw-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--accent); color: #fff; font-family: 'Lato', sans-serif; font-weight: 700; font-size: 1rem;
  padding: 0.85rem 1.6rem; border-radius: 8px; text-decoration: none; transition: background 0.2s;
}
.sw-btn svg { width: 18px; height: 18px; fill: currentColor; }
main.sw a.sw-btn, main.sw a.sw-btn:hover { color: #fff; }
.sw-btn:hover { background: #b91c1c; }
.sw-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sw-btn[aria-disabled="true"] { background: var(--border); color: var(--muted); cursor: not-allowed; }
.sw-meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.85rem; min-height: 1.2em; }
.sw-fine { color: var(--muted); font-size: 0.8rem; margin-top: 0.5rem; }
.sw-hash-label { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0.2rem 0 0; }
.sw-hash { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 0.76rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.7rem; word-break: break-all; margin: 0.35rem 0 0.8rem; }
.sw-notice { border-left: 3px solid var(--gold); background: rgba(181,149,64,0.07); padding: 0.7rem 1rem; margin: 1rem 0; font-size: 0.92rem; }
.sw-notice[hidden] { display: none; }

.sw-section h2 { font-family: 'EB Garamond', serif; font-size: 1.45rem; font-weight: 600; color: var(--heading); margin: 2.4rem 0 0.7rem; }
.sw-section p, .sw-section li { font-size: 0.95rem; line-height: 1.65; color: var(--text); }
.sw-section p { margin-bottom: 0.8rem; }
.sw-section ul, .sw-section ol { padding-left: 1.35rem; margin-bottom: 0.9rem; }
.sw-section li { margin-bottom: 0.45rem; }
.sw-section code { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 0.86em; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 0.05rem 0.35rem; }
.sw-section pre { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 0.7rem 0.9rem; overflow-x: auto; margin: 0.4rem 0 0.9rem; }
.sw-section pre code { background: none; border: 0; padding: 0; font-size: 0.82rem; }
.sw-small { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 480px) {
  .sw-hero { gap: 0.9rem; }
  .sw-hero img { width: 64px; height: 64px; border-radius: 16px; }
  .sw-download { padding: 1.1rem 1rem; }
}

/* The page is short on purpose: the news box, then sections that open on a click. */
.sw-new { border-left: 3px solid var(--gold); background: rgba(181,149,64,0.07); border-radius: 0 10px 10px 0; padding: 1rem 1.25rem; margin: 1.5rem 0 1.25rem; }
.sw-new h2 { font-family: 'EB Garamond', serif; font-size: 1.3rem; font-weight: 600; color: var(--heading); margin: 0 0 0.4rem; display: flex; align-items: center; gap: 0.6rem; }
.sw-new p { font-size: 0.97rem; line-height: 1.6; color: var(--text); margin: 0 0 0.35rem; }
.sw-tag { font-family: 'Lato', sans-serif; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #d4b968; border: 1px solid rgba(181,149,64,0.6); border-radius: 100px; padding: 0.1rem 0.55rem; }
.sw-folds { border-top: 1px solid var(--border); }
.sw-fold { border-bottom: 1px solid var(--border); }
.sw-fold summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: 0.6rem 0.2rem; font-family: 'EB Garamond', serif; font-size: 1.15rem; font-weight: 600; color: var(--heading); }
.sw-fold summary::-webkit-details-marker { display: none; }
.sw-fold summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s; flex-shrink: 0; margin-right: 0.3rem; }
.sw-fold[open] summary::after { transform: rotate(-135deg); }
.sw-fold summary:hover { color: #fff; }
.sw-fold summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.sw-fold > :not(summary) { margin-left: 0.2rem; }
.sw-fold p, .sw-fold li, .sw-fold dd { font-size: 0.95rem; line-height: 1.6; color: var(--text); }
.sw-fold p { margin: 0 0 0.7rem; }
.sw-fold ul, .sw-fold ol { padding-left: 1.3rem; margin: 0 0 0.9rem; }
.sw-fold li { margin-bottom: 0.35rem; }
.sw-fold code { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 0.86em; }
.sw-fold pre { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 0.6rem 0.85rem; overflow-x: auto; margin: 0 0 0.8rem; }
.sw-history { margin: 0 0 1rem; }
.sw-history dt { font-weight: 700; color: var(--heading); margin-top: 0.6rem; }
.sw-history dt span { font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-left: 0.4rem; }
.sw-history dd { margin: 0.15rem 0 0; }
.sw-help { margin: 1.4rem 0 0; font-size: 0.95rem; color: var(--text); }
@media (prefers-reduced-motion: reduce) { .sw-fold summary::after { transition: none; } }

