/* siteapp404 - SharpSheet.
   The scraped reference (thegruelingtruth.com) is a news-style betting guide:
   a charcoal utility band (#25262b / #0d0e13) over a white canvas, one
   signature crimson (#c80d30) used for rules, the newsletter block and every
   call to action, a soft #fafafa for secondary surfaces, 4px corners and
   Roboto for headings. The site runs a topic icon row, a logo row, a
   category menu, a Top 10s / Latest / Most Read triptych, review blocks and a
   red newsletter band above a grouped footer.
   This stylesheet keeps that reading for an APK directory: the same charcoal
   top band, white logo row, crimson plates, triptych board, newsletter band
   and grouped footer columns, with a night repaint under
   [data-p404-mode="dark"]. Every rule is scoped under the p404 prefix so the
   file only ever affects this template. */

@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("../siteapp/fontawesome/webfonts/fa-solid-900.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../siteapp/fontawesome/webfonts/fa-regular-400.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../siteapp/fontawesome/webfonts/fa-brands-400.woff2") format("woff2");
}
.fa-solid { font-weight: 900; }

:root {
  --p404-canvas: #ffffff;
  --p404-surface: #ffffff;
  --p404-surface-2: #fafafa;
  --p404-wash: #fdf0f2;
  --p404-ink: #25262b;
  --p404-ink-soft: #414349;
  --p404-muted: #6f7078;
  --p404-faint: #9b9ca4;
  --p404-line: #e7e7ea;
  --p404-line-strong: #d5d5da;
  --p404-brand: #c80d30;
  --p404-brand-deep: #9b0a25;
  --p404-brand-wash: #fdf0f2;
  --p404-brand-grad: linear-gradient(135deg, #9b0a25 0%, #c80d30 100%);
  --p404-head: #25262b;
  --p404-head-2: #0d0e13;
  --p404-star: #ffb400;
  --p404-shadow: 0 10px 26px rgba(37, 38, 43, .10);
  --p404-shadow-sm: 0 3px 10px rgba(37, 38, 43, .08);
  --p404-radius: 4px;
  --p404-radius-sm: 4px;
  --p404-body: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

[data-p404-mode='dark'] {
  --p404-canvas: #0d0e13;
  --p404-surface: #17181e;
  --p404-surface-2: #1e1f27;
  --p404-wash: #241419;
  --p404-ink: #eceef2;
  --p404-ink-soft: #c9ccd4;
  --p404-muted: #9b9ca4;
  --p404-faint: #6f7078;
  --p404-line: #272931;
  --p404-line-strong: #363945;
  --p404-brand: #e02449;
  --p404-brand-deep: #ff5a78;
  --p404-brand-wash: #2a151b;
  --p404-brand-grad: linear-gradient(135deg, #7a0820 0%, #d81236 100%);
  --p404-head: #eceef2;
  --p404-head-2: #08090c;
  --p404-star: #ffb400;
  --p404-shadow: 0 10px 26px rgba(0, 0, 0, .55);
  --p404-shadow-sm: 0 3px 10px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.p404-body {
  margin: 0;
  background: var(--p404-canvas);
  color: var(--p404-ink);
  font-family: var(--p404-body);
  font-size: 14.5px;
  line-height: 1.75;
}
.p404-body a { color: var(--p404-brand); text-decoration: none; }
.p404-body a:hover { color: var(--p404-brand-deep); }
.p404-body img { max-width: 100%; height: auto; }
.p404-body h1, .p404-body h2, .p404-body h3, .p404-body h4 {
  font-family: Roboto, var(--p404-body);
  color: var(--p404-head);
  line-height: 1.3;
  margin: 0 0 .5em;
  font-weight: 700;
}
.p404-body p { margin: 0 0 1em; }
.p404-body ul, .p404-body ol { margin: 0 0 1em; padding-left: 1.25em; }

.p404-wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }

.p404-skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--p404-brand); color: #ffffff; padding: 10px 16px;
}
.p404-skip:focus { left: 0; color: #ffffff; }

/* ---------- utility band (the reference's topic + social row) ---------- */
.p404-utility {
  background: var(--p404-head-2);
  font-size: 12.5px; color: #b9bcc6;
}
.p404-utility-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 8px 0; flex-wrap: wrap;
}
.p404-utility-topics { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.p404-utility-topics a { color: #b9bcc6; display: inline-flex; align-items: center; gap: 6px; }
.p404-utility-topics a:hover { color: #ffffff; }
.p404-utility-topics i { color: var(--p404-brand); }
.p404-utility-side { display: flex; align-items: center; gap: 14px; }
.p404-utility-social { display: flex; align-items: center; gap: 10px; }
.p404-utility-social a { color: #b9bcc6; font-size: 13px; }
.p404-utility-social a:hover { color: var(--p404-brand); }
.p404-utility-locale {
  display: inline-flex; align-items: center; gap: 6px; color: #b9bcc6;
  border-left: 1px solid #2b2d35; padding-left: 14px;
}

/* ---------- masthead (logo row) ---------- */
.p404-header {
  background: var(--p404-surface);
  border-bottom: 1px solid var(--p404-line);
  position: sticky; top: 0; z-index: 60;
}
.p404-header-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: flex; align-items: center; gap: 18px; padding: 14px 0;
}
.p404-brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.p404-brand-mark {
  width: 42px; height: 42px; overflow: hidden; flex: 0 0 42px;
  background: var(--p404-brand);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--p404-radius);
}
.p404-brand-mark img { display: block; width: 42px; height: 42px; }
.p404-brand-word {
  font-weight: 700; font-size: 24px; color: var(--p404-head);
  letter-spacing: -.6px; font-family: Roboto, var(--p404-body);
}
.p404-brand-sub {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--p404-brand); font-weight: 700;
  padding-left: 11px; margin-left: 3px; border-left: 1px solid var(--p404-line-strong);
}

/* The reference keeps its search field inside the logo row. */
.p404-headsearch {
  flex: 1 1 auto; max-width: 430px; position: relative;
  display: flex; align-items: center;
}
.p404-headsearch i {
  position: absolute; left: 14px; color: var(--p404-faint); font-size: 13px;
  pointer-events: none;
}
.p404-headsearch input {
  width: 100%; border: 1px solid var(--p404-line-strong);
  background: var(--p404-surface-2); color: var(--p404-ink);
  padding: 10px 16px 10px 38px; font: inherit; font-size: 13.5px;
  border-radius: var(--p404-radius);
}
.p404-headsearch input:focus {
  outline: none; border-color: var(--p404-brand);
  background: var(--p404-surface);
  box-shadow: 0 0 0 3px var(--p404-brand-wash);
}

.p404-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.p404-switch {
  display: inline-flex; border: 1px solid var(--p404-line-strong);
  overflow: hidden; background: var(--p404-surface-2);
  border-radius: 18px;
}
.p404-switch-seg {
  padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--p404-muted);
  border-radius: 16px;
}
.p404-switch-seg.is-active { background: var(--p404-brand); color: #ffffff; }
.p404-mode {
  width: 36px; height: 36px; cursor: pointer; border-radius: 50%;
  border: 1px solid var(--p404-line-strong); background: var(--p404-surface-2);
  color: var(--p404-ink-soft); font-size: 13px;
}
.p404-mode:hover { color: #ffffff; border-color: var(--p404-brand); background: var(--p404-brand); }
.p404-burger {
  display: none; width: 40px; height: 40px; cursor: pointer;
  border-radius: var(--p404-radius);
  border: 1px solid var(--p404-line-strong); background: var(--p404-surface-2);
  color: var(--p404-ink); font-size: 15px;
}

/* ---------- category menu row ---------- */
.p404-nav { border-top: 1px solid var(--p404-line); background: var(--p404-surface); }
.p404-nav-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; scrollbar-width: thin;
}
.p404-nav-link {
  padding: 12px 14px; font-size: 13px; font-weight: 600;
  color: var(--p404-ink-soft); white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.p404-nav-link:hover { color: var(--p404-brand); }
.p404-nav-link.is-active { color: var(--p404-brand); border-bottom-color: var(--p404-brand); }

/* ---------- hero (crimson stage) ---------- */
.p404-hero {
  background: var(--p404-brand-grad);
  border-bottom: 1px solid var(--p404-line);
}
.p404-hero-in {
  display: grid; grid-template-columns: 1fr 320px; gap: 34px;
  align-items: center; padding: 48px 0 44px;
}
.p404-hero-kicker {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: #ffffff;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .32);
  padding: 5px 13px; margin-bottom: 14px; border-radius: var(--p404-radius);
}
.p404-body .p404-hero-h1 {
  font-size: clamp(32px, 4.8vw, 52px); font-weight: 700; letter-spacing: -1px;
  margin: 0 0 10px; color: #ffffff;
}
.p404-hero-lead { color: rgba(255, 255, 255, .9); font-size: 15px; max-width: 60ch; }
.p404-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 18px; }
.p404-hero-marks {
  list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255, 255, 255, .85);
}
.p404-hero-marks i { color: #ffffff; margin-right: 5px; }

.p404-exhibit {
  margin: 0; background: var(--p404-surface); border: 1px solid var(--p404-line);
  border-top: 3px solid var(--p404-brand);
  padding: 16px; box-shadow: var(--p404-shadow-sm); position: relative;
  border-radius: var(--p404-radius);
}
.p404-exhibit-tag {
  position: absolute; top: -11px; left: 18px; background: var(--p404-head);
  color: #ffffff; font-size: 11px; font-weight: 700; padding: 4px 12px;
  letter-spacing: .6px; border-radius: var(--p404-radius);
}
.p404-exhibit-shot {
  display: flex; align-items: center; justify-content: center;
  height: 148px; background: var(--p404-surface-2);
  border: 1px solid var(--p404-line); margin-bottom: 12px; overflow: hidden;
  border-radius: var(--p404-radius);
}
.p404-exhibit-shot img { width: 104px; height: 104px; object-fit: contain; }
.p404-exhibit figcaption b {
  display: block; font-size: 15.5px; color: var(--p404-head); margin-bottom: 4px;
}
.p404-exhibit figcaption span { font-size: 12.5px; color: var(--p404-muted); }
.p404-exhibit figcaption i { font-style: normal; margin-left: 10px; }

/* ---------- buttons ---------- */
.p404-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 28px; font-weight: 700; font-size: 13.5px; letter-spacing: .2px;
  border: 1px solid transparent; cursor: pointer;
  border-radius: var(--p404-radius);
  transition: background .12s ease, color .12s ease;
}
.p404-btn.is-brand { background: var(--p404-brand); color: #ffffff; box-shadow: var(--p404-shadow-sm); }
.p404-btn.is-brand:hover { background: var(--p404-brand-deep); color: #ffffff; }
.p404-btn.is-ghost { background: transparent; border-color: var(--p404-line-strong); color: var(--p404-ink); }
.p404-btn.is-ghost:hover { border-color: var(--p404-brand); color: var(--p404-brand); background: var(--p404-brand-wash); }
.p404-hero .p404-btn.is-ghost { border-color: rgba(255, 255, 255, .6); color: #ffffff; }
.p404-hero .p404-btn.is-ghost:hover {
  border-color: #ffffff; color: #ffffff; background: rgba(255, 255, 255, .14);
}
.p404-hero .p404-btn.is-brand { background: #ffffff; color: var(--p404-brand-deep); }
.p404-hero .p404-btn.is-brand:hover { background: #ffffff; color: var(--p404-brand); }

/* ---------- category ribbon ---------- */
.p404-ribbon { background: var(--p404-surface); border-bottom: 1px solid var(--p404-line); }
.p404-ribbon-in {
  display: flex; align-items: center; gap: 6px; padding: 11px 0;
  overflow-x: auto; scrollbar-width: thin;
}
.p404-ribbon-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--p404-muted); white-space: nowrap; padding-right: 10px;
}
.p404-ribbon-link {
  font-size: 13px; font-weight: 600; color: var(--p404-ink-soft);
  padding: 6px 13px; white-space: nowrap; border: 1px solid var(--p404-line);
  background: var(--p404-surface-2); border-radius: var(--p404-radius);
}
.p404-ribbon-link:hover { color: var(--p404-brand); border-color: var(--p404-brand); }
.p404-ribbon-link.is-active { background: var(--p404-brand); border-color: var(--p404-brand); color: #ffffff; }

/* ---------- frame ---------- */
.p404-frame {
  display: grid; grid-template-columns: 1fr 316px; gap: 26px;
  align-items: start; padding: 26px 0 48px;
}
.p404-maincol { min-width: 0; }

.p404-block { margin-bottom: 34px; }
.p404-block-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px; padding-bottom: 9px;
  border-bottom: 2px solid var(--p404-line); position: relative; flex-wrap: wrap;
}
.p404-block-head::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 76px; height: 3px;
  background: var(--p404-brand);
}
.p404-block-title {
  font-size: 20px; font-weight: 700; margin: 0; position: relative; padding-left: 15px;
  color: var(--p404-head); letter-spacing: -.2px;
}
.p404-block-title::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--p404-brand);
}
.p404-block-note { font-size: 12.5px; color: var(--p404-muted); }
.p404-block-more { font-size: 13px; font-weight: 700; color: var(--p404-brand); }

.p404-filter-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; background: var(--p404-brand-wash); border: 1px solid var(--p404-line);
  border-left: 4px solid var(--p404-brand); padding: 12px 16px; font-size: 13.5px;
  margin-bottom: 20px; color: var(--p404-ink); border-radius: var(--p404-radius);
}
.p404-filter-note a { font-weight: 700; color: var(--p404-brand); }

