/* =========================================================
   Platinum — classic Mac OS 8/9 inspired theme for MacTrove
   ========================================================= */

@font-face {
  font-family: "Charcoal";
  src: url("../fonts/Charcoal.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --platinum-bg:              #dddddd;
  --platinum-window-bg:       #eeeeee;
  --platinum-window-chrome:   #cccccc;
  --platinum-window-border:   #000000;
  --platinum-bevel-light:     #ffffff;
  --platinum-bevel-dark:      #888888;
  --platinum-shadow-dark:     #666666;
  --platinum-text:            #000000;
  --platinum-muted:           #555555;
  --platinum-dim:             #888888;
  --platinum-link:            #0000cc;
  --platinum-link-visited:    #551a8b;
  --platinum-accent:          #3366cc;
  --platinum-highlight:       #ccccff;
  --platinum-font-ui:   "Chicago", "ChicagoFLF", "Charcoal", system-ui, sans-serif;
  --platinum-font-body: "Chicago", "Charcoal", system-ui, sans-serif;
  --platinum-font-mono: Monaco, "Andale Mono", "Lucida Console", monospace;
}

body {
  background: var(--platinum-bg);
  color: var(--platinum-text);
  font: 13px/1.45 var(--platinum-font-body);
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px);
  background-size: 2px 2px;
  /* Make room for the fixed Mac OS 9 menu bar (22px + 1px border). */
  padding-top: 23px;
}

/* ----- Mac OS 9 menu bar (fixed) ----- */
.mac-menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 22px;
  background: #DDDDDD;
  border-bottom: 1px solid #AAAAAA;
  font-family: "Charcoal", "Chicago", "ChicagoFLF", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  z-index: 1000;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
.mac-menubar__inner {
  display: flex;
  align-items: stretch;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 4px;
}
.mac-menubar__apple,
.mac-menubar__item,
.mac-menubar__apple:link,
.mac-menubar__apple:visited,
.mac-menubar__item:link,
.mac-menubar__item:visited {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  color: #000;
  text-decoration: none;
  line-height: 1;
  border: 0;
  cursor: default;
}
.mac-menubar__apple,
.mac-menubar__apple:link,
.mac-menubar__apple:visited {
  padding: 0 10px 0 8px;
  color: #000;
}
.mac-menubar__apple svg { display: block; }
/* Hover + focus + active-page share the same blue-fill / white-text look.
   ``:link`` / ``:visited`` are enumerated explicitly so user-agent purple
   on visited links doesn't win the cascade. */
.mac-menubar__apple:hover,
.mac-menubar__apple:focus-visible,
.mac-menubar__item:hover,
.mac-menubar__item:focus-visible,
.mac-menubar__item:link:hover,
.mac-menubar__item:visited:hover,
.mac-menubar__item.is-active,
.mac-menubar__item.is-active:link,
.mac-menubar__item.is-active:visited {
  background: #312f9a;
  color: #fff;
  outline: 0;
}
.mac-menubar__item.is-active { font-weight: 700; }

.mac-menubar__spacer { flex: 1; }

.mac-menubar__user {
  gap: 4px;
  cursor: pointer;
  list-style: none;
}
.mac-menubar__user::-webkit-details-marker { display: none; }
.mac-menubar__caret { font-size: 9px; }

.mac-menubar__menu {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}
.mac-menubar__menu[open] > .mac-menubar__user {
  background: #312f9a;
  color: #fff;
}
.mac-menubar__panel {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 160px;
  background: #EEE;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #888;
  padding: 2px 0;
  z-index: 1001;
}
.mac-menubar__panel a {
  display: block;
  padding: 4px 14px;
  color: #000;
  text-decoration: none;
  font-weight: 400;
  font-size: 12px;
}
.mac-menubar__panel a:hover {
  background: #312f9a;
  color: #fff;
}

/* Mobile: existing mobile-topbar + bottom tab bar handle navigation;
   hide the fixed menu bar and reclaim its top padding. */
@media (max-width: 720px) {
  .mac-menubar { display: none; }
  body { padding-top: 0; }
}

/* ----- Hide Drupal cruft ----- */
#block-platinum-powered,
[id*="powered"],
.block-system-powered-by-block,
[data-drupal-selector*="powered"] { display: none !important; }
#block-platinum-main-menu,
nav[role="navigation"][aria-labelledby*="main-menu"] { display: none !important; }
.region-primary-menu,
#block-platinum-search,
#block-platinum-search-form-narrow,
.block-search-form-block { display: none !important; }

/* ----- Page layout ----- */
.page {
  max-width: 1100px;
  margin: 16px auto 32px;
  padding: 0 12px;
}
.page__header {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  padding: 8px 12px 14px;
  border-bottom: 1px solid var(--platinum-bevel-dark);
  overflow: hidden;            /* clip the ::before tile to header bounds */
}
/* Random per-request tile painted as a low-opacity ::before layer so the
   logo and any future header children stay at full intensity. The tile
   URL comes from platinum_preprocess_page() via the inline
   ``--header-tile`` custom property. */
.page__header--has-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--header-tile);
  background-repeat: repeat;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.page__header > * { position: relative; z-index: 1; }
.page__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  transform: translateY(-4px); /* nudge up so it sits closer to the nav baseline */
}
.page__logo img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: none;
}