/* ---------- triptych board (the reference's Top 10s / Latest / Most Read) ---------- */
.p404-triptych {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  margin-bottom: 34px;
}
.p404-triptych-col {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  border-top: 3px solid var(--p404-brand); padding: 16px;
  border-radius: var(--p404-radius); min-width: 0;
}
.p404-triptych-title {
  font-size: 16px; font-weight: 700; margin: 0 0 12px; position: relative;
  padding-bottom: 9px; border-bottom: 1px solid var(--p404-line);
  color: var(--p404-head);
}
.p404-triptych-title i { color: var(--p404-brand); margin-right: 6px; }

/* ---------- grid + card ---------- */
.p404-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 14px;
}
.p404-card {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  border-left: 3px solid var(--p404-brand);
  border-radius: var(--p404-radius); overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.p404-card:hover { box-shadow: var(--p404-shadow); transform: translateY(-2px); }
.p404-card-link { display: flex; gap: 12px; padding: 14px; color: var(--p404-ink); }
.p404-card-link:hover { color: var(--p404-ink); }
.p404-card-icon {
  width: 56px; height: 56px; flex: 0 0 56px;
  background: var(--p404-surface-2); border: 1px solid var(--p404-line);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--p404-brand); font-size: 20px; border-radius: var(--p404-radius);
}
.p404-card-icon img { width: 44px; height: 44px; object-fit: contain; }
.p404-card-body { min-width: 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.p404-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.p404-card-cat {
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--p404-brand-deep); background: var(--p404-brand-wash);
  padding: 2px 9px; white-space: nowrap; border-radius: var(--p404-radius);
  overflow: hidden; text-overflow: ellipsis; max-width: 62%;
}
.p404-card-ver { font-size: 11.5px; color: var(--p404-faint); }
.p404-card-title {
  font-size: 15.5px; font-weight: 700; margin: 0 0 6px; line-height: 1.35;
  color: var(--p404-head);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p404-card-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 12.5px;
}
.p404-card-rate { color: var(--p404-brand); font-weight: 700; }
.p404-card-rate i { color: var(--p404-star); }
.p404-card-more { color: var(--p404-muted); white-space: nowrap; }

/* ---------- right rail ---------- */
.p404-rail { min-width: 0; }
.p404-rail-box {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  padding: 16px; margin-bottom: 16px; border-radius: var(--p404-radius);
}
.p404-rail-box.is-brand { border-left: 3px solid var(--p404-brand); }
.p404-rail-title {
  font-size: 15.5px; font-weight: 700; margin: 0 0 12px; position: relative;
  padding-left: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--p404-line);
  color: var(--p404-head);
}
.p404-rail-title::before {
  content: ''; position: absolute; left: 0; top: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--p404-brand);
}
.p404-rail-title i { color: var(--p404-brand); margin-right: 5px; }
.p404-rail-search { display: flex; gap: 8px; }
.p404-rail-search input {
  flex: 1 1 auto; min-width: 0; border: 1px solid var(--p404-line-strong);
  padding: 10px 14px; font: inherit; font-size: 13.5px; border-radius: var(--p404-radius);
  background: var(--p404-surface-2); color: var(--p404-ink);
}
.p404-rail-search input:focus { outline: 2px solid var(--p404-brand); outline-offset: 1px; }
.p404-rail-search button {
  width: 42px; flex: 0 0 42px; cursor: pointer; border-radius: var(--p404-radius);
  border: none; background: var(--p404-brand); color: #ffffff; font-size: 13px;
}
.p404-rail-empty { font-size: 13px; color: var(--p404-muted); margin: 10px 0 0; }
.p404-rail-cta {
  background: var(--p404-brand-grad); color: rgba(255, 255, 255, .92);
  padding: 20px; text-align: center;
  border-left: 3px solid var(--p404-brand-deep); border-radius: var(--p404-radius);
}
.p404-rail-cta p { font-size: 13.5px; margin: 0 0 12px; }
.p404-rail-cta .p404-btn.is-brand { background: #ffffff; color: var(--p404-brand-deep); }
.p404-rail-cta .p404-btn.is-brand:hover { background: #ffffff; color: var(--p404-brand); }

.p404-ranklist { list-style: none; margin: 0; padding: 0; }
.p404-ranklist li { border-bottom: 1px solid var(--p404-line); }
.p404-ranklist li:last-child { border-bottom: none; }
.p404-ranklist a {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--p404-ink);
}
.p404-ranklist a:hover { color: var(--p404-brand); }
.p404-ranklist img {
  width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain;
  background: var(--p404-surface-2); border: 1px solid var(--p404-line);
  border-radius: var(--p404-radius);
}
.p404-rankno {
  width: 20px; flex: 0 0 20px; font-size: 12px; font-weight: 700;
  color: var(--p404-brand); text-align: center;
}
.p404-ranklist-text { min-width: 0; }
.p404-ranklist-text b {
  display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--p404-head);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.p404-ranklist-text small { font-size: 11.5px; color: var(--p404-muted); }
.p404-ranklist-text small i { color: var(--p404-star); }

/* ---------- newsletter band (the reference's red block) ---------- */
.p404-newsletter {
  background: var(--p404-brand-grad); color: #ffffff;
  padding: 34px 0; margin: 8px 0 40px;
}
.p404-newsletter-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px; flex-wrap: wrap;
}
.p404-newsletter h2 { color: #ffffff; font-size: 22px; margin: 0 0 6px; }
.p404-newsletter p { margin: 0; color: rgba(255, 255, 255, .9); font-size: 13.5px; max-width: 62ch; }
.p404-newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.p404-newsletter-form input {
  min-width: 260px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .14);
  color: #ffffff; padding: 12px 16px; font: inherit; font-size: 13.5px;
  border-radius: var(--p404-radius);
}
.p404-newsletter-form input::placeholder { color: rgba(255, 255, 255, .7); }
.p404-newsletter-form button {
  border: none; cursor: pointer; background: var(--p404-head); color: #ffffff;
  padding: 12px 26px; font: inherit; font-weight: 700; font-size: 13.5px;
  border-radius: var(--p404-radius);
}
.p404-newsletter-form button:hover { background: var(--p404-head-2); }
.p404-newsletter-note { font-size: 12.5px; color: rgba(255, 255, 255, .85); margin-top: 6px; }