.page__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 16px 0 24px;
  padding-bottom: 6px;
  font-family: var(--platinum-font-ui);
}
.page__nav-link {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--platinum-text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 3px;
  line-height: 1.2;
}
.page__nav-link:hover {
  background: #e8eef7;
  border-color: #b6c1d3;
  color: #1a5fb4;
}
.page__nav-link.is-active {
  background: linear-gradient(to bottom, #ffffff 0%, #dce4ef 100%);
  border-color: var(--platinum-bevel-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-weight: bold;
  color: #1f2a3f;
}

.page__user {
  margin-left: 12px;           /* snug up to the nav — was auto (floated far right) */
  display: flex;
  gap: 8px;
  font-family: var(--platinum-font-ui);
  font-size: 12px;
  padding-bottom: 6px;
}
.page__user a {
  display: inline-block;
  padding: 4px 12px;
  color: var(--platinum-text);
  text-decoration: none;
  background: linear-gradient(to bottom, #ffffff 0%, #e8e8e8 50%, #cfcfcf 100%);
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 0 rgba(0,0,0,.08);
  font-weight: bold;
}
.page__user a:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #d8e6ff 50%, #b8cdf0 100%);
  text-decoration: none;
}
.page__user a:active {
  background: linear-gradient(to bottom, #b8cdf0 0%, #d8e6ff 50%, #ffffff 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.2);
}

/* Logged-in user menu (replaces the two standalone buttons) */
.user-menu {
  position: relative;
}
.user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  cursor: pointer;
  list-style: none;
  color: var(--platinum-text);
  background: linear-gradient(to bottom, #ffffff 0%, #e8e8e8 50%, #cfcfcf 100%);
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 0 rgba(0, 0, 0, 0.08);
  font-weight: bold;
  font-family: var(--platinum-font-ui);
  font-size: 12px;
  user-select: none;
}
.user-menu__trigger::-webkit-details-marker {
  display: none;
}
.user-menu[open] .user-menu__trigger,
.user-menu__trigger:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #d8e6ff 50%, #b8cdf0 100%);
}
.user-menu__name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu__caret {
  font-size: 9px;
  color: var(--platinum-muted);
}
.user-menu__panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  padding: 4px 0;
  background: #f4f4f4;
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  z-index: 100;
}
.user-menu__panel a {
  display: block;
  margin: 0;
  padding: 6px 12px;
  color: var(--platinum-text);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-weight: normal;
  text-decoration: none;
  font-size: 12px;
}
.user-menu__panel a:hover {
  background: #1a5fb4;
  color: #fff;
}


.page__main {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
}
/* Pages that hide the sidebar (e.g. /archive/*) should give the full
   width to the content column — otherwise the grid reserves 210px of
   empty space on the left and the content renders squished. */
.page__main:not(:has(> aside.sidebar)) {
  grid-template-columns: 1fr;
}
@media (max-width: 720px) {
  .page__main { grid-template-columns: 1fr; }
  /* The desktop nav is redundant on mobile (bottom tab bar handles this). */
  .page__nav { display: none; }
}

/* ----- Breadcrumbs ----- */
.breadcrumb {
  font-size: 11px;
  color: var(--platinum-muted);
  margin-bottom: 10px;
  padding: 6px 0;
}
.breadcrumb a { color: var(--platinum-link); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 4px; color: #999; }
.manual-breadcrumb {
  font-size: 11px;
  color: var(--platinum-muted);
  margin-bottom: 10px;
  padding: 4px 0;
  font-family: var(--platinum-font-ui);
}
.manual-breadcrumb a { color: var(--platinum-link); text-decoration: none; }
.manual-breadcrumb a:hover { text-decoration: underline; }
.manual-breadcrumb .sep { margin: 0 4px; color: #aaa; }

/* ----- Window chrome (Platinum standard) ----- */
.window {
  background: var(--platinum-window-bg);
  border: 1px solid var(--platinum-window-border);
  box-shadow:
    inset -1px -1px 0 var(--platinum-bevel-dark),
    inset 1px 1px 0 var(--platinum-bevel-light),
    2px 2px 0 rgba(0,0,0,.15);
  margin-bottom: 14px;
}

.window__title {
  height: 20px;
  padding: 0 8px;
  font-family: var(--platinum-font-ui);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  position: relative;
  user-select: none;
  color: #000;
  border-bottom: 1px solid var(--platinum-window-border);
  background:
    repeating-linear-gradient(
      to bottom,
      #ffffff 0, #ffffff 1px,
      #cccccc 1px, #cccccc 2px,
      #ffffff 2px, #ffffff 3px
    );
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 #888888;
}

.window__title::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 11px; height: 11px;
  background: linear-gradient(135deg, #bbb 0%, #ddd 50%, #fafafa 100%);
  border-top: 1px solid #999;
  border-left: 1px solid #999;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  pointer-events: none;
}

.window__title span {
  background: var(--platinum-window-bg);
  padding: 0 8px;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #888;
  border-left: 1px solid #888;
  border-right: 1px solid #888;
}

.window__body {
  padding: 12px 14px;
  overflow: hidden;
}

/* ----- Mobile-only chrome (hidden on desktop) ----- */
.mobile-topbar,
.mobile-tabbar {
  display: none;
}

/* ----- Sidebar navigation ----- */
/* Clearance so sticky/scrolled sidebar windows don't tuck under the
   fixed 22px menu bar. Scroll-margin handles anchor jumps; desktop
   pins sticky so the sidebar tracks below the bar while scrolling.
   No top padding — we want the sidebar top edge to line up with the
   main content column's first window. */
.sidebar { scroll-margin-top: 32px; }
@media (min-width: 721px) {
  .sidebar {
    position: sticky;
    top: 32px;
    align-self: start;
  }
}
.sidebar .window__body {
  padding: 8px 10px;
}
.sidebar__h {
  font-family: var(--platinum-font-ui);
  font-size: 13px;
  margin: 0 0 4px;
  padding: 0 0 3px 0;
  border-bottom: 1px solid #555;
  letter-spacing: .2px;
}
.sidebar__rule {
  border: 0;
  border-top: 1px solid #888;
  margin: 14px 0 10px;
  height: 0;
}
.sidebar details.sidebar-more { margin: 2px 0 6px; }
.sidebar details.sidebar-more > summary {
  list-style: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--platinum-link);
  padding: 3px 6px;
  border-top: 1px dotted #bbb;
  user-select: none;
}
.sidebar details.sidebar-more > summary::-webkit-details-marker { display: none; }
.sidebar details.sidebar-more > summary:hover { background: #eef; }
.sidebar details.sidebar-more > summary::before { content: "▸ "; color: #888; }
.sidebar details.sidebar-more[open] > summary::before { content: "▾ "; }
.sidebar .menu {
  font-size: 12px;
}
.sidebar .menu li {
  border-bottom: 1px dotted #aaa;
}
.sidebar .menu li:last-child { border-bottom: 0; }
.sidebar .menu a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 6px;
  text-decoration: none;
  color: var(--platinum-text);
  gap: 8px;
}
.sidebar .menu a:hover,
.sidebar .menu a.is-active {
  background: var(--platinum-accent);
  color: #fff;
}
.sidebar .menu .label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar .menu .count {
  color: var(--platinum-dim);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  text-align: right;
  min-width: 3.5em;
  flex: 0 0 auto;
}
.sidebar .menu a:hover .count,
.sidebar .menu a.is-active .count { color: #e0e7ff; }

.sidebar h3 {
  font-family: var(--platinum-font-ui);
  font-size: 13px;
  margin: 12px 0 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--platinum-bevel-dark);
}
.sidebar h3:first-child { margin-top: 0; }

/* ----- Hero (homepage welcome) ----- */
.hero__body {
  padding: 14px 22px;
}
.hero__search {
  display: flex;
  gap: 6px;
  max-width: 520px;
  margin-bottom: 12px;
}
.hero__search input { flex: 1; font-size: 14px; padding: 5px 8px; }
.hero__search .btn { padding: 4px 22px; font-size: 13px; }
.hero__title {
  font-family: var(--platinum-font-ui);
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: #000;
}
.hero__lede {
  font-size: 13px;
  line-height: 1.55;
  max-width: 640px;
  margin: 0 0 0;
  color: #333;
}

/* ----- Featured app hero (desktop only, above the search hero) ----- */
.featured-app__body {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}
.featured-app__icon {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  border: 1px solid #888;
  background: #fff;
  box-shadow: inset 0 0 0 1px #fff, 1px 1px 0 rgba(0,0,0,.1);
}
.featured-app__icon--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--platinum-font-ui);
  font-size: 11px;
  color: var(--platinum-muted);
}
.featured-app__body__text {
  min-width: 0;
}
.featured-app__eyebrow {
  display: inline-block;
  font-family: var(--platinum-font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--platinum-accent);
  background: var(--platinum-highlight);
  border: 1px solid var(--platinum-accent);
  padding: 1px 6px;
  margin-bottom: 6px;
}
.featured-app__title {
  font-family: var(--platinum-font-ui);
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 4px;
}
.featured-app__title a {
  color: var(--platinum-link);
  text-decoration: none;
}
.featured-app__title a:hover { text-decoration: underline; }
.featured-app__title small {
  font-weight: normal;
  font-size: 13px;
  color: var(--platinum-muted);
}
.featured-app__meta {
  font-size: 11.5px;
  color: var(--platinum-muted);
  margin-bottom: 6px;
}
.featured-app__meta .sep {
  margin: 0 6px;
}
.featured-app__abstract {
  font-size: 12.5px;
  line-height: 1.5;
  color: #222;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-app__cta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

/* Desktop order: programs (recent) above docs.
   On mobile the @media block below overrides this with docs-first. */
.page__main > .content {
  display: flex;
  flex-direction: column;
}
.page__main > .content > * { order: 10; }
.page__main > .content > div.featured-app { order: 1; }
.page__main > .content > div.hero        { order: 2; }
.page__main > .content > div.home-recent { order: 3; }
.page__main > .content > div.home-docs   { order: 4; }

/* ----- Category grid (homepage) ----- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
.category-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #888;
  box-shadow: inset 0 0 0 1px #fff, 1px 1px 0 rgba(0,0,0,.08);
  text-decoration: none;
  color: var(--platinum-link);
  font-size: 12.5px;
  font-family: var(--platinum-font-ui);
  min-height: 36px;
}
.category-card:hover {
  background: var(--platinum-highlight);
  color: var(--platinum-link);
}
.category-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 6px;
}
.category-card__count {
  background: var(--platinum-window-chrome);
  color: var(--platinum-muted);
  font-family: var(--platinum-font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid #aaa;
}

/* Long tail category list */
.category-more { margin-top: 14px; }
.category-more > summary {
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--platinum-link);
  padding: 4px 8px;
  border-top: 1px solid #bbb;
  font-family: var(--platinum-font-ui);
}
.category-more > summary::-webkit-details-marker { display: none; }
.category-more > summary::before { content: "▸ "; color: #888; }
.category-more[open] > summary::before { content: "▾ "; }

.category-list {
  list-style: none;
  padding: 8px 0 0 0;
  margin: 0;
  columns: 3;
  column-gap: 18px;
}
@media (max-width: 720px) { .category-list { columns: 2; } }
.category-list li {
  break-inside: avoid;
  margin: 0;
  font-size: 12px;
}
.category-list a {
  display: flex;
  justify-content: space-between;
  padding: 2px 4px;
  text-decoration: none;
  color: #000;
  border-bottom: 1px dotted #ccc;
}
.category-list a:hover { background: #eef; color: var(--platinum-link); }
.category-list a .c {
  color: var(--platinum-dim);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* ----- Software cards (catalog listing) ----- */
.software-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.software-card {
  background: #fff;
  border: 1px solid #888;
  box-shadow:
    inset 0 0 0 1px #ffffff,
    1px 1px 0 rgba(0,0,0,.1);
  padding: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  max-height: 220px;
  overflow: hidden;
}
.software-card h2 {
  font-family: var(--platinum-font-ui);
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.3;
}
.software-card h2 a {
  color: var(--platinum-link);
  text-decoration: none;
}
.software-card h2 a:hover { text-decoration: underline; }
.software-card .meta {
  color: var(--platinum-muted);
  font-size: 11px;
  margin-bottom: 6px;
}
.software-card .meta .arch {
  display: inline-block;
  padding: 0 4px;
  background: var(--platinum-highlight);
  border: 1px solid var(--platinum-accent);
  color: var(--platinum-accent);
  margin-right: 3px;
  font-family: var(--platinum-font-mono);
  font-size: 10px;
}
.software-card .abstract {
  flex: 1;
  color: #222;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
}
.software-card .card-footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dotted #ccc;
  font-size: 11px;
}
.software-card .card-footer .card-stats {
  color: var(--platinum-dim);
}
.software-card .download {
  margin-top: auto;
  padding-top: 10px;
  text-align: right;
}

/* ----- Home "Recently Added" — tighter card layout -----
   Override the catalog card sizing so short or empty abstracts don't leave
   `margin-top: auto` pushing the footer down against a 200px min-height. */
.home-recent .software-card {
  min-height: 0;
  max-height: none;
  padding: 10px 12px;
}
.home-recent .software-card .meta {
  margin-bottom: 4px;
}
.home-recent .software-card .abstract {
  flex: 0 1 auto;
  margin-bottom: 6px;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.home-recent .software-card .card-footer {
  margin-top: 6px;
  padding-top: 6px;
}

/* ----- Sidebar Filters ----- */
.filter-group {
  margin-bottom: 16px;
}
.filter-group__header {
  font-family: var(--platinum-font-ui);
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--platinum-muted);
  margin-bottom: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--platinum-window-chrome);
}
.filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.filter-list__item {
  margin-bottom: 2px;
}
.filter-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  text-decoration: none;
  color: #000;
  font-size: 13px;
  border-radius: 4px;
}
.filter-link:hover {
  background-color: var(--platinum-window-chrome);
}
.filter-link.is-active {
  background-color: var(--platinum-accent);
  color: #fff;
}
.filter-link__count {
  font-size: 11px;
  color: var(--platinum-dim);
  background: var(--platinum-window-chrome);
  padding: 0 5px;
  border-radius: 8px;
}
.filter-link.is-active .filter-link__count {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.filter-actions {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dotted var(--platinum-window-chrome);
  display: flex;
  gap: 8px;
}

.doc-filter-actions, .mag-filter-actions {
  margin-top: 12px;
  display: flex;
  gap: 6px;
}

.is-hidden {
  display: none !important;
}

/* ----- Card header with icon ----- */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.card-icon {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid #aaa;
  background: #fff;
}
.card-header h2 { flex: 1; }

/* ----- Listing toolbar (sort/filter bar) ----- */
.listing-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.listing-toolbar .result-count {
  color: var(--platinum-muted);
  font-size: 12px;
}
.listing-toolbar .sort-controls {
  display: flex;
  gap: 4px;
  font-size: 11px;
  font-family: var(--platinum-font-ui);
}
.listing-toolbar .sort-controls a {
  padding: 2px 8px;
  text-decoration: none;
  color: var(--platinum-muted);
  background: var(--platinum-window-chrome);
  border: 1px solid #aaa;
}
.listing-toolbar .sort-controls a:hover {
  background: #ddd;
  color: #000;
}
.listing-toolbar .sort-controls a.active {
  background: var(--platinum-accent);
  color: #fff;
  border-color: var(--platinum-accent);
}

/* ----- Buttons — Platinum 3D pushbutton ----- */
.btn, .button, button[type=submit], input[type=submit] {
  font-family: var(--platinum-font-ui);
  font-size: 12px;
  padding: 2px 14px;
  background: linear-gradient(to bottom, #f9f9f9 0%, #e4e4e4 50%, #cfcfcf 100%);
  color: #000;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #555555;
  border-bottom: 1px solid #555555;
  border-radius: 7px;
  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #999999,
    0 1px 0 rgba(0,0,0,.25);
}
.btn:hover, .button:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #efefef 50%, #d9d9d9 100%);
}
.btn:active, .button:active {
  background: linear-gradient(to bottom, #b5b5b5 0%, #cacaca 50%, #dadada 100%);
  border-top-color: #555555;
  border-left-color: #555555;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow:
    inset 1px 1px 0 #888888,
    inset -1px -1px 0 #ffffff;
}
.btn--primary, .button--primary,
button[type=submit].form-submit {
  background: linear-gradient(to bottom, #a7c6ff 0%, #6f9ae8 50%, #4680e6 100%);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  border-top-color: #cbd8f2;
  border-left-color: #cbd8f2;
  border-right-color: #1e3a80;
  border-bottom-color: #1e3a80;
}
.btn--primary:hover { background: linear-gradient(to bottom, #bdd6ff 0%, #7fa9ea 50%, #5f95ef 100%); }

/* ----- Icons & screenshots ----- */
.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 2px;
}
.detail-icon img {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  width: 32px;
  height: 32px;
  border: 1px solid var(--platinum-bevel-dark);
  background: #fff;
  box-shadow: inset 0 0 0 1px #fff;
  flex-shrink: 0;
  margin-top: 2px;
}
.detail-heading { flex: 1; }

.screenshot-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.screenshot-link {
  display: block;
  position: relative;
  border: 1px solid var(--platinum-window-border);
  box-shadow:
    inset -1px -1px 0 var(--platinum-bevel-dark),
    inset 1px 1px 0 var(--platinum-bevel-light),
    2px 2px 0 rgba(0,0,0,.12);
  background: #fff;
  padding: 4px;
  transition: transform 120ms ease;
}
.screenshot-link:hover {
  box-shadow:
    inset -1px -1px 0 var(--platinum-bevel-dark),
    inset 1px 1px 0 var(--platinum-bevel-light),
    3px 3px 0 rgba(0,0,0,.18);
  transform: translate(-1px,-1px);
}
.screenshot-link::after {
  content: "↗ full size";
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 10px;
  padding: 2px 5px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
.screenshot-link:hover::after { opacity: 1; }
.screenshot-img {
  display: block;
  /* Classic-Mac-era art is low-res by design. Render at up to 2× its natural
     pixel size so 320×240 captures read at a usable size on modern displays;
     pixelated rendering keeps the art crisp (nearest-neighbor upscale) instead
     of turning 1-pixel lines into beige smears. */
  max-width: 640px;
  max-height: 480px;
  width: auto;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}
@media (max-width: 700px) {
  .screenshot-img { max-width: 100%; max-height: none; }
}

/* ----- Fallback description + other versions ----- */
.fallback-description {
  font-size: 13px;
  line-height: 1.5;
  color: #222;
  margin: 0 0 10px;
}
.fallback-note {
  font-size: 11.5px;
  color: var(--platinum-dim);
  margin: 0;
  padding-top: 8px;
  border-top: 1px dotted #ccc;
}

.other-versions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px;
}
.other-version {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #fff;
  border: 1px solid #aaa;
  text-decoration: none;
  color: inherit;
  transition: background 0.05s;
}
.other-version:hover {
  background: var(--platinum-highlight);
  border-color: var(--platinum-accent);
}
.other-version__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  image-rendering: pixelated;
  border: 1px solid #bbb;
  background: #fff;
}
.other-version__icon--empty {
  background: var(--platinum-window-chrome);
}
.other-version__body {
  flex: 1;
  min-width: 0;
}
.other-version__title {
  font-family: var(--platinum-font-ui);
  font-size: 12.5px;
  font-weight: bold;
  color: var(--platinum-link);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.other-version__title small {
  font-weight: normal;
  color: var(--platinum-muted);
}
.other-version__meta {
  font-family: var(--platinum-font-mono);
  font-size: 10.5px;
  color: var(--platinum-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----- Document pages ----- */
.doc-thumbnail {
  flex-shrink: 0;
  margin-right: 4px;
}
.doc-thumb-img {
  width: 120px;
  height: auto;
  border: 1px solid #888;
  box-shadow: 2px 2px 0 rgba(0,0,0,.12);
  display: block;
}
.doc-text-preview {
  white-space: pre-wrap;
  font-family: var(--platinum-font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  background: #fff;
  border: 1px solid var(--platinum-bevel-dark);
  padding: 12px 14px;
  max-height: 400px;
  overflow-y: auto;
  color: #222;
}
.doc-list-thumb {
  width: 48px;
  height: auto;
  border: 1px solid #aaa;
  vertical-align: top;
}

/* ----- Single software page ----- */
.software-detail { display: grid; grid-template-columns: 1fr; gap: 14px; }
.software-detail .specs { width: 100%; font-size: 12.5px; }
.software-detail .specs th {
  text-align: left;
  padding: 3px 10px 3px 0;
  color: var(--platinum-muted);
  font-weight: normal;
  vertical-align: top;
  width: 140px;
}
.software-detail .specs td {
  padding: 3px 0;
  vertical-align: top;
  border-bottom: 1px dotted #bbb;
}
.software-detail .abstract {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--platinum-bevel-dark);
  box-shadow: inset 0 0 0 1px #fff;
  padding: 12px 14px;
  max-height: 400px;
  overflow-y: auto;
}
.software-detail .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.software-detail h1 {
  font-family: var(--platinum-font-ui);
  font-size: 22px;
  margin-bottom: 4px;
}
.software-detail .sublabel { color: var(--platinum-muted); font-size: 12px; margin-bottom: 10px; }

/* ----- Forms (login, register, edit) ----- */
input[type=text], input[type=search], input[type=email],
input[type=password], textarea, select {
  font: 13px var(--platinum-font-body);
  padding: 3px 6px;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #888, inset -1px -1px 0 #fff;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
textarea { min-height: 80px; }
.search-box { display: flex; gap: 5px; margin-bottom: 10px; }
.search-box input { flex: 1; }

/* Contain Drupal forms in a centered window */
.user-login-form,
.user-register-form,
.user-pass {
  max-width: 400px;
  margin: 0 auto;
}
.form-item { margin-bottom: 12px; }
.form-item label {
  display: block;
  font-family: var(--platinum-font-ui);
  font-size: 12px;
  margin-bottom: 3px;
  color: #000;
}
.form-item .description {
  font-size: 11px;
  color: var(--platinum-dim);
  margin-top: 3px;
}
.form-actions { margin-top: 14px; }

/* ALTCHA widget sizing */
.captcha { margin: 14px 0; }
altcha-widget { max-width: 100%; }

/* Auth page intro text */
.auth-intro {
  color: var(--platinum-muted);
  font-size: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dotted #bbb;
}
.auth-intro > p:first-child { text-align: center; margin-top: 0; }
.auth-notice {
  margin-top: 10px;
  padding: 8px 10px;
  background: #fffbe6;
  border: 1px solid #e8dba6;
  border-radius: 4px;
  color: #4a3d00;
  text-align: left;
}
.auth-notice strong { color: #2a2200; }
.auth-notice ol { margin: 6px 0 0 18px; padding: 0; }
.auth-notice ol li { margin: 4px 0; }
.auth-notice code { background: #fff3cc; padding: 1px 4px; border-radius: 2px; }

/* Drupal status/error messages on auth pages */
[data-drupal-messages] { margin-bottom: 14px; }
[data-drupal-messages]:empty { display: none; }
[data-drupal-messages] .messages {
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid;
  font-size: 13px;
  margin-bottom: 8px;
}
[data-drupal-messages] .messages--status {
  background: #e6f4ea; border-color: #9ccbad; color: #1a4d2c;
}
[data-drupal-messages] .messages--warning {
  background: #fff8e1; border-color: #e8cf6a; color: #5a4500;
}
[data-drupal-messages] .messages--error {
  background: #fde8e8; border-color: #d99b9b; color: #6b1a1a;
}

/* ----- Pagination ----- */
.pager {
  margin-top: 18px;
  padding-top: 12px;
  text-align: center;
  font-size: 12px;
  border-top: 1px solid #bbb;
}
.pager a, .pager .current {
  display: inline-block;
  padding: 3px 10px;
  margin: 0 2px;
  font-family: var(--platinum-font-ui);
  font-size: 12px;
  min-width: 26px;
  background: linear-gradient(to bottom, #f9f9f9, #e4e4e4);
  color: #000;
  text-decoration: none;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #555;
  border-bottom: 1px solid #555;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #999;
}
.pager a:hover { background: linear-gradient(to bottom, #ffffff, #e9e9e9); }
.pager .current {
  background: linear-gradient(to bottom, #6f9ae8, #3366cc);
  color: #fff;
  border-top-color: #cbd8f2;
  border-left-color: #cbd8f2;
  border-right-color: #1e3a80;
  border-bottom-color: #1e3a80;
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}

/* ----- Footer ----- */
.page__footer {
  margin-top: 30px;
  padding: 12px 0;
  border-top: 1px solid var(--platinum-bevel-dark);
  font-size: 11px;
  color: var(--platinum-muted);
  text-align: center;
}
.page__footer a { color: var(--platinum-link); }

/* Primary local tasks (View / Edit / Delete / Revisions) — right-aligned
   folder tabs that sit flush with the top of the first content window.
   Faded by default so they don't compete with the content; brighten on
   hover so they're still one glance away. */
#block-platinum-primary-local-tasks {
  margin: 0 0 -1px 0;          /* overlap first window's top border */
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
  padding-right: 6px;
  opacity: 0.45;
  transition: opacity 150ms ease;
  /* Pin to its own row at full width so the tabs always hang on the
     right edge of the header regardless of sibling order / flex basis.
     ``order: 2`` keeps it visually below the logo when the header wraps. */
  flex: 0 0 100%;
  width: 100%;
  margin-left: auto;
  order: 2;
}
#block-platinum-primary-local-tasks:hover {
  opacity: 1;
}
#block-platinum-primary-local-tasks h2 { display: none; }
#block-platinum-primary-local-tasks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
  font-family: var(--platinum-font-ui);
  align-items: flex-end;
}
#block-platinum-primary-local-tasks li { margin: 0; padding: 0; }
#block-platinum-primary-local-tasks a {
  display: inline-block;
  padding: 6px 14px 7px;
  font-size: 12px;
  color: var(--platinum-muted);
  background: linear-gradient(to bottom, #f2f4f8 0%, #e1e6ee 100%);
  border: 1px solid var(--platinum-bevel-dark);
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  line-height: 1.2;
  transition: background 120ms ease, color 120ms ease;
}
#block-platinum-primary-local-tasks a:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #e5ecf5 100%);
  color: var(--platinum-link);
}
#block-platinum-primary-local-tasks a.is-active,
#block-platinum-primary-local-tasks li.is-active a {
  background: #f4f4f4;
  color: var(--platinum-text);
  font-weight: bold;
  padding-bottom: 8px;
  position: relative;
  top: 1px;                    /* merge into content edge */
}
.page__footer-disclaimer {
  max-width: 860px;
  margin: 10px auto 0;
  font-family: 'Tiny5', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  color: var(--platinum-muted);
}
.page__footer-disclaimer strong { color: var(--platinum-text); }

/* Rainbow logoglitch strip aligned to the .page content column — stops
   where the disclaimer line above it stops (no viewport bleed). Built
   from six individual 500×183 colored logo PNGs rendered as <img>
   children (green, yellow, orange, red, purple, blue). flex: 1 1 0 on
   each child distributes them evenly across the row; object-fit:
   contain preserves each logo's 1:1 aspect ratio so nothing stretches
   or clips regardless of container width. */
.page__footer-mpls {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  height: 36px;
  opacity: 0.9;
  transition: opacity 120ms ease;
}
.page__footer-mpls__tile {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: center center;
}
.page__footer-mpls:hover { opacity: 1; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ----- Links ----- */
a { color: var(--platinum-link); }
a:visited { color: var(--platinum-link-visited); }

/* ----- Tables ----- */
.content table {
  width: 100%;
  border: 1px solid #000;
  background: #fff;
  font-size: 12.5px;
}
.content th, .content td {
  padding: 3px 7px;
  border-bottom: 1px solid #ccc;
  text-align: left;
}
.content th {
  background: var(--platinum-window-chrome);
  border-bottom: 1px solid #000;
  font-family: var(--platinum-font-ui);
}

/* ----- Admin bleed-through ----- */
.toolbar-oriented .toolbar-bar,
.toolbar-oriented .toolbar-tray { font-family: var(--platinum-font-body); }

/* =========================================================
   Document listing (doc-row) — mobile-first flex layout
   Replaces the table on /docs/section and /docs/search
   ========================================================= */
.doc-search {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  max-width: 100%;
}
.doc-search input {
  flex: 1;
  font-size: 15px;
  padding: 7px 10px;
  min-width: 0;
}
.doc-search .btn {
  padding: 4px 18px;
  font-size: 13px;
  white-space: nowrap;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #aaa;
  border: 1px solid #888;
  margin-bottom: 12px;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: background 0.05s;
  min-height: 56px;
}
.doc-row:hover {
  background: var(--platinum-highlight);
}
.doc-row__thumb {
  flex: 0 0 48px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-row__thumb img {
  width: 48px;
  height: auto;
  max-height: 60px;
  border: 1px solid #aaa;
  display: block;
}
.doc-row__thumb-empty {
  width: 48px;
  height: 60px;
  background: var(--platinum-window-chrome);
  border: 1px solid #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--platinum-font-mono);
  font-size: 10px;
  color: var(--platinum-muted);
}
.doc-row__body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.doc-row__title {
  margin: 0 0 2px;
  font-family: var(--platinum-font-ui);
  font-size: 13.5px;
  font-weight: bold;
  color: var(--platinum-link);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.doc-row__filename {
  font-family: var(--platinum-font-mono);
  font-size: 10.5px;
  color: var(--platinum-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-row__meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--platinum-muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.doc-row__action {
  flex: 0 0 auto;
}
.doc-row__action .btn {
  padding: 4px 14px;
  font-size: 11px;
}

/* ----- Home page: featured documents feed ----- */
.home-docs__intro {
  font-size: 12.5px;
  color: var(--platinum-muted);
  margin: 0 0 10px;
}
.doc-row--feature {
  padding: 12px;
  gap: 14px;
  min-height: 96px;
  align-items: flex-start;
}
.doc-row--feature .doc-row__thumb {
  flex: 0 0 80px;
  width: 80px;
}
.doc-row--feature .doc-row__thumb img,
.doc-row--feature .doc-row__thumb-empty {
  width: 80px;
  max-height: 104px;
}
.doc-row--feature .doc-row__thumb-empty {
  height: 104px;
}
.doc-row--feature .doc-row__title {
  font-size: 15px;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.doc-row__excerpt {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #333;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* =========================================================
   Mobile: iPhone-app layout with Mac OS 9 Platinum styling
   ========================================================= */
@media (max-width: 720px) {
  html, body {
    height: 100%;
    overscroll-behavior-y: contain;
  }
  body {
    font-size: 14px;
    background-size: 3px 3px;
    padding-top: 42px;       /* space for fixed top bar */
    /* Bottom tab bar is 64px + iOS safe-area inset. Give 20px breathing
       room on top of the tab bar so the footer disclaimer and MPLS strip
       aren't tucked under the tabs. */
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 24px);
  }

  /* ===== MOBILE TOP BAR: Mac OS 9 active window title bar ===== */
  .mobile-topbar {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 42px;
    z-index: 100;
    background:
      repeating-linear-gradient(
        to bottom,
        #ffffff 0, #ffffff 1px,
        #cccccc 1px, #cccccc 2px,
        #ffffff 2px, #ffffff 3px
      );
    border-bottom: 1px solid var(--platinum-window-border);
    box-shadow:
      inset 0 1px 0 #fff,
      inset 0 -1px 0 #888,
      0 1px 0 rgba(0,0,0,.1);
    padding: 0 8px;
  }
  .mobile-topbar__logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 32px;
    margin-right: 8px;
  }
  .mobile-topbar__logo img {
    height: 28px;
    width: auto;
    display: block;
    filter: none;
  }
  .mobile-topbar__title {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-family: var(--platinum-font-ui);
    font-size: 13px;
    font-weight: bold;
    color: #000;
    background: var(--platinum-window-bg);
    padding: 3px 10px;
    border-left: 1px solid #888;
    border-right: 1px solid #888;
    box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 8px;
  }
  /* ===== MOBILE SITE MENU (Happy Mac / Finder icon button) ===== */
  .mobile-menu {
    flex: 0 0 auto;
    position: static;
  }
  .mobile-menu__trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    list-style: none;
    cursor: pointer;
    background: linear-gradient(to bottom, #f9f9f9 0%, #e4e4e4 50%, #cfcfcf 100%);
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #555;
    border-bottom: 1px solid #555;
    border-radius: 6px;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #999, 0 1px 0 rgba(0, 0, 0, 0.15);
  }
  .mobile-menu__trigger::-webkit-details-marker { display: none; }
  .mobile-menu[open] .mobile-menu__trigger {
    background: linear-gradient(to bottom, #b5b5b5, #cacaca);
    border-top-color: #555;
    border-left-color: #555;
    border-right-color: #fff;
    border-bottom-color: #fff;
  }
  .mobile-menu__panel {
    position: fixed;
    top: 42px;
    right: 0;
    left: 0;
    max-height: calc(100vh - 42px - 56px); /* leave room for bottom tab-bar */
    overflow-y: auto;
    background: var(--platinum-window-bg);
    border-top: 1px solid #888;
    border-bottom: 1px solid #555;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 #fff;
    z-index: 99;
    padding: 6px 0;
    animation: mobile-menu-slide 140ms ease-out;
  }
  @keyframes mobile-menu-slide {
    from { transform: translateY(-8px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .mobile-menu__link {
    display: block;
    padding: 12px 16px;
    color: var(--platinum-text);
    font-family: var(--platinum-font-ui);
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px dotted #bbb;
  }
  .mobile-menu__link:last-child { border-bottom: none; }
  .mobile-menu__link:active,
  .mobile-menu__link.is-active {
    background: #3366cc;
    color: #fff;
  }
  .mobile-menu__sep {
    height: 1px;
    margin: 4px 12px;
    background: #888;
  }

  /* ===== MOBILE TAB BAR: Mac OS 9 toolbox palette ===== */
  .mobile-tabbar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    z-index: 100;
    background: linear-gradient(to bottom, #e8e8e8 0%, #d0d0d0 100%);
    border-top: 1px solid var(--platinum-window-border);
    box-shadow:
      inset 0 1px 0 #fff,
      0 -2px 6px rgba(0,0,0,.15);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    text-decoration: none;
    color: var(--platinum-muted);
    font-family: var(--platinum-font-ui);
    font-size: 10px;
    position: relative;
    background: transparent;
    transition: background 0.05s;
    border-right: 1px solid rgba(0,0,0,.1);
  }
  .mobile-tab:last-child {
    border-right: 0;
  }
  .mobile-tab:active {
    background: rgba(0,0,0,.05);
  }
  .mobile-tab.is-active {
    color: #000;
    background:
      repeating-linear-gradient(
        to bottom,
        #ffffff 0, #ffffff 1px,
        #cccccc 1px, #cccccc 2px,
        #ffffff 2px, #ffffff 3px
      );
    box-shadow:
      inset 0 2px 0 var(--platinum-accent),
      inset 0 -1px 0 #888;
  }
  .mobile-tab__icon {
    width: 24px;
    height: 24px;
    display: block;
  }
  .mobile-tab__label {
    font-size: 10px;
    font-weight: normal;
    letter-spacing: -0.2px;
  }
  .mobile-tab.is-active .mobile-tab__label {
    font-weight: bold;
  }

  /* ===== HIDE DESKTOP CHROME ===== */
  .page__header,
  .page__footer,
  .sidebar {
    display: none;
  }

  /* ===== PAGE LAYOUT ===== */
  .page {
    margin: 0;
    padding: 8px;
    max-width: 100%;
  }
  .page__main {
    display: block;
    gap: 0;
  }
  .content {
    padding: 0;
  }

  /* Window chrome: lower padding on mobile */
  .window__body {
    padding: 10px 12px;
  }
  .window__title {
    font-size: 11.5px;
  }

  /* Hero */
  .hero__body {
    padding: 14px;
  }
  .hero__title {
    font-size: 17px;
    font-weight: normal;
    margin-bottom: 6px;
  }
  .hero__lede {
    font-size: 13px;
    color: #333;
  }
  .hero__search {
    margin-bottom: 14px;
  }
  .hero__search input {
    font-size: 15px;
    padding: 7px 10px;
  }
  .hero__search .btn {
    padding: 4px 18px;
  }

  /* Featured docs — magazine-style on mobile */
  .doc-row--feature {
    padding: 14px;
    gap: 12px;
    min-height: auto;
    flex-direction: row;
  }
  .doc-row--feature .doc-row__thumb {
    flex: 0 0 72px;
    width: 72px;
  }
  .doc-row--feature .doc-row__thumb img,
  .doc-row--feature .doc-row__thumb-empty {
    width: 72px;
    max-height: 96px;
  }
  .doc-row--feature .doc-row__thumb-empty {
    height: 96px;
  }
  .doc-row--feature .doc-row__title {
    font-size: 15.5px;
    line-height: 1.3;
  }
  .doc-row__excerpt {
    font-size: 12.5px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  /* Categories: 2 cols on mobile */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .category-card {
    padding: 10px 10px;
    min-height: 44px;
    font-size: 13px;
  }

  /* Software cards: single column, compact */
  .home-recent .software-list,
  .software-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .software-card {
    min-height: auto;
    max-height: none;
    padding: 10px;
  }
  .software-card .abstract {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  /* Breadcrumbs — scrollable */
  .manual-breadcrumb {
    font-size: 11.5px;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0;
  }

  /* Software detail */
  .detail-header {
    gap: 10px;
  }
  .software-detail h1 {
    font-size: 19px;
  }
  .software-detail .specs th {
    width: 100px;
    font-size: 12px;
  }
  .software-detail .specs td {
    font-size: 12.5px;
  }
  .software-detail .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .software-detail .actions .btn,
  .software-detail .actions .btn--primary {
    text-align: center;
    padding: 10px 18px;
    font-size: 14px;
  }

  /* Screenshots full-width (capped so a tall shot doesn't dwarf the page) */
  .screenshot-gallery {
    flex-direction: column;
    gap: 8px;
  }
  .screenshot-img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
  }

  /* Listing toolbar stacks */
  .listing-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .listing-toolbar .sort-controls {
    flex-wrap: wrap;
  }
  .listing-toolbar .sort-controls a {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Document rows on mobile */
  .doc-row {
    padding: 10px;
    gap: 10px;
    min-height: 72px;
  }
  .doc-row__thumb {
    flex: 0 0 56px;
    width: 56px;
  }
  .doc-row__thumb img,
  .doc-row__thumb-empty {
    width: 56px;
    max-height: 72px;
  }
  .doc-row__thumb-empty {
    height: 72px;
  }

  /* Document detail */
  .doc-thumbnail {
    margin: 0 auto 10px auto;
  }
  .doc-thumb-img {
    width: 140px;
  }
  .doc-text-preview {
    font-size: 11px;
    padding: 10px 12px;
    max-height: 300px;
  }

  /* Pager */
  .pager a, .pager .current {
    padding: 8px 12px;
    min-width: 36px;
    font-size: 13px;
  }

  /* Forms */
  .user-login-form,
  .user-register-form,
  .user-pass {
    max-width: 100%;
  }
  .form-item label {
    font-size: 13px;
  }

  /* Window chrome: lower padding on mobile */
  .window__body {
    padding: 10px 12px;
  }
  .window__title {
    font-size: 11.5px;
  }

  /* Hero */
  .hero__body {
    padding: 14px 14px;
  }
  .hero__title {
    font-size: 18px;
  }
  .hero__lede {
    font-size: 13px;
  }
  .hero__search input {
    font-size: 15px;
    padding: 7px 10px;
  }
  .hero__search .btn {
    padding: 4px 18px;
  }

  /* Reorder home page sections: docs feed first (blog vibe) */
  /* Mobile flow: docs-first blog feed, then hero/search, then programs.
     Desktop order is defined outside this media query. */
  .page__main > .content {
    display: flex;
    flex-direction: column;
  }
  .page__main > .content > * { order: 10; }
  .page__main > .content > div.featured-app { display: none; }
  .page__main > .content > div.home-docs { order: 1; margin-top: 0; }
  .page__main > .content > div.hero { order: 2; }
  .page__main > .content > div.home-recent { order: 3; }

  /* Hero is still there but secondary on mobile */
  .hero__title {
    font-size: 17px;
    font-weight: normal;
  }
  .hero__lede {
    font-size: 13px;
    color: #444;
  }

  /* Featured doc rows on mobile: full-width magazine cards */
  .doc-row--feature {
    padding: 14px;
    gap: 12px;
    min-height: auto;
    flex-direction: row;
  }
  .doc-row--feature .doc-row__thumb {
    flex: 0 0 72px;
    width: 72px;
  }
  .doc-row--feature .doc-row__thumb img,
  .doc-row--feature .doc-row__thumb-empty {
    width: 72px;
    max-height: 96px;
  }
  .doc-row--feature .doc-row__thumb-empty {
    height: 96px;
  }
  .doc-row--feature .doc-row__title {
    font-size: 15.5px;
    line-height: 1.3;
  }
  .doc-row__excerpt {
    font-size: 12.5px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  /* Categories: 2 cols on mobile, bigger touch targets */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .category-card {
    padding: 10px 10px;
    min-height: 44px;
    font-size: 13px;
  }

  /* Software card list — compact on mobile home (don't show all 12, scrollable) */
  .home-recent .software-list {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .home-recent .software-card {
    min-height: auto;
    max-height: 120px;
    padding: 10px;
  }
  .home-recent .software-card .abstract {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 12px;
  }

  /* Category/search results pages */
  .software-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .software-card {
    min-height: auto;
    max-height: none;
    padding: 10px;
  }
  .software-card .abstract {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  /* Breadcrumbs — single line scrollable */
  .manual-breadcrumb {
    font-size: 11.5px;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0;
  }

  /* Software detail — stack icon over heading */
  .detail-header {
    flex-direction: row;
    gap: 10px;
  }
  .software-detail h1 {
    font-size: 19px;
  }
  .software-detail .specs th {
    width: 100px;
    font-size: 12px;
  }
  .software-detail .specs td {
    font-size: 12.5px;
  }
  .software-detail .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .software-detail .actions .btn,
  .software-detail .actions .btn--primary {
    text-align: center;
    padding: 10px 18px;
    font-size: 14px;
  }

  /* Screenshots: one per row, full width (capped height) */
  .screenshot-gallery {
    flex-direction: column;
    gap: 8px;
  }
  .screenshot-img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
  }

  /* Listing toolbar stacks */
  .listing-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .listing-toolbar .sort-controls {
    flex-wrap: wrap;
  }
  .listing-toolbar .sort-controls a {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Document rows — stack action below meta */
  .doc-row {
    padding: 10px 10px;
    gap: 10px;
    min-height: 72px;
  }
  .doc-row__thumb {
    flex: 0 0 56px;
    width: 56px;
  }
  .doc-row__thumb img,
  .doc-row__thumb-empty {
    width: 56px;
    max-height: 72px;
  }
  .doc-row__thumb-empty {
    height: 72px;
  }
  .doc-row__title {
    font-size: 13.5px;
  }
  .doc-row__filename {
    font-size: 10.5px;
  }
  .doc-row__meta {
    font-size: 11px;
    gap: 8px;
  }
  .doc-row__action .btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Document detail page — stack thumbnail above */
  .doc-thumbnail {
    margin: 0 auto 10px auto;
  }
  .doc-thumb-img {
    width: 140px;
  }

  /* Text preview — compact */
  .doc-text-preview {
    font-size: 11px;
    padding: 10px 12px;
    max-height: 300px;
  }

  /* Pager */
  .pager a, .pager .current {
    padding: 8px 12px;
    min-width: 36px;
    font-size: 13px;
  }

  /* Forms (login/register) */
  .user-login-form,
  .user-register-form,
  .user-pass {
    max-width: 100%;
  }
  .form-item label {
    font-size: 13px;
  }

  /* Footer */
  .page__footer {
    font-size: 11px;
    padding: 14px 8px;
  }
}

/* Tablet breakpoint (721-960): sidebar still present but tighter */
@media (min-width: 721px) and (max-width: 960px) {
  .page__main {
    grid-template-columns: 180px 1fr;
    gap: 10px;
  }
  .software-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* ----- Forum archive ----- */
.forum-thread-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.forum-thread-header .window__body {
  padding: 16px 20px;
}
.forum-thread-title {
  font-family: var(--platinum-font-ui);
  font-size: 22px;
  font-weight: bold;
  color: var(--platinum-text);
  margin: 0 0 10px 0;
  line-height: 1.3;
}
.forum-thread-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--platinum-muted);
  font-family: var(--platinum-font-ui);
  padding-bottom: 10px;
  border-bottom: 1px dotted #bbb;
}
.forum-thread-meta .meta-dim { color: var(--platinum-muted); }
.forum-thread-meta .forum-badge { text-decoration: none; }
.forum-thread-original-wrap {
  margin-top: 10px;
}
.forum-thread-original {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  color: var(--platinum-link);
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #b6c1d3;
  border-radius: 3px;
  background: #eef2f7;
}
.forum-thread-original:hover {
  background: #dce4ef;
  text-decoration: none;
}
.forum-thread-original__icon { font-size: 11px; }
.forum-thread-admin {
  margin-top: 10px;
  text-align: right;
}
.manual-breadcrumb__current {
  color: var(--platinum-text);
  font-weight: bold;
}
.forum-posts-empty {
  padding: 24px 20px;
  text-align: center;
  color: var(--platinum-muted);
}
.forum-posts-empty p { margin: 6px 0; }

.forum-posts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.forum-post {
  display: grid;
  grid-template-columns: 160px 1fr;
  background: #fff;
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
}
.forum-post--op {
  border-color: #7fa9ea;
  box-shadow: 0 1px 0 rgba(127, 169, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.forum-post__author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: linear-gradient(to bottom, #f2f4f8 0%, #e4e8ef 100%);
  border-right: 1px solid #cfd5df;
  text-align: center;
}
.forum-post--op .forum-post__author {
  background: linear-gradient(to bottom, #e7efff 0%, #d2deef 100%);
  border-right-color: #7fa9ea;
}
.forum-post__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b89b0 0%, #3a5578 100%);
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.forum-post__author-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--platinum-text);
  word-break: break-word;
}
.forum-post__badge {
  font-size: 10px;
  font-weight: bold;
  color: #1a4d88;
  background: #d6e3f7;
  border: 1px solid #7fa9ea;
  border-radius: 3px;
  padding: 1px 6px;
  letter-spacing: 0.5px;
}
.forum-post__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.forum-post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: #f7f8fa;
  border-bottom: 1px solid #e0e3ea;
  font-size: 11px;
  color: var(--platinum-muted);
  font-family: var(--platinum-font-ui);
}
.forum-post__anchor {
  color: var(--platinum-link);
  text-decoration: none;
  font-weight: bold;
}
.forum-post__anchor:hover { text-decoration: underline; }
.forum-post__date { color: var(--platinum-dim); }
.forum-post__content {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--platinum-text);
  overflow-wrap: break-word;
}
.forum-post__content p { margin: 0 0 10px 0; }
.forum-post__content p:last-child { margin-bottom: 0; }
.forum-post__content blockquote {
  margin: 8px 0;
  padding: 8px 14px;
  border-left: 3px solid #bcc6d5;
  background: #f5f7fa;
  color: #4a5568;
  font-size: 13px;
}
.forum-post__content pre, .forum-post__content code {
  background: #f3f4f6;
  border: 1px solid #e0e3ea;
  border-radius: 3px;
  padding: 1px 4px;
  font-family: Menlo, Consolas, monospace;
  font-size: 12px;
}
.forum-post__content pre { padding: 8px 10px; overflow-x: auto; }
.forum-post__content img { max-width: 100%; height: auto; }

/* Per-forum badge colors */
.forum-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  border-radius: 3px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.forum-badge--macnn           { background: #2956a3; }
.forum-badge--macfixit        { background: #c73a2d; }
.forum-badge--appledboards,
.forum-badge--appledisc,
.forum-badge--applediscussionboards { background: #555; }
.forum-badge--68kmla          { background: #c46a1a; }
.forum-badge--applefritter    { background: #7a4ba0; }
.forum-badge--macos9lives     { background: #1f7a4a; }
.forum-badge--other           { background: #6b7280; }

a.forum-badge { text-decoration: none; color: #fff; }
a.forum-badge:hover { opacity: 0.9; }

/* ----- Forum source page header ----- */
.forum-source-header {
  margin-bottom: 14px;
}
.forum-source-header__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.forum-source-header__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.forum-source-header__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--platinum-text);
}
.forum-source-header__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--platinum-muted);
}
.forum-source-header__stats strong {
  color: var(--platinum-text);
  font-variant-numeric: tabular-nums;
}
.forum-source-header__stats .sep { color: #c6ccd6; }
.forum-source-header__all {
  color: var(--platinum-link);
  text-decoration: none;
  margin-left: auto;
}
.forum-source-header__all:hover { text-decoration: underline; }
.forum-source-header__desc {
  margin: 0;
  color: var(--platinum-muted);
  font-size: 13px;
}

/* ----- Forum category pill filter row ----- */
.forum-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin: 0 0 14px 0;
  padding: 0;
  max-width: 100%;
}
.forum-category-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2a3f;
  background: #eef1f5;
  border: 1px solid #c6ccd6;
  border-radius: 14px;
  text-decoration: none;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease;
}
.forum-category-pill:hover {
  background: #fff;
  border-color: #7fa9ea;
  color: #1a5fb4;
  text-decoration: none;
}
.forum-category-pill.is-active {
  background: var(--platinum-link, #1a5fb4);
  border-color: var(--platinum-link, #1a5fb4);
  color: #fff;
}
.forum-category-pill.is-active:hover {
  background: #153f7a;
  color: #fff;
}
/* Category accent colors — saturated fills as accents; subtle on default
   pills (left border), strong when active. */
.forum-category-pill--hardware     { border-left: 3px solid #c46a1a; }
.forum-category-pill--networking   { border-left: 3px solid #2956a3; }
.forum-category-pill--os-9,
.forum-category-pill--os-8         { border-left: 3px solid #1f7a4a; }
.forum-category-pill--68k          { border-left: 3px solid #7a4ba0; }
.forum-category-pill--powerpc      { border-left: 3px solid #c73a2d; }
.forum-category-pill--software     { border-left: 3px solid #4a8a3a; }
.forum-category-pill--games        { border-left: 3px solid #d99a1a; }
.forum-category-pill--development  { border-left: 3px solid #5a6b8a; }
.forum-category-pill--peripherals  { border-left: 3px solid #8a7a4a; }
.forum-category-pill--troubleshooting { border-left: 3px solid #a33a3a; }

.forum-advanced-filters {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--platinum-muted);
}
.forum-advanced-filters > summary {
  cursor: pointer;
  padding: 4px 8px;
}
.forum-advanced-filters > summary:hover { color: var(--platinum-link); }

/* ----- Forum browser thread card ----- */
.forum-browser-thread {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d8dde6;
  border-left: 3px solid #d8dde6;
  border-radius: 4px;
  margin-bottom: 6px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.forum-browser-thread:hover {
  border-color: #7fa9ea;
  border-left-color: var(--platinum-link);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  background: #f8fbff;
}
.forum-browser-thread__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.forum-browser-thread__title-row {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}
.forum-browser-thread__title-row a {
  color: var(--platinum-text);
  text-decoration: none;
}
.forum-browser-thread__title-row a:hover {
  color: var(--platinum-link);
  text-decoration: underline;
}
.forum-browser-thread__sub {
  font-size: 12px;
  color: var(--platinum-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.forum-browser-thread__sub strong { color: var(--platinum-text); }
.forum-browser-thread__sub .meta-dim { color: var(--platinum-muted); }
.forum-browser-thread__excerpt {
  font-size: 13px;
  line-height: 1.45;
  color: var(--platinum-muted);
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----- Forum browser pager: force single horizontal row ----- */
.forum-browser__pager .pager,
.forum-browser__pager nav.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 18px 0 0 0;
  padding: 8px;
  flex-wrap: wrap;
  list-style: none;
}
.forum-browser__pager .pager__items {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.forum-browser__pager .pager__item { margin: 0; padding: 0; list-style: none; }
.forum-browser__pager .pager__item a,
.forum-browser__pager .pager__item.is-active a,
.forum-browser__pager .pager__item--current,
.forum-browser__pager .pager__item span {
  display: inline-block;
  min-width: 28px;
  padding: 4px 8px;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 3px;
  background: linear-gradient(to bottom, #fff 0%, #e8e8e8 50%, #cfcfcf 100%);
  color: var(--platinum-text);
  text-decoration: none;
}
.forum-browser__pager .pager__item a:hover {
  background: linear-gradient(to bottom, #fff, #d8e6ff);
}
.forum-browser__pager .pager__item--current span,
.forum-browser__pager .pager__item.is-active a {
  background: var(--platinum-link);
  color: #fff;
  border-color: #153f7a;
  font-weight: bold;
}

/* ----- Forum sidebar (communities + categories + recent) ----- */
.forum-sidebar { display: flex; flex-direction: column; gap: 10px; }
.forum-sidebar__window .window__body { padding: 8px 10px; }

.forum-sidebar__sources { list-style: none; margin: 0; padding: 0; }
.forum-sidebar__source { margin: 0; }
.forum-sidebar__source a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 12px;
  color: var(--platinum-text, #1f2a3f);
}
.forum-sidebar__source a:hover { background: #f1f5fb; }
.forum-sidebar__source.is-active a {
  background: linear-gradient(to bottom, #ffffff 0%, #dce4ef 100%);
  border: 1px solid var(--platinum-bevel-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.forum-sidebar__source .forum-badge { font-size: 10px; padding: 2px 6px; }
.forum-sidebar__source-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--platinum-text, #1f2a3f);
  white-space: nowrap;
}
.forum-sidebar__all a {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #e1e6ee;
  font-weight: 600;
  color: var(--platinum-link, #1a5fb4);
}

.forum-sidebar__categories {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.forum-sidebar__categories > li { margin: 0; }
.forum-sidebar__cat {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2a3f;
  background: #eef1f5;
  border: 1px solid #c6ccd6;
  border-radius: 12px;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.forum-sidebar__cat:hover {
  background: #fff;
  border-color: #7fa9ea;
  color: #1a5fb4;
  text-decoration: none;
}
.forum-sidebar__cat.is-active {
  background: var(--platinum-link, #1a5fb4);
  border-color: var(--platinum-link, #1a5fb4);
  color: #fff;
}
.forum-sidebar__cat--hardware     { border-left: 3px solid #c46a1a; }
.forum-sidebar__cat--networking   { border-left: 3px solid #2956a3; }
.forum-sidebar__cat--os-9,
.forum-sidebar__cat--os-8         { border-left: 3px solid #1f7a4a; }
.forum-sidebar__cat--68k          { border-left: 3px solid #7a4ba0; }
.forum-sidebar__cat--powerpc      { border-left: 3px solid #c73a2d; }
.forum-sidebar__cat--software     { border-left: 3px solid #4a8a3a; }
.forum-sidebar__cat--games        { border-left: 3px solid #d99a1a; }
.forum-sidebar__cat--development  { border-left: 3px solid #5a6b8a; }
.forum-sidebar__cat--peripherals  { border-left: 3px solid #8a7a4a; }
.forum-sidebar__cat--troubleshooting { border-left: 3px solid #a33a3a; }

.forum-sidebar__recent { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.forum-sidebar__recent > li {
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid #e1e6ee;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.forum-sidebar__recent > li:last-child { border-bottom: 0; }
.forum-sidebar__recent-src .forum-badge { font-size: 9.5px; padding: 1px 5px; }
.forum-sidebar__recent-title {
  color: var(--platinum-text, #1f2a3f);
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.forum-sidebar__recent-title:hover {
  color: var(--platinum-link, #1a5fb4);
  text-decoration: underline;
}

/* ----- Forum search results ----- */
.archive-search-result {
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
}
.archive-search-result:hover {
  background: #f5f8fc;
  border-color: #7fa9ea;
}
.archive-search-result__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: bold;
}
.archive-search-result__title a {
  color: var(--platinum-link);
  text-decoration: none;
}
.archive-search-result__title a:hover { text-decoration: underline; }
.archive-search-result__excerpt {
  font-size: 13px;
  color: var(--platinum-text);
  line-height: 1.5;
  margin: 6px 0 8px;
}
.archive-search-result__excerpt em,
.archive-search-result__excerpt strong {
  background: #fff5cc;
  padding: 0 2px;
  font-style: normal;
  font-weight: bold;
}
.archive-search-result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--platinum-muted);
  font-family: var(--platinum-font-ui);
}
.archive-search-result__meta .meta-dim { color: var(--platinum-dim); }

/* Preview-only body text in search results (no search query, no highlight). */
.archive-search-result__excerpt--preview {
  color: var(--platinum-dim);
  font-style: italic;
}
.archive-search-result__excerpt em, .archive-search-result__excerpt strong {
  background: #fff5cc;
  padding: 0 2px;
  font-style: normal;
  font-weight: bold;
}

/* Drupal's full pager (used by archive_search view) — center + enlarge so
   pagination isn't easy to miss at the bottom of the results list. */
.view-archive-search .pager,
.view-archive-search nav.pager,
.view-archive-search .pager__items,
.view-archive-search ul.pager__items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 24px 0 12px;
  padding: 0;
  font-family: var(--platinum-font-ui);
  font-size: 14px;
}
.view-archive-search .pager__item,
.view-archive-search li.pager__item { margin: 0; padding: 0; }
.view-archive-search .pager__item a,
.view-archive-search .pager__item span {
  display: inline-block;
  min-width: 38px;
  padding: 7px 12px;
  text-align: center;
  color: var(--platinum-text);
  background: linear-gradient(to bottom, #ffffff 0%, #e8e8e8 50%, #cfcfcf 100%);
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 0 rgba(0, 0, 0, 0.08);
  text-decoration: none;
  font-weight: bold;
}
.view-archive-search .pager__item a:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #d8e6ff 50%, #b8cdf0 100%);
  color: var(--platinum-link);
}
.view-archive-search .pager__item.is-active span,
.view-archive-search .pager__item--current span {
  background: linear-gradient(to bottom, #b8cdf0 0%, #7fa9ea 100%);
  color: #fff;
  border-color: #3366cc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Exposed filter form on /archive/search — tidy up the inputs */
.view-archive-search .views-exposed-form {
  padding: 12px 14px;
  background: var(--platinum-window-bg);
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}
.view-archive-search .views-exposed-form .form-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.view-archive-search .views-exposed-form label {
  font-size: 11px;
  color: var(--platinum-muted);
  font-family: var(--platinum-font-ui);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.view-archive-search .views-exposed-form input[type="text"],
.view-archive-search .views-exposed-form input[type="search"],
.view-archive-search .views-exposed-form select {
  padding: 6px 10px;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 3px;
  box-shadow: inset 1px 1px 0 #cdd5e0;
  min-width: 160px;
}
/* Hide the "Is between / Min / Max" date filter clutter — ugly and confusing.
   The date_range facet in the sidebar serves the same purpose cleanly. */
.view-archive-search .views-exposed-form .form-item-date-wrapper,
.view-archive-search .views-exposed-form .form-item-date,
.view-archive-search .views-exposed-form .form-item-date-1,
.view-archive-search .views-exposed-form [data-drupal-selector^="edit-date"] {
  display: none !important;
}

/* ----- Forum INDEX — hero + source cards + recent activity ----- */
.forum-index { display: flex; flex-direction: column; gap: 14px; }
.forum-index__hero .window__body {
  padding: 18px 20px;
}
.forum-index__lede {
  font-size: 14px;
  color: var(--platinum-text);
  margin: 0 0 14px 0;
  line-height: 1.5;
}
.forum-index__stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dotted #bbb;
}
.forum-stat { text-align: left; }
.forum-stat__num {
  font-size: 26px;
  font-weight: bold;
  color: var(--platinum-text);
  font-family: var(--platinum-font-ui);
  line-height: 1;
}
.forum-stat__label {
  font-size: 11px;
  color: var(--platinum-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.forum-source-list { display: flex; flex-direction: column; gap: 8px; }
.forum-source-card {
  display: block;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
  text-decoration: none;
  color: var(--platinum-text);
  transition: background 100ms ease, border-color 100ms ease;
}
.forum-source-card:hover {
  background: #f5f8fc;
  border-color: #7fa9ea;
}
/* Featured (largest) source — dominant visual weight on the index. */
.forum-source-card--featured {
  padding: 18px 20px;
  background: linear-gradient(to bottom, #ffffff 0%, #eef2f7 100%);
  border-width: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.forum-source-card--featured .forum-source-card__head .forum-badge {
  font-size: 13px;
  padding: 3px 10px;
}
.forum-source-card--featured .forum-source-card__count {
  font-size: 13px;
  font-weight: bold;
  color: var(--platinum-text);
}
.forum-source-card--featured .forum-source-card__desc {
  font-size: 14px;
}
.forum-source-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.forum-source-card__count {
  font-size: 12px;
  color: var(--platinum-muted);
  font-family: var(--platinum-font-ui);
  margin-left: auto;
}
.forum-source-card__desc {
  font-size: 13px;
  color: var(--platinum-text);
  margin: 4px 0;
  line-height: 1.4;
}
.forum-source-card__meta {
  font-size: 11px;
  color: var(--platinum-dim);
  font-family: var(--platinum-font-ui);
  margin-top: 4px;
}
.forum-source-card__meta .meta-dim { color: var(--platinum-muted); }

.forum-recent-list { list-style: none; margin: 0; padding: 0; }
.forum-recent-list li {
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dotted #ddd;
}
.forum-recent-list li:last-child { border-bottom: none; }
.forum-recent-list__src {
  display: inline-block;
  min-width: 120px;
  font-size: 11px;
  color: var(--platinum-muted);
  font-family: var(--platinum-font-ui);
}
.forum-recent-list li a {
  color: var(--platinum-link);
  text-decoration: none;
}
.forum-recent-list li a:hover { text-decoration: underline; }

.forum-search-form { display: flex; gap: 8px; }
.forum-search-form__input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 1px 1px 0 #cdd5e0;
}

/* Forum browser / archive listing */
.forum-browser-thread {
  display: block;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid var(--platinum-bevel-dark);
  border-radius: 4px;
}
.forum-browser-thread:hover {
  background: #f5f8fc;
  border-color: #7fa9ea;
}
.forum-browser-thread__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}
.forum-browser-thread__title-row a {
  color: var(--platinum-link);
  text-decoration: none;
  font-weight: bold;
}
.forum-browser-thread__title-row a:hover { text-decoration: underline; }
.forum-browser-thread__sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--platinum-muted);
  font-family: var(--platinum-font-ui);
}
.forum-browser-thread__sub .meta-dim { color: var(--platinum-dim); }

@media (max-width: 720px) {
  .forum-post {
    grid-template-columns: 1fr;
  }
  .forum-post__author {
    flex-direction: row;
    justify-content: flex-start;
    padding: 8px 12px;
    border-right: none;
    border-bottom: 1px solid #cfd5df;
  }
  .forum-post__avatar {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  .forum-thread-original { margin-left: 0; }
}

/* ----- Print ----- */
@media print {
  .sidebar, .page__header, .page__footer { display: none; }
  .window, .software-card { box-shadow: none; border-color: #888; }
}

/* ===== Software page enrichment: related apps + forum mentions ===== */
.forum-mentions { margin: 0; padding-left: 18px; }
.forum-mentions li { margin: 4px 0; font-size: 13px; line-height: 1.4; }
.related-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.related-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 112px;
  padding: 8px 6px;
  border: 1px solid #c6ccd6;
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  text-align: center;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.related-app:hover {
  border-color: #7fa9ea;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.related-app__icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f1f1ef;
  border-radius: 4px;
}
.related-app__icon--empty { background: linear-gradient(135deg, #dcdcd8, #bfc2c6); }
.related-app__title {
  width: 100%;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Specs table OS + Arch pills */
.specs .os-tag,
.specs .arch {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 4px;
  border: 1px solid #c6ccd6;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  background: linear-gradient(to bottom, #f6f8fa 0%, #e8eaed 100%);
  color: #1f2a3f;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.specs .os-tag { background: linear-gradient(to bottom, #e6f2fb, #c9e1f2); border-color: #a8c9e8; }

/* mg-meta + mg-curator blocks in abstract */
.abstract .mg-meta {
  margin: 0 0 6px 0;
  padding-bottom: 6px;
  border-bottom: 1px dashed #c6ccd6;
  color: var(--platinum-muted);
}
.abstract .mg-curator {
  margin: 6px 0 12px 0;
  padding: 4px 10px;
  background: #fff8d9;
  border-left: 2px solid #d4a500;
  color: #574200;
  font-style: italic;
}
.abstract .wd-meta { margin: 0 0 6px 0; color: var(--platinum-muted); }

.abstract .mac-abstract-attribution {
  margin: 8px 0 0 0;
  padding-top: 6px;
  border-top: 1px dotted var(--platinum-muted, #888);
  font-size: 0.85em;
  color: var(--platinum-muted, #666);
}
.abstract .mac-abstract-attribution a { color: inherit; text-decoration: underline; }

/* ===== Document rendering: image / tiff / binary / text variants ===== */
.document-detail .doc-thumbnail--placeholder,
.document-detail .doc-thumbnail--inline {
  flex-shrink: 0;
  align-self: flex-start;
}
.document-detail .doc-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 120px;
  background: linear-gradient(135deg, #f3f3f0, #d8d8d2);
  border: 1px solid #a8a8a2;
  border-radius: 4px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.6), 2px 2px 3px rgba(0, 0, 0, 0.12);
}
.document-detail .doc-thumb-img--inline {
  max-width: 96px;
  max-height: 120px;
  height: auto;
  border: 1px solid #a8a8a2;
  background: #fff;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.15);
}

/* Inline image preview in its own window */
.doc-image-wrap {
  text-align: center;
  padding: 16px !important;
}
.doc-image-link { display: inline-block; max-width: 100%; }
.doc-image-full {
  max-width: 100%;
  height: auto;
  border: 1px solid #a8a8a2;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.doc-image-caption {
  margin: 10px 0 0 0;
  font-size: 11px;
  color: var(--platinum-muted);
}

/* Verbatim text content (for .txt / .log / source files) */
.doc-text-verbatim {
  margin: 0;
  padding: 12px 14px;
  background: #f8f7f2;
  border: 1px solid #c6ccd6;
  border-radius: 4px;
  font-family: "Menlo", "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 640px;
  overflow-y: auto;
  color: #222;
}

/* bump 1776702622 */

/* Classic welcome slider on homepage.
   Horizontal sliding transition between two banners.
   Both are 478x105. */

.classic-banner-window > .window__body {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
}

.classic-banner-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 5px 0;
}

.classic-banner-slider {
  position: relative;
  width: 478px;
  max-width: 100%;
  aspect-ratio: 478 / 105;
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
}

.classic-banner-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.classic-banner-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
}

/* Slide animation: 8s cycle (4s each) */
.classic-banner-item--classic {
  animation: classic-banner-slide-a 10s ease-in-out infinite;
}
.classic-banner-item--aim {
  animation: classic-banner-slide-b 10s ease-in-out infinite;
}

@keyframes classic-banner-slide-a {
  0%, 45% { transform: translateX(0); }
  50%, 95% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

@keyframes classic-banner-slide-b {
  0%, 45% { transform: translateX(100%); }
  50%, 95% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* Respect reduced-motion preference: stop the slide, show banner A only. */
@media (prefers-reduced-motion: reduce) {
  .classic-banner-item { animation: none; }
  .classic-banner-item--classic { transform: translateX(0); opacity: 1; z-index: 2; }
  .classic-banner-item--aim { opacity: 0; z-index: 1; }
}