/* ---------- FAQ accordion ---------- */
.p404-faq { margin-bottom: 40px; }
.p404-faq-list { border: 1px solid var(--p404-line); border-radius: var(--p404-radius); overflow: hidden; }
.p404-faq-list details { background: var(--p404-surface); border-bottom: 1px solid var(--p404-line); }
.p404-faq-list details:last-child { border-bottom: none; }
.p404-faq-list summary {
  cursor: pointer; font-weight: 700; color: var(--p404-head); padding: 14px 18px;
  list-style: none; position: relative; padding-right: 44px;
}
.p404-faq-list summary::-webkit-details-marker { display: none; }
.p404-faq-list summary::after {
  content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--p404-brand); font-size: 13px;
}
.p404-faq-list details[open] summary::after { content: '\f077'; }
.p404-faq-list details p { margin: 0; padding: 0 18px 14px; color: var(--p404-ink-soft); font-size: 14px; }

/* ---------- detail page ---------- */
/* The detail page carries the same two-column frame as the home page: the
   article column on the left, the related rail on the right. */
.p404-detail {
  display: grid; grid-template-columns: 1fr 316px; gap: 26px;
  align-items: start; padding: 22px 0 48px;
}
.p404-detail .p404-maincol { min-width: 0; }
.p404-detail .p404-rail { min-width: 0; }
.p404-crumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--p404-muted); margin: 0 0 12px;
}
.p404-crumb a { color: var(--p404-ink-soft); }
.p404-crumb a:hover { color: var(--p404-brand); }

.p404-summary {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  border-top: 3px solid var(--p404-brand); padding: 20px;
  border-radius: var(--p404-radius);
}
.p404-summary-top { display: flex; gap: 16px; align-items: flex-start; }
.p404-summary-icon {
  width: 80px; height: 80px; flex: 0 0 80px;
  background: var(--p404-surface-2); border: 1px solid var(--p404-line);
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 26px; color: var(--p404-brand); border-radius: var(--p404-radius);
}
.p404-summary-icon img { width: 64px; height: 64px; object-fit: contain; }
.p404-summary-id { min-width: 0; }
.p404-summary-cat {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--p404-brand-deep); background: var(--p404-brand-wash);
  padding: 3px 10px; margin-bottom: 6px; border-radius: var(--p404-radius);
}
.p404-summary-title {
  font-size: clamp(23px, 3vw, 32px); font-weight: 700; margin: 0 0 8px;
  letter-spacing: -.4px;
}
.p404-summary-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p404-summary-rate { color: var(--p404-brand); font-weight: 700; font-size: 13.5px; }
.p404-summary-rate i { color: var(--p404-star); }
.p404-chip {
  font-size: 11.5px; color: var(--p404-ink-soft); background: var(--p404-surface-2);
  border: 1px solid var(--p404-line); padding: 2px 10px; border-radius: var(--p404-radius);
}
.p404-summary-actions { margin: 18px 0 4px; }

.p404-intro {
  background: var(--p404-brand-wash); border: 1px solid var(--p404-line);
  border-left: 4px solid var(--p404-brand); padding: 14px 16px; margin: 16px 0;
  font-size: 14px; color: var(--p404-ink); border-radius: var(--p404-radius);
}
.p404-intro p { margin: 0; }
.p404-intro.is-steps { background: var(--p404-surface-2); border-left-color: var(--p404-brand-deep); }
.p404-intro.is-steps b { display: block; margin-bottom: 6px; }
.p404-intro.is-steps ol { margin: 0; padding-left: 1.25em; font-size: 13.5px; }

.p404-social {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; border-bottom: 1px solid var(--p404-line); padding-bottom: 14px; margin-bottom: 16px;
}
.p404-social b {
  font-size: 12px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--p404-muted);
}
.p404-social-row { display: flex; gap: 8px; }
.p404-social-row a {
  width: 36px; height: 36px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px;
  background: var(--p404-surface-2); border: 1px solid var(--p404-line);
  color: var(--p404-ink-soft); border-radius: 50%;
}
.p404-social-row a:hover { background: var(--p404-brand); border-color: var(--p404-brand); color: #ffffff; }

.p404-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px; margin: 0 0 18px;
}
.p404-fact {
  background: var(--p404-surface-2); border: 1px solid var(--p404-line); padding: 10px 12px;
  font-family: var(--p404-body); border-radius: var(--p404-radius);
}
.p404-fact dt {
  font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: var(--p404-muted); margin-bottom: 2px;
}
.p404-fact dd { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--p404-ink); }

.p404-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.p404-tag {
  font-size: 12.5px; font-weight: 600; padding: 5px 12px;
  background: var(--p404-surface-2); border: 1px solid var(--p404-line); color: var(--p404-ink-soft);
  border-radius: var(--p404-radius);
}
.p404-tag:hover { border-color: var(--p404-brand); color: var(--p404-brand); }
.p404-tag.is-active { background: var(--p404-brand); border-color: var(--p404-brand); color: #ffffff; }

.p404-toc {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  border-left: 4px solid var(--p404-brand); padding: 16px 18px; margin: 24px 0 18px;
  border-radius: var(--p404-radius);
}
.p404-toc-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; padding: 0; }
.p404-toc-title i { color: var(--p404-brand); margin-right: 5px; }
.p404-toc ol { margin: 0; padding-left: 1.25em; font-size: 13.5px; }
.p404-toc ol ol { font-size: 13px; color: var(--p404-ink-soft); margin: 2px 0 6px; }

.p404-article {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  padding: 22px 24px; font-size: 14.5px; border-radius: var(--p404-radius);
}
.p404-article h2 {
  font-size: 20px; font-weight: 700; margin: 26px 0 10px;
  padding-left: 13px; position: relative; scroll-margin-top: 90px;
}
.p404-article h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 22px; border-radius: 3px; background: var(--p404-brand);
}
.p404-article h3 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; }
.p404-article h2:first-child { margin-top: 0; }
.p404-article ul, .p404-article ol { font-size: 14px; }
.p404-article a { color: var(--p404-brand); text-decoration: underline; }
.p404-article a:hover { color: var(--p404-brand-deep); }
.p404-article strong { color: var(--p404-head); }
.p404-article details {
  border: 1px solid var(--p404-line); padding: 10px 14px; margin: 10px 0;
  background: var(--p404-surface-2); border-radius: var(--p404-radius);
}
.p404-article summary { cursor: pointer; font-weight: 700; color: var(--p404-head); }
.p404-shot { margin: 18px 0; }
.p404-shot img {
  width: 100%; max-width: 520px; display: block; margin: 0 auto;
  border: 1px solid var(--p404-line); border-radius: var(--p404-radius);
}
.p404-shot figcaption {
  text-align: center; font-size: 12px; color: var(--p404-muted); margin-top: 8px;
}
.p404-related-inline {
  background: var(--p404-brand-wash); border: 1px solid var(--p404-line);
  border-left: 4px solid var(--p404-brand); padding: 10px 14px; font-size: 13.5px;
  border-radius: var(--p404-radius);
}
.p404-related-inline a { color: var(--p404-brand); }

/* ---------- download zone (shared appkit markup) ---------- */
.p404-dlzone { margin: 24px 0; }
.app-dl-zone {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  border-top: 3px solid var(--p404-brand); padding: 18px; text-align: center;
  border-radius: var(--p404-radius);
}
.app-dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 30px; border: none; cursor: pointer; border-radius: var(--p404-radius);
  background: var(--p404-brand); color: #ffffff;
  font: inherit; font-weight: 700; font-size: 14px;
  box-shadow: var(--p404-shadow-sm);
}
.app-dl-btn:hover { background: var(--p404-brand-deep); color: #ffffff; }
.app-dl-progress { margin-bottom: 14px; }
.app-dl-progress span { display: block; font-size: 13px; color: var(--p404-ink-soft); margin-bottom: 8px; }
.app-dl-bar {
  display: block; height: 7px; background: var(--p404-surface-2);
  overflow: hidden; position: relative; border-radius: 4px;
}
.app-dl-bar b {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--p404-brand-grad);
  display: block;
}
.app-dl-install {
  background: var(--p404-surface-2); border: 1px solid var(--p404-line);
  padding: 12px 16px; margin-bottom: 14px; text-align: left;
  border-radius: var(--p404-radius);
}
.app-dl-install b { display: block; margin-bottom: 6px; }
.app-dl-install ol { margin: 0; padding-left: 1.25em; font-size: 13.5px; }
.p404-body .app-dl-final,
.p404-body a.app-dl-final {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 30px; font-weight: 700; font-size: 14px;
  border-radius: var(--p404-radius);
  background: var(--p404-brand); color: #ffffff; text-decoration: none;
  box-shadow: var(--p404-shadow-sm);
}
.p404-body .app-dl-final:hover,
.p404-body a.app-dl-final:hover { background: var(--p404-brand-deep); color: #ffffff; }
.app-dl-final[hidden] { display: none; }

/* ---------- comments ---------- */
.p404-comments {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  border-top: 3px solid var(--p404-brand); padding: 18px; margin: 24px 0 0;
  border-radius: var(--p404-radius);
}
.p404-comments-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.p404-comments-title i { color: var(--p404-brand); margin-right: 5px; }
.p404-cform label { display: block; margin-bottom: 12px; }
.p404-cform label > span {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--p404-muted); margin-bottom: 5px;
}
.p404-cform input, .p404-cform textarea {
  width: 100%; border: 1px solid var(--p404-line-strong);
  padding: 10px 14px; font: inherit; font-size: 14px; border-radius: var(--p404-radius);
  background: var(--p404-surface-2); color: var(--p404-ink);
}
.p404-cform input:focus, .p404-cform textarea:focus {
  outline: 2px solid var(--p404-brand); outline-offset: 1px; border-color: var(--p404-brand);
}
.p404-cform small { display: block; font-size: 11.5px; color: var(--p404-muted); margin-top: 4px; }
.p404-cform button {
  border: none; cursor: pointer; background: var(--p404-brand); color: #ffffff;
  padding: 11px 26px; font: inherit; font-weight: 700; font-size: 13.5px;
  border-radius: var(--p404-radius);
}
.p404-cform button:hover { background: var(--p404-brand-deep); color: #ffffff; }
.p404-cform-success {
  margin: 12px 0 0; font-size: 13.5px; color: #0a6f4a;
  background: var(--p404-brand-wash); padding: 9px 12px; border-radius: var(--p404-radius);
}

/* ---------- landing ---------- */
.p404-landing {
  background: var(--p404-surface); border: 1px solid var(--p404-line);
  border-top: 3px solid var(--p404-brand); padding: 24px; max-width: 840px; margin: 0 auto;
  border-radius: var(--p404-radius);
}
.p404-landing-id { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.p404-landing-idmain { min-width: 0; }
.p404-landing-title { font-size: clamp(23px, 3vw, 32px); font-weight: 700; margin: 4px 0 6px; letter-spacing: -.4px; }
.p404-facts.is-landing { margin-bottom: 18px; }
.p404-landing-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.p404-landing-actions .p404-btn.is-ghost { border-color: var(--p404-line-strong); color: var(--p404-ink); }
.p404-landing-actions .p404-btn.is-ghost:hover { border-color: var(--p404-brand); background: var(--p404-brand-wash); color: var(--p404-brand); }

/* ---------- 404 ---------- */
.p404-nf { text-align: center; padding: 60px 20px 80px; }
.p404-nf-stamp {
  display: inline-block; font-weight: 700;
  font-size: 56px; color: var(--p404-brand); line-height: 1;
  border: 2px dashed var(--p404-brand-deep); padding: 12px 26px; margin-bottom: 18px;
  border-radius: var(--p404-radius);
}
.p404-nf h1 { font-size: 27px; font-weight: 700; color: var(--p404-head); }
.p404-nf p { color: var(--p404-ink-soft); }
.p404-nf .p404-btn.is-brand { margin-top: 6px; }

/* ---------- dock ---------- */
.p404-dock {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 70;
  background: var(--p404-head); border: 1px solid #2b2d35;
  padding: 6px; box-shadow: var(--p404-shadow); border-radius: 24px;
}
.p404-dock-btn {
  padding: 9px 22px; font-size: 13px; font-weight: 700;
  color: #c9ccd4; background: transparent;
  border-radius: 18px;
}
.p404-dock-btn:hover { background: rgba(255, 255, 255, .08); color: #ffffff; }
.p404-dock-btn.is-brand { background: var(--p404-brand); color: #ffffff; }
.p404-dock-btn.is-brand:hover { background: var(--p404-brand-deep); color: #ffffff; }

/* ---------- footer ---------- */
.p404-foot { background: var(--p404-head); color: #a7aab4; margin-top: 20px; }
.p404-foot-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 28px;
  padding: 38px 0 28px;
}
.p404-foot-logo {
  display: inline-block; margin-bottom: 10px;
  font-weight: 700; font-size: 22px; color: #ffffff;
}
.p404-foot-logo img { display: block; height: 26px; width: auto; }
.p404-foot-text { font-size: 13px; color: #a7aab4; margin: 0 0 12px; }
.p404-foot-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.p404-age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; font-size: 12px; font-weight: 700;
  color: #ffffff; background: var(--p404-brand); border-radius: 50%;
}
.p404-org-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #a7aab4;
  background: rgba(255, 255, 255, .06); border: 1px solid #2b2d35;
  padding: 6px 12px; border-radius: 18px;
}
.p404-org-badge i { color: var(--p404-brand); }
.p404-foot-col { display: flex; flex-direction: column; gap: 8px; }
.p404-foot-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: #ffffff; margin: 0 0 4px; position: relative; padding-bottom: 8px;
}
.p404-foot-title::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 42px; height: 2px;
  background: var(--p404-brand);
}
.p404-foot-col a { font-size: 13px; color: #a7aab4; }
.p404-foot-col a:hover { color: #ffffff; }
.p404-foot-note { font-size: 12.5px; color: #83858f; margin: 4px 0 0; }
.p404-foot-social { display: flex; gap: 8px; margin-top: 6px; }
.p404-foot-social a {
  width: 34px; height: 34px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12.5px;
  background: rgba(255, 255, 255, .06); color: #a7aab4;
  border: 1px solid #2b2d35; border-radius: 50%;
}
.p404-foot-social a:hover { background: var(--p404-brand); border-color: var(--p404-brand); color: #ffffff; }
.p404-foot-base {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  border-top: 1px solid #2b2d35; padding: 14px 0 22px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: #83858f;
}
.p404-foot-base p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .p404-frame { grid-template-columns: 1fr 292px; }
  .p404-detail { grid-template-columns: 1fr 292px; }
  .p404-hero-in { grid-template-columns: 1fr 270px; }
}

@media (max-width: 900px) {
  .p404-hero-in { grid-template-columns: 1fr; padding: 32px 0; }
  .p404-exhibit { max-width: 340px; }
  .p404-frame { grid-template-columns: 1fr; }
  .p404-detail { grid-template-columns: 1fr; }
  .p404-rail { order: -1; }
  .p404-triptych { grid-template-columns: 1fr; }
  .p404-foot-in { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .p404-burger { display: inline-flex; align-items: center; justify-content: center; }
  .p404-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--p404-surface); border-bottom: 1px solid var(--p404-line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px;
    box-shadow: var(--p404-shadow-sm);
  }
  .p404-body.is-drawer-open .p404-nav { display: flex; }
  .p404-header-in { position: relative; flex-wrap: wrap; gap: 10px; }
  .p404-brand { min-width: 0; }
  .p404-brand-sub { display: none; }
  .p404-brand-word { font-size: 20px; }
  .p404-brand-mark img { width: 36px; height: 36px; }
  .p404-headsearch { order: 3; flex-basis: 100%; max-width: none; }
  .p404-tools { margin-left: auto; gap: 6px; }
  /* The pill keeps both locales visible but drops its padding so the brand,
     the burger and the mode toggle still fit on one 390px row. */
  .p404-switch-seg { padding: 6px 10px; font-size: 11.5px; }
  .p404-utility-topics a span { display: none; }
  .p404-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .p404-card-link { flex-direction: column; gap: 10px; }
  .p404-card-icon { width: 52px; height: 52px; flex: 0 0 52px; }
  .p404-card-title { -webkit-line-clamp: 3; }
  .p404-summary-top { gap: 12px; }
  .p404-summary-icon { width: 64px; height: 64px; flex: 0 0 64px; }
  .p404-summary-icon img { width: 50px; height: 50px; }
  .p404-foot-in { grid-template-columns: 1fr; }
  .p404-article { padding: 18px 16px; }
  .p404-dock { bottom: 10px; }
  .p404-newsletter-form input { min-width: 0; flex: 1 1 100%; }
  /* The detail page keeps its rail under the article on mobile, so the
     related-app lists follow the guide instead of pre-empting it. */
  .p404-detail .p404-rail { order: 0; }
}

@media (max-width: 420px) {
  .p404-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p404-card-icon { width: 44px; height: 44px; flex: 0 0 44px; }
}
